/* UsageBar site — no external fonts, no frameworks. See ../DESIGN.md */

/* ───── Tokens ───── */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "D2Coding", monospace;

  --bg: #f5f7fa;
  --bg-2: #e9eef5;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --ink: #0d1726;
  --ink-2: #2f3b4d;
  --muted: #525f72;
  --line: rgba(13, 23, 38, .12);
  --line-strong: rgba(13, 23, 38, .2);
  --accent: #0a7a6b;
  --accent-bright: #4fd8c0;
  --accent-soft: rgba(79, 216, 192, .18);
  --navy: #13233a;
  --warn: #a64b00;
  --crit: #c0261f;
  --warn-soft: rgba(245, 130, 36, .14);
  --focus: #0a64d6;
  --shadow: 0 1px 2px rgba(13, 23, 38, .06), 0 12px 32px -12px rgba(13, 23, 38, .18);
  --shadow-lg: 0 30px 80px -30px rgba(13, 23, 38, .45);
  --header-bg: rgba(245, 247, 250, .82);

  /* macOS replica (light) */
  --m-pop: rgba(236, 236, 238, .94);
  --m-ink: #1d1d1f;
  --m-sec: #5f5f64;
  --m-card: rgba(0, 0, 0, .04);
  --m-card-line: rgba(0, 0, 0, .09);
  --m-track: rgba(0, 0, 0, .1);
  --m-tick: rgba(0, 0, 0, .28);
  --m-accent: #007aff;
  --m-orange: #f08a24;
  --m-red: #e5413a;
  --m-orange-t: #a64b00;
  --m-red-t: #c0261f;
  --m-bar: rgba(246, 246, 248, .72);
  --m-bar-ink: #111;
  --m-btn: #fff;
  --wall: radial-gradient(60% 70% at 15% 20%, #9ee7d8 0%, transparent 60%),
          radial-gradient(55% 65% at 85% 30%, #b9c8f5 0%, transparent 60%),
          radial-gradient(70% 70% at 60% 100%, #e4cdf2 0%, transparent 60%),
          linear-gradient(160deg, #dff3ef, #e3e8f7);

  --radius: 18px;
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a111e; --bg-2: #0f1828; --surface: #111b2c; --surface-2: #172335;
    --ink: #e9eef6; --ink-2: #c6d0de; --muted: #96a3b6;
    --line: rgba(233, 238, 246, .11); --line-strong: rgba(233, 238, 246, .2);
    --accent: #4fd8c0; --accent-soft: rgba(79, 216, 192, .14);
    --warn: #ffb054; --crit: #ff7b72; --warn-soft: rgba(255, 159, 10, .14);
    --focus: #7cc0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .8);
    --header-bg: rgba(10, 17, 30, .78);
    --m-pop: rgba(40, 40, 43, .94); --m-ink: #f5f5f7; --m-sec: #a3a3a9;
    --m-card: rgba(255, 255, 255, .05); --m-card-line: rgba(255, 255, 255, .09);
    --m-track: rgba(255, 255, 255, .13); --m-tick: rgba(255, 255, 255, .3);
    --m-accent: #0a84ff; --m-orange: #ff9f0a; --m-red: #ff453a; --m-orange-t: #ffb054; --m-red-t: #ff7b72;
    --m-bar: rgba(22, 24, 30, .55); --m-bar-ink: #fff; --m-btn: rgba(255, 255, 255, .16);
    --wall: radial-gradient(60% 70% at 15% 20%, #10594f 0%, transparent 60%),
            radial-gradient(55% 65% at 85% 30%, #26346f 0%, transparent 60%),
            radial-gradient(70% 70% at 60% 100%, #3d2160 0%, transparent 60%),
            linear-gradient(160deg, #0b1e2a, #121a33);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a111e; --bg-2: #0f1828; --surface: #111b2c; --surface-2: #172335;
  --ink: #e9eef6; --ink-2: #c6d0de; --muted: #96a3b6;
  --line: rgba(233, 238, 246, .11); --line-strong: rgba(233, 238, 246, .2);
  --accent: #4fd8c0; --accent-soft: rgba(79, 216, 192, .14);
  --warn: #ffb054; --crit: #ff7b72; --warn-soft: rgba(255, 159, 10, .14);
  --focus: #7cc0ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --header-bg: rgba(10, 17, 30, .78);
  --m-pop: rgba(40, 40, 43, .94); --m-ink: #f5f5f7; --m-sec: #a3a3a9;
  --m-card: rgba(255, 255, 255, .05); --m-card-line: rgba(255, 255, 255, .09);
  --m-track: rgba(255, 255, 255, .13); --m-tick: rgba(255, 255, 255, .3);
  --m-accent: #0a84ff; --m-orange: #ff9f0a; --m-red: #ff453a; --m-orange-t: #ffb054; --m-red-t: #ff7b72;
  --m-bar: rgba(22, 24, 30, .55); --m-bar-ink: #fff; --m-btn: rgba(255, 255, 255, .16);
  --wall: radial-gradient(60% 70% at 15% 20%, #10594f 0%, transparent 60%),
          radial-gradient(55% 65% at 85% 30%, #26346f 0%, transparent 60%),
          radial-gradient(70% 70% at 60% 100%, #3d2160 0%, transparent 60%),
          linear-gradient(160deg, #0b1e2a, #121a33);
  color-scheme: dark;
}

/* ───── Base ───── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; overflow-x: clip; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg);
  word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .08em .4em; overflow-wrap: anywhere; }
q { quotes: none; font-weight: 600; }
b, strong { font-weight: 700; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.wrap-narrow { --wrap: 820px; }
.ic { width: 1.1em; height: 1.1em; flex: none; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s, border-color .2s; white-space: nowrap;
}
.btn-primary { background: var(--accent-bright); color: #06231e; box-shadow: 0 8px 22px -10px rgba(10, 122, 107, .8); }
.btn-primary:hover { background: #6ae3cd; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 18px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
#theme-toggle .ic { display: none; }
#theme-toggle[data-mode="auto"] .ic-auto, #theme-toggle[data-mode="light"] .ic-sun, #theme-toggle[data-mode="dark"] .ic-moon { display: block; }
html:not(.js) #theme-toggle, html:not(.js) #motion-toggle { display: none; }

/* ───── Header ───── */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand img { border-radius: 7px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) { .nav { display: none; } }
@media (max-width: 420px) { .header-inner { gap: 10px; } .header-actions { gap: 6px; } .brand { font-size: 17px; } .header-actions .btn-sm { padding: 0 12px; } }

/* ───── Hero ───── */
.hero { position: relative; padding: 56px 0 88px; overflow: clip; }
.hero-bg {
  position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 20% 25%, var(--accent-soft), transparent 70%),
              radial-gradient(35% 45% at 85% 20%, rgba(90, 120, 255, .12), transparent 70%);
}
.hero-grid {
  display: grid; gap: 40px 56px; align-items: start;
  grid-template-columns: minmax(0, 5.3fr) minmax(0, 7fr);
  grid-template-areas: "copy stage";
}
.hero-copy { grid-area: copy; padding-top: 28px; }
.demo-stage { grid-area: stage; display: grid; gap: 20px; min-width: 0; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
h1 { font-size: clamp(34px, 4.2vw, 56px); font-weight: 850; letter-spacing: -.035em; }
.grad { background: linear-gradient(90deg, var(--accent), #3f7bff 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .grad { background-image: linear-gradient(90deg, #4fd8c0, #8fb0ff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grad { background-image: linear-gradient(90deg, #4fd8c0, #8fb0ff); } }
.new-line { display: inline-block; vertical-align: top; margin: 0 0 18px 6px; }
.new-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 650; text-decoration: none; line-height: 1.5; }
.new-chip b { background: var(--navy); color: #4fd8c0; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 800; }
.new-chip:hover { border-color: var(--accent); color: var(--ink); }
.lede { margin-top: 20px; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 22px; font-size: 14px; color: var(--muted); font-weight: 600; }
.meta-line span::before { content: "✓"; color: var(--accent); margin-right: 6px; }

@media (min-width: 1101px) {
  .hero-grid { grid-template-rows: auto 1fr; grid-template-areas: "copy stage" "ctrl stage"; }
  .demo-stage { display: contents; }
  .desktop { grid-area: stage; position: sticky; top: 88px; align-self: start; }
  .controls { grid-area: ctrl; align-self: start; }
}
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "stage"; }
  .hero-copy { padding-top: 0; text-align: left; }
  .demo-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: start; }
}
@media (max-width: 760px) {
  .hero { padding: 32px 0 56px; }
  .demo-stage { grid-template-columns: minmax(0, 1fr); }
}

/* ───── Fake desktop ───── */
.desktop {
  position: relative; border-radius: 20px; background: var(--wall); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); min-height: 600px; overflow: hidden; isolation: isolate;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Noto Sans KR", sans-serif;
  color: var(--m-ink); line-height: 1.3; word-break: normal;
}
.menubar {
  height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 14px;
  background: var(--m-bar); color: var(--m-bar-ink); font-size: 13px;
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.mb-left { display: flex; gap: 16px; align-items: center; white-space: nowrap; overflow: hidden; }
.mb-left b { font-weight: 700; }
.mb-dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; opacity: .85; }
.mb-right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.mb-sys { display: flex; gap: 10px; align-items: center; }
.mb-clock { font-variant-numeric: tabular-nums; font-size: 13px; }
.mb-glyph {
  height: 26px; padding: 0 6px; border-radius: 6px; border: 0; background: transparent; cursor: pointer; color: inherit;
  display: flex; align-items: center;
}
.mb-glyph[aria-expanded="true"] { background: color-mix(in srgb, var(--m-bar-ink) 16%, transparent); }
.mb-glyph:focus-visible { outline-offset: 0; }

/* Glyph (mirrors StatusGlyph.swift; 1u = 1.2px) */
.glyph { --u: 1.2px; --gi: currentColor; display: flex; align-items: center; height: calc(18 * var(--u)); font-variant-numeric: tabular-nums; }
.glyph .g-col { display: flex; flex-direction: column; justify-content: center; }
.glyph .g-row { display: flex; align-items: center; height: calc(9 * var(--u)); }
.glyph .g-i { font-size: calc(8 * var(--u)); font-weight: 800; opacity: .7; width: calc(7 * var(--u)); line-height: 1; }
.glyph .g-v { font-size: calc(9 * var(--u)); font-weight: 650; margin-left: calc(3 * var(--u)); min-width: calc(22 * var(--u)); line-height: 1; }
.glyph .g-bar { position: relative; width: calc(16 * var(--u)); height: calc(5 * var(--u)); border-radius: calc(1.5 * var(--u)); background: color-mix(in srgb, currentColor 30%, transparent); }
.glyph.is-icon .g-col { gap: calc(3 * var(--u)); }
.glyph.is-icon .g-bar { width: calc(22 * var(--u)); height: calc(6 * var(--u)); }
.glyph .g-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: currentColor; min-width: 2px; transition: width .35s var(--ease), background-color .25s; }
.glyph .g-bar.k-signedout { background: none; border: 1px dashed color-mix(in srgb, currentColor 60%, transparent); }
.glyph .g-bar.k-error { background: none; border: 1px solid color-mix(in srgb, currentColor 80%, transparent); }
.glyph .g-bar.k-error::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.5px; height: 160%; background: currentColor; transform: translate(-50%, -50%) rotate(40deg); border-radius: 1px; }
.glyph .lv-warning { color: var(--m-orange); }
.glyph .lv-critical { color: var(--m-red); }
.glyph .is-dim { opacity: .55; }
.glyph .is-stale { opacity: .45; }
.glyph.is-percent { gap: calc(7 * var(--u)); }
.glyph .g-line { display: flex; align-items: baseline; gap: calc(2 * var(--u)); }
.glyph .g-line .g-i { font-size: calc(10 * var(--u)); width: auto; font-weight: 650; }
.glyph .g-line .g-v { font-size: calc(12.5 * var(--u)); font-weight: 500; margin: 0; min-width: 0; }
.glyph .g-line .g-v.is-bold { font-weight: 800; }

/* Popover */
.popover {
  position: absolute; top: 38px; right: clamp(8px, 14%, 120px); width: min(360px, calc(100% - 16px));
  background: var(--m-pop); border-radius: 12px; border: 1px solid var(--m-card-line);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(0, 0, 0, .15);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  transform-origin: 85% 0; transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.popover.is-closed { opacity: 0; transform: translateY(-6px) scale(.97); pointer-events: none; visibility: hidden; transition: opacity .15s, transform .15s, visibility 0s .15s; }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; }
.pop-title { font-size: 14px; font-weight: 650; letter-spacing: 0; }
.pop-refresh { width: 26px; height: 26px; border: 0; background: none; color: var(--m-ink); border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.pop-refresh .ic { width: 15px; height: 15px; }
.pop-refresh:hover { background: var(--m-card); }
.is-spinning .ic { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pop-cards { display: grid; gap: 10px; padding: 0 12px; }
.card { background: var(--m-card); border: 1px solid var(--m-card-line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.card-title { display: flex; align-items: center; gap: 6px; }
.card-title h3 { font-size: 13px; font-weight: 650; letter-spacing: 0; }
.plan { font-size: 10px; font-weight: 650; color: var(--m-sec); background: var(--m-card-line); padding: 2px 6px; border-radius: 999px; }
.win { display: grid; gap: 5px; }
.win-top, .win-bot { display: flex; align-items: center; gap: 6px; }
.win-top { font-size: 12px; font-weight: 500; }
.win-pct { margin-left: auto; font-variant-numeric: tabular-nums; }
.win-pct.is-bold { font-weight: 750; }
.win-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 650; }
.win-tag .ic { width: 12px; height: 12px; }
.win-tag.lv-warning { color: var(--m-orange-t); }
.win-tag.lv-critical { color: var(--m-red-t); }
.win-bot { font-size: 11px; color: var(--m-sec); font-variant-numeric: tabular-nums; flex-wrap: wrap; row-gap: 1px; }
.win-bot .reset { margin-left: auto; text-align: right; }
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--m-track); }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--m-accent); min-width: 6px; transition: width .35s var(--ease), background-color .25s; }
.bar-fill.lv-warning { background: var(--m-orange); }
.bar-fill.lv-critical { background: var(--m-red); }
.bar-fill.is-zero { display: none; }
.bar-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--m-tick); }
.state { display: flex; gap: 10px; align-items: flex-start; }
.state > .ic { width: 22px; height: 22px; color: var(--m-sec); margin-top: 1px; }
.state h4 { margin: 0; font-size: 12px; font-weight: 650; }
.state p { font-size: 11px; color: var(--m-sec); margin-top: 4px; line-height: 1.4; }
.state code { font-size: 11px; background: none; border: 0; padding: 0; color: var(--m-ink); }
.mac-btn { margin-top: 6px; font-size: 12px; padding: 2px 10px; border-radius: 6px; border: .5px solid var(--m-card-line); background: var(--m-btn); color: var(--m-ink); cursor: pointer; box-shadow: 0 .5px 1.5px rgba(0, 0, 0, .2); min-height: 24px; }
.mac-btn:disabled { opacity: .55; cursor: default; }
/* v0.2 trend row: sparkline + one-line projection (color + icon + text, never color alone) */
.trend { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 1px; }
.spark { display: block; overflow: visible; }
.spark .sp-th { stroke: var(--m-tick); stroke-width: .6; stroke-dasharray: 2 2; opacity: .7; }
.spark .sp-line { fill: none; stroke: var(--m-accent); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.spark .sp-dot { fill: var(--m-accent); }
.spark .sp-empty { stroke: var(--m-sec); stroke-width: 1; stroke-dasharray: 2 3; opacity: .7; }
.spark.v-warning .sp-line { stroke: var(--m-orange); } .spark.v-warning .sp-dot { fill: var(--m-orange); }
.spark.v-critical .sp-line { stroke: var(--m-red); } .spark.v-critical .sp-dot { fill: var(--m-red); }
.spark.v-quiet .sp-line { stroke: var(--m-sec); opacity: .6; } .spark.v-quiet .sp-dot { fill: var(--m-sec); opacity: .6; }
.trend-text { display: flex; align-items: flex-start; gap: 4px; font-size: 11px; line-height: 1.35; color: var(--m-ink); word-break: keep-all; overflow-wrap: normal; }
.trend-text .ic { width: 12px; height: 12px; margin-top: 1px; color: var(--m-sec); }
.trend.v-quiet .trend-text { color: var(--m-sec); }
.trend.v-warning .trend-text { color: var(--m-orange-t); font-weight: 650; }
.trend.v-warning .trend-text .ic { color: var(--m-orange-t); }
.trend.v-critical .trend-text { color: var(--m-red-t); font-weight: 650; }
.trend.v-critical .trend-text .ic { color: var(--m-red-t); }
.pop-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; border-top: 1px solid var(--m-card-line); font-size: 11px; color: var(--m-sec); font-variant-numeric: tabular-nums; }
.pop-foot-btns { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: var(--m-ink); }
.pop-foot-btns span { display: inline-flex; align-items: center; gap: 4px; }
.pop-foot-btns .ic { width: 13px; height: 13px; }

/* Notification toast */
.toast {
  position: absolute; top: 40px; right: 10px; width: min(300px, calc(100% - 20px)); z-index: 5;
  display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: start; padding: 11px 12px;
  background: color-mix(in srgb, var(--m-pop) 96%, transparent); border-radius: 16px; border: 1px solid var(--m-card-line);
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .55); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  animation: toast-in .45s var(--ease);
}
.toast[hidden] { display: none; }
.toast img { border-radius: 7px; }
.toast-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--m-sec); }
.toast-top b { font-weight: 650; letter-spacing: .02em; text-transform: uppercase; font-size: 10.5px; }
.toast-title { font-size: 13px; font-weight: 700; margin-top: 2px; }
.toast-text { font-size: 12px; margin-top: 1px; white-space: pre-line; color: var(--m-ink); opacity: .85; }
.toast-close { border: 0; background: var(--m-card-line); width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 1; cursor: pointer; color: var(--m-sec); }
@keyframes toast-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Controls */
.controls { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 18px; min-width: 0; }
.ctrl-title { font-size: 19px; font-weight: 800; }
.ctrl-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.seg-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.seg-group legend { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; padding: 0; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; border: 1px solid var(--line); }
.seg-sm { grid-template-columns: repeat(3, 1fr); }
.seg button { border: 0; background: transparent; border-radius: 10px; min-height: 40px; font-weight: 700; font-size: 15px; color: var(--ink-2); cursor: pointer; padding: 0 6px; transition: background-color .2s, color .2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 1px var(--line); }
.sliders { display: grid; gap: 14px; position: relative; }
.slider { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.slider label { font-size: 15px; font-weight: 650; }
.slider output { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; min-width: 7.5em; text-align: right; }
.slider output.lv-warning { color: var(--warn); }
.slider output.lv-critical { color: var(--crit); }
.slider.is-disabled label, .slider.is-disabled output { color: var(--muted); }
.scale { position: relative; height: 16px; margin-top: -8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scale span::before { content: ""; position: absolute; left: 50%; top: -6px; width: 1px; height: 5px; background: var(--line-strong); }
input[type="range"] {
  --val: 0%; --fill: var(--accent-bright);
  grid-column: 1 / -1; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--fill) var(--val), var(--bg-2) var(--val)); border: 1px solid var(--line); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--fill) var(--val), var(--bg-2) var(--val)); border: 1px solid var(--line); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 2px solid var(--fill); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--fill); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
input[type="range"].lv-warning { --fill: #f08a24; }
input[type="range"].lv-critical { --fill: #e5413a; }
input[type="range"]:disabled { cursor: not-allowed; opacity: .45; }
input[type="range"]:focus-visible { outline-offset: 4px; }
.trend-ctrl { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.trend-ctrl-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--accent); }
.slider-rate output { min-width: 0; }
.nobr { white-space: nowrap; }
.trend-ctrl-hint { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: -8px; }
.ctrl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ctrl-note { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* ───── Sections ───── */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-title { font-size: clamp(28px, 3.6vw, 42px); font-weight: 850; letter-spacing: -.03em; text-align: center; }
.section-lede { text-align: center; color: var(--ink-2); margin: 14px auto 0; max-width: 36em; font-size: 18px; }

.features { background: var(--bg-2); }
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.feat h3 { font-size: 20px; margin-top: 18px; }
.feat p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.feat-art { height: 96px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; align-content: center; gap: 8px; padding: 0 24px; }
.mini-glyph { display: grid; gap: 6px; font-variant-numeric: tabular-nums; color: var(--ink); }
.mg-row { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.mg-row em { font-style: normal; }
.mg-row i { font-style: normal; font-size: 14px; opacity: .65; width: 12px; }
.mg-row b { width: 48px; height: 12px; border-radius: 3px; background: linear-gradient(to right, currentColor var(--p), color-mix(in srgb, currentColor 25%, transparent) var(--p)); }
.lv-bar { width: 100%; height: 10px; border-radius: 99px; background: var(--line); position: relative; overflow: hidden; }
.lv-bar b { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; }
.lv-n { background: #2f8cff; } .lv-w { background: #f08a24; } .lv-c { background: #e5413a; }
.stale-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 15px; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: minmax(0, 1fr); } }

/* v0.2 feature: pace → limit */
.trend-card {
  margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 3.4vw, 40px); box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "copy fig" "rules rules"; gap: 28px 44px; align-items: center;
}
.trend-copy { grid-area: copy; min-width: 0; }
.trend-fig { grid-area: fig; margin: 0; min-width: 0; }
.trend-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
.trend-card h3 { font-size: clamp(26px, 2.8vw, 34px); font-weight: 850; margin-top: 14px; }
.trend-lede { margin-top: 12px; color: var(--ink-2); font-size: 16.5px; }
.trend-pace { margin-top: 22px; max-width: 400px; }
.trend-verdict { margin-top: 14px; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 16px; color: var(--ink); line-height: 1.5; }
.trend-verdict .ic { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.trend-verdict.v-warning { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.trend-verdict.v-warning .ic { color: var(--warn); }
.trend-verdict.v-calm .ic { color: var(--accent); }
.pace-chart { width: 100%; height: auto; font-family: var(--font); overflow: visible; }
.pc-plot { fill: var(--surface-2); stroke: var(--line); }
.pc-limit { stroke: var(--ink-2); stroke-width: 1.5; }
.pc-th { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 4 4; opacity: .55; }
.pc-th-crit { stroke: var(--crit); }
.pc-ax { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.pc-lab { font-size: 12.5px; font-weight: 800; fill: var(--ink-2); }
.pc-now { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.pc-reset { stroke: var(--ink-2); stroke-width: 1.5; }
.pc-past { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.pc-proj { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 7 6; stroke-linecap: round; transition: opacity .4s var(--ease); }
.pc-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2.5; }
.pc-hit { fill: var(--crit); stroke: var(--surface); stroke-width: 2.5; opacity: 0; }
.pc-blocked { fill: color-mix(in srgb, var(--crit) 13%, transparent); }
.pc-blocked-t { font-size: 13px; font-weight: 800; fill: var(--crit); }
.pace-chart[data-kind="exhausts"] .pc-proj { stroke: var(--warn); }
.pace-chart[data-kind="exhausts"] .pc-hit { opacity: 1; }
.pace-chart[data-kind="idle"] .pc-proj { stroke: var(--muted); }
.trend-fig figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
/* Scroll-linked, once: the recorded line draws in, then the projection appears. */
.js .trend-card .pc-past { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease) .25s; }
.js .trend-card .pc-proj, .js .trend-card .pc-blocked, .js .trend-card .pc-blocked-t { opacity: 0; transition: opacity .45s var(--ease) 1.2s; }
.js .trend-card.is-in .pc-past { stroke-dashoffset: 0; }
.js .trend-card.is-in .pc-proj, .js .trend-card.is-in .pc-blocked, .js .trend-card.is-in .pc-blocked-t { opacity: 1; }
.trend-rules { grid-area: rules; list-style: none; margin: 0; padding: 24px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; }
.trend-rules h4 { margin: 0; font-size: 16px; font-weight: 800; }
.trend-rules p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
@media (max-width: 1000px) {
  .trend-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "fig" "rules"; }
  .trend-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .trend-rules { grid-template-columns: minmax(0, 1fr); } .trend-verdict { font-size: 15px; }
  /* The chart scales down ~50% on phones: enlarge its type so labels stay ≥ 10px on screen. */
  .pc-ax { font-size: 20px; } .pc-lab { font-size: 21px; } .pc-blocked-t { font-size: 21px; }
}

/* How it works */
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; margin-top: 48px; align-items: start; }
.how-visual { position: sticky; top: calc(64px + 6vh); order: 2; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.how-steps { list-style: none; margin: 0; padding: 0; order: 1; }
.how-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; transition: opacity .35s var(--ease); }
.how-step:first-child { min-height: 56vh; justify-content: flex-start; padding-top: 12vh; }
.how-step:last-child { min-height: 60vh; }
.js .how-step { opacity: .38; }
.js .how-step.is-active { opacity: 1; }
.step-no { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 850; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.how-step h3 { font-size: clamp(24px, 2.6vw, 32px); margin-top: 16px; }
.how-step p { margin-top: 12px; color: var(--ink-2); font-size: 18px; }
.how-step .step-note { font-size: 15px; color: var(--muted); padding-left: 14px; border-left: 3px solid var(--accent-bright); }
.how-dots { list-style: none; display: flex; justify-content: center; gap: 10px; margin: 12px 0 0; padding: 0; }
.how-dots button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 800; font-size: 14px; cursor: pointer; color: var(--muted); transition: background-color .25s, color .25s; }
.how-dots button[aria-current="step"] { background: var(--accent-bright); color: #06231e; border-color: transparent; }

/* Flow SVG */
.flow { width: 100%; height: auto; font-family: var(--font); color: var(--muted); overflow: visible; }
.flow text { fill: var(--ink); }
.f-mac { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.f-cap { font-size: 13px; font-weight: 800; fill: var(--muted) !important; letter-spacing: .04em; }
.f-node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.f-node .f-app { fill: #13233a; stroke: none; }
.f-t { font-size: 15px; font-weight: 800; }
.f-s { font-size: 12px; fill: var(--muted) !important; }
.f-mono { font-family: var(--mono); font-size: 11px; }
.f-badge { font-weight: 700; fill: var(--accent) !important; }
.f-ico { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.f-cloud { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 5 5; }
.f-link { fill: none; stroke: var(--line-strong); stroke-width: 2.2; color: var(--line-strong); stroke-dasharray: 6 6; transition: stroke .3s, color .3s; }
.f-lab { font-size: 12px; font-weight: 700; fill: var(--muted) !important; transition: fill .3s, opacity .3s; }
.f-foot { font-size: 12px; font-weight: 700; fill: var(--accent) !important; }
.f-menubar { fill: var(--surface-2) !important; }
.f-gi { font-size: 8px; font-weight: 800; opacity: .7; }
.f-gv { font-size: 9.5px; font-weight: 800; }
.f-tr { fill: var(--line-strong) !important; stroke: none !important; }
.f-fill { fill: var(--ink) !important; stroke: none !important; transform-box: fill-box; transform-origin: left center; transition: transform .6s var(--ease), fill .3s; }
.n-key, .n-log, .n-core, .n-cloud, .n-bar, .f-link, .f-lab { transition: opacity .35s var(--ease); }

.js .how-visual .n-src, .js .how-visual .n-core, .js .how-visual .n-cloud, .js .how-visual .n-bar, .js .how-visual .f-cloud { opacity: .35; }
.js .how-visual .f-link, .js .how-visual .f-lab { opacity: .2; }
.js .how-visual .f-fill { transform: scaleX(0); }
.js .how-visual[data-step="1"] .n-src, .js .how-visual[data-step="1"] .n-core { opacity: 1; }
.js .how-visual[data-step="1"] .l-read, .js .how-visual[data-step="1"] .lab-read { opacity: 1; }
.js .how-visual[data-step="1"] .n-src rect { stroke: var(--accent); fill: var(--accent-soft); }
.js .how-visual[data-step="2"] .n-core, .js .how-visual[data-step="2"] .n-cloud, .js .how-visual[data-step="2"] .f-cloud, .js .how-visual[data-step="2"] .n-log { opacity: 1; }
.js .how-visual[data-step="2"] .l-net, .js .how-visual[data-step="2"] .lab-net, .js .how-visual[data-step="2"] .lab-local { opacity: 1; }
.js .how-visual[data-step="2"] .n-core .f-box { stroke: var(--accent); fill: var(--accent-soft); }
.js .how-visual[data-step="2"] .f-cloud { stroke: var(--accent); }
.js .how-visual[data-step="3"] .n-core, .js .how-visual[data-step="3"] .n-bar { opacity: 1; }
.js .how-visual[data-step="3"] .l-show, .js .how-visual[data-step="3"] .lab-show { opacity: 1; }
.js .how-visual[data-step="3"] .n-bar rect.f-menubar { stroke: var(--accent); }
.js .how-visual[data-step="3"] .f-fill { transform: none; }
.js .how-visual[data-step="3"] .f-fill-c { fill: #f08a24 !important; }
.js .how-visual[data-step="3"] .f-gv-c { fill: var(--warn) !important; }
.how-visual[data-step="1"] .l-read, .how-visual[data-step="2"] .l-net, .how-visual[data-step="3"] .l-show { stroke: var(--accent); color: var(--accent); animation: dash .9s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -12; } }

@media (max-width: 860px) {
  .how-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; }
  .how-visual { order: 0; top: 72px; z-index: 3; padding: 8px; border-radius: 18px; }
  .flow { max-height: 40vh; margin-inline: auto; }
  .how-dots { margin-top: 6px; }
  .how-dots button { width: 30px; height: 30px; }
  .how-step, .how-step:first-child, .how-step:last-child { min-height: 58vh; padding: 28px 4px; justify-content: flex-start; }
  .how-step:first-child { padding-top: 32px; }
  .how-step p { font-size: 17px; }
}

/* Trust */
.trust { background: var(--bg-2); }
.trust-grid { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trust-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 24px; position: relative; }
.trust-card::before { content: "✓"; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 900; margin-bottom: 12px; }
.trust-card.is-caution::before { content: "!"; background: var(--warn-soft); color: var(--warn); }
.trust-card h3 { font-size: 18px; }
.trust-card p { margin-top: 6px; font-size: 15.5px; color: var(--ink-2); }
.history { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); }
.history-head h3 { font-size: 20px; }
.history-head p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; max-width: 46em; }
.history-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.history-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; min-width: 0; }
.history-col h4 { margin: 0; font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.history-col h4::before { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 900; }
.history-col.is-kept h4::before { content: "✓"; background: var(--accent-soft); color: var(--accent); }
.history-col.is-never h4::before { content: "✕"; background: color-mix(in srgb, var(--crit) 14%, transparent); color: var(--crit); }
.history-col ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: 15px; color: var(--ink-2); }
.history-path { margin-top: 12px; display: grid; gap: 4px; }
.history-path span { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.history-path code { font-size: 13px; justify-self: start; }
.history-note { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.history-foot { margin-top: 14px; font-size: 15px; color: var(--muted); }
@media (max-width: 600px) { .history-cols { grid-template-columns: minmax(0, 1fr); } }
.req { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.req h3 { font-size: 18px; }
.req-list { margin: 14px 0 0; display: grid; gap: 0; }
.req-list div { display: grid; grid-template-columns: 7em 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.req-list dt { font-weight: 800; color: var(--muted); font-size: 15px; }
.req-list dd { margin: 0; font-size: 16px; }
.req-note { margin-top: 12px; font-size: 14.5px; color: var(--muted); }
@media (max-width: 900px) { .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .trust-grid { grid-template-columns: minmax(0, 1fr); } .req-list div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Download */
.download { background: radial-gradient(60% 80% at 50% 0%, var(--accent-soft), transparent 70%); }
.dl-card { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow-lg); display: grid; gap: 24px; }
.dl-main { display: flex; gap: 22px; align-items: center; }
.dl-icon { border-radius: 22px; box-shadow: 0 12px 30px -12px rgba(19, 35, 58, .6); flex: none; }
#dl-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 850; }
.dl-sub { margin-top: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-sub b { color: var(--ink); }
.dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.dl-req { color: var(--muted); font-size: 15px; font-weight: 600; }
.dl-notice { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; justify-items: start; font-size: 15.5px; }
.dl-notice[hidden] { display: none; }
.hash { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 12px 16px; }
.hash-label { font-size: 13px; font-weight: 800; color: var(--muted); }
.hash-val { background: none; border: 0; padding: 0; font-size: 13.5px; word-break: break-all; color: var(--ink); }
.hash-val.is-pending { font-family: var(--font); color: var(--muted); }
.dl-foot { font-size: 14.5px; color: var(--muted); display: grid; gap: 10px; }
.trust-code { margin-top: 10px !important; }
.trust-code code { font-size: 12.5px; }
@media (max-width: 600px) {
  .dl-main { flex-direction: column; align-items: flex-start; gap: 14px; }
  .dl-icon { width: 72px; height: 72px; border-radius: 17px; }
  .dl-actions .btn-lg { width: 100%; }
  .hash { grid-template-columns: minmax(0, 1fr) auto; }
  .hash-label { grid-column: 1 / -1; }
}
.copy-btn.is-done { border-color: var(--accent); color: var(--accent); }

/* Install */
.install-steps { list-style: none; margin: 44px auto 0; padding: 0; display: grid; gap: 18px; max-width: 920px; }
.inst { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow); }
.inst-no { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-weight: 900; font-size: 22px; background: var(--navy); color: #4fd8c0; }
.inst-body { min-width: 0; display: grid; gap: 12px; align-content: start; }
.inst h3 { font-size: 21px; }
.inst p { color: var(--ink-2); }
.inst-warn { font-size: 15px; color: var(--warn) !important; font-weight: 600; }
.inst-tip { font-size: 15px; color: var(--muted) !important; }
.drag-art { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--surface-2); border-radius: 16px; border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.drag-art small { font-size: 12px; color: var(--muted); font-weight: 600; }
.da-app, .da-folder { display: grid; justify-items: center; gap: 4px; }
.da-app img { border-radius: 10px; }
.da-app { animation: drag 3.2s var(--ease) infinite; }
@keyframes drag { 0%, 20% { transform: none; } 55%, 70% { transform: translateX(96px) scale(.85); opacity: .0; } 71% { transform: none; opacity: 0; } 90%, 100% { opacity: 1; } }
.da-arrow { width: 48px; height: 2px; background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 10px); position: relative; }
.da-arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--muted); }
.da-folder-ic { width: 52px; height: 42px; border-radius: 6px; background: linear-gradient(#6cb8ff, #3f95f0); position: relative; margin-top: 2px; }
.da-folder-ic::before { content: ""; position: absolute; left: 0; top: -6px; width: 22px; height: 10px; border-radius: 4px 4px 0 0; background: #5aa9f7; }
.da-folder-ic::after { content: "A"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; color: rgba(255, 255, 255, .85); font-size: 18px; }
@media (max-width: 600px) { .inst { grid-template-columns: minmax(0, 1fr); gap: 14px; } .inst-no { width: 44px; height: 44px; font-size: 19px; border-radius: 13px; } }

.tabs { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.tab-list { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-list button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab-list button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.tab-panel { padding: 16px 18px 18px; display: grid; gap: 12px; }
.tab-panel[hidden] { display: none; }
.mini-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.mini-steps li::marker { font-weight: 800; color: var(--accent); }
.cmd { display: flex; align-items: center; gap: 10px; background: #0d1726; color: #e9eef6; border-radius: 12px; padding: 8px 8px 8px 16px; min-width: 0; }
:root[data-theme="dark"] .cmd { background: #050a13; border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cmd { background: #050a13; border: 1px solid var(--line); } }
.cmd code { background: none; border: 0; padding: 0; color: inherit; font-size: 14px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cmd code::before { content: "$ "; color: #4fd8c0; }
.cmd .btn-ghost { background: rgba(255, 255, 255, .08); color: #e9eef6; border-color: rgba(255, 255, 255, .2); flex: none; }
.cmd .btn-ghost:hover { border-color: #4fd8c0; }
.cmd .copy-btn.is-done { color: #4fd8c0; border-color: #4fd8c0; }
.cmd-tag { font-size: 12px; font-weight: 800; color: #9fb0c6; min-width: 4.6em; }
.cmd-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .cmd-pair { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.acc { margin-top: 40px; display: grid; gap: 10px; }
.acc-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.acc-item h3 { font-size: inherit; }
.acc-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; padding: 18px 20px; border: 0; background: none; cursor: pointer; font-size: 17px; font-weight: 750; border-radius: 16px; color: var(--ink); letter-spacing: -.01em; }
.acc-btn .ic { transition: transform .25s var(--ease); color: var(--muted); }
.acc-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.acc-panel { padding: 0 20px 20px; color: var(--ink-2); font-size: 16px; }
.acc-panel:not([hidden]) { animation: fade-down .25s var(--ease); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 36px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.footer-brand img { border-radius: 6px; }
.footer-tag { margin-top: 12px; max-width: 26em; font-size: 15px; color: var(--ink-2); }
.footer-domain { margin-top: 10px; font-size: 15px; font-weight: 700; }
.footer-domain a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.footer-domain a:hover { border-bottom-color: var(--accent); }
.footer-col h3 { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 15px; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-facts li { color: var(--ink-2); }
.footer-legal { display: grid; gap: 10px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.disclaimer { font-size: 15px; color: var(--ink-2); max-width: 56em; }
.fine { font-size: 14px; color: var(--muted); max-width: 56em; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.footer-bottom .fine { margin: 0; }
.footer-bottom a { color: var(--ink-2); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-grid { gap: 28px 20px; } }

/* Reveal (JS only) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ───── Reduced motion: OS setting (no JS) or the toggle ───── */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) *, html:not([data-motion="full"]) *::before, html:not([data-motion="full"]) *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
  html:not([data-motion="full"]) .reveal { opacity: 1 !important; transform: none !important; }
  html:not([data-motion="full"]) .trend-card .pc-past { stroke-dashoffset: 0 !important; }
  html:not([data-motion="full"]) .trend-card .pc-proj, html:not([data-motion="full"]) .trend-card .pc-blocked, html:not([data-motion="full"]) .trend-card .pc-blocked-t { opacity: 1 !important; }
}
html[data-motion="reduce"] { scroll-behavior: auto; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation: none !important; transition: none !important; }
html[data-motion="reduce"] .reveal { opacity: 1 !important; transform: none !important; }
html[data-motion="reduce"] .trend-card .pc-past { stroke-dashoffset: 0 !important; }
html[data-motion="reduce"] .trend-card .pc-proj, html[data-motion="reduce"] .trend-card .pc-blocked, html[data-motion="reduce"] .trend-card .pc-blocked-t { opacity: 1 !important; }
@media (max-width: 600px) { .mb-date, .mb-hide-sm { display: none; } .desktop { min-height: 600px; } }

.nowrap { white-space: nowrap; }
.mini-bar { display: none; }
@media (max-width: 760px) {
  .mini-bar {
    display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; z-index: 2; box-shadow: var(--shadow); border-radius: 10px;
    background: var(--m-bar); color: var(--m-bar-ink); border: 1px solid var(--line); position: sticky; top: 72px;
  }
  .mini-bar-label { font-size: 12px; font-weight: 700; opacity: .7; }
  .toast { position: fixed; top: 74px; left: 12px; right: 12px; width: auto; z-index: 60; }
}
