@font-face { font-family: "Inter"; src: url("fonts/inter-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-latin.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }

/* Layout: phone-first app shell. Phone = page header + content + fixed bottom tabs, details in bottom sheets.
   ≥900px = sidebar + content (max 1120px), details in a right-hand panel. Motif: story rings + "route" chips (creator → group › topic). */
:root {
  --bg: #f2f6fa; --surface: #ffffff; --raise: #f7fafd; --well: #e9f0f7; --ink: #0a1624; --ink-2: #33475e; --muted: #64768b; --line: #dbe5ef;
  --accent: #229ed9; --accent-ink: #0b6fa3; --accent-soft: #dff1fb; --on-accent: #ffffff;
  --ok: #138a4a; --ok-soft: #dcf4e5; --warn: #b25a06; --warn-soft: #fdefd9; --bad: #c2381c; --bad-soft: #fde4dc; --idle: #6b7b8f; --idle-soft: #e9eef4;
  --ig: linear-gradient(140deg, #f2a7c3, #c7a0e6); --snap: #fffc00; --ring-idle: #b8c4d2;
  --shadow: 0 1px 2px rgba(10, 22, 36, .05), 0 6px 20px rgba(10, 22, 36, .06);
  --display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #050b14; --surface: #0b1320; --raise: #0e1828; --well: #111e31; --ink: #e8eef7; --ink-2: #c3d0e0; --muted: #94a3b8; --line: #1a2940;
  --accent: #229ed9; --accent-ink: #62cbff; --accent-soft: #0b2a42; --on-accent: #ffffff;
  --ok: #4ade80; --ok-soft: #0c2a19; --warn: #fbbf24; --warn-soft: #2b2108; --bad: #fb8a6a; --bad-soft: #31150c; --idle: #94a3b8; --idle-soft: #162235; --ring-idle: #3a4a60;
  --ig: linear-gradient(140deg, #c77997, #8f78b8);
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 10px 30px rgba(0,0,0,.4); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #050b14; --surface: #0b1320; --raise: #0e1828; --well: #111e31; --ink: #e8eef7; --ink-2: #c3d0e0; --muted: #94a3b8; --line: #1a2940;
  --accent: #229ed9; --accent-ink: #62cbff; --accent-soft: #0b2a42; --on-accent: #ffffff;
  --ok: #4ade80; --ok-soft: #0c2a19; --warn: #fbbf24; --warn-soft: #2b2108; --bad: #fb8a6a; --bad-soft: #31150c; --idle: #94a3b8; --idle-soft: #162235; --ring-idle: #3a4a60;
  --ig: linear-gradient(140deg, #c77997, #8f78b8);
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 10px 30px rgba(0,0,0,.4); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 5vw, 34px); line-height: 1.1; letter-spacing: -.025em; }
h2 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.015em; }
h3 { font-size: 14px; font-weight: 600; }
.sub { color: var(--muted); margin: 6px 0 0; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Shell */
.shell { display: grid; }
.side { display: none; }
.main { min-width: 0; padding: 14px 16px calc(100px + env(safe-area-inset-bottom, 0px)); }
.mtop { display: flex; align-items: center; justify-content: space-between; margin-block-end: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.logo { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: var(--on-accent); }
.logo svg { width: 18px; height: 18px; }
.me { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-block-end: 20px; }
.tabs { position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(var(--tab-count, 5), 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
.tab { display: grid; justify-items: center; gap: 2px; border: 0; background: none; padding: 6px 2px; border-radius: 12px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--accent-ink); }
@media (min-width: 900px) {
  .shell { grid-template-columns: 240px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; height: 100vh; }
  .side .brand { padding: 2px 10px 22px; }
  .side .tab { grid-template-columns: 22px 1fr; justify-items: start; align-items: center; gap: 12px; padding: 10px 12px; font-size: 14.5px; }
  .side .tab[aria-current="page"] { background: var(--accent-soft); }
  .side .foot { margin-top: auto; padding: 12px; font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
  .tabs, .mtop { display: none; }
  .main { padding: 32px 40px 56px; max-width: 1120px; width: 100%; }
}

/* Surfaces */
.stack { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; min-width: 0; }
.card.lift { box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 14px; }
.cols { display: grid; gap: 16px; }
@media (min-width: 760px) { .cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }

/* Buttons */
.btn { border: 1px solid var(--line); background: var(--surface); padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent-ink); padding-inline: 8px; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Story ring avatars */
.ring { --sz: 44px; width: var(--sz); height: var(--sz); border-radius: 50%; padding: 2.5px; background: var(--ig); flex: none; display: grid; }
.ring.snap { background: var(--snap); }
.ring.idle { background: var(--ring-idle); }
.ring.warn { background: var(--warn); }
.ring > span { border-radius: 50%; background: var(--surface); padding: 2px; display: grid; }
.ring > span > b { border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: calc(var(--sz) * .36); background: var(--well); color: var(--ink-2); }
.ring.lg { --sz: 64px; }
.ring.sm { --sz: 34px; }

/* Route chip: creator → group › topic */
.route { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); min-width: 0; }
.route .g { font-weight: 600; }
.route .sep { color: var(--muted); }
.route .tp { background: var(--accent-soft); color: var(--accent-ink); padding: 1px 8px; border-radius: 999px; font-weight: 600; font-size: 12.5px; }
.route .tp.own { background: var(--well); color: var(--ink-2); }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.idle { background: var(--idle-soft); color: var(--idle); }
.tag { font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--well); padding: 2px 8px; border-radius: 7px; white-space: nowrap; }

/* Home */
.hero { display: grid; gap: 14px; padding: 20px; border-radius: 22px; background:
  radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--surface); border: 1px solid var(--line); }
.status-line { display: flex; gap: 12px; align-items: center; }
.pulse { width: 11px; height: 11px; border-radius: 50%; background: var(--ok); flex: none; animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } * { scroll-behavior: auto !important; } }
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fig b { display: block; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: -.02em; }
.fig span { font-size: 12.5px; color: var(--muted); }
.strip-rings { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.story { display: grid; justify-items: center; gap: 6px; border: 0; background: none; padding: 0; width: 68px; flex: none; }
.story .ring { --sz: 60px; }
.story small { font-size: 11.5px; color: var(--muted); max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story small b { color: var(--ink); font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; height: 120px; }
.bar { display: grid; gap: 6px; justify-items: center; height: 100%; align-content: end; }
.bar i { display: block; width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--accent) 30%, var(--well)); }
.bar.today i { background: var(--accent); }
.bar span { font-size: 11.5px; color: var(--muted); }
.meter { height: 8px; border-radius: 99px; background: var(--well); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.limit { display: grid; gap: 6px; } .limit > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.todo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.todo:first-of-type { border-top: 0; padding-top: 0; }
.todo p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

/* Creators */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; flex: 1 1 240px; min-width: 0; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { opacity: .6; margin-left: 4px; }
.clist { display: grid; }
.crow { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 6px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; width: 100%; border-radius: 0; }
.crow:first-child { border-top: 0; }
.crow:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.crow .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow .m { display: grid; gap: 3px; min-width: 0; }
.crow .r { display: grid; justify-items: end; gap: 4px; font-size: 12.5px; color: var(--muted); }
.check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; color: var(--on-accent); }
.check.on { background: var(--accent); border-color: var(--accent); }
.nocheck .check { display: none; }
.nocheck .crow { grid-template-columns: auto minmax(0, 1fr) auto; }
.bulkbar { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; background: var(--ink); color: var(--bg); padding: 10px 12px; border-radius: 16px; box-shadow: var(--shadow); }
.bulkbar .btn { background: color-mix(in srgb, var(--bg) 12%, transparent); color: var(--bg); border-color: transparent; }
@media (min-width: 900px) { .bulkbar { left: calc(240px + 40px); right: 40px; bottom: 24px; max-width: 1040px; } }

/* Groups + topic board */
.ggrid { display: grid; gap: 14px; }
@media (min-width: 720px) { .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gcard { display: grid; gap: 14px; text-align: left; width: 100%; }
.gcard .rings { display: flex; }
.gcard .rings .ring { margin-left: -8px; } .gcard .rings .ring:first-child { margin-left: 0; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.facts div { background: var(--raise); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.facts b { display: block; } .facts span { font-size: 12px; color: var(--muted); }
.board { display: grid; gap: 10px; }
.tcol { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--raise); display: grid; gap: 10px; }
.tcol header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cchips { display: flex; flex-wrap: wrap; gap: 6px; }
.cchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 13px; font-weight: 600; }
.cchip .ring { --sz: 24px; padding: 1.5px; } .cchip .ring > span { padding: 1px; }

/* Activity */
.day { margin: 18px 0 4px; } .day:first-child { margin-top: 0; }
.event { display: grid; grid-template-columns: 50px 28px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.event time { color: var(--muted); font-size: 13px; padding-top: 3px; }
.dot { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.event p { margin: 0; } .event small { color: var(--muted); }

/* Tables */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* Dialog: centred on every screen, scales + fades in; panes slide when going forward/back */
.scrim { position: fixed; inset: 0; background: rgba(5, 11, 20, .5); z-index: 30; opacity: 0; transition: opacity .22s ease; }
.scrim.show { opacity: 1; }
.sheet { position: fixed; z-index: 31; left: 50%; top: 50%; width: min(560px, calc(100% - 32px)); max-height: min(86%, 760px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 0 22px 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
  opacity: 0; transform: translate(-50%, -46%) scale(.96); transition: opacity .2s ease, transform .28s cubic-bezier(.2, .8, .2, 1); }
.sheet.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.dhead { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0 10px; background: var(--surface); }
.dback { border: 0; background: none; color: var(--accent-ink); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px 6px 2px; border-radius: 10px; }
.dback svg { width: 18px; height: 18px; }
.x { border: 0; background: var(--well); width: 34px; height: 34px; border-radius: 50%; flex: none; }
.pane { animation: none; }
.pane.fwd { animation: inFwd .28s cubic-bezier(.2, .8, .2, 1); }
.pane.back { animation: inBack .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes inFwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes inBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet, .scrim { transition: none; } .pane.fwd, .pane.back, .fade-in, .page-in { animation: none !important; } .seg2 .thumb { transition: none !important; } }
.prop { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.prop .k { font-size: 12.5px; color: var(--muted); grid-column: 1 / -1; }
.prop .v { min-width: 0; }
.opts { display: grid; gap: 8px; }
.opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; width: 100%; transition: border-color .15s, background .15s; }
.opt[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); transition: border-width .15s, border-color .15s; }
.opt[aria-checked="true"] .radio { border: 6px solid var(--accent); }
.opt small { display: block; color: var(--muted); font-size: 12.5px; }
.steps { display: flex; gap: 6px; margin: 0 0 18px; }
.steps i { height: 4px; flex: 1; border-radius: 4px; background: var(--well); transition: background .25s; }
.steps i.on { background: var(--accent); }
.preview { border-radius: 16px; padding: 14px; background: var(--raise); border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); display: grid; gap: 8px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 12px; width: 100%; min-width: 0; }
.input:focus { border-color: var(--accent); outline: none; }
.hint { font-size: 12.5px; color: var(--muted); }
.callout { border-radius: 14px; padding: 12px 14px; font-size: 13.5px; background: var(--accent-soft); color: var(--ink); }
.callout.warn { background: var(--warn-soft); }

/* iOS-style segmented filter: a pill slides to the chosen option */
.seg2 { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--well); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg2 .thumb { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; background: var(--surface); box-shadow: 0 1px 3px rgba(10, 22, 36, .12), 0 0 0 .5px var(--line);
  transition: transform .32s cubic-bezier(.3, .9, .3, 1), width .32s cubic-bezier(.3, .9, .3, 1); }
.seg2 button { position: relative; z-index: 1; flex: none; border: 0; background: none; padding: 7px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: color .2s; white-space: nowrap; }
.seg2 button[aria-pressed="true"] { color: var(--ink); }
.seg2 .n { opacity: .55; margin-left: 4px; font-weight: 500; }
.fade-in { animation: fadeIn .26s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-in { animation: fadeIn .22s ease; }

/* Toast */
.toast { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
@media (min-width: 900px) { .toast { bottom: 28px; left: calc(50% + 120px); } }

/* Login */
.login { max-width: 440px; margin: 6vh auto 0; display: grid; gap: 18px; }
.lsteps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.lsteps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; counter-increment: s; }
.lsteps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; }

/* App additions */
html { color-scheme: light; }
body { margin: 0; padding-top: env(safe-area-inset-top, 0px); }
.shell { min-height: 100%; }
.boot { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.empty { display: grid; gap: 10px; justify-items: start; }
.session-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.card-head + .session-row { border-top: 0; }
.session-row small { color: var(--muted); }
.navstack { display: grid; gap: 4px; }
.login .brand { justify-content: center; font-size: 22px; }
.login h1, .login > .hint { text-align: center; }

/* Step 2 helpers (no inline styles allowed by the CSP) */
.grow { min-width: 0; flex: 1; }
.sub.tight, .sub.inline { margin: 0; } .sub.inline { font-size: 13px; } .sub.small { font-size: 13px; }
.pills { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.dialog-hero { display: flex; gap: 14px; align-items: center; margin: 0 0 16px; }
.spaced { margin-top: 16px; } .pad { padding: 16px 6px; }
.list-card { padding: 4px 12px; }
.tight-stack { gap: 12px; }
.fig-suffix { font-size: 16px; color: var(--muted); }
.gtop { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.rings .more { margin-left: 8px; align-self: center; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.add-card { display: grid; gap: 10px; align-content: center; justify-items: start; border-style: dashed; }
.prop.first { border-top: 0; padding-top: 0; }
.btn.fit { justify-self: start; }
.hero.attn { background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--warn) 18%, transparent), transparent 60%), var(--surface); }
.pulse.warn { background: var(--warn); animation: none; }
.dot.ok { background: var(--ok-soft); color: var(--ok); } .dot.warn { background: var(--warn-soft); color: var(--warn); }
.dot.info, .dot.idle { background: var(--idle-soft); color: var(--idle); }
a.btn { text-decoration: none; color: inherit; } a.btn.primary { color: var(--on-accent); }
.hint a { color: var(--accent-ink); font-weight: 600; }
@media (min-width: 900px) {
  /* Paint the sidebar column the full page height (the sticky panel itself is one screen tall). */
  .shell { background: linear-gradient(90deg, var(--surface) 240px, var(--line) 240px, var(--line) 241px, transparent 241px); }
  .side { border-right: 0; }
}

/* Responsive fixes: grid tracks must never grow to a child's natural width (the
   filter bar is wider than a phone), so every layout column is minmax(0, 1fr)
   and wide-content children scroll inside themselves. */
.stack { grid-template-columns: minmax(0, 1fr); }
.stack > *, .cols > *, .ggrid > *, .pagehead > * { min-width: 0; }
.seg2 { display: flex; width: max-content; max-width: 100%; }
.filters-wrap { min-width: 0; max-width: 100%; overflow: hidden; }
.crow .r { min-width: 0; }
.pagehead { flex-wrap: wrap; }
/* Wide screens: use the space, centred, instead of a narrow column on the left. */
@media (min-width: 900px) {
  .main { max-width: 1600px; margin-inline: auto; padding-inline: 48px; }
}
@media (min-width: 1500px) {
  .crow { padding-block: 14px; }
}

.spaced-bottom { margin: 0 0 16px; }
