/* ──────────────────────────────────────────────────────────────────────────
   Letterjudge — Spec Design Theme
   DM Mono + DM Sans · White · Orange accent · 1px rules · Zero radius
   ────────────────────────────────────────────────────────────────────────── */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── TOKENS ── */
:root {
  --bg:           #ffffff;
  --bg2:          #f8f8f6;
  --bg3:          #f0f0ec;
  --bg4:          #e8e8e4;
  --text:         #141414;
  --muted:        #6a6a66;
  --dim:          #a0a09c;
  --border:       #e4e4e0;
  --border2:      #c8c8c0;
  --primary:      #C85A00;
  --primary-light:#e07020;
  --orange:       #C85A00;
  --orange-light: #FEF3E8;
  --green:        #1A6B1A;
  --red:          #CC1A1A;
  --amber:        #9A6000;
  /* compat aliases used in inline styles */
  --indigo:       #C85A00;
  --violet:       #C85A00;
  --cyan:         #C85A00;
  --r:            0px;
  --radius:       0px;
  --font:         'DM Sans', system-ui, sans-serif;
  --mono:         'DM Mono', ui-monospace, monospace;
  --max:          1200px;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
ul { list-style: none; }

/* ── SYNTAX ── */
.sk { color: var(--orange); }
.ss { color: var(--green); }
.sc { color: var(--dim); font-style: italic; }
.sf { color: var(--text); font-weight: 500; }
.sn { color: var(--amber); }
.sp { color: var(--orange); }
.sb { color: var(--text); }

/* ── TAGS ── */
.tag {
  display: inline-flex; align-items: center;
  padding: .18rem .5rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .04em;
}
.tag-green  { background: #e0f0e0; color: var(--green); }
.tag-red    { background: #fce8e8; color: var(--red); }
.tag-amber  { background: #fdf0d4; color: var(--amber); }
.tag-muted  { background: var(--bg2); color: var(--dim); border: 1px solid var(--border); }
.tag-violet { background: var(--orange-light); color: var(--orange); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  padding: .65rem 1.25rem;
  background: var(--bg); border: 1px solid var(--green);
  color: var(--green); font-size: .8rem; font-family: var(--mono);
  opacity: 0; transform: translateY(8px); transition: all .25s;
  pointer-events: none; z-index: 300;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── LOGO MARK ── */
.nav-logo-mark {
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .05em;
}


/* ═══════════════════════════════════════════════════════
   HOME
   ═══════════════════════════════════════════════════════ */
body.page-home { overflow-x: hidden; }
body.page-home .container { max-width: var(--max); margin: 0 auto; padding: 0 2.5rem; }
body.page-home .mono { font-family: var(--mono); }
body.page-home .divider { height: 1px; background: var(--border); }

/* NAV */
body.page-home nav {
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--bg); z-index: 100;
}
body.page-home .nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 2.5rem;
  height: 52px; display: flex; align-items: center;
}
body.page-home .nav-product {
  display: flex; align-items: center; gap: .7rem; flex-shrink: 0;
  border-right: 1px solid var(--border); padding-right: 1.5rem;
}
body.page-home .nav-logo {
  text-decoration: none; display: flex; align-items: center; gap: .6rem;
}
body.page-home .nav-name { font-family: var(--mono); font-size: .88rem; font-weight: 500; color: var(--text); text-decoration: none; }
body.page-home .nav-designation { font-family: var(--mono); font-size: .62rem; color: var(--dim); letter-spacing: .04em; }
body.page-home .nav-version {
  font-family: var(--mono); font-size: .62rem; color: var(--dim);
  border: 1px solid var(--border); padding: .1rem .4rem;
}
body.page-home .nav-links { display: flex; flex: 1; }
body.page-home .nav-links a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--muted); text-decoration: none;
  padding: 0 1rem; height: 52px; display: flex; align-items: center;
  border-right: 1px solid var(--border);
}
body.page-home .nav-links a:first-child { border-left: 1px solid var(--border); }
body.page-home .nav-links a:hover { color: var(--text); background: var(--bg2); }
body.page-home .nav-right { display: flex; align-items: center; margin-left: auto; }
body.page-home .nav-signin {
  font-family: var(--mono); font-size: .72rem; color: var(--muted); text-decoration: none;
  padding: 0 1.25rem; height: 52px; display: flex; align-items: center;
  border-left: 1px solid var(--border);
}
body.page-home .nav-signin:hover { color: var(--text); }
body.page-home .nav-deploy, body.page-home .nav-cta {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .03em;
  background: var(--text); color: #fff; text-decoration: none;
  padding: 0 1.25rem; height: 52px; display: flex; align-items: center; gap: .4rem;
  border-left: 1px solid var(--border);
}
body.page-home .nav-deploy:hover, body.page-home .nav-cta:hover { background: var(--orange); }
body.page-home .nav-deploy svg { display: none; }

/* SPEC METADATA BAR */
body.page-home .spec-header { border-bottom: 1px solid var(--border); background: var(--bg); }
body.page-home .spec-header-inner { max-width: var(--max); margin: 0 auto; padding: 0 2.5rem; }
body.page-home .spec-meta-bar { display: flex; }
body.page-home .spec-meta-cell {
  padding: .6rem 1.25rem; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .15rem; min-width: 160px;
}
body.page-home .spec-meta-cell:first-child { padding-left: 0; }
body.page-home .spec-label {
  font-family: var(--mono); font-size: .6rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
body.page-home .spec-value { font-family: var(--mono); font-size: .8rem; color: var(--text); }

/* HERO */
body.page-home .hero { padding: 0; }
body.page-home .hero-grid-bg, body.page-home .hero-glow { display: none; }
body.page-home .hero-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  max-width: var(--max); margin: 0 auto; padding: 0 2.5rem;
}
body.page-home .metric {
  padding: 2rem 1.5rem; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .4rem;
}
body.page-home .metric:first-child { padding-left: 0; }
body.page-home .metric:last-child { border-right: none; padding-right: 0; }
body.page-home .metric-val {
  font-family: var(--mono); font-size: 2.5rem; font-weight: 500;
  line-height: 1; letter-spacing: -.02em; color: var(--text);
}
body.page-home .metric-val.accent { color: var(--orange); }
body.page-home .metric-label { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
body.page-home .metric-desc { font-size: .78rem; color: var(--muted); font-weight: 300; margin-top: .1rem; }
body.page-home .hero-stats { display: none; }

body.page-home .hero-layout, body.page-home .hero-body {
  max-width: var(--max); margin: 0 auto; padding: 0 2.5rem;
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
body.page-home .hero-left { padding: 3rem 0; border-right: 1px solid var(--border); padding-right: 2.5rem; }
body.page-home .hero-right { padding: 0; display: flex; flex-direction: column; }
body.page-home .hero-eyebrow {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: .5rem;
}
body.page-home .hero-eyebrow-dot { display: none; }
body.page-home h1 {
  font-size: 2.75rem; font-weight: 700; letter-spacing: -.04em;
  line-height: 1.1; margin-bottom: 1.1rem;
}
body.page-home h1 em {
  font-style: normal; color: var(--orange);
  background: none; -webkit-background-clip: unset; -webkit-text-fill-color: unset; background-clip: unset;
}
body.page-home .hero-sub {
  font-size: .92rem; font-weight: 300; color: var(--muted);
  line-height: 1.7; margin-bottom: 2rem; max-width: 460px;
}
body.page-home .hero-actions { display: inline-flex; margin-bottom: 0; border: 1px solid var(--border2); }
body.page-home .btn-primary {
  font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .04em;
  background: var(--orange); color: #fff; text-decoration: none;
  padding: .65rem 1.5rem; display: inline-flex; align-items: center;
}
body.page-home .btn-primary:hover { background: #a04800; }
body.page-home .btn-primary svg { display: none; }
body.page-home .btn-outline {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .04em;
  background: transparent; color: var(--text); text-decoration: none;
  padding: .65rem 1.5rem; display: inline-flex; align-items: center; gap: .45rem;
  border-left: 1px solid var(--border2);
}
body.page-home .btn-outline:hover { background: var(--bg2); }
body.page-home .btn-outline svg { color: var(--muted); }
body.page-home .hero-spec-list {
  margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr;
}
body.page-home .hero-spec-item { padding: .55rem 0; border-bottom: 1px solid var(--border); }
body.page-home .hero-spec-item:nth-last-child(-n+2) { border-bottom: none; }
body.page-home .hero-spec-k { font-family: var(--mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: .15rem; }
body.page-home .hero-spec-v { font-family: var(--mono); font-size: .78rem; color: var(--text); }

/* Code panel (hero right) */
body.page-home .hero-code-panel { display: flex; flex-direction: column; flex: 1; }
body.page-home .code-panel-label {
  padding: .7rem 1.5rem; border-bottom: 1px solid var(--border);
  background: var(--bg2); font-family: var(--mono); font-size: .62rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
body.page-home .code-panel-body {
  flex: 1; padding: 1.75rem 1.5rem;
  font-family: var(--mono); font-size: .77rem; line-height: 1.75;
  white-space: pre; overflow-x: auto;
}
body.page-home .c-k { color: var(--orange); }
body.page-home .c-s { color: var(--green); }
body.page-home .c-n { color: var(--amber); }
body.page-home .c-bool { color: var(--text); font-weight: 500; }
body.page-home .c-d { color: var(--dim); }

/* Terminal (existing HTML compat) */
body.page-home .terminal {
  background: var(--bg); border: none; border-radius: 0; box-shadow: none;
  font-family: var(--mono); font-size: .77rem; line-height: 1.75;
  display: flex; flex-direction: column; flex: 1; overflow: hidden;
}
body.page-home .term-bar {
  display: flex; align-items: center; padding: .7rem 1.5rem; gap: .5rem;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
body.page-home .term-dots { display: none; }
body.page-home .term-title { font-family: var(--mono); font-size: .62rem; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
body.page-home .term-body { flex: 1; padding: 1.75rem 1.5rem; }
body.page-home .term-prompt { color: var(--dim); }
body.page-home .term-flag { color: var(--orange); }
body.page-home .term-url { color: var(--text); }
body.page-home .term-out { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
body.page-home .term-line { display: block; }
body.page-home .tl-fade { opacity: 1; animation: none; }

/* Trust bar hidden */
body.page-home .trust-bar { display: none; }

/* SECTION BASE */
body.page-home section { padding: 64px 0; }
body.page-home #api      { background: var(--bg); }
body.page-home #pipeline { background: var(--bg2); }
body.page-home #features { background: var(--bg); }
body.page-home #score    { background: var(--bg2); }
body.page-home #pricing  { background: var(--bg); }
body.page-home #quickstart { background: var(--bg2); }

body.page-home .section-kicker {
  font-family: var(--mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
body.page-home .section-header-bar {
  display: flex; align-items: center; gap: 1.5rem;
  border-bottom: 1px solid var(--border); padding: 1.25rem 0; margin-bottom: 2rem;
}
body.page-home .section-id {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); min-width: 80px; flex-shrink: 0;
}
body.page-home .section-title { font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--text); }
body.page-home h2 { font-size: 2rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.2; margin-bottom: .75rem; }
body.page-home .section-lead { font-size: .88rem; font-weight: 300; color: var(--muted); max-width: 540px; line-height: 1.65; margin-bottom: 2.5rem; }
body.page-home h3 { font-size: .9rem; font-weight: 700; margin-bottom: .4rem; }

/* FEATURES */
body.page-home .features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border);
  background: var(--border); gap: 0; border-radius: 0; overflow: hidden;
}
body.page-home .feat {
  padding: 1.75rem 1.5rem; background: var(--bg);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transition: background .12s;
}
body.page-home .feat:nth-child(3n) { border-right: none; }
body.page-home .feat:nth-child(n+4) { border-bottom: none; }
body.page-home .feat:hover { background: var(--bg2); }
body.page-home .feat-icon { display: none; }
body.page-home .feat-head { margin-bottom: .6rem; }
body.page-home .feat-spec-cat {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--orange); margin-bottom: .65rem;
}
body.page-home .feat h3 { font-size: .88rem; font-weight: 700; margin-bottom: .45rem; }
body.page-home .feat p { font-size: .8rem; font-weight: 300; color: var(--muted); line-height: 1.65; }
body.page-home .feat-spec-detail {
  font-family: var(--mono); font-size: .66rem; color: var(--dim);
  margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--border);
}

/* PIPELINE */
body.page-home .pipeline-track {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: 0; overflow: hidden;
  margin-top: 0;
}
body.page-home .pipeline-node {
  border-right: 1px solid var(--border); padding: 0;
  flex: unset; position: static; transition: none;
}
body.page-home .pipeline-node:last-child { border-right: none; }
body.page-home .pipeline-node:hover { background: var(--bg); }
body.page-home .pipeline-node-num-bar {
  background: var(--bg2); padding: .6rem 1.25rem; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
body.page-home .pipeline-node-body { padding: 1.5rem 1.25rem; }
body.page-home .pipeline-node-num { display: none; }
body.page-home .pipeline-node h3 { font-family: var(--mono); font-size: .85rem; font-weight: 500; margin-bottom: .45rem; }
body.page-home .pipeline-node p { font-size: .8rem; font-weight: 300; color: var(--muted); line-height: 1.65; margin-bottom: .65rem; }
body.page-home .pipeline-node-code { font-family: var(--mono); font-size: .66rem; color: var(--dim); background: none; padding: 0; border-radius: 0; }
body.page-home .pipeline-arrow { display: none; }

/* API SECTION */
body.page-home .api-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border); margin-top: 0; align-items: start; gap: 0;
}
body.page-home .api-layout > div:first-child { border-right: 1px solid var(--border); }
body.page-home .api-panel-label {
  padding: .7rem 1.5rem; border-bottom: 1px solid var(--border);
  background: var(--bg2); font-family: var(--mono); font-size: .62rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
body.page-home .api-panel-body { padding: 1.5rem; }
body.page-home .endpoint-pill, body.page-home .endpoint-spec {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem;
  padding: .7rem 1rem; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 0;
}
body.page-home .method, body.page-home .method-spec { font-family: var(--mono); font-size: .78rem; font-weight: 500; color: var(--orange); }
body.page-home .path, body.page-home .path-spec { font-family: var(--mono); font-size: .78rem; color: var(--text); }
body.page-home .params-table, body.page-home .params-spec { width: 100%; border-collapse: collapse; }
body.page-home .params-table { margin-bottom: 1.5rem; }
body.page-home .params-table th, body.page-home .params-spec th {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim); text-align: left;
  padding: .5rem .5rem; border-bottom: 1px solid var(--border); font-weight: 400;
}
body.page-home .params-table td, body.page-home .params-spec td {
  padding: .6rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top;
}
body.page-home .params-table tr:last-child td, body.page-home .params-spec tr:last-child td { border-bottom: none; }
body.page-home .param-name { font-family: var(--mono); font-size: .76rem; color: var(--text); }
body.page-home .param-type { font-family: var(--mono); font-size: .7rem; color: var(--muted); }
body.page-home .param-req  { font-family: var(--mono); font-size: .62rem; color: var(--orange); letter-spacing: .04em; }
body.page-home .param-opt  { font-family: var(--mono); font-size: .62rem; color: var(--dim); letter-spacing: .04em; }
body.page-home .param-desc { font-size: .78rem; font-weight: 300; color: var(--muted); line-height: 1.55; }
body.page-home code.mono,
body.page-home .mono-inline { font-family: var(--mono); font-size: .85em; color: var(--orange); background: none; border: none; border-radius: 0; padding: 0; }

/* Code window (tabbed, kept functional) */
body.page-home .code-window {
  background: var(--bg); border: none; border-top: 1px solid var(--border); overflow: hidden;
}
body.page-home .code-window-bar { display: flex; align-items: center; border-bottom: 1px solid var(--border); background: var(--bg2); }
body.page-home .code-tab {
  padding: .5rem 1rem; background: transparent; border: none;
  border-right: 1px solid var(--border); color: var(--dim);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .04em;
  cursor: pointer; transition: color .1s, background .1s;
}
body.page-home .code-tab:hover { color: var(--muted); background: var(--bg); }
body.page-home .code-tab.active { color: var(--text); background: var(--bg); }
body.page-home .code-tab-spacer { flex: 1; }
body.page-home .copy-btn {
  margin-right: .6rem; padding: .25rem .65rem;
  background: transparent; border: 1px solid var(--border);
  color: var(--dim); font-family: var(--mono); font-size: .65rem; cursor: pointer;
}
body.page-home .copy-btn:hover { color: var(--text); border-color: var(--border2); }
body.page-home .code-body { padding: 1.1rem 1.5rem; font-family: var(--mono); font-size: .78rem; line-height: 1.75; overflow-x: auto; }
body.page-home .code-panel { display: none; white-space: pre; }
body.page-home .code-panel.active { display: block; }
body.page-home .code-pre-spec { padding: 1.25rem 1.5rem; font-family: var(--mono); font-size: .75rem; line-height: 1.7; white-space: pre; overflow-x: auto; border-top: 1px solid var(--border); }

/* Schema */
body.page-home .schema-list { list-style: none; }
body.page-home .schema-item, body.page-home .schema-spec-row {
  display: grid; grid-template-columns: 140px 80px 1fr; align-items: baseline;
  padding: .55rem 1.5rem; border-bottom: 1px solid var(--border);
}
body.page-home .schema-item:last-child, body.page-home .schema-spec-row:last-child { border-bottom: none; }
body.page-home .schema-field, body.page-home .sf { font-family: var(--mono); font-size: .73rem; color: var(--text); white-space: nowrap; }
body.page-home .schema-type, body.page-home .st { font-family: var(--mono); font-size: .68rem; color: var(--orange); white-space: nowrap; }
body.page-home .schema-desc, body.page-home .sd { font-size: .76rem; font-weight: 300; color: var(--muted); line-height: 1.5; }

/* Error responses */
body.page-home .errors-spec { border-top: 1px solid var(--border); }
body.page-home .errors-spec-label {
  padding: .7rem 1.5rem; background: var(--bg2); border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
body.page-home .error-row-spec {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem 1.5rem; border-bottom: 1px solid var(--border); font-size: .78rem;
}
body.page-home .error-row-spec:last-child { border-bottom: none; }
body.page-home .err-code-spec { font-family: var(--mono); font-size: .72rem; font-weight: 500; min-width: 36px; }
body.page-home .e-401 { color: var(--red); }
body.page-home .e-429 { color: var(--amber); }
body.page-home .e-422 { color: var(--dim); }

/* SCORING */
body.page-home .score-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border); gap: 0; margin-top: 0;
}
body.page-home .score-table-wrap { border-right: 1px solid var(--border); border-radius: 0; overflow: visible; }
body.page-home .score-row {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.5rem; border-bottom: 1px solid var(--border); font-size: .82rem;
  transition: background .1s;
}
body.page-home .score-row:first-child { background: var(--bg2); }
body.page-home .score-row:last-child { border-bottom: none; }
body.page-home .score-row:hover { background: var(--bg2); }
body.page-home .score-label { flex: 1; font-weight: 400; }
body.page-home .score-label small { display: block; font-family: var(--mono); font-size: .66rem; color: var(--dim); font-weight: 400; margin-top: .1rem; }
body.page-home .score-bar-track { width: 80px; height: 2px; background: var(--border); }
body.page-home .score-bar-fill { height: 100%; }
body.page-home .score-val { font-family: var(--mono); font-size: .78rem; font-weight: 500; min-width: 44px; text-align: right; }
body.page-home .pos { color: var(--green); }
body.page-home .neg { color: var(--red); }
body.page-home .neu { color: var(--amber); }
body.page-home .score-explainer { padding: 1.5rem; background: var(--bg); border: none; border-radius: 0; }
body.page-home .score-explainer h3 {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; font-weight: 400;
}
body.page-home .score-threshold-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 0; border-bottom: 1px solid var(--border);
}
body.page-home .score-threshold-row:last-child { border-bottom: none; }
body.page-home .threshold-val { font-family: var(--mono); font-size: 1.05rem; font-weight: 500; color: var(--text); }
body.page-home .threshold-desc { font-size: .78rem; font-weight: 300; color: var(--muted); margin-left: .5rem; }
body.page-home [style*="border-radius:var(--r)"] { border-radius: 0 !important; }

/* PRICING */
body.page-home .pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--border); margin-top: 0;
}
body.page-home .plan {
  background: var(--bg); border-right: 1px solid var(--border); border-radius: 0;
  padding: 1.75rem 1.5rem; display: flex; flex-direction: column; gap: .75rem;
  transition: background .12s;
}
body.page-home .plan:last-child { border-right: none; }
body.page-home .plan:hover { background: var(--bg2); transform: none; border-color: var(--border); }
body.page-home .plan.featured { background: var(--orange-light); border-color: var(--border); }
body.page-home .plan-name {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
body.page-home .plan-price { display: flex; align-items: baseline; gap: .2rem; }
body.page-home .plan-price-num { font-family: var(--mono); font-size: 2rem; font-weight: 500; letter-spacing: -.02em; color: var(--text); }
body.page-home .plan-price-period { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
body.page-home .plan-limit { font-family: var(--mono); font-size: .8rem; color: var(--muted); padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
body.page-home .plan-limit strong { color: var(--text); font-weight: 500; }
body.page-home .plan-features { list-style: none; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
body.page-home .plan-features li { display: flex; align-items: baseline; gap: .5rem; font-size: .78rem; color: var(--muted); font-weight: 300; }
body.page-home .plan-features li::before { content: '✓'; color: var(--green); font-family: var(--mono); font-size: .7rem; flex-shrink: 0; }
body.page-home .plan-features li.off { color: var(--dim); }
body.page-home .plan-features li.off::before { content: '—'; color: var(--dim); }
body.page-home .plan-cta {
  display: block; text-align: center; margin-top: .5rem;
  padding: .5rem; font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .04em; text-decoration: none; border: 1px solid var(--border2); color: var(--text);
}
body.page-home .plan-cta:hover { background: var(--bg3); }
body.page-home .plan-cta-outline { background: transparent; }
body.page-home .plan-cta-solid { background: var(--orange); border-color: var(--orange); color: #fff; }
body.page-home .plan-cta-solid:hover { background: #a04800; }

/* QUICKSTART */
body.page-home .qs-layout {
  display: grid; grid-template-columns: 1fr 1.4fr;
  border: 1px solid var(--border); gap: 0; margin-top: 0; align-items: start;
}
body.page-home .qs-steps { border-right: 1px solid var(--border); display: flex; flex-direction: column; }
body.page-home .qs-step {
  display: grid; grid-template-columns: 40px 1fr; gap: 1.25rem; align-items: start;
  padding: 1.75rem 2rem; border-bottom: 1px solid var(--border); position: relative;
}
body.page-home .qs-step::before { display: none; }
body.page-home .qs-step:last-child { border-bottom: 1px solid var(--border); }
body.page-home .qs-num {
  width: 32px; height: 32px; border: 1px solid var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .72rem; font-weight: 500; color: var(--orange);
  border-radius: 0; background: none; box-shadow: none; flex-shrink: 0;
  position: relative; z-index: 1;
}
body.page-home .qs-step-content { padding-top: 0; }
body.page-home .qs-step-content h3 { font-family: var(--mono); font-size: .85rem; font-weight: 500; margin-bottom: .45rem; }
body.page-home .qs-step-content p { font-size: .82rem; font-weight: 300; color: var(--muted); line-height: 1.65; margin-bottom: .65rem; }
body.page-home .term-small {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 0; overflow: hidden; margin-top: .5rem;
}
body.page-home .term-small-bar {
  padding: .4rem .75rem; background: var(--bg3); border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: .6rem; color: var(--dim); letter-spacing: .08em; text-transform: uppercase;
}
body.page-home .term-small-body { padding: .65rem .9rem; font-family: var(--mono); font-size: .75rem; line-height: 1.7; }
body.page-home .qs-note {
  padding: 1.25rem 2rem; font-size: .8rem; font-weight: 300; color: var(--muted);
  line-height: 1.65; border-top: 1px solid var(--border); background: var(--bg2) !important;
  border-radius: 0 !important; border-left: none !important; border-right: none !important; border-bottom: none !important;
}
body.page-home .qs-note strong { color: var(--text); font-weight: 500; }
body.page-home .qs-full-terminal { display: flex; flex-direction: column; position: sticky; top: 60px; }
body.page-home .qs-full-terminal .term-bar { padding: .7rem 1.5rem; }
body.page-home .qs-full-terminal .term-body {
  padding: 1.75rem 1.5rem; font-family: var(--mono); font-size: .77rem; line-height: 1.7;
}
body.page-home .term-section { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
body.page-home .term-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
body.page-home .term-label {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); margin-bottom: .4rem; display: block;
}

/* FOOTER */
body.page-home footer { border-top: 1px solid var(--border); }
body.page-home .footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 2.5rem;
  display: flex; align-items: center; border-bottom: 1px solid var(--border);
}
body.page-home .footer-logo {
  text-decoration: none; display: flex; align-items: center; gap: .6rem;
  padding: 1.25rem 0; border-right: 1px solid var(--border); padding-right: 1.5rem; margin-right: 1.5rem;
  font-weight: 500; font-family: var(--mono); font-size: .82rem; color: var(--text);
}
body.page-home .footer-logo-mark {
  width: 26px; height: 26px; background: var(--orange) !important; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .6rem; font-weight: 500; border-radius: 0;
}
body.page-home .footer-links { display: flex; list-style: none; }
body.page-home .footer-links li a, body.page-home .footer-links a {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .04em;
  color: var(--dim); text-decoration: none; padding: 1.25rem 1.1rem;
  border-right: 1px solid var(--border); display: flex; align-items: center;
}
body.page-home .footer-links li a:hover, body.page-home .footer-links a:hover { color: var(--text); background: var(--bg2); }
body.page-home footer p { font-family: var(--mono); font-size: .68rem; color: var(--dim); padding: 1.25rem 0; margin-left: auto; }
body.page-home .footer-bottom {
  max-width: var(--max); margin: 0 auto; padding: 1rem 2.5rem;
  font-family: var(--mono); font-size: .63rem; color: var(--dim); display: flex; gap: 2rem;
}

/* HOME RESPONSIVE */
@media (max-width: 960px) {
  body.page-home .hero-layout, body.page-home .hero-body { grid-template-columns: 1fr; }
  body.page-home .hero-left { border-right: none; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 2.5rem; }
  body.page-home .hero-right { border-top: none; }
  body.page-home .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  body.page-home .metric:nth-child(2) { border-right: none; }
  body.page-home .api-layout { grid-template-columns: 1fr; }
  body.page-home .api-layout > div:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  body.page-home .score-layout { grid-template-columns: 1fr; }
  body.page-home .score-table-wrap { border-right: none; border-bottom: 1px solid var(--border); }
  body.page-home .pricing-grid { grid-template-columns: 1fr 1fr; }
  body.page-home .qs-layout { grid-template-columns: 1fr; }
  body.page-home .qs-full-terminal { display: none; }
  body.page-home .features-grid { grid-template-columns: 1fr 1fr; }
  body.page-home .pipeline-track { grid-template-columns: 1fr 1fr; }
  body.page-home .pipeline-node:nth-child(2) { border-right: none; }
  body.page-home .pipeline-node:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  body.page-home .container { padding: 0 1.25rem; }
  body.page-home .nav-inner { padding: 0 1.25rem; }
  body.page-home .nav-links { display: none; }
  body.page-home .hero-layout, body.page-home .hero-body { padding: 0 1.25rem; }
  body.page-home .hero-metrics { grid-template-columns: repeat(2, 1fr); padding: 0 1.25rem; }
  body.page-home .pricing-grid { grid-template-columns: 1fr; }
  body.page-home .features-grid { grid-template-columns: 1fr; }
  body.page-home .pipeline-track { grid-template-columns: 1fr; }
  body.page-home .pipeline-node { border-right: none; border-bottom: 1px solid var(--border); }
  body.page-home section { padding: 48px 0; }
  body.page-home .qs-step { padding: 1.25rem; }
  body.page-home .footer-inner { padding: 0 1.25rem; }
}


/* ═══════════════════════════════════════════════════════
   DASHBOARD  (login + dashboard screens)
   ═══════════════════════════════════════════════════════ */
body.page-dashboard { min-height: 100vh; }

/* Onboarding modal */
body.page-dashboard #onboarding-modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(20,20,20,.35); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
body.page-dashboard #onboarding-modal.open { display: flex; }
body.page-dashboard .ob-card {
  background: var(--bg); border: 1px solid var(--border2);
  padding: 2rem 2.25rem; width: 100%; max-width: 520px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
body.page-dashboard .ob-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.75rem; }
body.page-dashboard .ob-title { font-family: var(--mono); font-weight: 500; font-size: .88rem; }
body.page-dashboard .ob-dots { display: flex; gap: .4rem; }
body.page-dashboard .ob-dot {
  width: 8px; height: 8px;
  background: var(--bg3); border: 1px solid var(--border2); transition: background .2s;
}
body.page-dashboard .ob-dot.active { background: var(--orange); border-color: var(--orange); }
body.page-dashboard .ob-step { display: none; }
body.page-dashboard .ob-step.active { display: block; }
body.page-dashboard .ob-step-title { font-family: var(--mono); font-size: .95rem; font-weight: 500; margin-bottom: .4rem; }
body.page-dashboard .ob-step-desc { font-size: .85rem; color: var(--muted); line-height: 1.65; margin-bottom: .9rem; font-weight: 300; }
body.page-dashboard .ob-warning {
  background: var(--orange-light); border: 1px solid #f0c898;
  padding: .7rem 1rem; font-size: .8rem; color: var(--amber); line-height: 1.6; margin-bottom: .9rem;
}
body.page-dashboard .ob-key-box {
  background: var(--bg2); border: 1px solid var(--border2);
  padding: .85rem 1rem; font-family: var(--mono); font-size: .82rem;
  color: var(--orange); word-break: break-all; margin-bottom: .9rem; line-height: 1.6;
}
body.page-dashboard .ob-curl {
  background: var(--bg2); border: 1px solid var(--border);
  padding: .85rem 1rem; font-family: var(--mono); font-size: .78rem;
  color: var(--text); margin-bottom: .9rem; line-height: 1.75; white-space: pre-wrap;
}
body.page-dashboard .ob-gate-example {
  background: var(--bg2); border: 1px solid var(--border);
  padding: .85rem 1rem; font-family: var(--mono); font-size: .82rem;
  line-height: 1.75; margin-bottom: .75rem;
}
body.page-dashboard .ob-gate-kw  { color: var(--orange); }
body.page-dashboard .ob-gate-str { color: var(--green); }
body.page-dashboard .ob-gate-num { color: var(--amber); }
body.page-dashboard .ob-gate-fn  { color: var(--text); font-weight: 500; }
body.page-dashboard .ob-step-note { font-size: .79rem; color: var(--dim); line-height: 1.65; margin-bottom: .25rem; }
body.page-dashboard .ob-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; gap: .75rem; }
body.page-dashboard .ob-nav-right { display: flex; gap: .75rem; }
body.page-dashboard .ob-skip { font-size: .82rem; color: var(--muted); cursor: pointer; background: none; border: none; font-family: var(--font); }
body.page-dashboard .ob-skip:hover { color: var(--text); }
body.page-dashboard .ob-btn {
  padding: .5rem 1.25rem; font-size: .82rem; font-weight: 500;
  cursor: pointer; font-family: var(--mono); transition: background .1s;
  border: 1px solid var(--border2);
}
body.page-dashboard .ob-btn-outline { background: transparent; color: var(--text); }
body.page-dashboard .ob-btn-outline:hover { background: var(--bg2); }
body.page-dashboard .ob-btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
body.page-dashboard .ob-btn-primary:hover { background: #a04800; }

/* Auth screen */
body.page-dashboard #auth-screen { display: flex; align-items: stretch; min-height: 100vh; }
body.page-dashboard .auth-brand {
  flex: 0 0 420px; background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; padding: 3rem;
  position: relative; overflow: hidden;
}
body.page-dashboard .auth-brand::before, body.page-dashboard .auth-brand::after { display: none; }
body.page-dashboard .auth-brand-inner { position: relative; z-index: 1; }
body.page-dashboard .auth-brand .auth-logo { margin-bottom: 1.5rem; }
body.page-dashboard .auth-brand-tagline {
  font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em;
  line-height: 1.2; color: var(--text); margin-bottom: 2rem; max-width: 220px;
}
body.page-dashboard .auth-brand-features { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
body.page-dashboard .auth-brand-features li {
  display: flex; align-items: center; gap: .65rem; font-size: .875rem; color: var(--muted); font-weight: 300;
}
body.page-dashboard .auth-brand-features li::before { content: '✓'; color: var(--orange); font-weight: 700; flex-shrink: 0; font-family: var(--mono); }
body.page-dashboard .auth-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg); }
body.page-dashboard .auth-card {
  background: var(--bg); border: 1px solid var(--border);
  padding: 2.5rem; width: 100%; max-width: 400px;
}
body.page-dashboard .auth-logo {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-weight: 500; font-size: 1rem; margin-bottom: 2rem; color: var(--text);
}
body.page-dashboard .auth-logo--mobile { display: none; }
body.page-dashboard .auth-logo-mark {
  width: 26px; height: 26px; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .62rem; font-weight: 500; border-radius: 0;
}
body.page-dashboard .auth-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border: 1px solid var(--border); }
body.page-dashboard .auth-tab {
  flex: 1; padding: .5rem; background: var(--bg2); border: none; border-right: 1px solid var(--border);
  color: var(--muted); font-family: var(--mono); font-size: .78rem; font-weight: 500; letter-spacing: .04em;
  cursor: pointer; transition: color .15s, background .15s;
}
body.page-dashboard .auth-tab:last-child { border-right: none; }
body.page-dashboard .auth-tab.active { background: var(--orange); color: #fff; }
body.page-dashboard .auth-form { display: flex; flex-direction: column; gap: 1rem; }
body.page-dashboard label { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: .25rem; display: block; }
body.page-dashboard input[type=email],
body.page-dashboard input[type=password] {
  width: 100%; padding: .65rem .9rem; background: var(--bg);
  border: 1px solid var(--border2); color: var(--text);
  font-size: .88rem; font-family: var(--font); transition: border-color .15s; border-radius: 0;
}
body.page-dashboard input:focus { outline: none; border-color: var(--orange); }
body.page-dashboard .btn-full {
  width: 100%; padding: .7rem; background: var(--orange); color: #fff;
  border: none; font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .04em;
  cursor: pointer; transition: background .15s;
}
body.page-dashboard .btn-full:hover { background: #a04800; }
body.page-dashboard .auth-error { font-family: var(--mono); font-size: .78rem; color: var(--red); text-align: center; display: none; }

/* Dashboard screen */
body.page-dashboard #dashboard-screen { display: none; }
body.page-dashboard nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 52px; background: var(--bg);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
body.page-dashboard .nav-logo { display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-weight: 500; font-size: .88rem; color: var(--text); }
body.page-dashboard .nav-right { display: flex; align-items: center; gap: 1rem; }
body.page-dashboard #nav-email { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
body.page-dashboard .btn-sm {
  padding: .32rem .9rem; background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--mono); font-size: .72rem; font-weight: 500;
  cursor: pointer; transition: color .1s, border-color .1s;
}
body.page-dashboard .btn-sm:hover { color: var(--text); border-color: var(--border2); }
body.page-dashboard main { max-width: 900px; margin: 0 auto; padding: 2.5rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
body.page-dashboard .page-title { font-size: 1.4rem; font-weight: 700; letter-spacing: -.025em; }
body.page-dashboard .page-sub { font-size: .875rem; color: var(--muted); margin-top: .25rem; font-weight: 300; }
body.page-dashboard .card { background: var(--bg); border: 1px solid var(--border); padding: 1.75rem; }
body.page-dashboard .card-title {
  font-family: var(--mono); font-size: .65rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--orange); margin-bottom: 1.25rem;
}
body.page-dashboard .stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 1.1rem; background: var(--border); border: 1px solid var(--border); }
body.page-dashboard .stat-cell { background: var(--bg2); padding: 1rem 1.1rem; }
body.page-dashboard .stat-label {
  font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); margin-bottom: .4rem;
}
body.page-dashboard .stat-value { font-family: var(--mono); font-size: 1.55rem; font-weight: 500; letter-spacing: -.02em; color: var(--text); }
body.page-dashboard .stat-value.green { color: var(--green); }
body.page-dashboard .stat-value.amber { color: var(--amber); }
body.page-dashboard .stat-value.red   { color: var(--red); }
body.page-dashboard .stat-sub { font-family: var(--mono); font-size: .7rem; color: var(--muted); margin-top: .2rem; }
body.page-dashboard .plan-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .65rem; font-family: var(--mono);
  font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid var(--border);
}
body.page-dashboard .plan-free     { background: var(--bg2); color: var(--muted); }
body.page-dashboard .plan-starter  { background: var(--orange-light); color: var(--orange); border-color: #f0c898; }
body.page-dashboard .plan-pro      { background: #e0f0e0; color: var(--green); border-color: #b8d8b8; }
body.page-dashboard .plan-business { background: #e0f0e0; color: var(--green); border-color: #b8d8b8; }
body.page-dashboard .status-badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem;
  font-family: var(--mono); font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--border);
}
body.page-dashboard .status-active   { background: #e0f0e0; color: var(--green); border-color: #b8d8b8; }
body.page-dashboard .status-past_due { background: #fdf0d4; color: var(--amber); border-color: #e8d090; }
body.page-dashboard .status-canceled { background: var(--bg2); color: var(--muted); }
body.page-dashboard .usage-overview { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1rem; }
body.page-dashboard .gauge-col { flex-shrink: 0; }
body.page-dashboard .gauge-col svg { width: 110px; height: 110px; display: block; }
body.page-dashboard .stats-col { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
body.page-dashboard .stats-col .stat-cell { background: var(--bg2); padding: .85rem 1rem; }
body.page-dashboard .usage-bar-wrap { height: 4px; background: var(--bg3); border: 1px solid var(--border); overflow: hidden; }
body.page-dashboard .usage-bar-fill { height: 100%; transition: width .6s; }
body.page-dashboard .usage-bar-fill.bar-ok   { background: var(--orange); }
body.page-dashboard .usage-bar-fill.bar-warn { background: var(--amber); }
body.page-dashboard .usage-bar-fill.bar-crit { background: var(--red); }
body.page-dashboard .usage-reset { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: .5rem; }
body.page-dashboard .chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
body.page-dashboard .chart-period { font-family: var(--mono); font-size: .72rem; color: var(--dim); }
body.page-dashboard #usage-chart { width: 100%; height: 110px; display: block; }
body.page-dashboard #chart-empty { display: none; text-align: center; color: var(--dim); font-family: var(--mono); font-size: .8rem; padding: 2.5rem 0; }
body.page-dashboard .billing-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem 0; border-bottom: 1px solid var(--border); font-size: .875rem;
}
body.page-dashboard .billing-row:last-of-type { border-bottom: none; }
body.page-dashboard .billing-label { font-family: var(--mono); font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
body.page-dashboard .billing-value { font-family: var(--mono); font-size: .82rem; font-weight: 500; }
body.page-dashboard .key-row { display: flex; align-items: center; gap: .75rem; }
body.page-dashboard .key-display {
  flex: 1; padding: .65rem 1rem; background: var(--bg2); border: 1px solid var(--border);
  font-family: var(--mono); font-size: .85rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.page-dashboard .key-display.revealed { color: var(--orange); }
body.page-dashboard .btn-icon {
  padding: .6rem .9rem; background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--mono); font-size: .72rem; font-weight: 500;
  cursor: pointer; transition: color .1s, border-color .1s; white-space: nowrap;
}
body.page-dashboard .btn-icon:hover { color: var(--text); border-color: var(--border2); }
body.page-dashboard .key-warning { font-family: var(--mono); font-size: .72rem; color: var(--amber); margin-top: .6rem; display: none; }
body.page-dashboard .key-rotate-section {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border);
}
body.page-dashboard .key-rotate-desc { font-size: .8rem; color: var(--dim); line-height: 1.5; font-weight: 300; }
body.page-dashboard .btn-rotate {
  flex-shrink: 0; padding: .5rem 1rem;
  background: transparent; border: 1px solid var(--amber);
  color: var(--amber); font-family: var(--mono); font-size: .72rem; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: background .1s;
}
body.page-dashboard .btn-rotate:hover { background: var(--orange-light); }
body.page-dashboard .billing-cancel-notice {
  display: flex; align-items: flex-start; gap: .6rem; margin-top: .85rem;
  padding: .7rem 1rem; background: var(--orange-light); border: 1px solid #f0c898;
  font-size: .82rem; color: var(--muted); line-height: 1.55;
}
body.page-dashboard .billing-cancel-notice svg { flex-shrink: 0; margin-top: .1rem; color: var(--amber); }
body.page-dashboard .billing-cancel-notice strong { color: var(--amber); }
body.page-dashboard .plan-actions { display: flex; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap; }
body.page-dashboard .btn-upgrade {
  padding: .5rem 1.25rem; background: var(--orange); color: #fff;
  border: none; font-family: var(--mono); font-size: .78rem; font-weight: 500; letter-spacing: .04em;
  cursor: pointer; transition: background .1s;
}
body.page-dashboard .btn-upgrade:hover { background: #a04800; }
body.page-dashboard .btn-portal {
  padding: .5rem 1.25rem; background: transparent; color: var(--text);
  border: 1px solid var(--border2); font-family: var(--mono); font-size: .78rem; font-weight: 500;
  cursor: pointer; transition: border-color .1s;
}
body.page-dashboard .btn-portal:hover { border-color: var(--border2); background: var(--bg2); }
body.page-dashboard .qs-code {
  background: var(--bg2); border: 1px solid var(--border);
  padding: 1rem 1.25rem; font-family: var(--mono); font-size: .8rem;
  color: var(--text); line-height: 1.75; position: relative; overflow-x: auto;
}
body.page-dashboard .copy-btn {
  position: absolute; top: .75rem; right: .75rem;
  padding: .25rem .65rem; background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--mono); font-size: .68rem; cursor: pointer;
}
body.page-dashboard .copy-btn:hover { color: var(--text); }

/* Password change inputs inside card */
body.page-dashboard input[type=password]#pw-current,
body.page-dashboard input[type=password]#pw-new,
body.page-dashboard input[type=password]#pw-confirm {
  width: 100%; padding: .6rem .9rem; background: var(--bg);
  border: 1px solid var(--border2); border-radius: 0;
  color: var(--text); font-size: .88rem; font-family: var(--font);
}

@media (max-width: 768px) {
  body.page-dashboard .auth-brand { display: none; }
  body.page-dashboard .auth-panel { padding: 1rem; }
  body.page-dashboard .auth-logo--mobile { display: flex; }
}
@media (min-width: 769px) {
  body.page-dashboard .auth-logo--mobile { display: none; }
}
@media (max-width: 600px) {
  body.page-dashboard nav { padding: 0 1rem; }
  body.page-dashboard main { padding: 1.5rem 1rem; }
  body.page-dashboard .usage-overview { flex-direction: column; }
  body.page-dashboard .gauge-col { width: 100%; display: flex; justify-content: center; }
  body.page-dashboard .card { padding: 1.25rem; }
}
@media (max-width: 480px) {
  body.page-dashboard .stats-col { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════
   DOCS
   ═══════════════════════════════════════════════════════ */
body.page-docs nav {
  position: sticky; top: 0; z-index: 100; height: 52px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1.5rem; gap: 1.5rem;
}
body.page-docs .nav-logo {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-weight: 500; font-size: .88rem; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
body.page-docs .nav-logo-mark {
  width: 24px; height: 24px; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .58rem; font-weight: 500; border-radius: 0;
}
body.page-docs .nav-badge {
  font-family: var(--mono); font-size: .6rem; color: var(--dim);
  border: 1px solid var(--border); padding: .1rem .35rem;
}
body.page-docs .nav-sep { width: 1px; height: 16px; background: var(--border); }
body.page-docs .nav-links { display: flex; gap: 0; }
body.page-docs .nav-links a {
  padding: 0 .9rem; height: 52px; display: flex; align-items: center;
  font-family: var(--mono); font-size: .72rem; color: var(--muted); text-decoration: none;
  border-right: 1px solid var(--border); transition: color .1s, background .1s;
}
body.page-docs .nav-links a:first-child { border-left: 1px solid var(--border); }
body.page-docs .nav-links a:hover { color: var(--text); background: var(--bg2); }
body.page-docs .nav-links a.active { color: var(--orange); background: var(--orange-light); }
body.page-docs .nav-right { margin-left: auto; display: flex; gap: 0; align-items: center; flex-shrink: 0; }
body.page-docs .nav-right a {
  font-family: var(--mono); font-size: .72rem; color: var(--muted); text-decoration: none;
  padding: 0 .9rem; height: 52px; display: flex; align-items: center;
  border-left: 1px solid var(--border); transition: color .1s;
}
body.page-docs .nav-right a:hover { color: var(--text); }
body.page-docs .nav-btn {
  background: var(--orange); color: #fff !important;
  font-weight: 500; letter-spacing: .04em;
}
body.page-docs .nav-btn:hover { background: #a04800 !important; }
body.page-docs .docs-layout { display: grid; grid-template-columns: 220px 1fr; max-width: 1080px; margin: 0 auto; }
body.page-docs .sidebar {
  position: sticky; top: 52px; height: calc(100vh - 52px);
  overflow-y: auto; padding: 2rem 1rem 2rem 1.5rem; border-right: 1px solid var(--border);
}
body.page-docs .sidebar-section { margin-bottom: 1.5rem; }
body.page-docs .sidebar-heading {
  font-family: var(--mono); font-size: .6rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); margin-bottom: .5rem; padding-left: .5rem;
}
body.page-docs .sidebar a {
  display: block; padding: .35rem .5rem;
  font-family: var(--mono); font-size: .76rem; color: var(--muted); text-decoration: none;
  transition: color .1s, background .1s;
}
body.page-docs .sidebar a:hover { color: var(--text); background: var(--bg2); }
body.page-docs .sidebar a.active { color: var(--orange); background: var(--orange-light); }
body.page-docs .content { padding: 3rem 3rem 5rem; min-width: 0; }
body.page-docs .content section { margin-bottom: 4rem; scroll-margin-top: 72px; }
body.page-docs .section-kicker {
  font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--orange); margin-bottom: .5rem;
}
body.page-docs h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.025em; margin-bottom: .75rem; }
body.page-docs h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: .75rem; }
body.page-docs h3 { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; }
body.page-docs p { font-size: .9rem; color: var(--muted); line-height: 1.75; margin-bottom: 1rem; font-weight: 300; }
body.page-docs p:last-child { margin-bottom: 0; }
body.page-docs .divider { height: 1px; background: var(--border); margin: 3rem 0; }
body.page-docs code {
  font-family: var(--mono); font-size: .82em; color: var(--orange);
  background: var(--orange-light); border: 1px solid #f0c898;
  padding: .1em .35em;
}
body.page-docs .code-block { background: var(--bg2); border: 1px solid var(--border); overflow: hidden; margin: 1rem 0; }
body.page-docs .code-block-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 1rem; background: var(--bg3); border-bottom: 1px solid var(--border);
}
body.page-docs .code-lang { font-family: var(--mono); font-size: .65rem; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
body.page-docs .copy-code-btn {
  padding: .2rem .55rem; background: transparent; border: 1px solid var(--border);
  color: var(--dim); font-family: var(--mono); font-size: .65rem; cursor: pointer; transition: color .1s;
}
body.page-docs .copy-code-btn:hover { color: var(--muted); border-color: var(--border2); }
body.page-docs .code-block pre {
  padding: 1rem 1.25rem; font-family: var(--mono); font-size: .8rem;
  line-height: 1.75; overflow-x: auto; color: var(--text);
}
body.page-docs .doc-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .85rem; }
body.page-docs .doc-table th {
  text-align: left; font-family: var(--mono); font-size: .62rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
  padding: .5rem .75rem; border-bottom: 1px solid var(--border2); background: var(--bg2);
}
body.page-docs .doc-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
body.page-docs .doc-table tr:last-child td { border-bottom: none; }
body.page-docs .doc-table td:first-child { font-family: var(--mono); color: var(--orange); white-space: nowrap; }
body.page-docs .doc-table td.type-col { font-family: var(--mono); font-size: .75rem; color: var(--dim); white-space: nowrap; }
body.page-docs .doc-table td.desc-col { color: var(--muted); line-height: 1.6; font-weight: 300; }
body.page-docs .endpoint {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .5rem 1rem; background: var(--bg2); border: 1px solid var(--border); margin-bottom: 1.25rem;
}
body.page-docs .method-get  { font-family: var(--mono); font-size: .72rem; font-weight: 500; color: var(--green); }
body.page-docs .method-post { font-family: var(--mono); font-size: .72rem; font-weight: 500; color: var(--orange); }
body.page-docs .ep-path     { font-family: var(--mono); font-size: .85rem; color: var(--text); }
body.page-docs .callout { padding: 1rem 1.25rem; font-size: .85rem; line-height: 1.65; margin: 1rem 0; font-weight: 300; }
body.page-docs .callout-amber { background: var(--orange-light); border: 1px solid #f0c898; color: var(--muted); }
body.page-docs .callout-amber strong { color: var(--amber); }
body.page-docs .callout-blue  { background: var(--bg2); border: 1px solid var(--border2); color: var(--muted); }
body.page-docs .callout-blue  strong { color: var(--orange); }
body.page-docs .callout:not(.callout-amber):not(.callout-blue) { background: var(--bg2); border: 1px solid var(--border); color: var(--muted); }
body.page-docs .error-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .85rem;
}
body.page-docs .error-row:last-child { border-bottom: none; }
body.page-docs .error-desc { color: var(--muted); font-weight: 300; }
body.page-docs .demo-box { background: var(--bg2); border: 1px solid var(--border); padding: 1.5rem; margin: 1.5rem 0; }
body.page-docs .demo-box-label { font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 1.25rem; }
body.page-docs .demo-row { display: flex; gap: 1.75rem; align-items: center; }
body.page-docs .demo-gauge-col { flex-shrink: 0; text-align: center; }
body.page-docs .demo-chart-col { flex: 1; min-width: 0; }
body.page-docs .demo-chart-note { font-family: var(--mono); font-size: .68rem; color: var(--dim); margin-top: .65rem; text-align: center; }

@media (max-width: 560px) { body.page-docs .demo-row { flex-direction: column; } }
@media (max-width: 800px) {
  body.page-docs .docs-layout { grid-template-columns: 1fr; }
  body.page-docs .sidebar { display: none; }
  body.page-docs .content { padding: 2rem 1.25rem 4rem; }
}


/* ═══════════════════════════════════════════════════════
   ADMIN
   ═══════════════════════════════════════════════════════ */
body.page-admin { min-height: 100vh; }
body.page-admin nav {
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem; height: 52px; background: var(--bg);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
}
body.page-admin .nav-logo {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-weight: 500; font-size: .88rem; color: var(--text); text-decoration: none;
}
body.page-admin .nav-logo-mark {
  width: 24px; height: 24px; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .58rem; border-radius: 0;
}
body.page-admin .admin-badge {
  font-family: var(--mono); font-size: .65rem; font-weight: 500; letter-spacing: .07em;
  text-transform: uppercase; color: var(--amber);
  background: var(--orange-light); border: 1px solid #f0c898; padding: .15rem .5rem;
}
body.page-admin .nav-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
body.page-admin #nav-email { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
body.page-admin .btn-sm {
  padding: .3rem .85rem; background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); font-family: var(--mono); font-size: .72rem; font-weight: 500;
  cursor: pointer; transition: color .1s, border-color .1s;
  text-decoration: none; display: inline-flex; align-items: center;
}
body.page-admin .btn-sm:hover { color: var(--text); border-color: var(--border2); }
body.page-admin #denied-screen {
  display: none; align-items: center; justify-content: center;
  min-height: calc(100vh - 52px); padding: 2rem;
}
body.page-admin .denied-card {
  background: var(--bg); border: 1px solid var(--red);
  padding: 2.5rem; max-width: 420px; text-align: center;
}
body.page-admin .denied-icon { font-size: 2rem; margin-bottom: 1rem; }
body.page-admin .denied-card h2 { font-size: 1.2rem; margin-bottom: .5rem; }
body.page-admin .denied-card p { font-size: .85rem; color: var(--muted); line-height: 1.65; font-weight: 300; }
body.page-admin main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
body.page-admin .stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-bottom: 2rem; border: 1px solid var(--border); }
body.page-admin .stat-card { background: var(--bg); border-right: 1px solid var(--border); padding: 1.1rem 1.25rem; }
body.page-admin .stat-card:last-child { border-right: none; }
body.page-admin .stat-card-label {
  font-family: var(--mono); font-size: .6rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); margin-bottom: .4rem;
}
body.page-admin .stat-card-value { font-family: var(--mono); font-size: 1.7rem; font-weight: 500; letter-spacing: -.02em; color: var(--text); }
body.page-admin .stat-card-sub { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: .2rem; }
body.page-admin .plan-breakdown { display: flex; flex-direction: column; gap: .25rem; margin-top: .4rem; }
body.page-admin .plan-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .72rem; }
body.page-admin .plan-row .pl { color: var(--muted); }
body.page-admin .plan-row .pv { font-weight: 500; }
body.page-admin .pv-free     { color: var(--muted); }
body.page-admin .pv-starter  { color: var(--orange); }
body.page-admin .pv-pro      { color: var(--green); }
body.page-admin .pv-business { color: var(--green); }
body.page-admin .toolbar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
body.page-admin .search-wrap { flex: 1; position: relative; }
body.page-admin .search-wrap svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
body.page-admin #search {
  width: 100%; padding: .52rem .9rem .52rem 2.25rem;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: .82rem; font-family: var(--font); border-radius: 0;
}
body.page-admin #search:focus { outline: none; border-color: var(--orange); }
body.page-admin #search::placeholder { color: var(--dim); }
body.page-admin .filter-select {
  padding: .5rem .9rem; background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); font-size: .8rem; font-family: var(--mono); cursor: pointer; border-radius: 0;
}
body.page-admin .filter-select:focus { outline: none; }
body.page-admin .table-wrap { background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
body.page-admin table { width: 100%; border-collapse: collapse; }
body.page-admin thead { background: var(--bg2); }
body.page-admin th {
  padding: .65rem 1rem; text-align: left;
  font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
body.page-admin td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-size: .82rem; vertical-align: middle; }
body.page-admin tr:last-child td { border-bottom: none; }
body.page-admin tr:hover td { background: var(--bg2); }
body.page-admin .email-cell { font-weight: 500; cursor: pointer; }
body.page-admin .email-cell:hover { color: var(--orange); text-decoration: underline; }
body.page-admin .badge {
  display: inline-flex; align-items: center; padding: .15rem .55rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--border);
}
body.page-admin .badge-free     { background: var(--bg2); color: var(--muted); }
body.page-admin .badge-starter  { background: var(--orange-light); color: var(--orange); border-color: #f0c898; }
body.page-admin .badge-pro      { background: #e0f0e0; color: var(--green); border-color: #b8d8b8; }
body.page-admin .badge-business { background: #e0f0e0; color: var(--green); border-color: #b8d8b8; }
body.page-admin .badge-active   { background: #e0f0e0; color: var(--green); border-color: #b8d8b8; }
body.page-admin .badge-disabled { background: #fce8e8; color: var(--red); border-color: #e8c0c0; }
body.page-admin .badge-past_due { background: #fdf0d4; color: var(--amber); border-color: #e8d090; }
body.page-admin .usage-cell { min-width: 120px; }
body.page-admin .usage-text { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-bottom: .25rem; }
body.page-admin .mini-bar { height: 2px; background: var(--bg3); overflow: hidden; }
body.page-admin .mini-fill { height: 100%; }
body.page-admin .mf-ok   { background: var(--orange); }
body.page-admin .mf-warn { background: var(--amber); }
body.page-admin .mf-crit { background: var(--red); }
body.page-admin .actions { display: flex; gap: .4rem; align-items: center; }
body.page-admin .act-btn {
  padding: .25rem .6rem; font-family: var(--mono); font-size: .7rem; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border);
  background: transparent; color: var(--muted); transition: color .1s, border-color .1s, background .1s; white-space: nowrap;
}
body.page-admin .act-btn:hover { color: var(--text); border-color: var(--border2); }
body.page-admin .act-btn.danger:hover  { color: var(--red);   border-color: var(--red);   background: #fce8e8; }
body.page-admin .act-btn.success:hover { color: var(--green); border-color: var(--green); background: #e0f0e0; }
body.page-admin .act-btn.primary { color: var(--orange); border-color: #f0c898; }
body.page-admin .act-btn.primary:hover { background: var(--orange-light); border-color: var(--orange); }
body.page-admin .table-empty { padding: 3rem; text-align: center; font-family: var(--mono); font-size: .82rem; color: var(--dim); }
body.page-admin #edit-modal {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(20,20,20,.3); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
body.page-admin #edit-modal.open { display: flex; }
body.page-admin .modal-card {
  background: var(--bg); border: 1px solid var(--border2);
  padding: 1.75rem 2rem; width: 100%; max-width: 560px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1); max-height: 90vh; overflow-y: auto;
}
body.page-admin .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
body.page-admin .modal-title { font-family: var(--mono); font-size: .9rem; font-weight: 500; }
body.page-admin .modal-close {
  width: 28px; height: 28px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-family: var(--font);
}
body.page-admin .modal-close:hover { color: var(--text); border-color: var(--border2); }
body.page-admin .detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .82rem;
}
body.page-admin .detail-row:last-of-type { border-bottom: none; }
body.page-admin .detail-label { color: var(--muted); font-family: var(--mono); font-size: .72rem; }
body.page-admin .detail-value { font-family: var(--mono); font-size: .78rem; font-weight: 500; }
body.page-admin .stripe-link { color: var(--orange); text-decoration: none; font-size: .75rem; font-family: var(--mono); }
body.page-admin .stripe-link:hover { text-decoration: underline; }
body.page-admin .modal-section-title {
  font-family: var(--mono); font-size: .6rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); margin: 1.25rem 0 .75rem;
}
body.page-admin .modal-actions { display: flex; flex-direction: column; gap: .6rem; }
body.page-admin .modal-action-row { display: flex; align-items: center; gap: .75rem; }
body.page-admin .modal-select {
  flex: 1; padding: .5rem .75rem; background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: .8rem; border-radius: 0;
}
body.page-admin .modal-select:focus { outline: none; border-color: var(--orange); }
body.page-admin .modal-btn {
  padding: .5rem 1.1rem; font-family: var(--mono); font-size: .78rem; font-weight: 500;
  cursor: pointer; border: none; transition: background .1s; white-space: nowrap;
}
body.page-admin .modal-btn-primary { background: var(--orange); color: #fff; }
body.page-admin .modal-btn-primary:hover { background: #a04800; }
body.page-admin .modal-btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--text); }
body.page-admin .modal-btn-outline:hover { background: var(--bg2); }
body.page-admin .modal-btn-danger { background: #fce8e8; color: var(--red); border: 1px solid #e8c0c0; }
body.page-admin .modal-btn-danger:hover { background: #f8d0d0; }
body.page-admin .modal-btn-enable { background: #e0f0e0; color: var(--green); border: 1px solid #b8d8b8; }
body.page-admin .modal-btn-enable:hover { background: #c8e4c8; }
body.page-admin #stripe-search {
  padding: .5rem .9rem; width: 160px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: .78rem; border-radius: 0;
}
body.page-admin #stripe-search:focus { outline: none; border-color: var(--orange); }
body.page-admin #stripe-search::placeholder { color: var(--dim); }
body.page-admin .filter-date {
  padding: .5rem .75rem; width: 130px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); font-size: .8rem; font-family: var(--mono); border-radius: 0;
}
body.page-admin .filter-date:focus { outline: none; border-color: var(--orange); }
body.page-admin th.sortable { cursor: pointer; user-select: none; }
body.page-admin th.sortable:hover { color: var(--muted); }
body.page-admin th.sort-asc::after  { content: ' ▲'; font-size: .6em; color: var(--orange); }
body.page-admin th.sort-desc::after { content: ' ▼'; font-size: .6em; color: var(--orange); }
body.page-admin .sparkline-wrap { margin: .5rem 0; }
body.page-admin .sparkline-totals { font-family: var(--mono); font-size: .7rem; color: var(--dim); margin-top: .2rem; }
body.page-admin .key-list { display: flex; flex-direction: column; gap: .35rem; margin-top: .35rem; }
body.page-admin .key-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem; background: var(--bg2); border: 1px solid var(--border);
}
body.page-admin .key-prefix { font-family: var(--mono); font-size: .78rem; color: var(--orange); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.page-admin .key-meta { font-family: var(--mono); font-size: .7rem; color: var(--dim); white-space: nowrap; }
body.page-admin .key-revoke-btn {
  padding: .2rem .55rem; font-family: var(--mono); font-size: .68rem; font-weight: 500;
  cursor: pointer; border: 1px solid #e8c0c0;
  background: transparent; color: var(--red); transition: background .1s; white-space: nowrap; flex-shrink: 0;
}
body.page-admin .key-revoke-btn:hover { background: #fce8e8; }
body.page-admin .key-revoke-btn:disabled { opacity: .4; cursor: default; }
body.page-admin .reset-link-box {
  margin-top: .4rem; padding: .65rem .9rem; background: var(--bg2); border: 1px solid var(--border);
  font-family: var(--mono); font-size: .72rem; color: var(--orange); word-break: break-all; line-height: 1.6;
}
body.page-admin .audit-section { margin-top: 2rem; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
body.page-admin .audit-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .85rem 1.25rem; cursor: pointer; user-select: none; transition: background .1s;
}
body.page-admin .audit-header:hover { background: var(--bg2); }
body.page-admin .audit-title { font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
body.page-admin .audit-toggle { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
body.page-admin .audit-body { border-top: 1px solid var(--border); }
body.page-admin .audit-body .table-wrap { border: none; }

@media (max-width: 900px) { body.page-admin .stats-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  body.page-admin nav { padding: 0 1rem; }
  body.page-admin main { padding: 1.25rem 1rem; }
  body.page-admin .stats-row { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════
   RESET PASSWORD
   ═══════════════════════════════════════════════════════ */
body.page-reset {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 1rem; background: var(--bg2);
}
body.page-reset .card {
  background: var(--bg); border: 1px solid var(--border);
  padding: 2.5rem; width: 100%; max-width: 400px;
}
body.page-reset .logo {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-weight: 500; font-size: .95rem; margin-bottom: 2rem;
  text-decoration: none; color: var(--text);
}
body.page-reset .logo-mark {
  width: 26px; height: 26px; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .6rem; flex-shrink: 0;
}
body.page-reset h1 { font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
body.page-reset .subtitle { font-size: .85rem; color: var(--muted); margin-bottom: 1.75rem; line-height: 1.6; font-weight: 300; }
body.page-reset .field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
body.page-reset label { font-family: var(--mono); font-size: .65rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
body.page-reset input {
  width: 100%; padding: .65rem .9rem; background: var(--bg);
  border: 1px solid var(--border2); border-radius: 0;
  color: var(--text); font-size: .9rem; font-family: var(--font); transition: border-color .15s;
}
body.page-reset input:focus { outline: none; border-color: var(--orange); }
body.page-reset .btn {
  width: 100%; padding: .7rem; background: var(--orange); color: #fff;
  border: none; font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .04em;
  cursor: pointer; transition: background .15s; margin-top: .25rem;
}
body.page-reset .btn:hover { background: #a04800; }
body.page-reset .btn:disabled { opacity: .5; cursor: default; }
body.page-reset .msg {
  font-family: var(--mono); font-size: .78rem; text-align: center; margin-top: .75rem;
  display: none; padding: .65rem; line-height: 1.55; border: 1px solid var(--border);
}
body.page-reset .msg.error   { background: #fce8e8; border-color: #e8c0c0; color: var(--red); display: block; }
body.page-reset .msg.success { background: #e0f0e0; border-color: #b8d8b8; color: var(--green); display: block; }
body.page-reset .back {
  display: block; text-align: center; margin-top: 1.25rem;
  font-family: var(--mono); font-size: .78rem; color: var(--muted); text-decoration: none;
}
body.page-reset .back:hover { color: var(--text); }
body.page-reset .hint { font-family: var(--mono); font-size: .72rem; color: var(--dim); margin-top: .35rem; }


/* ═══════════════════════════════════════════════════════
   LEGAL (ToS + Privacy)
   ═══════════════════════════════════════════════════════ */
body.page-legal { min-height: 100vh; display: flex; flex-direction: column; }
body.page-legal nav {
  position: sticky; top: 0; z-index: 100; height: 52px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1.5rem; gap: 0; flex-shrink: 0;
}
body.page-legal .nav-logo {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-weight: 500; font-size: .88rem; color: var(--text);
  text-decoration: none; flex-shrink: 0;
  padding-right: 1.5rem; margin-right: 0; border-right: 1px solid var(--border);
}
body.page-legal .nav-logo-mark {
  width: 24px; height: 24px; background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .58rem; border-radius: 0;
}
body.page-legal .nav-sep { width: 1px; height: 52px; background: var(--border); margin: 0 0 0 1.5rem; }
body.page-legal .nav-links { display: flex; gap: 0; }
body.page-legal .nav-links a {
  padding: 0 .9rem; height: 52px; display: flex; align-items: center;
  font-family: var(--mono); font-size: .72rem; color: var(--muted); text-decoration: none;
  border-right: 1px solid var(--border); transition: color .1s, background .1s;
}
body.page-legal .nav-links a:hover { color: var(--text); background: var(--bg2); }
body.page-legal .nav-right { margin-left: auto; display: flex; gap: 0; align-items: center; flex-shrink: 0; }
body.page-legal .nav-right a {
  font-family: var(--mono); font-size: .72rem; color: var(--muted); text-decoration: none;
  padding: 0 .9rem; height: 52px; display: flex; align-items: center;
  border-left: 1px solid var(--border); transition: color .1s;
}
body.page-legal .nav-right a:hover { color: var(--text); }
body.page-legal .nav-btn { background: var(--orange); color: #fff !important; font-weight: 500; }
body.page-legal .nav-btn:hover { background: #a04800 !important; }
body.page-legal .legal-main { flex: 1; padding: 3.5rem 1.5rem 5rem; }
body.page-legal .legal-article { max-width: 680px; margin: 0 auto; }
body.page-legal .legal-kicker {
  font-family: var(--mono); font-size: .62rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--orange); margin-bottom: .5rem;
}
body.page-legal h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.025em; margin-bottom: .5rem; }
body.page-legal .legal-date { font-family: var(--mono); font-size: .78rem; color: var(--dim); margin-bottom: 2.5rem; }
body.page-legal h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; margin: 2.25rem 0 .6rem; }
body.page-legal p { font-size: .9rem; color: var(--muted); line-height: 1.8; margin-bottom: .9rem; font-weight: 300; }
body.page-legal ul { margin: .5rem 0 .9rem 1.25rem; display: flex; flex-direction: column; gap: .45rem; list-style: disc; }
body.page-legal ul li { font-size: .9rem; color: var(--muted); line-height: 1.7; font-weight: 300; }
body.page-legal strong { color: var(--text); font-weight: 600; }
body.page-legal a { color: var(--orange); text-decoration: none; }
body.page-legal a:hover { text-decoration: underline; }
body.page-legal code {
  font-family: var(--mono); font-size: .82em; color: var(--orange);
  background: var(--orange-light); border: 1px solid #f0c898; padding: .1em .35em;
}
body.page-legal .legal-footer { border-top: 1px solid var(--border); padding: 1.75rem 1.5rem; flex-shrink: 0; }
body.page-legal .legal-footer-inner {
  max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
body.page-legal .footer-logo {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-weight: 500; font-size: .82rem; color: var(--text); text-decoration: none;
}
body.page-legal .footer-logo-mark {
  width: 22px; height: 22px; background: var(--orange) !important; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .56rem; border-radius: 0;
}
body.page-legal footer p { font-family: var(--mono); font-size: .75rem; color: var(--dim); }
body.page-legal .footer-links { display: flex; gap: 1.5rem; list-style: none; }
body.page-legal .footer-links a { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-decoration: none; transition: color .1s; }
body.page-legal .footer-links a:hover { color: var(--text); }

@media (max-width: 600px) {
  body.page-legal .nav-links { display: none; }
  body.page-legal .legal-footer-inner { flex-direction: column; align-items: flex-start; }
}
