:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1b1a17;
  --muted: #5c5850;
  --line: #e3ded4;
  --accent: #0b6b6b;
  --accent-soft: #e3f1ef;
  --measure: 44rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1415;
    --surface: #161d1e;
    --text: #ece9e2;
    --muted: #a39f95;
    --line: #2a3334;
    --accent: #5cc6be;
    --accent-soft: #173130;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

.site-header, .site-footer, main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }

main { padding-top: 2.5rem; padding-bottom: 3rem; }

h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

h3 { font-size: 1.05rem; margin: 1.5rem 0 0.25rem; }

p, ul, dl { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

.lede { color: var(--muted); font-size: 1.05rem; }
.updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

.contents {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.contents h2 { margin: 0 0 0.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.contents ol { margin: 0; padding-left: 1.25rem; columns: 2 16rem; column-gap: 2rem; }
.contents li { margin-bottom: 0.2rem; break-inside: avoid; }

.perms { border-top: 1px solid var(--line); }
.perms div { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.perms dt { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9rem; font-weight: 600; }
.perms dd { margin: 0.2rem 0 0; }

.note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}
.note p:last-child { margin-bottom: 0; }

.cards { display: grid; gap: 1rem; margin: 1.5rem 0 2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
}
.card h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.card p:last-child { margin-bottom: 0; }

address { font-style: normal; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0 0 0.35rem; }
.site-footer a { color: var(--muted); }
