/* Overpass draws the middle dot (U+00B7) with no width in Chrome, so separators like ' · ' touched the next word; the dot falls back to the system font. */
/* Layout: one readable column, sections as stacked panels; printed forms are letter-size sheets. */
/* Brand fonts, bundled so they work offline (SIL Open Font License; see fonts/). Same faces as lacccinematv.com. */
@font-face { font-family: "Overpass"; src: url("../fonts/overpass-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00B6, U+00B8-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Overpass"; src: url("../fonts/overpass-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #f6f3ee; --surface: #ffffff; --surface-2: #efe9df; --line: #d6cdbf; --fg: #1a1815; --muted: #5c5448;
  --accent: #ffbf1a; --on-accent: #1a1815; --link: #7a4f00; --focus: #1a1815; --warn-bg: #fdf1d6; --warn: #7a4f00;
  --stop-bg: #fbe4e1; --stop: #8f1d12; --ok: #1f6a35;
  --s-intday: #ffffff; --s-extday: #fff4c2; --s-intnight: #dfe9fb; --s-extnight: #dcf1e2;
  --s-intday-b: #9c9486; --s-extday-b: #c99a00; --s-intnight-b: #2f6fd6; --s-extnight-b: #2e8b4f;
  --s-intdusk: #f6e3ef; --s-extdusk: #fbe2cf; --s-intdusk-b: #a1457e; --s-extdusk-b: #b8611f;
  --font: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Courier Prime", "Courier New", ui-monospace, monospace;
  --control: #7d7466;
  --r: 16px; --gap: 1rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  /* Matches the main site's Tungsten palette (claude/brand.md). Gold = anything you can act on. */
  :root { --bg: #0e0d0c; --surface: #1a1815; --surface-2: #26231e; --line: #36322b; --fg: #f5f1ea; --muted: #b3ab9c; --control: #8a8172;
    --link: #ffbf1a; --focus: #ffbf1a; --warn-bg: #3a2f17; --warn: #ffd875; --stop-bg: #3d1f1b; --stop: #ffb3a8; --ok: #8fdc9f;
    --s-intday: #2a2722; --s-extday: #3a3215; --s-intnight: #1c2a40; --s-extnight: #1a3324;
    --s-intday-b: #a49c8e; --s-extday-b: #e2b52b; --s-intnight-b: #6f9df0; --s-extnight-b: #5cc283;
    --s-intdusk: #3a2233; --s-extdusk: #3d2a1b; --s-intdusk-b: #e08cc0; --s-extdusk-b: #f0a060; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1.0625rem/1.55 var(--font);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: var(--r); font-weight: 700; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + .5rem); }

.top { display: flex; align-items: center; padding: calc(env(safe-area-inset-top, 0px) + .6rem) max(16px, env(safe-area-inset-right, 0px)) .6rem max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: inline-flex; gap: .55rem; align-items: center; color: var(--fg); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; min-height: 44px; }
.main { max-width: 46rem; margin: 0 auto; padding: 1.25rem max(16px, env(safe-area-inset-right, 0px)) calc(4rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.main:focus { outline: none; }

h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.1; margin: .4rem 0 .6rem; text-wrap: balance; }
h1:focus { outline: none; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 2.25rem 0 .75rem; text-wrap: balance; }
h3 { font-size: 1.1rem; margin: 1rem 0 .4rem; }
p { margin: 0 0 .8rem; max-width: 65ch; }
.lede { color: var(--muted); font-size: 1.1rem; }
.muted { color: var(--muted); font-size: .95rem; }
/* Breadcrumb: the body face (the mono is for numbers and script-like data), with the Documents shortcut on the right. */
.crumb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; margin: 0 0 .75rem; }
.crumb { font-size: .95rem; color: var(--muted); }
.crumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.crumb li { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; overflow-wrap: anywhere; }
.crumb li + li::before { content: "/"; margin: 0 .5rem; color: var(--control); }
.crumb a { font-weight: 600; }
.crumb [aria-current] { color: var(--fg); font-weight: 600; }
.crumb-row__docs { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: .95rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--fg); background: transparent; color: var(--fg); font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: #ffd35c; }
.btn--quiet { border-color: var(--control); }
.btn--danger { background: var(--stop); border-color: var(--stop); color: var(--bg); }
.btn-link { background: none; border: 0; padding: .4rem .2rem; min-height: 44px; color: var(--link); font: inherit; font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1rem 0; }
.next { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; max-width: none; }
.btn--next { gap: .35rem; }
.next__arrow { font-weight: 400; }

/* sub navigation */
.subnav { display: grid; gap: .6rem; margin: 0 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.subnav__stages { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 999px; justify-self: start; }
.subnav__stage-btn { font: inherit; font-size: .9rem; font-weight: 700; min-height: 40px; padding: .3rem 1rem; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.subnav__stage-btn.has-current { color: var(--fg); }
.subnav__stage-btn[aria-expanded="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.subnav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.subnav__list[hidden] { display: none; }
@media (max-width: 34rem) { .subnav__list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: .25rem; } .subnav__list li { flex: none; } }
.subnav a { display: inline-flex; align-items: center; min-height: 44px; padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; font-size: .95rem; font-weight: 600; white-space: nowrap; }
.subnav a[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* forms */
.form { display: grid; gap: .25rem; }
.field { display: grid; gap: .3rem; margin: 0 0 1rem; min-width: 0; }
.field__label { font-weight: 700; }
.field__req { font-weight: 400; color: var(--muted); }
.field__hint { margin: 0; color: var(--muted); font-size: .92rem; }
.field__error { margin: 0; color: var(--stop); font-weight: 600; font-size: .95rem; }
.input { width: 100%; min-height: 44px; padding: .55rem .7rem; border: 1.5px solid var(--control); border-radius: 12px; background: var(--surface); color: var(--fg); font: inherit; }
.input:hover { border-color: var(--muted); }
.input[aria-invalid="true"] { border-color: var(--stop); }
.input--area { min-height: 6rem; resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; align-items: start; }
/* Side by side, hints go under the box so every label and box lines up across the row (screen readers still read the hint with the box). */
.row:not(.row--add) > .field > .field__hint { order: 2; }
.row:not(.row--add) > .field > .field__error { order: 3; }
.row__end { align-self: end; margin-bottom: 1rem; }
.fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem .6rem; margin: 0 0 1.25rem; background: var(--surface); min-width: 0; }
.fieldset legend { float: left; width: 100%; font-weight: 700; padding: 0; margin: 0 0 .5rem; }
.fieldset legend + * { clear: both; }
.fieldset--plain { border: 0; padding: .25rem 0 0; background: none; }
.fieldset--plain legend { margin-bottom: .3rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; padding: .35rem 0; }
.check__box { width: 1.4rem; height: 1.4rem; margin: .1rem 0 0; flex: none; accent-color: var(--accent); }
.check__label { cursor: pointer; }
.check__hint { display: block; color: var(--muted); font-size: .9rem; }
.radios { display: flex; gap: 1.5rem; }
.screen__label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.flag__h { font-size: 1.1rem; margin: .5rem 0 .4rem; }
.flag { border-left: 4px solid var(--accent); padding: .25rem 0 .25rem 1rem; margin: .75rem 0 1rem; }

/* panels, alerts, cards */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem 1.35rem; margin: 1.75rem 0; }
.panel > h2:first-child, .fieldset > legend + h2 { margin-top: 0; }
.panel h2 { margin-top: 0; }
.panel--danger { border-color: var(--stop); }
.alert { background: var(--warn-bg); color: var(--fg); border-left: 4px solid var(--warn); border-radius: 6px; padding: .7rem .9rem; }
.alert--ok { background: var(--surface-2); border-left-color: var(--ok); }
.alert--stop { background: var(--stop-bg); border-left-color: var(--stop); }
.alert:focus { outline: 3px solid var(--focus); }
.confirm { margin-top: 1rem; }
.empty { color: var(--muted); padding: 1rem 0; }
.cards { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; }
.card__title { margin: 0 0 .35rem; font-size: 1.2rem; }
.card__meta { margin: 0 0 .25rem; color: var(--muted); font-size: .95rem; }
.card__warn { color: var(--warn); font-weight: 600; }
.inline-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.inline-list a { display: inline-flex; min-height: 44px; align-items: center; }
.saved { color: var(--muted); font-size: .9rem; margin-top: 2rem; }

/* banners */
.update, .banner { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .6rem max(16px, env(safe-area-inset-right, 0px)) .6rem max(16px, env(safe-area-inset-left, 0px)); background: var(--warn-bg); border-bottom: 1px solid var(--line); }
.update p, .banner p { margin: 0; }
.update[hidden], .banner[hidden] { display: none; }

/* checklist */
.summary { display: grid; gap: .1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1.1rem; margin: .5rem 0 1rem; }
.summary p { margin: 0; }
.badge { display: inline-block; margin-left: .5rem; padding: .05rem .55rem; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.badge--warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }
.phase h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem; }
.phase__count { font-size: .95rem; font-weight: 400; color: var(--muted); }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .7rem 1.1rem .55rem; }
.task.is-done { background: transparent; padding-block: .45rem; }
.task.is-done .task__body { display: flex; flex-wrap: wrap; gap: .25rem; color: var(--muted); font-size: .88rem; }
.task__auto { color: var(--muted); }
.task .check__label { font-weight: 700; }
.task.is-done .check__label { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.task__body { padding-left: 2.05rem; font-size: .95rem; }
.task__body p { margin: .2rem 0; }
.task__due { color: var(--muted); font-weight: 600; }
.task__links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; align-items: center; padding-left: 2.05rem; font-size: .95rem; }
.task__links a { display: inline-flex; align-items: center; min-height: 44px; }
.hidden-items { margin-top: .6rem; }
.hidden-items summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); }

/* dialog */
.dialog { max-width: 32rem; width: calc(100% - 2rem); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); padding: 1.25rem; }
.dialog::backdrop { background: rgba(0, 0, 0, .55); }
.dialog h2 { margin-top: 0; }

/* budget */
.topsheet { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-bottom: 1rem; }
.topsheet th, .topsheet td { padding: .5rem .25rem; border-bottom: 1px solid var(--line); text-align: left; }
.topsheet td { text-align: right; font-weight: 600; }
.topsheet__sub th, .topsheet__sub td { border-top: 2px solid var(--fg); }
.topsheet__grand th, .topsheet__grand td { font-size: 1.2rem; font-weight: 800; }
.acct { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 .6rem; }
.acct__sum { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; padding: .75rem 1rem; min-height: 44px; cursor: pointer; font-weight: 700; }
.acct__code { color: var(--muted); font-family: var(--mono); font-size: .9rem; font-weight: 400; }
.acct__name { flex: 1 1 12rem; }
.acct__total { font-variant-numeric: tabular-nums; }
.acct__body { padding: 0 1rem .75rem; }
.bline { background: var(--bg); }
.bline__total { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.row--3 { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.sheet__table .num, .sheet__table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet__table .is-acct th, .sheet__table .is-acct td { background: #f3f3f3; font-weight: 700; }
.sheet__table .is-total th, .sheet__table .is-total td { font-weight: 800; border-top: 2px solid #111; }

/* template preview */
.tpl { margin: 2rem 0; }
.tpl:focus { outline: none; }
.tpl__name { font-family: var(--mono); font-size: 1rem; color: var(--muted); }

/* script, breakdown and stripboard */
.strip--int-day { background: var(--s-intday); border-left-color: var(--s-intday-b) !important; }
.strip--ext-day { background: var(--s-extday); border-left-color: var(--s-extday-b) !important; }
.strip--int-night { background: var(--s-intnight); border-left-color: var(--s-intnight-b) !important; }
.strip--ext-night { background: var(--s-extnight); border-left-color: var(--s-extnight-b) !important; }
.key { display: inline-block; padding: .05rem .5rem; border: 1px solid var(--line); border-left: 6px solid; border-radius: 4px; font-size: .85rem; color: var(--fg); }
.strips { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); gap: .25rem 1rem; border: 1px solid var(--line); border-left: 8px solid; border-radius: 8px; padding: .6rem .8rem .2rem; }
@media (max-width: 34rem) { .strip { grid-template-columns: minmax(0, 1fr); } }
.strip__main p { margin: 0 0 .25rem; }
.strip__title { font-size: 1.02rem; }
.strip__tag { font-family: var(--mono); font-size: .85rem; }
.strip__syn, .strip__meta { color: var(--muted); font-size: .92rem; }
.strip__ctl .field { margin-bottom: .4rem; }
.strip__moves { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.strip__moves .btn { min-height: 44px; padding: .4rem .8rem; font-size: .92rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.dayblock { margin: 1.5rem 0; }
.dayblock__h { margin-bottom: .2rem; }
.chips { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .2rem .1rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.chip__x { min-height: 44px; min-width: 44px; padding: 0 .5rem; border: 0; background: none; color: var(--link); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.row--add { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.row--add > .btn { margin-bottom: 1rem; }
.pager { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; margin: 1.5rem 0; }
.scroll-x { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.grid-table { border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; min-width: 100%; }
.grid-table th, .grid-table td { border: 1px solid var(--line); padding: .35rem .5rem; text-align: center; white-space: nowrap; }
.grid-table th[scope="row"] { text-align: left; }
.grid-table thead th { background: var(--surface-2); }
.th-sub { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.dood--sw, .dood--swf, .dood--w, .dood--wf { font-weight: 700; }
.dood--h { color: var(--muted); }
.sheets .sheet + .sheet { margin-top: 1.5rem; }
.sheet__scene { font-size: 1em; }
.sheet__cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.2rem; }
@media (max-width: 40rem) { .sheet__cats { grid-template-columns: 1fr 1fr; } }
.muted-print { color: #666; }
.sheet .grid-table th, .sheet .grid-table td { border-color: #555; color: #111; }
.sheet .grid-table thead th { background: #eee; }

.strip--int-dusk { background: var(--s-intdusk); border-left-color: var(--s-intdusk-b) !important; }
.strip--ext-dusk { background: var(--s-extdusk); border-left-color: var(--s-extdusk-b) !important; }
.btn--small { min-height: 44px; padding: .4rem .8rem; font-size: .92rem; }
.legend { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.legend__item { padding: .15rem .6rem; border: 1px solid var(--line); border-left: 8px solid; border-radius: 4px; font-size: .88rem; color: var(--fg); }
.sday { margin: 1.5rem 0; }
.sday__meta { color: var(--muted); font-weight: 400; font-size: .95rem; }
.scenes { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.scene-card { border: 1px solid var(--line); border-left: 8px solid; border-radius: 12px; padding: .75rem 1rem .8rem; }
.scene-card p { margin: 0; }
.scene-card__top { display: flex; align-items: baseline; gap: .7rem; }
.scene-card__num { font-family: var(--mono); font-weight: 700; font-size: 1.35rem; min-width: 2ch; color: var(--fg); }
.scene-card__h { font-size: 1.12rem; line-height: 1.25; margin: 0; letter-spacing: .01em; }
.scene-card__h a { color: var(--fg); text-decoration-color: var(--link); }
.scene-card__h a:hover { color: var(--link); }
.scene-card__facts { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: .45rem 0 .4rem; padding: 0; }
.scene-card__facts li { font-size: .8rem; font-weight: 700; padding: .05rem .55rem; border-radius: 999px; border: 1px solid currentColor; color: var(--muted); }
.scene-card__syn { color: var(--fg); font-size: .95rem; line-height: 1.4; }
.scene-card__dl { display: grid; gap: .1rem; margin: .45rem 0 0; font-size: .88rem; }
.scene-card__dl > div { display: flex; gap: .5rem; }
.scene-card__dl dt { color: var(--muted); min-width: 5.5rem; }
.scene-card__dl dd { margin: 0; }
.scene-card__todo { color: var(--warn); font-weight: 700; }
.strip__info p { margin: 0 0 .25rem; }
.strip__num { font-family: var(--mono); font-weight: 700; margin-right: .4rem; }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.table-scroll:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.dood { border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; min-width: 100%; }
.dood th, .dood td { border: 1px solid var(--line); padding: .35rem .5rem; text-align: center; white-space: nowrap; }
.dood th[scope="row"] { text-align: left; }
.dood thead th { background: var(--surface-2); }
.dood__date { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.dood__sw, .dood__swf, .dood__w, .dood__wf { font-weight: 700; }
.dood__h { color: var(--muted); }
.sheet .dood th, .sheet .dood td { border-color: #555; color: #111; padding: .22em .35em; }
.sheet .dood thead th { background: #eee; }
.sheet .dood__date, .sheet .dood__h { color: #444; }
.ol__ext-day td, .ol__ext-day th { background: #fff4c2; }
.ol__int-night td, .ol__int-night th { background: #dfe9fb; }
.ol__ext-night td, .ol__ext-night th { background: #dcf1e2; }
.ol__int-dusk td, .ol__int-dusk th { background: #f6e3ef; }
.ol__ext-dusk td, .ol__ext-dusk th { background: #fbe2cf; }
.sheet--break + .sheet--break { margin-top: 1.5rem; }

/* breakdown categories: color bars like Movie Magic's (decoration only; every box has a text label) */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1rem; }
.cat { border-left: 6px solid var(--line); padding-left: .6rem; background: none; }
.cat--extras { border-left-color: #3b82f6; }
.cat--stunts { border-left-color: #1d4ed8; }
.cat--vehicles { border-left-color: #14b8a6; }
.cat--props { border-left-color: #22a35a; }
.cat--camera { border-left-color: #06b6d4; }
.cat--sfx { border-left-color: #eab308; }
.cat--wardrobe { border-left-color: #f59e0b; }
.cat--makeup { border-left-color: #f97316; }
.cat--animals { border-left-color: #b91c1c; }
.cat--music { border-left-color: #7c3aed; }
.cat--sound { border-left-color: #a78bfa; }
.cat--art { border-left-color: #93c5fd; }
.cat--dressing { border-left-color: #c026d3; }
.cat--greenery { border-left-color: #f472b6; }
.cat--equipment { border-left-color: #f9a8d4; }
.cat--security { border-left-color: #6b7280; }
.cat--labor { border-left-color: #9ca3af; }
.cat--vfx { border-left-color: var(--fg); }
.cat--mfx { border-left-color: #a3a314; }
.cat--misc { border-left-color: #92541b; }
.more-cats { margin: .5rem 0 1rem; }
.more-cats > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--link); text-decoration: underline; }
.strip--banner { background: var(--surface-2); border-left-color: var(--fg) !important; }
.strip--banner .field { margin-bottom: .4rem; }
.sday__end { margin: .5rem 0; padding: .4rem .8rem; border-radius: 6px; background: var(--fg); color: var(--bg); font-weight: 700; font-size: .92rem; }
.sheet__end { font-weight: 700; margin: .35em 0 0; font-size: .944em; }
.ol__banner td { background: #333; color: #fff; font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* call sheet builder */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem 1rem; margin: .5rem 0 1rem; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; font-family: var(--mono); font-weight: 700; }
.inline-list a.is-current { font-weight: 800; text-decoration-thickness: 3px; }
.runorder { padding-left: 1.4rem; }
.runorder li { margin: .25rem 0; }
.runorder__t { font-family: var(--mono); font-weight: 700; margin-right: .6rem; }

/* gear request */
.gear-list, .cart { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .5rem; }
.gear-item, .cart__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gear-item p, .cart__name p { margin: 0; }
.gear-item__name { font-weight: 700; }
.gear-item__meta { color: var(--muted); font-size: .9rem; }
.cart__ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.cart__ctl .field { margin: 0; width: 6.5rem; }
#gear-text { font-family: var(--mono); font-size: .9rem; }

/* Studio B lighting plot */
.plot-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; }
.plot { display: block; width: 100%; height: auto; max-width: 46rem; margin: 0 auto; font-family: var(--font); }
.plot__wall { stroke: #222; stroke-width: 3; }
.plot__lane-bg { fill: #fff; }
.plot__hatch { stroke: #e05252; stroke-width: 2; }
.plot__floor { fill: #fff; stroke: #222; stroke-width: 2; }
.plot__pipe { stroke: #9a9a9a; stroke-width: 2; }
.plot__lbl { font-size: 18px; text-anchor: middle; fill: #222; }
.plot__dim { font-size: 20px; text-anchor: middle; fill: #222; }
.plot__dimline { stroke: #222; stroke-width: 1.5; }
.plot__box { fill: #fff; stroke: #222; stroke-width: 2; }
.plot__note { font-size: 15px; text-anchor: middle; fill: #222; }
.plot__lane { font-size: 16px; font-weight: 700; text-anchor: middle; fill: #c62828; paint-order: stroke; stroke: #fff; stroke-width: 6px; }
.plot__fx circle { fill: #111; stroke: #111; stroke-width: 2.5; }
.plot__fx .plot__num { fill: #fff; font-size: 15px; font-weight: 800; text-anchor: middle; }
.plot__fx--stand circle { fill: #fff; }
.plot__fx--stand .plot__num { fill: #111; }
.plot__aim { stroke: #111; stroke-width: 3; }
.plot__arrowhead { fill: #111; }
.fx .row--3 { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.sheet__plot { margin: .4em 0; }
.sheet__plot .plot { max-width: 4.9in; }
@media print { .sheet__plot { break-inside: avoid; } }

/* ---------- printed forms ---------- */
.print-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.print-bar p { margin: 0; }
body.is-print .main { max-width: 52rem; }
/* Printed documents: 9pt body, nothing larger than 10pt (the title). Everything is in em of the sheet so the screen preview keeps the same proportions.
   Places people write by hand (blank lines, blank table rows, signatures) get extra height. */
.sheet { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 4px; padding: 1.75rem; font-size: .875rem; line-height: 1.35; }
.sheet p { margin: .25em 0; }
.sheet a { color: #111; }
.sheet__head { border-bottom: 3px solid #111; padding-bottom: .5em; margin-bottom: .6em; }
.sheet__org { margin: 0; font-size: .833em; text-transform: uppercase; letter-spacing: .08em; color: #444; }
.sheet__title { font-size: 1.111em; line-height: 1.2; margin: .15em 0 .45em; color: #111; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.sheet__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .15em 1.2em; font-size: 1em; }
.sheet__h2 { font-size: 1em; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin: 1.4em 0 .5em; border-bottom: 1px solid #999; padding-bottom: .15em; color: #111; }
.sheet__sec p { max-width: none; }
.sheet__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5em; }
.sheet__kv { display: flex; gap: .35em; flex-wrap: wrap; margin: .1em 0; }
.sheet__lbl { font-weight: 700; white-space: nowrap; }
.sheet__lbl::after { content: ":"; }
.sheet__val { min-width: 0; overflow-wrap: anywhere; }
.sheet__line { display: flex; align-items: flex-end; gap: .4em; margin: .9em 0 .2em; min-width: 0; }
.sheet__fill { flex: 1; border-bottom: 1px solid #111; min-height: 2.2em; min-width: 4em; display: flex; align-items: flex-end; padding-bottom: .1em; }
.sheet__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0 1em; }
.sheet__sign { margin: .6em 0 1.1em; }
.sheet__sign > .sheet__line .sheet__fill { min-height: 3em; } /* room for a signature */
.sheet__check { font-size: 1em; line-height: 1.9; margin: .2em 0; } /* checkbox lines people tick and initial */
.sheet__note { background: #f3f3f3; padding: .45em .65em; border-left: 3px solid #111; font-size: .944em; margin: .6em 0; }
.sheet__list { margin: .15em 0; padding-left: 1.15em; }
.sheet__list li { margin: .05em 0; }
/* Department needs on the call sheet: label sits right on its list, blocks flow in two columns. */
.sheet__needs { columns: 2; column-gap: 1.5em; }
.sheet__need { break-inside: avoid; margin: 0 0 .45em; }
.sheet .sheet__need-h { font-weight: 700; margin: 0; }
.sheet__need .sheet__list { margin: 0; }
.sheet__table { width: 100%; border-collapse: collapse; margin: .4em 0; font-size: .944em; line-height: 1.3; }
.sheet__table th, .sheet__table td { border: 1px solid #555; padding: .3em .45em; text-align: left; vertical-align: top; }
.sheet__table td:empty { height: 2.6em; } /* blank rows: about a third of an inch to write in */
.sheet__table thead th { font-size: 1em; white-space: nowrap; }
.sheet__table thead th { background: #eee; }
.sheet__table tbody th { font-weight: 600; }
.sheet__cap { text-align: left; font-weight: 700; }
.sheet__foot { margin-top: 1.4em; padding-top: .4em; border-top: 1px solid #999; font-size: .833em; color: #444; }
@media (max-width: 40rem) { .sheet { padding: 1rem; } .sheet__grid { grid-template-columns: 1fr; } }

@media print {
  @page { size: letter; margin: 0.4in 0.5in; }
  .noprint, .print-bar, .skip, .top, .update, .banner { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .main { max-width: none; padding: 0; margin: 0; }
  .sheet { border: 0; padding: 0; font-size: 9pt; }
  .sheet__grid { grid-template-columns: 1fr 1fr; }
  .sheet__sec, .sheet__table tr { break-inside: avoid; }
  .sheet--break + .sheet--break { break-before: page; margin-top: 0; }
  .sheet__cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Typewriter face for production metadata (scene numbers, pages, times, dates, codes), like the script it comes from. */
.strip__num, .strip__tag, .sday__meta, .sday__end, .dood td, .dood__date, .ol__banner td { font-family: var(--mono); }
.sheet .dood td, .sheet .ol__banner td { font-family: inherit; }
h1, h2, .brand { letter-spacing: -.01em; }
h1 { font-weight: 800; }

input.input[type="date"], input.input[type="time"] { min-width: 0; max-width: 100%; }

/* project cards on the home screen */
.cards .card .card__meta { margin: .15rem 0; }
.card__actions { margin-top: .6rem; }
.card__actions .confirm { margin-top: .5rem; }
.people-sec { margin: 0 0 2.25rem; }
.people-sec > h2 { margin-top: 1.5rem; }
.actions--tight { margin: .25rem 0 0; gap: .5rem; }

/* ---------- audit pass: destructive actions, rhythm, grouping ---------- */
.btn__icon { width: 1.05em; height: 1.05em; margin-right: .4em; flex: none; }
.btn--remove { color: var(--stop); border-color: var(--stop); background: transparent; }
.btn--remove:hover { background: var(--stop-bg); }
.btn-link.btn--remove { border: 0; display: inline-flex; align-items: center; }
.btn--danger:hover { filter: brightness(1.08); }
.panel--danger { border-color: var(--stop); }
.section > section + section { margin-top: 2.25rem; }
.actions { margin: 1.25rem 0; }
.fieldset .actions--tight { margin-top: .5rem; }
.legend + .actions, .lede + .actions { margin-top: 1rem; }
/* Forms page: grouped, two columns on wide screens */
.form-group { margin: 0 0 2rem; }
.form-group > h2 { margin-top: 1.5rem; }
.form-group .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: .9rem; }
.form-group .card { margin: 0; display: flex; flex-direction: column; gap: .35rem; }
/* Call sheet calls: compact two-up grid */
.calls { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 1.25rem; }
/* Schedule: more air between days, full-width day footer */
.sday { margin: 2.5rem 0; }
.sday__end { display: block; width: 100%; max-width: none; margin: .75rem 0 .5rem; }
.strips { gap: .65rem; }
/* Long agreement paragraphs on printed forms: a touch smaller so one-page forms stay one page. */
.sheet__sec > p:not(.sheet__check) { font-size: .9em; line-height: 1.3; }
.sheet__line.is-filled .sheet__fill { border-bottom-color: #9a9a9a; padding-left: .25em; overflow-wrap: anywhere; }
/* Production number page: a real sequence, so numbered steps */
.steps { list-style: none; counter-reset: step; margin: 1.5rem 0; padding: 0; display: grid; gap: 1.25rem; }
.step { counter-increment: step; position: relative; padding: 1.1rem 1.25rem 1rem 3.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.step::before { content: counter(step); position: absolute; left: 1.1rem; top: 1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; display: grid; place-items: center; }
.step__h { margin: .1rem 0 .5rem; font-size: 1.15rem; }
.step .actions { margin: 1rem 0 .5rem; }
.panel--ok { border-color: var(--ok); }
.pn-big { font-family: var(--mono); font-size: 1.8rem; font-weight: 700; margin: .25rem 0; letter-spacing: .02em; }
.pn-what { margin: .75rem 0; }
.pn-what > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--link); text-decoration: underline; }
.lead .row--3 { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.choice { margin-block: .75rem; }
.choice__opts { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.choice__opts .check { margin: 0; }
[hidden] { display: none !important; }
/* v27: filled lines sit tight; only blank lines keep room to handwrite. Header rows tighter. */
.sheet__h2 { margin: .9em 0 .3em; }
.sheet__head + .sheet__sec .sheet__h2, .sheet__grid .sheet__h2 { margin-top: .5em; }
.sheet__line.is-filled { margin: .3em 0 0; }
.sheet__line.is-filled .sheet__fill { min-height: 1.45em; }
.sheet__line { margin: .5em 0 .1em; }
.sheet__table tr:has(> td:not(:empty)) td:empty { height: auto; }
.sheet__table th, .sheet__table td { padding: .22em .45em; }
.sheet__line > .sheet__lbl { padding-bottom: .12em; }
/* v28: email addresses always get their own full-width line */
.row > .field:has(input[type="email"]) { grid-column: 1 / -1; }
.row:has(> .field > input[type="email"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 30rem) { .row:has(> .field > input[type="email"]) { grid-template-columns: 1fr; } }
.kind-from { margin: .35rem 0 0; }

/* ---------- v30: Script & breakdown hierarchy ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 1px; margin: 1rem 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--surface); padding: .7rem .9rem .6rem; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stat dt { font-size: .82rem; color: var(--muted); margin: 0; }
.stat dd { margin: 0; font-size: 1.55rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: .9rem; font-weight: 600; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin: 0 0 .9rem; }
.toolbar__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter { border: 0; margin: 0; padding: 3px; display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--surface-2); border-radius: 999px; }
.filter__opt { position: relative; }
.filter__radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filter__label { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .3rem .9rem; border-radius: 999px; font-weight: 700; font-size: .92rem; cursor: pointer; color: var(--fg); }
.filter__radio:checked + .filter__label { background: var(--fg); color: var(--bg); }
.filter__radio:focus-visible + .filter__label { outline: 3px solid var(--focus); outline-offset: 2px; }
.filter__count { font-variant-numeric: tabular-nums; font-weight: 600; opacity: .75; }

ol.scenes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.scene-card { border-radius: 10px; padding: .75rem 1rem .8rem; }
.scene-card__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: .2rem .75rem; }
.scene-card__num { font-size: 1.5rem; line-height: 1; }
.scene-card__h { font-size: 1.1rem; }
.scene-card__h a { text-decoration: none; }
.scene-card__h a:hover, .scene-card__h a:focus-visible { text-decoration: underline; }
.scene-card__h a::after { content: ""; } /* the heading is the target; the card stays text-selectable */
.scene-card__day { font-size: .82rem; font-weight: 700; white-space: nowrap; color: var(--fg); }
.scene-card__day.is-none { color: var(--warn); }
.scene-card__facts { font-size: .88rem; color: var(--muted); margin: .2rem 0 .35rem calc(2ch + .75rem) !important; }
.scene-card__syn { margin-left: calc(2ch + .75rem) !important; }
.scene-card__foot { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: .55rem 0 0 calc(2ch + .75rem); }
.scene-card__todo { font-size: .85rem; }
@media (max-width: 34rem) { .scene-card__top { grid-template-columns: auto minmax(0, 1fr); } .scene-card__day { grid-column: 2; } .scene-card__facts, .scene-card__syn, .scene-card__foot { margin-left: 0 !important; } }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; line-height: 1.2; padding: .18rem .55rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
.chip--cast { font-family: var(--mono); letter-spacing: .02em; }
.chip--cast .chip__n { font-family: var(--font); color: var(--muted); }
.chip--cat { border-left-width: 4px; }
.chip--cat .chip__n { color: var(--muted); font-variant-numeric: tabular-nums; }
.script-foot { margin: 1.5rem 0 1rem; }
.script-foot p { margin: 0 0 .4rem; }
.formats summary { cursor: pointer; color: var(--link); font-weight: 600; }
.formats p { font-size: .92rem; color: var(--muted); margin: .4rem 0 0; }
.panel--hero { padding: 1.5rem; }

/* scene page */
.pager--top { margin: .25rem 0 1rem; align-items: center; }
.pager__pos { color: var(--muted); font-size: .9rem; align-self: center; }
.scene-head { border: 1px solid var(--line); border-left: 8px solid; border-radius: 12px; padding: .9rem 1.1rem; margin: 0 0 1.25rem; }
.scene-head__h { margin: 0; display: grid; gap: .15rem; }
.scene-head__num { font-size: .95rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.scene-head__set { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.12; }
.scene-head__facts { margin: .5rem 0 0; font-size: .95rem; }
.scene-sec { margin-bottom: 1rem; }
.scene-sec > h2 { margin-top: 0; }
.row--4 { grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
.cast-pick { margin: .5rem 0 0; }
.cast-pick__opts { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: .25rem 0 .5rem; }
.cast-pick__opts .check__label { font-family: var(--mono); font-weight: 700; }
.cast-pick__opts .check__hint { font-family: var(--font); font-weight: 400; }
.cast-pick .row--add { max-width: 26rem; }
.cats { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: .6rem; margin: .5rem 0 .75rem; }
.cat { border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left-width: 5px; border-left-style: solid; border-radius: 8px; padding: .5rem .65rem .1rem; background: var(--surface); }
.cat.is-filled { background: var(--surface-2); }
.cat .field { margin-bottom: .4rem; }
.cat .field__label { font-size: .92rem; }
.cat .field__hint { font-size: .78rem; margin: 0 0 .25rem; }
.cat__box { min-height: 2.6rem; resize: vertical; overflow: hidden; }
.more-cats { margin: .25rem 0 1rem; }
.more-cats > summary { cursor: pointer; font-weight: 700; color: var(--link); padding: .35rem 0; }
.scene-delete { margin: 1rem 0 0; }

/* schedule */
.print-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; flex-basis: 100%; font-size: .95rem; }
.print-row__label { font-weight: 700; }
.print-row ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.banner-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 0 .75rem; }
.strip--banner .field { margin-bottom: .45rem; }

/* department colors again, after the chip and card borders */
.chip.cat--extras, .cat.cat--extras { border-left-color: #3b82f6; }
.chip.cat--stunts, .cat.cat--stunts { border-left-color: #1d4ed8; }
.chip.cat--vehicles, .cat.cat--vehicles { border-left-color: #14b8a6; }
.chip.cat--props, .cat.cat--props { border-left-color: #22a35a; }
.chip.cat--camera, .cat.cat--camera { border-left-color: #06b6d4; }
.chip.cat--sfx, .cat.cat--sfx { border-left-color: #eab308; }
.chip.cat--wardrobe, .cat.cat--wardrobe { border-left-color: #f59e0b; }
.chip.cat--makeup, .cat.cat--makeup { border-left-color: #f97316; }
.chip.cat--animals, .cat.cat--animals { border-left-color: #b91c1c; }
.chip.cat--music, .cat.cat--music { border-left-color: #7c3aed; }
.chip.cat--sound, .cat.cat--sound { border-left-color: #a78bfa; }
.chip.cat--art, .cat.cat--art { border-left-color: #93c5fd; }
.chip.cat--dressing, .cat.cat--dressing { border-left-color: #c026d3; }
.chip.cat--greenery, .cat.cat--greenery { border-left-color: #f472b6; }
.chip.cat--equipment, .cat.cat--equipment { border-left-color: #f9a8d4; }
.chip.cat--security, .cat.cat--security { border-left-color: #6b7280; }
.chip.cat--labor, .cat.cat--labor { border-left-color: #9ca3af; }
.chip.cat--vfx, .cat.cat--vfx { border-left-color: var(--fg); }
.chip.cat--mfx, .cat.cat--mfx { border-left-color: #a3a314; }
.chip.cat--misc, .cat.cat--misc { border-left-color: #92541b; }

/* ---------- v31: compact budget lines ---------- */
.bline { border: 0; border-top: 1px solid var(--line); margin: 0; padding: .6rem 0 .35rem; background: none; min-width: 0; }
.bline:first-of-type { border-top: 0; }
.bline__grid { display: grid; grid-template-columns: minmax(10rem, 1fr) 4.5rem 6rem 8.5rem 5.5rem; gap: 0 .6rem; align-items: end; }
.bline__grid .field { margin-bottom: 0; }
.bline__grid .field__label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.bline__grid .input { min-height: 40px; padding-block: .35rem; }
.bline__total { margin: 0; display: grid; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; padding-bottom: .55rem; }
.bline__total-l { font-size: .8rem; font-weight: 600; color: var(--muted); }
.bline__foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin-top: .25rem; font-size: .88rem; }
.bline__per { color: var(--muted); }
.bline__more { flex: 1 1 12rem; }
.bline__more > summary, .acct__rename > summary { cursor: pointer; color: var(--link); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.bline__more[open] { flex-basis: 100%; order: 3; padding: .25rem 0 .4rem; }
.bline__foot .btn--small { min-height: 32px; padding: .15rem .6rem; }
@media (max-width: 40rem) { .bline__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .bline__grid > .field:first-child { grid-column: 1 / -1; } .bline__total { text-align: left; } }
.acct__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.acct__rename[open] { flex-basis: 100%; }

/* ---------- v31: checklist folding, meter, slate ---------- */
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: .45rem 0 .2rem; }
.meter__fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.meter--card { height: 6px; margin: .5rem 0; }
.done-items { margin-top: .5rem; }
.done-items > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--ok); }
.done-items > summary::before { content: "✓"; display: inline-block; margin-right: .45rem; }
.phase.is-complete h2 { color: var(--muted); }
.phase h2[tabindex="-1"]:focus { outline: none; }
.slate { display: inline-grid; position: relative; padding: 1.35rem 1.1rem .7rem; margin: .5rem 0 .75rem; background: #1a1815; color: #f5f1ea; border-radius: 6px; font-size: 1.8rem; }
.slate__arm { position: absolute; left: 0; right: 0; top: 0; height: .75rem; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(-55deg, #f5f1ea 0 12px, #1a1815 12px 24px); transform-origin: 6px 100%; }
.slate__num { letter-spacing: .04em; }

/* ---------- v31: motion (quiet; nothing moves with reduced motion; never in print) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .section { animation: cue-enter .22s ease-out backwards; }
  @keyframes cue-enter { from { opacity: 0; transform: translateY(6px); } }
  .is-new { animation: cue-arrive 1s ease-out; }
  @keyframes cue-arrive { 0% { opacity: .2; transform: translateY(-6px); box-shadow: 0 0 0 3px var(--accent); } 25% { opacity: 1; transform: none; box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
  .btn, .subnav a, .subnav__stage-btn, .filter__label { transition: transform .08s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
  .btn:active, .subnav a:active { transform: scale(.97); }
  .check__box { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
  .check__box:checked { animation: cue-tick .25s ease-out; }
  @keyframes cue-tick { 40% { transform: scale(1.15); } }
  .meter__fill { transition: width .6s cubic-bezier(.2, .7, .2, 1); }
  .cards .card { transition: transform .15s ease, box-shadow .15s ease; }
  .cards .card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(0 0 0 / .08); }
  :focus-visible { transition: outline-offset .12s ease; }
  .slate.is-fresh .slate__arm { animation: cue-clap .55s cubic-bezier(.3, 1.4, .5, 1) .15s both; }
  @keyframes cue-clap { 0% { transform: rotate(-24deg); } 70% { transform: rotate(1deg); } 100% { transform: rotate(0); } }
  .slate.is-fresh { animation: cue-stamp .35s ease-out .55s both; }
  @keyframes cue-stamp { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
}
@media print { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v32: undo toast ---------- */
.toast { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: .75rem 1rem; max-width: min(36rem, calc(100vw - 2rem)); padding: .6rem .6rem .6rem 1.1rem; border-radius: 12px; background: var(--fg); color: var(--bg); box-shadow: 0 10px 30px rgb(0 0 0 / .25); font-size: .95rem; }
.toast[hidden] { display: none; }
.toast__msg { flex: 1 1 auto; }
.toast__undo { flex: none; display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .3rem .85rem; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 800; cursor: pointer; }
.toast__undo:focus-visible { outline: 3px solid var(--bg); outline-offset: 2px; }
.toast__kbd { font-family: var(--font); font-size: .78rem; font-weight: 700; opacity: .75; }
@media (hover: none) { .toast__kbd { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .toast.is-in { animation: cue-toast .22s ease-out; }
  @keyframes cue-toast { from { opacity: 0; transform: translate(-50%, 10px); } }
}
@media print { .toast { display: none !important; } }

/* ---------- v32: the whole scene card opens the scene ---------- */
.scene-card { position: relative; }
.scene-card__h a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.scene-card__h a:focus-visible { outline: none; }
.scene-card:has(.scene-card__h a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.scene-card:hover { box-shadow: 0 0 0 2px var(--link); cursor: pointer; }
.scene-card:hover .scene-card__h a { text-decoration: underline; }
.scene-card__go { margin-left: auto; align-self: flex-end; font-size: .88rem; font-weight: 700; color: var(--link); white-space: nowrap; }
.scene-card:hover .scene-card__go, .scene-card:has(a:focus-visible) .scene-card__go { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .scene-card { transition: box-shadow .15s ease, transform .15s ease; }
  .scene-card:hover { transform: translateY(-1px); }
  .scene-card__arrow { display: inline-block; transition: transform .15s ease; }
  .scene-card:hover .scene-card__arrow { transform: translateX(3px); }
}
.scene-card__arrow { margin-left: .3em; }

/* ---------- v34: home project cards ---------- */
.pcard { display: grid; gap: .75rem; padding: 1.1rem 1.2rem 1rem; }
.pcard__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; }
.ring { position: relative; width: 5.25rem; height: 5.25rem; flex: none; }
.ring__svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track, .ring__bar { fill: none; stroke-width: 7; }
.ring__track { stroke: var(--surface-2); }
.ring__bar { stroke: var(--accent); stroke-linecap: round; }
.ring__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.ring__label strong { font-size: 1.35rem; font-weight: 800; }
.ring__label span { font-size: .8rem; font-weight: 700; color: var(--muted); margin-left: 1px; }
.pcard .card__title { margin: 0 0 .1rem; }
.pcard__counts { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin: .3rem 0 0; font-size: .95rem; }
.pcard__counts strong { font-variant-numeric: tabular-nums; }
.pcard__over { color: var(--stop); }
.pcard__of { color: var(--muted); }
.pcard__next { margin: 0; padding: .6rem .8rem; background: var(--surface-2); border-radius: 10px; font-size: .95rem; }
.pcard__k { font-weight: 800; margin-right: .5rem; }
.pcard__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .5rem; margin: 0; }
.pcard__facts > div { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 8px; padding: .4rem .65rem; }
.pcard__facts > div.is-ok { border-left-color: var(--ok); }
.pcard__facts dt { font-size: .8rem; color: var(--muted); }
.pcard__facts dd { margin: 0; font-weight: 700; font-size: .95rem; }
.pcard__facts .is-ok dd::before { content: "✓ "; color: var(--ok); }
.pcard__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; }
.pcard__foot .card__meta { margin: 0; font-size: .88rem; }
.pcard__foot .card__actions { margin: 0; }
.pcard__foot .card__actions .confirm { flex-basis: 100%; }
.card__delete { font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); background: none; border: 0; padding: .35rem .2rem; min-height: 32px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; }
.card__delete:hover, .card__delete:focus-visible { color: var(--stop); text-decoration-color: currentColor; }
@media (max-width: 30rem) { .ring { width: 4.25rem; height: 4.25rem; } .ring__label strong { font-size: 1.1rem; } }
@media (prefers-reduced-motion: no-preference) { .ring__bar { transition: stroke-dashoffset .8s cubic-bezier(.2, .7, .2, 1) .1s; } }
.pcard__foot .card__actions:has(.confirm:not([hidden])) { flex-basis: 100%; text-align: left; }
.pcard p.pcard__next { max-width: none; }

/* ---------- v35: checklist summary ---------- */
.cl-sum { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; margin: .5rem 0 1.5rem; }
@media (max-width: 40rem) { .cl-sum { grid-template-columns: minmax(0, 1fr); } }
.cl-sum p { margin: 0; }
.cl-sum__top { display: flex; align-items: center; gap: 1rem; }
.cl-sum__count { font-size: 1.15rem; }
.cl-sum__next { display: grid; gap: .15rem; align-content: start; justify-items: start; background: var(--surface-2); border-radius: 12px; padding: .75rem .9rem; border-left: 4px solid var(--accent); }
.cl-sum__next.is-late { border-left-color: var(--stop); }
.cl-sum__k { font-size: .8rem; font-weight: 800; color: var(--muted); }
.cl-sum__next.is-late .cl-sum__k { color: var(--stop); }
.cl-sum__t { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.cl-sum__due { font-size: .9rem; color: var(--muted); }
.cl-sum__next .btn { margin-top: .45rem; }
.cl-stages { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(7.25rem, 1fr)); gap: .4rem; }
.cl-stage { width: 100%; height: 100%; display: grid; gap: .3rem; align-content: start; text-align: left; font: inherit; color: var(--fg); background: none; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; cursor: pointer; }
.cl-stage:hover { border-color: var(--link); }
.cl-stage__t { font-size: .8rem; font-weight: 700; line-height: 1.25; }
.cl-stage__bar { display: block; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cl-stage__fill { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.cl-stage.is-done .cl-stage__fill { background: var(--ok); }
.cl-stage.is-late { border-color: var(--stop); }
.cl-stage__n { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-stage.is-done .cl-stage__n { color: var(--ok); font-weight: 700; }

/* done folds look like what they are: a button that opens */
.done-items > summary { list-style: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .3rem .9rem .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ok); font-weight: 700; font-size: .92rem; }
.done-items > summary::-webkit-details-marker { display: none; }
.done-items > summary::before { content: "✓"; margin: 0; }
.done-items > summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: .2rem; }
.done-items[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.done-items > summary:hover { border-color: var(--ok); }
.done-items[open] .done-items__show, .done-items:not([open]) .done-items__hide { display: none; }
.done-items__hide { color: var(--muted); font-weight: 600; }
.done-items[open] > .tasks { margin-top: .6rem; }
.phase.is-complete { margin-bottom: 1.25rem; }
.phase.is-complete h2 { font-size: 1.15rem; }
@media (prefers-reduced-motion: no-preference) {
  .done-items > summary::after { transition: transform .15s ease; }
  .done-items[open] > .tasks { animation: cue-enter .2s ease-out; }
  .cl-stage { transition: border-color .15s ease; }
}
.cl-stages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 34rem) { .cl-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- v35: backup reminder as a contained card ---------- */
.banner { display: block; background: none; border: 0; padding: 1rem max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.banner[hidden] { display: none; }
.banner__card { max-width: calc(46rem - 32px); margin: 0 auto; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .4rem .9rem; padding: .75rem .9rem; background: var(--stop-bg); border: 1px solid color-mix(in srgb, var(--stop) 35%, transparent); border-left: 5px solid var(--stop); border-radius: 12px; }
.main .banner__card { margin-bottom: 1rem; }
.banner__icon { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--stop); color: var(--stop-bg); display: grid; place-items: center; font-weight: 900; font-size: 1rem; line-height: 1; }
.banner p { margin: 0; }
.banner__h { font-weight: 800; color: var(--stop); }
.banner__t { font-size: .92rem; }
.banner__actions { display: flex; align-items: center; gap: .25rem .75rem; flex-wrap: wrap; justify-content: flex-end; }
.btn--stop { background: var(--stop); color: var(--stop-bg); border-color: var(--stop); }
.btn--stop:hover { filter: brightness(1.08); }
.banner__later { font: inherit; font-size: .88rem; font-weight: 600; color: var(--fg); background: none; border: 0; padding: .3rem .2rem; min-height: 36px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 34rem) { .banner__card { grid-template-columns: auto minmax(0, 1fr); } .banner__actions { grid-column: 2; justify-content: flex-start; } }
/* v36: titles take the free space so every tile's bar and count line up along the bottom, however the title wraps */
.cl-stage { grid-template-rows: 1fr auto auto; align-content: stretch; }
.cl-stage__t { align-self: start; }
/* v37: finished items sit behind a button on the stage's heading line; the list opens full width underneath */
.phase { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem; }
.phase > * { flex-basis: 100%; }
.phase > h2 { flex-basis: auto; margin-right: auto; }
.phase > .done-toggle { flex-basis: auto; }
.phase:not(.is-complete) > .done-toggle { margin-top: .5rem; }
.phase.is-complete { margin-bottom: .9rem; }
.phase.is-complete > h2 { margin: 0; margin-right: 0; }
.done-toggle { display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .9rem .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ok); font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; }
.done-toggle::before { content: "✓"; margin-right: .45rem; }
.done-toggle::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: .55rem; }
.done-toggle[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
.done-toggle:hover { border-color: var(--ok); }
.done-toggle__hide { color: var(--muted); font-weight: 600; margin-left: .25rem; }
.done-list { margin-top: .6rem; }
.done-list[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .done-toggle::after { transition: transform .15s ease; } }
/* every stage: name and "Show n done" share a line; open items, then the done list, then "doesn't apply" below */
.phase > h2 { margin-right: 0; order: 0; }
.phase > .done-toggle { order: 1; margin-top: 0 !important; }
.phase > .tasks:not(.done-list) { order: 2; }
.phase > .done-list { order: 3; }
.phase > .hidden-items { order: 4; }
.phase > h2 { margin-bottom: .4rem; }
.phase { row-gap: .55rem; margin: 1.75rem 0 0; }
.phase > h2, .phase.is-complete > h2 { margin: 0; }
.phase > .tasks { margin-top: 0; }

/* ---------- v38: footer and legal pages ---------- */
.foot { max-width: 46rem; margin: 0 auto; padding: 1.25rem max(16px, env(safe-area-inset-right, 0px)) calc(1.5rem + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.foot ul { list-style: none; margin: 0 0 .4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.foot a { display: inline-flex; align-items: center; min-height: 32px; color: var(--fg); }
.foot p { margin: 0; }
@media screen { .main { padding-bottom: 2rem; } }
.legal h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
.legal p, .legal li { max-width: 40rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .35rem 0; }
.legal__opt { margin: 1rem 0 0; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

/* ---------- v39: "Mark … Done" at the bottom of open-ended sections ---------- */
.done-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .2rem 1rem; margin: 1.25rem 0; padding: .85rem 1rem; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); }
.done-bar > .btn { grid-column: 2; grid-row: 1 / span 3; }
.done-bar p { margin: 0; grid-column: 1; }
.done-bar__h { font-weight: 800; }
.done-bar__t { font-size: .9rem; color: var(--muted); }
.done-bar__note { font-size: .88rem; color: var(--warn); font-weight: 600; }
.done-bar.is-done { border-style: solid; border-left: 4px solid var(--ok); }
.done-bar.is-done .done-bar__h { color: var(--ok); }
@media (max-width: 34rem) { .done-bar { grid-template-columns: minmax(0, 1fr); } .done-bar > .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .4rem; } }

/* ---------- v40: stripboard reorder: grip + arrows on the left, drag and drop ---------- */
.strip { grid-template-columns: auto minmax(0, 1fr) minmax(0, 12.5rem); align-items: center; gap: .25rem .9rem; padding: .55rem .8rem .55rem .45rem; }
.strip__info p { margin: 0; }
.strip__meta { margin-top: .1rem !important; }
.strip__syn { font-size: .88rem; color: var(--muted); margin-top: .15rem !important; }
.strip__ctl { align-self: center; }
.strip__ctl .field, .strip__ctl .input { margin: 0; }
.strip__day { min-height: 40px; padding-block: .3rem; font-size: .95rem; }
.strip__move { display: flex; align-items: center; gap: .3rem; align-self: stretch; }
.strip__grip { display: grid; grid-template-columns: repeat(2, 4px); gap: 3px; padding: .55rem .35rem; border-radius: 6px; cursor: grab; touch-action: none; color: var(--muted); align-self: center; }
.strip__grip i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.strip__grip:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 8%, transparent); }
.strip__arrows { display: grid; gap: 2px; }
.strip__arrow { display: grid; place-items: center; width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--fg); cursor: pointer; }
.strip__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.strip__arrow:hover:not(:disabled) { border-color: var(--fg); }
.strip__arrow:disabled { opacity: .35; cursor: default; }
.strip--banner .strip__info .field { margin: 0; }
.strip.is-dragging { position: fixed; z-index: 60; margin: 0; pointer-events: none; box-shadow: 0 14px 30px rgb(0 0 0 / .3); transform: rotate(.6deg); opacity: .96; }
.strip-ph { border: 2px dashed var(--line); border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, transparent); list-style: none; }
ol.strips.is-empty { min-height: 3.25rem; border: 2px dashed var(--line); border-radius: 8px; }
ol.strips.is-empty + .muted { margin-top: .35rem; }
body.is-dragging-strip, body.is-dragging-strip * { cursor: grabbing !important; user-select: none; }
@media (max-width: 34rem) {
  .strip { grid-template-columns: auto minmax(0, 1fr); }
  .strip__ctl { grid-column: 2; }
}
@media (prefers-reduced-motion: no-preference) { .strip { transition: box-shadow .15s ease; } }

/* ---------- v41: stripboard on phones: text gets the full width, controls share one bar underneath ---------- */
@media (max-width: 34rem) {
  .strip { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "info info" "move ctl"; gap: .5rem .5rem; padding: .6rem .7rem .55rem .75rem; }
  .strip__info { grid-area: info; }
  .strip__move { grid-area: move; flex-direction: row; align-items: center; align-self: center; gap: .15rem; }
  .strip__arrows { grid-auto-flow: column; gap: 4px; }
  .strip__arrow { width: 40px; height: 36px; }
  .strip__grip { padding: .5rem .4rem; }
  .strip__ctl { grid-area: ctl; grid-column: auto; justify-self: end; align-self: center; }
  .strip__day { width: auto; max-width: 12.5rem; min-height: 38px; font-size: .88rem; padding-inline: .6rem 1.8rem; }
  .strip__title { font-size: .98rem; line-height: 1.3; }
  .strip__meta { font-size: .84rem; }
  .strip__syn { font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .strip--banner .banner-row { grid-template-columns: minmax(0, 1fr) 5rem; gap: 0 .5rem; }
  .strip--banner .field__label { font-size: .82rem; }
  .strip--banner .strip__ctl .btn { min-height: 36px; padding: .2rem .7rem; font-size: .85rem; }
  .sday > h2 { display: grid; gap: .15rem; }
  .sday__meta { font-size: .8rem; }
  .sday__end { font-size: .78rem; }
}
.sday__meta::before { content: " · "; }
@media (max-width: 34rem) { .sday__meta::before { content: none; } }

/* Insurance: plain text values in the facts list */
.facts--text dd { font-family: inherit; overflow-wrap: anywhere; }
.coi .facts { margin-top: .75rem; }
.coi-holders { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .5rem; }
.coi-holders__h { font-size: 1.1rem; margin: .5rem 0 .25rem; }
.coi-holder { border-left: 3px solid var(--line); padding-left: .9rem; margin: 1rem 0; }

/* ---------- v43: Documents hub ---------- */
.docs-hint { color: var(--muted); font-size: .95rem; margin: .5rem 0 0; }
.docs-hint a { font-weight: 700; }
.docs-sum { display: grid; gap: .1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem 1.1rem .4rem; margin: 1rem 0 0; }
.docs-sum__n { margin: 0; font-size: 1.05rem; }
.docs-sum .inline-list { margin: 0; }
.docs-sec { margin-top: 2.5rem; }
.docs-sec > h2 { margin: 0 0 .2rem; }
.docs-sec__d { color: var(--muted); margin: 0 0 1rem; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; }
.doc__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1.25rem; align-items: start; }
@media (max-width: 34rem) { .doc__top { grid-template-columns: minmax(0, 1fr); } }
.doc__t { margin: 0 0 .15rem; font-size: 1.1rem; }
.doc__d { margin: 0 0 .5rem; color: var(--muted); font-size: .95rem; }
.doc__act { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
@media (min-width: 34.01rem) { .doc__act { align-items: flex-end; text-align: right; } }
.doc__more { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.doc__state { margin: 0; font-size: .95rem; font-weight: 600; display: flex; gap: .45rem; align-items: baseline; }
.doc__state.is-ready { color: var(--ok); }
.doc__state.is-needs, .doc__state.is-needs > p { color: var(--warn); }
div.doc__state { display: block; }
div.doc__state > p { margin: 0; display: flex; gap: .45rem; align-items: baseline; }
.doc__icon { display: inline-grid; place-items: center; flex: none; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1.5px solid currentColor; font-size: .75rem; font-weight: 800; line-height: 1; transform: translateY(.1rem); }
.doc__gaps { margin: .2rem 0 0 1.7rem; padding: 0; font-weight: 400; color: var(--fg); }
.doc__gaps li { margin: 0; }
.doc__gaps a { display: inline-block; padding: .3rem 0; }
.doc .alert { margin: .75rem 0 0; }
.doc-items { list-style: none; margin: .9rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.doc-items[hidden] { display: none; }
.doc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.doc-item:last-child { border-bottom: 0; padding-bottom: 0; }
.doc-item__t { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.doc-item .doc__state { font-size: .9rem; }
.doc-item--foot .doc-item__t { font-weight: 400; color: var(--muted); }
@media (max-width: 24rem) { .doc-item { grid-template-columns: minmax(0, 1fr); } }
.docs-skip { margin: 2.5rem 0 1rem; border: 1px dashed var(--line); border-radius: var(--r); padding: .25rem 1.1rem; }
.docs-skip summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.docs-skip__list { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .8rem; }
.docs-skip__t { margin: 0; font-weight: 700; }
.docs-skip__why { margin: 0; color: var(--muted); font-size: .95rem; }
.docs-skip__why a { display: inline-block; padding: .2rem 0; }

/* ---------- v43: People as compact lines ---------- */
.prows { list-style: none; margin: .75rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.prow { padding: .65rem 1rem; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.prow.is-open { background: var(--surface); box-shadow: inset 4px 0 0 var(--accent); }
.prow__sum { display: flex; align-items: center; gap: .75rem; justify-content: space-between; }
.prow__who { min-width: 0; }
.prow__name { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.prow__meta { margin: 0; color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 0 .9rem; }
.prow__meta span { overflow-wrap: anywhere; min-width: 0; }
.prow__none { font-style: italic; }
.prow__edit { flex: none; }
.prow__edit-area { padding: .75rem 0 .25rem; }
.prow__edit-area[hidden] { display: none; }
.prow .person { margin: 0; }
.empty .btn { margin-top: .25rem; }
.empty p { margin-bottom: .5rem; }

/* v43: the on-screen preview of a printed sheet fits a 320px phone (and 200% zoom). Print is unchanged. */
@media screen and (max-width: 40rem) {
  .sheet__table thead th { white-space: normal; }
  .sheet__table th, .sheet__table td { overflow-wrap: anywhere; padding: .2em .3em; }
  .sheet__table { table-layout: auto !important; }
  .sheet__table th[style], .sheet__table td[style] { width: auto !important; }
  .sheet__lbl { white-space: normal; }
  .sheet__line { flex-wrap: wrap; }
  .sheet__row { grid-template-columns: minmax(0, 1fr); }
  .print-bar .btn { flex: 1 1 auto; }
}
