/* Layout: Apple-style. Marketing pages are full-bleed bands (white / #F5F5F7) with centered, oversized type; the console is a macOS-like frosted sidebar beside a gray canvas of white rounded panels. Blue is reserved for actions. */
:root {
  --bg: #F5F5F7;
  --bg-2: #EDEDF0;
  --surface: #FFFFFF;
  --surface-2: #FAFAFC;
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --line: #E5E5EA;
  --line-2: #D2D2D7;
  --ink: #1D1D1F;
  --ink-2: #424245;
  --ink-3: #6E6E73;
  --accent: #0071E3;
  --accent-hover: #0077ED;
  --accent-ink: #FFFFFF;
  --link: #0066CC;
  --accent-soft: #E8F1FC;
  --accent-soft-ink: #0066CC;
  --accent-line: #B9D6F7;
  --ok: #248A3D;
  --ok-soft: #E9F7EC;
  --warn: #B25000;
  --warn-soft: #FFF4E5;
  --bad: #D70015;
  --bad-soft: #FFEDEF;
  --info: #0066CC;
  --info-soft: #E8F1FC;
  --est: #4B48C2;
  --est-soft: #EFEEFD;
  --promo: #0A7480;
  --promo-soft: #E2F5F7;
  --sys-green: #34C759;
  --sys-orange: #FF9500;
  --rail: rgba(246, 246, 248, .82);
  --rail-ink: #1D1D1F;
  --rail-ink-2: #6E6E73;
  --rail-hover: rgba(0, 0, 0, .05);
  --rail-active: rgba(0, 113, 227, .12);
  --glass: rgba(255, 255, 255, .72);
  --overlay: rgba(0, 0, 0, .32);
  --card-ink: #FFFFFF;
  --card-a: #3A3A3C;
  --card-b: #1D1D1F;
  --stage-a: rgba(0, 113, 227, .16);
  --stage-b: rgba(175, 82, 222, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .16), 0 2px 8px rgba(0, 0, 0, .06);
  --r-card: 18px;
  --r-tile: 12px;
  --r-ctl: 12px;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, "JetBrains Mono", Consolas, monospace;
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .9375rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.5rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-2: #1C1C1E; --surface: #1C1C1E; --surface-2: #232325; --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .32);
    --line: #2C2C2E; --line-2: #48484A; --ink: #F5F5F7; --ink-2: #D1D1D6; --ink-3: #98989D;
    --accent: #0071E3; --accent-hover: #0A84FF; --accent-ink: #FFFFFF; --link: #2997FF; --accent-soft: rgba(10, 132, 255, .18); --accent-soft-ink: #4DA3FF; --accent-line: #1E4E80;
    --ok: #30D158; --ok-soft: rgba(48, 209, 88, .16); --warn: #FF9F0A; --warn-soft: rgba(255, 159, 10, .16); --bad: #FF453A; --bad-soft: rgba(255, 69, 58, .16);
    --info: #409CFF; --info-soft: rgba(10, 132, 255, .16); --est: #A5A3FF; --est-soft: rgba(94, 92, 230, .22); --promo: #5AC8D8; --promo-soft: rgba(90, 200, 216, .16);
    --sys-green: #30D158; --sys-orange: #FF9F0A;
    --rail: rgba(28, 28, 30, .78); --rail-ink: #F5F5F7; --rail-ink-2: #98989D; --rail-hover: rgba(255, 255, 255, .06); --rail-active: rgba(10, 132, 255, .22);
    --glass: rgba(22, 22, 23, .72); --overlay: rgba(0, 0, 0, .55);
    --card-ink: #FFFFFF; --card-a: #3A3A3C; --card-b: #1C1C1E;
    --stage-a: rgba(10, 132, 255, .22); --stage-b: rgba(191, 90, 242, .18);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .04);
    --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 60px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-2: #1C1C1E; --surface: #1C1C1E; --surface-2: #232325; --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .32);
  --line: #2C2C2E; --line-2: #48484A; --ink: #F5F5F7; --ink-2: #D1D1D6; --ink-3: #98989D;
  --accent: #0071E3; --accent-hover: #0A84FF; --accent-ink: #FFFFFF; --link: #2997FF; --accent-soft: rgba(10, 132, 255, .18); --accent-soft-ink: #4DA3FF; --accent-line: #1E4E80;
  --ok: #30D158; --ok-soft: rgba(48, 209, 88, .16); --warn: #FF9F0A; --warn-soft: rgba(255, 159, 10, .16); --bad: #FF453A; --bad-soft: rgba(255, 69, 58, .16);
  --info: #409CFF; --info-soft: rgba(10, 132, 255, .16); --est: #A5A3FF; --est-soft: rgba(94, 92, 230, .22); --promo: #5AC8D8; --promo-soft: rgba(90, 200, 216, .16);
  --sys-green: #30D158; --sys-orange: #FF9F0A;
  --rail: rgba(28, 28, 30, .78); --rail-ink: #F5F5F7; --rail-ink-2: #98989D; --rail-hover: rgba(255, 255, 255, .06); --rail-active: rgba(10, 132, 255, .22);
  --glass: rgba(22, 22, 23, .72); --overlay: rgba(0, 0, 0, .55);
  --card-ink: #FFFFFF; --card-a: #3A3A3C; --card-b: #1C1C1E;
  --stage-a: rgba(10, 132, 255, .22); --stage-b: rgba(191, 90, 242, .18);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .04);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: var(--fs-md); line-height: 1.5;
  letter-spacing: -.003em; margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-synthesis: none;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--glass); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; color: var(--ink); letter-spacing: -.012em; }
h1 { font-size: var(--fs-2xl); font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 600; }
h3 { font-size: var(--fs-lg); font-weight: 600; }
h4 { font-size: var(--fs-md); font-weight: 600; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid rgba(0, 125, 250, .6); outline-offset: 1px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: .9em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-3); font-size: var(--fs-sm); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-sm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1081px) { .split.split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* icons */
.ico { width: 18px; height: 18px; flex: none; stroke-width: 1.8; vertical-align: -3px; }
[data-lucide] { display: inline-block; width: 18px; height: 18px; flex: none; }

/* buttons — capsules, Apple blue for the one action that matters */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 18px; border-radius: 980px; border: 0;
  background: var(--fill); color: var(--ink); font-weight: 500; font-size: var(--fs-md);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s, transform .1s;
}
.btn:hover { background: var(--fill-2); color: var(--ink); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-soft { background: var(--accent-soft); color: var(--accent-soft-ink); }
.btn-soft:hover { background: var(--accent-line); color: var(--accent-soft-ink); }
.btn-ghost { background: transparent; color: var(--link); }
.btn-ghost:hover { background: var(--fill); color: var(--link); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-sm { min-height: 30px; padding: 0 14px; font-size: var(--fs-sm); }
.btn-lg { min-height: 48px; padding: 0 26px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; position: relative; text-decoration: none; }
.icon-btn:hover { background: var(--fill); color: var(--ink); text-decoration: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); font-weight: 400; cursor: pointer; font-size: inherit; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.ap-link { color: var(--link); font-size: 1.0625rem; display: inline-flex; align-items: center; gap: 2px; }
.ap-link::after { content: "›"; font-size: 1.25em; line-height: 1; margin-left: 2px; transform: translateY(-1px); }

/* surfaces */
.card { background: var(--surface); border-radius: var(--r-card); padding: 22px 24px; box-shadow: var(--shadow); min-width: 0; }
.card-flat { background: var(--surface); border-radius: var(--r-card); padding: 18px 20px; min-width: 0; box-shadow: var(--shadow); }
.card-tint { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head p { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 2px; }
.tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 14px 16px; min-width: 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }

.stat-label { font-size: var(--fs-sm); color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat-label .ico { width: 15px; height: 15px; color: var(--ink-3); }
.stat-value { font-size: 1.625rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 2px; }
.stat-sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }

/* chips — capsules without dots */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 980px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.6; white-space: nowrap; background: var(--fill); color: var(--ink-2); }
.chip::before { content: none; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-est { background: var(--est-soft); color: var(--est); }
.chip-promo { background: var(--promo-soft); color: var(--promo); }
.chip-accent { background: var(--accent-soft); color: var(--accent-soft-ink); }
.chip-line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 500; background: var(--fill); color: var(--ink-2); white-space: nowrap; }

/* banners — neutral text, colored glyph */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: var(--fs-sm); line-height: 1.55; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); }
.banner > .ico, .banner > [data-lucide] { margin-top: 1px; width: 19px; height: 19px; }
.banner b { font-weight: 600; }
.banner-info { background: var(--info-soft); border-color: transparent; } .banner-info > .ico { color: var(--info); }
.banner-warn { background: var(--warn-soft); border-color: transparent; } .banner-warn > .ico { color: var(--warn); }
.banner-bad { background: var(--bad-soft); border-color: transparent; } .banner-bad > .ico { color: var(--bad); }
.banner-ok { background: var(--ok-soft); border-color: transparent; } .banner-ok > .ico { color: var(--ok); }
.banner-est { background: var(--est-soft); border-color: transparent; } .banner-est > .ico { color: var(--est); }
.banner-accent { background: var(--surface-2); } .banner-accent > .ico { color: var(--ink-3); }
.banner .grow > * + * { margin-top: 4px; }
.banner .actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* forms — Apple ID style fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); }
.err { font-size: var(--fs-xs); color: var(--bad); display: flex; gap: 4px; align-items: center; }
.err .ico { width: 14px; height: 14px; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 1rem;
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: .8; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, .18); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, .18); }
.input-group .input { border: 0; box-shadow: none; border-radius: 0; min-width: 0; }
.input-group .addon { display: flex; align-items: center; padding: 0 0 0 14px; color: var(--ink-3); white-space: nowrap; }
.input-group .addon-btn { border: 0; background: transparent; padding: 0 14px; color: var(--link); cursor: pointer; white-space: nowrap; font-size: var(--fs-sm); }
.input-group .addon-btn:hover { background: var(--fill); }
.input-group .addon-btn[aria-disabled="true"] { color: var(--ink-3); cursor: not-allowed; background: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.meter { height: 4px; background: var(--fill); border-radius: 980px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 980px; transition: width .2s; }

/* segmented control — iOS */
.seg { display: inline-flex; padding: 2px; background: var(--fill); border-radius: 9px; gap: 0; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 7px; font-weight: 500; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); font-weight: 600; }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: #636366; } }
.tabs { display: flex; gap: 2px; padding: 2px; background: var(--fill); border-radius: 9px; overflow-x: auto; scrollbar-width: none; align-self: flex-start; max-width: 100%; }
.tabs button { border: 0; background: none; padding: 6px 16px; font-weight: 500; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; border-radius: 7px; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); font-weight: 600; }

/* switch — iOS green */
.switch { position: relative; display: inline-flex; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 980px; background: var(--fill-2); transition: background-color .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); transition: transform .2s cubic-bezier(.3, .7, .4, 1); }
.switch input:checked + span { background: var(--sys-green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(0, 125, 250, .6); outline-offset: 2px; }

/* tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); }
table.t { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.t th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: var(--fs-xs); padding: 12px 16px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; }
table.t td b { font-weight: 600; }
table.t tbody tr.clickable { cursor: pointer; }
table.t tbody tr.clickable:hover td { background: var(--surface-2); }
table.t .sub { display: block; font-size: var(--fs-xs); color: var(--ink-3); }

.kv { display: grid; grid-template-columns: minmax(92px, auto) minmax(0, 1fr); gap: 10px 20px; font-size: var(--fs-sm); margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }

/* stepper */
.steps { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 0; margin: 0; }
.steps li { list-style: none; display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-3); }
.steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fill); color: var(--ink-3); font-size: 11px; font-weight: 600; }
.steps { counter-reset: s; }
.steps li.done::before { content: "✓"; background: var(--sys-green); color: #fff; }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { background: var(--accent); color: #fff; }
.steps .sep { width: 20px; height: 1px; background: var(--line-2); }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 0 0 16px 24px; font-size: var(--fs-sm); }
.timeline li b { font-weight: 600; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); box-shadow: 0 0 0 3px var(--surface); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.on::before { background: var(--accent); }
.timeline li.ok::before { background: var(--sys-green); }
.timeline li.warn::before { background: var(--sys-orange); }
.timeline .t-time { color: var(--ink-3); font-size: var(--fs-xs); margin-top: 1px; }

/* public shell — apple.com global nav */
.pub { background: var(--surface); }
.pub-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); }
.pub-nav .wrap { display: flex; align-items: center; gap: 18px; min-height: 52px; }
.pub-nav nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.pub-nav nav a { padding: 6px 12px; color: var(--ink-2); font-size: var(--fs-xs); text-decoration: none; border-radius: 8px; }
.pub-nav nav a:hover { color: var(--ink); text-decoration: none; }
.pub-nav nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.pub-nav .icon-btn { width: 32px; height: 32px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9375rem; white-space: nowrap; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; border-radius: 7px; }
.brand small { display: block; font-size: .6875rem; font-weight: 400; color: var(--ink-3); line-height: 1.15; letter-spacing: 0; }
.pub-nav .brand small { display: none; }
.pub-main { padding-block: 0; }
.pub-main > .wrap { padding-block: 40px 72px; }
.pub-main > .wrap.bleed { max-width: none; padding: 0; }
.pub-foot { background: var(--bg); border-top: 1px solid var(--line); padding-block: 22px 28px; font-size: var(--fs-xs); color: var(--ink-3); }
.pub-foot .wrap { display: flex; flex-direction: column; gap: 12px; }
.pub-foot .foot-note { padding-bottom: 14px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.pub-foot .foot-row { display: flex; gap: 10px 24px; flex-wrap: wrap; justify-content: space-between; }
.pub-foot nav { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.pub-foot a { color: var(--ink-2); }
@media (max-width: 760px) { .pub-nav nav { display: none; } .pub-nav .hide-sm { display: none; } .pub-nav .brand small { display: none; } }

/* apple.com marketing */
.band { padding-block: 88px; }
.band.gray { background: var(--bg); }
.band.dark { background: #000; color: #F5F5F7; }
.band.dark h2, .band.dark h3 { color: #F5F5F7; }
.band .wrap { max-width: 1040px; }
@media (max-width: 760px) { .band { padding-block: 60px; } }
.ap-hero { text-align: center; padding-block: 76px 0; display: flex; flex-direction: column; align-items: center; }
.ap-eyebrow { font-size: 1.3125rem; font-weight: 600; color: var(--ink); letter-spacing: .005em; }
.ap-eyebrow .grad { background: linear-gradient(90deg, #0071E3, #8E44EF 60%, #D83A8C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ap-title { font-size: clamp(2.5rem, 7vw, 4.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin-top: 10px; }
.ap-sub { font-size: clamp(1.0625rem, 2.2vw, 1.5rem); line-height: 1.4; color: var(--ink-3); max-width: 30em; margin: 18px auto 0; font-weight: 400; }
.ap-cta { display: flex; gap: 26px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.ap-h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; text-align: center; }
.ap-h2 + .ap-sub { margin-top: 14px; }
.ap-stage {
  position: relative; width: 100%; max-width: 980px; margin: 56px auto 0; border-radius: 30px; padding: 56px 24px 0; overflow: hidden;
  background: radial-gradient(55% 70% at 25% 30%, var(--stage-a), transparent 70%), radial-gradient(50% 60% at 80% 70%, var(--stage-b), transparent 70%), var(--bg);
  display: flex; justify-content: center; align-items: flex-end; gap: 22px; min-height: 420px;
}
.sheet { width: min(380px, 100%); background: var(--surface); border-radius: 26px 26px 0 0; padding: 26px 24px 28px; box-shadow: var(--shadow-pop); text-align: left; position: relative; z-index: 1; }
.sheet .s-top { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sheet .s-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.125rem; background: linear-gradient(160deg, #1D1D1F, #48484A); }
.sheet .s-amount { font-size: 2.5rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 4px; }
.sheet .s-rows { display: flex; flex-direction: column; margin-top: 6px; }
.sheet .s-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: var(--fs-sm); border-bottom: 1px solid var(--line); }
.sheet .s-row:last-child { border-bottom: 0; }
.sheet .s-row span { color: var(--ink-3); }
.sheet .s-row b { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.notif { position: absolute; z-index: 2; width: min(330px, 80%); background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border-radius: 20px; padding: 13px 15px; box-shadow: var(--shadow-pop); display: flex; gap: 11px; align-items: center; text-align: left; font-size: var(--fs-sm); }
.notif .n-ic { width: 36px; height: 36px; border-radius: 9px; flex: none; display: grid; place-items: center; background: linear-gradient(160deg, #34C759, #248A3D); color: #fff; }
.notif b { display: block; font-weight: 600; }
.notif span { color: var(--ink-3); }
.ap-stage .notif.n1 { top: 34px; right: 7%; }
.ap-stage .notif.n2 { top: 150px; left: 6%; }
.ap-stage .notif.n2 .n-ic { background: linear-gradient(160deg, #5E5CE6, #3634A3); }
@media (max-width: 820px) { .ap-stage .notif { position: relative; inset: auto; width: 100%; margin-bottom: 12px; } .ap-stage { flex-direction: column; align-items: center; padding: 28px 16px 0; min-height: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
  .notif.n1 { animation: rise .9s .25s cubic-bezier(.2, .8, .2, 1) both; }
  .notif.n2 { animation: rise .9s .4s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
}
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.bento > * { grid-column: span 2; background: var(--surface); border-radius: 26px; padding: 30px; min-height: 230px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-width: 0; }
.band.gray .bento > * { background: var(--surface); }
.bento .w3 { grid-column: span 3; }
.bento .w6 { grid-column: span 6; min-height: 0; }
.bento .big { font-size: clamp(3rem, 7vw, 5rem); font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.bento .big.grad { background: linear-gradient(120deg, #0071E3, #8E44EF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bento .big.green { color: var(--sys-green); }
.bento h3 { font-size: 1.3125rem; line-height: 1.3; }
.bento p { color: var(--ink-3); font-size: var(--fs-md); }
.bento .ink-card { background: linear-gradient(160deg, #1D1D1F, #000); color: #F5F5F7; }
.bento .ink-card h3 { color: #F5F5F7; }
.bento .ink-card p { color: #A1A1A6; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bento > *, .bento .w3 { grid-column: span 1; } .bento .w6 { grid-column: span 2; } }
@media (max-width: 560px) { .bento { grid-template-columns: minmax(0, 1fr); } .bento > *, .bento .w3, .bento .w6 { grid-column: span 1; min-height: 0; } }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 48px; }
.steps3 .n { font-size: 3.5rem; font-weight: 700; color: var(--line-2); line-height: 1; letter-spacing: -.03em; }
.steps3 h3 { margin-top: 14px; }
.steps3 p { color: var(--ink-3); margin-top: 8px; font-size: var(--fs-md); line-height: 1.55; }
@media (max-width: 760px) { .steps3 { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.apps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.apps .app-i { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: var(--fs-sm); color: var(--ink-2); }
.apps .app-i i, .apps .app-i span.ai { width: 76px; height: 76px; border-radius: 22.5%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 1.25rem; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.apps .app-i small { color: var(--ink-3); font-size: var(--fs-xs); }
@media (max-width: 760px) { .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.center { text-align: center; }

/* legacy hero bits kept for other pages */
.section { padding-block: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head p { color: var(--ink-3); max-width: 40em; margin-top: 6px; }
.feature { display: flex; flex-direction: column; gap: 8px; }
.feature .f-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-soft-ink); }
.feature p { color: var(--ink-3); font-size: var(--fs-sm); }

/* auth — Apple ID style, centered */
.auth { display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 460px; margin: 0 auto; padding-block: 12px 24px; }
.auth-side { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.auth-side .auth-mark { width: 64px; height: 64px; border-radius: 16px; }
.auth-side h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 600; }
.auth-side p { color: var(--ink-3) !important; font-size: 1.0625rem; margin: 0 !important; }
.auth-side ul { display: none; }
.auth-card { width: 100%; padding: 28px; border-radius: 22px; }
.captcha { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); font-size: var(--fs-sm); color: var(--ink-3); }
.captcha .cbox { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; background: var(--surface); cursor: pointer; flex: none; padding: 0; }
.captcha.ok .cbox { background: var(--accent); border-color: var(--accent); color: #fff; }
.captcha.ok .cbox .ico { width: 14px; height: 14px; }

/* app shell — macOS sidebar */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--rail); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-right: 1px solid var(--line); padding: 18px 12px 16px max(12px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; scrollbar-width: none;
}
.rail .brand { padding: 4px 10px 8px; }
.rail-group { display: flex; flex-direction: column; gap: 1px; }
.rail-group .eyebrow { padding: 4px 10px; font-size: 11px; color: var(--rail-ink-2); }
.rail a.nav { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--rail-ink); text-decoration: none; font-size: var(--fs-sm); font-weight: 400; }
.rail a.nav .ico { width: 17px; height: 17px; color: var(--accent); stroke-width: 1.9; }
.rail a.nav:hover { background: var(--rail-hover); text-decoration: none; }
.rail a.nav[aria-current="page"] { background: var(--rail-active); font-weight: 600; }
.rail a.nav .count { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--rail-ink-2); background: transparent; padding: 0; }
.rail .rail-foot { margin-top: auto; }
.rail-balance { padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; display: flex; align-items: center; gap: 8px; min-height: 52px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line);
}
@media (min-width: 761px) { .topbar { padding-left: 32px; padding-right: 24px; } }
.topbar .menu-btn { display: none; }
.topbar .crumb { font-weight: 600; font-size: var(--fs-md); }
.topbar .crumb small { display: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #A1A1A6, #6E6E73); color: #fff; font-weight: 600; font-size: 12px; flex: none; }
.dot-badge { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #FF3B30; box-shadow: 0 0 0 2px var(--surface); }
.page { padding-block: 28px 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); width: 100%; max-width: 1180px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 761px) { .page { padding-left: 32px; padding-right: 32px; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 2.125rem; font-weight: 700; letter-spacing: -.02em; }
.page-head p { color: var(--ink-3); margin-top: 6px; max-width: 46em; font-size: var(--fs-md); }
.rail-backdrop { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-102%); transition: transform .25s cubic-bezier(.3, .7, .4, 1); box-shadow: var(--shadow-pop); padding-top: max(18px, env(safe-area-inset-top, 0px)); background: var(--surface); }
  .app.rail-open .rail { transform: none; }
  .rail-backdrop { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 35; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar .hide-sm { display: none; }
}

/* admin — same macOS sidebar, tinted badge */
.app.admin .rail .brand small { color: var(--accent); font-weight: 600; }
.admin-strip { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.admin-strip .ico { width: 14px; height: 14px; color: var(--sys-green); }
@media (min-width: 761px) { .admin-strip { padding-left: 32px; padding-right: 24px; } }
.admin-strip b { color: var(--ink); font-weight: 600; }

/* balance — graphite card */
.balance {
  position: relative; overflow: hidden; border-radius: 22px; padding: 26px 26px 24px; color: var(--card-ink);
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .16), transparent 46%), linear-gradient(150deg, var(--card-a), var(--card-b));
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45);
}
:root[data-theme="dark"] .balance { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .balance { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); } }
.balance .small { color: rgba(255, 255, 255, .72); font-weight: 500 !important; }
.balance .linkish { color: rgba(255, 255, 255, .8); }
.balance .amount { font-size: clamp(2.5rem, 5.4vw, 3.25rem); font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; color: #fff; }
.balance .amount small { font-size: .5em; font-weight: 500; margin-right: 3px; opacity: .8; }
.balance .parts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; font-size: var(--fs-sm); color: rgba(255, 255, 255, .62); }
.balance .parts b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.balance .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.balance .btn { background: rgba(255, 255, 255, .16); color: #fff; }
.balance .btn:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.balance .btn-primary { background: #fff; color: #1D1D1F; }
.balance .btn-primary:hover { background: #E8E8ED; color: #1D1D1F; }
.balance .ico { color: currentColor; }

/* list rows — inset grouped */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; text-decoration: none; color: inherit; }
.list-row:hover { text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--fill); color: var(--ink-2); flex: none; }
.list-row .lr-ico .ico { width: 17px; height: 17px; }
.list-row .lr-main { flex: 1; min-width: 0; display: block; }
.list-row .lr-main b { display: block; font-weight: 500; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-main span { display: block; font-size: var(--fs-xs); color: var(--ink-3); }
.list-row .lr-end { text-align: right; font-size: var(--fs-md); font-weight: 500; font-variant-numeric: tabular-nums; }
.list-row > .ico:last-child { color: var(--ink-3); opacity: .6; }

.todo { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.todo-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.todo-item:last-child { border-bottom: 0; }
.todo-item:hover { background: var(--fill); text-decoration: none; }
.todo-item b { font-weight: 500; }
.todo-item .tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; color: transparent; }
.todo-item .tick .ico { width: 14px; height: 14px; }
.todo-item.done .tick { background: var(--sys-green); border-color: var(--sys-green); color: #fff; }
.todo-item .ico:last-child { color: var(--ink-3); opacity: .6; }

/* option tiles — Apple Store configurator */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.opt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; color: var(--ink); }
.opt:hover { border-color: var(--ink-3); }
.opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt .ico { color: var(--accent); }
.opt .opt-big { font-size: 1.625rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: -.02em; }
.opt .opt-sub { font-size: var(--fs-xs); color: var(--ink-3); }

/* software rows — App Store style */
.soft { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 0; background: var(--surface); min-width: 0; box-shadow: var(--shadow); color: var(--ink); }
.soft b { font-weight: 600; }
.soft .s-logo { width: 46px; height: 46px; border-radius: 22.5%; display: grid; place-items: center; font-weight: 700; font-size: 1rem; flex: none; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); }
.soft p { font-size: var(--fs-sm); color: var(--ink-3); }
.soft .tag { background: var(--fill); color: var(--link); font-weight: 600; border-radius: 980px; padding: 4px 12px; }
.soft .s-foot { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.soft[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent) !important; background: var(--surface) !important; border-color: transparent !important; }
.s-logo { border-radius: 22.5%; }

.secret { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 14px; border-radius: var(--r-ctl); background: var(--fill); font-family: var(--font-mono); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.secret code { flex: 1; min-width: 0; }
.secret .btn { background: var(--surface); }

/* overlay */
.overlay { position: fixed; inset: 0; z-index: 60; background: var(--overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 18px; }
.modal.wide { width: min(700px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 1.3125rem; }
.modal-head p { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; }
.modal-head .icon-btn { background: var(--fill); width: 30px; height: 30px; border-radius: 50%; }
.modal-head .icon-btn .ico { width: 15px; height: 15px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.overlay.drawer-host { justify-content: flex-end; align-items: stretch; padding: 10px; }
.drawer { width: min(540px, 100%); height: 100%; overflow-y: auto; background: var(--surface); border-radius: 20px; padding: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) 28px 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-pop); }
@media (prefers-reduced-motion: no-preference) { .modal { animation: pop .22s cubic-bezier(.2, .8, .2, 1) both; } .drawer { animation: slide .28s cubic-bezier(.2, .8, .2, 1) both; } @keyframes pop { from { transform: scale(.96); opacity: 0; } } @keyframes slide { from { transform: translateX(30px); opacity: 0; } } }

.toasts { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--glass); color: var(--ink); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); padding: 10px 18px; border-radius: 980px; font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-pop); display: flex; gap: 8px; align-items: center; }
.toast .ico { color: var(--sys-green); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: drop .3s cubic-bezier(.2, .8, .2, 1) both; } @keyframes drop { from { transform: translateY(-12px); opacity: 0; } } }

/* prototype panel — macOS popover */
.proto-fab { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 70; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; min-height: 40px; border-radius: 980px; border: 0; background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; box-shadow: var(--shadow-pop); }
.proto-fab .pf-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #0071E3, #AF52DE); }
.proto-panel { position: fixed; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 70; width: min(370px, calc(100vw - 32px)); max-height: min(72vh, 640px); overflow-y: auto; background: var(--glass); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-pop); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.proto-panel h4 { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.proto-panel .pp-sec { display: flex; flex-direction: column; gap: 8px; }
.proto-panel .pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.proto-panel .pp-chips button { border: 0; background: var(--fill); border-radius: 980px; padding: 5px 11px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink); cursor: pointer; }
.proto-panel .pp-chips button:hover { background: var(--fill-2); }
.proto-panel .pp-chips button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.proto-panel select { min-height: 36px; font-size: var(--fs-sm); }

/* misc */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .e-ico { width: auto; height: auto; color: var(--ink-3); margin-bottom: 4px; opacity: .7; }
.empty .e-ico .ico, .empty .e-ico [data-lucide] { width: 44px; height: 44px; stroke-width: 1.4; }
.empty h3 { font-size: 1.3125rem; }
.empty p { color: var(--ink-3); max-width: 30em; font-size: var(--fs-md); }
.bar-track { height: 8px; border-radius: 980px; background: var(--fill); overflow: hidden; }
.bar-track > i { display: block; height: 100%; border-radius: 980px; background: var(--accent); }
.hbar { display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) minmax(84px, auto); gap: 14px; align-items: center; font-size: var(--fs-sm); }
.hbar .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .hbar { grid-template-columns: minmax(0, 1fr) minmax(70px, auto); } .hbar .bar-track { grid-column: 1 / -1; grid-row: 2; } }
.wf { display: flex; flex-direction: column; gap: 10px; }
.wf-row { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) minmax(80px, auto); gap: 14px; align-items: center; font-size: var(--fs-sm); }
.wf-row .wf-track { position: relative; height: 20px; }
.wf-row .wf-bar { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.wf-row .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.wf-row.total .wf-bar { background: var(--sys-green); }
.wf-row.plus .wf-bar { background: var(--accent); }
.wf-row.minus .wf-bar { background: var(--sys-orange); }
@media (max-width: 560px) { .wf-row { grid-template-columns: minmax(0, 1fr) auto; } .wf-row .wf-track { grid-column: 1 / -1; grid-row: 2; } }
.code-block { background: var(--fill); border-radius: var(--r-tile); padding: 14px 16px; font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.7; overflow-x: auto; white-space: pre; }
.note-internal { border: 1px dashed var(--warn) !important; background: var(--warn-soft) !important; }
.msg { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-radius: 18px; background: var(--fill); font-size: var(--fs-sm); max-width: 92%; border: 0; }
.msg.me { background: var(--accent); color: #fff; align-self: flex-end; }
.msg.me .m-meta, .msg.me .m-meta b { color: rgba(255, 255, 255, .8) !important; }
.msg .m-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 22px; text-align: center; color: var(--ink-3); font-size: var(--fs-sm); background: var(--surface-2); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-sm); }
.copy-id { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--fill); border: 0; border-radius: 6px; padding: 2px 7px; color: var(--ink-2); cursor: pointer; }
.copy-id:hover { color: var(--ink); background: var(--fill-2); }
.copy-id .ico, .copy-id [data-lucide] { width: 12px; height: 12px; }
details.dev { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
details.dev summary { cursor: pointer; padding: 12px 16px; font-weight: 500; font-size: var(--fs-sm); list-style: none; display: flex; align-items: center; gap: 8px; }
details.dev summary::-webkit-details-marker { display: none; }
details.dev[open] summary { border-bottom: 1px solid var(--line); }
details.dev .dev-body { padding: 16px; }
.pill-note { display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); }
.hl { background: var(--accent-soft); color: var(--accent-soft-ink); padding: 0 4px; border-radius: 4px; }
@media (max-width: 560px) {
  .btn { white-space: normal; text-align: center; height: auto; padding-block: 7px; }
  .card, .card-flat, .card-tint { padding: 18px; }
  .balance { padding: 22px; }
  .modal { padding: 22px; }
  .page-head h1 { font-size: 1.875rem; }
}
.brand-mark { display: inline-grid; place-items: center; background: linear-gradient(160deg, #48484A, #1D1D1F); color: #fff; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12); }
.brand-mark svg { width: 70%; height: 70%; }
.brand-mark.lg { width: 64px; height: 64px; border-radius: 16px; }
.avatar .ico { width: 16px; height: 16px; }
.admin-strip-inline { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-3); margin-right: 6px; }
.admin-strip-inline .ico { width: 14px; height: 14px; color: var(--sys-green); }
.rail .rail-foot a.nav { display: flex; }

.balance-num { font-size: 2.5rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--ink); }
.auth > p { color: var(--ink-3); }
.drawer .balance-num { font-size: 2.25rem; }
.pub-nav .grow { display: none; }
.pub-nav nav { flex: 1; justify-content: center; }
.bento > * { overflow: hidden; }
.bento .big.sm { font-size: clamp(2.25rem, 4.6vw, 3.75rem); letter-spacing: -.03em; }
@media (min-width: 961px) { .topbar .crumb { visibility: hidden; } }
@media (max-width: 820px) { .ap-stage .notif.n1, .ap-stage .notif.n2 { display: none; } .ap-stage { padding-top: 32px; } }
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .grid-3 > .card-flat { padding: 14px 12px; }
  .grid-3 .stat-value { font-size: 1.125rem; }
  .grid-4 .stat-value { font-size: 1.375rem; }
}

/* admin dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.kpi { padding: 20px 22px 16px; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .kv-v { font-size: 1.875rem; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; margin-top: 4px; line-height: 1.15; }
.kpi-d { font-size: var(--fs-xs); color: var(--ink-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.spark { display: block; width: 100%; height: 36px; margin-top: 12px; color: var(--accent); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(3) { border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--line); } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.qtile { background: var(--surface); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; color: inherit; text-decoration: none; transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.qtile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.qtile .qi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.qtile .qi .ico { width: 17px; height: 17px; }
.qtile .qn { font-size: 2rem; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qtile .ql { display: block; font-size: var(--fs-sm); font-weight: 500; }
.qtile .qs { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.chart { position: relative; height: 200px; padding-right: 44px; }
.bars { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; align-items: end; height: 100%; }
.bars .b { display: flex; flex-direction: column; height: var(--h); min-height: 2px; border-radius: 4px; overflow: hidden; background: var(--accent); }
.bars .b i { display: block; flex: none; background: #FF3B30; }
.bars .b.future { background: var(--fill); }
.grid-lines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.grid-lines span { display: block; border-top: 1px dashed var(--line); font-size: 11px; color: var(--ink-3); text-align: right; line-height: 0; padding-top: 0; }
.grid-lines span::after { content: ""; }
.grid-lines span { text-indent: 0; }
.bars-x { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; font-size: 11px; color: var(--ink-3); margin-top: 8px; padding-right: 44px; white-space: nowrap; }
.lg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin: 0 4px; }
.grid-lines span { position: relative; height: 0; }
.grid-lines em { position: absolute; right: 0; top: 0; transform: translateY(-50%); font-style: normal; line-height: 1; background: var(--surface); padding-left: 6px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.tiles .qtile { flex-direction: row; align-items: center; gap: 14px; }
.tiles .qtile .qn { margin-left: auto; order: 3; }

/* docs */
.docs { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 2px; }
.docs-nav button { border: 0; background: none; text-align: left; padding: 7px 12px; border-radius: 8px; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.docs-nav button:hover { background: var(--fill); color: var(--ink); }
.docs-body { max-width: 760px; display: flex; flex-direction: column; gap: 56px; min-width: 0; }
.docs-body section { scroll-margin-top: 76px; display: flex; flex-direction: column; gap: 14px; }
.docs-body h1 { font-size: clamp(2.25rem, 5vw, 3rem); letter-spacing: -.02em; }
.docs-body h2 { font-size: 1.75rem; letter-spacing: -.015em; }
.docs-body p { color: var(--ink-2); line-height: 1.7; font-size: 1rem; }
.docs-body .steps3 { margin-top: 8px; gap: 28px; }
.doc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: d; }
.doc-steps li { counter-increment: d; background: var(--surface); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--ink-3); }
.doc-steps li::before { content: counter(d); width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.doc-steps li b { color: var(--ink); font-weight: 600; font-size: var(--fs-md); }
.doc-list { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); line-height: 1.6; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-size: 1.25rem; line-height: 1; transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 16px; }
.codebox { border-radius: 14px; overflow: hidden; background: #1D1D1F; color: #F5F5F7; margin-top: 4px; }
.codebox-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 16px; font-size: var(--fs-xs); color: #A1A1A6; border-bottom: 1px solid #2C2C2E; }
.codebox-bar .btn { background: rgba(255, 255, 255, .12); color: #F5F5F7; }
.codebox-bar .btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.codebox pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: .8125rem; line-height: 1.7; }
@media (max-width: 900px) { .docs { grid-template-columns: minmax(0, 1fr); gap: 20px; } .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; } .doc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* status */
.status-hero { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); font-size: 1.1875rem; }
.status-hero .ico { width: 26px; height: 26px; color: var(--c); }
.status-hero b { font-weight: 600; }
.st-row { display: flex; flex-direction: column; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.st-row:last-child { border-bottom: 0; }
.st-row b { font-weight: 500; }
.uptime { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 28px; }
.uptime i { display: block; border-radius: 2px; }
@media (max-width: 560px) { .uptime { gap: 1px; } }

/* playground */
.chat-wrap { display: flex; flex-direction: column; gap: 14px; height: calc(100vh - 52px - 124px - env(safe-area-inset-top, 0px)); min-height: 460px; max-width: 860px; width: 100%; margin: 0 auto; }
.chat-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chat-top h1 { font-size: 2.125rem; font-weight: 700; letter-spacing: -.02em; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; }
.chat-log .msg { max-width: 82%; }
.chat-log .msg:not(.me) { background: var(--surface); box-shadow: var(--shadow); }
.chat-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.chat-composer { position: relative; display: flex; align-items: flex-end; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-pop); padding: 6px 6px 6px 16px; }
.chat-composer .textarea { border: 0; box-shadow: none; min-height: 40px; max-height: 160px; resize: none; padding: 9px 0; background: transparent; }
.chat-composer .textarea:focus { box-shadow: none; }
.send-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; margin-left: 8px; }
.send-btn:hover { background: var(--accent-hover); }

/* range */
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* doc center */
.docs-nav { gap: 18px; }
.dn-group { display: flex; flex-direction: column; gap: 1px; }
.dn-group .eyebrow { padding: 0 12px 4px; }
.docs-nav button[aria-current="page"] { background: var(--fill); color: var(--ink); font-weight: 600; }
.docs-select { display: none; }
.docs-body > header { display: flex; flex-direction: column; gap: 6px; }
.docs-body > section { gap: 18px; }
.docs-body > section > h2 { margin-top: 18px; font-size: 1.375rem; }
.docs-body .lead { font-size: 1.125rem; color: var(--ink-2); }
.doc-ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); line-height: 1.65; }
.doc-ol li::marker { color: var(--accent); font-weight: 600; }
.doc-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: 16px; background: var(--accent-soft); flex-wrap: wrap; }
.doc-callout b { display: block; font-weight: 600; }
.doc-callout span { font-size: var(--fs-sm); color: var(--ink-2); }
.doc-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.doc-paths .qtile { border: 0; cursor: pointer; font: inherit; text-align: left; flex-direction: row; align-items: center; color: var(--ink); }
.doc-paths .qtile > .ico { width: 22px; height: 22px; color: var(--accent); flex: none; }
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; }
.doc-pager button { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; color: var(--link); text-align: left; padding: 0; }
.doc-pager b { font-weight: 500; }
@media (max-width: 900px) { .docs-nav { display: none; } .docs-select { display: block; } .doc-paths { grid-template-columns: minmax(0, 1fr); } }
.docs-body .mono { overflow-wrap: anywhere; }
.docs-body .doc-ol li, .docs-body p { min-width: 0; overflow-wrap: anywhere; }
.soft-list { overflow: hidden; }
.soft-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 16px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); border-bottom: 1px solid var(--line); }
.soft-row:last-child { border-bottom: 0; }
.soft-row:hover { background: var(--surface-2); }
.soft-row[aria-pressed="true"] { background: var(--accent-soft); }
.soft-row b { font-weight: 500; }
.soft-row > .ico:last-child { color: var(--ink-3); opacity: .5; }
