:root {
  color-scheme: light;
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #141413;
  --muted: #6b6a66;
  --soft: #8d8b85;
  --line: #e6e4de;
  --nav: #ecebe6;
  --chip: #f0efea;
  --accent: #141413;
  --accent-ink: #ffffff;
  --good: #1b7a45;
  --warn: #8a5a12;
  --bad: #b3261e;
  --link: #2b5aa8;
  --sans: -apple-system, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --rail: 56px;
  --drawer: 264px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1a18;
  --surface: #232321;
  --ink: #f2f1ec;
  --muted: #b3b1aa;
  --soft: #8f8d86;
  --line: #34332f;
  --nav: #2e2d2a;
  --chip: #2e2d2a;
  --accent: #f2f1ec;
  --accent-ink: #141413;
  --good: #7dcea0;
  --warn: #e2b15a;
  --bad: #f0a0a0;
  --link: #9dbbf0;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
i[data-icon] { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: 0 0 18px; font-style: normal; }
i[data-icon] svg { width: 18px; height: 18px; display: block; }

/* Narrow icon rail (mobile and tablet) */
.rail {
  position: fixed; inset: 0 auto 0 0; z-index: 5; width: var(--rail);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 0 14px; background: var(--bg); border-right: 1px solid var(--line);
}
.rail-btn, .rail-mark, .rail-avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted); padding: 0;
}
.rail-btn:hover, .rail-btn.active { background: var(--nav); color: var(--ink); }
.rail-mark { width: 36px; height: 36px; margin: 4px 0 6px; border: 0; background: transparent; overflow: hidden; }
.rail-mark img, .brand-logo, .acct-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rail-foot { margin-top: auto; display: grid; justify-items: center; gap: 6px; }
.rail-avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--nav); color: var(--ink); font-size: 12px; font-weight: 650; letter-spacing: .02em; }

/* Expanded sidebar */
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 7; width: min(248px, 76vw);
  display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--line);
  padding: 16px 12px 12px; transform: translateX(-102%); transition: transform .2s ease; overflow: hidden;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; margin: 0 2px 14px 6px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--serif); font-size: 20px; letter-spacing: -0.01em; font-weight: 500; }
.brand-logo { width: 28px; height: 28px; flex: 0 0 28px; }
  .workspace {
  display: flex; align-items: center; flex: 0 0 auto; gap: 8px; height: 34px; padding: 0 10px; margin-bottom: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 8px; background: transparent; font-size: 14px;
}
.workspace i { color: #7b5cd6; }
  .search {
  display: flex; align-items: center; flex: 0 0 auto; gap: 8px; width: 100%; height: 36px; margin: 0; padding: 0 8px 0 12px;
  border: 1px solid transparent; border-radius: 8px; background: var(--chip); color: var(--soft); text-align: left;
  font: inherit; cursor: pointer; appearance: none; outline: none;
}
.search:hover, .search:focus-visible { border-color: #d5d3cc; background: #fff; }
html[data-theme="dark"] .search:hover, html[data-theme="dark"] .search:focus-visible { border-color: #4a4944; background: var(--surface); }
.search i { color: var(--ink); }
.search span { flex: 1; min-width: 0; font-size: 14px; color: var(--soft); }
.search kbd { font-family: var(--sans); font-size: 11px; line-height: 1; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; color: var(--muted); background: var(--chip); }
@media (max-width: 1023px) { .search kbd { display: none; } }
nav {
  display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; gap: 2px; margin-top: 8px;
  padding: 0 0 20px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 32px; min-height: 32px; margin: 0; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: #3d3c38;
  font-size: 14px; font-weight: 500; letter-spacing: -0.011em; line-height: 1;
}
.nav-item span { font-size: 14px; font-weight: 500; line-height: 1; }
html[data-theme="dark"] .nav-item { color: #e4e2db; }
.nav-item i { display: grid; place-items: center; align-self: center; width: 16px; height: 16px; flex: 0 0 16px; color: #4e4d48; }
.nav-item i svg { width: 16px; height: 16px; display: block; }
html[data-theme="dark"] .nav-item i { color: #c9c7bf; }
.nav-item:hover { background: rgba(20, 20, 19, 0.045); }
.nav-item:active { background: rgba(20, 20, 19, 0.07); }
html[data-theme="dark"] .nav-item:hover { background: rgba(255, 255, 255, 0.05); }
html[data-theme="dark"] .nav-item:active { background: rgba(255, 255, 255, 0.08); }
.nav-item.active { background: #ecebe6; color: #1c1c1a; font-weight: 500; }
.nav-item.active span { font-weight: 500; color: inherit; }
html[data-theme="dark"] .nav-item.active { background: #2e2d2a; color: #f2f1ec; }
.nav-item.active i { color: #2c2b28; }
html[data-theme="dark"] .nav-item.active i { color: #f2f1ec; }
.nav-item.static { cursor: default; }
.nav-item.static:hover, .nav-item.static:active { background: transparent; }
.nav-item em { margin-left: auto; font-style: normal; font-size: 12.5px; font-weight: 600; color: #5c5b56; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .nav-item em { color: #d4d2cb; }
.drawer-utility {
  display: flex; flex: 0 0 auto; flex-direction: column; gap: 1px; margin-top: auto;
  padding: 14px 4px 0; border-top: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.drawer-utility a {
  display: flex; align-items: center; min-height: 28px; padding: 0 8px; border-radius: 7px;
  color: #6f6e69; font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em;
}
html[data-theme="dark"] .drawer-utility a { color: #b7b5ae; }
.drawer-utility a:hover { background: rgba(20, 20, 19, 0.04); color: #3d3c38; }
html[data-theme="dark"] .drawer-utility a:hover { background: rgba(255, 255, 255, 0.05); color: #f2f1ec; }
.drawer-utility .utility-status { justify-content: space-between; gap: 8px; }
.drawer-utility .utility-state { display: inline-flex; align-items: center; gap: 6px; color: #8a8984; font-weight: 500; }
.drawer-utility .utility-state i { width: 6px; height: 6px; border-radius: 99px; background: #8d8b85; }
.drawer-utility .utility-state b { font-weight: 500; }
.drawer-utility .utility-status.good .utility-state i { background: #6d8b74; }
.drawer-utility .utility-status.bad .utility-state i { background: #a07a76; }
.drawer-utility .utility-meta { display: grid; gap: 2px; margin: 10px 8px 2px; color: #9b998f; font-size: 11.5px; line-height: 1.35; letter-spacing: -0.01em; }
html[data-theme="dark"] .drawer-utility .utility-meta { color: #8f8d86; }
.tester-head h1 { margin: 0 0 6px; font-size: 28px; font-weight: 560; letter-spacing: -0.03em; }
.tester-head p { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }
.tester { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tester-form, .tester-result { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px; }
.tester-result h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.tester-form label { display: grid; gap: 6px; margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 550; }
.tester-form input, .tester-form select, .tester-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); padding: 10px 12px; font: inherit; font-size: 14px; }
.tester-form textarea { min-height: 96px; resize: vertical; }
.tester-run { height: 40px; border: 0; border-radius: 10px; background: var(--ink); color: var(--accent-ink); padding: 0 16px; font-weight: 600; }
.tester-run:disabled { opacity: 0.6; }
.tester-empty { margin: 0; color: var(--muted); font-size: 14px; }
.tester-rows { display: grid; }
.tester-row { display: grid; grid-template-columns: minmax(108px, 42%) minmax(0, 1fr); gap: 12px; align-items: center; min-height: 36px; border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); font-size: 14px; }
.tester-row:last-child { border-bottom: 0; }
.tester-row span { color: var(--muted); }
.tester-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.tester-row.bad b { color: var(--bad); }
.tester-trial { display: grid; gap: 4px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.tester-trial p { display: flex; justify-content: space-between; gap: 12px; margin: 0; color: var(--muted); font-size: 13px; }
.tester-trial b { color: var(--ink); font-weight: 600; }
@media (max-width: 800px) {
  .tester { grid-template-columns: 1fr; }
  .tester-run { width: 100%; }
  .tester-head h1 { font-size: 24px; }
}
.account-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px; margin-top: 4px; border: 0; background: transparent; border-radius: 9px; text-align: left; }
.account-row:hover { background: var(--nav); }
.acct-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; background: transparent; overflow: hidden; }
.acct-text b { display: block; font-size: 14px; font-weight: 600; }
.acct-text small { display: block; font-size: 12px; color: var(--muted); }
[data-hidden-by-search] { display: none !important; }

.launch { position: fixed; inset: 0; z-index: 40; display: grid; align-content: center; justify-items: center; gap: 14px; background: #faf9f6; }
html[data-theme="dark"] .launch { background: var(--bg); }
.launch img { width: 88px; height: 88px; object-fit: contain; }
.launch p { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--ink); }
.account-brand { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.account-brand img { width: 28px; height: 28px; object-fit: contain; }
.backdrop { position: fixed; inset: 0; background: rgba(20,20,19,.32); z-index: 6; }
.backdrop[hidden] { display: none; }

/* Main */
.main { min-width: 0; margin-left: var(--rail); min-height: 100vh; display: flex; flex-direction: column; position: relative; }
main#view { width: min(760px, calc(100% - 20px)); margin: 0 auto; padding: 18px 0 20px; flex: 1; }
main#view.wide { width: min(1080px, calc(100% - 20px)); }
.page-title { margin: 6px 0 14px; font-family: var(--serif); font-weight: 500; font-size: 28px; letter-spacing: -0.01em; line-height: 1.15; }
.greeting { margin: 8px 0 14px; font-family: var(--serif); font-weight: 500; font-size: 27px; letter-spacing: -0.01em; line-height: 1.2; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink);
  font-size: 15px; white-space: nowrap;
}
.btn.icon-only { width: 36px; padding: 0; justify-content: center; }
.btn.dark { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { height: 36px; font-size: 15px; padding: 0 12px; }
.btn svg { flex: 0 0 auto; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 18px 20px; margin-bottom: 12px;
}
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile-title { display: flex; align-items: center; gap: 7px; margin: 0; min-height: 30px; font-size: 15.5px; font-weight: 400; color: var(--muted); }
.tile-title .info { color: var(--soft); }
.tile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.tile-row.tight { margin-top: 10px; }
.big { display: block; font-size: 32px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big.muted { color: var(--soft); }
.dash-line { display: block; width: 30px; height: 3px; border-radius: 2px; background: var(--soft); margin: 14px 0 20px; }
.sub-text { display: block; margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.u-link { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); font-size: 14px; }
.pill-gray { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 7px; background: var(--chip); color: var(--ink); font-size: 14px; }
.ring { width: 56px; height: 56px; flex: 0 0 56px; }
.ring circle { fill: none; stroke-width: 3.5; }
.ring .track { stroke: color-mix(in srgb, var(--soft) 55%, var(--line)); }
.ring .fill { stroke: var(--ink); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.bars7 { display: flex; align-items: flex-end; gap: 4px; height: 36px; margin-top: 8px; }
.bars7 i { display: block; width: 10px; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--ink); opacity: .8; }
.bars7 i.zero { background: var(--line); opacity: 1; }
.dash-grid { display: grid; grid-template-columns: 1fr; }
.section-row { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.section-row h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.link-blue { color: var(--link); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
.model-card { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; padding: 16px 16px 14px 18px; min-width: 0; }
.model-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 10px; }
.model-icon svg { width: 26px; height: 26px; }
.model-copy { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; }
.model-name { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; min-height: 22px; font-size: 16px; font-weight: 600; line-height: 22px; }
.new { display: inline-flex; height: 22px; align-items: center; padding: 0 7px; border-radius: 6px; background: #e3ecfb; color: #2b5aa8; font-size: 12.5px; font-weight: 600; }
html[data-theme="dark"] .new { background: #26344d; color: #b8cdf2; }
.beta { display: inline-flex; height: 22px; align-items: center; padding: 0 7px; border-radius: 6px; background: #e3ecfb; color: #2b5aa8; font-size: 12.5px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; justify-content: flex-start; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border-radius: 6px; background: var(--chip); color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1; border: 0; white-space: nowrap; }
.model-card .chips { width: 100%; margin: 0; gap: 6px; }
.model-card .chip { flex: 0 0 auto; max-width: 100%; height: 26px; padding: 0 6px; border-radius: 6px; background: var(--chip); color: var(--muted); font-size: 13px; font-weight: 500; }
.models-head { margin: 0 0 12px; }
.models-head .page-title { margin: 0; }
.models-page .lede { max-width: 36rem; margin: 0; line-height: 1.45; color: var(--muted); font-size: 13.5px; }
.models-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.models-summary div { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px 12px; min-width: 0; }
.models-summary span { display: block; color: var(--soft); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.3; }
.models-summary strong { display: block; margin-top: 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.models-tools { display: grid; gap: 8px; margin: 0 0 12px; }
.models-tools input { width: 100%; height: 40px; }
.model-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.model-filters button { height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.model-filters button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.catalog-grid { display: grid; gap: 10px; }
.catalog-card { display: block; width: 100%; min-width: 0; border: 1px solid color-mix(in srgb, var(--line) 62%, var(--surface)); border-radius: 16px; background: var(--surface); padding: 12px 14px 10px; cursor: default; }
.catalog-card.premium { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent); }
.catalog-card.premium h2 { font-size: 17px; }
.catalog-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.models-page .badge, .detail-status .badge { flex: 0 0 auto; }
.catalog-card h2 { margin: 0; min-width: 0; font-size: 16.5px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.catalog-card:hover { border-color: color-mix(in srgb, var(--ink) 16%, var(--line)); }
.models-page .badge, .detail-status .badge { height: 22px; padding: 0 7px; font-size: 12px; font-weight: 500; background: color-mix(in srgb, var(--good) 7%, var(--surface)); }
.models-page .badge::before, .detail-status .badge::before { width: 6px; height: 6px; }
.models-page .badge.good, .detail-status .badge.good { color: var(--good); background: color-mix(in srgb, var(--good) 7%, var(--surface)); border-color: color-mix(in srgb, var(--good) 18%, var(--line)); }
.models-page .badge.warn, .detail-status .badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 18%, var(--line)); }
.models-page .badge.bad, .detail-status .badge.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 7%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 18%, var(--line)); }
.m-caps { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; }
.m-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 0; border-radius: 5px; background: #f4f3ef; color: #6d6c67; font-size: 12px; font-weight: 450; line-height: 1; box-shadow: none; }
html[data-theme="dark"] .m-chip { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); color: var(--muted); }
.m-meta { color: var(--muted); font-size: 13px; }
.catalog-row, .catalog-foot, .catalog-id { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.catalog-row { padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--line) 58%, var(--surface)); font-size: 13px; }
.catalog-row span, .catalog-foot span, .catalog-id span { color: var(--soft); font-size: 12.5px; font-weight: 500; }
.catalog-row b, .catalog-foot b { color: var(--ink); font-weight: 600; text-align: right; white-space: nowrap; }
.catalog-row b.stack { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: normal; line-height: 1.25; }
.catalog-row b.stack small { color: var(--soft); font-size: 11px; font-weight: 500; }
.catalog-foot { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; }
.model-history { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.catalog-open { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 30px; margin-top: 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--line) 65%, var(--surface)); background: color-mix(in srgb, var(--bg) 70%, var(--surface)); color: var(--muted); font-size: 12.5px; font-weight: 500; }
.catalog-open:hover { background: var(--chip); color: var(--ink); }
.detail-status { margin: 12px 0 10px; }
.catalog-id { margin: 8px 0 0; color: var(--soft); font-size: 12px; }
.catalog-id code { font-family: var(--mono); font-size: 11.5px; text-align: right; overflow-wrap: anywhere; }
.catalog-state::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 99px; background: var(--soft); vertical-align: 1px; }
.catalog-state.available::before { background: var(--good); }
.catalog-state.degraded::before { background: var(--warn); }
.catalog-state.unavailable::before, .catalog-state.request_error::before, .catalog-state.offline::before { background: var(--bad); }
.catalog-state.rate_limited::before, .catalog-state.disabled::before { background: var(--warn); }
.catalog-empty { margin: 8px 0 0; }
@media (min-width: 1024px) {
  .catalog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .models-summary { grid-template-columns: 1fr 1fr; }
}
.res-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.res-text { margin: 0 0 12px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.btn.res { height: 32px; padding: 0 10px; border-radius: 8px; font-size: 15px; }
.pill-gray { white-space: nowrap; flex: 0 0 auto; }
.main { overflow-x: clip; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; width: min(1080px, calc(100% - 28px)); margin: 28px auto 0; padding: 8px 0 18px; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.foot a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 8px; color: var(--muted); font-size: 13px; text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.status::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 99px; background: var(--soft); margin-right: 6px; vertical-align: middle; }
.status.good::before { background: var(--good); }
.status.bad::before { background: var(--bad); }

/* Shared page components */
.lede, .note { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.metrics, .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metrics.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.metric span, .label { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.metric strong { display: block; margin-top: 6px; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; line-height: 1.15; }
.metric small, .card small { display: block; margin-top: 5px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.section { margin-top: 16px; }
.section h2, .card h2 { margin: 0 0 10px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.filters, .toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 14px; }
textarea { width: 100%; min-height: 148px; resize: vertical; }
.form select, .form input:not([type="checkbox"]), .form textarea { width: 100%; }
.check input { width: auto; flex: 0 0 auto; }
.ghost, .primary { border-radius: 9px; border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; font-size: 14px; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ghost:disabled, .primary:disabled { opacity: 0.45; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 5px 10px; color: var(--muted); font-size: 13px; }
.seg button.active { background: var(--ink); color: var(--bg); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 9px 12px; font-size: 13.5px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--chip); }
.badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; font-size: 12px; background: var(--surface); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--soft); }
.badge.good::before, .badge.live::before { background: var(--good); }
.badge.bad::before { background: var(--bad); }
.badge.warn::before { background: var(--warn); }
.route { display: grid; gap: 6px; }
.route div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; min-width: 0; }
.route span { color: var(--muted); }
.route strong { overflow-wrap: anywhere; text-align: right; }
.progress { height: 8px; border-radius: 99px; background: var(--chip); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--ink); width: 0; }
.lyra-page { max-width: 720px; margin: 0 auto; display: grid; gap: 12px; }
.lyra-hero { margin: 0; }
.lyra-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lyra-hero h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; letter-spacing: -0.03em; line-height: 1.1; }
.lyra-run { margin: 14px 0 0; }
.lyra-run span { display: block; color: var(--soft); font-size: 12px; font-weight: 600; }
.lyra-run strong { display: block; margin-top: 2px; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.lyra-page .lyra-note { margin: 8px 0 0; max-width: 36rem; color: var(--muted); font-size: 14px; line-height: 1.45; }
.lyra-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lyra-actions a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; }
.lyra-actions .primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.lyra-actions .ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.admin-page { max-width: 860px; }
.admin-provider { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.admin-provider header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-provider header span { color: var(--muted); font-size: 13px; font-weight: 600; }
.admin-log { display: grid; }
.admin-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 36px; border-top: 1px solid var(--line); font-size: 13px; }
.admin-line time { color: var(--muted); white-space: nowrap; }
.admin-line span { min-width: 0; overflow-wrap: anywhere; }
.admin-line b { font-weight: 600; white-space: nowrap; }
.lyra-page .chips { margin-top: 12px; gap: 8px; }
.lyra-page .chip { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 500; }
.lyra-page .badge { height: 26px; padding: 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; background: var(--surface); }
.lyra-page .badge.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.lyra-page .badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.lyra-page .badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.lyra-page .card { border-radius: 16px; padding: 14px 14px 8px; }
.lyra-page h2, .lyra-block h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.lyra-pairs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.lyra-pairs div { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.lyra-pairs div:nth-child(-n+2) { border-top: 0; }
.lyra-pairs span { min-width: 0; color: var(--muted); font-size: 13px; line-height: 1.3; }
.lyra-pairs strong { flex: none; color: var(--ink); font-size: 13.5px; font-weight: 600; text-align: right; white-space: nowrap; }
.lyra-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lyra-metrics div { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 12px; }
.lyra-metrics span { display: block; color: var(--soft); font-size: 12px; font-weight: 600; }
.lyra-metrics strong { display: block; margin-top: 6px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.lyra-progress-label { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.lyra-id { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 4px; }
.lyra-id span { color: var(--muted); font-size: 13px; }
.lyra-page .progress { height: 6px; margin: 12px 0 0; }
.lyra-page .progress i { border-radius: 99px; }
.lyra-page .task-id-btn { max-width: 70%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .lyra-pairs { grid-template-columns: 1fr; }
  .lyra-pairs div:nth-child(-n+2) { border-top: 1px solid var(--line); }
  .lyra-pairs div:first-child { border-top: 0; }
}
.tasks-head { margin: 2px 0 14px; }
.tasks-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; line-height: 1.12; }
.tasks-head p { margin: 6px 0 0; max-width: 36rem; color: var(--muted); font-size: 14px; line-height: 1.45; }
.tasks-page .task-live { padding: 14px 14px 12px; border-radius: 14px; }
.task-live-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.task-live-idrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; min-width: 0; }
.task-id-btn { min-width: 0; max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-id-btn[data-copied="1"] { color: var(--good); }
.task-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; margin-top: 12px; }
.task-metrics div { min-width: 0; }
.task-metrics span { display: block; color: var(--soft); font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.2; }
.task-metrics strong { display: block; margin-top: 2px; color: var(--ink); font-size: 14.5px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tasks-page .task-live .progress { height: 4px; margin: 12px 0 0; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, var(--chip)); }
.tasks-page .task-live .progress i { border-radius: 99px; background: var(--ink); }
.task-elapsed-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.tasks-history { margin-top: 18px; }
.tasks-history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.tasks-history-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.tasks-history-head p { margin: 0; color: var(--soft); font-size: 12.5px; }
.task-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.task-filters button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; }
.task-filters button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.task-list { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.task-hist + .task-hist { border-top: 1px solid var(--line); }
.task-hist summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.task-hist summary::-webkit-details-marker { display: none; }
.task-sum { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 6px; }
.task-sum span { min-width: 0; }
.task-sum em { display: block; color: var(--soft); font-size: 11px; font-style: normal; font-weight: 600; line-height: 1.2; }
.task-sum b { display: block; margin-top: 1px; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-view { grid-column: 1 / -1; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.task-hist[open] .task-view { color: var(--ink); }
.task-state { display: inline-flex; align-items: center; flex: 0 0 auto; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; line-height: 1; white-space: nowrap; }
.task-state::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; margin-right: 6px; flex: 0 0 6px; }
.task-state.progress { color: #8a5a12; background: #f8f1e4; border-color: #eadcc4; }
.task-state.complete { color: #1b7a45; background: #e8f5ee; border-color: #cfe6d8; }
.task-state.blocked { color: #9d2c28; background: #fbeceb; border-color: #f0d4d2; }
.task-state.paused { color: #5c5b57; background: #f3f2ee; border-color: #e4e2dc; }
.task-state.stopped { color: #3f3e3b; background: #ecebe6; border-color: #dddcd6; }
html[data-theme="dark"] .task-state.progress { color: #e2b15a; background: #3a3122; border-color: #5a4a30; }
html[data-theme="dark"] .task-state.complete { color: #7dcea0; background: #1d3328; border-color: #2d4a38; }
html[data-theme="dark"] .task-state.blocked { color: #f0a0a0; background: #3a2424; border-color: #5a3434; }
html[data-theme="dark"] .task-state.paused { color: #b3b1aa; background: #2e2d2a; border-color: #3d3c38; }
html[data-theme="dark"] .task-state.stopped { color: #c8c6bf; background: #2a2926; border-color: #3d3c38; }
.task-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 2px 12px 12px; }
.task-detail span { display: block; color: var(--soft); font-size: 11px; font-weight: 600; }
.task-detail b { display: block; margin-top: 1px; color: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.task-show-more { width: 100%; height: 36px; margin-top: 8px; }
@media (min-width: 900px) {
  .task-hist summary { grid-template-columns: minmax(148px, 180px) auto minmax(0, 1fr) auto; padding: 9px 14px; }
  .task-sum { grid-column: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; gap: 8px 16px; }
  .task-view { grid-column: auto; margin-top: 0; white-space: nowrap; }
}
.usage-head { margin: 2px 0 16px; }
.usage-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; line-height: 1.12; }
.usage-head p { margin: 6px 0 0; max-width: 40rem; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.usage-page .strip { border-radius: 16px; box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.usage-page .strip > div { padding: 14px 16px 13px; }
.usage-page .strip span { font-size: 12.5px; font-weight: 500; color: var(--soft); }
.usage-page .strip strong { margin-top: 6px; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.usage-page .section-head { margin: 18px 0 12px; }
.usage-page .section-head h2 { font-size: 16px; letter-spacing: -0.02em; }
.usage-page .seg { padding: 2px; border-radius: 10px; background: var(--chip); border-color: transparent; }
.usage-page .seg button { min-height: 30px; padding: 4px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.usage-page .seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent); }
.perf-strip { display: grid; grid-template-columns: 1.25fr 1fr 1fr; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--bg) 70%, var(--surface)); }
.perf-strip > div { min-width: 0; padding: 12px 14px 11px; }
.perf-strip > div + div { border-left: 1px solid var(--line); }
.perf-strip span { display: block; color: var(--soft); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.perf-strip strong { display: block; margin-top: 6px; font-size: 20px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.perf-strip strong em { margin-right: 6px; color: var(--muted); font-size: 13px; font-style: normal; font-weight: 500; letter-spacing: 0; }
.perf-strip small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.usage-page .charts { grid-template-columns: 1fr; gap: 12px; }
.usage-page .charts > div, .use-card { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 16px 16px 14px; box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.usage-page .charts h3, .use-card h2 { margin: 0 0 12px; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.usage-page .plot-body { grid-template-columns: 44px minmax(0, 1fr); }
.usage-page .y-axis, .usage-page .plot-canvas { height: 156px; }
.usage-page .y-axis { color: var(--soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.usage-page .x-axis, .usage-page .legend { margin-left: 50px; }
.usage-page .x-axis { height: 18px; font-variant-numeric: tabular-nums; }
.usage-page .plot-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
.usage-page .tchart .area { opacity: 0.07; }
.usage-page .tchart .ref-95 { stroke-dasharray: 1 3; }
.legend i.dashed.far { border-top-style: dotted; }
.use-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.use-card-top h2 { margin: 0; }
.use-flag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.use-speed-main { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 8px 28px; align-items: start; }
.use-speed-main strong { display: block; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; cursor: help; }
.use-speed-main p, .use-quiet { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.use-speed-main .btn { margin-top: 12px; }
.use-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 18px; }
.use-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.use-kv-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.use-kv dt { color: var(--soft); font-size: 12px; font-weight: 600; }
.use-kv dd { margin: 6px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.use-mix { display: flex; height: 6px; margin-top: 14px; border-radius: 99px; overflow: hidden; background: var(--chip); }
.use-mix i { background: var(--ink); }
.use-mix b { background: color-mix(in srgb, var(--ink) 32%, var(--chip)); }
.use-mix-key { display: flex; align-items: center; gap: 14px; margin: 8px 0 0; color: var(--soft); font-size: 12px; }
.use-mix-key i, .use-mix-key b { display: inline-block; width: 12px; height: 6px; margin-right: 6px; border-radius: 99px; }
.use-mix-key i { background: var(--ink); }
.use-mix-key b { background: color-mix(in srgb, var(--ink) 32%, var(--line)); }
.use-filter { margin: 4px 0 14px; }
.use-filter-toggle { display: none; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; }
.use-filter-form { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px 12px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.use-filter-form label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.use-filter-form input { width: 100%; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--bg); font-size: 14px; font-weight: 500; color: var(--ink); }
.use-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; }
.use-filter-form .primary { height: 38px; padding: 0 16px; }
.usage-page .use-metrics { grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.usage-page .use-metrics .metric { min-height: 78px; padding: 12px 14px; border-radius: 14px; box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.usage-page .use-metrics .metric span { text-transform: none; letter-spacing: 0.01em; font-size: 12px; font-weight: 600; color: var(--soft); }
.usage-page .use-metrics .metric strong { margin-top: 8px; font-size: 20px; letter-spacing: -0.03em; }
.use-lower { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
.use-rank { display: grid; gap: 14px; }
.use-rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.use-rank-top b { min-width: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.use-rank-top span { flex: 0 0 auto; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.use-track { height: 6px; margin-top: 7px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.use-track i { display: block; height: 100%; border-radius: 99px; background: var(--ink); }
.use-more { margin-top: 4px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.use-unused { display: grid; gap: 10px; margin-top: 10px; }
.use-unused[hidden] { display: none; }
.use-unused .use-rank-top b, .use-unused .use-rank-top span { color: var(--soft); font-weight: 500; }
.use-empty { margin: 0; color: var(--muted); font-size: 14px; }
.use-ok { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.use-ok p { margin: 0; font-size: 14.5px; font-weight: 600; }
.use-ok p::before { content: "✓"; margin-right: 8px; color: var(--good); }
.use-ok span { color: var(--muted); font-size: 13px; line-height: 1.45; }
@media (max-width: 860px) {
  .use-filter-toggle { display: inline-flex; }
  .use-filter-form { display: none; grid-template-columns: 1fr; }
  .use-filter-form.open { display: grid; margin-top: 8px; }
  .use-filter-form .primary { width: 100%; }
}
@media (max-width: 720px) {
  .use-speed-main, .use-pair, .use-kv-4 { grid-template-columns: 1fr; }
  .use-kv-4 { grid-template-columns: 1fr 1fr; }
  .perf-strip { grid-template-columns: 1fr; }
  .perf-strip > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .usage-page .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (min-width: 980px) {
  .usage-page .charts { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .usage-page .use-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .use-lower { grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); align-items: start; }
}
@media (max-width: 420px) {
  .usage-head h1 { font-size: 28px; }
  .perf-strip strong { font-size: 18px; }
  .use-kv dd { font-size: 16px; }
  .use-card-top { flex-wrap: wrap; }
  .use-card-top h2 { white-space: nowrap; }
}
.bench-head { margin: 2px 0 18px; }
.bench-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; line-height: 1.12; }
.bench-head p { margin: 6px 0 0; max-width: 40rem; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.bench-note { color: var(--soft); font-size: 13px; }
.bench-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.bench-summary h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.bench-summary p { margin: 0; max-width: 36rem; color: var(--muted); font-size: 14px; line-height: 1.5; }
.bench-hero { min-width: 0; text-align: right; }
.bench-hero span, .bench-chips span { display: block; color: var(--soft); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.bench-hero strong { display: block; margin-top: 6px; font-size: 32px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.bench-hero small { margin-left: 4px; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.bench-hero em { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: 13px; }
.bench-bars { display: grid; gap: 10px; min-width: min(100%, 280px); }
.bench-bars div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
.bench-bars span { color: var(--ink); font-size: 13px; font-weight: 600; }
.bench-bars b { font-size: 13px; font-variant-numeric: tabular-nums; }
.bench-bars i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 99px; background: var(--ink); }
.bench-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 20px; }
.bench-chips div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.bench-chips strong { display: block; margin-top: 6px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bench-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.bench-list-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.bench-list-head p { margin: 0; color: var(--soft); font-size: 13px; }
.bench-table-wrap { border-radius: 16px; box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.bench-table { min-width: 820px; }
.bench-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; text-transform: none; }
.bench-table td { padding: 14px 16px; vertical-align: middle; border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent); }
.bench-table tbody tr:last-child td { border-bottom: 0; }
.bench-table tbody tr:hover td { background: color-mix(in srgb, var(--chip) 55%, transparent); }
.bench-table .num, .bench-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bench-table td.num { font-weight: 600; }
.bench-name { font-weight: 600; }
.bench-none { color: var(--soft); font-size: 13.5px; }
.bench-act { text-align: right; white-space: nowrap; }
.bench-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; }
.bench-badge.good { color: #1b7a45; background: #e8f5ee; border-color: #cfe6d8; }
.bench-badge.quiet { color: var(--muted); background: var(--chip); }
html[data-theme="dark"] .bench-badge.good { color: #7dcea0; background: #1d3328; border-color: #2d4a38; }
.bench-run { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.bench-run:hover { border-color: color-mix(in srgb, var(--ink) 28%, var(--line)); }
.bench-run:disabled { opacity: 0.72; cursor: default; }
.bench-spin { width: 12px; height: 12px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 99px; animation: bench-spin .7s linear infinite; }
.bench-cards { display: none; }
.bench-card { display: block; width: 100%; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.bench-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bench-card h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.bench-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0 0 14px; }
.bench-card dt { color: var(--soft); font-size: 12px; font-weight: 600; }
.bench-card dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bench-card .bench-run { display: flex; width: 100%; height: 38px; }
.bench-empty-note { margin: 0 0 14px; color: var(--soft); font-size: 14px; }
.bench-card.is-empty .bench-empty-note { margin-bottom: 14px; }
@media (max-width: 720px) {
  .bench-summary { flex-direction: column; align-items: stretch; }
  .bench-hero { text-align: left; }
}
@media (min-width: 640px) {
  .bench-card dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .bench-table-wrap { display: none; }
  .bench-cards { display: grid; gap: 12px; }
}
@media (max-width: 420px) {
  .bench-head h1 { font-size: 28px; }
  .bench-hero strong { font-size: 28px; }
}
@keyframes bench-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bench-spin { animation: none; } }
.log-head { margin: 2px 0 16px; }
.log-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; line-height: 1.12; }
.log-head p { margin: 6px 0 0; max-width: 42rem; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.log-filter { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(120px, 0.85fr) minmax(220px, 1.25fr) auto; gap: 12px 14px; align-items: end; margin: 0 0 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.log-filter label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.log-filter input { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg); font-size: 14px; font-weight: 500; color: var(--ink); }
.log-filter input::placeholder { color: var(--soft); font-weight: 400; }
.log-filter input:focus { outline: none; border-color: color-mix(in srgb, var(--ink) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }
.log-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; min-width: 0; }
.log-filter .primary { height: 40px; padding: 0 18px; white-space: nowrap; }
.log-count { margin: 0 2px 12px; color: var(--soft); font-size: 13px; }
.log-table-wrap { overflow: visible; border-radius: 16px; box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.log-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.log-table .c-time { width: 13%; }
.log-table .c-id { width: 17%; }
.log-table .c-model { width: 12%; }
.log-table .c-prov { width: 10%; }
.log-table .c-status { width: 8%; }
.log-table .c-ttft { width: 8%; }
.log-table .c-tps { width: 14%; }
.log-table .c-lat { width: 9%; }
.log-table .c-tok { width: 9%; }
.log-table th { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 12px 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; text-transform: none; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--line); }
.log-table td { padding: 12px 8px; vertical-align: middle; border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent); overflow: hidden; text-overflow: ellipsis; }
.log-table tbody tr:last-child td { border-bottom: 0; }
.log-table tbody tr:hover td { background: color-mix(in srgb, var(--chip) 55%, transparent); }
.log-table .num, .log-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-table td.num { font-weight: 600; font-size: 13px; }
.log-table td.log-tps { white-space: normal; line-height: 1.25; }
.log-speed { white-space: nowrap; }
.log-note { display: block; margin-top: 1px; color: var(--soft); font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2; text-transform: lowercase; }
.log-time { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-id-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.log-id { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.log-id-row .log-id { flex: 1; }
.log-model { font-weight: 600; white-space: nowrap; }
.log-provider { color: var(--muted); white-space: nowrap; }
.log-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; }
.log-badge.ok { color: #1b7a45; background: #e8f5ee; border-color: #cfe6d8; }
.log-badge.bad { color: #9d2c28; background: #fbeceb; border-color: #f0d4d2; }
.log-badge.wait { color: #8a5a12; background: #f8f1e4; border-color: #eadcc4; }
.log-badge.quiet { color: var(--muted); background: var(--chip); }
html[data-theme="dark"] .log-badge.ok { color: #7dcea0; background: #1d3328; border-color: #2d4a38; }
html[data-theme="dark"] .log-badge.bad { color: #f0a0a0; background: #3a2424; border-color: #5a3434; }
html[data-theme="dark"] .log-badge.wait { color: #e2b15a; background: #3a3122; border-color: #5a4a30; }
.log-copy { height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; }
.log-copy:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 24%, var(--line)); }
.log-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; flex: 0 0 26px; border-radius: 8px; }
.log-icon svg { display: block; }
.log-icon[data-state="copied"] { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.log-cards { display: none; }
.log-card { display: block; width: 100%; min-width: 0; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); cursor: pointer; }
.log-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.log-card .log-id { flex: 1; }
.log-who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; }
.log-who span, .log-metrics dt { display: block; color: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.log-who b { display: block; margin-top: 3px; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.log-who div:last-child b { font-weight: 500; color: var(--muted); }
.log-when { margin: 10px 0 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.log-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.log-metrics div { min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.log-metrics dd { display: block; margin: 3px 0 0; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.log-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.log-empty { padding: 28px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.log-empty p { margin: 0; font-size: 16px; font-weight: 600; }
.log-empty span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.45; }
@media (max-width: 1199px) {
  .log-filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .log-filter label:first-child, .log-filter .primary { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .log-filter { grid-template-columns: 1fr; }
  .log-filter .primary { width: 100%; height: 42px; }
}
@media (max-width: 1279px) {
  .log-table-wrap { display: none; }
  .log-cards { display: grid; gap: 10px; }
}
@media (max-width: 480px) {
  .log-dates { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .log-head h1 { font-size: 28px; }
}
.cache-page { display: grid; gap: 12px; }
.cache-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 2px 0 2px; }
.cache-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; }
.cache-head p { margin: 6px 0 0; max-width: 36rem; color: var(--muted); font-size: 14px; line-height: 1.45; }
.cache-switch { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-top: 2px; }
.cache-pill, .cache-live { display: inline-flex; align-items: center; gap: 6px; }
.cache-pill { height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cache-pill i, .cache-live::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--soft); flex: 0 0 auto; }
.cache-pill.on { color: var(--good); }
.cache-pill.on i, .cache-live.on::before { background: var(--good); }
.cache-toggle { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.cache-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cache-stat { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cache-stat span { display: block; color: var(--soft); font-size: 12px; font-weight: 600; line-height: 1.3; }
.cache-stat strong { display: block; margin-top: 6px; color: var(--ink); font-size: 22px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cache-live { font-size: 20px; letter-spacing: -0.02em; }
.cache-card { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cache-card h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.cache-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cache-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 600; }
.cache-kpis, .cache-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cache-kpis div, .cache-meta div { min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.cache-kpis span, .cache-meta span { display: block; color: var(--soft); font-size: 12px; font-weight: 600; line-height: 1.3; }
.cache-kpis strong, .cache-meta b { display: block; margin-top: 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cache-meta { margin-top: 8px; }
.cache-meta b { font-size: 14px; }
.cache-log { display: grid; }
.cache-log-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 4px 0; border-top: 1px solid var(--line); }
.cache-log-row time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cache-log-row span { min-width: 0; font-size: 13.5px; font-weight: 600; }
.cache-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; }
.cache-badge.hit { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.cache-empty { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
@media (max-width: 640px) {
  .cache-head { flex-direction: column; }
  .cache-stat { padding: 12px 10px; }
  .cache-stat strong, .cache-live { font-size: 17px; }
}
.bill-page { display: grid; gap: 18px; }
.bill-head { margin: 2px 0 2px; }
.bill-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; line-height: 1.12; }
.bill-head p { margin: 10px 0 0; max-width: 40rem; color: var(--muted); font-size: 15px; line-height: 1.6; }
.bill-notice { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1.5; }
.bill-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bill-stat { display: flex; flex-direction: column; min-width: 0; min-height: 128px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.bill-stat::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 14px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.bill-stat span { color: var(--soft); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.bill-stat strong { display: block; margin-top: 10px; color: var(--ink); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bill-stat small { display: block; margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.bill-actions { display: flex; margin-top: -6px; }
.bill-funds, .bill-filter-btn { height: 42px; padding: 0 18px; border-radius: 11px; font-weight: 600; transition: opacity .15s ease, box-shadow .15s ease; }
.bill-funds:hover, .bill-filter-btn:hover { opacity: 0.9; }
.bill-funds:focus-visible, .bill-filter-btn:focus-visible, .bill-filter input:focus, .bill-filter select:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.bill-funds:active, .bill-filter-btn:active { opacity: 0.82; }
.bill-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px 14px; align-items: end; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.bill-filter label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.bill-filter input, .bill-filter select { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 500; }
.bill-filter input:focus, .bill-filter select:focus { border-color: color-mix(in srgb, var(--ink) 55%, var(--line)); }
.bill-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.bill-card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.bill-table-wrap { border-radius: 14px; box-shadow: none; }
.bill-table { width: 100%; min-width: 0; table-layout: fixed; }
.bill-table th { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; text-transform: none; }
.bill-table td { padding: 13px 14px; vertical-align: middle; border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent); }
.bill-table tbody tr:last-child td { border-bottom: 0; }
.bill-table tbody tr:hover td { background: color-mix(in srgb, var(--chip) 55%, transparent); }
.bill-table .num, .bill-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill-table td.num { font-weight: 600; }
.bill-when { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bill-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-payid { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.bill-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; }
.bill-badge.ok { color: #1b7a45; background: #e8f5ee; border-color: #cfe6d8; }
.bill-badge.bad { color: #9d2c28; background: #fbeceb; border-color: #f0d4d2; }
.bill-badge.wait { color: #8a5a12; background: #f8f1e4; border-color: #eadcc4; }
.bill-badge.quiet { color: var(--muted); background: var(--chip); }
html[data-theme="dark"] .bill-badge.ok { color: #7dcea0; background: #1d3328; border-color: #2d4a38; }
html[data-theme="dark"] .bill-badge.bad { color: #f0a0a0; background: #3a2424; border-color: #5a3434; }
html[data-theme="dark"] .bill-badge.wait { color: #e2b15a; background: #3a3122; border-color: #5a4a30; }
.bill-rows { display: none; }
.bill-row { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.bill-row header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bill-row time, .bill-row > span { color: var(--muted); font-size: 13px; }
.bill-row strong { display: block; margin-top: 10px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bill-row p { margin: 8px 0 0; color: var(--ink); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.bill-empty { padding: 22px 8px 8px; }
.bill-empty p { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.bill-empty span { display: block; margin-top: 6px; max-width: 36rem; color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 1100px) {
  .bill-filter { grid-template-columns: 1fr 1fr; }
  .bill-filter-btn { grid-column: 1 / -1; justify-self: start; min-width: 128px; }
}
@media (max-width: 860px) {
  .bill-table-wrap { display: none; }
  .bill-rows { display: grid; gap: 10px; }
}
@media (max-width: 720px) {
  .bill-stats { grid-template-columns: 1fr; }
  .bill-funds { width: 100%; }
  .bill-filter { grid-template-columns: 1fr; }
  .bill-filter-btn { width: 100%; }
}
@media (max-width: 420px) {
  .bill-head h1 { font-size: 28px; }
  .bill-stat strong { font-size: 28px; }
}
.play { display: grid; grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr); gap: 16px; align-items: start; }
.play-head { margin: 0 0 18px; }
.play-head h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; letter-spacing: -0.01em; line-height: 1.15; }
.play-head p { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.play-info { width: 18px; height: 18px; padding: 0; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; line-height: 16px; vertical-align: 1px; }
.play-col { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px; min-width: 0; }
.play-field { display: grid; gap: 8px; margin: 0 0 18px; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.4; }
.play-field select, .play-field input { height: 42px; padding: 0 12px; border-radius: 10px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); font-size: 14px; line-height: 1.4; background: var(--bg); }
.play-field select:focus, .play-field input:focus { outline: none; border-color: var(--ink); }
.play-field input::placeholder { color: var(--soft); font-weight: 400; }
.play-field small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--soft); font-size: 12px; line-height: 1.4; }
.play-seg { display: flex; width: 100%; min-height: 42px; border-radius: 10px; }
.play-seg button { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 8px 4px; text-transform: none; letter-spacing: 0; font-weight: 500; line-height: 1.2; }
.play-system { margin: 0 0 18px; }
.play-system summary, .play-advanced summary { cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.4; }
.play-system summary em { font-style: normal; color: var(--soft); margin-left: 8px; font-size: 12px; font-weight: 500; }
.play-system textarea { min-height: 76px; height: 76px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; line-height: 1.5; background: var(--bg); color: var(--ink); }
.play-system textarea:focus { outline: none; border-color: var(--ink); }
.play-system textarea::placeholder, textarea.play-prompt::placeholder { color: var(--soft); font-weight: 400; }
.composer { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 4px 4px 6px; }
.composer:focus-within { border-color: var(--ink); }
textarea.play-prompt { width: 100%; min-height: 132px; max-height: 280px; resize: none; border: 0; background: transparent; padding: 12px 12px 6px; line-height: 1.5; color: var(--ink); font-weight: 400; }
textarea.play-prompt:focus { outline: none; }
.composer-bar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px 4px; }
.play-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; margin-right: auto; color: var(--muted); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; line-height: 1; }
.switch { position: relative; width: 36px; height: 22px; flex: 0 0 auto; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.switch > span { display: block; width: 36px; height: 22px; border-radius: 99px; background: var(--chip); border: 1px solid var(--line); pointer-events: none; }
.switch > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); background: var(--accent-ink); border-color: transparent; }
.switch input:disabled { cursor: default; }
.switch input:disabled + span { opacity: 0.45; }
#run, #stop { height: 36px; min-height: 36px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
#stop[hidden], #run[hidden], .play-stream[hidden] { display: none; }
.play-advanced { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.play-advanced .play-field { margin: 12px 0 0; }
.play-advanced input { width: 120px; }
.play-advanced .note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; }
.play-response-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; min-height: 32px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.play-response-head strong { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); }
.play-stream { color: var(--soft); font-size: 12px; font-weight: 500; }
.play-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.play-actions button { height: 32px; min-height: 32px; padding: 0 10px; font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.play-empty { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.play-empty[hidden] { display: none; }
.play-output { margin-top: 14px; white-space: pre-wrap; line-height: 1.6; font-size: 14.5px; overflow-wrap: anywhere; color: var(--ink); }
.play-output[data-empty="true"] { display: none; }
.form { display: grid; gap: 8px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.meter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.meter div { min-width: 0; }
.meter span { color: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; line-height: 1.3; text-transform: none; }
.meter strong { display: block; margin-top: 6px; font-size: 13px; font-family: var(--mono); font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; color: var(--ink); }
.meter-engine { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--line); }
.play-json { width: min(640px, 100%); }
.play-json header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.play-json header h2 { margin: 0; }
.play-json .toolbar { margin: 0; }
.play-json pre { margin: 0; max-height: min(50vh, 420px); overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.45; white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 10px; }
pre.raw { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; max-height: 220px; overflow: auto; background: var(--bg); border-radius: 10px; padding: 10px; }
.secret { font-family: var(--mono); word-break: break-all; background: var(--bg); padding: 12px; border-radius: 10px; }
.empty { color: var(--muted); padding: 8px 0; font-size: 14px; }
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 12px; }
.health-list { display: grid; gap: 6px; }
.health-list div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.detail { position: fixed; top: 0; right: 0; height: 100vh; width: min(420px, 100vw); background: var(--surface); border-left: 1px solid var(--line); z-index: 8; padding: 18px; overflow: auto; }
.detail header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.detail h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; overflow-wrap: anywhere; }
.log-detail { display: grid; margin: 14px 0 8px; }
.log-detail div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.log-detail dt { flex: 0 0 auto; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.log-detail dd { margin: 0; min-width: 0; max-width: 68%; font-weight: 600; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.log-detail dd.mono { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.log-copy-row { margin: 12px 0; }
.log-raw { margin-top: 8px; }
.log-raw summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 9; display: grid; place-items: center; padding: 16px; }
.palette { position: fixed; inset: 0; z-index: 20; background: rgba(20,20,19,.32); display: grid; align-items: start; justify-items: center; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-sheet { width: min(560px, 100%); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.palette-field { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.palette-field i { color: var(--ink); }
.palette-field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--ink); }
.palette-field input::placeholder { color: var(--soft); }
.palette-results { overflow: auto; padding: 6px; }
.palette-group { margin: 8px 8px 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.palette-item { display: flex; width: 100%; min-height: 36px; align-items: center; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 14px; color: var(--ink); }
.palette-item.active { background: var(--nav); }
@media (hover: hover) { .palette-item:hover { background: var(--nav); } }
.palette-close { display: none; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-size: 20px; line-height: 1; }
@media (max-width: 700px) { .palette-close { display: grid; place-items: center; } }
.palette-empty { margin: 12px; color: var(--muted); font-size: 14px; }
@media (max-width: 700px) {
  .palette { padding: 0; }
  .palette-sheet { width: 100%; max-height: 100%; min-height: 100%; border: 0; border-radius: 0; }
}
.model-sheet { position: fixed; inset: 0; z-index: 12; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 20, 19, .28); }
.model-sheet-panel { width: 100%; max-height: 78vh; overflow: auto; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, var(--surface)); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 28px rgba(20, 20, 19, .08); }
.model-sheet-handle { width: 36px; height: 4px; margin: 2px auto 12px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 14%, var(--line)); }
.model-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.model-sheet-head h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.model-sheet-x { display: grid; place-items: center; width: 32px; height: 32px; margin: -4px -4px 0 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.model-sheet-x:hover { background: var(--chip); color: var(--ink); }
.model-sheet-block { margin-top: 14px; }
.model-sheet-block > span, .model-sheet-facts dt { color: var(--soft); font-size: 12px; font-weight: 500; }
.model-sheet-block .m-caps { margin-top: 6px; }
.model-sheet-facts { display: grid; gap: 10px; margin: 14px 0 0; }
.model-sheet-facts div { display: grid; gap: 2px; }
.model-sheet-facts dd { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.model-sheet-metrics { display: grid; gap: 6px; margin: 8px 0 0; }
.model-sheet-metrics div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.model-sheet-metrics dd { margin: 0; color: var(--ink); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.model-sheet-open { overflow: hidden; }
@media (min-width: 800px) {
  .model-sheet { align-items: center; padding: 24px; }
  .model-sheet-panel { width: min(400px, 100%); max-height: min(80vh, 560px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, var(--surface)); border-radius: 16px; padding: 16px 18px 18px; box-shadow: 0 16px 40px rgba(20, 20, 19, .12); }
  .model-sheet-handle { display: none; }
}
.modal[hidden], .detail[hidden], .account-menu[hidden], .model-sheet[hidden] { display: none; }
.keys-wrap { width: min(680px, 100%); margin: 0 auto; }
.keys-head { margin: 2px 0 16px; }
.keys-head h1 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.keys-head p { margin: 8px 0 14px; max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.45; }
.keys-head .primary { height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 600; }
.key-list { display: grid; gap: 10px; }
.key-card { display: grid; gap: 8px; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 1px color-mix(in srgb, var(--ink) 3%, transparent); }
.key-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.key-main strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.key-card .badge { height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.key-prefix { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-family: var(--mono); font-size: 13px; }
.key-badges { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.key-card .badge.quiet { color: var(--muted); background: var(--chip); }
.key-card .badge.quiet::before { display: none; }
.key-meta { margin: 0; color: var(--muted); font-size: 13px; }
.key-soon { margin: 0; color: var(--muted); font-size: 12.5px; }
.key-advanced { margin: -2px 0 14px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.key-actions { display: flex; gap: 8px; margin-top: 4px; }
.key-actions .ghost, .key-actions .danger { height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 600; }
.key-empty { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); }
.danger { border-radius: 9px; border: 1px solid #e4c8c4; background: transparent; color: #8d2f2a; padding: 7px 12px; font-size: 14px; }
html[data-theme="dark"] .danger { border-color: #5c3330; color: #f0b4ae; }
.modal.key-modal { padding: 20px 16px; background: rgba(20, 20, 19, 0.42); backdrop-filter: blur(4px); }
#key-form, .key-created { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; gap: 0; padding: 18px 16px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 16px 40px rgba(20, 20, 19, 0.12); }
.key-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
#key-form h2, .key-created h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.key-x { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.key-x:hover { background: var(--chip); color: var(--ink); }
.key-sub { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
#key-form .key-field { display: grid; gap: 6px; margin: 0 0 12px; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.3; }
#key-form .key-field[hidden] { display: none; }
#key-form input, #key-form select { width: 100%; height: 40px; margin: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; }
#key-form select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none' stroke='%236b6a66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
#key-form select:has(option[value=""]:checked) { color: var(--soft); font-weight: 400; }
#key-form input::placeholder { color: var(--soft); font-weight: 400; }
#key-form input:focus, #key-form select:focus { outline: none; border-color: color-mix(in srgb, var(--ink) 45%, var(--line)); }
.key-help { margin: -2px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.key-error { margin: 0 0 8px; color: var(--bad); font-size: 13px; }
.key-error:empty { display: none; }
#key-form .key-submit { width: 100%; height: 40px; margin-top: 4px; border-radius: 10px; font-weight: 600; }
#key-form .key-submit:disabled { opacity: 0.38; }
.key-foot { display: flex; justify-content: flex-end; gap: 8px; }
.key-foot .ghost, .key-foot .primary { height: 36px; min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; }
.key-check { color: var(--good); margin-right: 6px; }
.key-copyline { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.key-copyline code { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-family: var(--mono); font-size: 12.5px; overflow: auto; white-space: nowrap; }
.key-copyline .ghost { height: 40px; flex: 0 0 auto; }
.key-created .key-foot .primary { min-width: 88px; }
@media (max-width: 800px) {
  .keys-head h1 { font-size: 28px; }
  .key-actions .ghost, .key-actions .danger { flex: 1; }
}
.dialog { width: min(460px, 100%); background: var(--surface); border-radius: 14px; border: 1px solid var(--line); padding: 16px; display: grid; gap: 8px; }
.dialog h2 { margin: 0 0 4px; font-size: 17px; }
.account-menu { position: fixed; left: calc(var(--rail) + 8px); bottom: 16px; z-index: 8; width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.tip { position: fixed; z-index: 12; max-width: 240px; padding: 8px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12px; line-height: 1.45; pointer-events: none; }
.tip b, .tip span { display: block; }
.tip[hidden] { display: none; }

/* Overview-style telemetry chart (used on the performance page) */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.strip > div { padding: 10px 14px; min-width: 0; }
.strip > div + div { border-left: 1px solid var(--line); }
.strip span { display: block; color: var(--muted); font-size: 13px; }
.strip strong { display: block; margin-top: 2px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 8px; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.perf { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 14px; }
.perf p { margin: 0; }
.perf span { display: block; color: var(--muted); font-size: 13px; }
.perf b { font-size: 15px; font-weight: 600; margin-right: 10px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; }
.charts h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.plot { margin: 0; min-width: 0; }
.plot-body { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px; }
.y-axis { height: 136px; display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 11px; text-align: right; }
.plot-canvas { position: relative; height: 136px; }
.plot-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tchart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tchart .series { fill: none; stroke: var(--ink); stroke-width: 1.35; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tchart .area { fill: var(--ink); opacity: 0.06; }
.tchart .ref { stroke: var(--soft); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.plot-dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; padding: 0; border-radius: 99px; border: 1.5px solid var(--ink); background: var(--surface); }
.plot-dot::after { content: ""; position: absolute; inset: -8px; }
.x-axis { position: relative; height: 16px; margin: 6px 0 0 46px; color: var(--muted); font-size: 11px; }
.x-axis span { position: absolute; white-space: nowrap; transform: translateX(-50%); }
.x-axis span[data-align="start"] { transform: none; }
.x-axis span[data-align="end"] { transform: translateX(-100%); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 0 46px; color: var(--muted); font-size: 11px; }
.legend i { display: inline-block; width: 14px; height: 0; border-top: 1.5px solid var(--ink); margin-right: 5px; vertical-align: middle; }
.legend i.dashed { border-top-style: dashed; border-top-color: var(--soft); }
.kv { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 8px 0 0; }
.kv div { display: flex; gap: 8px; align-items: baseline; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Desktop: expanded sidebar replaces the rail */
@media (min-width: 1024px) {
  .rail { display: none; }
  .drawer { transform: none; width: var(--drawer); transition: none; overflow: hidden; }
  #close-nav { display: none; }
  .backdrop { display: none !important; }
  .main { margin-left: var(--drawer); }
  main#view { width: min(1040px, calc(100% - 64px)); padding-top: 28px; }
  main#view.wide { width: min(1080px, calc(100% - 64px)); }
  .greeting { font-size: 32px; }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .dash-grid.models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-menu { left: calc(var(--drawer) - 250px); bottom: 70px; }
}
@media (max-width: 1023px) {
  .metrics, .metrics.three, .meter { grid-template-columns: 1fr 1fr; }
  .play, .split { grid-template-columns: 1fr; }
  .drawer {
    width: min(288px, calc(100vw - 68px));
    padding: max(10px, env(safe-area-inset-top)) 12px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-right: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    box-shadow: 16px 0 40px color-mix(in srgb, var(--ink) 7%, transparent);
    overflow: hidden;
    overscroll-behavior: contain;
  }
  .drawer-head {
    flex: 0 0 auto;
    min-height: 36px;
    margin: 0 0 8px;
    padding: 0 0 0 4px;
    gap: 8px;
  }
  .drawer .brand {
    gap: 9px;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1;
    white-space: nowrap;
  }
  .drawer .brand-logo { width: 26px; height: 26px; flex-basis: 26px; }
  .drawer #close-nav {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--soft);
  }
  .drawer .workspace {
    flex: 0 0 auto;
    height: 36px;
    margin: 0 0 6px;
    padding: 0 12px;
    gap: 10px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, var(--bg));
    border-radius: 12px;
    background: var(--bg);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.015em;
  }
  .drawer .workspace i {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: #7d6bb8;
  }
  .drawer .workspace i svg { width: 16px; height: 16px; }
  html[data-theme="dark"] .drawer .workspace i { color: #c4b6e6; }
  .drawer .search {
    flex: 0 0 auto;
    height: 34px;
    margin: 0 0 4px;
    padding: 0 12px;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: color-mix(in srgb, var(--chip) 72%, var(--bg));
  }
  .drawer .search:hover,
  .drawer .search:focus-visible {
    border-color: color-mix(in srgb, var(--ink) 10%, var(--line));
    background: var(--bg);
  }
  .drawer .search i {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    color: var(--soft);
  }
  .drawer .search i svg { width: 15px; height: 15px; }
  .drawer .search span { font-size: 13.5px; letter-spacing: -0.01em; }
  .drawer nav {
    flex: 0 1 auto;
    gap: 1px;
    margin: 6px 0 0;
    padding: 0 0 20px;
  }
  .drawer .nav-item { height: 32px; min-height: 32px; }
}
@media (max-width: 700px) {
  .charts { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div + div { border-left: 0; }
  .strip > div:nth-child(even) { border-left: 1px solid var(--line); }
  .strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 380px) {
  .greeting { font-size: 25px; }
  .btn { font-size: 14px; padding: 0 10px; }
  .big { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .group .chev { transition: none; }
}
.actions.tight { margin-bottom: 0; }
.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.amount-grid .wide { grid-column: 1 / -1; }
.amount-grid .btn { justify-content: center; }
.amount-grid .btn.selected { border-color: var(--ink); }
.banner { margin: 0; padding: 8px 14px; background: var(--ink); color: var(--accent-ink); font-size: 14px; text-align: center; }
.banner[hidden] { display: none; }
.banner button { margin-left: 8px; height: 28px; border: 0; border-radius: 7px; background: var(--accent-ink); color: var(--ink); padding: 0 10px; }
.settings { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { display: grid; gap: 2px; position: sticky; top: 12px; }
.settings-nav a { display: flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.settings-nav a.active, .settings-nav a:hover { background: var(--nav); color: var(--ink); }
.set-block { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 4px 14px; margin-bottom: 12px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); }
.set-block .set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-size: 14px; font-weight: 600; }
.set-row small, .set-note { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.set-row select, .set-row input[type="text"], .set-row input[type="number"], .set-row input[type="url"] { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 0 8px; max-width: 180px; }
.danger { border-color: #e7c1be; }
.danger h2 { color: var(--bad); font-size: 15px; }
@media (max-width: 700px) { .settings { grid-template-columns: 1fr; } .settings-nav { position: static; grid-auto-flow: column; overflow-x: auto; } .settings-nav a { white-space: nowrap; } }
.tile .info { display: inline-flex; color: var(--soft); cursor: help; }
.model-card:hover { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.block { margin: 18px 0; }
.block h2, .split-stats h2 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.block h3 { margin: 14px 0 6px; font-size: 14.5px; font-weight: 600; }
.speed { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.speed strong { display: block; font-size: 24px; font-weight: 500; letter-spacing: -0.01em; cursor: help; }
.speed p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.speed .link { display: inline-block; margin-top: 10px; color: var(--link); text-decoration: underline; text-underline-offset: 3px; font-size: 14.5px; }
.split-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.split-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
@media (max-width: 380px) { .tile-title { font-size: 15px; } .tile { padding: 16px 14px 18px; } .pill-gray { padding: 0 8px; font-size: 13.5px; } }
main#view.docs-layout { width: min(1180px, calc(100% - 20px)); }
@media (min-width: 1024px) { main#view.docs-layout { width: min(1180px, calc(100% - 40px)); } }
.docs-page { display: grid; gap: 22px; }
.docs-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 18px 28px; align-items: end; }
.docs-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.docs-top h1 { margin: 10px 0 0; font-family: var(--serif); font-weight: 500; font-size: 34px; letter-spacing: -0.03em; line-height: 1.1; }
.docs-top p { margin: 8px 0 0; max-width: 40rem; color: var(--muted); font-size: 15px; line-height: 1.6; }
.docs-search-wrap { position: relative; }
.docs-search { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent); }
.docs-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0; font-size: 14px; }
.docs-search input:focus { outline: none; }
.docs-search:focus-within { border-color: color-mix(in srgb, var(--ink) 45%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 8%, transparent); }
.docs-kbd { color: var(--soft); font-family: var(--sans); font-size: 11px; font-weight: 600; white-space: nowrap; }
.docs-results { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 8%, transparent); }
.docs-results[hidden] { display: none; }
.docs-results a, .docs-results p { display: block; padding: 8px 10px; border-radius: 8px; }
.docs-results a small, .docs-crumbs span, .docs-pager small { display: block; color: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.docs-results a strong, .docs-results a span { display: block; }
.docs-results a span { margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.docs-results a:hover { background: var(--chip); }
.docs-results p { margin: 0; color: var(--muted); font-size: 14px; }
.docs-menu { display: none; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600; }
.docs-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr) 176px; gap: 28px; align-items: start; }
.docs-page.is-home .docs-shell { grid-template-columns: 200px minmax(0, 1fr); }
.docs-nav, .docs-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.docs-group { border-bottom: 1px solid var(--line); }
.docs-group summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 10px 0 6px; color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; list-style: none; }
.docs-group summary::-webkit-details-marker { display: none; }
.docs-group summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--soft); border-bottom: 1.5px solid var(--soft); transform: rotate(45deg); }
.docs-group:not([open]) summary::after { transform: rotate(-45deg); }
.docs-group a, .docs-toc a, .docs-inline-toc a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.docs-group a.on, .docs-toc a.on, .docs-inline-toc a.on { background: var(--chip); color: var(--ink); font-weight: 600; }
.docs-article { max-width: 800px; min-width: 0; }
.docs-article a:not(.docs-hash) { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.docs-article .docs-crumbs a, .docs-article .docs-pager a, .docs-article .docs-inline-toc a { color: var(--muted); text-decoration: none; }
.docs-article .docs-inline-toc a.on, .docs-toc a.on, .docs-group a.on { color: var(--ink); font-weight: 600; }
.docs-article p, .docs-article li { color: var(--ink); font-size: 15.5px; line-height: 1.65; }
.docs-article p { margin: 0 0 14px; }
.docs-article h2, .docs-article h3 { display: flex; align-items: baseline; gap: 8px; margin: 28px 0 10px; font-weight: 600; letter-spacing: -0.02em; scroll-margin-top: 18px; }
.docs-article h2 { font-size: 22px; }
.docs-article h2.docs-page-title { display: block; margin: 4px 0 18px; font-family: var(--serif); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; line-height: 1.15; }
.docs-article h3 { font-size: 17px; }
.docs-hash { color: var(--soft); font-weight: 500; text-decoration: none; opacity: 0; }
.docs-article h2:hover .docs-hash, .docs-article h3:hover .docs-hash, .docs-article h2:focus-within .docs-hash, .docs-article h3:focus-within .docs-hash { opacity: 1; }
@media (hover: none) { .docs-hash { opacity: 0.28; } }
.docs-home { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.docs-home section { min-width: 0; padding: 14px 14px 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.docs-article .docs-home h2 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); }
.docs-article .docs-home a, .docs-article .docs-links a { color: var(--ink); text-decoration: none; }
.docs-home a { display: flex; align-items: center; min-height: 34px; font-size: 15px; font-weight: 600; }
.docs-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.docs-links a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 600; }
.docs-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.docs-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.docs-steps li > span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; }
.docs-steps b { display: block; margin: 2px 0 4px; font-size: 16px; }
.docs-results mark { background: color-mix(in srgb, var(--warn) 32%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.docs-page table { min-width: 0; }
.docs-article code { font-family: var(--mono); font-size: 0.92em; }
.docs-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; color: var(--soft); font-size: 12px; }
.docs-crumbs a { color: var(--muted); }
.docs-crumbs span::before, .docs-crumbs a + span::before { content: "/"; margin-right: 6px; color: var(--soft); }
.docs-inline-toc { display: none; margin: 0 0 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.docs-inline-toc summary { cursor: pointer; color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.docs-inline-toc b, .docs-toc b { display: block; margin: 0 0 8px; color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.docs-ep { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.docs-ep p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.docs-method { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.docs-method.header, .docs-method.get { background: var(--chip); color: var(--ink); }
.docs-call { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-left-width: 2px; border-radius: 12px; background: color-mix(in srgb, var(--chip) 65%, var(--surface)); }
.docs-call b { display: block; margin-bottom: 4px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.docs-call p { margin: 0; font-size: 14px; line-height: 1.55; }
.docs-call.note { border-left-color: var(--muted); }
.docs-call.important, .docs-call.warning { border-left-color: var(--warn); }
.docs-call.info { border-left-color: var(--link); }
.docs-call.warning { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.docs-shell, .docs-article, .docs-code, .docs-scroll, .docs-pre { min-width: 0; }
.docs-code { margin: 0 0 16px; max-width: 100%; border: 1px solid #2a2825; border-radius: 14px; background: #161614; color: #f3f1ea; overflow: hidden; }
.docs-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 10px; background: #221f1c; flex-wrap: wrap; }
.docs-tabs { display: flex; gap: 4px; }
.docs-tabs button, .docs-copy { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #c8c4bb; font-size: 12px; font-weight: 600; }
.docs-tabs button.on { background: #34312c; color: #f3f1ea; }
.docs-pre { margin: 0; padding: 14px 16px 16px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.docs-pre code { font-family: inherit; white-space: pre; }
.tok-key { color: #e2b15a; }
.tok-str { color: #9dceae; }
.tok-cmt { color: #8f8d86; }
.docs-scroll { margin: 0 0 16px; max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.docs-table { width: 100%; min-width: 0; border-collapse: collapse; }
.docs-table th, .docs-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; vertical-align: top; white-space: normal; }
.docs-models { display: grid; gap: 10px; }
.docs-model { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.docs-model header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.docs-model b { font-size: 16px; }
.docs-model header code { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.docs-specs { display: grid; gap: 4px; margin: 8px 0 0; }
.docs-specs div { display: grid; grid-template-columns: 8.75rem minmax(0, 1fr); gap: 8px; align-items: baseline; }
.docs-specs dt { margin: 0; color: var(--muted); font-size: 13px; }
.docs-specs dd { margin: 0; font-size: 14px; }
@media (max-width: 760px) {
  .docs-table.stack thead { display: none; }
  .docs-table.stack, .docs-table.stack tbody, .docs-table.stack tr, .docs-table.stack td { display: block; width: auto; }
  .docs-table.stack tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .docs-table.stack td { border: 0; padding: 3px 0; }
  .docs-table.stack td::before { content: attr(data-label); display: block; margin-bottom: 1px; color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
  .docs-table.stack tr:last-child { border-bottom: 0; }
}
.docs-table th { color: var(--muted); font-size: 12px; font-weight: 600; background: var(--bg); }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.docs-pager a { display: flex; align-items: center; min-width: 0; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; }
.docs-pager a.next { justify-content: flex-end; text-align: right; }
.docs-pager a:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.docs-shade { position: fixed; inset: 0; background: rgba(20,20,19,.32); z-index: 11; }
.docs-shade[hidden] { display: none; }
@media (max-width: 1099px) {
  .docs-shell { grid-template-columns: 196px minmax(0, 1fr); }
  .docs-toc { display: none; }
  .docs-inline-toc { display: block; }
}
@media (max-width: 700px) {
  .docs-home { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .docs-top { grid-template-columns: 1fr; }
  .docs-top h1 { font-size: 30px; }
  .docs-menu { display: inline-flex; justify-content: center; }
  .docs-shell { grid-template-columns: 1fr; }
  .docs-nav { display: none; position: fixed; z-index: 12; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); margin: 0; padding: 18px 16px 24px; background: var(--surface); border-right: 1px solid var(--line); overflow: auto; }
  .docs-nav.open { display: block; }
  .docs-kbd { display: none; }
  .docs-article { max-width: none; }
}
.mp { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 14px 14px 8px; margin: 0 0 16px; min-width: 0; }
.mp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 14px; }
.mp-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.mp-head p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.mp-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.mp-run { height: 32px; padding: 0 12px; white-space: nowrap; }
.mp-kicker { margin: 14px 0 0; color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mp-metrics, .mp-cols { min-width: 0; }
.mp-row, .mp-cap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.mp-row span, .mp-cap > span { color: var(--muted); }
.mp-row strong, .mp-cap b { font-weight: 600; text-align: right; }
.mp-cap { grid-template-columns: minmax(0, 1fr) auto auto; }
.mp-cap b { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.mp-row strong { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mp-chart { margin-top: 8px; min-width: 0; }
.mp .plot-canvas, .mp .y-axis { height: 84px; }
.mp .plot { margin: 0; }
.mp .legend { margin: 6px 0 0 0; }
.mp .empty, .mp .note { margin: 8px 0 0; }
.mp-note { margin: 8px 0 0; color: var(--soft); font-size: 12.5px; line-height: 1.45; }
.dash .greeting { margin: 2px 0 12px; font-size: 30px; letter-spacing: -0.03em; }
.dash .dash-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 16px; }
.dash .dash-cta-row { display: flex; flex-wrap: nowrap; gap: 4px; width: 100%; }
.dash .dash-cta .btn { height: 32px; padding: 0 5px; border-radius: 9px; gap: 3px; font-size: 11.5px; font-weight: 500; background: var(--surface); }
.dash .dash-cta .btn svg { width: 13px; height: 13px; }
@media (min-width: 1024px) {
  .dash .dash-cta-row { gap: 8px; width: auto; }
  .dash .dash-cta .btn { height: 34px; padding: 0 12px; font-size: 14px; gap: 6px; }
  .dash .dash-cta .btn svg { width: 15px; height: 15px; }
}
.dash .dash-cta .btn.dark { height: 36px; font-weight: 600; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dash .tile { border-radius: 16px; padding: 16px 16px 14px; box-shadow: 0 1px 1px color-mix(in srgb, var(--ink) 3%, transparent); }
.dash .tile-title { font-size: 15px; font-weight: 500; }
.dash .tile-row { flex-wrap: nowrap; align-items: center; margin-top: 14px; }
.dash .tile-row > :first-child:not(.btn) { flex: 1 1 auto; min-width: 0; }
.dash .big { font-size: 30px; }
.dash .credit-main { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.dash .stat-lines { display: grid; gap: 3px; min-width: 0; color: var(--muted); font-size: 14.5px; line-height: 1.35; }
.dash .cache-row { align-items: flex-end; }
.dash .tile-row .bars7 { margin-top: 0; height: 44px; }
.trial-card { margin: 0 0 12px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(20, 20, 19, 0.04); }
.trial-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trial-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.trial-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 7px; border-radius: 999px; background: #e8f6ee; color: #1b7a45; font-size: 12px; font-weight: 600; }
.trial-pill::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.trial-card[data-tone="low"] .trial-pill { background: #fbf3e4; color: #8a5a12; }
.trial-card[data-tone="bad"] .trial-pill { background: #fdeeee; color: #9d2c2c; }
.trial-card[data-tone="done"] .trial-pill { background: var(--chip); color: var(--muted); }
.trial-balance { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 0; }
.trial-balance strong { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.trial-balance span, .trial-used, .trial-legend { color: var(--soft); }
.trial-balance span { font-size: 13px; }
.trial-used { margin: 2px 0 0; font-size: 12.5px; }
.trial-bar { height: 6px; margin: 10px 0 0; border-radius: 99px; background: #eeeae4; overflow: hidden; }
.trial-bar span { display: block; height: 100%; border-radius: inherit; background: #1b7a45; }
.trial-card[data-tone="low"] .trial-bar span { background: #c4923a; }
.trial-card[data-tone="bad"] .trial-bar span { background: #c45c5c; }
.trial-card[data-tone="done"] .trial-bar span { background: #8d8b85; }
.trial-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11.5px; }
.trial-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (min-width: 720px) {
  .trial-facts { grid-template-columns: repeat(3, max-content); justify-content: start; column-gap: 48px; }
}
.trial-facts span { display: block; color: var(--soft); font-size: 11.5px; font-weight: 600; }
.trial-facts b { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 600; }
.trial-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.trial-actions .btn { height: 32px; padding: 0 12px; font-size: 13.5px; }
html[data-theme="dark"] .trial-card { background: var(--surface); box-shadow: none; }
html[data-theme="dark"] .trial-bar { background: #34332f; }
html[data-theme="dark"] .trial-pill { background: #1d3328; color: #8ed4ae; }
html[data-theme="dark"] .trial-card[data-tone="low"] .trial-pill { background: #3a301c; color: #e2b15a; }
html[data-theme="dark"] .trial-card[data-tone="bad"] .trial-pill { background: #3a2222; color: #f0a0a0; }
.play-trial { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.dash .section-row { margin: 18px 2px 10px; }
.dash .section-row h2 { font-size: 20px; }
.dash .section-row .link-blue { font-size: 13.5px; font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dash .model-card { margin-bottom: 10px; padding: 13px 16px 12px; gap: 12px; }
.dash .model-card .model-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 9px; }
.dash .model-card .model-icon svg { width: 22px; height: 22px; }
.dash .model-card .model-name { margin-bottom: 5px; }
.dash .model-card .chips { column-gap: 6px; row-gap: 4px; }
.dash .model-card .chip { height: 24px; padding: 0 6px; background: #f7f6f2; color: var(--muted); }
html[data-theme="dark"] .dash .model-card .chip { background: #383730; }
.dash .resource .res-text { max-width: 36rem; }
.dash .pill-gray { height: 26px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.dash-board, .dash-col, .util-grid { display: grid; gap: 8px; min-width: 0; align-content: start; }
.d-card {
  min-width: 0;
  padding: 12px 12px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 1px color-mix(in srgb, var(--ink) 3%, transparent);
}
.d-card h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 14.5px; font-weight: 650; letter-spacing: -0.02em; }
.d-kicker { margin: 0 0 2px; color: var(--soft); font-size: 10.5px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; }
.dash-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dash-run { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.d-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 10px; }
.d-metrics div { min-width: 0; }
.d-metrics span, .credit-card > span, .token-top span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.d-metrics strong { display: block; margin-top: 1px; font-size: 14px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dash-chart { min-width: 0; margin-top: 8px; }
.dash-chart .plot { margin: 0; }
.dash-chart .plot-canvas, .dash-chart .y-axis { height: 46px; }
.dash-chart .x-axis { height: 13px; margin: 2px 0 0 46px; font-size: 10px; }
.dash-chart .legend { margin: 2px 0 0 46px; font-size: 10.5px; }
.dash-chart .empty { margin: 4px 0 0; font-size: 12.5px; }
.cap-list { display: grid; margin-top: 4px; }
.cap-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.cap-row span { min-width: 0; font-size: 13px; }
.cap-row .badge, .eng-row .badge, .model-row .badge, .cache-card .badge { height: 20px; padding: 0 7px; font-size: 10.5px; font-weight: 650; }
.power-split { display: grid; gap: 10px; margin-top: 2px; }
.power-engines { padding-top: 8px; border-top: 1px solid var(--line); }
.d-card .progress { height: 4px; margin: 8px 0 0; }
.eng-list { display: grid; margin-top: 4px; }
.eng-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; font-size: 13px; }
.eng-row b { font-weight: 600; }
.credit-card > span { font-size: 12px; }
.credit-card > strong { display: block; margin-top: 2px; font-size: 22px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.d-quiet { display: block; margin-top: 6px; color: var(--soft); font-size: 12px; line-height: 1.4; }
.d-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.d-actions .btn, .d-actions a {
  display: inline-flex; align-items: center; height: 28px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 12px; font-weight: 600;
}
.d-actions .btn.dark { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.d-card-head { display: flex; align-items: center; gap: 8px; }
.d-card-head h2 { margin-right: auto; }
.d-card-head a { color: var(--muted); font-size: 12px; font-weight: 600; }
.cache-bits p { margin: 4px 0 0; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.d-cost { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 8px 0 0; font-size: 13px; }
.d-cost span { color: var(--muted); }
.d-cost strong { font-weight: 650; }
.token-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.token-top strong { display: block; font-size: 22px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.token-card .bars7 { width: 84px; height: 24px; margin: 0; flex: 0 0 84px; }
.model-rows { margin-top: 2px; }
.model-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; border-top: 1px solid var(--line); }
.model-row:first-child { border-top: 0; }
.model-row b { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.res-list { margin-top: 2px; }
.res-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: center;
  min-height: 44px; padding: 6px 0; border-top: 1px solid var(--line);
}
.res-row:first-child { border-top: 0; }
.res-row strong { grid-column: 1; font-size: 13.5px; font-weight: 600; }
.res-row span { grid-column: 1; color: var(--muted); font-size: 12px; }
.res-row em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 12.5px; font-weight: 650; }
.main:has(#view.dash) .foot { width: min(1080px, calc(100% - 24px)); margin-top: 14px; padding: 4px 0 12px; }
.main:has(#view.dash) .foot a { min-height: 28px; font-size: 12px; }
@media (min-width: 860px) {
  .power-split { grid-template-columns: minmax(0, 1.25fr) minmax(140px, 0.75fr); gap: 18px; align-items: start; }
  .power-engines { padding: 0 0 0 16px; border-top: 0; border-left: 1px solid var(--line); }
}
@media (min-width: 1024px) {
  .dash-board { grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.82fr); gap: 10px; align-items: start; }
  .util-grid { grid-template-columns: 1fr 1fr; }
  .token-card { grid-column: 1 / -1; }
  .dash .greeting { font-size: 34px; }
}
@media (max-width: 420px) {
  .dash .greeting { font-size: 26px; }
  .dash-hero-head { align-items: flex-start; }
}
@media (min-width: 860px) {
  .mp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; }
  .mp-metrics { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
}
@media (max-width: 420px) {
  .mp-head, .mp-actions { display: grid; }
  .mp-run { width: 100%; }
  .mp-cap { grid-template-columns: minmax(0, 1fr) auto; }
  .mp-cap b { grid-column: 1; grid-row: 2; text-align: left; }
}
