/* Hallmark · shape: app screen · genre: editorial · theme: Atelier (deal 1/3, seed bedside-dosing-protocol-reference-d1f7·cdebd52c·2026-12-01·r0) · redesign: full
 * nav: kept (top patient card, bottom tab bar) · signature: the dose ledger, each computed dose set large and right-aligned on a ruled row · states: loading, empty, error (premium content, account, consent)
 * axes: mid/roman-serif/cool · posture: restrained, plus a declared navy brand band behind the masthead (--mast-bg, a surface, not accent) · contrast: pass · modes: light+dark · brand: logo, navy and red kept · faces: Newsreader for Sentient (offline, self-hosted), Hanken Grotesk · copy: verbatim (clinically reviewed text) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4 · weakest: P, a calm reference could drift into a generic notes app; the ledger with doses set large and the pressed patient card carry the argument that a dose should read like a signed prescription */
/* Hallmark · waive 38iii · the wordmark MedCrit sets Crit in the brand red · it is the user's logotype, kept as found in the brand */
/* Hallmark · dismissed F4 · .btn.red is the code-mode drug and shock action and #navfab buttons are outlined on card, neither a second primary · ES and EN are text toggles, underlined when pressed, never filled */
/* Hallmark · finish-review: subagent · fix · 8 findings · 7 resolved 1 partial (navfab now shows only while scrolling, still over the dose column for those seconds) · gap: dark mode shares less of the material than light */
/* Hallmark · community 0.9.2 · the case of the week rides the pressed card stock of the patient card; vote shares are set like doses, large and right-aligned on ruled rows · feed is a ruled index, not cards · kept FAILs on #gate fields are the account gate, absent from the serverless lint copy */
@import url("./tokens.css");
@import url("./base.css");

/* ---------- page ---------- */
body { color: var(--color-ink); font-size: var(--text-md); line-height: 1.55; font-variant-numeric: tabular-nums; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: var(--z-sticky-nav); background: var(--mast-bg); }
a { color: var(--color-info); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- masthead: wordmark, language, the patient card ---------- */
.mast { color: var(--mast-ink); color-scheme: dark; background: linear-gradient(var(--mast-bg) 0 calc(100% - var(--space-2xl)), transparent 0); }
.mast:has(#pcard[hidden]) { background: var(--mast-bg); color: var(--mast-ink); }
.mast:has(#pcard[hidden]) .mast-in { padding-bottom: var(--space-md); }
.mast details.patient { color-scheme: light dark; }
.mast header button:focus-visible, .mast header a:focus-visible { outline-color: var(--mast-ink); }
.mast-in { max-width: var(--container); margin-inline: auto; padding-inline: max(var(--space-md), env(safe-area-inset-left, 0px)); padding-block: var(--space-md) 0; display: flex; flex-direction: column; gap: var(--space-md); }
header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.brand { display: flex; align-items: center; gap: var(--space-xs) var(--space-sm); min-width: 0; flex-wrap: wrap; }
.brand h1 { max-width: none; font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-2xl); letter-spacing: -0.01em; line-height: 1; color: var(--mast-ink); }
.brand h1 a { display: inline-flex; align-items: center; gap: var(--space-sm); color: inherit; text-decoration: none; }
.brand h1 svg { width: 36px; height: 36px; border-radius: var(--space-xs); background: var(--color-logo-ground); flex: 0 0 auto; box-shadow: 0 0 0 1px var(--mast-line); }
.brand h1 span { color: var(--color-brand-red); }
.brand small { color: var(--mast-muted); font-size: var(--text-sm); }
.seg { display: inline-flex; gap: var(--space-2xs); flex: 0 0 auto; }
.seg button { min-height: var(--hit); min-width: var(--hit); border: 0; background: none; color: var(--color-muted); font: var(--data-weight) var(--text-sm) var(--font-body); padding: 0 var(--space-xs); cursor: pointer; text-decoration: none; border-radius: var(--radius-control); transition: color var(--dur-micro) var(--ease-out); }
.seg button:hover { color: var(--color-ink); }
.mast .seg button { color: var(--mast-muted); }
.mast .seg button:hover, .mast .seg button[aria-pressed="true"] { color: var(--mast-ink); text-decoration-color: var(--mast-ink); }
.seg button[aria-pressed="true"] { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }

.stock, details.patient, .wbox { position: relative; color: var(--color-ink); border-radius: var(--radius-card); background: var(--fibre) 0 0 / 220px, linear-gradient(160deg, var(--card-lit), var(--color-card) 55%, var(--card-shade)); box-shadow: var(--shadow-card), inset 1px 1px 0 var(--lit); text-shadow: 0 1px 0 var(--lit); }
details.patient::before, .wbox::before { content: ""; position: absolute; inset: var(--space-sm); border: var(--rule-hair) solid var(--color-card-edge); pointer-events: none; }
details.patient > *, .wbox > * { position: relative; }
details.patient summary { list-style: none; cursor: pointer; min-height: var(--hit); padding: var(--space-lg) var(--space-lg) var(--space-xs); display: flex; justify-content: space-between; gap: var(--space-sm); align-items: center; font: var(--display-weight) var(--text-lg) var(--font-display); color: var(--color-ink); }
details.patient summary::-webkit-details-marker { display: none; }
details.patient summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--color-ink-2); border-bottom: 1.5px solid var(--color-ink-2); transform: rotate(-135deg); margin-top: var(--space-2xs); }
details.patient:not([open]) summary::after { transform: rotate(45deg); margin-top: calc(var(--space-2xs) * -1); }
.pbody { padding: 0 var(--space-lg) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md); }
@media (max-width: 560px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

label.f { display: flex; flex-direction: column; gap: var(--space-2xs); font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); min-width: 0; }
input, select { font: 400 var(--text-md) var(--font-body); font-variant-numeric: tabular-nums; color: var(--color-ink); background: transparent; border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-control); min-height: var(--control); padding: 0 var(--space-xs); width: 100%; min-width: 0; }
input::placeholder { color: var(--color-pencil); }
input:disabled, select:disabled { background: var(--color-paper-3); color: var(--color-muted); cursor: not-allowed; opacity: 0.7; }
.mast input, .mast select { font-size: var(--text-xl); font-weight: var(--data-weight); border-width: 0 0 var(--rule-hair); border-radius: 0; padding: 0 0 var(--space-2xs); min-height: var(--hit); }
.mast select { font-size: var(--text-lg); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.derived { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-card-edge); }
.chip { font: var(--data-weight) var(--text-sm) var(--font-body); color: var(--color-ink); white-space: nowrap; }
.chip b { font-weight: 400; color: var(--color-muted); margin-right: var(--space-2xs); }
.chip.ped { color: var(--color-info); }
.chip.ob { color: var(--color-warn); white-space: normal; }
.chip.est { color: var(--color-alert); }

/* ---------- the page ---------- */
.wrap { max-width: var(--container); margin: 0 auto; padding-left: max(var(--space-md), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-md), env(safe-area-inset-right, 0px)); padding-block: var(--space-xs) calc(var(--space-3xl) + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: var(--space-md); }
.banner { background: var(--color-warn-soft); color: var(--color-ink-2); border-radius: var(--radius-control); padding: var(--space-xs) var(--space-sm); font-size: var(--text-sm); line-height: 1.45; }
nav.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--z-sticky); background: var(--color-paper); padding-block: var(--space-xs); display: flex; flex-direction: column; gap: var(--space-2xs); border-bottom: var(--rule-hair) solid var(--color-rule); }
.navrow { display: flex; align-items: center; gap: var(--space-xs); }
.navrow .crumbs { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs); font: 400 var(--text-sm) var(--font-body); color: var(--color-ink); }
.crumbs a { color: var(--color-ink-2); text-decoration: underline; text-decoration-color: var(--color-rule-strong); }
.crumbs a:hover { text-decoration-color: var(--color-accent); }
.crumbs span.sep { color: var(--color-pencil); }
.hist { display: flex; gap: var(--space-2xs); flex: 0 0 auto; }
.hist button { width: var(--control); height: var(--control); border-radius: var(--radius-control); border: var(--rule-hair) solid var(--color-rule-strong); background: none; color: var(--color-ink); display: grid; place-items: center; padding: 0; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.hist button:hover { background: var(--color-paper-2); }
.hist button:active { background: var(--color-paper-3); }
.hist button:disabled { color: var(--color-pencil); border-color: var(--color-rule); cursor: not-allowed; opacity: 0.7; }
.hist button svg { width: 18px; height: 18px; }
.mini { font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); }
.mini a { color: var(--color-ink-2); }

.search input { font: 400 var(--text-md) var(--font-body); min-height: 48px; padding: 0 var(--space-md); background: var(--color-card); border-color: var(--color-rule-strong); }

/* group heads open on an ink rule */
.section-lb { display: flex; align-items: baseline; gap: var(--space-xs); margin: var(--space-xl) 0 0; padding-bottom: var(--space-xs); border-bottom: var(--rule-head) solid var(--color-ink); font: var(--display-weight) var(--text-section) var(--font-display); letter-spacing: var(--tracking-display); line-height: 1.15; color: var(--color-ink); }
.section-lb > span, .section-lb > h2 { flex: 1; min-width: 0; }
h2.section-lb { max-width: none; }
.section-lb > h2 { max-width: none; font: inherit; letter-spacing: inherit; }
.section-lb.sub { margin: var(--space-xl) 0 0; padding-bottom: var(--space-xs); border-bottom: var(--rule-head) solid var(--color-ink); font: var(--display-weight) var(--text-xl) var(--font-display); color: var(--color-ink); max-width: none; }
.section-lb.sub + .row { border-top: 0; }
.section-lb .sico { width: 22px; height: 22px; align-self: center; }
.linkbtn { order: 1; margin-left: auto; border: 0; background: none; min-height: var(--hit); padding: 0 0 0 var(--space-xs); font: 400 var(--text-sm) var(--font-body); color: var(--color-info); cursor: pointer; white-space: nowrap; letter-spacing: 0; text-decoration: underline; text-underline-offset: 0.2em; }
a.linkbtn { display: inline-flex; align-items: center; }

/* tools: a ruled index, not a wall of tiles */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--space-lg); }
@media (max-width: 560px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-md); } }
.tool { position: relative; display: flex; flex-direction: column; gap: var(--space-3xs); padding: var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); text-decoration: none; color: var(--color-ink); min-width: 0; transition: color var(--dur-micro) var(--ease-out); }
.tool b { font: var(--data-weight) var(--text-md) var(--font-body); line-height: 1.3; padding-right: var(--space-lg); }
.tool small { color: var(--color-muted); font-size: var(--text-sm); line-height: 1.4; }
.tool:hover b { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }
.tool.hot { background: var(--color-paper-2); border-bottom-color: transparent; border-radius: var(--radius-control); padding-inline: var(--space-sm); margin-bottom: var(--space-2xs); }
.tool.hot.lk::after { right: var(--space-sm); }
:root { --crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.6 7.2l5 4.4L12 3.8l4.4 7.8 5-4.4-2.1 10.4H4.7z'/%3E%3Crect x='4.7' y='19.2' width='14.6' height='2.3' rx='1.1'/%3E%3C/svg%3E"); }
.crown, .tool.lk::after, .plist li a.lk::after { content: ""; display: inline-block; flex: 0 0 auto; width: 14px; height: 14px; background: var(--color-pencil); border: 0; transform: none; -webkit-mask: var(--crown) center/contain no-repeat; mask: var(--crown) center/contain no-repeat; }
.tool.lk::after { position: absolute; top: calc(var(--space-sm) + var(--space-3xs)); right: 0; }


/* systems: each folds open and shut on a hairline */
.idx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-lg); align-items: start; }
@media (max-width: 640px) { .idx { grid-template-columns: minmax(0, 1fr); } }
.sys { border-bottom: var(--rule-hair) solid var(--color-rule); }
.sys > summary { list-style: none; cursor: pointer; min-height: var(--hit); display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) 0; }
.sys > summary::-webkit-details-marker { display: none; }
.sys .sn { font: var(--display-weight) var(--text-lg) var(--font-display); letter-spacing: -0.005em; line-height: 1.25; color: var(--color-ink); flex: 1; min-width: 0; }
.sico { width: 24px; height: 24px; flex: 0 0 auto; align-self: center; color: var(--color-ink-2); }
.sico .ac { stroke: var(--color-accent); } .sico .af { fill: var(--color-accent); stroke: none; }
.ptitle.withico { display: flex; align-items: center; gap: var(--space-sm); } .ptitle.withico .sico { width: 32px; height: 32px; }
.sys .ct { font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); }
.sys .tg { font: 400 var(--text-sm) var(--font-body); color: var(--color-info); white-space: nowrap; }
.sys .tg::before { content: attr(data-c); }
.sys[open] .tg::before { content: attr(data-o); }
.sys .tg::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: 0 var(--space-3xs) var(--space-3xs) var(--space-xs); }
.sys[open] .tg::after { transform: rotate(-135deg); margin-bottom: calc(var(--space-3xs) * -1); }
.plist { list-style: none; margin: 0; padding: 0 0 var(--space-xs); }
.plist li a { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); min-height: var(--hit); padding: var(--space-xs) 0 var(--space-xs) calc(var(--space-lg) + var(--space-sm)); color: var(--color-ink); text-decoration: none; font-size: var(--text-md); }
.plist li a:hover { color: var(--color-accent); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }
.plist li a::after { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-right: 1.5px solid var(--color-rule-strong); border-top: 1.5px solid var(--color-rule-strong); transform: rotate(45deg); }
.plist li a small { color: var(--color-muted); font-size: var(--text-sm); margin-left: var(--space-xs); }

/* ---------- content: ruled sections, the ledger ---------- */
section.card { border-top: var(--rule-head) solid var(--color-ink); padding-bottom: var(--space-xs); }
.card h2 { font: var(--display-weight) var(--text-section) var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); margin: 0; padding: var(--space-md) 0 var(--space-2xs); line-height: 1.2; max-width: none; }
.card .src { font-size: var(--text-sm); color: var(--color-muted); padding: 0 0 var(--space-sm); line-height: 1.45; }
.ptitle { font: var(--display-weight) var(--text-display) var(--font-display); color: var(--color-ink); margin: var(--space-xs) 0 0; letter-spacing: var(--tracking-display); line-height: 1.1; max-width: 24ch; }
.dx { background: var(--color-info-soft); color: var(--color-ink); border-radius: var(--radius-control); padding: var(--space-sm) var(--space-md); font-size: var(--text-md); }
.dx b { display: block; margin-bottom: var(--space-2xs); font: var(--data-weight) var(--text-sm) var(--font-body); color: var(--color-info); }
ol.steps { margin: 0; padding: var(--space-xs) 0 var(--space-md) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-xs); font-size: var(--text-md); }
ol.steps li::marker { font: var(--data-weight) var(--text-sm) var(--font-body); color: var(--color-muted); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-md); padding: var(--space-sm) 0; border-top: var(--rule-hair) solid var(--color-rule); align-items: start; }
.row .nm { font-weight: var(--data-weight); font-size: var(--text-md); color: var(--color-ink); }
.row .rule { font-size: var(--text-sm); color: var(--color-muted); }
.row .note { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--color-ink-2); }
.row .note.crit { color: var(--color-alert); }
.out { text-align: right; min-width: 0; }
.dose { font: var(--data-weight) var(--text-3xl) var(--font-body); white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -0.015em; line-height: 1.1; color: var(--color-ink); }
.dose small { font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); margin-left: var(--space-2xs); letter-spacing: 0; }
.vol { font: 400 var(--text-sm) var(--font-body); color: var(--color-info); white-space: nowrap; }
.basis { display: inline-block; font: var(--data-weight) var(--text-xs) var(--font-body); color: var(--color-warn); background: var(--color-warn-soft); border-radius: var(--radius-control); padding: var(--space-3xs) var(--space-xs); margin-left: var(--space-xs); vertical-align: 1px; }
.conc { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.conc input { font-size: var(--text-md); width: 4.5em; min-height: 36px; }
.cpair { display: inline-flex; align-items: center; gap: var(--space-2xs); white-space: nowrap; }
.cres { color: var(--color-ink-2); }
.inf { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.inf input { font-size: var(--text-md); width: 88px; min-height: 36px; font-weight: var(--data-weight); }
.rate { font: var(--data-weight) var(--text-3xl) var(--font-body); color: var(--color-ink); margin-left: auto; white-space: nowrap; letter-spacing: -0.015em; }
.rate small { font-size: var(--text-sm); color: var(--color-muted); font-weight: 400; letter-spacing: 0; }
.links { list-style: none; margin: 0; padding: 0 0 var(--space-2xs); }
.links li a { display: flex; justify-content: space-between; gap: var(--space-sm); min-height: var(--hit); align-items: center; padding: var(--space-xs) 0; border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-ink); font-size: var(--text-md); text-decoration: underline; text-decoration-color: var(--color-rule-strong); text-underline-offset: 0.2em; }
.links li a:hover { text-decoration-color: var(--color-accent); }
.links li a span { color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; text-decoration: none; }

.timer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); padding: var(--space-sm) 0; }
.tbox { background: var(--color-paper-2); border-radius: var(--radius-control); padding: var(--space-sm) var(--space-xs); text-align: center; min-width: 0; }
.tbox .lb { font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); }
.tbox .v { font: var(--data-weight) var(--text-3xl) var(--font-body); font-variant-numeric: tabular-nums; color: var(--color-ink); line-height: 1.15; }
.tbox.due { background: var(--color-alert-soft); } .tbox.due .v { color: var(--color-alert); }

/* controls: hairline in ink, one filled primary */
.btns { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding: 0 0 var(--space-md); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--control); border: var(--rule-hair) solid var(--color-ink); background: transparent; color: var(--color-ink); border-radius: var(--radius-control); padding: 0 var(--space-md); font: var(--data-weight) var(--text-sm) var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; position: relative; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.btn::after { content: ""; position: absolute; inset: -3px 0; }
.btn:hover { background: var(--color-paper-2); }
.btn:active { background: var(--color-paper-3); }
.btn.primary { background: var(--color-primary); color: var(--color-primary-ink); border-color: var(--color-primary-edge); }
.btn.primary:hover { background: var(--color-primary-hover); }
.btn.primary:active { background: var(--color-primary); }
.btn.red { background: var(--color-alert-fill); border-color: var(--color-alert-fill); color: var(--color-alert-fill-ink); }
.btn.red:hover { background: var(--color-alert); border-color: var(--color-alert); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--color-paper-3); border-color: var(--color-rule); color: var(--color-muted); cursor: not-allowed; opacity: 0.85; }

.log { margin: 0; padding: 0 0 var(--space-md); list-style: none; font: 400 var(--text-sm) var(--font-body); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: var(--space-3xs); max-height: 180px; overflow: auto; }
.log li span { color: var(--color-muted); margin-right: var(--space-xs); }
.empty { padding: var(--space-md) 0; color: var(--color-muted); font-size: var(--text-md); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--color-rule); border-top: var(--rule-hair) solid var(--color-rule); border-bottom: var(--rule-hair) solid var(--color-rule); }
.kv > div { background: var(--color-paper); padding: var(--space-sm) var(--space-sm) var(--space-sm) 0; min-width: 0; }
.kv > div:nth-child(2n) { padding-left: var(--space-sm); }
.kv .lb { font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); }
.kv .v { font: var(--data-weight) var(--text-xl) var(--font-body); color: var(--color-ink); letter-spacing: -0.01em; }
.kv .v .kvt { display: block; font-size: var(--text-md); letter-spacing: 0; line-height: 1.35; }
.kv .v small { font-size: var(--text-sm); color: var(--color-muted); font-weight: 400; letter-spacing: 0; }
@media (max-width: 340px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv > div:nth-child(2n) { padding-left: 0; } }
.xin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); padding: var(--space-xs) 0 var(--space-md); }
@media (max-width: 560px) { .xin { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.xin input, .xin select { font-size: var(--text-md); }
.verdict { padding: var(--space-md) 0; border-top: var(--rule-hair) solid var(--color-rule); display: flex; flex-direction: column; gap: var(--space-xs); }
.verdict .head { font: var(--display-weight) var(--text-xl) var(--font-display); color: var(--color-ink); text-wrap: balance; line-height: 1.2; }
.find { display: flex; gap: var(--space-sm); align-items: flex-start; font-size: var(--text-md); }
.find i { flex: 0 0 auto; font: var(--data-weight) var(--text-xs) var(--font-body); border-radius: var(--radius-control); padding: var(--space-3xs) var(--space-xs); margin-top: var(--space-3xs); min-width: 64px; text-align: center; }
.find.crit i { background: var(--color-alert-soft); color: var(--color-alert); }
.find.warn i { background: var(--color-warn-soft); color: var(--color-warn); }
.find.ok i { background: var(--color-ok-soft); color: var(--color-ok); }
.find.info i { background: var(--color-info-soft); color: var(--color-info); }
.card > .find { padding: var(--space-xs) 0; }
.more { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); padding: var(--space-2xs) 0 var(--space-md); }
.more a { min-height: var(--hit); display: inline-flex; align-items: center; font-size: var(--text-md); color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-rule-strong); text-underline-offset: 0.2em; }
.more a:hover { text-decoration-color: var(--color-accent); }
table.tb { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 560px; }
.tb th { font: var(--data-weight) var(--text-sm) var(--font-body); color: var(--color-ink); text-align: left; padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: var(--rule-head) solid var(--color-ink); white-space: nowrap; }
.tb td { padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-top: var(--rule-hair) solid var(--color-rule); vertical-align: top; }
.tb tr.hl td { background: var(--color-warn-soft); }
textarea { font: 400 var(--text-md) var(--font-body); color: var(--color-ink); background: transparent; border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-control); padding: var(--space-xs) var(--space-sm); width: 100%; resize: vertical; }
.pre { white-space: pre-wrap; font: 400 var(--text-sm) var(--font-body); background: var(--color-paper-2); margin: var(--space-xs) 0; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-control); }
.tape { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) 0; border-top: var(--rule-hair) solid var(--color-rule); flex-wrap: wrap; }
.tape .sw { width: 44px; height: 44px; border-radius: var(--radius-control); border: var(--rule-hair) solid var(--color-rule-strong); flex: 0 0 auto; }
.tape .v { font: var(--data-weight) var(--text-lg) var(--font-body); }
.qopt.ok { background: var(--color-ok-soft); border-color: var(--color-ok); color: var(--color-ok); }
.qopt.bad { background: var(--color-alert-soft); border-color: var(--color-alert); color: var(--color-alert); }

/* ---------- code mode: always the dark field ---------- */
#codeov { position: fixed; inset: 0; z-index: var(--z-modal); color-scheme: dark; background: var(--code-bg); color: var(--code-ink); overflow: auto; display: flex; flex-direction: column; gap: var(--space-md); padding: max(var(--space-md), env(safe-area-inset-top, 0px)) max(var(--space-md), env(safe-area-inset-right, 0px)) max(var(--space-md), env(safe-area-inset-bottom, 0px)) max(var(--space-md), env(safe-area-inset-left, 0px)); }
.cm-top { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.cm-top b { font: var(--display-weight) var(--text-2xl) var(--font-display); letter-spacing: var(--tracking-display); color: var(--code-ink); }
.cm-top span { font: 400 var(--text-sm) var(--font-body); color: var(--code-muted); flex: 1; min-width: 0; }
.cm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xs); }
.cm-box { background: var(--code-panel); box-shadow: inset 0 0 0 1px var(--code-line); border-radius: var(--radius-control); padding: var(--space-md) var(--space-xs); text-align: center; min-width: 0; }
.cm-box .lb { font: 400 var(--text-sm) var(--font-body); color: var(--code-muted); }
.cm-box .v { font: var(--data-weight) clamp(1.75rem, 9vw, 3.5rem) var(--font-body); font-variant-numeric: tabular-nums; line-height: 1.1; }
.cm-box.due { background: var(--code-due); } .cm-box.due .v { color: var(--code-due-ink); }
.cm-dose { font: 400 var(--text-md) var(--font-body); color: var(--code-ink-2); background: var(--code-panel); border-radius: var(--radius-control); padding: var(--space-sm) var(--space-md); }
.cm-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
.cm-btns .btn, .cm-top .btn { min-height: 56px; font-size: var(--text-lg); background: var(--code-panel); color: var(--code-ink); border-color: var(--code-line); }
.cm-top .btn { min-height: var(--control); font-size: var(--text-sm); }
.cm-btns .btn:hover, .cm-top .btn:hover { background: var(--code-line); }
.cm-btns .btn.red { background: var(--code-red); border-color: var(--code-red); color: var(--code-red-ink); }
.cm-btns .btn.primary { grid-column: 1 / -1; background: transparent; border-color: var(--code-ink-2); color: var(--code-ink); }
.cm-btns .btn.primary:hover { background: var(--code-panel); }
#codeov .btn:focus-visible { outline-color: var(--code-ink); }
.cm-log { color: var(--code-ink-2); max-height: none; padding: 0; } .cm-log li span { color: var(--code-muted); }

/* ---------- more: profile, menus, legal ---------- */
.pcard { padding: var(--space-md) 0; }
.pc-row { display: flex; align-items: center; gap: var(--space-md); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule-strong); display: grid; place-items: center; font: var(--display-weight) var(--text-xl) var(--font-display); color: var(--color-ink); flex: 0 0 auto; }
.pc-txt { flex: 1; min-width: 0; }
.pc-name { font: var(--display-weight) var(--text-xl) var(--font-display); color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub { color: var(--color-muted); font-size: var(--text-sm); }
.iconbtn { color: var(--color-ink-2); display: grid; place-items: center; width: var(--hit); height: var(--hit); border-radius: 50%; }
.iconbtn:hover { background: var(--color-paper-2); }
.ico { width: 22px; height: 22px; flex: 0 0 auto; color: var(--color-accent); }
ul.menu { list-style: none; margin: 0; padding: 0; }
ul.menu li a { display: flex; align-items: center; gap: var(--space-md); min-height: 56px; padding: var(--space-sm) 0; border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-ink); text-decoration: none; font: 400 var(--text-md) var(--font-body); }
ul.menu li:first-child a { border-top: 0; }
ul.menu li a span { flex: 1; }
ul.menu li a i { font-style: normal; color: var(--color-rule-strong); font-size: var(--text-lg); }
ul.menu li a:hover span { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }
.ver { text-align: center; color: var(--color-muted); font: 400 var(--text-sm) var(--font-body); }
.legal { padding-bottom: var(--space-xs); }
.legal h3 { font: var(--data-weight) var(--text-md) var(--font-body); letter-spacing: 0; color: var(--color-ink); margin: var(--space-md) 0 var(--space-2xs); max-width: none; }
.legal p, .legal ul { margin: var(--space-2xs) 0 var(--space-xs); font-size: var(--text-md); max-width: 65ch; }
.legal ul { padding-left: var(--space-lg); }
.legal .src { padding-top: var(--space-md); }
details.more { display: block; margin: var(--space-sm) 0; border-top: var(--rule-hair) solid var(--color-rule); border-bottom: var(--rule-hair) solid var(--color-rule); padding: 0; }
details.more summary { cursor: pointer; min-height: var(--hit); display: flex; align-items: center; font: var(--data-weight) var(--text-md) var(--font-body); color: var(--color-info); }
details.faq { border-top: var(--rule-hair) solid var(--color-rule); }
details.faq:first-child { border-top: 0; }
details.faq summary { cursor: pointer; min-height: 56px; padding: var(--space-sm) 0; font: var(--data-weight) var(--text-md) var(--font-body); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); color: var(--color-ink); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--color-ink-2); font: 400 var(--text-lg) var(--font-body); }
details.faq[open] summary::after { content: "\2212"; }
details.faq p { margin: 0; padding: 0 0 var(--space-md); font-size: var(--text-md); color: var(--color-ink-2); }

/* ---------- community: the case of the week, a ruled feed, a reading column ---------- */
.ctop { border-bottom: 0; margin: var(--space-xs) 0 0; padding-bottom: 0; align-items: baseline; }
.ctop .ptitle { margin: 0; }
.lede { margin: 0; max-width: 60ch; font: 400 var(--text-lg) var(--font-display); line-height: 1.45; color: var(--color-ink-2); }
.back { align-self: flex-start; display: inline-flex; align-items: center; min-height: var(--hit); font: 400 var(--text-sm) var(--font-body); color: var(--color-ink-2); text-decoration: underline; text-decoration-color: var(--color-rule-strong); text-underline-offset: 0.2em; }
.card h2 small { font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); margin-left: var(--space-2xs); letter-spacing: 0; }
.crowned::before { content: ""; display: inline-block; width: 15px; height: 15px; margin-right: var(--space-xs); background: var(--color-ink-2); -webkit-mask: var(--crown) center/contain no-repeat; mask: var(--crown) center/contain no-repeat; }

a.wk { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-xl) var(--space-lg) var(--space-lg); text-decoration: none; }
a.wk::before { content: ""; position: absolute; inset: var(--space-sm); border: var(--rule-hair) solid var(--color-card-edge); pointer-events: none; }
a.wk > * { position: relative; }
.wk-k { font: var(--data-weight) var(--text-sm) var(--font-body); color: var(--color-accent); }
a.wk b { font: var(--display-weight) var(--text-2xl) var(--font-display); letter-spacing: var(--tracking-display); line-height: 1.15; color: var(--color-ink); text-wrap: balance; }
.wk-s { font-size: var(--text-md); color: var(--color-ink-2); max-width: 60ch; }
.wk-f { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; padding-top: var(--space-sm); margin-top: var(--space-2xs); border-top: var(--rule-hair) solid var(--color-card-edge); font-size: var(--text-sm); color: var(--color-muted); }
.wk-go { display: inline-flex; align-items: center; min-height: var(--control); padding: 0 var(--space-md); border-radius: var(--radius-control); background: var(--color-primary); color: var(--color-primary-ink); border: var(--rule-hair) solid var(--color-primary-edge); font: var(--data-weight) var(--text-sm) var(--font-body); text-shadow: none; }
a.wk:hover .wk-go { background: var(--color-primary-hover); }
a.wk:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

a.live { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3xs); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-control); background: var(--color-info-soft); color: var(--color-ink); text-decoration: none; }
a.live span { font: var(--data-weight) var(--text-sm) var(--font-body); color: var(--color-info); display: inline-flex; align-items: center; gap: var(--space-xs); }
a.live span .crown { background: var(--color-info); width: 13px; height: 13px; }
a.live b { font: var(--display-weight) var(--text-lg) var(--font-display); line-height: 1.25; }
a.live time { font-size: var(--text-sm); color: var(--color-ink-2); }
a.live:hover b { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }

.ftabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: calc(var(--space-sm) * -1); border-bottom: var(--rule-head) solid var(--color-ink); padding-bottom: 0; }
.ftabs::-webkit-scrollbar { display: none; }
ul.feed { list-style: none; margin: 0; padding: 0; }
a.frow { display: flex; flex-direction: column; gap: var(--space-3xs); padding: var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-ink); text-decoration: none; }
.fk { display: inline-flex; align-items: center; gap: var(--space-xs); font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); }
.fk .crown { width: 13px; height: 13px; }
.fl { font: var(--data-weight) var(--text-xs) var(--font-body); color: var(--color-ink-2); border: var(--rule-hair) solid var(--color-rule-strong); border-radius: var(--radius-control); padding: 0 var(--space-2xs); }
a.frow b { font: var(--display-weight) var(--text-xl) var(--font-display); letter-spacing: var(--tracking-display); line-height: 1.2; text-wrap: balance; }
a.frow small { font-size: var(--text-md); color: var(--color-ink-2); line-height: 1.45; max-width: 62ch; }
.fm, .byline { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-md); font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); }
a.frow:hover b { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
ul.edl a.frow b { font-size: var(--text-lg); }
.st { font: var(--data-weight) var(--text-xs) var(--font-body); color: var(--color-warn); background: var(--color-warn-soft); border-radius: var(--radius-control); padding: var(--space-3xs) var(--space-xs); }

a.hcase { display: grid; gap: var(--space-3xs); padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-control); color: var(--color-ink); text-decoration: none; }
a.hcase span { font: var(--data-weight) var(--text-sm) var(--font-body); color: var(--color-accent); }
a.hcase b { font: var(--display-weight) var(--text-lg) var(--font-display); line-height: 1.25; }
a.hcase small { font-size: var(--text-sm); color: var(--color-muted); }
a.hcase:hover b { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }

article.post { display: flex; flex-direction: column; gap: var(--space-sm); }
article.post .ptitle { max-width: 28ch; text-wrap: balance; }
.when { display: grid; gap: var(--space-3xs); padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-control); }
.when span, .when small { font-size: var(--text-sm); color: var(--color-muted); }
.when b { font: var(--data-weight) var(--text-xl) var(--font-body); color: var(--color-ink); }
.prose { font-size: var(--text-md); line-height: 1.65; color: var(--color-ink); max-width: 68ch; }
.prose p { margin: 0 0 var(--space-sm); }
.prose h3 { font: var(--display-weight) var(--text-xl) var(--font-display); letter-spacing: var(--tracking-display); margin: var(--space-lg) 0 var(--space-xs); max-width: none; }
.prose ul, .prose ol { margin: 0 0 var(--space-sm); padding-left: var(--space-lg); }
.prose li { margin-bottom: var(--space-3xs); }
.prose blockquote { margin: 0 0 var(--space-sm); padding: var(--space-2xs) 0 var(--space-2xs) var(--space-md); border-left: var(--rule-head) solid var(--color-rule-strong); color: var(--color-ink-2); font: 400 var(--text-lg) var(--font-display); }
.prose strong { font-weight: var(--data-weight); }
.prose a { color: var(--color-info); text-underline-offset: 0.18em; }
.prose > :last-child { margin-bottom: 0; }
.find .prose { font-size: inherit; }

/* the vote: lettered options; afterwards each share set like a dose, large and right-aligned */
.case .cq { padding: 0 0 var(--space-sm); font-weight: var(--data-weight); }
ol.copts, ol.cres { list-style: none; margin: 0; padding: 0 0 var(--space-sm); }
.copt { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-md); min-height: 56px; padding: var(--space-sm) var(--space-xs) var(--space-sm) 0; border: 0; border-top: var(--rule-hair) solid var(--color-rule); background: none; color: var(--color-ink); font: 400 var(--text-md) var(--font-body); text-align: left; cursor: pointer; border-radius: 0; transition: background-color var(--dur-micro) var(--ease-out); }
.copt:hover { background: var(--color-paper-2); }
.copt:active { background: var(--color-paper-3); }
.copt:disabled { color: var(--color-muted); cursor: progress; }
.cl { width: 32px; height: 32px; border-radius: 50%; border: var(--rule-hair) solid var(--color-ink-2); display: grid; place-items: center; font: var(--display-weight) var(--text-lg) var(--font-display); color: var(--color-ink); flex: 0 0 auto; }
.copt.isok { background: var(--color-ok-soft); }
ol.cres li { padding: var(--space-sm) 0; border-top: var(--rule-hair) solid var(--color-rule); }
.cr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-md); }
.cr .ct small { display: block; font: var(--data-weight) var(--text-sm) var(--font-body); color: var(--color-muted); }
.cp { font: var(--data-weight) var(--text-3xl) var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: -0.015em; line-height: 1.1; color: var(--color-ink); white-space: nowrap; }
.cp small { font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); margin-left: var(--space-3xs); }
.bar { height: 4px; margin: var(--space-xs) 0 0 calc(32px + var(--space-md)); background: var(--color-paper-3); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--color-ink-2); border-radius: 2px; }
ol.cres li.ok .cl { background: var(--color-ok); border-color: var(--color-ok); color: var(--color-paper); }
ol.cres li.ok .cr .ct small { color: var(--color-ok); }
ol.cres li.ok .bar i { background: var(--color-ok); }
ol.cres li.mine:not(.ok) .cl { border-width: 2px; border-color: var(--color-alert); }
ol.cres li.mine:not(.ok) .cr .ct small { color: var(--color-alert); }

.prem .prose { padding-bottom: var(--space-sm); }
.prem.lockd { border-top-style: dashed; }
.cmlist { list-style: none; margin: 0; padding: 0 0 var(--space-sm); }
.cmt { padding: var(--space-sm) 0; border-top: var(--rule-hair) solid var(--color-rule); display: flex; flex-direction: column; gap: var(--space-2xs); }
.cmt:first-child { border-top: 0; }
.cm-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3xs) var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.cm-h b { font: var(--data-weight) var(--text-md) var(--font-body); color: var(--color-ink); }
.cm-h .team { color: var(--color-info); font-weight: var(--data-weight); }
.cm-h time { margin-left: auto; }
.cm-b { font-size: var(--text-md); line-height: 1.55; overflow-wrap: anywhere; }
.cm-a { display: flex; gap: var(--space-md); }
.cm-a .linkbtn { order: 0; margin: 0; padding: 0; min-height: var(--control); }
.cmt.hid .cm-b { color: var(--color-muted); text-decoration: line-through; text-decoration-color: var(--color-rule-strong); }
.pform { border-top: var(--rule-hair) solid var(--color-rule); padding-top: var(--space-md); }
.pform .find { margin: 0; }
.edbar { padding: var(--space-xs) 0 var(--space-md); }
.pv { border-top-style: dashed; }
.pv article.post { padding: var(--space-sm) 0; }
.pv ol.copts { padding-top: var(--space-sm); }
.pv .copt { cursor: default; }
input[type="file"] { min-height: var(--hit); padding: var(--space-xs); border-style: dashed; }

/* ---------- the shell: bottom tab bar ---------- */
nav.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky-nav); background: var(--color-paper); border-top: var(--rule-hair) solid var(--color-rule); display: flex; justify-content: space-around; padding: 0 max(var(--space-md), env(safe-area-inset-right, 0px)) calc(var(--space-xs) + env(safe-area-inset-bottom, 0px)) max(var(--space-md), env(safe-area-inset-left, 0px)); }
nav.tabbar a { display: flex; flex-direction: column; align-items: center; gap: var(--space-2xs); color: var(--color-muted); text-decoration: none; font: 400 var(--text-xs) var(--font-body); white-space: nowrap; padding: var(--space-xs) var(--space-xs) var(--space-2xs); flex: 1 1 auto; min-width: 0; max-width: 150px; border-top: 2px solid transparent; margin-top: -1px; transition: color var(--dur-micro) var(--ease-out); }
nav.tabbar a:hover { color: var(--color-ink); }
nav.tabbar a.on { color: var(--color-ink); border-top-color: var(--color-accent); font-weight: var(--data-weight); }
.nico { width: 24px; height: 24px; }
nav.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- cards handed to you: welcome, sign-up ---------- */
#welcome { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--color-scrim); display: flex; align-items: center; justify-content: center; padding: var(--space-md); }
#welcome.mini-w { background: transparent; align-items: flex-end; pointer-events: none; }
#welcome.mini-w .wbox { pointer-events: auto; margin-bottom: calc(var(--space-3xl) - var(--space-xs) + env(safe-area-inset-bottom, 0px)); }
.wbox { color: var(--color-ink); padding: var(--space-xl) var(--space-lg); max-width: 440px; width: 100%; display: flex; flex-direction: column; gap: var(--space-sm); }
.wbox h2 { margin: 0; font: var(--display-weight) var(--text-2xl) var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); line-height: 1.15; }
.wbox p { margin: 0; font-size: var(--text-md); color: var(--color-ink-2); }
.wbox p.mini { font-size: var(--text-sm); color: var(--color-muted); }

#gate { position: fixed; inset: 0; z-index: var(--z-toast); overflow: auto; background: var(--color-paper-2); padding: max(var(--space-lg), env(safe-area-inset-top, 0px)) var(--space-md) max(var(--space-lg), env(safe-area-inset-bottom, 0px)); }
.g-in { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-lg); }
.g-brand { display: flex; align-items: center; gap: var(--space-sm); padding-top: var(--space-md); font: var(--display-weight) var(--text-3xl) var(--font-display); letter-spacing: -0.01em; color: var(--color-ink); }
.g-brand svg { width: 44px; height: 44px; border-radius: var(--space-xs); background: var(--color-logo-ground); box-shadow: 0 0 0 1px var(--color-card-edge); }
.g-brand b { font-weight: inherit; } .g-brand span { color: var(--color-brand-red); }
#gate .wbox { gap: var(--space-md); }
#gate .wbox .find { margin: 0; }
#gate .g-lang { align-self: flex-start; }
#gate .xin.acc-f { gap: var(--space-md); }
#gate .xin.acc-f input { border-width: 0 0 var(--rule-hair); border-radius: 0; padding: 0 0 var(--space-2xs); min-height: var(--hit); font-size: var(--text-lg); }

.clist { list-style: none; margin: 0; padding: 0; }
.crow { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) 0; border-top: var(--rule-hair) solid var(--color-rule); }
.crow:first-child { border-top: 0; }
.cinfo { flex: 1; min-width: 0; }
.clb { font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); }
.cval { font: var(--data-weight) var(--text-md) var(--font-body); overflow-wrap: anywhere; }
.cval.tbd { color: var(--color-muted); font-style: italic; font-weight: 400; }
.sel { user-select: all; }

/* tabs within a screen: a row of words, the current one underlined */
.jumps { display: flex; gap: var(--space-2xs); overflow-x: auto; scrollbar-width: none; margin: calc(var(--space-xs) * -1) 0 calc(var(--space-2xs) * -1); position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--navh, 60px)); z-index: var(--z-raised); background: var(--color-paper); padding-block: var(--space-2xs); }
.jumps::-webkit-scrollbar { display: none; }
.jumps { -webkit-mask-image: linear-gradient(to right, var(--mask-solid) 82%, transparent); mask-image: linear-gradient(to right, var(--mask-solid) 82%, transparent); padding-right: var(--space-xl); }
.chipbtn { flex: 0 0 auto; min-height: var(--hit); border: 0; background: none; color: var(--color-ink-2); border-radius: var(--radius-control); padding: 0 var(--space-sm); font: 400 var(--text-md) var(--font-body); cursor: pointer; transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.chipbtn:hover { color: var(--color-ink); background: var(--color-paper-2); }
.chipbtn:active { background: var(--color-paper-3); }
.chipbtn.on { color: var(--color-ink); font-weight: var(--data-weight); text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.chipbtn.add { color: var(--color-info); }
.chipbtn:disabled { color: var(--color-pencil); cursor: not-allowed; opacity: 0.7; }
.anchor { scroll-margin-top: calc(120px + env(safe-area-inset-top, 0px)); }

#navfab { position: fixed; right: max(var(--space-xs), env(safe-area-inset-right, 0px)); bottom: calc(var(--space-3xl) - var(--space-md) + env(safe-area-inset-bottom, 0px)); z-index: var(--z-sticky); display: flex; flex-direction: column; gap: var(--space-xs); transition: opacity var(--dur-short) var(--ease-out); }
#navfab button { width: var(--control); height: var(--control); border-radius: 50%; border: var(--rule-hair) solid var(--color-rule-strong); background: var(--color-card); color: var(--color-ink); box-shadow: var(--shadow-float); display: grid; place-items: center; cursor: pointer; padding: 0; }
#navfab button svg { width: 20px; height: 20px; }
#navfab button:hover { background: var(--color-paper-2); }
#navfab button:active { background: var(--color-paper-3); }
#navfab .pair { display: flex; flex-direction: column; gap: var(--space-2xs); }
#navfab.idle { opacity: 0; pointer-events: none; }

/* plans and account */
.pw-badge { display: inline-flex; align-items: center; gap: var(--space-2xs); margin: var(--space-md) 0 0; font: 400 var(--text-sm) var(--font-body); color: var(--color-muted); }
.pw-badge .crown, .plan-h h2 .crown { width: 13px; height: 13px; margin-right: var(--space-2xs); vertical-align: -1px; }
.plan-h h2 .crown { width: 16px; height: 16px; vertical-align: -2px; }
.plan-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); padding: var(--space-md) 0 var(--space-2xs); }
.plan-h h2 { padding: 0; }
.plan-p { font: var(--data-weight) var(--text-xl) var(--font-body); color: var(--color-ink); white-space: nowrap; }
.plan-p small { font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
section.card.plan.feat { border-top-width: 3px; border-top-color: var(--color-accent); }
.msub { display: block; font-size: var(--text-sm); color: var(--color-muted); font-weight: 400; }
.sbtabs { display: flex; flex-wrap: wrap; gap: var(--space-2xs); padding: var(--space-2xs) 0 var(--space-sm); }
.sbform { display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-xs) 0 var(--space-md); }
.xin.acc-f { grid-template-columns: minmax(0, 1fr); }
.acc-f input { font-weight: 400; }
.chk { display: flex; align-items: flex-start; gap: var(--space-sm); padding: var(--space-2xs) 0 var(--space-sm); font-size: var(--text-md); line-height: 1.45; cursor: pointer; color: var(--color-ink-2); }
.chk input { width: 20px; height: 20px; min-width: 20px; min-height: 20px; margin: var(--space-3xs) 0 0; padding: 0; accent-color: var(--color-accent); }
footer { font-size: var(--text-sm); color: var(--color-muted); text-align: center; padding-top: var(--space-lg); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
