/* The web viewer (view.html, index.html). The app's palette: the Nikon F4 dial
   (orange, warm yellow, green, red, white) on neutral surfaces. Read-only. */
:root {
  /* Page → day card → location → what it holds: a level lighter at every step in
     (light: the children pop back to white). Kris's palette, 2026-10-28. */
  --bg: #ffffff; --s1: #f3f3f3; --s2: #e6e6e6; --child: #ffffff; --s3: #e0e0e0;
  --border: #d0d0d0; --border2: #b8b8b8;
  --text: #111111; --dim: #555555; --dimmer: #666666;
  --amber: #e0772b; --amber-text: #b4561a; --red: #d81e1e; --red-text: #d81e1e; --green: #1fa84a; --green-text: #1a8f40; --yellow: #ffc53a; --warn: #c97a0a;
  /* The kinds: Unload and Strike blue, breaks and meals pink, Recce rose; each an accent and a row wash */
  --load: #4f5bb3; --load-bg: #d9ddf3; --meal: #8f5f98; --meal-bg: #efe4f1; --recce: #a04a5c; --recce-bg: #f3e4e7; --done-bg: #d7efde;
  --now: #111111;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --s1: #141414; --s2: #1e1e1e; --child: #262626; --s3: #3a3a3a;
    --border: #222222; --border2: #6a6a6a;
    --text: #f0f0f0; --dim: #c0c0c0; --dimmer: #a0a0a0; --now: #f0f0f0; --amber-text: #f08a43; --red: #f42121; --red-text: #ff6b6b; --green-text: #3fd06d; --warn: #f79c1f;
    --load: #9aa5e8; --load-bg: #2c3149; --meal: #b68bbd; --meal-bg: #3c2e3f; --recce: #bd6173; --recce-bg: #60484e; --done-bg: #4b6e56;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --s1: #141414; --s2: #1e1e1e; --child: #262626; --s3: #3a3a3a;
  --border: #222222; --border2: #6a6a6a;
  --text: #f0f0f0; --dim: #c0c0c0; --dimmer: #a0a0a0; --now: #f0f0f0; --amber-text: #f08a43; --red: #f42121; --red-text: #ff6b6b; --green-text: #3fd06d; --warn: #f79c1f;
  --load: #9aa5e8; --load-bg: #2c3149; --meal: #b68bbd; --meal-bg: #3c2e3f; --recce: #bd6173; --recce-bg: #60484e; --done-bg: #4b6e56;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* Headings for the rotor; the look comes from the classes */
h1.shoot-name, h2.day-name, .sched h3.name { margin: 0; }
.sched h3.name { font-size: inherit; font-weight: inherit; }
.k-location .sched h3.name { font-size: 17px; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* Keyboard focus shows on every control */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.row.k-location:focus-visible, .day-title:focus-visible { outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
a { color: var(--amber); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--bg);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; letter-spacing: .02em; color: var(--amber); text-decoration: none; flex: none; }
.top-title { min-width: 0; flex: 1; }
.shoot-name { font-weight: 650; font-size: 17px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; line-height: 1.25; }
.shoot-sub { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.badge.live { background: var(--amber); color: #111; }
.badge.live::before { content: "● "; }
.badge.wrapped { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.open-app {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--amber); color: #111;
  font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap;
}
.open-app:active { opacity: .8; }
.icon-btn {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--s1); cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; }

.day, .row, .info, .note { scroll-margin-top: 84px; }
.content { max-width: 860px; margin: 0 auto; padding: 16px 16px 8px; }
.foot { max-width: 860px; margin: 0 auto; padding: 8px 16px 40px; color: var(--dimmer); font-size: 12px; }
.state { display: grid; place-items: center; gap: 12px; padding: 80px 16px; color: var(--dim); text-align: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Day */
.day { background: var(--s1); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.day-head { padding: 14px 16px 14px; border-bottom: 1px solid var(--border); background: var(--s2); }
.day-title { display: flex; align-items: flex-start; gap: 12px; }
/* The badge over the title, centred between the tile and the chevron, on the tile's height */
.day-titles { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; min-height: 72px; text-align: center; }
.day-title .spacer { flex: 0 0 58px; }
.day-titles .today-tag { margin-left: 8px; }
/* The date as a calendar tile */
.day-tile { flex: none; width: 58px; height: 72px; box-sizing: border-box; border-radius: 7px; overflow: hidden; background: var(--s2); border: 1px solid var(--border); text-align: center; }
.day-tile .wd { background: var(--amber); color: #111; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 2px 0; }
.day-tile.prep .wd { background: var(--green); color: #fff; }
.day-tile .dn { font-size: 24px; font-weight: 700; line-height: 1.1; padding-top: 4px; font-variant-numeric: tabular-nums; }
.day-tile .mo { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--dimmer); padding-bottom: 4px; }
/* The day's badge as the app's: a filled pill, amber for a shoot day, green for prep */
.day-kind { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #111; background: var(--amber); padding: 3px 8px; border-radius: 6px; }
.day-kind.prep { background: var(--green); color: #fff; }
.day-name { font-size: 22px; font-weight: 700; }
/* Folding: a day's title and a location's row toggle; the chevron says which way */
.day-title { cursor: pointer; }
.day-title .spacer { flex: 0 0 58px; }
.day-sum { color: var(--dim); font-size: 13px; }
.fold { flex: none; width: 44px; height: 44px; margin: -10px -12px -10px 0; border: 0; border-radius: 999px; background: transparent; color: var(--dimmer); cursor: pointer; display: grid; place-items: center; }
/* Chevrons as the app's: closed points left, open points down, in the same spot */
.fold svg { width: 16px; height: 16px; transform: rotate(90deg); transition: transform .15s; }
.fold[aria-expanded="false"] svg { transform: rotate(180deg); }
.day.folded .todos, .day.folded .rows, .day.folded .wrap-row { display: none; }
.day.folded .day-head { border-bottom: 0; }
.row.k-location { cursor: pointer; }
.loc-rows[hidden] { display: none; }
/* The numbers as a strip of centred cells, hairlines between */
.day-grid { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.day-grid > div { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 110px; padding: 4px 26px; border-left: 1px solid var(--border); }
.day-grid > div:first-child { border-left: 0; padding-left: 0; }
.day-grid .k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.day-grid .v { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* The day's places as a bar, each as wide as its share of the day */
.day-bar { display: flex; gap: 2px; margin-top: 14px; height: 22px; }
.day-bar .seg { flex: 0 1 auto; min-width: 3px; background: var(--s2); border-radius: 4px; overflow: hidden; }
.day-bar .seg.loc { background: var(--child); color: var(--text); font-size: 11.5px; font-weight: 600; padding: 0 8px; line-height: 22px; white-space: nowrap; text-overflow: ellipsis; }
.day-grid .v.over { color: var(--red-text); }
.struck { text-decoration: line-through; color: var(--dimmer); font-weight: 400; font-size: .85em; margin-left: 6px; }

/* Rows: one grammar — stripe · lead · time column · body · trailing */
/* Rows as the app's boxes: each its own card, air between them; a location's
   rows are narrower boxes set in from the edge, and the inset of the full-width
   rows is what keeps every column (time, minutes, kind, name) at the same place */
.rows { display: grid; gap: 6px; padding: 10px 12px 12px; }
.loc-rows { display: grid; gap: 6px; }
.row {
  position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto;
  column-gap: 10px; align-items: center;
  padding: 12px 14px 12px 40px; background: var(--child);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.rows > .row { background: var(--s2); }
/* The kind's stripe: a straight bar inside the box, as the app draws it (never a thick one-sided border, which tapers into the corners) */
.row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--stripe, transparent); }
.loc-rows .row { margin-left: 24px; padding-left: 16px; }
.row.k-location { --stripe: var(--text); background: var(--s2); }
/* The kinds: the row in its wash, the stripe, the kind word and the icon in its accent */
.row.k-break, .row.k-lunch, .row.k-inline { --stripe: var(--meal); --kind: var(--meal); background: var(--meal-bg); }
.row.k-loadin, .row.k-loadout { --stripe: var(--load); --kind: var(--load); background: var(--load-bg); }
.row.k-recce { --stripe: var(--recce); --kind: var(--recce); background: var(--recce-bg); }
.row.k-travel { --stripe: var(--border2); }
/* A dependant break is a break: pink like every break */
.row.k-dependant { --stripe: var(--meal); --kind: var(--meal); background: var(--meal-bg); }
.row.done { --stripe: var(--green); --kind: var(--green); background: var(--done-bg); }
.sched .mins .label { color: var(--kind, var(--dimmer)); }
/* Under Unload and Strike, "Move in" / "Loading in" in full text, not dimmed */
.k-loadin .line2, .k-loadout .line2 { color: var(--text); }
.row.done .name, .row.done .sched .time { color: var(--dim); }
.row.skipped .name { text-decoration: line-through; color: var(--dimmer); }
.row.now { outline: 2px solid var(--now); outline-offset: -2px; }
.lead { display: grid; place-items: center; }
.row.openable { cursor: pointer; }
.mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--dimmer); display: grid; place-items: center; }
.mark.done { background: var(--green); border-color: var(--green); color: #fff; }
.mark.skipped { border-style: dashed; color: var(--dimmer); }
.mark svg { width: 13px; height: 13px; }
.body { min-width: 0; }
/* Every row: time · minutes and what for · the words; a shot on two lines that read across */
/* Fixed columns, as in the app, so every name starts at the same place */
.sched { min-width: 0; display: grid; grid-template-columns: 58px 126px minmax(0, 1fr); column-gap: 10px; row-gap: 3px; align-items: baseline; }
.sched .time { font-variant-numeric: tabular-nums; font-weight: 600; }
.sched .time.t2 { color: var(--dim); font-weight: 500; }
.sched .plan { display: block; font-size: 12px; font-weight: 400; color: var(--dimmer); text-decoration: line-through; }
.sched .mins { white-space: nowrap; display: grid; grid-template-columns: 44px auto; align-items: baseline; column-gap: 6px; }
.sched .mins b { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.sched .line2 { margin-top: 0; }
.sched .line1.tall { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.sched .line1 .line2 { margin: 0; }
.sched .line1 .name:empty { display: none; }
.sched .body .line1 { align-items: baseline; }
.k-location .sched .time { font-size: 15px; }
.sched .line2:empty::before { content: ""; }
.line1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ico { flex: none; width: 18px; height: 18px; color: var(--dimmer); }
.ico svg { width: 18px; height: 18px; display: block; }
.k-location .ico { color: var(--text); }
.k-break .ico, .k-lunch .ico, .k-inline .ico, .k-loadin .ico, .k-loadout .ico, .k-recce .ico, .k-dependant .ico { color: var(--kind); }
.name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.k-location .name { font-size: 17px; }
.label.len { text-transform: none; letter-spacing: 0; }
.label { flex: none; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dimmer); }
.line2 { color: var(--dim); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.line2 .mins { font-variant-numeric: tabular-nums; }
.line2 .prep-note { white-space: pre-wrap; }
.trail { display: flex; align-items: center; gap: 6px; }
.delta { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.late { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.delta.early { color: var(--green-text); background: color-mix(in srgb, var(--green) 14%, transparent); }
.now-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; color: var(--now); }
.more { width: 44px; height: 44px; margin: -7px -7px -7px 0; border-radius: 999px; border: 0; background: transparent; color: var(--dimmer); cursor: pointer; display: grid; place-items: center; }
.more svg { width: 16px; height: 16px; transform: rotate(180deg); transition: transform .15s; }
.more[aria-expanded="true"] svg { transform: rotate(90deg); }
.gps { color: var(--dim); font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; margin: -12px 0; }
.gps:hover { color: var(--amber); }

/* Detail under a shot */
/* A shot's details open under its row as a few boxes side by side: props, characters, talent, prep, to do, photos */
.detail { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; padding: 12px 0 2px; align-items: stretch; }
.detail > div { background: var(--s2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.detail > div:has(.photos) { grid-column: span 2; }
.detail[hidden] { display: none; }
.detail .k { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dimmer); margin-bottom: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--s3); }
.notes { white-space: pre-wrap; color: var(--dim); font-size: 14px; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photos button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 4px; overflow: hidden; }
.photos img { display: block; width: 96px; height: 72px; object-fit: cover; background: var(--s3); }

/* To-dos (signed-in members only; public links never carry them) */
/* The day's to-dos: a full-width box in the shot colour */
.todos { margin: 10px 12px 0; padding: 10px 14px 12px; background: var(--child); border: 1px solid var(--border); border-radius: 8px; }
.todos h3, .todo-h { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.todo { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; font-size: 14px; }
.todo .box { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px dashed var(--border2); position: relative; top: 2px; }
.todo.done .box { border-style: solid; }
.todo.done .box { background: var(--green); border-color: var(--green); }
.todo.done .txt { color: var(--dimmer); text-decoration: line-through; }
.todo .who { color: var(--dimmer); font-size: 12px; }

.wrap-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px 6px 76px; }
.wrap-row .ico { position: relative; top: 1px; }
.wrap-row .label, .wrap-row .ico { color: var(--text); }
.wrap-row .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
/* Past the hard out: the time says so, as the app's Wrap row does */
.wrap-row.over .v { color: var(--red-text); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox.loading::after { content: ""; position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .8s linear infinite; }
.lb-close { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }

/* Home: the list of shoots */
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.list-head h1 { font-size: 26px; margin: 0; }
.group { margin-bottom: 22px; }
.group h2 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 0 0 8px; }
.cards { background: var(--s1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.card:first-child { border-top: 0; }
.card:hover { background: var(--s2); }
.card .t { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.card .s { color: var(--dim); font-size: 13px; }
.card .grow { flex: 1; min-width: 0; }
.card .chev { color: var(--dimmer); }
.note { background: var(--s1); border: 1px solid var(--border); border-left: 3px solid var(--amber); border-radius: var(--radius); padding: 12px 14px; color: var(--dim); font-size: 14px; margin-bottom: 20px; }
.link-btn { border: 1px solid var(--border); background: var(--s1); color: var(--text); border-radius: 999px; min-height: 44px; padding: 0 16px; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; }

/* Viewer extras: back, connection, today, shoot info */
.back:not([hidden]) + .brand { display: none; }
.back { flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px 0 0; color: var(--amber-text); text-decoration: none; font-weight: 600; }
.back svg { width: 18px; height: 18px; }
.conn { flex: none; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.conn[hidden] { display: none; }
.today-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #111; background: var(--yellow); padding: 2px 8px; border-radius: 999px; }
.day-note { margin-top: 10px; font-size: 13px; color: var(--dim); }
.info { background: var(--s1); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; padding: 14px 16px; display: grid; gap: 12px; }
.info h2 { margin: 0 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
/* Crew and talent as on a paper call sheet: a row each, columns that line up */
.sheet { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet th:first-child { width: 26%; }
.sheet th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 0 10px 6px 0; border-bottom: 1px solid var(--border); }
.sheet td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.sheet tr:last-child td { border-bottom: 0; }
.sheet td:first-child { font-weight: 600; }
.sheet .dim { color: var(--dim); }
.sheet a { color: var(--amber); text-decoration: none; white-space: nowrap; }
@media (max-width: 520px) { .sheet { font-size: 13px; } .sheet th:first-child { width: auto; } .sheet a { white-space: normal; } .sheet td, .sheet th { padding-right: 6px; } }
.foot a { color: var(--dim); }

/* Card pages: sign-in, email link, privacy */
.page-center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card-page { width: 100%; max-width: 420px; background: var(--s1); border: 1px solid var(--border); border-radius: 14px; padding: 28px 24px; }
.card-page h1 { font-size: 22px; margin: 0 0 6px; }
.card-page p { color: var(--dim); font-size: 14px; line-height: 1.5; margin: 0 0 16px; overflow-wrap: anywhere; }
.brand-mark { font-weight: 800; letter-spacing: .02em; color: var(--amber); margin-bottom: 18px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--dim); margin-bottom: 6px; }
.field { width: 100%; font: inherit; font-size: 16px; padding: 12px; border-radius: 8px; border: 1px solid var(--border2); background: var(--bg); color: var(--text); min-height: 48px; }
.field:focus { outline: 2px solid var(--amber); outline-offset: 0; border-color: var(--amber); }
.field.code { font-size: 24px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--border2); background: var(--s1); color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #111; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn[hidden], [hidden] { display: none !important; }
.msg { min-height: 20px; font-size: 14px; margin-top: 10px; overflow-wrap: anywhere; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.or { text-align: center; font-size: 12px; color: var(--dimmer); margin: 18px 0 0; letter-spacing: .1em; text-transform: uppercase; }
.fine { font-size: 13px !important; margin: 18px 0 0 !important; }
.fine a, .card-page a:not(.btn) { color: var(--amber); }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.text-btn { background: none; border: 0; padding: 0; min-height: 44px; color: var(--dim); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.doc { max-width: 680px; margin: 0 auto; padding: 24px 16px 64px; line-height: 1.6; }
.doc h1 { font-size: 28px; margin: 8px 0 4px; }
.doc h2 { font-size: 17px; margin: 28px 0 6px; }
.doc p, .doc li { font-size: 15px; }
.doc .meta { color: var(--dim); font-size: 13px; }
.doc a { color: var(--amber); }
/* Keyboard shortcuts on the accessibility page */
.doc table.keys { width: 100%; border-collapse: collapse; font-size: 15px; margin: 6px 0 4px; }
.doc .keys th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 14px 0 4px; }
.doc .keys td { padding: 5px 0; border-top: 1px solid var(--border); vertical-align: top; }
.doc .keys td:first-child { width: 120px; white-space: nowrap; }
.doc kbd { font: 600 13px -apple-system, BlinkMacSystemFont, sans-serif; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--s1, transparent); }

@media (max-width: 520px) {
  .row { grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 8px; padding-right: 10px; }
  /* Narrow: the time lines first, then the name and its line full width (the app's compact row) */
  .sched { grid-template-columns: 50px minmax(0, 1fr); column-gap: 8px; row-gap: 2px; }
  .sched .time, .sched .mins { order: -1; }
  .sched .mins { grid-template-columns: 40px auto; }
  .sched .line1, .sched .body, .sched .line1.tall, .sched > .line2 { grid-column: 1 / -1; grid-row: auto; align-self: auto; margin-top: 2px; }
  .sched > .line2 { margin-top: 0; }
  .detail { grid-template-columns: 1fr; }
  /* The strip wraps on a phone: spacing instead of hairlines, so a wrapped row doesn't start with one */
  .day-grid { gap: 10px 26px; }
  .day-grid > div { border-left: 0; padding: 2px 0; min-width: 0; }
  .rows { padding: 8px 8px 10px; gap: 5px; }
  .wrap-row { padding-left: 56px; }
  .loc-rows { gap: 5px; }
  .row { padding-left: 24px; }
  .loc-rows .row { margin-left: 14px; padding-left: 10px; }
  /* The delay chip under the shot's text, so names keep their width */
  .row.k-shot .trail { flex-direction: column; align-items: flex-end; gap: 2px; }
  .row.k-shot .more { margin: -10px -10px -10px 0; }
  .name { font-size: 15.5px; }
  .day-name { font-size: 18px; }
  .brand { display: none; }
  .top { flex-wrap: wrap; row-gap: 4px; padding-top: 6px; padding-bottom: 6px; }
  .top-title { flex: 1 1 calc(100% - 60px); }
  .top .badge, .top .conn, .top .open-app { order: 10; }
  .top .open-app { min-height: 40px; }
  .day, .row, .info, .note { scroll-margin-top: 120px; }
}
.doc .brand-mark { display: inline-block; text-decoration: none; }

/* More contrast, only where the reader's system asks for it: the surfaces stay
   Kris's, the text on them steps up (done rows, dimmed text, the kind accents) */
@media (prefers-contrast: more) {
  :root { --dim: #333333; --dimmer: #444444; --amber-text: #8a3f0f; --green-text: #156b31; --warn: #8a5200; --meal: #6b3f74; --load: #2f3a8f; --recce: #7d2f42; --border: #9a9a9a; }
  :root:not([data-theme="light"]) { --dim: #e6e6e6; --dimmer: #d4d4d4; --amber-text: #ffb27a; --green-text: #7fe39f; --warn: #ffc266; --meal: #d9b3df; --load: #c3caf5; --recce: #e9a0b0; --border: #5a5a5a; }
  :root[data-theme="dark"] { --dim: #e6e6e6; --dimmer: #d4d4d4; --amber-text: #ffb27a; --green-text: #7fe39f; --warn: #ffc266; --meal: #d9b3df; --load: #c3caf5; --recce: #e9a0b0; --border: #5a5a5a; }
  :root[data-theme="light"] { --dim: #333333; --dimmer: #444444; --amber-text: #8a3f0f; --green-text: #156b31; --warn: #8a5200; --meal: #6b3f74; --load: #2f3a8f; --recce: #7d2f42; --border: #9a9a9a; }
  .row.done .name, .row.done .sched .time { color: var(--text); }
  .day-kind.prep, .day-tile.prep .wd { color: #000; }
  .mark.done { color: #000; }
}
