@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
[hidden] { display: none !important; }

/* Layout: one narrow column. Summary strip first, then three tabs (tasks, blood pressure, sign-off sheet).
   Type: Atkinson Hyperlegible throughout, chosen for legibility at a glance for clinicians and older readers. */
:root {
  --bg: #f2f6fb;
  --surface: #ffffff;
  --fg: #13202f;
  --muted: #495c72;
  --line: #d2dce9;
  --accent: #1b5fc1;
  --accent-fg: #ffffff;
  --accent-soft: #e0ebfa;
  --series2: #7447b0;
  --ok: #1d6a39;
  --ok-soft: #e2f2e7;
  --warn: #7f5200;
  --warn-soft: #fbefd5;
  --bad: #a1241a;
  --bad-soft: #fbe4e1;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1622; --surface: #152131; --fg: #e6edf7; --muted: #9fb2c8; --line: #2a3a50;
    --accent: #6aaaf6; --accent-fg: #071a33; --accent-soft: #1a3558; --series2: #c3a3f0;
    --ok: #75d094; --ok-soft: #173424; --warn: #ebb653; --warn-soft: #3a2d10;
    --bad: #ff9186; --bad-soft: #43201d; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1622; --surface: #152131; --fg: #e6edf7; --muted: #9fb2c8; --line: #2a3a50;
  --accent: #6aaaf6; --accent-fg: #071a33; --accent-soft: #1a3558; --series2: #c3a3f0;
  --ok: #75d094; --ok-soft: #173424; --warn: #ebb653; --warn-soft: #3a2d10;
  --bad: #ff9186; --bad-soft: #43201d; color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.45;
  margin: 0;
  padding-block: 20px 64px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.num { font-variant-numeric: tabular-nums; }

header { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; justify-content: space-between; }
.patient { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 260px; }
.patient input { font: inherit; font-size: 1.6rem; font-weight: 700; background: transparent; color: var(--fg); border: 0; border-bottom: 2px dashed var(--line); padding: 2px 0; width: 100%; }
.patient input:focus-visible { outline: none; border-bottom-color: var(--accent); border-bottom-style: solid; }
.who { display: flex; flex-direction: column; gap: 4px; flex: 0 1 260px; min-width: 200px; }

label { font-weight: 700; font-size: .92rem; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=time], input[type=password], select, textarea {
  background: var(--surface); color: var(--fg); border: 1.5px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%; min-height: 46px;
}
textarea { resize: vertical; min-height: 84px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.err { color: var(--bad); font-weight: 700; font-size: .9rem; min-height: 1.2em; }

.btn { background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 6px; padding: 11px 18px; font-weight: 700; cursor: pointer; min-height: 46px; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn.danger { background: var(--bad); color: var(--surface); }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .88rem; }

.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .big { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }

nav.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); overflow: visible; }
nav.tabs a { flex: 1 1 0; min-width: 0; padding: 12px 6px; text-align: center; line-height: 1.2; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 4px solid transparent; margin-bottom: -2px; overflow-wrap: anywhere; }
nav.tabs a[aria-current=page] { color: var(--accent); border-bottom-color: var(--accent); }

section.panel { display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
form.card { display: flex; flex-direction: column; gap: 14px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.formfoot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }

.list { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: flex-start; }
.item .main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item .main strong { overflow-wrap: anywhere; }
.item .side { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.item.done .title { text-decoration: line-through; color: var(--muted); }
.item.void { opacity: .65; }
.item.void .title, .item.void .num { text-decoration: line-through; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }

.pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; border: 1.5px solid currentColor; white-space: nowrap; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.bad { color: var(--bad); background: var(--bad-soft); }
.pill.info { color: var(--accent); background: var(--accent-soft); }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr.void td { opacity: .6; }
tr.void .reading { text-decoration: line-through; }
.reading { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-family: var(--font); font-size: 11px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ref { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; }
.chart .l1 { stroke: var(--accent); fill: none; stroke-width: 2.5; }
.chart .l2 { stroke: var(--series2); fill: none; stroke-width: 2.5; }
.chart .d1 { fill: var(--accent); }
.chart .d2 { fill: var(--series2); }
.chart text.t1 { fill: var(--accent); font-weight: 700; font-size: 12px; }
.chart text.t2 { fill: var(--series2); font-weight: 700; font-size: 12px; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); border: 2px dashed var(--line); border-radius: 8px; }
.notice { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); border-radius: 8px; padding: 12px 16px; font-weight: 700; }
#status { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 8px; font-weight: 700; z-index: 20; max-width: calc(100vw - 32px); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; align-items: center; }
.sw { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; width: 100%; }
.check.off { cursor: default; }
.chk { width: 30px; height: 30px; accent-color: var(--accent); flex: none; margin: 0; }
.ctext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
#routineList .chips { gap: 8px; margin-top: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span, .daybtn { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 6px; font-weight: 700; background: var(--surface); color: var(--fg); min-width: 56px; text-align: center; cursor: pointer; }
.chip input:checked + span, .daybtn[aria-pressed=true] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.daybtn { padding: 5px 9px; min-width: 0; font-size: .85rem; }
.weeknav { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dayb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); cursor: pointer; font-size: .8rem; }
.dayb .dn { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dayb[aria-pressed=true] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.dayb.today .dn { text-decoration: underline; }
.dayb.full .st { color: var(--ok); font-weight: 700; }
.dayb[aria-pressed=true].full .st { color: var(--accent-fg); }
.portal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.portal a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); text-decoration: none; }
.portal a strong { font-size: 1.1rem; }
.portal a span { font-size: .85rem; color: var(--muted); }
.portal a[aria-current=page] { border-color: var(--accent); background: var(--accent-soft); }
.grouphead { margin: 6px 0 -2px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.qrbox { background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--line); display: inline-block; line-height: 0; }
.qrbox img { width: 180px; height: 180px; image-rendering: pixelated; }
.qrbox.large img { width: min(340px, 72vw); height: min(340px, 72vw); }
.aide { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
@media (max-width: 520px) { .aide { grid-template-columns: 1fr; } }
.aide .info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.linkrow { display: flex; flex-wrap: wrap; gap: 8px; }
.linkrow input { flex: 1 1 220px; font-size: .85rem; }
.hello { display: flex; flex-direction: column; gap: 6px; }
.hello .big { font-size: 1.5rem; font-weight: 700; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ok); }
.item.big .btn { min-height: 52px; min-width: 130px; font-size: 1.05rem; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: filter .15s; } }

.u-light { font-weight: 400; } .u-lg { font-size: 1.15rem; } .u-m0 { margin: 0; } .u-ptr { cursor: pointer; font-weight: 700; }
.u-mt12 { margin-top: 12px; } .u-my8 { margin: 8px 0; }
.sw1 { background: var(--accent); } .sw2 { background: var(--series2); } .sw3 { background: var(--bad); }
.acct { display: flex; flex-direction: column; gap: 2px; flex: 0 1 300px; min-width: 200px; }
.authcard { max-width: 420px; margin: 8vh auto 0; }
.authcard h1 { font-size: 1.6rem; }
#posterSheet { display: none; }
@media print {
  body { background: #fff; color: #000; padding: 0; }
  #app, #auth, #status { display: none !important; }
  #posterSheet { display: block; text-align: center; break-inside: avoid; font-family: Arial, Helvetica, sans-serif; color: #000; }
  #posterSheet h1 { font-size: 44px; margin: 0 0 6px; }
  #posterSheet h2 { font-size: 30px; font-weight: 400; margin: 0 0 20px; }
  #posterSheet img { width: 4.5in; max-width: 90%; image-rendering: pixelated; border: 2px solid #000; padding: 10px; }
  #posterSheet ol { display: inline-block; text-align: left; font-size: 20px; line-height: 1.45; margin: 16px 0 10px; max-width: 6.5in; }
  #posterSheet .pnote { font-size: 22px; font-weight: 700; white-space: pre-wrap; max-width: 6.5in; margin: 8px auto 10px; border: 2px solid #000; padding: 10px; }
  #posterSheet .plink { font-size: 14px; color: #333; word-break: break-all; }
  @page { size: letter; margin: 0.5in; }
}

.side { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.patient input[type=text] { background: transparent; border: 0; border-bottom: 2px dashed var(--line); border-radius: 0; padding: 2px 0; font-size: 1.6rem; font-weight: 700; min-height: 0; }
.patient input[type=text]:focus-visible { outline: none; border-bottom-color: var(--accent); border-bottom-style: solid; }
.patient input[type=text][readonly] { border-bottom: 0; }

.envbar { position: sticky; top: 0; z-index: 30; background: var(--warn-soft); color: var(--warn); border-bottom: 2px solid var(--warn); text-align: center; font-weight: 700; padding: 8px 12px; margin: -20px calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 16px; }
@media print { .envbar { display: none !important; } }

.item > form { flex: 1 1 100%; min-width: 0; }

.tick { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.tick span { min-width: 0; }
.chk { width: 28px; height: 28px; accent-color: var(--accent); flex: none; margin: 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: block; }
.thumbwrap { position: relative; }
.thumbwrap button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--bad); color: var(--surface); font-weight: 700; cursor: pointer; line-height: 1; }
.nophoto { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: .75rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 4px; }
#lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .88); display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; padding: 16px; }
#lightbox[hidden] { display: none !important; }
#lightbox img { max-width: 100%; max-height: 78vh; border-radius: 6px; background: #000; }
.lbbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; width: 100%; max-width: 640px; }
.lbbar .btn.ghost { background: var(--surface); }
.featrow { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.featrow .sub { display: flex; flex-direction: column; gap: 10px; padding-left: 40px; }
.featrow[data-off=true] .sub { opacity: .5; }
.feathead strong { font-size: 1.05rem; }
@media print { #lightbox { display: none !important; } }

.lbtext { color: #fff; font-weight: 700; }

nav.tabs.many a { font-size: .8rem; padding: 12px 2px; }
.item.dim { opacity: .6; }
.item.important { border-left: 5px solid var(--bad); }
.cardsec { display: flex; flex-direction: column; gap: 2px; }
.cardsec .lbl { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cardsec .val { white-space: pre-wrap; overflow-wrap: anywhere; }
.cardsec a { font-weight: 700; }
.dnrline { border: 2px solid var(--bad); border-radius: 8px; padding: 10px; }
.cardrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cardrow .field { flex: 1 1 140px; min-width: 0; }
#cardSheet { display: none; }
@media print {
  body.print-card #posterSheet { display: none !important; }
  body.print-card #cardSheet { display: block; font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 16px; line-height: 1.4; }
  #cardSheet h1 { font-size: 30px; margin: 0 0 4px; }
  #cardSheet h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 2px; border-bottom: 1px solid #000; }
  #cardSheet p { margin: 2px 0; white-space: pre-wrap; }
  #cardSheet .pdnr { border: 2px solid #000; padding: 8px; font-weight: 700; margin-top: 12px; }
}
/* many tabs on a phone: smaller type and shorter names so the row never scrolls */
nav.tabs.dense a { padding: 12px 1px; font-size: .78rem; overflow-wrap: normal; }
@media (max-width: 520px) { nav.tabs.dense a { font-size: .66rem; letter-spacing: -.01em; } }
.sumtbl table { min-width: 0; }
.sumtbl th, .sumtbl td { padding: 8px 10px; }
@media print {
  body.psum { background: #fff; color: #000; }
  body.psum #app { display: block !important; max-width: none; padding: 0; }
  body.psum #app > :not(#p-summary) { display: none !important; }
  body.psum #p-summary { display: flex !important; gap: 10px; }
  body.psum .noprint, body.psum #status { display: none !important; }
  body.psum .card { border: 1px solid #000; background: #fff; box-shadow: none; break-inside: avoid; padding: 10px; }
  body.psum .tablewrap { border: 0; overflow: visible; background: #fff; }
  body.psum th, body.psum td { border-bottom: 1px solid #999; color: #000; }
  body.psum h2 { font-size: 1.1rem; color: #000; }
  body.psum .muted { color: #333; }
  body.psum .pill { border-color: #000; color: #000; background: #fff; }
}
/* Terms, privacy and footer */
.legal { gap: 12px; padding-bottom: 16px; }
.legal h2 { margin-top: 12px; }
.legal p, .legal ul { margin: 0; line-height: 1.5; }
.legal li { margin: 4px 0; }
.sitefoot { max-width: 860px; margin: 24px auto 0; padding: 16px 0 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.sitefoot p { margin: 4px 0; }
.sitefoot a { color: var(--muted); }
@media print { .sitefoot { display: none; } }
.dangerzone { border-color: var(--bad); }

/* The emergency tab is red and sits first so it is easy to find */
nav.tabs a.emerg { color: var(--bad); background: var(--bad-soft); border-radius: 8px 8px 0 0; border-bottom-color: var(--bad); }
nav.tabs a.emerg[aria-current=page] { color: #fff; background: var(--bad); border-bottom-color: var(--bad); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) nav.tabs a.emerg[aria-current=page] { color: #1a0a08; } }
:root[data-theme="dark"] nav.tabs a.emerg[aria-current=page] { color: #1a0a08; }

/* ---- softer, friendlier look ---- */
:root { --bg: #f4f8fd; --line: #dbe5f1; --accent: #2a69c4; --accent-soft: #e6f0fc; --radius: 16px; --shadow: 0 2px 10px rgba(28, 60, 110, .08); }
:root[data-theme="dark"] { --shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.card, .item, .tour-card { border-radius: var(--radius); box-shadow: var(--shadow); }
.btn { border-radius: 12px; }
input, select, textarea { border-radius: 12px; }
nav.tabs a { border-radius: 999px; }
.empty { border-radius: var(--radius); background: var(--accent-soft); border-style: solid; border-color: transparent; color: var(--fg); }
.greet { font-size: 1.15rem; font-weight: 700; margin: 4px 0 14px; color: var(--accent); }
html[data-text="large"] body { zoom: 1.2; }
html[data-text="xlarge"] body { zoom: 1.45; }
.tour { position: fixed; inset: 0; background: rgba(15, 30, 55, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; overflow: auto; }
.tour-card { background: var(--surface); color: var(--fg); max-width: 440px; width: 100%; padding: 22px; display: grid; gap: 12px; }
.tour-card.wide { max-width: 560px; max-height: 92vh; overflow: auto; }
.tour-card h2, .tour-card p { margin: 0; }
.setup-q { align-items: flex-start; }
.toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; max-width: 920px; margin: 0 auto 8px; }
.toolbar select { width: auto; min-height: 36px; padding: 4px 8px; }
.landing .toolbar { padding-top: 8px; }

/* ---- selected tab: solid fill, others outlined ---- */
nav.tabs { border-bottom: 0; gap: 4px; }
nav.tabs a { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; margin: 0; padding-block: 12px; }
nav.tabs a[aria-current=page] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
nav.tabs a.emerg { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-soft); }
nav.tabs a.emerg[aria-current=page] { background: var(--bad); color: #fff; border-color: var(--bad); }

/* ---- easier to tap and see ---- */
.btn { min-height: 48px; }
.btn.sm { min-height: 42px; }
nav.tabs a { min-height: 48px; display: flex; align-items: center; justify-content: center; }
.item.big .chk { width: 34px; height: 34px; flex: none; }
.item.big .check { padding-block: 6px; }
.item.big.done { background: var(--ok-soft); border-color: var(--ok); }
.prog { display: grid; gap: 8px; margin-bottom: 8px; font-size: 1.15rem; }
.attention { background: var(--warn-soft); border: 2px solid var(--warn); display: grid; gap: 8px; margin-bottom: 10px; }
.attention .side { justify-content: space-between; align-items: center; }
.quick { margin: 0 0 12px; gap: 8px; }

/* tour: point at the real button */
.tour.spot { background: none; }
.tour-ring { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(15, 30, 55, .6); outline: 3px solid #fff; pointer-events: none; transition: all .2s ease; }
.tour.spot .tour-card { position: relative; z-index: 1; }

/* tour: smaller card that always fits the screen */
.tour.spot { padding: 8px; }
.tour.spot .tour-card { max-width: 340px; padding: 12px 14px; gap: 6px; max-height: 42vh; overflow: auto; font-size: .92rem; }
.tour.spot .tour-card h2 { font-size: 1.05rem; }
.tour.spot .tour-card p { line-height: 1.35; }
.tour.spot .tour-card .btn { min-height: 38px; padding: 6px 14px; }
.tour.spot .tour-card .side { gap: 8px; }
.plus { font-size: 1.4rem; line-height: 1; min-width: 48px; }
.timerow .side { flex-wrap: nowrap; } .timerow .side input { flex: 1; }

/* fold-away sections */
h2.foldh { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; user-select: none; }
h2.foldh::after { content: ""; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; margin-right: 4px; flex: none; opacity: .7; }
.card.folded > h2.foldh::after { transform: rotate(-45deg); }
.card.folded > *:not(h2) { display: none !important; }
h2.foldh:focus-visible { outline: 3px solid var(--accent, #2a7); outline-offset: 2px; border-radius: 6px; }

/* phones: many tabs wrap onto rows at a readable size instead of squeezing words apart */
@media (max-width: 640px) {
  nav.tabs.dense { flex-wrap: wrap; }
  nav.tabs.dense a { flex: 1 1 30%; font-size: .95rem; letter-spacing: 0; padding: 10px 4px; min-height: 48px; overflow-wrap: normal; word-break: keep-all; hyphens: none; white-space: nowrap; }
}

/* every tab row: wrap onto more rows rather than ever cutting a word */
nav.tabs { flex-wrap: wrap; }
nav.tabs a { flex: 1 1 auto; min-width: max-content; overflow-wrap: normal; word-break: keep-all; hyphens: none; }
@media (max-width: 640px) { nav.tabs a { min-width: 28%; white-space: normal; } nav.tabs.dense a { min-width: 0; } }

/* help screen */
.help details.faq { border: 2px solid var(--line); border-radius: 12px; padding: 0 12px; }
.help details.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 24px; }
.help details.faq p { margin: 0 0 12px; }
.help textarea { width: 100%; }
