/* Billow design system - adapted from Dipayan's feature/frontend (PR #1) tokens; light theme derived 2026-10-17.
   Rules that hold everywhere: logical properties only (the page mirrors in Arabic); weights 400 and 700 only;
   every control is at least 3rem tall; every text pair is >= 4.5:1 and every control edge >= 3:1 in both themes.
   Theme: tokens on :root are the light theme; dark follows the phone (prefers-color-scheme) unless
   html[data-theme="light"] is set, and html[data-theme="dark"] forces dark. No Web Awesome: this file styles every control. */

:root {
  color-scheme: light;
  --bg: #f3f6f6;
  --card: #ffffff;
  --fg: #0f1a1c;
  --muted: #e9efef;
  --muted-hover: #dde6e6;
  --muted-fg: #47595c;
  --primary: #0a6e62;
  --primary-hover: #08594f;
  --primary-fg: #ffffff;
  --accent: #d5f1eb;
  --accent-fg: #04342e;
  --success: #13703f;
  --success-surface: #e2f4e9;
  --warning: #7a4f00;
  --warning-surface: #fdf1d3;
  --destructive: #b3261e;
  --border: #d3dddd;
  --input: #6a7c7f;
  --ring: #0a6e62;
  --highlight: #f2c14e;
  --highlight-fg: #1c1500;
  /* icons are black SVGs used as <img>: dark theme inverts them, a primary button flips them with its text */
  --icon-filter: none;
  --icon-on-primary: invert(1);

  --font: 'Billow', system-ui, 'Segoe UI', sans-serif;
  --lh: 1.6;
  --gutter: 1rem;
  --radius: .625rem;
  --radius-sm: .375rem;
  --radius-md: .5rem;
  --radius-xl: .875rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1214;
    --card: #141b1e;
    --fg: #edf3f2;
    --muted: #1b2427;
    --muted-hover: #233034;
    --muted-fg: #a7b6b8;
    --primary: #3cc9b4;
    --primary-hover: #6fdccb;
    --primary-fg: #062420;
    --accent: #12312d;
    --accent-fg: #d3f6ef;
    --success: #5fd49c;
    --success-surface: #10291e;
    --warning: #f2c14e;
    --warning-surface: #2a2210;
    --destructive: #ff8a80;
    --border: #263237;
    --input: #61777a;
    --ring: #6fdccb;
    --highlight: #f2c14e;
    --highlight-fg: #1c1500;
    --icon-filter: invert(1);
    --icon-on-primary: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1214;
  --card: #141b1e;
  --fg: #edf3f2;
  --muted: #1b2427;
  --muted-hover: #233034;
  --muted-fg: #a7b6b8;
  --primary: #3cc9b4;
  --primary-hover: #6fdccb;
  --primary-fg: #062420;
  --accent: #12312d;
  --accent-fg: #d3f6ef;
  --success: #5fd49c;
  --success-surface: #10291e;
  --warning: #f2c14e;
  --warning-surface: #2a2210;
  --destructive: #ff8a80;
  --border: #263237;
  --input: #61777a;
  --ring: #6fdccb;
  --highlight: #f2c14e;
  --highlight-fg: #1c1500;
  --icon-filter: invert(1);
  --icon-on-primary: none;
}

@media (min-width: 640px) {
  :root { --gutter: 1.5rem; }
}

/* ---------- type per language (Atkinson covers Latin; Plex covers Arabic, Devanagari, Vietnamese, Cyrillic; CJK uses system faces) */
:lang(zh-CN) { font-family: 'BillPlex', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif; }
:lang(zh-TW) { font-family: 'BillPlex', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans CJK TC', sans-serif; }
:lang(ko) { font-family: 'BillPlex', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans CJK KR', sans-serif; }
:lang(vi), :lang(ru) { font-family: 'BillPlex', system-ui, sans-serif; }
:lang(ja) { font-family: system-ui, 'Hiragino Sans', 'Yu Gothic UI', Meiryo, sans-serif; }
:lang(th) { font-family: system-ui, 'Leelawadee UI', Tahoma, sans-serif; line-height: 1.8; }
:lang(he) { font-family: system-ui, 'Segoe UI', Arial, sans-serif; }
:lang(el) { font-family: 'BillPlex', system-ui, sans-serif; }
:lang(ar) { --lh: 1.85; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { line-height: 1.6; }

/* ---------- base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background-color: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 1rem; font-weight: 400; line-height: var(--lh);
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.25; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
@media (min-width: 640px) {
  h2 { font-size: 1.875rem; }
}
h2[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
p.sub { max-width: 65ch; color: var(--muted-fg); }
.muted { color: var(--muted-fg); }
/* English under a machine-translated safety line (app.js tSafe); the English is what counts */
.en-gloss { display: block; margin-block-start: .25rem; font-size: .875rem; font-weight: 400; color: var(--muted-fg); }
a:not(.btn) { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:not(.btn):hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.with-icon { display: flex; align-items: center; gap: .5rem; }
img.icon { flex: none; width: 1.5rem; height: 1.5rem; filter: var(--icon-filter); }
button.primary:not(:disabled) img.icon { filter: var(--icon-on-primary); }

/* ---------- shell: header, stepper, main, footer */
header.bar { background-color: var(--card); border-block-end: 1px solid var(--border); }
.bar-in {
  max-width: 64rem; margin-inline: auto; padding: .75rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem;
}
header.bar h1 { font-size: 1.25rem; }
.bar-end { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.synthetic {
  padding: .25rem .625rem; border-radius: var(--radius-sm);
  background-color: var(--highlight); color: var(--highlight-fg);
  font-size: .75rem; font-weight: 700; line-height: 1.4; white-space: nowrap;
}

nav.stepper { max-width: 64rem; margin-inline: auto; padding: 1.25rem var(--gutter) .25rem; }
nav.stepper ol#steps, nav.stepper ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem;
}
nav.stepper li { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
nav.stepper .bar { display: block; height: .25rem; border-radius: 999px; background-color: var(--input); }
nav.stepper li.done .bar { background-color: var(--primary); }
nav.stepper li.now .bar { background-color: var(--primary); outline: 2px solid var(--ring); outline-offset: 2px; }
nav.stepper .lbl { display: none; font-size: .875rem; color: var(--muted-fg); }
nav.stepper li.done .lbl { color: var(--fg); }
nav.stepper li.now .lbl { color: var(--fg); font-weight: 700; }
.step-cap { margin-block-start: .75rem; font-size: .875rem; font-weight: 700; }
@media (min-width: 640px) {
  nav.stepper .lbl { display: block; }
  .step-cap { display: none; }
}

main {
  width: 100%; max-width: 42rem; margin-inline: auto;
  padding-block: 1.5rem; padding-inline: var(--gutter);
  display: flex; flex-direction: column; gap: 1rem;
}
main.w-narrow { max-width: 42rem; }
main.w-wide { max-width: 64rem; }
.foot { max-width: 64rem; margin-inline: auto; padding-inline: var(--gutter); padding-block-end: 2rem; font-size: .875rem; color: var(--muted-fg); }

/* ---------- status and alert strips */
.status {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem; border-radius: var(--radius); background-color: var(--muted);
}
.status.err { font-weight: 700; color: var(--destructive); }
.status.err::before {
  content: "!"; flex: none; display: grid; place-items: center;
  width: 1.25rem; height: 1.25rem; border: 2px solid currentColor; border-radius: 50%;
  font-size: .8125rem; line-height: 1;
}
.spin {
  flex: none; display: inline-block; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- card and spacing stacks */
.card-main {
  background-color: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 1.25rem;
}
@media (min-width: 640px) {
  .card-main { padding: 2rem; }
}
.stack-8 { display: flex; flex-direction: column; gap: 2rem; }
.stack-3 { display: flex; flex-direction: column; gap: .75rem; }

.panel {
  display: flex; flex-direction: column; gap: .75rem;
  padding: 1.25rem; border-radius: var(--radius); background-color: var(--muted); border: 0;
}
.panel.warn { background-color: var(--warning-surface); }
.panel.ok { background-color: var(--success-surface); }
.panel.hero { padding: 1.5rem; gap: 1.25rem; }
.panel.warn h3 { color: var(--warning); }
.notice { padding: 1.25rem; border-radius: var(--radius); background-color: var(--muted); }

/* ---------- buttons (base has zero specificity so every modifier wins) */
:where(button, a.btn) {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding-block: .5rem; padding-inline: 1.25rem;
  border: 2px solid var(--input); border-radius: var(--radius); background-color: transparent; color: var(--fg);
  font: inherit; font-size: 1rem; font-weight: 700; text-align: center; text-decoration: none;
  cursor: pointer; transition: color 150ms, background-color 150ms, border-color 150ms;
}
button:hover:not(:disabled), a.btn:hover { border-color: var(--fg); background-color: var(--muted-hover); }
button:active:not(:disabled), a.btn:active { transform: translateY(.125rem); }
.primary { min-height: 3.5rem; padding-inline: 1.75rem; border-color: var(--primary); background-color: var(--primary); color: var(--primary-fg); font-size: 1.125rem; }
.primary:hover:not(:disabled) { border-color: var(--primary-hover); background-color: var(--primary-hover); }
a.btn.primary:hover { border-color: var(--primary-hover); background-color: var(--primary-hover); }
.ghost { border-color: transparent; background-color: transparent; color: var(--muted-fg); }
.ghost:hover:not(:disabled) { border-color: transparent; background-color: transparent; color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
a.btn.ghost:hover { border-color: transparent; background-color: transparent; color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.sm { font-size: .875rem; padding-inline: .75rem; }
.sq { width: 3rem; height: 3rem; padding: 0; font-size: 1.25rem; }
button:disabled { border-color: var(--border); background-color: var(--muted); color: var(--muted-fg); cursor: not-allowed; transform: none; }
.busy { cursor: progress; }
p.why { font-size: .875rem; color: var(--muted-fg); }

/* option buttons (radio-like choices) */
button.opt {
  display: flex; align-items: center; gap: .75rem; min-height: 3rem; padding: .75rem 1rem;
  border: 2px solid transparent; border-radius: var(--radius); background-color: var(--muted); color: var(--fg);
  text-align: start;
}
button.opt:hover:not(:disabled) { border-color: transparent; background-color: var(--muted-hover); }
button.opt[aria-pressed="true"] { background-color: var(--accent); color: var(--accent-fg); font-weight: 700; }
button.opt:disabled { border-color: transparent; background-color: var(--muted); color: var(--muted-fg); }
.dot {
  flex: none; display: grid; place-items: center;
  width: 1.25rem; height: 1.25rem; border: 2px solid var(--input); border-radius: 50%;
}
button.opt[aria-pressed="true"] .dot { border-color: var(--primary); }
button.opt[aria-pressed="true"] .dot::after { content: ""; width: .625rem; height: .625rem; border-radius: 50%; background-color: var(--primary); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.grid-md-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .grid-md-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.actions {
  display: flex; flex-direction: column-reverse; gap: .75rem;
  padding-block-start: 1.5rem; border-block-start: 1px solid var(--border);
}
.actions > button, .actions > a.btn { width: 100%; }
.act-sec { display: flex; flex-direction: column; gap: .75rem; }
.act-sec > button, .act-sec > a.btn { width: 100%; }
@media (min-width: 640px) {
  .actions { flex-direction: row; align-items: center; justify-content: space-between; }
  .actions > button, .actions > a.btn { width: auto; }
  .act-sec { flex-direction: row; }
  .act-sec > button, .act-sec > a.btn { width: auto; }
}

/* ---------- forms */
label { display: block; font-weight: 700; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="tel"], input:not([type]), select {
  width: 100%; min-height: 3rem; padding-block: .5rem; padding-inline: .75rem;
  border: 2px solid var(--input); border-radius: var(--radius); background-color: var(--bg); color: var(--fg);
  font: inherit; font-size: 1rem;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus, input[type="email"]:focus,
input[type="tel"]:focus, input:not([type]):focus, select:focus { border-color: var(--primary); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--destructive); }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0;
  display: inline-grid; place-content: center;
  width: 1.5rem; height: 1.5rem; border: 2px solid var(--input); border-radius: var(--radius-md);
  background-color: transparent; cursor: pointer;
}
input[type="checkbox"]:checked { background-color: var(--success); border-color: var(--success); }
input[type="checkbox"]::after {
  content: ""; display: none; width: .375rem; height: .75rem;
  border-right: .1875rem solid var(--card); border-bottom: .1875rem solid var(--card); /* physical: a checkmark does not mirror */
  transform: translateY(-.0625rem) rotate(45deg);
}
input[type="checkbox"]:checked::after { display: block; }
input[type="checkbox"]:disabled { border-color: var(--border); cursor: not-allowed; }
label.check { display: flex; align-items: center; gap: .75rem; min-height: 3rem; font-weight: 400; cursor: pointer; }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  min-height: 9rem; padding: 1.25rem; border: 2px dashed var(--input); border-radius: var(--radius);
  background-color: var(--muted); text-align: center; cursor: pointer;
}
.drop:hover { border-color: var(--primary); background-color: var(--muted-hover); }
.drop:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.drop[aria-disabled="true"] { border-color: var(--border); cursor: progress; }
img.preview { display: block; width: 100%; max-height: 28rem; object-fit: contain; background-color: #fff; border-radius: var(--radius); }

.bill-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 1024px) {
  .bill-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.field.blank { background-color: var(--warning-surface); }
.field.confirmed { background-color: var(--success-surface); }
.field .hint { font-size: .875rem; font-weight: 700; color: var(--warning); }
.field .state-ok { font-weight: 700; color: var(--success); }

/* charge lines under the six fields: one column at phone width (description, amount, remove stack), three columns from 640px */
.lines.confirmed { background-color: var(--success-surface); }
.lines .hint { font-size: .875rem; font-weight: 700; color: var(--warning); }
.line-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; padding-block-end: .75rem; border-block-end: 1px solid var(--border); }
.line-row > * { min-width: 0; }
.line-money { display: flex; flex-direction: column; gap: .25rem; }
.line-money input { font-variant-numeric: tabular-nums; }
.line-desc { display: flex; flex-direction: column; gap: .25rem; }
.line-rm { justify-self: start; }
@media (min-width: 640px) {
  .line-row { grid-template-columns: minmax(0, 1fr) 9rem auto; align-items: end; }
}
/* insurance summary service lines: date, description, billed, you owe, remove */
@media (min-width: 640px) {
  .line-row.eob-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 5 columns left the description ~35 px in the capped content width */
}

.num-step { display: flex; align-items: center; gap: .75rem; }
.num-step input { width: 6rem; text-align: center; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.money-in { position: relative; max-width: 20rem; }
.money-in span {
  position: absolute; inset-inline-start: 1rem; inset-block-start: 50%; transform: translateY(-50%);
  font-size: 1.125rem; font-weight: 700; color: var(--muted-fg); pointer-events: none;
}
.money-in input { padding-inline-start: 2.25rem; font-size: 1.25rem; font-weight: 700; }

/* ---------- result */
.hero-row { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) {
  .hero-row { flex-direction: row; align-items: flex-end; gap: 1.5rem; }
}
.pct { font-size: 4.5rem; line-height: 1; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.hero-row p { max-width: 28rem; font-size: 1.125rem; }
.decides { padding-block-start: .75rem; border-block-start: 1px solid var(--border); font-weight: 700; }
.big-money { font-size: 2.5rem; line-height: 1.1; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }

.tbl { overflow-x: auto; border-radius: var(--radius); background-color: var(--muted); }
table { width: 100%; border-collapse: collapse; background-color: var(--muted); }
.tbl table { background-color: transparent; }
th, td { padding: .75rem 1.25rem; text-align: start; vertical-align: top; }
th { font-weight: 700; }
thead th { font-size: .875rem; color: var(--muted-fg); }
tr + tr { border-block-start: 1px solid var(--border); }
tr.you { background-color: var(--accent); color: var(--accent-fg); font-weight: 700; }
.you-tag {
  display: inline-block; margin-inline-start: .75rem; padding: .125rem .5rem; border-radius: var(--radius-md);
  background-color: var(--primary); color: var(--primary-fg); font-size: .875rem; font-weight: 700;
}
.tbl-note { font-size: .875rem; color: var(--muted-fg); }

/* "Things to ask the hospital about" card on the result screen */
ul.flags { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
ul.flags li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
ul.flags li > span:first-child { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.flag-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chk-total { font-size: 1.125rem; font-weight: 700; }
mark.hl { padding-inline: .25rem; border-radius: var(--radius-sm); background-color: var(--highlight); color: var(--highlight-fg); font-weight: 700; }

ol.docs { padding-inline-start: 1.25rem; }
ol.docs li + li { margin-block-start: .5rem; }
ol.docs li::marker { font-weight: 700; color: var(--primary); }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: .5rem .75rem; }
dl.kv dt { color: var(--muted-fg); }
.explain, .explain p { white-space: pre-wrap; }

/* footnotes */
details.notes-box > summary { cursor: pointer; font-weight: 700; color: var(--muted-fg); padding-block: .5rem; }
details.notes-box[open] > summary { margin-block-end: .5rem; }
ol.notes { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; font-size: .875rem; color: var(--muted-fg); }
ol.notes li { scroll-margin-block-start: 1rem; }
ol.notes .fn-num { font-weight: 700; color: var(--fg); }
ol.notes .fn-text { min-width: 0; overflow-wrap: anywhere; }
sup.fn-mark { line-height: 0; }
sup.fn-mark a { display: inline-block; min-width: 1.5rem; text-align: center; margin-inline-start: .125rem; font-weight: 700; color: var(--primary); text-decoration: underline; }
/* inline links: a 48px-tall hit area without moving the text (vertical padding on an inline box adds no line height) */
sup.fn-mark a, dl.kv a { padding-block: .9rem; margin-block: -.9rem; }
/* the English line inside a button (Create my application packet) takes the button's own colour */
button .en-gloss { color: inherit; }

/* ---------- home, packet, start */
ul.bills { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
ul.bills > li { gap: .5rem; }
.bill-top { display: grid; grid-template-columns: 1fr auto; gap: .75rem; }
.bill-amt { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bill-meta { font-size: .875rem; color: var(--muted-fg); }
.bill-warn { font-size: .875rem; font-weight: 700; color: var(--fg); }

.paper { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background-color: #fff; }
iframe#packet-frame { display: block; width: 100%; height: 75vh; border: 0; background-color: #fff; }
.skeleton { height: 50vh; border-radius: var(--radius); background-color: var(--muted); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.chip {
  display: inline-flex; width: fit-content; max-width: 100%; padding: .375rem .875rem; border-radius: 999px;
  background-color: var(--accent); color: var(--accent-fg); font-size: .875rem; font-weight: 700;
}
.qr { margin: 0; }
.qr img { display: block; padding: .5rem; border-radius: var(--radius-md); background-color: #fff; image-rendering: pixelated; }
.qr figcaption { margin-block-start: .5rem; font-size: .875rem; color: var(--muted-fg); }

/* dashboard: dashboard.js sets this class on the "Review by" line; the word makes the state not colour-only */
.overdue { font-weight: 700; color: var(--destructive); }
.overdue::after { content: " (overdue)"; }

/* ---------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .spin, .skeleton { animation: none; }
}

/* ---------- Windows High Contrast: backgrounds are dropped, so borders and system colours carry the state */
@media (forced-colors: active) {
  button.opt { border-color: ButtonText; }
  button.opt[aria-pressed="true"] { border-color: Highlight; }
  button.opt .dot { border-color: ButtonText; }
  button.opt[aria-pressed="true"] .dot::after { forced-color-adjust: none; background-color: Highlight; }
  .you-tag, tr.you > *, mark.hl { border: 2px solid CanvasText; }
  nav.stepper .bar { border: 1px solid CanvasText; }
  nav.stepper li.done .bar, nav.stepper li.now .bar { forced-color-adjust: none; background-color: Highlight; border-color: Highlight; }
  input[type="checkbox"]:checked { forced-color-adjust: none; background-color: Highlight; border-color: Highlight; }
  input[type="checkbox"]:checked::after { border-color: HighlightText; }
  .spin { border-color: ButtonText; border-top-color: Highlight; }
}

/* ---------- print */
@media print {
  body { background-color: #fff; color: #000; }
  header.bar, nav.stepper, .actions, .status, #theme-btn { display: none !important; }
  main { max-width: none; padding: 0; }
  .card-main { border: 0; padding: 0; background-color: transparent; }
}
.docs a { overflow-wrap: anywhere; } /* a long form URL must wrap: no sideways scroll at 375 px */
