/* AudioTools.org — theme_09 "Graphite Engineering Deck". Zero external fonts/CDNs. */
:root {
  --bg: #18181b;
  --surface: #27272a;
  --surface2: #303034;
  --ink: #fafafa;
  --accent: #06b6d4;
  --muted: #a1a1aa;
  --line: #3f3f46;
  --warn: #fbbf24;
  --bad: #f87171;
  --good: #34d399;
  --radius: 12px;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1000px 460px at 85% -10%, rgba(6,182,212,0.08), transparent 60%),
    radial-gradient(800px 400px at 5% 0%, rgba(6,182,212,0.05), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--accent); }
code, pre { font-family: var(--mono); }

.hero { max-width: 1080px; margin: 0 auto; padding: 48px 24px 12px; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0; letter-spacing: -0.02em; font-weight: 800; }
.hero .accent { color: var(--accent); }
.hero p { color: var(--muted); max-width: 660px; margin: 12px auto 0; }

/* Above-the-fold editorial / affiliate disclosure */
.disclosure-bar {
  max-width: 1080px; margin: 18px auto 0; padding: 10px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 8px;
  color: var(--muted); font-size: 0.85rem;
}
.disclosure-bar a { color: var(--accent); }

/* Tabbed command strip */
.tabs {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  max-width: 1080px; margin: 20px auto 0; padding: 0 24px;
}
.tab {
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 18px; font-size: 0.88rem; cursor: pointer;
  font-family: var(--mono); letter-spacing: 0.02em;
  transition: color .15s, border-color .15s, background .15s;
}
.tab:hover { color: var(--ink); border-color: var(--accent); }
.tab.active { color: #06222b; background: var(--accent); border-color: var(--accent); font-weight: 700; }

main { max-width: 1080px; margin: 24px auto 64px; padding: 0 24px; }
.tabpane { display: none; }
.tabpane.active { display: block; }

.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 16px;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { margin: 0 0 14px; font-size: 1.02rem; letter-spacing: 0.01em; }
.card h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 8px; vertical-align: 2px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
button {
  background: var(--accent); color: #06222b; border: 0; border-radius: 8px;
  padding: 9px 16px; font-size: 0.88rem; font-weight: 700; cursor: pointer;
  font-family: var(--mono);
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); font-weight: 500; }
button.ghost:hover { border-color: var(--accent); }

.grid-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
label { display: block; font-size: 0.8rem; color: var(--muted); }
input, select, textarea {
  width: 100%; margin-top: 5px; background: var(--surface2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px;
  font-size: 0.9rem; font-family: var(--mono);
}
textarea { font-size: 0.78rem; resize: vertical; }
input:focus, select:focus, textarea:focus, .dropzone:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 34px 18px; text-align: center; color: var(--muted);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: rgba(6,182,212,0.06); color: var(--ink); }

.out {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; font-size: 0.85rem; overflow-x: auto; min-height: 2.4em;
}
.out table { border-collapse: collapse; width: 100%; font-size: 0.8rem; }
.out th, .out td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.out th:first-child, .out td:first-child { text-align: left; }
.out th { color: var(--muted); font-weight: 600; }
.out tr.best td { color: var(--good); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.stat .k { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--mono); }
.stat .v { font-size: 1.1rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.stat .v.bad { color: var(--bad); }
.stat .v.warn { color: var(--warn); }
.stat .v.good { color: var(--good); }

.waveform { background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; }
.waveform svg { display: block; min-width: 480px; }

.muted { color: var(--muted); }
.report-md { background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; white-space: pre-wrap; font-size: 0.8rem; }
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }
.good-text { color: var(--good); }

.anchors { font-family: var(--mono); font-size: 0.85rem; }
.anchors li { margin: 4px 0; }

.foot {
  max-width: 1080px; margin: 0 auto; padding: 28px 24px 48px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
  text-align: center;
}
.foot p { margin: 6px 0; }

@media (max-width: 640px) {
  .hero { padding-top: 32px; }
  .card { padding: 16px; }
}
