/* AudioHash design system: ink ground, lime accent, Bricolage display, IBM Plex body. */
:root {
  --bg: #0E1116; --surface: #161B22; --raised: #1C222B; --line: #2A313C; --line-2: #3A424E;
  --text: #E8EAED; --text-2: #C9CED6; --muted: #AEB5BF; --faint: #9BA3AF;
  --accent: #C6F432; --accent-hover: #E2FF7A; --on-accent: #0E1116;
  --warn: #F5B85A; --warn-bg: #241D10; --warn-line: #6B5326;
  --bad: #FF9B85; --bad-bg: #2A1712; --bad-line: #6E3326;
  --info: #7CC4FF; --info-line: #2B4F6E;
  --ok-bg: #1B2410; --ok-line: #5A6E1E;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --r: 12px; --r-lg: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img, svg { display: block; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section { padding: 88px 0; }

/* type */
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; font-size: clamp(40px, 6vw, 64px); }
.h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; font-size: clamp(30px, 4vw, 44px); }
.h3 { font-size: 19px; font-weight: 600; }
.lead { font-size: 19px; color: var(--muted); max-width: 540px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 14px; }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }

/* brand */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.brand-mark { width: 28px; height: 28px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text); font-weight: 600; cursor: pointer; text-align: center; }
.btn:hover { color: var(--text); border-color: var(--faint); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-light { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-light:hover { color: var(--bg); background: #fff; }
.btn-lg { min-height: 50px; padding: 14px 24px; border-radius: 12px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 8px; font-weight: 500; }
.btn-danger { color: var(--bad); border-color: var(--bad-line); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; min-height: 44px; font-size: 15px; width: 100%; }
.textarea { padding: 14px; font-size: 16px; line-height: 1.55; resize: vertical; min-height: 160px; border-radius: 12px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--faint); outline: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.code-input { font-family: var(--mono); font-size: 28px; letter-spacing: 10px; text-align: center; min-height: 60px; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card-inset { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card-accent { border: 2px solid var(--accent); padding: 23px; }
.pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 3px 8px; border: 1px solid var(--line-2); color: var(--muted); }
.pill-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill-ok { color: var(--accent); border-color: var(--ok-line); }
.pill-warn { color: var(--warn); border-color: var(--warn-line); }
.pill-bad { color: var(--bad); border-color: var(--bad-line); }
.pill-info { color: var(--info); border-color: var(--info-line); }
.notice { border-radius: 10px; padding: 12px 14px; font-size: 14px; border: 1px solid var(--line-2); }
.notice-bad { background: var(--bad-bg); border-color: var(--bad-line); color: #FFD3C9; }
.notice-ok { background: var(--ok-bg); border-color: var(--ok-line); }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); }

.meter { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; width: 0; }

/* marketing header/footer */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 15px; }
.site-nav a:not(.btn) { color: var(--text-2); }
.site-nav a:not(.btn):hover { color: var(--text); }
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--faint); }
.site-footer a { color: var(--faint); }
.site-footer a:hover { color: var(--text); }

/* hero */
.hero { padding-top: 64px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero > * { flex: 1 1 460px; min-width: 0; }
.wave { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 3px; overflow: hidden; }
.wave i { display: block; flex: none; width: 4px; border-radius: 2px; background: var(--line-2); }
.wave i.on { background: var(--accent); }
.player { display: flex; align-items: center; gap: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.play { width: 44px; height: 44px; flex: none; border-radius: 22px; border: 0; background: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* steps, pricing, faq */
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; border-top: 2px solid var(--line-2); padding-top: 20px; }
.steps li:first-child { border-top-color: var(--accent); }
.steps .num { font-family: var(--mono); color: var(--faint); font-size: 14px; }
.steps li:first-child .num { color: var(--accent); }
.price-card { display: flex; flex-direction: column; gap: 18px; }
.price { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; }
.price-card ul { margin: 0; padding: 0 0 0 18px; color: var(--text-2); font-size: 15px; display: flex; flex-direction: column; gap: 8px; }
.price-card .btn { margin-top: auto; }
.faq-item { border-top: 1px solid var(--line); padding: 22px 0; display: flex; flex-direction: column; gap: 8px; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.cta-band { background: var(--accent); color: var(--on-accent); border-radius: 24px; padding: 56px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band .btn { background: var(--bg); color: #F2F4F6; border-color: var(--bg); }

/* app shell */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 220px; max-width: 260px; min-width: 200px; background: var(--surface); border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { color: var(--text-2); border-radius: 8px; padding: 10px 12px; }
.sidebar nav a:hover { background: var(--raised); color: var(--text); }
.sidebar nav a.active { background: #232A34; color: var(--text); font-weight: 600; }
.sidebar .foot { margin-top: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 10px; }
.main { flex: 999 1 560px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.page-title { font-family: var(--display); font-size: 32px; letter-spacing: -0.02em; }
.panel-row { display: flex; flex-wrap: wrap; gap: 16px; }
.panel-row > * { min-width: 0; }
.grow-3 { flex: 3 1 520px; } .grow-2 { flex: 2 1 300px; } .grow-1 { flex: 1 1 260px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi .v { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.1; }
.kpi .l, .kpi .s { font-size: 13px; color: var(--muted); }
.list-item { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; border-top: 1px solid #232A34; padding: 12px 0; }
.list-item .grow { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-box { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.data th { text-align: left; color: var(--muted); font-weight: 500; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.data td { padding: 10px 8px; border-bottom: 1px solid #232A34; vertical-align: middle; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--raised); }
.num-r { text-align: right; font-family: var(--mono); }
.bars { height: 200px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--line); }
.bars .col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.bars .paid { background: var(--accent); border-radius: 3px 3px 0 0; }
.bars .free { background: #5B6573; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: block; }
.legend .paid-key { background: var(--accent); }
.legend .free-key { background: #5B6573; }
.legal { max-width: 760px; padding-top: 32px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 16px; }
.legal h2 { font-size: 20px; margin-top: 16px; }
.legal p, .legal li { color: var(--text-2); }
pre { white-space: pre-wrap; word-break: break-all; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 50; max-width: calc(100vw - 32px); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(560px, 100vw); background: var(--surface); border-left: 1px solid var(--line); padding: 28px; overflow-y: auto; z-index: 40; display: flex; flex-direction: column; gap: 18px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30; }

/* auth */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth .card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; padding: 32px; }

@media (max-width: 720px) {
  .main { padding: 20px 16px; }
  .sidebar { max-width: none; flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); gap: 16px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar .foot { display: none; }
  .cta-band { padding: 40px 24px; }
  .section { padding: 64px 0; }
}

/* range sliders (voice lab) */
input[type=range] { width: 100%; accent-color: var(--accent); }

/* homepage demo */
#try audio { width: 100%; }
#try .notice a { color: var(--accent); font-weight: 600; }
