/* Ported from design/project/*.dc.html: the same palette object as custom properties.
   The page follows the device's light or dark setting (prefers-color-scheme), with no switch of
   its own: Apple HIG, Dark Mode, "Avoid offering an app-specific appearance setting" (HIG pass
   2026-11-28). Dark is deep navy, not black. --brand is the white-label token, overridden per
   tenant by /brand.css (loaded after this file). No inline styles anywhere: the CSP forbids them. */
:root {
  --bg: #eaf2f8;
  --card: #f9fcfe;
  --ink: #1d2c3d;
  --muted: #47586b;
  --rule: #cfe0ec;
  --rule-strong: #66829f; /* field and button edges: 3.5:1 on the page (was #8aa6c0, 2.2:1) */
  --band: #052961;
  --band-ink: #ffffff;
  --accent: #0f5a9a;
  --chip: #e3eef7;
  --btn-border: #0f5a9a;
  --focus: #2b9cd5;
  --cyan: #5bf5ff;
  --brand: #0f5a9a;
  --on-brand: #ffffff;
  --ok: #1f6f43;
  --ok-bg: #e2f3e9;
  --warn: #7a4d00;
  --warn-bg: #fdf0d5;
  --bad: #a1262b;
  --bad-bg: #fbe3e4;
  /* The focus ring: 3:1 or better against the page in each mode (the old #2b9cd5 ring was
     2.7:1 on the light page). On the navy band it turns white (.band rule below). */
  --focus-ring: #0f5a9a;
  /* System fonts for everything you read and press (HIG Typography: SF on Apple devices, the
     platform's own face elsewhere; SF is never embedded). The serif stays for the newsletter's
     own name and the issue you read, so the product still looks like itself. */
  --serif: "Source Serif 4", Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
:root {
  --bg: #0d2240;
  --card: #132e54;
  --ink: #eaf2f8;
  --muted: #a9bdd3;
  --rule: #2a4c78;
  --rule-strong: #5b7fa8;
  --band: #071a36;
  --band-ink: #eaf2f8;
  --accent: #5bb8ea;
  --chip: #1b3a66;
  --btn-border: #5bb8ea;
  --ok: #8fe0b0;
  --ok-bg: #143d2e;
  --warn: #f5cf7a;
  --warn-bg: #3d3214;
  --bad: #ffb3b6;
  --bad-bg: #4a1c24;
  --focus-ring: #8fd0f2;
}
}
/* Increase Contrast (HIG Color: "work well in light, dark, and increased contrast contexts"):
   quieter text and hairlines move toward the ink. */
@media (prefers-contrast: more) {
  :root { --muted: var(--ink); --rule: var(--rule-strong); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px: Apple's body size, in rem so the browser's text size still scales it */
  line-height: 1.5;
}
a { color: var(--accent); }
@media (hover: hover) { a:hover { color: var(--ink); } }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.band :focus-visible { outline-color: #ffffff; }
/* Text fields show the ring whenever they have focus (as macOS does); a time field's inner
   hour and minute parts never matched :focus-visible in Chrome, so it showed no ring at all. */
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus,
:where(input[type="time"], input[type="date"]):focus-within { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; background: var(--card); padding: 8px 12px; }

/* --- band (header) --- */
.band {
  background: var(--band); color: var(--band-ink);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--band-ink); text-decoration: none; }
.brand:hover { color: var(--band-ink); }
.brand-mark { width: 28px; height: 28px; flex: 0 0 auto; display: block; }
/* The platform mark (E1, Geoff 2026-10-14): a ring around a glowing safe-area frame and a centre
   dot. Tenant-coloured: --brand tile and ring, --cyan line and nodes, --focus glow, so a
   white-label tenant gets the shape in its own colours. Glow = layered strokes (no filter). */
.brand-mark .bm-tile { fill: var(--brand); }
.brand-mark .bm-ring { fill: none; stroke: var(--focus); stroke-width: 2.5; opacity: .55; }
.brand-mark path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .bm-glow { stroke: var(--focus); stroke-width: 4; opacity: .3; }
.brand-mark .bm-glow-wide { stroke-width: 6.5; opacity: .16; }
.brand-mark .bm-halo { fill: var(--focus); opacity: .25; }
.brand-mark .bm-frame { stroke: var(--cyan); stroke-width: 2.4; }
.brand-mark .bm-node { fill: var(--cyan); }
.brand-logo { height: 28px; width: auto; flex: 0 0 auto; }
.legal { max-width: 72rem; margin: 32px auto 24px; padding: 0 16px; font-size: 12px; color: var(--muted, #667); }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  min-height: 44px; display: flex; align-items: center; padding: 0 14px;
  color: var(--band-ink); text-decoration: none; border-radius: 22px;
}
.nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.14); font-weight: 600; }
@media (hover: hover) { .nav a:hover { background: rgba(255, 255, 255, 0.08); } }
.nav a:active { background: rgba(255, 255, 255, 0.2); }
.nav form { margin: 0 0 0 8px; }
/* "More" (Geoff, 29 Nov): the less-used tabs behind one real button. No script: the links
   show in the row like the others. With app.js: a list that drops down under the button. */
.nav-more { position: relative; display: contents; }
.nav-more.js { display: block; }
.nav-more-list { list-style: none; margin: 0; padding: 0; display: contents; }
.nav-more-list li { display: contents; }
.nav-more.js .nav-more-list {
  display: flex; flex-direction: column; gap: 2px; position: absolute; right: 0; top: calc(100% + 6px);
  z-index: 20; min-width: 220px; padding: 6px; background: var(--band); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.nav-more.js .nav-more-list[hidden] { display: none; }
.nav-more.js .nav-more-list li { display: block; }
.nav-more.js .nav-more-list a { border-radius: 12px; }
.nav-more-btn {
  min-height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 22px;
  background: transparent; color: var(--band-ink); font: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.nav-more-btn[hidden] { display: none; }
.nav-more-btn.is-here { background: rgba(255, 255, 255, 0.14); font-weight: 600; }
.nav-more-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.2); }
@media (hover: hover) { .nav-more-btn:hover { background: rgba(255, 255, 255, 0.08); } }
.more-caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; }
@media (max-width: 600px) {
  .nav-more.js .nav-more-list { right: auto; left: 0; min-width: min(260px, calc(100vw - 32px)); }
}
/* A light outlined button. On the page it takes the page's ink; only on the navy band is it
   white (it was white everywhere, so on the light page "Remove", the Sections arrows and "Stop
   this key" were white on near-white: HIG pass 2026-11-28). */
.pill-ghost {
  min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--rule-strong);
  background: transparent; color: var(--ink); font: inherit; cursor: pointer;
}
.band .pill-ghost { border-color: var(--band-ink); color: var(--band-ink); }
/* "Your newsletters": one row per newsletter, the whole row is the link */
.pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pick {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--rule);
  background: var(--card); color: var(--ink); text-decoration: none;
}
.pick:focus-visible { border-color: var(--accent); }
@media (hover: hover) { .pick:hover { border-color: var(--accent); } }
.pick:active { background: var(--chip); }
.pick.here { border-color: var(--accent); border-width: 2px; padding: 13px 17px; }
.pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-name { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.pick-account { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.pick-tags { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.pick-go { color: var(--accent); font-weight: 600; font-size: 14px; }
.pick-here { color: var(--muted); font-size: 14px; }
.dev-banner {
  background: var(--bad-bg); color: var(--bad); text-align: center; padding: 6px 16px;
  font-weight: 600; font-size: 14px;
}

/* --- page frame --- */
.page {
  max-width: 1120px; margin: 0 auto; padding: 40px 16px 64px;
  display: flex; flex-direction: column; gap: 32px;
}
.page.narrow { max-width: 860px; gap: 28px; }
.page.read { max-width: 760px; }
.intro { display: flex; flex-direction: column; gap: 8px; }
/* Hierarchy by size and weight in one face (HIG Typography): page title 34px bold (Large Title),
   section 20px semibold (Title 3), lede 17px. */
h1, .h1 { margin: 0; font-size: 2.125rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
.lede { margin: 0; color: var(--muted); font-size: 1.0625rem; line-height: 1.5; max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 20px; }
.hint { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }

.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.section { display: flex; flex-direction: column; gap: 10px; }
.row-between {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
}

/* --- controls --- */
label.field { font-size: 14px; font-weight: 600; }
textarea, input[type="text"], input[type="time"], input[type="url"] {
  min-height: 44px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; width: 100%;
}
input[type="time"] { padding: 0 14px; max-width: 220px; }
/* Fields no page-specific rule styles (a bare <input>, a date, a number, a select): the same
   44px field as the rest, so nothing is a small unstyled box (Brief "Same thing, different names",
   Sections "Show at most", Recipients "Roughly when"). :where() keeps it below every page rule. */
:where(input:not([type]), input[type="date"], input[type="number"], input[type="email"], input[type="search"], select) {
  min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; max-width: 100%;
}
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--brand); }
/* A sentence you tick (the Recipients clients promise): a real checkbox beside the words. */
.check-row { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; font-size: 15px; }
.check-row input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; }
/* A form whose fields stack, one under the other, label above its field. */
.stack { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.stack > label.field { margin-top: 8px; }
.stack input[type="date"] { align-self: flex-start; }
/* /admin/signups "Invite someone" */
.invite { display: grid; gap: 8px; max-width: 480px; }
.invite input[type="email"] {
  min-height: 44px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; width: 100%;
}
.invite .btn { justify-self: start; }
textarea { resize: vertical; line-height: 22px; }
textarea.mono { font-family: var(--mono); font-size: 14px; }
/* The brief grows with its text, so no line hides under the bottom edge on a phone (a fixed
   rows=6 box clipped its last line at phone width). field-sizing where supported; app.js sizes
   it elsewhere. 26px = 2 x 12px padding + 2 x 1px border (border-box). */
textarea.autosize {
  field-sizing: content; min-height: calc(6 * 22px + 26px); max-height: 75vh;
  overflow-y: auto; padding-bottom: 14px;
}
.inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn {
  min-height: 44px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--btn-border);
  background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.btn.big { min-height: 48px; padding: 0 24px; font-size: 16px; }
.btn.quiet {
  background: transparent; color: var(--ink); border-color: var(--rule-strong); font-weight: 500;
}
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
/* Hover only where there is a pointer; a press state on every button (HIG Buttons: "Always
   include a press state for a custom button"). Movement only if the device allows motion. */
@media (hover: hover) {
  .btn:hover { color: var(--on-brand); filter: brightness(1.08); }
  .btn.quiet:hover, .toggle:hover, .pill-ghost:hover { background: var(--chip); }
  .btn.quiet:hover { color: var(--ink); }
  .btn.danger:hover { color: var(--bad); background: var(--bad-bg); }
  .band .pill-ghost:hover { background: rgba(255, 255, 255, 0.12); }
}
.btn:active:not([disabled]) { filter: brightness(0.88); }
.btn.quiet:active:not([disabled]), .toggle:active, .pill-ghost:active { background: var(--chip); filter: brightness(0.92); }
.btn.danger:active:not([disabled]) { background: var(--bad-bg); }
.band .pill-ghost:active { background: rgba(255, 255, 255, 0.2); }
@media (prefers-reduced-motion: no-preference) {
  .btn, .toggle, .pill-ghost, .choice span { transition: transform 0.08s ease-out; }
  .btn:active:not([disabled]), .toggle:active, .pill-ghost:active { transform: scale(0.97); }
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* toggle pill (include / exclude) */
.toggle {
  min-height: 44px; min-width: 104px; padding: 0 14px; border-radius: 22px; font: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--rule-strong); background: transparent; color: var(--ink);
}
/* The button's words say what it does ("Turn off" / "Turn back on"), so an included source no
   longer paints it solid: a list of filled buttons put five prominent buttons on one page (HIG
   Buttons: "Keep the number of prominent buttons to one or two per view"). The paused source's
   "Turn back on" is the one in the accent colour, as it is the action that row is waiting for. */
.toggle[aria-pressed="false"] { color: var(--accent); border-color: var(--accent); }

/* segmented choices: real radio / checkbox inputs, styled as pills */
.choices { display: flex; gap: 8px; flex-wrap: wrap; border: 0; margin: 0; padding: 0; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.choice { position: relative; display: inline-flex; }
/* z-index keeps the invisible input on top of its pill for the whole press. Without it, the
   press shade below (a filter, so its own layer) lifted the pill over the input as the button
   went down: the release then landed on the pill, the browser handed the click to the label,
   and Chrome drops a label's click while any text on the page is selected, so one click did
   nothing (Geoff, 30 Nov: "only double clicking" works). tests/test_single_click_browser.py */
.choice input { position: absolute; z-index: 1; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 22px;
  border: 1px solid var(--rule-strong); background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 600;
}
/* A starter set (setup step 3): its name and its list are one block of text that wraps, never
   two flex columns ("Business and | : Business Insider..." at 390 px, 2026-11-06). */
.choice.set { display: flex; width: 100%; }
.choice.set span { display: block; width: 100%; padding: 11px 16px; border-radius: 14px; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.choice.set span b { font-weight: 600; }
.choice.day span { border-radius: 10px; min-width: 52px; justify-content: center; padding: 0 10px; font-size: 13px; }
.choice input:checked + span { background: var(--brand); color: var(--on-brand); border-color: var(--btn-border); }
/* Picked shows a tick as well as the fill (HIG Accessibility: "Convey information with more than
   color alone"). */
.choice input:checked + span::before { content: "\2713"; margin-right: 6px; font-weight: 700; }
.choice.day input:checked + span::before { margin-right: 3px; }
.choice input:active + span { filter: brightness(0.92); }
.choice input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.checklist {
  background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 8px 16px;
  display: flex; flex-direction: column;
}
.checklist label {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px;
  border-bottom: 1px solid var(--rule); cursor: pointer; font-size: 15px;
}
.checklist label:last-child { border-bottom: 0; }
.checklist input { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.checklist .later { opacity: 0.55; cursor: default; }
.checklist .later input { cursor: default; }

/* --- chips and badges --- */
.chip {
  min-width: 76px; text-align: center; padding: 4px 10px; border-radius: 6px; background: var(--chip);
  color: var(--accent); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.tag {
  padding: 2px 10px; border-radius: 6px; border: 1px solid var(--accent); color: var(--accent);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tag.probation { white-space: normal; overflow-wrap: anywhere; } /* a sentence: wraps on a phone */
.tag.later { border: 0; background: var(--chip); color: var(--muted); margin-left: auto; }
.badge {
  padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.idle { background: var(--chip); color: var(--muted); }
.badge.queued, .badge.running { background: var(--chip); color: var(--accent); border-color: var(--accent); }
.badge.empty { background: transparent; color: var(--muted); border: 1px dashed var(--rule-strong); }
.badge.degraded { background: var(--warn-bg); color: var(--warn); }
.badge.failed { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }

/* --- source rows --- */
.list { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.src {
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
}
.src.off { opacity: 0.6; }
.src-main { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.src-name { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.src-detail {
  font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.src-err { font-size: 13px; color: var(--bad); overflow-wrap: anywhere; }
.src-raw { font-size: 12px; color: var(--muted, inherit); margin-top: 2px; }
.src-raw summary { cursor: pointer; padding: 12px 0; } /* 44px tall target */
.src-raw code { font-family: var(--mono); overflow-wrap: anywhere; }
.src form { margin: 0; }
.src-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.capture-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.capture {
  border: 1px solid var(--rule); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.capture strong { font-size: 14px; }
.mono-accent { font-family: var(--mono); font-size: 13px; color: var(--accent); overflow-wrap: anywhere; }
.bookmarklet {
  align-self: flex-start; min-height: 44px; display: flex; align-items: center; padding: 0 14px;
  border-radius: 8px; border: 1px dashed var(--accent); color: var(--accent); text-decoration: none;
  font-size: 14px; font-weight: 600;
}

.notice {
  border-radius: 12px; padding: 12px 16px; font-size: 14px; line-height: 20px;
  background: var(--chip); border: 1px solid var(--rule);
}
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.notice.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice code { font-family: var(--mono); overflow-wrap: anywhere; }
.tip { background: var(--chip); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; }
.tip strong { font-size: 14px; color: var(--accent); }
.tip p { margin: 4px 0 0; font-size: 14px; line-height: 20px; }
/* "What does this do?" under a Brief setting (copy review F20): the long explanation, one tap away. */
.more { margin: 4px 0 8px; }
.more > .hint { margin: 4px 0; }
.savebar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--rule); }

/* --- history --- */
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.history li { border-bottom: 1px solid var(--rule); padding: 8px 0; font-size: 14px; }
.history dl { margin: 4px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; }
.history dt { color: var(--muted); }
.history dd { margin: 0; overflow-wrap: anywhere; }

/* --- issues list --- */
.runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.run {
  background: var(--card); border: 1px solid var(--rule); border-left: 6px solid var(--rule-strong);
  border-radius: 12px; padding: 12px 16px; display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap;
}
.run.ok { border-left-color: var(--ok); }
.run.empty { border-left-style: dashed; }
.run.degraded { border-left-color: var(--warn); }
.run.failed { border-left-color: var(--bad); background: var(--bad-bg); }
.run.queued, .run.running { border-left-color: var(--accent); }
.run-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.run-title { font-weight: 600; }
.run a.run-title { text-decoration: none; color: var(--ink); min-height: 44px; display: flex; align-items: center; }
.run a.run-title:hover { color: var(--accent); text-decoration: underline; }

/* --- issue (reading view) --- */
.masthead {
  text-align: center; display: flex; flex-direction: column; gap: 6px; padding-bottom: 20px;
  border-bottom: 2px solid var(--rule);
}
/* The masthead sits on the page, not the band: the band's ghost pill was white on white. */
.masthead .masthead-action { align-self: center; margin-top: 4px; }
.masthead .title { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: 0.2px; }
.headline { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 30px; font-weight: 600; text-align: center; }
.theme { display: flex; flex-direction: column; gap: 12px; }
.theme h2 { font-family: var(--serif); font-size: 26px; line-height: 32px; }
.sowhat { background: var(--chip); border-radius: 10px; padding: 14px 16px; margin: 0; font-size: 14px; line-height: 21px; }
.sowhat b { color: var(--accent); }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
/* one line per item: [Update] linked headline, source name */
.items li.line {
  padding: 10px 4px; border-bottom: 1px solid var(--rule); min-height: 44px; line-height: 24px;
}
.items a.it-title { color: var(--ink); text-decoration: none; display: inline-block; padding: 0 0 2px; }
.items a.it-title:hover { color: var(--accent); text-decoration: underline; }
.it-title { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.it-src { font-size: 13px; color: var(--accent); margin-left: 6px; white-space: nowrap; }
.tag.update, .tag.reversal, .tag.new { font-size: 11px; padding: 1px 7px; margin-right: 4px; vertical-align: 2px; }
.tag.warn { font-size: 11px; padding: 1px 7px; margin-right: 4px; vertical-align: 2px; border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.it-why, .it-following { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.block { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; border-top: 1px solid var(--rule); }
.block h2 { font-size: 20px; }
.issue-footer { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--rule); }

.inline-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; margin-top: 8px; }
.inline-field input[type="number"] {
  width: 5.5em; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px;
}
.page-inner { display: flex; flex-direction: column; gap: 32px; }
.narrow .page-inner { gap: 28px; }

@media (max-width: 600px) {
  .band { padding: 12px 16px; }
  h1, .h1 { font-size: 30px; line-height: 36px; }
  .page { padding-top: 28px; }
  .card { padding: 18px 16px; }
  .nav form { margin-left: 0; }
  textarea.autosize { min-height: calc(9 * 22px + 26px); }
}

/* issue formats: tldr summary under a bold linked headline; read-time tag */
.it-time { font-weight: 400; opacity: .75; white-space: nowrap; }
.line.tldr { margin-bottom: 14px; }
.it-summary { margin: 4px 0 0; }

/* M5: review frame, recipients, public pages */
.preview { width: 100%; min-height: 70vh; border: 1px solid var(--rule); border-radius: 8px; background: #ffffff; }
.recipient { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.public { padding-top: 48px; }
/* 2026-10-15: the emailed one-tap publish page (web.tap_pages): a long site address wraps at 320px */
.tap-public a { overflow-wrap: anywhere; }
/* R8: "When it arrives" on /m/, an hour and a city-named time zone (growth.reader_choice) */
.manage-when { display: flex; flex-direction: column; gap: 10px; }
.manage-when .field-title { margin: 0; font-size: 14px; font-weight: 600; }
.manage-time { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.manage-pair { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.manage-time select {
  min-height: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; max-width: 100%;
}
.eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin: 0 0 8px; }
/* M7 patterns: "building" trends with a weekly sparkline (bar height classes: CSP has no inline
   styles), and the cited advisory paragraph. */
.patterns .trend { margin-bottom: 14px; }
.patterns .refs { margin: 6px 0 0; padding-left: 20px; font-size: 14px; line-height: 21px; }
.patterns h3 { font-family: var(--serif); font-size: 19px; margin: 8px 0 0; }
.patterns-note { margin: 16px 0; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; margin: 0 6px; vertical-align: middle; }
.spark .bar { width: 6px; background: var(--accent); border-radius: 1px; }
.spark .bar.l0 { height: 2px; opacity: .3; }
.spark .bar.l1 { height: 4px; } .spark .bar.l2 { height: 6px; } .spark .bar.l3 { height: 8px; }
.spark .bar.l4 { height: 10px; } .spark .bar.l5 { height: 12px; } .spark .bar.l6 { height: 14px; }
.spark .bar.l7 { height: 16px; } .spark .bar.l8 { height: 18px; }

/* --- M11 weekly letter workspace --- */
.lt-links { font-size: 14px; margin: 4px 0 0; }
.lt-counters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.lt-counter { background: var(--card); border: 1px solid var(--rule); border-left: 6px solid var(--rule-strong); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.lt-counter b { font-size: 26px; line-height: 30px; }
.lt-counter span { font-size: 13px; color: var(--muted); }
.lt-counter.ok { border-left-color: var(--ok); }
.lt-counter.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.lt-counter.bad { border-left-color: var(--bad); background: var(--bad-bg); }
.lt-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; }
.lt-row form { margin: 0; }
.lt-grow { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lt-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.lt-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.lt-section { border-top: 2px solid var(--brand); }
.lt-section.lt-empty { opacity: .8; }
.lt-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.lt-rules { font-size: 14px; margin: 4px 0 8px; }
.lt-rules-h { margin: 0; font-weight: 600; color: var(--muted); }
.lt-rules dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; }
.lt-rules dt { color: var(--muted); }
.lt-rules dd { margin: 0; }
.lt-para { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.lt-state { margin: 0; }
.lt-sents { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.lt-sents li { line-height: 20px; }
.lt-sent { margin-right: 6px; }
.lt-cite { display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 6px; font-size: 12px; background: var(--chip); color: var(--accent); margin-right: 4px; }
.lt-cite.human { border: 1px solid var(--accent); }
.lt-cite .inline-form { margin: 0; }
/* 44px target (HIG pass 2026-11-28; was 24px). The negative block margins keep the chip's line height. */
.lt-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; min-width: 44px; min-height: 44px; margin: -12px -6px -12px -4px; }
.lt-link select { max-width: 260px; }
.lt-add label { font-size: 14px; color: var(--muted); }
.lt-h3 { font-size: 15px; margin: 6px 0 0; }
.lt-tray { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lt-tray li { border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.lt-tray li.pinned { border-color: var(--ok); }
.lt-tray li.dropped { opacity: .55; }
.lt-tray a { font-weight: 500; overflow-wrap: anywhere; }
.lt-diff { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 12px; font-family: var(--mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lt-diff .lt-add { background: var(--ok-bg); color: var(--ok); display: block; }
.lt-diff .lt-del { background: var(--bad-bg); color: var(--bad); display: block; text-decoration: line-through; }
.lt-diff .lt-hunk { color: var(--muted); display: block; }
.lt-diff .lt-ctx { display: block; }
.lt-row select, .lt-link select, .lt-fields select {
  min-height: 44px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--rule-strong);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 14px;
}

/* M11 completion: set review across segments, readers' lines, library forms */
.page.wide { max-width: 1400px; }
.lt-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.lt-set-col { min-width: 0; }
.lt-set-frame { min-height: 60vh; }
.lt-variant { border-top: 1px solid var(--rule); padding: 8px 0; }
.lt-variant p { margin: 4px 0; }
.lt-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.lt-table caption { text-align: left; color: var(--muted); font-size: 13px; padding-bottom: 6px; }
.lt-table th, .lt-table td { border-bottom: 1px solid var(--rule); padding: 6px 8px; text-align: left; }
.lt-table tr.bad td { background: var(--bad-bg); }
.lt-form label { display: block; margin: 8px 0; }
.lt-form input[type=text], .lt-form input[type=url], .lt-form input[type=date], .lt-form textarea, .lt-form select { width: 100%; }

/* M14: the public blog page and the post preview. */
.blog .prose, .post-preview { line-height: 1.6; }
.blog .prose h2, .post-preview h2 { margin-top: 28px; color: var(--brand-heading, inherit); }
.blog .prose a, .post-preview a { color: var(--brand-link, inherit); }
.blog .prose ul, .post-preview ul { padding-left: 20px; }
.blog .prose li, .post-preview li { margin: 6px 0; }
.blog-list li { margin: 12px 0; }
.blog-signup { border-left: 3px solid var(--brand); padding-left: 16px; margin: 32px 0; }
.post-preview { border: 1px solid var(--rule); border-radius: 8px; padding: 16px 20px; }
form textarea#post-body, form input#post-title, form input#post-desc { width: 100%; }

/* M13: the sign-up honeypot field, out of sight for people, still in the form for scripts. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.pause-banner { background: var(--warn-bg); color: var(--warn); padding: 0.6rem 1rem; text-align: center; }

/* --- M15: the share panel on the brief page, "not your address" on public pages --- */
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-row input[type="text"] { flex: 1 1 260px; min-width: 0; min-height: 44px; font-family: var(--mono, monospace); }
.share-count b { color: var(--accent); }
.not-yours { margin-top: 24px; }

/* Issue media (Listen and watch): everything fits the screen on a phone (390px), 2026-10-12. */
.media-item { margin: 0 0 18px; min-width: 0; }
.media-item .media-label { display: block; margin-bottom: 6px; }
.media-item audio, .media-item video, .media-item img { display: block; width: 100%; max-width: 100%; }
.issue-web-sowhat { background: var(--chip); border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px 14px; margin: 0 0 8px; overflow-wrap: anywhere; }
.issue-web-sowhat strong { color: var(--accent); }
.issue-web-extra { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--rule); }
.issue-web-extra ol { padding-left: 22px; overflow-wrap: anywhere; }
.media-item video, .media-item img { height: auto; border-radius: 8px; border: 1px solid var(--rule); }
.media-item video { aspect-ratio: 16 / 9; background: #000; object-fit: contain; }
.media-item .media-zoom { display: block; cursor: zoom-in; }
.media-item .media-zoom + .small { display: block; margin-top: 4px; }
.media-item .media-cover { max-width: 340px; }
.media-item .media-cover img { border: 0; border-radius: 0; }
/* The podcast's cover above its player, and the reel at its own 9:16 shape, not stretched
   into a 16:9 black box (2026-11-10). */
.media-item .media-art { max-width: 340px; margin-bottom: 10px; }
.media-item video.media-reel { aspect-ratio: 9 / 16; width: auto; max-width: 100%; height: min(70vh, 560px); }
.inquiry-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Where an issue has got to, and "Waiting for you" (web.issue_state, 2026-10-15) */
.state-lines { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.state-line { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-width: 0; }
.state-line .badge { white-space: normal; overflow-wrap: anywhere; line-height: 18px; }
.state-link { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.state-form { margin: 0; }
.waiting { margin-bottom: 24px; }
.waiting-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.waiting-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.waiting-title { font-weight: 600; color: var(--ink); text-decoration: none; min-height: 44px;
  display: flex; align-items: center; overflow-wrap: anywhere; }
.waiting-title:hover { color: var(--accent); text-decoration: underline; }

/* A slow button at work (app.js data-busy): its words say what and how long, plus a small spinner */
.btn.busy { white-space: normal; text-align: left; gap: 10px; cursor: progress; }
.btn.busy[disabled] { opacity: 0.85; cursor: progress; }
.btn.busy::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: btn-spin 0.8s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.busy::before { animation-duration: 2.4s; } }

/* Pause / Turn back on and the owner home's status bar (2026-10-15). */
.status-bar { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.status-bar h2 { margin: 0; }
.status-words { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 260px; }
.digest-paused { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; align-items: center; }
.home-cards { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 24px; }
.home-card { flex: 1 1 280px; min-width: 0; gap: 10px; }
.home-card h2 { margin: 0; font-size: 18px; }
.home-card blockquote { margin: 0; }

/* Recipients: the owner's add box and the Remove confirm step (2026-10-15). */
.reader-add input[type="email"] {
  flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--rule-strong); background: var(--bg); color: var(--ink); font: inherit;
  font-size: 16px;
}
.reader-remove { flex-basis: 100%; }
.reader-remove > summary { list-style: none; }
.reader-remove > summary::-webkit-details-marker { display: none; }
.reader-remove[open] > summary { margin-bottom: 6px; }
.recipient b { overflow-wrap: anywhere; }

/* --- signed-out pages (account_public.html, SignIn board 2026-10-15): band, one column, footer */
.signin-body { display: flex; flex-direction: column; }
.band-link {
  color: var(--band-ink); font-size: 14px; min-height: 44px; display: inline-flex;
  align-items: center;
}
.band-link:hover { color: var(--band-ink); }
.signin {
  flex: 1 1 auto; width: 100%; max-width: 472px; margin: 0 auto; padding: 56px 16px 40px;
  display: flex; flex-direction: column; gap: 18px;
}
.signin h1 { font-size: 30px; line-height: 36px; }
.signin .lede, .signin .addr, .signin-help a { overflow-wrap: anywhere; }
.signin-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.signin-form label { font-size: 14px; font-weight: 600; }
.signin-form input[type="email"] {
  min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--rule-strong);
  background: var(--card); color: var(--ink); font: inherit; font-size: 16px; width: 100%;
}
.signin-form .btn { width: 100%; border-radius: 10px; }
.signin-help {
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px;
  font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 6px;
}
.signin-help p { margin: 0; }
.signin-help strong { color: var(--ink); }
.signin p { margin: 0; }
/* /help (2026-10-28): the short how-to and the newcomer questions */
.signin h2 { font-size: 20px; line-height: 26px; margin: 0 0 4px; color: var(--ink); }
.help-faq { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.help-faq dt { font-weight: 600; color: var(--ink); margin-top: 10px; }
.help-faq dd { margin: 0; color: var(--muted); }
.signin-foot {
  padding: 8px 16px 18px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap;
  align-items: center; gap: 0 16px; max-width: 1120px; width: 100%; margin: 0 auto;
}
.signin-foot a { min-height: 44px; display: inline-flex; align-items: center; }
.signin-foot .company-line { margin: 0; flex-basis: 100%; }
@media (max-width: 600px) {
  .signin { padding-top: 32px; }
}

/* Admin tables (2026-10-15): wide tables scroll inside themselves, never the page, at 320px. */
.table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }

/* Style, Layout and Tone examples (web/style_examples_pages.py): the options as a list with one
   line each, beside a preview of the picked option's sample issue at real size, scrolling inside
   a frame of fixed height. Stacked under the options on a narrow screen. */
.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) {
  .ex-grid { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); align-items: start; }
}
.ex-choices { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.ex-choices legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.ex-option { display: flex; flex-direction: column; gap: 2px; }
.ex-choice { position: relative; display: block; }
.ex-choice input { position: absolute; z-index: 1; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ex-choice > span {
  min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 8px 14px; border-radius: 12px; border: 1px solid var(--rule-strong);
  color: var(--ink); font-size: 14px; line-height: 20px;
}
.ex-choice input:checked + span { background: var(--brand); color: var(--on-brand); border-color: var(--btn-border); }
.ex-choice input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.ex-choice input:checked + span .ex-line { color: var(--on-brand); }
.ex-choice input:checked + span > :first-child::before { content: "\2713\00a0"; font-weight: 700; }
.ex-line { display: block; color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 400; }
.ex-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 13px; align-self: flex-start; }
.ex-preview { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ex-preview figcaption, .ex-cell figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; }
.ex-preview figcaption a, .ex-cell figcaption a { display: inline-flex; align-items: center; min-height: 44px; }
.ex-frame {
  display: block; width: 100%; height: 560px; border: 1px solid var(--rule); border-radius: 12px;
  background: var(--card);
}
.ex-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.ex-cell { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ex-cell figcaption { flex-direction: column; align-items: flex-start; gap: 2px; }
.ex-cell .ex-frame { height: 640px; margin-top: auto; }
@media (max-width: 600px) { .ex-frame, .ex-cell .ex-frame { height: 480px; } }
.ex-preview [hidden], .ex-cell [hidden] { display: none; }
.ex-missing { padding: 12px 14px; border: 1px dashed var(--rule-strong); border-radius: 12px; }

/* The take box in its place at the top of the issue (``_issue_take.html``, 2026-11-06): the
   box first, the issue under it, so on a phone the box is on screen without any scrolling. */
.issue-take .take-slot {
  margin: 12px 0 20px; padding: 12px 14px; border-left: 4px solid var(--accent);
  background: var(--chip); border-radius: 6px;
}
.issue-take .take-slot label { margin-top: 0; }
.issue-take .take-slot .take-line { margin: 0; }
.issue-take .issue-body { border-top: 1px solid var(--rule); padding-top: 4px; }
@media (max-width: 600px) {
  .issue-take .post-preview { padding: 12px 14px; }
}
.issue-take .take-slot textarea { width: 100%; box-sizing: border-box; }

/* Settings that save themselves (static/autosave.js): a small status beside the control. */
.as-status { display: inline-block; margin-left: 8px; font-size: 14px; line-height: 20px; color: var(--muted); }
.as-status:empty { display: none; }
.as-status.ok { color: var(--ok); }
.as-status.bad { color: var(--bad); }
.as-retry { margin-left: 4px; padding: 4px 8px; min-height: 32px; background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
fieldset > .as-status, .checklist > .as-status { display: block; margin: 4px 0 0; }
/* A fieldset that only groups controls (to switch them off together): no box of its own. */
fieldset.bare { display: contents; border: 0; margin: 0; padding: 0; }
fieldset > .as-status:empty, .checklist > .as-status:empty { display: none; }

/* The comment page's fixable lines (static/comment-page.js, 2026-11-08): the in-place editor's
   marks in the app's own palette. */
.nl-editable { outline: 1px dashed var(--rule-strong); outline-offset: 2px; border-radius: 2px; cursor: text; }
.nl-editable:hover { outline: 2px solid var(--accent); }
.nl-editable:focus { outline: 2px solid var(--focus); background: var(--card); }
.nl-editable.nl-dirty { background: var(--warn-bg); color: var(--ink); outline: 2px solid var(--warn); }
.edit-state { font-size: 14px; line-height: 20px; color: var(--muted); margin: 8px 0 0; }
.edit-state.unsaved { color: var(--warn); }

/* --- onboarding pass (2026-11-29): the Now/Next strip, the first-run checklist, plain help --- */
.now-next { border-left: 4px solid var(--accent); display: flex; flex-direction: column; gap: 10px; }
.nn-line { margin: 0; font-size: 15px; line-height: 22px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.nn-title { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.setup-step { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--rule); }
.setup-step:first-child { border-top: 0; }
.step-mark {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 600; border: 2px solid var(--rule-strong); color: var(--muted);
}
.setup-step.done .step-mark { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.setup-step.now .step-mark { background: var(--accent); border-color: var(--accent); color: var(--card); }
.step-words { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setup-step.done .step-words b { color: var(--muted); font-weight: 500; }
.step-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.setup-step form { margin: 0; }
/* The plain line under a page's heading, and its next step. */
.purpose { margin: 0; font-size: 15px; line-height: 22px; }
.next-step { margin: 0; font-size: 15px; line-height: 22px; }
/* A source's next step, under its status. */
.src-next { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
/* A tag that explains itself on a tap ("On trial", "Kept on"): never hover-only. */
/* Its own line in the wrapping row: the tag, then one small muted sentence (breaker M3). */
.tag-help { flex: 1 1 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tag-line { flex: 1 1 200px; min-width: 0; max-width: 560px; font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
/* The settings page's groups: the basics first, then the look, then Advanced (closed). */
.group-h { margin: 24px 0 0; font-size: 20px; }
.group-lede { margin: 4px 0 0; }
details.advanced { border: 1px solid var(--rule); border-radius: 12px; background: var(--card); padding: 0 16px; }
details.advanced > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--accent); }
details.advanced[open] > summary { border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
details.advanced > section { padding-bottom: 12px; }
.empty-next { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.care-suggestion { border: 1px solid var(--rule); border-radius: 12px; background: var(--card); padding: 12px 16px; margin: 8px 0; }
.care-suggestion > h3 { margin: 0 0 6px; font-size: 16px; }
.care-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
.care-assist [hidden] { display: none; }
.care-assist .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
