/* OttoAnna – The Sound Atlas. One stylesheet, no framework. */
:root {
  --bg: #f6f5f1;
  --bg-2: #efede6;
  --surface: #ffffff;
  --ink: #15171c;
  --ink-2: #2d3139;
  --muted: #646b78;
  --line: #e2dfd6;
  --line-2: #d3cfc3;
  --accent: #e8451c;
  --accent-ink: #ffffff;
  --accent-soft: #fde6dd;
  --blue: #2457e6;
  --blue-soft: #e3eaff;
  --green: #138a5b;
  --amber: #b86e00;
  --land: #d9d5ca;
  --sea: #eceae3;
  --shadow: 0 1px 2px rgba(20, 22, 28, .05), 0 8px 24px -12px rgba(20, 22, 28, .18);
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1180px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f13; --bg-2: #12151b; --surface: #161a21; --ink: #eef0f4; --ink-2: #d5d9e0; --muted: #98a1ae;
    --line: #252b35; --line-2: #313946; --accent: #ff6a3d; --accent-ink: #14100e; --accent-soft: #3a1e14;
    --blue: #7b9cff; --blue-soft: #1a2240; --green: #3ccf91; --amber: #f2b44a; --land: #2a313c; --sea: #161a21;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f13; --bg-2: #12151b; --surface: #161a21; --ink: #eef0f4; --ink-2: #d5d9e0; --muted: #98a1ae;
  --line: #252b35; --line-2: #313946; --accent: #ff6a3d; --accent-ink: #14100e; --accent-soft: #3a1e14;
  --blue: #7b9cff; --blue-soft: #1a2240; --green: #3ccf91; --amber: #f2b44a; --land: #2a313c; --sea: #161a21;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.62 var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg, canvas, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 750; margin-top: 2.2em; }
h3 { font-size: 1.12rem; font-weight: 700; margin-top: 1.6em; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; }
.muted { color: var(--muted); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- header */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 850; letter-spacing: -.03em; font-size: 1.22rem; white-space: nowrap; }
.logo svg { width: 30px; height: 30px; }
.logo small { font-weight: 500; color: var(--muted); letter-spacing: 0; font-size: .78rem; margin-left: 2px; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 11px; border-radius: 999px; font-size: .94rem; font-weight: 550; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg-2); color: var(--ink); }
.head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; min-width: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-size: .9rem; }
.btn-icon:hover { border-color: var(--line-2); }
.btn-icon svg { width: 18px; height: 18px; }
.search-btn { min-width: 210px; justify-content: flex-start; color: var(--muted); }
.search-btn kbd { margin-left: auto; font: 11px var(--mono); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.menu-btn { display: none; }
@media (max-width: 1060px) { .nav { display: none; } .menu-btn { display: inline-flex; } .search-btn { min-width: 0; } .search-btn span, .search-btn kbd { display: none; } }
.drawer { display: none; border-top: 1px solid var(--line); padding: 10px 0 18px; }
.drawer.open { display: block; }
.drawer a { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }

/* ---------- breadcrumbs + hero */
.crumbs { font-size: .84rem; color: var(--muted); padding: 22px 0 0; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.hero { padding: 26px 0 30px; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { max-width: 20ch; }
.hero .sub { font-size: 1.05rem; color: var(--muted); margin: -4px 0 14px; }
.hero .sub i { font-family: var(--serif); }
.lead { font-size: 1.18rem; line-height: 1.6; color: var(--ink-2); max-width: 68ch; }
.wave { height: 64px; width: 100%; margin-top: 22px; color: var(--accent); opacity: .9; }
.wave path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.wave .w2 { stroke: var(--blue); opacity: .45; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); text-decoration: none; }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { color: var(--muted); font-family: var(--mono); font-size: .78rem; }

/* ---------- layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; padding-bottom: 40px; }
.layout.wide { grid-template-columns: minmax(0, 1fr); }
.content { min-width: 0; }
.content > section:first-child > h2:first-child { margin-top: .4em; }
.aside { position: sticky; top: 84px; display: grid; gap: 18px; }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } .aside { position: static; } }
.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); font-family: var(--serif); font-size: 1.07rem; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.prose table { width: 100%; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.panel h2, .panel h3 { margin-top: 0; }
.panel-title { font-size: .76rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.quote { background: var(--bg-2); border-radius: var(--radius); padding: 18px 22px; margin: 1.2em 0; }
.quote p { color: var(--ink-2); }
.quote footer { font-size: .82rem; color: var(--muted); }
.note { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .9rem; color: var(--muted); background: var(--surface); }
.warn { border-left: 3px solid var(--amber); background: color-mix(in srgb, var(--amber) 9%, var(--surface)); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .93rem; }

/* ---------- facts */
.facts { width: 100%; border-collapse: collapse; font-size: .93rem; }
.facts th, .facts td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { color: var(--muted); font-weight: 550; width: 42%; padding-right: 12px; }
.facts td { color: var(--ink); font-weight: 560; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font: 750 1.6rem/1.1 var(--mono); letter-spacing: -.03em; color: var(--ink); }
.stat b small { font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat span { font-size: .82rem; color: var(--muted); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { background: var(--bg-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); }
table.data tr.hl td { background: var(--accent-soft); font-weight: 650; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }

/* ---------- cards */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid.sm { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid.lg { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.card .thumb { aspect-ratio: 16 / 10; background: var(--bg-2); object-fit: cover; width: 100%; }
.card .thumb.ph { display: flex; align-items: center; justify-content: center; color: var(--accent); }
.card .thumb.ph svg { width: 70%; height: 60%; opacity: .55; }
.card .body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card h3 { font-size: 1rem; margin: 0; letter-spacing: -.01em; }
.card p { font-size: .86rem; color: var(--muted); margin: 0; }
.card .meta { margin-top: auto; padding-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); font-family: var(--mono); }
.card .badge { position: absolute; top: 10px; left: 10px; background: color-mix(in srgb, var(--ink) 78%, transparent); color: var(--bg); font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { display: block; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; overflow: hidden; transition: border-color .18s, transform .18s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.tile h3 { margin: 10px 0 4px; font-size: 1.15rem; }
.tile p { margin: 0; color: var(--muted); font-size: .92rem; }
.tile .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.tile .ico svg { width: 22px; height: 22px; }
.tile .count { position: absolute; right: 18px; top: 20px; font: 600 .82rem var(--mono); color: var(--muted); }
@media (max-width: 620px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; }
  .tile h3 { font-size: 1rem; margin-top: 8px; }
  .tile p { font-size: .8rem; line-height: 1.4; }
  .tile .ico { width: 34px; height: 34px; border-radius: 10px; }
  .tile .count { right: 12px; top: 14px; font-size: .72rem; }
  .grid.sm { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card .body { padding: 10px 11px 12px; }
  .stat b { font-size: 1.3rem; }
  .wrap { padding: 0 16px; }
}
.list { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 28px; }
.list li { break-inside: avoid; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: .95rem; display: flex; justify-content: space-between; gap: 10px; }
.list li a { text-decoration: none; color: var(--ink); }
.list li a:hover { color: var(--accent); }
.list li .n { font: .78rem var(--mono); color: var(--muted); white-space: nowrap; }
.rows { display: grid; gap: 8px; }
.row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.row:hover { border-color: var(--line-2); color: var(--ink); }
.row .t { font-weight: 640; }
.row .s { font-size: .84rem; color: var(--muted); }
.row .r { margin-left: auto; font: .8rem var(--mono); color: var(--muted); white-space: nowrap; }
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 20px; }
.az a, .az span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 650; font-size: .9rem; }
.az a:hover { border-color: var(--accent); color: var(--accent); }
.az span { opacity: .35; }
.pager { display: flex; gap: 8px; justify-content: center; margin: 28px 0; flex-wrap: wrap; }
.pager a, .pager span { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: .9rem; }
.pager span.cur { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter { width: 100%; max-width: 420px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 18px; font: inherit; margin: 6px 0 18px; }

/* ---------- audio player */
.player { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; box-shadow: var(--shadow); }
.player .pbtn { grid-row: span 2; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s; }
.player .pbtn:hover { transform: scale(1.06); }
.player .pbtn svg { width: 22px; height: 22px; }
.player .pbtn .i-pause, .player.playing .pbtn .i-play { display: none; }
.player.playing .pbtn .i-pause { display: block; }
.player.loading .pbtn { opacity: .7; }
.player .ptitle { font-weight: 650; font-size: .96rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .pmeta { font-size: .78rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.player .pmeta a { color: var(--muted); }
.player .viz { grid-column: 1 / -1; position: relative; height: 56px; margin-top: 10px; cursor: pointer; border-radius: 8px; overflow: hidden; }
.player .viz canvas { width: 100%; height: 100%; }
.player .ptime { position: absolute; right: 6px; bottom: 4px; font: 11px var(--mono); color: var(--muted); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 0 4px; border-radius: 4px; }
.player audio { display: none; }
.player.error .pmeta::after { content: "Could not load audio – open the source page instead."; color: var(--accent); }
.spectro { border-radius: var(--radius-sm); border: 1px solid var(--line); background: #000; width: 100%; image-rendering: auto; }
.credit { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.figure { margin: 0 0 18px; }
.figure img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; max-height: 520px; object-fit: cover; background: var(--bg-2); }
.figure figcaption { font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* ---------- tone generator */
.tone { background: var(--ink); color: var(--bg); border-radius: 18px; padding: 22px; display: grid; gap: 16px; position: relative; overflow: hidden; }
:root[data-theme="dark"] .tone { background: #1d222b; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tone { background: #1d222b; color: var(--ink); } }
.tone .freq { font: 800 clamp(2.4rem, 6vw, 3.6rem)/1 var(--mono); letter-spacing: -.04em; }
.tone .freq small { font-size: 1.1rem; opacity: .7; margin-left: 6px; }
.tone .row2 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tone button, .tone select { font: inherit; font-size: .9rem; border-radius: 999px; padding: 9px 16px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: transparent; color: inherit; cursor: pointer; }
.tone button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tone .play { background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 750; padding: 12px 26px; }
.tone input[type="range"] { width: 100%; accent-color: var(--accent); }
.tone label { font-size: .8rem; opacity: .75; display: block; margin-bottom: 4px; }
.tone canvas { width: 100%; height: 80px; }
.tone .safety { font-size: .78rem; opacity: .7; }

/* ---------- dB meter scale */
.dbscale { position: relative; padding: 6px 0; }
.dbscale .bar { height: 14px; border-radius: 999px; background: linear-gradient(90deg, #39b37b 0%, #a6c23a 34%, #f0b429 48%, #f27b21 60%, #e8451c 72%, #a3122a 86%, #4b0b1c 100%); }
.dbscale .mark { position: absolute; top: -2px; width: 3px; height: 30px; background: var(--ink); border-radius: 2px; transform: translateX(-50%); }
.dbscale .mark span { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); font: 700 .8rem var(--mono); white-space: nowrap; }
.dbscale .ticks { position: relative; height: 16px; font: .72rem var(--mono); color: var(--muted); margin-top: 34px; }
.dbscale .ticks span { position: absolute; transform: translateX(-50%); }
.dbscale .ticks span:first-child { transform: none; }
.dbscale .ticks span:last-child { transform: translateX(-100%); }
.ladder { display: grid; gap: 6px; }
.ladder a { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.ladder a:hover { border-color: var(--accent); }
.ladder .lv { font: 750 1rem var(--mono); }
.ladder .lbar { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #39b37b, #f0b429, #e8451c, #4b0b1c); }
.ladder .cat { font-size: .78rem; color: var(--muted); }

/* ---------- maps */
.map { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--sea); border: 1px solid var(--line); }
.map svg { width: 100%; height: auto; display: block; }
.map .land { fill: var(--land); }
.map .dot { fill: var(--accent); stroke: var(--surface); stroke-width: .25; }
.map .dot.big { fill: var(--accent); stroke: var(--surface); }
.map .ring { fill: none; stroke: var(--accent); opacity: .4; }
.map .cap { position: absolute; left: 12px; bottom: 10px; font-size: .75rem; color: var(--muted); background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 2px 8px; border-radius: 999px; }

/* ---------- FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 1.3rem/1 var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* ---------- forms & tools */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .82rem; font-weight: 650; color: var(--muted); }
.field input, .field select, .field textarea { height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); padding: 0 14px; font: 500 1rem var(--font); }
.field textarea { height: auto; padding: 10px 14px; }
.fields { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.result { background: var(--bg-2); border-radius: 14px; padding: 18px 20px; margin-top: 8px; }
.result b { font: 800 1.9rem/1.1 var(--mono); letter-spacing: -.03em; display: block; }
.result span { color: var(--muted); font-size: .88rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 650 .95rem var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); color: var(--accent-ink); }
.meter { font: 800 4rem/1 var(--mono); letter-spacing: -.05em; }

/* ---------- home */
.home-hero { padding: 54px 0 34px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; }
.home-hero h1 { font-size: clamp(2.6rem, 6vw, 4.7rem); max-width: 13ch; }
.home-hero h1 em { font-style: normal; color: var(--accent); }
.home-hero .lead { font-size: 1.24rem; }
.big-search { display: flex; align-items: center; gap: 12px; width: 100%; height: 60px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); padding: 0 8px 0 20px; max-width: 560px; cursor: text; box-shadow: var(--shadow); color: var(--muted); font: inherit; font-size: 1.02rem; margin-top: 24px; text-align: left; }
.big-search svg { width: 22px; height: 22px; flex: none; }
.big-search .hint { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.big-search .btn { margin-left: auto; height: 44px; flex: none; }
.orb { aspect-ratio: 1; border-radius: 28px; background: radial-gradient(120% 90% at 30% 20%, var(--accent-soft), transparent 60%), var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.orb svg { width: 88%; height: 88%; }
@media (max-width: 860px) { .home-hero { grid-template-columns: 1fr; padding-top: 30px; } .orb { display: none; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 56px 0 18px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 650; text-decoration: none; white-space: nowrap; }

/* ---------- footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 46px 0 30px; background: var(--bg-2); font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.site-foot h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 18px; color: var(--muted); font-size: .82rem; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- search overlay */
.search-dlg { position: fixed; inset: 0; z-index: 100; display: none; background: color-mix(in srgb, #000 45%, transparent); backdrop-filter: blur(3px); padding: 9vh 16px 16px; }
.search-dlg.open { display: block; }
.search-box { max-width: 680px; margin: 0 auto; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); overflow: hidden; }
.search-box input { width: 100%; height: 62px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: 500 1.15rem var(--font); padding: 0 22px; outline: none; }
.search-res { max-height: 62vh; overflow-y: auto; padding: 8px; margin: 0; list-style: none; }
.search-res a { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.search-res a.sel, .search-res a:hover { background: var(--bg-2); }
.search-res .k { font: 700 .7rem var(--mono); text-transform: uppercase; color: var(--accent); min-width: 86px; }
.search-res .empty { padding: 18px; color: var(--muted); }
.search-foot { border-top: 1px solid var(--line); padding: 8px 16px; font-size: .75rem; color: var(--muted); display: flex; justify-content: space-between; }

/* ---------- misc */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .cols-2 { grid-template-columns: 1fr; } }
.kbd { font: 12px var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }
.attr { font-size: .8rem; color: var(--muted); }
.attr li { margin: 4px 0; }
.toc { font-size: .9rem; }
.toc ol { margin: 0; padding-left: 1.1em; }
.toc li { margin: 4px 0; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.pill-nav { display: flex; gap: 8px; justify-content: space-between; margin: 30px 0 0; }
.pill-nav a { flex: 1; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pill-nav a small { display: block; color: var(--muted); font-size: .76rem; }
.pill-nav a.next { text-align: right; }
.empty-state { padding: 40px; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-head, .site-foot, .player .viz, .tone, .search-dlg { display: none !important; } body { background: #fff; } }
