/* ============================================================
   Milo — design system
   Premium, dark, calm. One cool accent (Milo's eye glow).
   ============================================================ */
:root {
  --bg: #0a0b0e;
  --bg-2: #0e1014;
  --surface: #14171d;
  --surface-2: #191d25;
  --surface-3: #1f242d;
  --border: rgba(255,255,255,.07);
  --border-strong: rgba(255,255,255,.13);
  --text: #eceef2;
  --text-dim: #a7adb8;
  --text-mute: #6d7480;
  --accent: #5cc8ff;
  --accent-soft: rgba(92,200,255,.14);
  --accent-line: rgba(92,200,255,.35);
  --good: #52d1a4;
  --warn: #f2c14e;
  --bad: #ff6b6b;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.75);
  --shadow-sm: 0 6px 20px -10px rgba(0,0,0,.6);
  --maxw: 1120px;
  --nav-h: 66px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
#app { min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---- buttons ---- */
.btn {
  font: inherit; font-weight: 560; cursor: pointer; border: 1px solid transparent;
  border-radius: 999px; padding: 11px 20px; display: inline-flex; align-items: center;
  gap: 9px; transition: transform .15s ease, background .2s ease, border-color .2s ease, opacity .2s;
  white-space: nowrap; color: var(--text); background: transparent;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #052235; border-color: var(--accent); font-weight: 640; }
.btn.primary:hover { background: #79d2ff; }
.btn.secondary { background: var(--surface-2); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--surface-3); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,.05); }
.btn.full { width: 100%; justify-content: center; }
.btn.small { padding: 8px 15px; font-size: .9rem; }
.btn.danger { color: var(--bad); border-color: rgba(255,107,107,.35); }
.btn.danger:hover { background: rgba(255,107,107,.1); }
.btn:disabled { opacity: .5; cursor: default; }
.text-link { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.text-link:hover { text-decoration: underline; }

/* ---- Milo eyes ---- */
.milo-eyes { display: inline-flex; gap: var(--eye-gap, 18px); align-items: center; --eye-w: 30px; --eye-h: 46px; }
.milo-eyes .eye {
  width: var(--eye-w); height: var(--eye-h); border-radius: 999px;
  background: linear-gradient(180deg, #8fe0ff, var(--accent));
  box-shadow: 0 0 18px 2px rgba(92,200,255,.5), 0 0 40px 6px rgba(92,200,255,.22);
  animation: blink 5.5s infinite;
}
.milo-eyes[data-state="waiting"] .eye { animation: blink 5.5s infinite, lookaround 6s ease-in-out infinite; }
.milo-eyes[data-state="attentive"] .eye { transform: scaleY(1.06); animation: blink 3s infinite; }
.milo-eyes[data-state="happy"] .eye { height: calc(var(--eye-h) * .55); border-radius: 999px 999px 40% 40%; animation: none; transform: translateY(4px); }
.milo-eyes[data-state="sad"] .eye { transform: rotate(8deg) scaleY(.8); animation: none; }
.milo-eyes[data-state="sad"] .eye.right { transform: rotate(-8deg) scaleY(.8); }
@keyframes blink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes lookaround { 0%,100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============================================================
   Public site
   ============================================================ */
.public { flex: 1; display: flex; flex-direction: column; }
.topnav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 clamp(18px, 5vw, 44px);
  background: rgba(10,11,14,.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.topnav.scrolled { border-bottom-color: var(--border); }
.brand { display: inline-flex; align-items: center; gap: 11px; background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.15rem; font-weight: 640; letter-spacing: -.02em; }
.brand .milo-eyes { --eye-w: 9px; --eye-h: 15px; --eye-gap: 6px; }
.topnav .links { display: flex; align-items: center; gap: 6px; }
.topnav .links .btn { font-weight: 520; }
.nav-toggle { display: none; }
.nav-drop { display: none; position: absolute; top: var(--nav-h); right: clamp(12px,4vw,28px); flex-direction: column; gap: 2px; min-width: 190px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); z-index: 45; }
.nav-drop.open { display: flex; }
.nav-drop .navlink { border-radius: 9px; }

.footer { border-top: 1px solid var(--border); padding: 40px clamp(18px,5vw,44px); color: var(--text-mute); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .9rem; }
.footer .brand { font-size: 1rem; }

/* hero */
.hero { position: relative; padding: clamp(60px, 11vw, 130px) clamp(18px,5vw,44px) clamp(70px,9vw,110px); max-width: var(--maxw); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 680; letter-spacing: -.03em; }
.hero h1 .soft { color: var(--text-dim); display:block; }
.hero p.lead { color: var(--text-dim); font-size: clamp(1.05rem, 1.6vw, 1.25rem); margin: 22px 0 30px; max-width: 30ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 340px; }
.orb {
  position: relative; width: min(360px, 78vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(92,200,255,.16), rgba(92,200,255,.02) 60%, transparent 70%);
  display: grid; place-items: center; animation: float 7s ease-in-out infinite;
}
.orb::after { content:""; position:absolute; inset: 20%; border-radius: 50%; border: 1px solid var(--border); }
.orb .milo-eyes { --eye-w: 46px; --eye-h: 72px; --eye-gap: 30px; }
.status-chip { display:inline-flex; align-items:center; gap:8px; margin-top: 26px; padding: 7px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); font-size:.88rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.dot.off { background: var(--text-mute); box-shadow: none; }

/* sections */
.section { max-width: var(--maxw); margin: 0 auto; width: 100%; padding: clamp(50px,8vw,90px) clamp(18px,5vw,44px); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--text-dim); margin-top: 14px; font-size: 1.05rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature {
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px; transition: border-color .25s, transform .25s;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.feature .ficon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 18px; color: var(--accent); }
.feature h3 { font-size: 1.2rem; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: .96rem; }
.tag { display:inline-block; font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color: var(--warn); border:1px solid rgba(242,193,78,.35); border-radius:999px; padding:3px 10px; margin-bottom:14px; }
.steps { display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { background: var(--surface); border:1px solid var(--border); border-radius: var(--r); padding: 24px; }
.step .num { color: var(--accent); font-weight:680; font-size:.9rem; margin-bottom:10px; }
.cta-band { text-align:center; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border:1px solid var(--border); border-radius: var(--r-lg); padding: clamp(36px,6vw,64px); }
.cta-band h2 { font-size: clamp(1.8rem,3.4vw,2.6rem); }
.cta-band p { color: var(--text-dim); margin: 14px auto 26px; max-width: 44ch; }

.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.8rem,3.4vw,2.4rem); margin-bottom: 8px; }
.prose h3 { font-size: 1.15rem; margin: 30px 0 8px; }
.prose p { color: var(--text-dim); margin-top: 10px; }
.prose ul { color: var(--text-dim); padding-left: 20px; margin-top: 10px; }
.prose li { margin: 6px 0; }
.note { background: var(--surface); border:1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-sm); padding: 14px 18px; color: var(--text-dim); margin-top: 20px; font-size: .95rem; }

/* ---- auth ---- */
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 40px 18px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 36px 32px; box-shadow: var(--shadow); }
.auth-card .milo-eyes { --eye-w: 16px; --eye-h: 26px; --eye-gap: 12px; margin: 0 auto 20px; }
.auth-card h2 { font-size: 1.6rem; text-align: center; }
.auth-card > p { color: var(--text-dim); text-align: center; margin: 8px 0 24px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: .85rem; color: var(--text-dim); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 12px 14px; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field-note { font-size: .8rem; color: var(--text-mute); margin: -8px 0 16px; display:block; }
.form-error { color: var(--bad); font-size: .9rem; min-height: 20px; margin-top: 6px; text-align: center; }
.switch-copy { text-align: center; color: var(--text-mute); margin-top: 20px; font-size: .92rem; }

/* ============================================================
   Portal shell
   ============================================================ */
.shell { flex: 1; display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-2); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 6px 10px 22px; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--r-sm); color: var(--text-dim); background: none; border: none; cursor: pointer; font: inherit; font-size: .96rem; text-align: left; width: 100%; transition: background .18s, color .18s; }
.navlink:hover { background: rgba(255,255,255,.04); color: var(--text); }
.navlink.active { background: var(--accent-soft); color: var(--text); }
.navlink .ic { width: 20px; display: inline-flex; justify-content: center; color: currentColor; opacity: .85; }
.navlink.active .ic { color: var(--accent); opacity: 1; }
.sidebar .spacer { flex: 1; }
.sidebar .accountbox { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px; display: flex; align-items: center; gap: 11px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 640; flex: none; }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar-m { display: none; }
.page { padding: clamp(22px, 4vw, 44px); max-width: 960px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.page-head .eyebrow { margin-bottom: 6px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
.card + .card { margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* device card */
.device-card { background: linear-gradient(150deg, var(--surface-2), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.device-card .dc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.device-card .dc-face { width: 84px; height: 84px; border-radius: 20px; background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%); display: grid; place-items: center; border: 1px solid var(--border); }
.device-card .dc-face .milo-eyes { --eye-w: 13px; --eye-h: 22px; --eye-gap: 9px; }
.device-card h3 { font-size: 1.35rem; margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: .82rem; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-dim); }
.pill.online { color: var(--good); border-color: rgba(82,209,164,.3); }
.pill.retired { color: var(--warn); border-color: rgba(242,193,78,.3); }
.spec-row { display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.spec { min-width: 90px; }
.spec .k { font-size: .78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .06em; }
.spec .v { font-size: 1rem; margin-top: 3px; }

/* settings */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: none; }
.setting .lbl { font-size: .98rem; }
.setting .lbl small { display: block; color: var(--text-mute); font-size: .82rem; margin-top: 3px; }
.setting .ctrl { flex: none; display: flex; align-items: center; gap: 12px; min-width: 220px; justify-content: flex-end; }
.setting input[type=text] { max-width: 200px; }
.setting select, .setting input[type=text] { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 9px 12px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 999px; background: var(--surface-3); width: 150px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 10px rgba(92,200,255,.5); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: none; border-radius: 50%; background: var(--accent); cursor: pointer; }
.range-val { width: 46px; text-align: right; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.segmented { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 3px; }
.segmented button { border: none; background: none; color: var(--text-dim); font: inherit; font-size: .9rem; padding: 7px 13px; border-radius: 7px; cursor: pointer; }
.segmented button.active { background: var(--accent-soft); color: var(--text); }
.save-status { font-size: .85rem; color: var(--text-mute); min-height: 20px; transition: color .2s; }
.save-status.ok { color: var(--good); }
.save-status.err { color: var(--bad); }

/* pairing */
.pair-stage { text-align: center; max-width: 460px; margin: 0 auto; }
.pair-stage .milo-eyes { --eye-w: 30px; --eye-h: 48px; --eye-gap: 22px; margin: 0 auto 26px; }
.code-display { font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 680; letter-spacing: .1em; font-variant-numeric: tabular-nums; margin: 10px 0; background: linear-gradient(90deg,#8fe0ff,var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.countdown { color: var(--text-dim); font-variant-numeric: tabular-nums; margin-bottom: 16px; }
.countdown.low { color: var(--warn); }
.waiting-row { display: inline-flex; align-items: center; gap: 9px; color: var(--text-dim); font-size: .95rem; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* device-initiated claim */
.pair-card { max-width: 520px; margin: 0 auto; }
.claim-form { display: flex; flex-direction: column; gap: 14px; max-width: 340px; margin: 0 auto; }
.code-input {
  width: 100%; text-align: center; text-transform: uppercase;
  font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 680; letter-spacing: .22em;
  font-variant-numeric: tabular-nums; padding: 16px 12px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r);
  caret-color: var(--accent);
}
.code-input::placeholder { color: var(--text-mute); letter-spacing: .22em; }
.code-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent-line); }
.btn-plus { font-weight: 700; margin-right: 2px; }
.pair-success { text-align: center; }
.pair-success .pair-check {
  width: 54px; height: 54px; margin: 8px auto 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 700;
  color: var(--good); background: rgba(82,209,164,.14); border: 1px solid rgba(82,209,164,.4);
}

/* My Devices list */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

/* Phase 7 settings */
.settings-card { margin-top: 16px; }
.settings-card .sec { font-size: 1.02rem; margin-bottom: 6px; color: var(--text); }
.sync-row { margin: 14px 0 2px; display: flex; }
.sync-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  font-size: .88rem; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); }
.sync-pill.ok { color: var(--good); border-color: rgba(82,209,164,.4); }
.sync-pill.wait { color: var(--warn); border-color: rgba(255,196,138,.35); }
.sync-pill.err { color: var(--bad); border-color: rgba(255,140,140,.4); }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--border-strong);
  border-radius: 999px; transition: background .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: var(--text); border-radius: 50%; transition: transform .2s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::before { transform: translateX(20px); background: #052235; }

/* conversations */
.conv-list { display: flex; flex-direction: column; gap: 8px; }
.conv-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: border-color .2s, background .2s; }
.conv-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.conv-item .ttl { font-weight: 540; }
.conv-item .meta { color: var(--text-mute); font-size: .84rem; margin-top: 2px; }
.transcript { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: min(80%, 560px); padding: 12px 16px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.user .bubble { background: var(--accent); color: #052235; border-bottom-right-radius: 5px; }
.msg.assistant .bubble { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.blocked .bubble { border-color: rgba(255,107,107,.4); color: var(--bad); }

/* empty / loading / skeleton */
.empty { text-align: center; padding: 56px 20px; }
.empty .milo-eyes { --eye-w: 22px; --eye-h: 34px; --eye-gap: 16px; margin: 0 auto 20px; opacity: .8; }
.empty h3 { font-size: 1.25rem; }
.empty p { color: var(--text-dim); margin: 8px auto 22px; max-width: 34ch; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }
.sk-line { height: 14px; margin: 10px 0; }

.banner { padding: 13px 18px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: .93rem; }
.banner.warn { border-color: rgba(242,193,78,.35); }
.banner.bad { border-color: rgba(255,107,107,.35); color: var(--bad); }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; transition: all .25s; z-index: 90; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- admin ---- */
.admin { --accent: #ffb454; --accent-soft: rgba(255,180,84,.14); --accent-line: rgba(255,180,84,.35); }
.admin .sidebar { background: #0c0a07; }
.admin .brand-tag { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 6px; padding: 2px 7px; margin-left: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.stat .n { font-size: 2rem; font-weight: 680; letter-spacing: -.02em; }
.stat .l { color: var(--text-mute); font-size: .85rem; margin-top: 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-mute); font-weight: 560; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: none; }
td .pill { font-size: .76rem; padding: 3px 9px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 60px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; min-height: 240px; }
  .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .topnav .links .btn.nav-page { display: none; }
  .nav-toggle { display: inline-flex; }

  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; height: 100vh; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .topbar-m { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); padding: 0 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(10,11,14,.8); backdrop-filter: blur(12px); z-index: 30; }
  .icon-btn { background: none; border: none; color: var(--text); cursor: pointer; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
  .icon-btn:hover { background: rgba(255,255,255,.06); }
  .setting { flex-direction: column; align-items: stretch; gap: 12px; }
  .setting .ctrl { justify-content: flex-start; min-width: 0; }
}
@media (min-width: 901px) { .topbar-m { display: none; } .scrim { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .milo-eyes .eye { animation: none !important; }
}
