/* Helm design system. Dark-first "instrument panel": near-black surfaces, hairline borders, one cyan signal
   (the crossbar of the H in the icon). Light mode is a first-class twin. Tabular figures everywhere. */
:root {
  /* surfaces */
  --bg: #080b10; --card: #0e131a; --card-2: #131a23; --line: #1d2630; --line-2: #2a3644;
  --ink: #e8eef5; --muted: #8a96a6; --accent: #e8eef5;
  /* the one signal */
  --signal: #19e3d1; --signal-text: #19e3d1; --on-signal: #04110f; --signal-soft: rgba(25, 227, 209, .12); --signal-glow: rgba(25, 227, 209, .35);
  /* data series */
  --gcp: #5b9cff; --github: #a98bf0; --neon: #3ccf7b; --anthropic: #ff9d6e; --subs: #e5c15c;
  /* status */
  --good: #5fdb9a; --good-bg: rgba(60, 207, 123, .14); --bad: #ff8f84; --bad-bg: rgba(255, 99, 84, .15);
  --warn: #f4b35e; --warn-bg: rgba(244, 179, 94, .14);
  /* scales */
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-base: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 34px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --radius: 14px; --radius-sm: 10px; --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tabs-h: 0px; --top-h: calc(88px + env(safe-area-inset-top));
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f5f8; --card: #fff; --card-2: #f7f9fb; --line: #e1e6ec; --line-2: #cdd5de;
    --ink: #0d141c; --muted: #566273; --accent: #0d141c;
    --signal: #0fb8aa; --signal-text: #067c72; --on-signal: #03130f; --signal-soft: rgba(15, 184, 170, .12); --signal-glow: rgba(15, 184, 170, .3);
    --gcp: #1a73e8; --github: #6e40c9; --neon: #12a150; --anthropic: #c4561f; --subs: #a37a00;
    --good: #067647; --good-bg: #d6f5e3; --bad: #b42318; --bad-bg: #fee4e2; --warn: #9a4a07; --warn-bg: #fdecc4;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .05);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--fs-base)/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; padding-bottom: var(--tabs-h); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 var(--s4); }
main.wrap { padding-bottom: 48px; }
a { color: inherit; }
h1 { font-size: var(--fs-xl); line-height: 1.2; margin: var(--s5) 0 var(--s1); letter-spacing: -.015em; }
h2 { font-size: var(--fs-md); margin: 0 0 var(--s2); letter-spacing: -.005em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .sm { font-size: var(--fs-sm); } .pos { color: var(--good); } .pos-t { color: var(--good); } .neg-t { color: var(--bad); }
.up-t { color: var(--bad); } .down-t { color: var(--good); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
/* main takes focus after an in-app navigation (for screen readers); it must not draw Safari's blue ring. */
main:focus { outline: none; }
kbd { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; margin: 0 3px 0 8px; color: var(--ink); }

/* ---- header, summary bar, nav ---- */
/* The header is opaque, with no backdrop-filter: iOS rasterised the logo and text inside the blur layer and they came out
   soft in the standalone app. A solid bar is always crisp. */
.top { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; gap: var(--s4); height: 48px; }
.brand { font-weight: 800; font-size: 17px; line-height: 24px; height: 24px; text-decoration: none; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: var(--s2); }
.brand .glyph { flex: none; width: 24px; height: 24px; }
.dnav { display: none; gap: 2px; flex: 1; }
.dnav a { text-decoration: none; padding: 6px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: var(--fs-md); min-height: 36px; display: inline-flex; align-items: center; transition: color .15s, background .15s; }
.dnav a:hover { color: var(--ink); }
.dnav a[aria-current] { color: var(--ink); background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 2px 0 -1px var(--signal) inset; }
.signout { margin: 0 0 0 auto; flex: none; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: var(--fs-sm); padding: 10px 4px; cursor: pointer; white-space: nowrap; }
button.link:hover { color: var(--ink); }
.pulse { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--card) 60%, transparent); }
.pulse-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); height: 34px; font-size: var(--fs-sm); line-height: 18px; }
.pulse a { text-decoration: none; display: inline-flex; align-items: center; gap: var(--s2); height: 34px; }
.pl-open { font-weight: 600; } .pl-open b { font-weight: 800; }
.ccy { margin: 0 0 0 auto; flex: none; display: inline-flex; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .04em; line-height: 1; min-width: 40px; height: 24px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg, var(--card)); }
.seg button:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.pl-mtd { color: var(--muted); } .pl-mtd b { color: var(--ink); font-weight: 700; } .pl-mtd span { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); flex: none; }
.pl-open.clear .led { background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft), 0 0 10px var(--signal-glow); }
.pl-open.clear { color: var(--signal-text); }

/* iOS-native proportions: 49pt of bar, then the home-indicator inset ONCE (padding-bottom below). The inset is not repeated
   in --tabs-h's callers, in the standalone media query, or in main's padding. */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; box-sizing: border-box; height: calc(49px + var(--tabs-pad, env(safe-area-inset-bottom))); padding: 0 env(safe-area-inset-right) var(--tabs-pad, env(safe-area-inset-bottom)) env(safe-area-inset-left); border-top: 1px solid var(--line); }
.tabs::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 95%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.tabs a, .tabs .more { flex: 1; min-width: 0; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; text-decoration: none; color: var(--muted); font-size: 10px; line-height: 12px; font-weight: 600; position: relative; -webkit-tap-highlight-color: transparent; }
.tabs .ico { width: 24px; height: 24px; }
.tabs .more { background: none; border: 0; font: inherit; font-size: 10px; line-height: 12px; font-weight: 600; cursor: pointer; }
.tabs .more[aria-expanded="true"] { color: var(--ink); }
.tabs a[aria-current], .tabs .more[aria-current] { color: var(--signal-text); }
.tabs a[aria-current]::before, .tabs .more[aria-current]::before { content: ""; position: absolute; top: 0; width: 24px; height: 3px; border-radius: 0 0 3px 3px; background: var(--signal); box-shadow: 0 0 12px var(--signal-glow); }
@media (max-width: 719px) { :root { --tabs-h: calc(49px + var(--tabs-pad, env(safe-area-inset-bottom))); } main.wrap { padding-bottom: 32px; } .bar { height: 44px; } }
@media (min-width: 720px) { .tabs { display: none; } .dnav { display: flex; } :root { --top-h: 96px; } .signout { margin-left: 0; } }

/* ---- surfaces ---- */
.hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: var(--s4) 0 var(--s3); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; top: 0; width: 44px; height: 3px; background: var(--signal); box-shadow: 0 0 14px var(--signal-glow); }
.hero.compact { padding: 14px 18px; }
.label { color: var(--muted); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.big { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; margin: 2px 0; }
.big small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.sub { color: var(--muted); font-size: var(--fs-md); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 99px; font-weight: 700; font-size: var(--fs-sm); background: var(--line); color: var(--muted); }
.chip.up { background: var(--bad-bg); color: var(--bad); } .chip.down { background: var(--good-bg); color: var(--good); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: var(--s4) 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.facts dt { font-size: var(--fs-sm); color: var(--muted); } .facts dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
abbr { text-decoration: none; border-bottom: 1px dotted var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.warn { margin: var(--s3) 0 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.banner { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--signal-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--signal) 40%, var(--line)); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; margin-bottom: var(--s3); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4) var(--s4) var(--s2); margin: 0 0 var(--s3); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }
.card-head h2 { margin: 0; }
.chart { position: relative; height: 240px; border-radius: 8px; }
.chart.loading, .skel { background: linear-gradient(100deg, var(--card-2) 30%, var(--line) 50%, var(--card-2) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
.chart.loading canvas { opacity: 0; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px; }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 7px 11px; border-radius: 8px; cursor: pointer; min-height: 34px; }
.seg button[aria-pressed="true"] { background: var(--card-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; text-decoration: none; min-height: 56px; flex: 1; min-width: 0; }
li.row { flex: initial; }
a.row:hover .name { text-decoration: underline; }
.row.off { opacity: .6; }
.hrow { display: flex; align-items: center; gap: var(--s3); }
.undo-form { margin: 0; flex: none; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.name { font-weight: 600; overflow-wrap: anywhere; }
.right { display: flex; flex-direction: column; align-items: flex-end; flex: none; text-align: right; }
.right .num { font-weight: 700; }
.right small { font-weight: 500; color: var(--muted); font-size: 11px; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--line-2); display: inline-block; }
.meta .dot { margin-right: 6px; }
.dot.gcp, .meter i.gcp { background: var(--gcp); } .dot.github, .meter i.github { background: var(--github); } .dot.neon, .meter i.neon { background: var(--neon); }
.dot.anthropic, .meter i.anthropic { background: var(--anthropic); } .dot.subscriptions, .meter i.subscriptions { background: var(--subs); }
.meter { display: block; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.spark { flex: none; display: none; } .spark.gcp { color: var(--gcp); } .spark.github { color: var(--github); } .spark.neon { color: var(--neon); } .spark.anthropic { color: var(--anthropic); } .spark.subscriptions { color: var(--subs); }
@media (min-width: 520px) { .spark { display: block; } }
.pad { padding: 14px 0; }
.foot { text-align: center; margin-top: 18px; }
.crumbs { margin: var(--s4) 0 0; font-size: var(--fs-md); color: var(--muted); } .crumbs a { color: var(--muted); }
.meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; color: var(--muted); margin: 0 0 6px; }
.risk, .status { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 700; background: var(--line); color: var(--muted); letter-spacing: .02em; }
.risk.low { background: var(--good-bg); color: var(--good); } .risk.medium { background: var(--warn-bg); color: var(--warn); } .risk.high { background: var(--bad-bg); color: var(--bad); }
.status.applied, .status.fixed, .status.inplace { background: var(--good-bg); color: var(--good); } .status.open { background: transparent; border: 1px solid var(--line-2); }
.status.dismissed, .status.undone { background: var(--line); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--signal); color: var(--on-signal); border-color: var(--signal); box-shadow: 0 0 0 0 var(--signal-glow); }
.btn.primary:hover { box-shadow: 0 0 18px -2px var(--signal-glow); border-color: var(--signal); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--ink); border-color: var(--line-2); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: var(--fs-sm); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.btn:focus-visible, a:focus-visible, button:focus-visible, .qc:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.actions-card { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: var(--s4); }
.actions-card form, .actions-form { margin: 0; } .actions-card p { flex-basis: 100%; margin: 0; }
.confirm .lead { font-size: var(--fs-lg); line-height: 1.4; } .confirm form { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: var(--s2); }
.plain { margin: 6px 0 10px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.params { background: var(--bg); padding: 10px; border-radius: 8px; overflow-x: auto; font-size: var(--fs-sm); }
.login { text-align: center; padding-top: 14vh; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 36px 24px 24px; max-width: 380px; margin: 0 auto; box-shadow: var(--shadow); }
.login-card h1 { margin: 8px 0 2px; font-size: 28px; letter-spacing: -.02em; }
.login-card .btn { width: 100%; margin-top: 20px; justify-content: center; }
.login .mark { display: block; width: 64px; height: 64px; margin: 0 auto; border-radius: 15px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.notice { display: inline-block; margin: 14px 0 0; padding: 6px 12px; border-radius: 99px; background: var(--good-bg); color: var(--good); font-weight: 600; font-size: 14px; }
@media (max-width: 420px) { .big { font-size: var(--fs-2xl); } .chart { height: 220px; } }
.grp { margin: 18px 0 var(--s2); } .grp .muted { font-weight: 500; margin-left: 4px; }
.codecard { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; text-decoration: none; margin-bottom: var(--s3); min-height: 48px; }
.codecard .name { font-weight: 600; } .codecard .num { font-weight: 700; display: inline-flex; align-items: center; gap: var(--s2); }
.why { white-space: pre-line; overflow-wrap: anywhere; }
h2.inline { display: inline; }
@media (display-mode: standalone) { body { overscroll-behavior-y: none; } }

/* ---- Today ---- */
.today-head { margin-bottom: var(--s4); } .today-head h1 { margin-bottom: 2px; }
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.qwrap { position: relative; border-radius: var(--radius); transition: max-height .35s var(--ease), opacity .25s, margin .35s var(--ease); max-height: 900px; }
.qwrap.gone { max-height: 0; opacity: 0; margin-top: calc(var(--s3) * -1); overflow: hidden; }
.qbg { position: absolute; inset: 0; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: var(--fs-sm); opacity: 0; transition: opacity .15s; }
.qwrap.swiping .qbg { opacity: 1; }
.qwrap.swipe-r .qbg { background: var(--signal); color: var(--on-signal); } .qwrap.swipe-l .qbg { background: var(--warn); color: #1a1100; }
.qwrap.swipe-r .qbg-l, .qwrap.swipe-l .qbg-r { visibility: hidden; }
.qc { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow); touch-action: pan-y; transition: transform .28s var(--ease), border-color .15s, box-shadow .15s; will-change: transform; }
.qwrap.dragging .qc { transition: none; }
.qc::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line-2); }
.qc.sev-high::before { background: var(--bad); } .qc.k-cost::before { background: var(--signal); } .qc.k-deploy::before, .qc.k-incident::before { background: var(--bad); } .qc.k-budget::before, .qc.k-evals::before, .qc.k-vendor::before { background: var(--warn); } .qc.sev-medium::before { background: var(--warn); }
.qwrap.is-focus .qc { border-color: color-mix(in srgb, var(--signal) 55%, var(--line)); box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--signal) 30%, transparent); }
.qh { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.badge { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--card-2); border: 1px solid var(--line-2); color: var(--muted); flex: none; }
.badge small { font-size: 10px; font-weight: 600; opacity: .8; }
.badge.b-cost { color: var(--signal-text); background: var(--signal-soft); border-color: transparent; }
.badge.b-code { color: var(--github); background: color-mix(in srgb, var(--github) 14%, transparent); border-color: transparent; }
.badge.b-vendor { color: var(--anthropic); background: color-mix(in srgb, var(--anthropic) 14%, transparent); border-color: transparent; }
.badge.b-evals { color: var(--github); background: color-mix(in srgb, var(--github) 14%, transparent); border-color: transparent; }
.badge.b-budget { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.badge.b-deploy, .badge.b-incident { color: var(--bad); background: var(--bad-bg); border-color: transparent; }
.qtarget { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.qval { flex: none; font-size: var(--fs-md); } .qval small { color: var(--muted); font-size: 11px; margin-left: 2px; } .qval b { font-weight: 800; font-size: var(--fs-lg); letter-spacing: -.01em; }
.qt { font-size: var(--fs-lg); line-height: 1.3; margin: var(--s2) 0 var(--s3); letter-spacing: -.01em; }
.qt a { text-decoration: none; overflow-wrap: anywhere; } .qt a:hover { text-decoration: underline; }
.qfacts { margin: 0 0 var(--s3); display: grid; gap: 7px; font-size: var(--fs-sm); line-height: 1.45; }
.qfacts div { display: grid; grid-template-columns: 92px 1fr; gap: var(--s2); }
.qfacts dt { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; padding-top: 2px; }
.qfacts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .qfacts div { grid-template-columns: 1fr; gap: 1px; } }
.confirm .qfacts { margin-top: var(--s3); }
.pill { display: inline-block; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--card-2); border: 1px solid var(--line-2); color: var(--muted); margin-right: 4px; }
.pill.prod { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.qbtns { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.qbtns .btn { min-height: 44px; padding: 0 16px; }
.qbtns .btn.primary { flex: 1 1 120px; max-width: 220px; }
.qc > p.sm { margin: var(--s2) 0 0; }
.hint { text-align: center; margin-top: var(--s5); }
.touch-hint { display: none; }
@media (hover: none) and (pointer: coarse) { .kbd-hint { display: none; } .touch-hint { display: block; } }
.qskel { padding: var(--s4); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.qskel .skel { height: 14px; border-radius: 6px; margin-bottom: 10px; } .skel.s1 { width: 40%; } .skel.s2 { width: 85%; height: 20px; } .skel.s3 { width: 65%; }
.qskel p { margin: 4px 0 0; }

/* ---- toasts, pull to refresh ---- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + 14px); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: 0 var(--s4); pointer-events: none; }
@media (min-width: 720px) { #toasts { bottom: 24px; } }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: center; gap: var(--s3); max-width: 520px; width: 100%; background: var(--ink); color: var(--bg); border-radius: 14px; padding: 12px 8px 12px 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); animation: toast-in .35s var(--ease); font-size: var(--fs-md); }
.toast.out { animation: toast-out .25s ease forwards; }
.toast.err { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad); }
.tmsg { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.toast form { margin: 0; }
.tundo { border: 0; background: var(--bg); color: var(--signal-text); font: inherit; font-weight: 800; padding: 9px 16px; border-radius: 10px; cursor: pointer; min-height: 40px; }
.toast.err .tundo { background: var(--card); }
.tclose { border: 0; background: none; color: inherit; opacity: .6; font-size: 22px; line-height: 1; cursor: pointer; padding: 8px 10px; min-height: 40px; }
.tbar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--signal); transform-origin: left; animation: tbar linear forwards; }
#ptr { position: fixed; top: calc(env(safe-area-inset-top) + 44px); left: 50%; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); z-index: 15; opacity: 0; transform: translateY(-60px); pointer-events: none; display: grid; place-items: center; }
#ptr i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--signal); }
#ptr.on i { animation: spin .7s linear infinite; }
.work { transition: opacity .2s; }

@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes toast-in { from { transform: translateY(24px) scale(.96); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(16px); opacity: 0; } }
@keyframes tbar { to { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .chart.loading, .skel { animation: none; }
  .tbar { animation: none; transform: scaleX(.5); }
}

/* ---- refinements ---- */
.today-head p { margin: 0; }
@media (max-width: 480px) {
  .qc { padding: 14px; } .qt { font-size: 17px; margin: 6px 0 10px; }
  .qbtns { flex-wrap: nowrap; gap: 6px; }
  .qbtns .btn { padding: 0 12px; min-height: 46px; white-space: nowrap; }
  .qbtns .btn.primary { flex: 1 1 0; max-width: none; }
}

/* hand-off partial inside a Today card: collapsed, flat */
.qho { margin: 0 0 var(--s3); border-top: 1px solid var(--line); padding-top: 2px; }
.qho > summary { cursor: pointer; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; min-height: 40px; display: flex; align-items: center; list-style: none; }
.qho > summary::-webkit-details-marker { display: none; }
.qho > summary::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.qho[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.qho .card.ho { border: 0; box-shadow: none; background: transparent; padding: 0 0 4px; margin: 0; }
.qho .ho h2 { display: none; }

/* More sheet + mobile header */
.sheet { position: fixed; right: var(--s3); bottom: calc(var(--tabs-h) + 8px); z-index: 30; min-width: 200px; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); padding: 6px; animation: toast-in .2s var(--ease); }
.sheet[hidden] { display: none; }
.sheet a, .sheet button { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px; text-decoration: none; background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.sheet a[aria-current] { color: var(--signal-text); } .sheet a:active, .sheet button:active { background: var(--card-2); }
.sheet form { margin: 0; }
@media (max-width: 719px) { .top .signout { display: none; } }
@media (min-width: 720px) { .sheet { display: none !important; } }
.qho-body .ho { border: 0; }
main:has(.clear-banner) .hint { display: none; }

/* ---- generic skeletons and lazy regions ---- */
.skel { height: 14px; border-radius: 6px; margin: 0 0 10px; } .skel.s2 { height: 20px; }
[data-lazy-src][data-state="error"] { color: var(--muted); }
.tl-lazy { list-style: none; padding: 8px 0 0; }

/* ---- Today: compact "all clear" banner ---- */
.clear-banner { display: flex; align-items: center; gap: var(--s3); padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--signal); border-radius: var(--radius); color: var(--signal-text); }
.clear-banner svg { flex: none; }
.cb-t { flex: 1; min-width: 0; } .clear-banner h2 { margin: 0; font-size: var(--fs-md); color: var(--ink); } .clear-banner p { margin: 0; }
.clear-banner .btn { flex: none; color: var(--ink); }

/* ---- Today: at a glance ---- */
.glance { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin: 0 0 var(--s2); }
.gl { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-width: 0; min-height: 108px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.gl:active { background: var(--card-2); }
.gl-spend { grid-column: 1 / -1; min-height: 92px; }
.gl-l { font-size: 11px; line-height: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.gl-m { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 4px; }
.gl-big { font-size: 30px; line-height: 34px; font-weight: 800; letter-spacing: -.025em; }
.gl-sub { font-size: var(--fs-sm); line-height: 20px; color: var(--muted); }
.gl-spend > :not(svg) { max-width: 58%; }
.gl-spark { position: absolute; right: 14px; top: 16px; bottom: 16px; width: 36%; height: calc(100% - 32px); color: var(--signal-text); }
.gl-fleet { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "l l" "r g"; align-content: start; gap: 4px 10px; }
.gl-fleet .gl-l { grid-area: l; }
.ringwrap { grid-area: r; position: relative; width: 64px; height: 64px; }
.ring { display: block; } .arc.green { stroke: var(--good); } .arc.amber { stroke: var(--warn); } .arc.red { stroke: var(--bad); }
.ringn { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; }
.hdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--line); }
.hdot.green { background: var(--good); } .hdot.amber { background: var(--warn); } .hdot.red { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.legend { grid-area: g; display: flex; flex-direction: column; justify-content: center; gap: 3px; font-size: var(--fs-sm); font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--muted); } .legend b { color: var(--ink); font-weight: 800; }
.kindchip { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; line-height: 18px; font-weight: 700; background: var(--card-2); border: 1px solid var(--line-2); color: var(--muted); }
.kc-cost { color: var(--signal-text); background: var(--signal-soft); border-color: transparent; }
.kc-code { color: var(--github); background: color-mix(in srgb, var(--github) 14%, transparent); border-color: transparent; }
.kc-budget { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.kc-deploy, .kc-incident { color: var(--bad); background: var(--bad-bg, color-mix(in srgb, var(--bad) 14%, transparent)); border-color: transparent; }
.gl-dec .gl-sub { display: flex; gap: 4px; flex-wrap: wrap; }
.gl-save { margin-top: auto; font-size: var(--fs-sm); } .gl-save small { color: var(--muted); margin-left: 3px; }
.gl-more { margin: 0 0 var(--s4); }
.gl-toggle { display: none; }
.gl-body { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.gl-col { min-width: 0; } .gl-col h2 { font-size: 11px; line-height: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; } .gl-col h2 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.runs, .acts { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.runs li, .acts li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding: 5px 0; line-height: 18px; }
.runs li + li, .acts li + li { border-top: 1px solid var(--line); }
.rn { font-weight: 600; } .rt { text-align: right; } .rt small { display: block; font-size: 11px; line-height: 14px; }
.acts li { align-items: center; justify-content: flex-start; gap: var(--s2); }
.acts .evdot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); } .acts .good .evdot { background: var(--good); } .acts .bad .evdot { background: var(--bad); }
.acts .at { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .acts .at a { text-decoration: none; } .acts time { flex: none; font-size: 12px; }
@media (min-width: 720px) { .glance { grid-template-columns: 1.5fr 1fr 1fr; } .gl-spend { grid-column: auto; } }
@media (max-width: 640px) {
  .gl-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); width: 100%; min-height: 44px; padding: 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font: inherit; font-size: var(--fs-sm); cursor: pointer; text-align: left; }
  .gl-toggle .muted { font-size: 12px; }
  .gl-body { display: none; margin-top: var(--s2); grid-template-columns: 1fr; }
  .gl-more.open .gl-body { display: grid; }
}

/* ---- Today card: collapse the Approve/Blast/Undo block on phones ---- */
.qsum { display: none; }
@media (max-width: 640px) {
  .qsum { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font-size: var(--fs-sm); line-height: 18px; color: var(--muted); }
  .qsum-t { flex: 1; min-width: 0; }
  .qdet { flex: none; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
  .qdet[aria-expanded="true"] { border-color: var(--signal); }
  .qfacts { display: none; }
  .qc.det-open .qfacts { display: grid; }
}

/* ---- tab navigation without a page load (static/nav.js) ---- */
.nav-skel { padding-top: var(--s4); } .nav-skel .skel { height: 120px; border-radius: var(--radius); margin-bottom: var(--s3); } .nav-skel .skel.t { width: 38%; height: 28px; margin-bottom: var(--s4); } 
main#main { view-transition-name: page; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(page) { animation-duration: .1s; }

/* Claude Code row on Today cards: always visible, directly under the decision buttons. */
.qcc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px dashed var(--line); }
.qcc-l { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); margin-right: auto; }
.qcc-l svg { color: #d97757; }
.qcc .btn.sm-btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.qcc .btn.cc-fix { border-color: color-mix(in srgb, #d97757 55%, var(--line-2)); color: var(--ink); }
.qcc .ho-status { flex-basis: 100%; margin: 4px 0 0; }

/* Push alerts control (More sheet on phones, header on desktop) */
.alerts-top { display: none; margin-left: auto; gap: var(--s3); }
@media (min-width: 720px) { .alerts-top { display: inline-flex; } .alerts-top + .signout { margin-left: var(--s3); } }
.js-push[hidden], .alerts-top .js-push[hidden] { display: none; }
.js-push[aria-busy="true"] { opacity: .6; }

.done-link { margin: var(--s3) 0 0; } .done-link a { color: var(--muted); }
.done-list .row { gap: var(--s3); align-items: center; } .done-list .right { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.done-list .btn.sm-btn { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* vendors on Costs */
.meter i.usage { background: var(--signal); } .meter i.usage.high { background: var(--warn); }
.vline { margin: 0 0 var(--s2); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; } .vline .num:last-child { margin-left: auto; font-weight: 700; }
.big2 { font-size: var(--fs-xl); font-weight: 700; } .vmeta { margin: var(--s2) 0 0; }
.card-head .btn.small { min-height: 40px; }

/* sticky summary on phones: keep "n open", Month to date and the AUD | USD toggle on one line */
.pulse-in { white-space: nowrap; }
@media (max-width: 479px) { .pulse-in { gap: var(--s2); } .pulse .lg { display: none; } .seg button { min-width: 36px; padding: 0 8px; } .ccy { margin-left: auto; } }
