/* ════════════════════════════════════════════════════════════════
   iCheckBuddy v1: one stylesheet shared by index.html (participant)
   and report.html (manager).

   DESIGN INTENT: the product principle is "accountability with
   dignity". Nothing here should feel like a scolding. So: white
   background, generous whitespace, one friendly green as the single
   accent, and RED RESERVED STRICTLY for missing / X states. A gray
   row is the normal "not done yet" state; red only appears once a
   deadline has actually passed.

   MOBILE FIRST: both people use this on a phone. Base font is 17px,
   tap targets are at least 44px tall, and the page itself never
   scrolls sideways (only the report's photo strips do).

   No frameworks, no CDN fonts, no build step. The system font stack
   below is what iOS and Android already have, so text renders
   instantly and nothing is fetched over the network.
   ════════════════════════════════════════════════════════════════ */

:root {
  /* The single accent. Used for completion, primary buttons, focus. */
  --green: #2f9e5f;
  /* The app icon's blue (middle of its gradient): the phone's status bar and
     button bar, and the blue bars at the top of both pages (dls 2026-10-15;
     the installed app's thin frame used it until build 093). */
  --icon-blue: #1b7bec;
  /* Build 094 (dls 2026-10-17: "make that little date button the same
     width as the copy link button"): the one width of the report's small
     pills, Copy Link and the report line's pill ("Go To Top" since build
     096). A shared minimum, not a measured one: "Copy Link" or "Go To Top"
     in 12px text plus padding is roughly 68 to 72px on phones, so 76px
     holds either with room to spare (72px until build 096). */
  --small-pill-width: 76px;
  --green-dark: #23794a;
  --green-soft: #e9f5ee;

  /* Orange: in the report, completed after the deadline. Not red: it is
     still a win. (From 2026-10-15 it also meant "done, no photo"; since
     build 088 that is yellow, below.) */
  --orange: #e8710a;

  /* Build 088 (dls 2026-10-16: "Let's try making all those yellow check
     marks instead"): "done, but no photo" on both pages. Build 089 (dls:
     "Let's try pure yellow. And I want that and late to be the same
     color"): pure yellow, and the report's "late" check uses it too.
     Build 090: dls picked swatch 9 of the contact sheet (hue 48, value 92,
     saturation 100), easier to see on white and on the baby blue than pure
     yellow. */
  --yellow: #ebbc00;

  /* Reserved for missing / X only. Never used for decoration. */
  --red: #c0413a;
  --red-soft: #fbeded;

  /* Build 237 (dls 2026-10-28, on the watch battery's words in the yellow
     and red states: "Yes on the percentage being a darker yellow or even
     a darker red"): the words ("=15%", "≈8%") in a darker shade of their
     state's color, while the watch and battery symbols keep the color
     itself. WHY: --yellow on white is only 1.79:1, too faint for 13px
     words (readable text wants 4.5:1). Each is the same hue and saturation
     as its color, only darker: --yellow-text 5.17:1 on white (the same as
     --red's), --red-text 7.28:1 (a clearly darker red than --red's
     5.17:1). */
  --yellow-text: #856a00;
  --red-text: #99342e;
  /* Build 335 (SPEC-V1.md REQ-AZMPACE-10): the task page's behind-pace
     gold, for the AZM label and day numbers of a week behind its pace
     (a yellow grade). dls's choice, a bright golden yellow, tried
     knowingly at about 1.64:1 on white (under the 4.5:1 words want; it
     is bold and plainly visible, so no outline or shadow). Its own token
     so --yellow-text above stays #856a00 for the AZM Report and
     everything else. Build 338: no longer the letters' own color but the
     INNER ring of their rim (1px out; build 340: 0.5px out), between the
     --azm-yellow letters and the --azm-gold-edge outer ring. */
  --azm-gold: #fcc11b;
  /* Build 336 (SPEC-V1.md REQ-AZMPACE-10): the dark gold of the rim drawn
     behind every text in the gold (the pace colors' text-shadow halo),
     so the pale letters keep a visible edge on white. Build 338: the
     OUTER ring of the rim (from 1px to 2px out; build 340: from 0.5px to
     1px out). */
  --azm-gold-edge: #6b5200;
  /* Build 338 (SPEC-V1.md REQ-AZMPACE-10): the letters of the behind-pace
     gold, pure yellow (dls's choice: "the yellowest yellow"), with the
     two colors above as a rim that steps darker outward. About 1.07:1 on
     white, so the letters alone nearly vanish; the rim carries the
     readability, knowingly. Its own token so the rim's two colors keep
     theirs. */
  --azm-yellow: #ffff00;

  --ink: #16181c;
  --muted: #6d7480;
  --faint: #9aa1ab;
  --line: #e4e7ea;
  --bg: #ffffff;
  --card: #f7f8f9;
  /* The report's item heading bars ("Exercise", "Healthy Meal 1 of 3"),
     dls 2026-10-15: "a light blue background a baby blue background". */
  --baby-blue: #d6ecfa;
  /* Build 248 (dls 2026-10-30: "that same cloud with one blue rain
     tierdrop"): the drizzle weather icon's drop. A clear rain blue, 3.4:1
     on the white page (a picture needs 3:1 to be seen easily; the page has
     no dark mode). */
  --rain-blue: #2f8fe6;

  /* Build 250 (dls 2026-10-30: "the dividers and borders should be the
     same size and color as the dividers and borders  around the azm and
     sleep and battery widgets", then "and similar around the list/tight
     chips control and camera button"): the widgets' 1px outline and their
     thin inner line, named once so the widgets (the AZM bar, the sleep bar,
     the battery box) and the controls above the list (the view buttons,
     the list/chips button, the camera button) can never drift apart. The
     values are the ones the widgets have had since build 226. The page has
     no dark mode, so there is no second set. */
  --widget-border: #9aa3ad;
  --widget-divider: rgba(110, 120, 132, 0.5);

  --radius: 12px;
  /* Minimum height for anything a thumb has to hit. Apple and Google
     both recommend 44px; we use a little more on rows. */
  --tap: 44px;
}

/* ── Page basics ───────────────────────────────────────────────── */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  /* overflow-x hidden is a belt-and-braces guarantee for the "no
     horizontal page scroll" rule. Individual scrollers (photo strips)
     set their own overflow-x and are unaffected. */
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  /* env(safe-area-inset-*) keeps content clear of the iPhone notch and
     the home indicator when the page is added to the home screen. */
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom, 0px));
}

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
}

/* Anything hidden with the HTML `hidden` attribute must really be
   gone. Some of our elements are display:flex, and a flex display
   rule would otherwise beat the browser default for [hidden]. */
[hidden] {
  display: none !important;
}

/* Present to assistive tech and still clickable, but invisible. Used
   for the file input, which is triggered by its <label>. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Error banner (never a blank page) ─────────────────────────── */

.banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 12px 16px calc(12px + env(safe-area-inset-top, 0px));
  background: var(--red-soft);
  color: var(--red);
  border-bottom: 1px solid #f0cfcd;
  font-size: 15px;
  text-align: center;
  /* Build 214: the message, then its OK button on the same line (the
     button drops under a long message rather than squeezing it). */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
}

/* display: flex above would otherwise show the bar while it is hidden. */
.banner[hidden] {
  display: none;
}

.banner-ok {
  flex: none;
  min-width: 64px;
  min-height: 36px;
  padding: 6px 16px;
  border: 1px solid var(--red);
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* ── Friendly full-page messages (no key, not configured) ──────── */

.gate {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 17px;
}

.loading {
  padding: 48px 24px;
  text-align: center;
  color: var(--faint);
}

/* ════════════════════════════════════════════════════════════════
   PARTICIPANT PAGE
   ════════════════════════════════════════════════════════════════ */

/* Build 080 (dls 2026-10-16, mockup 2 of the contact sheet): the task
   page's heading is a blue APP BAR, the same blue as the installed app's
   status bar and frame, full width (the negative margins cancel the
   page's padding), with the menu, the name and the date in white. */
.app-header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 60px;
  margin: -16px -16px 14px;
  padding: 0 16px 0 6px;
  background: var(--icon-blue);
  color: #ffffff;
}

.app-header .menu-btn {
  margin: 0;
  color: #ffffff;
}

.app-header .menu-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

.app-header .app-menu {
  top: 56px;
  left: 6px;
}

/* In the app bar: the date at the right, white, in the same font as the
   name (build 082, dls: "make the date the same font as David"). It never
   shrinks; on a very narrow phone the NAME gives way (it ends in "...")
   so the whole date always shows. */
.header-date {
  flex: 0 0 auto;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
}

/* In the app bar (build 080): "David" in white, a title's size (was 30px
   capitals; app.js turns a stored "DAVID" into "David"). */
.header-name {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:active {
  background: var(--card);
}

/* The Report and refresh buttons side by side at the right of the
   header (REQ-RPT-17). flex: none keeps them whole when a long name
   needs the room; the name gives way instead. */
/* The task page's two buttons (build 075), the same size with centered
   text (build 079). Build 080 (mockup 2): side by side under the app bar,
   two equal columns. */
.header-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.header-actions .rpt-top-btn {
  padding: 5px 12px;
  text-align: center;
}

/* Build 177 (dls 2026-10-20: "a third button on the top called Mike's
   Report", David's page only): three equal columns when it shows. Less
   side padding so the three names fit a phone's width; a name that still
   does not fit wraps inside its button. */
.header-actions.header-actions--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.header-actions.header-actions--three .rpt-top-btn {
  padding: 5px 6px;
}

/* Build 286 (dls 2026-11-13: "Reports", "Income", "Mike's Page", then "Add
   Task", David's page only): four equal columns when Add Task shows too;
   the labels are short enough for a phone's width, and wrap inside their
   button if not. */
.header-actions.header-actions--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.header-actions.header-actions--four .rpt-top-btn {
  padding: 5px 4px;
}

/* Build 192: Mike's rounding rule, said plainly where the eye lands. */
.mikes-rounding {
  font-weight: 700;
}

.mikes-confirm-name {
  font-size: 17px;
  font-weight: 700;
}

/* Build 177: Mike's Report's two forms, one full-width button each. */
.mikes-links {
  display: grid;
  gap: 10px;
}

.mikes-links .rpt-top-btn {
  display: block;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
}

/* An icon button that holds a word ("Report") instead of a glyph: the
   same 44px tap target, sized for text. */
.icon-btn--text {
  padding: 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
}

/* The refresh glyph spins while a request is in flight, which is the
   only "something is happening" signal on a slow phone connection. */
.icon-btn.is-busy {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── The view buttons (All / Current / Past To Future / Past To Today) ── */

/* Build 170 (dls 2026-10-19: "I want the all current remaining and today.
   tightened up to make room for an additional control surface to the
   right of it ... a similar sized rounded rectangle ... a toggle switch
   between those two layouts for the tasks"; "that control surface will be
   black on baby blue"). */
.view-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 20px;
}

/* ── The AZM bar (build 226) ─────────────────────────────────────
   dls 2026-10-26: "X/140 AZM" then "a bar, about the same height as the
   words ... that extends to the right side of the page, so a long thin
   bar", seven segments Mon to Sun in smaller words, blue filling as AZM is
   gained, "a slightly thicker vertical hash" at now, gray for the stale
   time (semi-transparent, over the blue), and red words and outline when
   the watch's battery is low. app.js renderAzm draws it. Build 227: the
   now line reaches past the bar with "Now" over it, so the bar keeps room
   above it (no negative margin) and below. */
.azm {
  display: flex;
  align-items: center;
  /* Build 232: 6px (was 8px), so the narrower bar keeps "Wed" inside its
     segment at a 360px phone with the battery beside it. Build 235: 4px,
     the room for the larger watch symbol (contact sheet #6; SPEC "The
     watch symbol: contact sheet #6" has the measurements). */
  gap: 4px;
  width: 100%;
  /* Build 236: the room above and below is the block's (.health-rows),
     which holds this row and the sleep row. */
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.azm[hidden] {
  display: none;
}

/* ── The AZM and sleep rows together (build 236) ──────────────────
   Build 234 (dls: "the azm line and the sleep line will go immediately
   below the buttons progress report etc."): the block follows the top
   buttons. 20px above, as the view buttons' row gave the bar before: "Now"
   stands 16px above the bar, so it keeps 4px clear of the buttons (this
   margin and the buttons' 14px overlap, they do not add up). 20px below
   the AZM row alone: the now line reaches 6px under the bar, leaving 14px
   to what follows, the same as under the top buttons. With the sleep row
   last, 14px (no now line under it). Hidden (no AZM data), the block takes
   no room at all.
   Build 237 (dls: "we can put the battery icon directly under the watch
   icon ... think of them as one super icon"): the block is a grid in every
   browser, the rows on the left and the battery (#azm-battery, its own
   button) in the last column, reaching down beside both rows when the
   sleep row shows, so its middle is the middle between the two bars. The
   bars are 10px apart (row-gap; build 236 had it as the sleep row's top
   margin). With subgrid (below) the rows' labels get a shared column too;
   without it each row lays out its label and bar itself (flex), and the
   bars still share their right end.
   Build 237 (dls: "I want more white space between the word now and the
   buttons above it. Let's make it about twice the amount of white space
   as it currently has"): 24px above (was 20px). Measured at a 360px phone
   with the real page: from the buttons' bottom to the top of "Now" (its
   glyph box) was 4px, now 8px; the bar is 24px under the buttons. Still
   one margin with the buttons' 14px (they overlap), and hidden, the block
   takes none of it: with no AZM the page is exactly as before. */
.health-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 10px;
  margin: 24px 0 20px;
}

.azm {
  grid-column: 1;
  grid-row: 1;
}

.sleep-row {
  grid-column: 1;
  grid-row: 2;
}

/* The battery: its own width, 4px from the bars; centered on the AZM row
   alone, or on both rows (the space between the bars included) when the
   sleep row shows. */
.azm-battery {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin-left: 4px;
}

/* Build 238 (dls 2026-10-28: "I now see that we can even include the =86%
   under the battery icon to make it a super super icon. We can even add a
   tight rounded rectangle it will be a tall rounded rectangle around the
   whole thing"): beside both rows, the group is one stack, the watch, the
   battery, then the words, on one center line, inside a box with the
   bars' own outline, corners and white. It spans both rows and stretches
   to them (align-self: stretch), so its top edge is the weekly bar's top
   edge and its bottom edge the sleep bar's bottom edge (20 + 10 + 20 =
   50px): the three shapes read as one panel. Inside: 1px outline, 2px
   padding above and below, the 16px watch, 2px, the 11px battery, 2px, the
   words at 11px (line-height 1) = 48px, so 2px are spare, shared above and
   below (justify-content: center), and the box never makes the rows
   taller. 3px at the sides; its width is the wider of the words and the
   20px battery. The words are 11px (the sleep halves' size; 13px beside
   the icon in build 237) so the stack fits the 50px. */
.health-rows.health-rows--sleep .azm-battery {
  grid-row: 1 / span 2;
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 2px 3px;
  border: 1px solid var(--widget-border);
  border-radius: 4px;
  background: #ffffff;
}

.health-rows.health-rows--sleep .azm-battery-text {
  font-size: 11px;
  line-height: 1;
}

/* The box in the yellow and red states (REQ-AZM-34): its outline in the
   state color, 2px like the weekly bar's red outline (a border and a 1px
   shadow: .azm--battery-low .azm-track), so a thin yellow still shows on
   white; the symbols and words keep their own colors (below). */
.health-rows.health-rows--sleep .azm-battery.azm-battery--yellow {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow);
}

.health-rows.health-rows--sleep .azm-battery.azm-battery--low {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

/* Beside the AZM row alone (no sleep row), the super icon (29px: the
   16px watch, 2px, the 11px battery) is taller than the 20px bar. WHY the
   negative margins: they let it reach 4.5px above and below the row
   ((29 - 20) / 2) instead of making the row 29px tall, so the bar and the
   space above and below it stay exactly where they were (the icon reaches
   into the block's own margins, beside the bar, clear of "Now"). */
.health-rows:not(.health-rows--sleep) .azm-battery {
  margin-top: -4.5px;
  margin-bottom: -4.5px;
}

.health-rows[hidden] {
  display: none;
}

.health-rows.health-rows--sleep {
  margin-bottom: 14px;
}

/* ── The SLEEP row (build 234; its look build 236) ─────────────────
   dls 2026-10-28: "The word sleep basically remains as is. No colon is
   necessary. But then we have another bar that is the exact same size as
   the weekly bar. It's a rounded rectangle, a long rounded rectangle. It
   will be divided at its center point. On the left, we'll have centered
   within it last night's sleep info. On the right, it will have the 7-day
   average." A button, because a tap opens its pop-up (app.js renderSleep,
   openSleepPopup). 10px under the AZM bar (the now line takes 6px of it),
   as build 234's line was (since build 237 the grid's row-gap). */
.sleep-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  /* Build 237: 0 (build 236: 10px on top); the grid's row-gap keeps the
     bars 10px apart. */
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sleep-row[hidden] {
  display: none;
}

/* "SLEEP", normal weight. Build 239 (dls 2026-10-28: "Make the word sleep
   the same size as the numbers above it"): 14px, the size of .azm-label-num
   ("53/140"), so the label column reads as one column (until then 11px,
   build 234's line size). */
.sleep-label {
  display: block;
  flex: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

/* The bar: the weekly bar's own size, outline and corners (.azm-track),
   white. No now line, no gray, no fill: those are the week's. */
.sleep-track {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  border: 1px solid var(--widget-border);
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
  /* Build 253: the bar is a size container so the narrow-bar rule below
     can ask how wide it is. Its width comes from the grid column (or, in
     the flex fallback, the room left), never from its words, so the
     inline-size containment changes nothing else. */
  container-type: inline-size;
}

/* Build 245 (dls 2026-10-28: "Last 6.9h | 3d avg 7.2h | 7d avg 7.1h ...
   basically about in 3rds but it doesn't have to be exact it can be
   length as needed"): three parts (builds 236 to 244: two equal halves).
   flex 1 1 auto: each part starts at its own words' width and the room
   left over is shared equally, so the parts are about thirds and a longer
   text ("3d avg 10.5h") gets a little more than "Last 6.9h". The words
   centered in each, one line: never wrapped, and should the words ever be
   wider than the part (no realistic case: SPEC build 245 has the
   measurements) they end in "..." rather than spill.
   Build 253 (dls 2026-11-01, the nap after the main sleep, "Last
   5.3h+1.0h"; then "It'll fit do it regardless if there's an issue the
   builder can do whatever is necessary to make it fit", and "I think I
   previously said that these categories don't have to be in perfect 3rd
   divisions"): the padding is 0 (was 2px a side). WHY that is invisible
   wherever the words already fit: the room left over is shared equally
   and each part's words are centered, so the 4px of padding only moved
   from the padding into the shared room; measured, every such case puts
   every word at the same place to 0.01px. It only matters when the
   words are tight: the 12px it frees lets "Last 10.5h+2.3h | 3d avg
   10.5h | 7d avg 10.5h" fit a 360px phone (SPEC build 253). The parts
   already size to their own words (flex 1 1 auto), so the longer "Last"
   part already takes more of the bar. */
.sleep-part {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The number (or "n/a" in its place) in bold, the word before it normal
   weight (dls: "we can put the numbers like 6.9h in bold"). */
.sleep-num {
  font-weight: 700;
}

/* The line between the parts: the day separators' thin line. */
.sleep-part + .sleep-part {
  border-left: 1px solid var(--widget-divider);
}

/* Build 253, the narrow bar (dls: "do whatever is necessary to make it
   fit"): a bar under 230px inside (a 360px phone beside a three-digit AZM
   such as "153/140" or an estimated 100% battery; never on a 390px or
   wider phone) takes the parts' words to 10.5px, so even the longest day,
   "Last 10.5h+2.3h | 3d avg 10.5h | 7d avg 10.5h", fits without "...".
   WHY by the bar's width and not by the words: CSS cannot see when words
   are cut, and the width is known before anything is drawn. 230px: the
   longest day needs 227.6px at 11px (the Mac's font, SPEC build 253), so
   a bar wider than 230px keeps 11px with room to spare. A browser without
   container queries keeps 11px (and "..." in that one case). */
@container (max-width: 230px) {
  .sleep-part {
    font-size: 10.5px;
  }
}

/* Build 236 (dls: "another bar that is the exact same size as the weekly
   bar"): the two rows share one grid's columns, label | bar | battery, so
   the bars have the same left and right edges whatever the label's or
   the battery's width (the label column is as wide as the wider of
   "53/140" and "SLEEP"; the sleep row leaves the battery column empty).
   WHY subgrid: each row is a button (a tap opens its own pop-up), so its
   parts cannot sit in the outer grid directly; subgrid lets each button
   lay its parts on the outer grid's columns. The 4px spaces are margins on
   the bar and the battery (column gap 0), so with no battery the empty
   column takes no room and both bars reach the right edge, as the AZM
   bar alone did. A browser without subgrid keeps the two-column grid
   above (each row's label and bar in flex, the battery beside them).
   Placed AFTER the rows' own rules on purpose: the selectors weigh the
   same, so the later rule wins, and .sleep-row's own display: flex and
   gap must give way here.
   Build 237: the rows span the first two columns only; the battery is its
   own grid item in the third (see .health-rows above). */
@supports (grid-template-columns: subgrid) {
  .health-rows {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .azm,
  .sleep-row {
    display: grid;
    grid-column: 1 / span 2;
    grid-template-columns: subgrid;
    column-gap: 0;
  }

  /* Each label centered in the shared column, as "53/140" is. */
  .azm-label,
  .sleep-label {
    grid-column: 1;
    justify-self: center;
  }

  .azm-track,
  .sleep-track {
    grid-column: 2;
    margin-left: 4px;
  }

  .azm-battery {
    grid-column: 3;
  }
}

/* Build 232 (dls: "the azm words 53/140 AZM right now, that can be a
   smaller font and not bold"): 13px and normal weight (until then 15px
   bold). Build 233 (dls: "the 53/140 AZM can be smaller font"): 11px, two
   steps smaller, which also gives the watch symbol its room (SPEC "A
   watch symbol before the battery" has the measurements).
   Build 234 (dls: "the 53/140 AZM can be shown as AZM first and centered
   over 53/140 which will allow that nuimbers to be larger font"): two
   lines, centered on each other: the word "AZM" small on top (a caption),
   the numbers under it larger. The label is as wide as the wider line
   (the numbers), and .azm's align-items: center sits it centered on the
   bar. Still normal weight ("not bold", build 232). The sizes were chosen
   by measuring at a 360px phone (SPEC "SLEEP line under the AZM line").
   Build 235 (dls: "The 53/140 number should be centered vertically
   relative to the weekly graphic"): the label's box is the NUMBERS only,
   so .azm's align-items: center centers them on the bar; "AZM" is placed
   just above them (absolute, centered over them), reaching above the
   bar's top the way "Now" does (the line keeps 20px of room above it).
   The numbers are always the wider line, so they set the label's width. */
.azm-label {
  position: relative;
  display: block;
  flex: none;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

/* Build 242 (dls 2026-10-28: "The word azm can be the same size as the
   numbers", then "what I really meant was let's maintain the white space
   requirement from before but let's make the azm the same size as the
   numbers"): 14px and normal weight, the same as "53/140" (it was 9px).
   Still directly above the numbers and centered over them; the numbers
   stay on the bar's middle. The build 237 white space holds with no other
   change: measured at 360 and 412px phones (DOM glyph boxes), the word's
   top is 11px under the top buttons (17px at 9px), still below "Now"
   (8px under them), so "Now" stays the highest thing and keeps the 8px.
   With "Now" at its leftmost (Monday 00:00) the word ends 12.1px left of
   "Now" with "53/140" (20.9px with "999/1000"), 11.3px left of the now
   line. */
.azm-label-word {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
}

.azm-label-num {
  display: block;
  font-size: 14px;
}

.azm-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  border: 1px solid var(--widget-border);
  border-radius: 4px;
  background: #ffffff;
}

/* Everything inside the bar's edges; the now line and its word are
   outside this, so they can reach past the bar. */
.azm-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 3px;
}

/* The day names, one per seventh, with a thin line between days. */
.azm-days {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
}

.azm-day {
  flex: 1 1 0;
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.azm-day + .azm-day {
  border-left: 1px solid var(--widget-divider);
}

.azm-days--dark {
  color: #4a525c;
}

/* The same names in white, cut to the blue's width (app.js clip-path). */
.azm-days--light {
  z-index: 3;
  color: #ffffff;
}

/* Build 227 (dls: "the same blue as the app signature blue"): the app's
   own blue, its theme color (until then a darker navy). */
.azm-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background: var(--icon-blue);
}

.azm-stale {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
}

/* No data yet for that time (the watch not synced, or the app not asked
   since). Build 227 (dls: "No dark gray anymore just the light gray for
   both synch issues"). */
.azm-stale {
  background: rgba(170, 176, 184, 0.5);
}

/* Now: "a slightly thicker vertical hash", reaching past the bar above
   and below (build 227: "now line needs to extend beyond the bar above and
   below, with the word "Now" centered above it"). */
.azm-now {
  position: absolute;
  top: -6px;
  bottom: -6px;
  z-index: 5;
  width: 3px;
  margin-left: -1px;
  background: #16181c;
}

.azm-now-label {
  position: absolute;
  bottom: calc(100% + 6px);
  z-index: 5;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* The watch's battery at 10% or less: red words and outline (dls: "no
   battery blink, just the red text and outline is good enough").
   Build 330 (dls 2026-11-25): the battery BOX (#azm-battery) now blinks
   in its yellow and red states (REQ-BLINK-01); this bar label and the
   bar's red outline still do not. */
.azm--battery-low .azm-label {
  color: var(--red);
}

.azm--battery-low .azm-track {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

/* ── Build 333: the projected color and the day numbers ────────────
   SPEC-V1.md "Task page AZM: day numbers and a projected color".

   THE COLOR (app.js azmPace, azmBehindColor): the week's projection at 25
   a day from now on, graded by the AZM Report's rule. Build 334: only a
   week BEHIND is marked (build 333 colored every grade): a yellow grade
   is the task page's gold (build 335: --azm-gold #fcc11b, 1.64:1 on
   white, dls's choice; the report keeps --yellow-text #856a00; build
   338: pure yellow letters with a two-step rim, below), a red grade or
   an X the app's bright red (--red #c0413a, 5.17:1, the red of
   "(Unsaved Changes)"; build 333 used the darker --red-text), and both
   are BOLD (build 338: the gold a little lighter, 600; build 340: the
   gold at normal weight, 400, below): "AZM" over
   "48/140" here, the day numbers below. On track (a
   green grade, or already past the goal) or with no projection there is
   no class, so the label is exactly as before build 333 (normal weight,
   the page's ink, red at a low battery). Placed AFTER .azm--battery-low
   .azm-label on purpose: the selectors weigh the same, so the later rule
   wins and a week behind keeps its look at a low battery too (the bar's
   red outline and the blinking battery box still say "charge the
   watch").

   ── Build 336: THE AZM PACE COLORS, one set for both pages ──
   SPEC-V1.md REQ-AZMPACE-10, -11 and REQ-AZMREP-86. The task page's label
   and day numbers and the AZM Report's This Week and Last Week lines and
   day numbers take their colors from these rules alone (their classes
   come from azm-pic-chart.js's pace parts: lineColor, behindColor,
   dayColor, numsClass), so a week and its days look alike wherever they
   show:
     green  --green-dark #23794a (5.38:1 on white): a day of 20 or more;
            the report's line of a week on track, or one that made 140
     gold   --azm-yellow #ffff00 letters (build 338; about 1.07:1, dls's
            choice) at normal weight (build 340: 400), with a two-step
            rim behind them: a day of 19; a week behind at yellow
     red    --red #c0413a (5.17:1), bold (700), plain: a day of 18 or
            less; a week behind at red or X
   THE RIM (build 336; build 338 two rings; build 340 each ring half as
   wide): a text-shadow halo, copies of the letters drawn behind them,
   stepping darker outward:
     inner ring, 0.5px out, --azm-gold #fcc11b: eight copies at 0.5px
       (0.5px across and up and down, 0.35px each way on the diagonals,
       since 0.35 x 1.41 is about 0.5, so the ring is round)
     outer ring, 1px out, --azm-gold-edge #6b5200: twelve copies at 1px,
       one every 30 degrees (1px, then 0.87px and 0.5px, as cos 30 is
       about 0.87 and sin 30 is 0.5), so the ring stays smooth
   WHY the inner ring is listed first: the first text-shadow is drawn on
   top, so the gold covers the dark gold out to 0.5px and the dark gold
   shows only from 0.5px to 1px. No blur: two crisp half-pixel steps, the
   yellow, the gold, the dark gold, 1px of rim in all.
   WHY build 340 halved them (dls 2026-11-27 16:18, on the AZM Report:
   the gold was "too bold ... too much yellow ... too fat"): build 338's
   rings added 2px around every letter, and its 600 drew as 700 on
   Android, so the gold read much heavier than the green and red. WHY a text-shadow and not -webkit-text-stroke
   with paint-order: stroke fill: Chrome draws paint-order on HTML text
   only from version 123 (March 2024), and @supports cannot tell (Chrome
   has answered yes for paint-order since version 35, for SVG), so an
   older Chrome or WebView would draw the stroke OVER the letters and
   thin them; a text-shadow works in every browser and always lies behind
   the text. text-shadow is inherited, so the green and red rules set none
   (a green day inside a gold row has no rim) and a grade mark inside a
   report line sets none (the marks keep their own look).
   THE WEIGHT (build 338): each color sets its own, as it sets its own
   rim, so a day looks the same in any row: the gold (build 338: 600, a
   little lighter than build 336's 700; build 340: 400, normal, since
   Android's system font Roboto has no 600 face and drew it as 700, and
   the rim already gives the letters their body), green and red 700 as
   before. A rule's weight also wins over the report week line's 700
   (.azm-rpt-week-line, less specific), so a gold week line is normal
   weight too. */
.azm-label.azm-label--yellow,
.azm-rpt-nums.azm-nums--yellow,
.azm-rpt-nums .azm-num--yellow,
.azm-rpt-week-line.azm-rpt-week-line--yellow {
  color: var(--azm-yellow);
  font-weight: 400;
  text-shadow:
    0.5px 0 0 var(--azm-gold), -0.5px 0 0 var(--azm-gold), 0 0.5px 0 var(--azm-gold), 0 -0.5px 0 var(--azm-gold),
    0.35px 0.35px 0 var(--azm-gold), -0.35px 0.35px 0 var(--azm-gold), 0.35px -0.35px 0 var(--azm-gold), -0.35px -0.35px 0 var(--azm-gold),
    1px 0 0 var(--azm-gold-edge), 0.87px 0.5px 0 var(--azm-gold-edge), 0.5px 0.87px 0 var(--azm-gold-edge),
    0 1px 0 var(--azm-gold-edge), -0.5px 0.87px 0 var(--azm-gold-edge), -0.87px 0.5px 0 var(--azm-gold-edge),
    -1px 0 0 var(--azm-gold-edge), -0.87px -0.5px 0 var(--azm-gold-edge), -0.5px -0.87px 0 var(--azm-gold-edge),
    0 -1px 0 var(--azm-gold-edge), 0.5px -0.87px 0 var(--azm-gold-edge), 0.87px -0.5px 0 var(--azm-gold-edge);
}

.azm-label.azm-label--red,
.azm-rpt-nums.azm-nums--red,
.azm-rpt-nums .azm-num--red,
.azm-rpt-week-line.azm-rpt-week-line--red {
  color: var(--red);
  font-weight: 700;
  text-shadow: none;
}

/* Green is only ever a day in a warned row or a report week line, both
   bold before build 338; 700 here keeps a green day bold inside a gold
   row (build 340: 400) too. */
.azm-rpt-nums .azm-num--green,
.azm-rpt-week-line.azm-rpt-week-line--green {
  color: var(--green-dark);
  font-weight: 700;
  text-shadow: none;
}

/* Build 338: today in a gold row ("8?") is gold text, so the gold's
   weight (build 340: 400), not today's own 700 (.azm-rpt-num--today).
   Nothing is lost: today stands out by its "?" and not by its weight. */
.azm-rpt-nums.azm-nums--yellow .azm-rpt-num--today {
  font-weight: 400;
}

.azm-rpt-week-line .azm-grade {
  text-shadow: none;
}

/* THE DAY NUMBERS (app.js azmDayNumbers): the AZM Report's row of day
   numbers (.azm-rpt-nums: 15px, tabular figures, centered, 8px under the
   bar; .azm-rpt-num: one seventh each, a 21px line; today bold), drawn
   INSIDE the bar's track and placed here. WHY inside the track and
   absolutely placed: left 0 and right 0 are the same box the day names
   fill (.azm-inner and .azm-days, inset 0), so each number sits under its
   own day in every layout (with or without subgrid, with or without the
   battery), and the row takes no width of its own, so it can never widen
   the page. top: 100% is the inside of the bar's bottom border, 1px more
   its outer edge; the report's margin-top (8px) then puts the numbers 8px
   under the bar, as on the report (the Now line reaches 5px under it). */
.azm-nums.azm-rpt-nums {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
}

/* The room for the numbers: the AZM row's own padding under the bar (8px
   + the 21px line), so a tap on a number opens the AZM pop-up like the
   rest of the row; .azm's align-items: center works inside the padding,
   so the label stays centered on the bar. With the numbers last in the
   block (no sleep row), 14px below it, as under the sleep row: the Now
   line no longer reaches under the block. */
.health-rows.health-rows--days .azm {
  padding-bottom: 29px;
}

.health-rows.health-rows--days {
  margin-bottom: 14px;
}

/* Beside the AZM row alone, the battery stays centered on the BAR, not on
   the taller row: placed at the row's top, its -4.5px margins (above)
   center its 29px on the 20px bar, as before. Beside both rows the box
   still reaches from the bar's top to the sleep bar's bottom (stretch),
   the numbers between them. */
.health-rows.health-rows--days:not(.health-rows--sleep) .azm-battery {
  align-self: start;
}

/* The fit: on the narrowest bars (a 320px phone with the battery beside
   it: about 181 to 200px), a seventh is about 26 to 28px, too tight for a
   three-digit day at 15px (about 27px), so under 200px the numbers are
   13px (about 23px). WHY by the track's width (a size container, as the
   sleep bar is since build 253): the bar's width depends on the label and
   the battery, not only the screen. The track's children are all
   absolutely placed, so its containment changes nothing else. A browser
   without container queries keeps 15px. Only with the numbers shown. */
.health-rows.health-rows--days .azm-track {
  container-type: inline-size;
}

@container (max-width: 200px) {
  .azm-nums.azm-rpt-nums {
    font-size: 13px;
  }
}

/* Builds 334 and 336: the colors and weight of a warned row of day
   numbers (.azm-nums--yellow or --red: the warning color, bold, the gold
   600 since build 338 and 400 since build 340; each day
   before today in its own color, .azm-num--green ...; today "8?" and the
   days ahead "?" in the row's color) are THE AZM PACE COLORS above, shared
   with the AZM Report. On track the row has none of those classes and is
   build 333's (today bold, the rest normal, the page's ink, days ahead
   blank). */

/* Build 232 (dls: "to the right of that will be a battery symbol and a
   percentage like 88%"; "=88% and ~=88% after the battery symbol"): the
   watch's battery at the bar's right, its own width (flex: none), so the
   bar (flex: 1) is what narrows; the day names keep their size. The
   symbol is drawn in currentColor, so the low-battery red reaches it. */
.azm-battery {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  /* Build 237: a button of its own (a tap opens the AZM pop-up), so the
     button's own look is taken off, as for the rows. */
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.azm-battery[hidden] {
  display: none;
}

/* Build 237 (dls: "put the battery icon directly under the watch icon. We
   keep them the same size but we sort of think of them as one super icon
   and then put the equal sign positioned vertically centered after that
   super icon"): the watch (13 x 16) over the battery (20 x 11), 2px apart,
   centered on each other, 29px tall in all; .azm-battery's align-items:
   center puts "=88%" on its middle. */
.azm-battery-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.azm-battery-icon {
  display: block;
  width: 20px;
  height: 11px;
}

.azm-battery-case {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.azm-battery-tip,
.azm-battery-level {
  fill: currentColor;
}

/* Build 237: the battery is its own button, so it carries its own state
   class (app.js renderAzmBattery). Red, 10% or less (with the row's own
   red label and outline): the watch and battery symbols in --red, the
   words in the darker --red-text. Yellow (dls: "Yellow below 20%. At 20%
   or lower. And then red at 10% or below. Yes. Add the yellow."), 20% or
   less but over 10%: the group alone, the symbols in --yellow, the words
   in the darker --yellow-text; the bar and "53/140" stay as they are (red
   is the only state that marks the bar). The symbols draw in
   currentColor, so the color set on .azm-battery-icons reaches them,
   and the words take the group's. */
.azm-battery.azm-battery--low {
  color: var(--red-text);
}

.azm-battery.azm-battery--low .azm-battery-icons {
  color: var(--red);
}

.azm-battery.azm-battery--yellow {
  color: var(--yellow-text);
}

.azm-battery.azm-battery--yellow .azm-battery-icons {
  color: var(--yellow);
}

/* Build 330: in the yellow and red states the whole battery box also
   blinks (REQ-BLINK-01); that rule is with the appointments' blink, in
   "Build 330: blinking battery and appointments" further down, so the
   one set of keyframes and the reduced-motion rule sit beside both. */

/* ── The charging look (build 259) ────────────────────────────────
   SPEC-V1.md "The watch battery's charging look". Intent: see at a
   glance that the watch is charging, and when it is full. app.js
   renderAzmBattery adds .azm-battery--charging while the watch charges
   (and .azm-battery--full at 100) in place of the yellow or red state.
   The box is filled with --azm-charging-box and everything drawn in it
   is white: the words, the watch (strap, face, crown, hands), the
   battery's outline, nub and fill, and the bolts. The symbols draw in
   currentColor, so the one `color` here reaches all of them.
   --azm-charging-box is the app blue, --icon-blue #1b7bec (the AZM bar's
   fill), or --green-dark #23794a at 100%. WHY --green-dark and not
   --green: white on --green-dark is 5.38:1, on --green #2f9e5f only
   3.40:1. (White on the app blue is 4.12:1, like the AZM bar's white day
   names on its blue fill.)
   NOTHING MOVES but the words' width: the box rules set only colors, a
   background, a border's COLOR and a shadow, never a size, a border's
   width, padding, margin or gap, so the watch (13 x 16), the battery
   (20 x 11) and the box's height stay exactly as they are. The words are
   bold, which makes them wider; the measured result is in the SPEC. */
.azm-battery.azm-battery--charging {
  --azm-charging-box: var(--icon-blue);
  color: #ffffff;
}

.azm-battery.azm-battery--charging.azm-battery--full {
  --azm-charging-box: var(--green-dark);
}

/* Beside both rows (the build 238 box): the box filled with the box
   color, its outline the same color so box and outline read as one shape
   (the outline stays 1px wide: only its color changes). */
.health-rows.health-rows--sleep .azm-battery.azm-battery--charging {
  border-color: var(--azm-charging-box);
  background: var(--azm-charging-box);
}

/* Beside the AZM row alone (no box, build 238): the group's own area
   filled, rounded like the box, and reaching 2px further on every side
   by a shadow, so the white has a color under it. WHY a shadow and not
   padding: a shadow takes no room, so the group, the bar beside it (4px
   away, so 2px stay white) and the space above and below stay exactly
   where they were. */
.health-rows:not(.health-rows--sleep) .azm-battery.azm-battery--charging {
  border-radius: 4px;
  background: var(--azm-charging-box);
  box-shadow: 0 0 0 2px var(--azm-charging-box);
}

/* The words while charging: the bolt, then the number ("[bolt]50%"),
   both bold. inline-flex with align-items: center puts the bolt on the
   number's middle, where the "=" sign sat. */
.azm-battery.azm-battery--charging .azm-battery-text {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

/* The bolt in place of the sign (app.js buildTextBolt): 5.24 x 9px, the
   bolt's 6.4 x 11 proportions at 9px tall, 1px before the number.
   BOLD: a font has no bold for a drawing, so the bolt is made heavier by
   a white outline of 0.6 of its own units (0.49px at its 9/11 px a unit
   scale), which adds about 0.25px on every edge, much as a bold glyph's
   strokes are about half a pixel heavier than its regular ones at this
   size. The outline takes no room (overflow: visible lets its outer half
   show past the box at the bolt's points instead of being cut off), so
   the bolt's box stays 5.24 x 9. */
.azm-bolt-text {
  display: block;
  flex: none;
  width: 5.24px;
  height: 9px;
  margin-right: 1px;
  overflow: visible;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.6;
  stroke-linejoin: round;
}

/* The bolt in the battery (app.js buildBoltInBattery): a ring in the box
   color (the path filled and stroked 2 units wide, round corners), then
   the white bolt on it, so the bolt shows where it crosses the white fill
   and outline. */
.azm-bolt-in-battery-ring {
  fill: var(--azm-charging-box, var(--icon-blue));
  stroke: var(--azm-charging-box, var(--icon-blue));
  stroke-width: 2;
  stroke-linejoin: round;
}

.azm-bolt-in-battery {
  fill: #ffffff;
}

/* Build 233 (dls: "i need a watch symbol just before the battery
   symbol"): first in the battery group, so the group's red reaches it
   (every part is drawn in currentColor). Build 235 (dls: "the problem
   with that symbol is it's too small"; "i like contact sheet #6"): #6,
   "Watch with hands", 13 x 16px (until then a 5.5 x 11px band tracker).
   app.js buildWatchIcon draws its parts. */
.azm-watch-icon {
  display: block;
  width: 13px;
  height: 16px;
}

.azm-watch-strap,
.azm-watch-crown {
  fill: currentColor;
}

.azm-watch-face {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.azm-watch-hands {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.azm-lines .azm-line {
  margin: 0 0 8px;
}

.azm-line--strong {
  font-weight: 700;
}

.azm-line--warn {
  color: var(--red);
  font-weight: 700;
}

.azm-line--small {
  color: var(--muted);
  font-size: 13px;
}

.azm-open-app {
  display: block;
  margin: 6px 0 8px;
  text-align: center;
  text-decoration: none;
}

/* Build 250 (dls 2026-10-30: "the dividers and borders should be the same
   size and color as the dividers and borders  around the azm and sleep and
   battery widgets"): the control's outline is the widgets' 1px outline
   (--widget-border; until build 249 the faint --line). The same width, so
   nothing inside moves; the corners stay as they were. */
.view-toggle {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0;
  border: 1px solid var(--widget-border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Build 250 (dls 2026-10-30: "and similar around the list/tight chips
   control and camera button"): this button and its twin, the camera
   button (.camera-btn below), are outlined like the widgets too
   (--widget-border, the same 1px; until build 249 --line). Neither has a
   line inside it. */
.layout-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: var(--tap);
  border: 1px solid var(--widget-border);
  border-radius: var(--radius);
  background: var(--baby-blue);
  color: #000000;
  cursor: pointer;
}

.layout-icon {
  display: block;
  width: 24px;
  height: 24px;
}

/* Build 178 (dls 2026-10-20: "an equal sized squarish icon for a camera"):
   the camera button is the layout button's twin; the number of pictures
   waiting in its tray sits on its upper right corner. */
.camera-btn {
  position: relative;
}

.camera-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

/* Build 178: the camera tray (an info-card): the pictures, then Take
   another and Add to task side by side; the task choice is one full-width
   button per task. */
.tray-thumbs {
  margin: 0 0 14px;
}

.tray-buttons {
  display: flex;
  gap: 10px;
}

.tray-tasks {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.tray-task {
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  text-align: left;
  cursor: pointer;
}

.tray-task.is-complete {
  color: var(--faint);
}

/* Build 284: a task whose Save is still on the phone takes no pictures
   until it is uploaded (app.js showTrayPicker): its button is disabled and
   says how the upload stands, grayed like the other locked controls. */
.tray-task:disabled {
  opacity: 0.5;
  cursor: default;
}

.tray-pick-back {
  width: 100%;
}

.toggle-btn {
  /* Equal widths: All, Current, Remaining (dls 2026-10-16), Today (build
     118): quarters now. (Build 240: the last two are now "Undone / Past To
     / Future" and "Undone / Past To / Today"; build 241: Current is
     "Undone / AllToday"; see .toggle-btn--stack.) */
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--tap);
  /* Build 170: tightened to make room for the layout button (15px, no
     side padding limit before). */
  padding: 0 2px;
  border: 0;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Build 240 (dls 2026-10-28: "Undone / Past To / Future and Undone / Past
   To / Today"; "those bars can tightly fit three lines"): the two view
   buttons whose names are three stacked lines. Smaller words and a tight
   line height keep the three lines inside the bar's usual 44px, so the
   control does not grow. All and Current kept their single 14px line; a
   button centers its content vertically either way. Measured in headless
   Chrome at a 360px phone, list and camera buttons beside it: each button
   51.5 x 44 (as before), 47.5px inside its padding; the widest line,
   "Undone", is 42.4px; the three lines take 34.7px of the 44 (one line
   each, nothing clipped). 11px because 12px would leave "Undone" under
   1px of room on each side.
   Build 241 (dls 2026-10-28: "Undone / AllToday"): Current uses the same
   style in two lines, so All alone keeps the 14px single line. "AllToday"
   is the widest line of all: 46.95px of the 47.5 at a 360px phone (0.27px
   each side, one line), 4px each side at 390px. It fits as is, so no
   letter-spacing or padding was changed for it; it is the first line to
   run into the padding if anything here ever grows.
   Build 242 (dls 2026-10-28, on his phone: "the text on the next two
   buttons can be increased in size a bit"; and "I have a better idea
   instead of a plus sign let's have the word and on the second line"):
   AllToday is three lines too, "Undone" / "And" / "AllToday", and the
   stacked words grow with the phone's width where there is room.
   3.05vw is 11px at a 360px phone (10.98, held at 11 by the clamp), so
   the 360px fit above is unchanged, and about 12.6px at 412px (a common
   Android width); 13px from 426px up. The room in a button grows by 0.25px
   per px of phone width and "AllToday" by about 0.13px, so a line that
   fits at 360px fits on every wider phone. Measured in headless Chrome at
   real viewport widths (DevTools device metrics), Mac system font: the
   tightest line has 0.27px each side at 360px ("AllToday"), 0.78px at
   390px ("All Today"), 2.25px at 412px, 3.67px at 430px; every line one
   line; three lines at 13px are 40.95px tall, inside the 44px button, so
   the control keeps its height. With Android's Roboto every line has more
   room still (2.39px at 360px).
   Build 254 (dls 2026-11-01: "How about To-Do"): the first line reads
   "To-Do" instead of "Undone", 33.30px wide at 360px (7.10px each side;
   "Undone" was 42.39, 2.55 each side), 35.67 at 390px (9.66; was 45.45),
   37.44 at 412px (11.53; was 47.70). Nothing else here changed, and the
   tightest line is still "AllToday" with 0.27px each side at 360px
   ("All Today" 0.78 at 390px, 2.26 at 412px). */
.toggle-btn--stack {
  /* The plain 11px first: a browser too old for clamp() ignores the next
     line and keeps the build 240 size. */
  font-size: 11px;
  font-size: clamp(11px, 3.05vw, 13px);
  line-height: 1.05;
}

/* One block per line, so each break sits exactly where dls put it, and
   nowrap so a narrow phone can never split "Past To" over two lines.
   Build 254: nowrap also keeps "To-Do" whole. A browser may break a line
   after a hyphen, and nowrap takes that place away too, so it can never
   read "To-" over "Do" (measured: with the buttons squeezed to 20px of
   room, "To-Do" stays one line; with nowrap removed it splits at the
   hyphen). So the word can use a plain "-" rather than the non-breaking
   hyphen U+2011, which some fonts lack (some Android Roboto builds). */
.toggle-line {
  display: block;
  white-space: nowrap;
}

/* Build 242 (dls 2026-10-28: "We can put a space between the word all and
   today"): the space in "All Today" is its own span. It is left out (the
   line reads "AllToday") on phones narrower than 390px, where "All Today"
   would not fit its button, and shown from 390px up. Measured at the
   clamp() size above with the Mac's system font (the iPhone's): "All
   Today" runs 2.45px past its padding at 360px and 0.39px at 375px, has
   0.11px to spare on each side at 380px, 0.38px at 384px, 0.78px at 390px,
   2.25px at 412px. 390px is the first common phone width with visible
   room on both sides. (Android's Roboto is about 10% narrower, so there
   the space would fit even at 360px, but a media query cannot tell the
   fonts apart.) The text stays "All Today" for a screen reader either way;
   the button's aria-label says "Undone and all today" ("To-do and all
   today" since build 254). */
.toggle-space {
  display: none;
}

@media (min-width: 390px) {
  .toggle-space {
    display: inline;
  }
}

/* Build 084 (dls 2026-10-16: "the one that is highlighted should just be
   black font. And again, a baby blue background"). (Build 083 tried blue
   text on a very light blue.) */
.toggle-btn.is-active {
  background: var(--baby-blue);
  color: #000000;
}

/* Build 250 (dls 2026-10-30: "i want to see gray vertical lines on the all
   / undone / etc.  to separate the selections", then "the dividers and
   borders should be the same size and color as the dividers and borders
   around the azm and sleep and battery widgets"): a 1px line between each
   two neighboring view buttons, in the widgets' thin inner line
   (--widget-divider: the line between the AZM bar's days and between the
   sleep bar's parts), the bar's full height. Three lines, on the left edge
   of the 2nd, 3rd and 4th buttons; none at the outer edges, where the
   control's outline already is.
   WHY a shadow drawn inside the button and not a border: a border would
   take 1px from each of three buttons' room, and the stacked words were
   fitted to that room tightly (builds 240 to 242: "AllToday" has 0.27px on
   each side at a 360px phone). The shadow takes no room: it is drawn over
   the leftmost 1px of the button's own 2px side padding, so every button
   keeps its width and its words their room (measured, SPEC build 250). It
   is drawn on top of the button's background, so it shows on the
   baby-blue selected button as well as on white. */
.toggle-btn + .toggle-btn {
  box-shadow: inset 1px 0 0 var(--widget-divider);
}

/* ── Task sections ─────────────────────────────────────────────── */

.task-section {
  margin-bottom: 26px;
}

/* Build 329 (SPEC-V1.md "Due Today in a framed card (build 329,
   2026-11-24)", REQ-CARD-01 to -05): the DUE TODAY section (its title with
   the info and weather icons, and every row under it, up to the next
   section) is one raised card, so today's tasks stand out from the days
   around them. app.js buildSection adds the class only to the section
   whose title says DUE TODAY. Everything inside keeps its own colors and
   sizes; only the padding is new.

   THE LOOK:
   - border: 3px of the app's own blue, --icon-blue (#1b7bec, the blue of
     the app bar at the top of the page; dls calls it the app's dark blue,
     builds 142 and 227). No new hue.
   - background: plain white, written out (#ffffff, not var(--bg)) because
     white inside is the point; it stays white whatever the page behind it
     is ever given.
   - corners: var(--radius), 12px, the app's usual rounded corner.
   - shadow, two layers for a raised card: a close, darker one
     (0 2px 4px, 22% black) that gives the edge, and a wide, soft one
     (0 8px 18px, pulled in 6px, 28% black) that lifts the card off the
     page. Both fall downward, as from a light above.
   - padding: 18px on top, 10px at the sides and the bottom. The top is
     larger for the weather icon (the clouds): it is out of the title's
     line and reaches 8.4px above it (its 35px box centered on the 18.2px
     line: 35 / 2 - 18.2 / 2), so 18px leaves 9.6px of white between the
     border and the icon's box. The sides: the title starts 10px inside the
     border, a task's text 16px (the row's own 6px padding).

   THE FIT AT 320px (the narrowest phone): the page's 16px gutters leave
   the card 288px; inside, 288 - 2 x 3 (border) - 2 x 10 (padding) = 262px
   for the title and the rows. The rows already wrap to the width they are
   given (max-width 100%). The weather icon's right edge is 260.89px from
   the title's left edge on a Wednesday, the longest title (build 250's
   measurement: 83.11px from a 360px screen's right edge, so
   360 - 16 - 83.11), which leaves 1.11px inside the 262px and 11.11px to
   the border. The shadow reaches at most 12px to the sides (the wide
   layer: 18px blur less the 6px pull), inside the 16px gutter, 4px from
   the screen's edge; and a shadow never widens the page's scroll area
   (html and body also hide sideways overflow).

   THE GAPS: 28px below, more than the shadow's 20px reach down there
   (8 + 18 - 6), so the next section's title has clean white above it.
   20px above; neighboring vertical margins overlap (collapse), so the gap
   above is 20px when today's section comes first (the view buttons' own
   20px) and 26px under an earlier section (its 26px). */
.task-section.task-section--today {
  margin: 20px 0 28px;
  padding: 18px 10px 10px;
  border: 3px solid var(--icon-blue);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22), 0 8px 18px -6px rgba(0, 0, 0, 0.28);
}

/* Build 161 (dls 2026-10-19: "instead of left aligned one per line, i want
   them displayed left to right reading style, next line when a full task
   cannot fit ... use the blank space better on the right side and save me
   some vertical space"): a section's tasks flow side by side like words,
   each whole, wrapping to the next line when the next one does not fit.
   A task never grows wider than the screen (a long name wraps inside it). */
.task-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px 14px;
}

.task-flow .task-row {
  width: auto;
  flex: 0 1 auto;
  max-width: 100%;
  gap: 8px;
}

/* Build 170: the vertical list (the layout button): one task per line at
   the left, as before build 161. Build 175 (dls 2026-10-20: "clicke on the
   white space to the right of a task should not open the task"): each task
   is only as wide as what it shows, like a chip (.task-flow .task-row), so
   the empty rest of its line is not part of it and a tap there does
   nothing. Builds 170 to 174 gave each task the whole line (width 100%). */
.task-flow.task-flow--list {
  flex-direction: column;
  align-items: flex-start;
}

/* Build 170: while the layout rolls from one to the other, the tasks sit
   in explicit lines (app.js animateTaskLayout), spaced exactly as the
   chips are, so nothing jumps at the start or the end. */
.task-flow.task-flow--lines {
  flex-direction: column;
  align-items: flex-start;
}

.task-line {
  display: flex;
  gap: 2px 14px;
  max-width: 100%;
}

.section-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* A section from an earlier date ("DUE THURSDAY" on Friday): lighter
   gray, since it is in the past (dls 2026-10-16). */
.section-title--past {
  color: var(--faint);
}

.all-done {
  margin: 18px 0;
  text-align: center;
  color: var(--faint);
  font-size: 17px;
}

/* ── One task row ──────────────────────────────────────────────── */

/* Rows sit closer, with no gray line between them (dls 2026-10-16: "remove
   the lines between successive items ... move those lines closer together.
   probably about half the distance", the next checkbox moving up to where
   the gray line was). With the 26px checkbox, the space between two
   checkboxes went from 26px (a 52px row) to 13px (a 39px row). A row with
   notes under its name still grows to fit them. */
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 39px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.task-row:active {
  background: var(--card);
}

.task-text {
  /* min-width:0 lets a long task name wrap instead of forcing the row
     wider than the screen (the classic flexbox overflow trap). */
  min-width: 0;
  flex: 1 1 auto;
}

.task-name {
  /* position:relative anchors the animated strikethrough line below. */
  position: relative;
  font-size: 17px;
}

.task-deadline {
  color: var(--faint);
  font-size: 15px;
}

/* A completed row is quiet: gray and struck through. It has already
   had its moment (the celebration); now it just confirms. */
.task-row.is-complete .task-name,
.task-row.is-complete .task-deadline {
  color: var(--faint);
  text-decoration: line-through;
}

/* In "Show All" mode a completed row stays visible but recedes. */
.task-row.is-dimmed {
  opacity: 0.65;
}

/* Small marker for "there are photos here but it is not marked
   complete", so a half-finished submission is not invisible. */
.photo-flag {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--faint);
}

/* ── The checkbox indicator ────────────────────────────────────── */

/* Build 282 (dls 2026-11-12; SPEC-V1.md "Task boxes by kind: stipend,
   non-stipend, event"): three looks, so the kinds of task are told apart
   at a glance, on the task page AND the report (marks.js buildBox gives
   both pages these same classes; dls: "The report will use the same
   styles. It will match."):
     .checkbox--stipend     tier 'hard': 26px, corners rounded 7px, a 2px
                            border, GREEN when empty, so these stand out
     .checkbox--nonstipend  tier 'expected': a perfectly square 22px box
                            sitting 2px inside the stipend box's edge, a
                            1px outline in the text color
     .checkbox--event       a calendar task (is_event): a 22px calendar
                            symbol instead of a box, outlined in the text
                            color
   The state classes further down (.checkbox--green, --late, ...) set only
   COLORS, so each kind keeps its own shape in every state: done or late,
   the outline (or the calendar) takes the mark's color, as the boxes
   always have. Until build 282 every empty box had the light gray --line
   border; no box uses gray any more.

   The sizes are custom properties so the report's dark day header can
   draw the same looks smaller (.rpt-dayhead .checkbox). Every kind keeps
   the same footprint (--box-size), so the rows stay lined up. */
.checkbox {
  --box-size: 26px;
  --box-radius: 7px;
  --check-size: 20px;
  --q-size: 17px;
  --event-q-size: 12px;
  /* The outline of an open non-stipend box or event: the text color
     around it, black here (the page has no dark mode); the report's dark
     day header sets white, its text color. Never gray. */
  --box-ink: var(--ink);
  /* For the "?" and ✗ laid over the box (.checkbox-q) and the event's
     check. */
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--box-size);
  height: var(--box-size);
  background: var(--bg);
}

.checkbox--stipend {
  border: 2px solid var(--green);
  border-radius: var(--box-radius);
}

/* 4px smaller than the footprint, and the 2px margin all round gives the
   footprint back: the square sits just inside where a stipend box's edge
   would be. */
.checkbox--nonstipend {
  width: calc(var(--box-size) - 4px);
  height: calc(var(--box-size) - 4px);
  margin: 2px;
  border: 1px solid var(--box-ink);
  border-radius: 0;
}

/* No box at all: the calendar (marks.js buildCalendarSvg) is the
   outline. Its lines and the check take `color`, so the state classes
   recolor it like a box's border. */
.checkbox--event {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--box-ink);
}

.checkbox--event .box-calendar {
  width: calc(var(--box-size) - 4px);
  height: calc(var(--box-size) - 4px);
}

.box-calendar-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.box-calendar-ring {
  stroke-width: 2;
  stroke-linecap: round;
}

.checkbox .check {
  width: var(--check-size);
  height: var(--check-size);
  /* Hidden for an empty (not submitted) box; the state classes below
     turn it on. */
  opacity: 0;
}

/* An event's check: smaller, in the calendar's page under its top band.
   In percent of the footprint so it stays in place at either size (at
   26px: 16px square, 5px from the left, 9px from the top). */
.checkbox--event .check {
  position: absolute;
  left: 19%;
  top: 33%;
  width: 62%;
  height: 62%;
}

.check-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* 24 is a little more than the real path length (about 21), so the
     dash fully covers the stroke when offset is 24 and fully reveals
     it at 0. That is what makes the "drawn in" animation possible. */
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
}

/* Completed WITH at least one photo. */
.checkbox--green {
  border-color: var(--green);
  color: var(--green);
}

.checkbox--green .check {
  opacity: 1;
}

/* Completed with NO photo: still done, but unevidenced. Yellow again
   since build 088 (dls 2026-10-16; it was yellow, then orange from
   2026-10-15). */
.checkbox--nophoto {
  border-color: var(--yellow);
  color: var(--yellow);
}

.checkbox--nophoto .check {
  opacity: 1;
}

/* Build 213 (dls 2026-10-25: "it should be on the task page reflective of
   the lateness status so it should be a red check mark"): done late, a
   yellow check; done very late, a red one. The same marks as the report
   (marks.js decides which, for both pages). */
.checkbox--donelate {
  border-color: var(--yellow);
  color: var(--yellow);
}

.checkbox--doneverylate {
  border-color: var(--red);
  color: var(--red);
}

.checkbox--donelate .check,
.checkbox--doneverylate .check {
  opacity: 1;
}

/* Build 194 (dls 2026-10-22: "those should be empty yellow or empty red";
   "It can be the same question mark as well"): not done and past its
   deadline, the box carries the report's "?" in the color doing it now
   would get: yellow for late, red for very late. The "?" sits over the
   hidden check, so the box keeps its size; the completion animation hides
   it while the check draws. */
.checkbox--late {
  border-color: var(--yellow);
  color: var(--yellow);
}

.checkbox--verylate {
  border-color: var(--red);
  color: var(--red);
}

/* Build 282: the report's missed task (a red ✗, its status 'missing'),
   now that the report draws boxes. The task page never shows it: every
   row there can still be done. */
.checkbox--missing {
  border-color: var(--red);
  color: var(--red);
}

.checkbox-q {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--q-size);
  font-weight: 800;
  line-height: 1;
}

/* An event's "?" or ✗: smaller, in the calendar's page under its top
   band (at 26px: 10px from the top, 2px from the bottom). */
.checkbox--event .checkbox-q {
  inset: 37% 12% 8% 12%;
  font-size: var(--event-q-size);
}

.task-row.anim-check .checkbox-q {
  opacity: 0;
}

/* ── Build 330: blinking battery and appointments ──────────────── */
/* SPEC-V1.md "Blinking battery and appointments (build 330,
   2026-11-25)", REQ-BLINK-01 to -05. Intent: the two states that ask
   for action soon (a watch battery to charge, an appointment whose
   heads-up or time has come) catch the eye at a glance at the task page.

   HOW IT BLINKS: one set of keyframes, on 75% of each cycle and off 25%.
   With `step-end` timing the opacity does not fade between keyframes: it
   holds the earlier keyframe's value until the next keyframe's moment,
   then jumps. So opacity is 1 from the start of the cycle until 75%, and
   0 from 75% to the end, and then the next cycle starts at 1 again: a
   crisp on/off, not a fade.
   WHY opacity (and not display or visibility): an invisible element with
   opacity 0 still takes its room and still takes taps, so nothing around
   it moves while it is off, and a tap on the battery still opens the AZM
   pop-up.
   WHY CSS only (no timer in app.js): the browser runs the blink itself,
   so it costs no script work, and it starts and stops by itself as
   app.js adds and removes the state classes. */
@keyframes blink-75-25 {
  /* On from the start of the cycle ... */
  0% {
    opacity: 1;
  }
  /* ... and off for the last quarter. */
  75%,
  100% {
    opacity: 0;
  }
}

/* REQ-BLINK-01: the watch battery in its yellow (20% or less) or red
   (10% or less) state blinks once a second: 0.75 s on, 0.25 s off. The
   whole box blinks: beside both rows, its colored outline and ring (the
   border and the 1px shadow), the watch and battery symbols and the
   words; beside the AZM row alone, the symbols and the words. The normal
   and charging looks never have these two classes (app.js
   renderAzmBattery), so they never blink. The AZM bar's own red outline
   and "53/140" at 10% or less stay steady: they are not the battery. */
.azm-battery.azm-battery--yellow,
.azm-battery.azm-battery--low {
  animation: blink-75-25 1s step-end infinite;
}

/* REQ-BLINK-02: an appointment (the calendar box) not yet checked off in
   its yellow (its heads-up has begun) or red (its time has come) state,
   the yellow or red "?" in the calendar, blinks once every 1.1 s:
   0.825 s on, 0.275 s off. WHAT BLINKS: the box, that is the calendar
   drawing and the "?" inside it, which are the only parts of the row
   that carry the yellow or red; the task name stays steady and readable.
   The 1.1 s cycle is dls's choice, a little slower than the battery's
   1 s, with the same 75/25 share of on and off.
   WHO DOES NOT BLINK:
   - a done appointment: its box has a done class (green, or a yellow or
     red check), never --late or --verylate;
   - a to-do's yellow or red box: it is not .checkbox--event;
   - the report: its boxes are not inside a .task-row;
   - a row whose completion animation is running (.anim-check): the
     appointment was just checked off, so it is done already. */
.task-row:not(.anim-check) .checkbox--event.checkbox--late,
.task-row:not(.anim-check) .checkbox--event.checkbox--verylate {
  animation: blink-75-25 1.1s step-end infinite;
}

/* REQ-BLINK-03: a phone set to reduce motion gets no blinking at all; the
   steady yellow and red looks stay (these rules turn off only the
   animation). The same selectors as above, later in the file, so these
   win. (The page's general reduced-motion rule, at the end of this file,
   would also cut each animation short; this says it outright.) */
@media (prefers-reduced-motion: reduce) {
  .azm-battery.azm-battery--yellow,
  .azm-battery.azm-battery--low,
  .task-row:not(.anim-check) .checkbox--event.checkbox--late,
  .task-row:not(.anim-check) .checkbox--event.checkbox--verylate {
    animation: none;
  }
}

/* ── Completion animation (about 2 seconds total) ──────────────── */
/*
   The row is rendered in its OLD (incomplete) state and then animated
   into the new one, so the participant actually sees the change
   happen. Step 1 draws the check, step 2 strikes the name through.
   JS adds these classes on a timer; see runCelebration() in app.js.
*/

.task-row.anim-check .checkbox {
  border-color: var(--green);
  color: var(--green);
}

/* Build 213: the check the animation draws is already in the color the
   task's mark will have (buildRow's checkbox--to-*), not always green. */
.task-row.anim-check .checkbox.checkbox--to-yellow {
  border-color: var(--yellow);
  color: var(--yellow);
}

.task-row.anim-check .checkbox.checkbox--to-red {
  border-color: var(--red);
  color: var(--red);
}

.task-row.anim-check .check {
  opacity: 1;
  animation: draw-check 420ms ease forwards;
}

@keyframes draw-check {
  from {
    stroke-dashoffset: 24;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.task-row.anim-strike .task-name::after {
  content: "";
  position: absolute;
  left: 0;
  top: 55%;
  height: 2px;
  width: 0;
  background: var(--faint);
  animation: strike-through 420ms ease forwards;
}

@keyframes strike-through {
  to {
    width: 100%;
  }
}

.task-row.anim-strike .task-name,
.task-row.anim-strike .task-deadline {
  color: var(--faint);
  transition: color 420ms ease;
}

/* ── "Good job!" celebration overlay ───────────────────────────── */

.celebrate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The overlay is purely decorative and must never eat a tap. */
  pointer-events: none;
}

.celebrate.is-fading {
  animation: celebrate-fade 400ms ease forwards;
}

@keyframes celebrate-fade {
  to {
    opacity: 0;
  }
}

.celebrate-text {
  position: relative;
  z-index: 2;
  font-size: 34px;
  font-weight: 700;
  color: var(--green-dark);
  animation: grow-in 420ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes grow-in {
  from {
    transform: scale(0.2);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* The starburst: a soft green glow that expands once behind the text.
   A radial gradient is enough; no canvas, no library. */
.starburst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(47, 158, 95, 0.35) 0%,
    rgba(47, 158, 95, 0.12) 45%,
    rgba(47, 158, 95, 0) 70%
  );
  animation: burst-glow 700ms ease-out forwards;
}

@keyframes burst-glow {
  from {
    transform: scale(0.2);
    opacity: 1;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* Fireworks particles. JS spawns a dozen of these and sets --angle
   and --dist on each; the keyframes below fling them outward. */
.particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  animation: particle-fly 900ms ease-out forwards;
}

@keyframes particle-fly {
  from {
    /* rotate first, then translate along X: the rotation decides the
       direction, the translate decides how far. */
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) rotate(var(--angle))
      translateX(var(--dist)) scale(0.25);
    opacity: 0;
  }
}

/* ── Detail overlay ────────────────────────────────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(22, 24, 28, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.overlay-card {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
}

.overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.overlay-title {
  font-size: 22px;
  font-weight: 700;
}

/* Build 138 (dls 2026-10-18): after the task's name, "in Gray parentheses
   ... last saved", and "in red" when there are changes not yet saved.
   Smaller and lighter than the name; kept in one piece when it wraps. */
.save-state {
  font-size: 15px;
  font-weight: 400;
  color: var(--faint);
  white-space: nowrap;
}

.save-state--unsaved {
  color: var(--red);
  font-weight: 600;
}

.overlay-subtitle {
  font-size: 15px;
  color: var(--faint);
  margin-top: 2px;
}

/* "Press for Info" (dls 2026-10-16): a small link under a task's name
   (in its row, and inside the task under the subtitle). Standard link
   blue, like the report's address links. Padding makes it easier to hit
   than its small text suggests. */
.info-link {
  display: block;
  margin: 2px 0 0;
  padding: 4px 0;
  border: none;
  background: none;
  color: #1a0dab;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

/* Build 161 (dls 2026-10-19: "an info icon, stylized lower case i in
   bold white font with a dark blue circle around it"): app.js
   buildInfoIcon. 22px, with padding taken back by a negative margin so
   the tap area is larger than the icon without moving anything. */
.info-link--icon {
  display: inline-flex;
  /* Build 168 (dls 2026-10-19: "I want the bottom of the I to be in
     alignment with the text to the left ... a slightly different
     calculation for the top line that says due today Monday, since that's
     a different font size. But I still want it to be aligned with the
     bottom of the font to the left"): the foot of the "i" sits on the
     text's baseline, whatever the text's size. An inline-flex box sits on
     the baseline by its icon's bottom edge, and the foot is 5.5 of the
     icon's 24 units above that edge (app.js buildInfoIcon: foot at y 18.5),
     so the icon is lowered by 5.5/24 of its 17.6px height. Because the
     browser puts each icon on its own line's baseline, the same rule fits
     the 17px task names and the 13px "DUE TODAY" title. (Was middle.) */
  vertical-align: calc(17.6px * -5.5 / 24);
  padding: 6px;
  /* Build 166 (dls 2026-10-19: "the distance from the text to the info
     button is a little too much white space ... I want it to be the
     distance of a single font white space to the left edge of the
     circle"): the padding is taken back on every side, so the circle
     starts where the link starts; the space before it (a space character
     in a task row) is the whole gap. Was -6px -2px, which added 4px.
     (Build 250: two spaces now, .info-gap below.) */
  margin: -6px;
  text-decoration: none;
}

/* Build 166: the icon after "DUE TODAY ..." (app.js buildSectionInfoLink).
   One space's width from the title's last letter: the title
   already ends with its 0.12em letter spacing, so 0.15em more makes about
   a space (0.27em), with the -6px taking back the tap padding.
   Build 250 (dls 2026-10-30: "the i information icons can have an
   additional space before them"): one more space, 0.27em, so the gap is
   about two spaces (0.54em). A margin is enough here (task rows and the
   task form use real spaces instead, .info-gap below): the title is one
   short line, so this icon never starts a line. */
.section-info {
  margin-left: calc(0.15em + 0.27em - 6px);
}

/* Build 197: the weather link (lightning bolt) after the info icon, with
   some space between ("let's put some space between the info button and
   another little circle with a lightning bolt in it"): 10px between the
   two circles (the -6px takes back its tap padding, as above). */
.section-weather {
  margin-left: calc(10px - 6px);
}

/* Build 243 (dls 2026-10-28: "The icon to go to the weather should be much
   larger probably at least if you considered it a square at least twice
   as wide and twice as high probably three times we will use the space in
   the white spacing above and below to be able to do this"): the big icon
   of the worst weather ahead (app.js dressWeatherLink, weather-icon.js).
   It is taken out of the line (position: absolute), so the title's line
   and everything under it stay exactly where they were. Across, it keeps
   its place in the line (no left or right given, so the browser puts it
   where it would have been: 10px after the info icon; inline-block, not
   block, or that place would be the start of a new line). Up and down,
   it is measured from the title (position: relative below), reaching up
   into the white space above the title, which is where the room is (dls:
   "there might be more room above").
   Build 244 (dls 2026-10-28: "i want it 2x original not 3x"): a 35px
   square (twice the 17.6px info circle; build 243's drawing was 56 by
   42), centered in the room between the view buttons and the first task
   when today's section comes first: that room is 44.2px (20px of white
   space above the title's 18.2px line, 6px below), so 4.5px is left
   below it (the title's 6px bottom margin, less 4.5px) and about 4.7px
   above. Measured at 360 and 412px wide (SPEC "The weather icon: emoji,
   2x, and rain only from a moderate day").
   Build 250 (dls 2026-10-30: "the weather icon i want that centered on the
   text to the left of it"): NOW its middle is on the middle of the title's
   capital letters ("DUE TODAY WEDNESDAY"), 6.9px lower than builds 244 to
   249 had it (they centered it in the white space, above, which left its
   middle 7.2px above the capitals' middle). top: 50% is the
   middle of the title's one line, and the icon goes up from there by half
   its 35px (.weather-emoji). MEASURED (headless Chrome, the Mac's system
   font, DOM boxes and font metrics, no pixels): the capitals run from
   4.61px to 14.23px down the title's 18.19px line, so their middle is
   9.42px down; the line's middle is 9.09px down, so the icon's middle is
   0.33px above the capitals' middle. That is less than the emoji drawings'
   own wobble in their box (the cloud's drawing is 1px off the box's
   middle), and less than one dot of a phone's screen. WHY the line's middle
   and not a measured 9.42px: the line's middle is the same rule for every
   font (an Android phone draws the title in Roboto), while where the
   capitals sit in the line differs a little from font to font. The icon
   reaches 8.4px below the title's line, past the title's usual 6px margin,
   so the next rule gives today's title the room for it. Across, nothing
   changed: still 10px after the info icon. */
.section-title--today {
  position: relative;
}

.section-weather.section-weather--big {
  position: absolute;
  top: calc(50% - 35px / 2);
  display: inline-block;
  margin-left: 10px;
  line-height: 0;
  text-decoration: none;
}

/* Build 250: the room under today's title for the centered icon (above).
   The icon reaches half its height (17.5px) below the middle of the title's
   line, which is half the line (13px at the 1.4 line height: 18.2px, so
   9.1px) above the line's bottom: so 8.4px below the line, where the title's
   usual margin is 6px. 8.5px is that 8.4px rounded up to the half pixel:
   the browser rounds lengths to 1/64px, and an exact 8.4px came out 1/64px
   short (measured), the icon then touching into the first task. So the
   icon now ends 0.09px above the first task's top: only the space needed,
   2.5px more, and the list under it moves down 2.5px. Only while the big
   icon shows (:has looks for it, so no app.js change is needed when the
   icon comes or goes); with the small bolt circle, which sits in the line,
   the title keeps its 6px. A browser without :has keeps 6px, and the icon
   then reaches 2.4px into the first task's empty top padding (nothing is
   drawn there). Above, there is room to spare: 11.59px to the view buttons
   when today's section comes first, 17.59px to the section above it
   otherwise (measured at 360 and 412px, SPEC build 250). Build 329: today's
   section is now a card, and the room above the icon is the card's own
   18px top padding (9.6px of it above the icon, .task-section--today). */
.section-title--today:has(> .section-weather--big) {
  margin-bottom: 8.5px;
}

/* Build 244: the weather emoji (weather-icon.js EMOJI), in place of build
   243's drawings (dls: "the ones you showed above are rather cute i like
   those"). A fixed 35px square, so the space it takes is the same on
   every phone; the emoji is centered in it at a font size that makes it
   about that big. Each phone draws emoji in its own style (Noto on
   Android, Apple's on an iPhone), and each emoji font sits a little
   differently in its line, so the picture may be a pixel or two off
   center from phone to phone. The title's bold, letter spacing and
   capitals are undone here: they are not meant for a picture, and the
   letter spacing would push the emoji off center. */
.weather-emoji {
  display: block;
  width: 35px;
  height: 35px;
  font-family: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 30px;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 35px;
  text-align: center;
  text-transform: none;
}

/* Build 248 (dls 2026-10-30: "we need an icon for drizzle/light rain which
   would be that same cloud with one blue rain tierdrop, prob 2x larger
   than the existing raindrops"): the drizzle icon (weather-icon.js
   buildIcon), shown only for light rain now or within two hours. The same
   35px box; the same cloud emoji at the same 30px, so it is the very cloud
   of the cloudy icon on every phone, raised a little; and one blue
   teardrop (a small SVG drawing) under the cloud's middle.
   MEASURED (headless Chrome on the Mac, Apple Color Emoji, 2026-10-30;
   pixels counted as numbers on a canvas, no picture looked at): in the
   cloudy icon's box the cloud's drawing runs from 7px to 26px down from
   the top (19px tall) and from 3.5px to 32.5px across (its middle at 18px,
   half a pixel right of the box's middle). The rain emoji's drops are
   slanted streaks about 4px tall and 3px wide at 30px, so this drop is
   about twice that: 0.27em (8.1px) tall and 5.8px wide.
   THE TWO KNOBS, one line each (dls judges the look on his phone):
     --weather-drop-size  the drop's height (its width follows: 10 to 14)
     --weather-drop-gap   the space between the cloud's drawing and the drop
   The cloud goes up just enough that cloud, gap and drop together sit in
   the middle of the box (3.2px clear above and below with the values
   here), and they stay centered when a knob changes.
   ANDROID: Google's Noto emoji draw the cloud wider, and perhaps higher or
   lower in the box; not measured (that font is not on the Mac). If the
   drop touches the cloud or floats off it there, the gap knob moves it. */
.weather-emoji--drizzle {
  position: relative;
  --weather-drop-size: 0.27em;
  --weather-drop-gap: 0.05em;
  /* Measured, not knobs: where the cloudy icon's cloud is drawn in its
     35px box (above). */
  --weather-cloud-ink-top: 7px;
  --weather-cloud-ink-height: 19px;
  --weather-cloud-ink-middle: 18px;
  /* The room left above the cloud and below the drop (the same both
     ways), and so how far the cloud is raised from where cloudy has it. */
  --weather-drizzle-room: calc((35px - var(--weather-cloud-ink-height) - var(--weather-drop-gap) - var(--weather-drop-size)) / 2);
  --weather-cloud-raise: calc(var(--weather-cloud-ink-top) - var(--weather-drizzle-room));
}

/* The cloud: laid out exactly as the cloudy icon's emoji (it inherits the
   box's font, size, line height and centering), then moved up. */
.weather-drizzle-cloud {
  display: block;
  position: relative;
  top: calc(-1 * var(--weather-cloud-raise));
}

/* The drop: placed from the box's top left corner, its top the gap below
   the raised cloud's drawing, its middle under the cloud's middle. */
.weather-drizzle-drop {
  position: absolute;
  top: calc(var(--weather-drizzle-room) + var(--weather-cloud-ink-height) + var(--weather-drop-gap));
  left: calc(var(--weather-cloud-ink-middle) - var(--weather-drop-size) * 10 / 14 / 2);
  width: calc(var(--weather-drop-size) * 10 / 14);
  height: var(--weather-drop-size);
  fill: var(--rain-blue);
}

.info-icon {
  display: block;
  /* Build 164 (dls 2026-10-19: "lets make it 20% smaller"): 17.6px, was
     22px. The tap area around it (the padding above) is unchanged. */
  width: 17.6px;
  height: 17.6px;
}

.info-icon-disc {
  /* Build 163 (dls 2026-10-19: "lets try white on baby blue for the i,
     white on gray for the completed ones"): baby blue (the app's blue in
     build 161). */
  fill: var(--baby-blue);
}

/* A completed task's icon in its row: light gray. Build 165 (dls
   2026-10-19: "Let's make the completed ones white on light gray. The low
   contrast is on purpose"): #e2e2e2, 10% on the perceived darkness scale
   (build 106), about as light as the baby blue; build 163 used the
   crossed-out name's darker gray. */
.task-row.is-complete .info-icon-disc {
  fill: #e2e2e2;
}

.info-icon-glyph {
  fill: #ffffff;
}

/* Inside the task form the icon follows the task's name (build 174, dls
   2026-10-20: "move the info icon after the name of the task"), so it
   takes the .info-link--icon rules above as they are: one space after the
   name (two since build 250, .info-gap below), the foot of the "i" on the
   name's baseline. Builds 161 to 173 had a #detail-info rule here that put
   it on its own line under the subtitle. */

/* Build 128 (dls 2026-10-17: "That should be after the task name if
   there's room for it there. Otherwise, it goes down to the second
   line"): in a task's ROW the link flows on the name's line. inline-block
   with nowrap keeps "Press for Info" in one piece, so when the line has
   no room the whole link moves down to the next line (the space before
   it, which app.js adds, then disappears at the line's end). The 4px tap
   padding stays, and the matching negative margin keeps it from making
   the line taller. (Inside the task form the icon follows the name the
   same way; build 174.) */
.task-text .info-link {
  display: inline-block;
  margin: -4px 0;
  white-space: nowrap;
}

/* Build 166 (dls 2026-10-19: "the distance of a single font white space
   to the left edge of the circle"): the icon in a row takes back all of
   its tap padding (the rule above, for the old text link, kept 6px of it
   at the left), so the space before it is the whole gap. */
.task-text .info-link.info-link--icon {
  display: inline-flex;
  margin: -6px;
}

/* Build 250 (dls 2026-10-30: "the i information icons can have an
   additional space before them"): before the "i" in a task row (app.js
   buildRow) and in the task form (index.html, #detail-info-gap), two
   spaces where builds 166 to 249 had one ("the distance of a single font
   white space"). They are two real space characters in a span.info-gap;
   pre-wrap keeps both (normally the browser folds two spaces into one).
   WHY real spaces and not a margin on the icon: build 128's rule that an
   icon with no room on the name's line moves to the next line with no gap
   in front of it. The browser can break the line only after the spaces,
   and spaces left at the end of a line hang there, invisible and taking
   no room, so on the new line the icon starts at the very left, as
   before. A margin would travel with the icon and leave a gap there. */
.info-gap {
  white-space: pre-wrap;
}

/* The pop-up: a dimmed backdrop over everything (above the task form at
   150) with a card in the middle. */
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}

.info-card {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  /* Something tall (a long explanation, the camera tray's pictures)
     must not push OK off the screen; the card scrolls instead. (Added in
     build 136 for the gym QR code, removed in build 195.) */
  max-height: 90vh;
  overflow-y: auto;
}

.info-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  /* Build 162: room for the ✕ at the right. */
  padding-right: 52px;
}

/* Build 162 (dls 2026-10-19: "an x in the upper right to cancel"): the
   task form's close button, in the card's upper right corner. */
.info-card {
  position: relative;
}

.info-x {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* pre-line keeps any line breaks written into the explanation. */
.info-text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-line;
}

.info-close {
  width: 100%;
}

/* Build 152: a web address made clickable (links.js), on the task page's
   previews and the report: the standard link blue, underlined, and
   allowed to break anywhere so a long address never widens the page. */
.text-link {
  color: #1a0dab;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* Under the note and the Link field: the clickable preview as it is
   typed; "Not a web address yet" in gray. */
.link-preview {
  margin: 4px 0 12px;
  /* Build 156: the note's preview keeps its line breaks too. */
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.link-preview--bad {
  color: var(--faint);
}

/* The report's "Link: https://..." under a task's comment (black label,
   the address in link blue). */
.rpt-proof-link {
  margin: 0 16px 10px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.rpt-proof-link-label {
  font-weight: 700;
}

/* Build 139: [[green]], [[yellow]], [[red]] in an explanation (app.js
   appendInfoRun): a bold check mark in the app's own green, yellow and
   red, the same colors as the task page's boxes and the report's marks. */
.info-check {
  font-weight: 700;
}

.info-check--green {
  color: var(--green);
}

.info-check--yellow {
  color: var(--yellow);
}

.info-check--red {
  color: var(--red);
}

.overlay-body {
  display: block;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.text-input {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  /* 16px or more stops iOS Safari from zooming in when the field is
     focused, which would otherwise shift the whole layout. */
  font-size: 17px;
}

.text-input:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

/* Build 156 (dls 2026-10-18: "a multi-line text entry box for the task
   description. Four lines and the height of that box will have to
   increase"): the note is four lines tall: 4 lines of 1.4 x 17px plus the
   padding. Longer notes scroll inside it; it can be dragged taller.
   font-family inherit: a textarea otherwise uses the browser's own
   (often monospaced) font. */
.text-input--note {
  height: calc(4 * 1.4 * 17px + 20px);
  line-height: 1.4;
  font-family: inherit;
  resize: vertical;
}

.overlay-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  /* Build 190: Cancel lines up with Save when the note sits over Save. */
  align-items: flex-end;
}

/* Build 190: Save and the red "(Unsaved Changes)" note over it, centered
   on the button with a little white space between. Cancel and this column
   share the row equally, so the note never changes the buttons' widths. */
.overlay-actions > .secondary-btn,
.save-col {
  flex: 1 1 0;
  min-width: 0;
}

.save-col .primary-btn {
  width: 100%;
}

.unsaved-note {
  display: block;
  margin: 0 0 8px;
  text-align: center;
}

.primary-btn,
.secondary-btn {
  flex: 1 1 auto;
  min-height: var(--tap);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.primary-btn {
  border: 1px solid var(--green);
  background: var(--green);
  color: #ffffff;
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Build 153 (dls 2026-10-18: "The save button on a task should be Gray if
   there's nothing typed and no images"): a disabled Save is plain gray
   (30% gray of the darkness scale, build 106), not a faded green. */
#detail-save:disabled {
  border-color: #ababab;
  background: #ababab;
  opacity: 1;
}

.secondary-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

/* The <label> that opens the photo picker is styled as a button, so
   it needs the block layout a real button would have. */
.file-label {
  display: block;
  margin-top: 16px;
}

/* "Take photo" and "Add photos" side by side (build 005). Two equal
   halves so neither looks like the secondary choice. */
.photo-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.photo-buttons .file-label {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0;
}

/* Build 323 (SPEC-V1.md "Photo Not Required under Add photos"): the red
   "Photo Not Required" under Add photos, for a task that needs no photo.
   The row copies .photo-buttons: two equal halves (flex: 1 1 0) and the
   same 10px gap, so the left half has exactly the width of Add photos and
   its centered words sit under that button. 6px under the buttons, so the
   words read as belonging to them. */
.photo-hints {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* ALWAYS ONE LINE TALL (height, not min-height): while the form expects a
   photo, app.js writes no words here, and the empty line still takes its
   20px, so Mark Complete below (its own 18px top margin, unchanged) sits
   at the same place on every task instead of jumping between tasks.
   nowrap keeps the words on that one line. WHY 15px fits: the words
   measure 134px at 15px in the iPhone's system font (CoreText, 2026-11-23;
   Roboto and Arial are narrower), and on a 320px phone each half is 139px
   (the card's 288px inside its 16px padding, less the 10px gap, halved).
   Red is --red, the red of the form's "(Unsaved Changes)"; normal weight
   and the 15px of the form's other notes (.progress-note). */
.photo-hint {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  height: 20px;
  line-height: 20px;
  font-size: 15px;
  font-weight: 400;
  color: var(--red);
  text-align: center;
  white-space: nowrap;
}

.danger-outline {
  border-color: #e6c3c1;
  color: var(--red);
}

.complete-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  margin-top: 18px;
  font-size: 17px;
  cursor: pointer;
}

.complete-row input {
  width: 24px;
  height: 24px;
  accent-color: var(--green);
}

/* Build 196: held off (no photo and no words): gray, and not tappable. */
.complete-row.is-held {
  color: var(--muted);
  cursor: default;
}

.complete-row.is-held input {
  opacity: 0.45;
}

.progress-note {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.done-time {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--green-dark);
}

.view-desc {
  /* Build 156: a note written on several lines keeps its line breaks. */
  white-space: pre-line;
  margin: 0 0 14px;
  font-size: 17px;
  /* Descriptions are free text from a phone keyboard; a long word or
     a pasted URL must wrap rather than widen the page. */
  overflow-wrap: anywhere;
}

/* ── Thumbnails in the detail overlay ──────────────────────────── */

.thumb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Build 131: a tap opens it full screen (photo-viewer.js). */
  cursor: zoom-in;
}

/* Remove button on a staged (not yet uploaded) photo. Uploaded photos
   have no remove control: submissions are permanent by design. */
.thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 24, 28, 0.62);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
  padding: 4px;
}

.empty-note {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 15px;
}

/* Completed-task view: a thumbnail with the address it was taken at
   in small print underneath (build 005). Same width as the thumbnail
   so the grid stays tidy; long addresses wrap. */
.thumb-with-caption {
  width: 84px;
}

.thumb-caption {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--faint);
  overflow-wrap: anywhere;
}

/* ════════════════════════════════════════════════════════════════
   INSTALLABLE APP AND PHOTOS KEPT ON THE PHONE (build 018)
   ════════════════════════════════════════════════════════════════

   SPEC-V1.md REQ-APP-01 and REQ-SUB-02/03. Small, quiet additions:
   the install button and iPhone hint (both pages), the "uploads
   waiting" indicator, the "saved on phone" mark on a thumbnail, and
   the one-line status notes under a task's name. All of them are
   hidden with the `hidden` attribute until the scripts show them.
   ════════════════════════════════════════════════════════════════ */

/* The install bar itself has no box of its own: the spacing sits on
   the button and the hint, so the bar takes no room while both are
   hidden (which is most of the time). */

/* Install app (Android / Chrome). A real button with the app's
   accent, so it reads as an action, not as decoration. */
.install-btn {
  min-height: var(--tap);
  margin-bottom: 12px;
  padding: 0 16px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* "To add this as an app: tap Share, then Add to Home Screen."
   One line of help, with a close button that is remembered. */
.ios-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}

.ios-hint span {
  flex: 1 1 auto;
  min-width: 0;
}

.ios-hint-close {
  flex: none;
  min-width: var(--tap);
  min-height: var(--tap);
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 16px;
  cursor: pointer;
}

/* "2 uploads waiting": a full-width strip at the top of the page,
   amber like a "done but no photo yet" box, because it means the same
   kind of thing: saved, not yet confirmed. Tapping it retries. */
.outbox-btn {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid #ecd9a8;
  border-radius: var(--radius);
  background: #fdf6e3;
  color: #8a6510;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

/* At least one upload was refused by the server: red, because it
   will not go through on its own. */
.outbox-btn.is-refused {
  border-color: #f0cfcd;
  background: var(--red-soft);
  color: var(--red);
}

/* Build 283 (Instant Save): "2 saves uploading", nothing waiting or
   refused. Every Save shows this line for a moment while it goes up (the
   form has already closed), so it is quiet: thin, gray on the page, no
   amber. Amber stays for "waiting to upload", red for "not saved". */
.outbox-btn.is-uploading {
  min-height: 0;
  padding: 4px 12px;
  border-color: var(--line);
  background: transparent;
  color: var(--faint);
  font-size: 13px;
  font-weight: 400;
}

/* "saved on phone" (and "waiting to upload") along the bottom of a
   thumbnail. Dark translucent strip so it reads on any photo. */
/* Build 225: an uploaded photo marked for removal, until Save: faded,
   with a red ✕ through it (a tap on the photo still shows it). */
.thumb--removing img {
  opacity: 0.45;
}

.thumb-removing-x {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.thumb-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 3px;
  background: rgba(22, 24, 28, 0.62);
  color: #ffffff;
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}

/* The small lines under a task's name: "saved on phone, waiting to
   upload", "2 photos not uploaded". Each on its own line. */
.row-note {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--faint);
}

.row-note--waiting,
.row-note--draft {
  color: #8a6510;
}

.row-note--failed {
  color: var(--red);
}

/* Build 283 (Instant Save): "Uploading 2 of 3" and "Saving..." under a
   task done a moment ago whose Save is still going up. Quiet: the row's
   check already says it is done; this only says the server does not have
   it yet. The plain faint gray of .row-note, in italics so it reads as
   "in progress" next to the amber "waiting" and red "not saved". */
.row-note--uploading {
  font-style: italic;
}

/* Build 283: a refused Save's box in the task form (#detail-refused): the
   red box of .storage-warning, its two buttons side by side, each half. */
.refused-box {
  margin-bottom: 4px;
}

.refused-actions {
  display: flex;
  gap: 10px;
}

.refused-actions .secondary-btn {
  flex: 1 1 0;
  width: auto;
}

/* ── Next feature build ("019" in discussion) ──────────────────── */

/* REQ-CAP-01: "Supabase: 455/3023 photos", one small dim line at the
   very top of both pages. A reminder, not content, so it is quiet. */
/* REQ-CAP-01, build 071: the Supabase pic count, always right after a
   build number, in that build number's small gray print (dls: "Same small
   gray font"), with a dot between the two: in the build footer on the
   task page (build-check.js moves it there), and on the report's second
   line. While hidden (no answer yet, or the call failed), the browser's
   [hidden] rule hides the dot with it. */
.capacity-line {
  font: inherit;
  color: inherit;
}

.capacity-line::before {
  content: ' \00B7  ';
}

/* REQ-SUB-05: "Offline, list from 9:14 AM". Amber like the uploads
   strip: the list is real but not fresh. A tap retries. */
.offline-bar {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid #ecd9a8;
  border-radius: var(--radius);
  background: #fdf6e3;
  color: #8a6510;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
}

/* REQ-SUB-06: a photo the phone could not store. Red, because it is
   not safe yet; the Upload now button sits under the sentence. */
.storage-warning {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #f0cfcd;
  border-radius: var(--radius);
  background: var(--red-soft);
}

.storage-warning-text {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 15px;
}

.storage-warning .secondary-btn {
  width: 100%;
}

/* REQ-SUB-14: the one-time note about the Downloads copy. */
.download-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* REQ-SUB-09: the "NOT UPLOADED YET" section at the top of the list.
   Each waiting task is a tappable row, plus (for a refused upload) its
   Try again and Discard buttons beside it. Build 332: a draft's own
   Discard (.pending-discard-draft) sits in the same .pending-actions. */
.task-section--pending .section-title {
  color: #8a6510;
}

.pending-item {
  border-bottom: 1px solid var(--line);
}

.pending-row {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 10px 6px;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.pending-row:active {
  background: var(--card);
}

.pending-title {
  display: block;
  font-size: 17px;
  /* A long task name wraps instead of widening the page. */
  overflow-wrap: anywhere;
}

.pending-actions {
  display: flex;
  gap: 10px;
  padding: 0 6px 10px;
}

/* ════════════════════════════════════════════════════════════════
   REPORT PAGE (manager, read only), build 010 layout
   ════════════════════════════════════════════════════════════════

   SPEC-V1.md "Stipend Report: periods and layout", design note
   "Revised layout (dls 2026-10-15, build 010)". Everything here hangs
   off body.report-page, so the participant page that shares this
   file is untouched.

   WHAT STICKS. Three things:
     1. the REPORT LINE (.rpt-line0) at the very top of the screen;
     2. the current DAY HEADER (.rpt-dayhead) right under it;
     3. the CURRENT ITEM's heading (.rpt-item, build 011) right under
        the day header's summary, until the next item's heading
        pushes it off. Exactly one at a time.
   Build 293: and a fourth, above them in the page: the AZM Report's
   "AZM REPORT" band (.azm-rpt-band), at the very top while the AZM
   Report is scrolled, as the report line is for the Stipend Report.
   The top block (title, build number, controls) scrolls away.

   THE SUMMARY. Each day header carries a summary of EVERY task of
   the day (.rpt-summary, filled by report.js; build 039), with a
   blue rectangle on where the reader is. It never grows while
   scrolling, so it sits in the page flow inside the day header box,
   on the same background as the day line: one box.

   FIXED HEIGHTS. The day header's `top` is the report line's height,
   and report.js needs both heights to land a tapped line exactly in
   place, so both are fixed here as custom properties and report.js
   reads the same variables. Change a height here and the taps follow.
   ════════════════════════════════════════════════════════════════ */

.report-page {
  /* report line: its blue part, 64px (two 24px rows, title + clock and
     period + Go To Top, with a 4px gap, centered; build 099), plus its card
     foot since build 102: 7px white (--rpt-card-gap) and the 1px gray line
     (--rpt-card-line). 72px in all. (Build 098 made it 64px; 44px before.)
     Build 125 (dls 2026-10-17: "I want the stipend report section header.
     Taller"): the blue part 72px (two 26px rows), 80px in all.
     A plain number, not calc(), because report.js reads it. */
  --rpt-h-report: 80px;
  --rpt-h-day: 40px;     /* day line: one row of 16px text */
  /* THE CARD (build 102, dls 2026-10-17: "a card is its typical area, the
     blue area, plus some white space under it, plus a gray line. That's
     all that any card is. I'm talking about the seven pixels"). Every
     sticky header is a card: the report line ("the stipend report bar is
     considered to be a card as well"), the day header and each item
     heading. Under its blue: --rpt-card-gap of white, then a
     --rpt-card-line gray line; what scrolls by disappears under the line,
     and the next card pushes the whole card off. (Build 101 put the 7px
     white strip on TOP of the headers instead.) The 7px: "bring that gray
     line down about halfway", half the 14px the old line sat above the
     next heading. CSS pixels, which every phone scales, so it looks the
     same size on every phone ("based on like, absolute size"). report.js
     reads both, for the taps and the summary's rectangle.
     HOW the white is drawn: a background that is white in its bottom 7px
     and blue above (a two-color gradient with one hard edge), over 7px of
     extra bottom padding, so the white takes real room and the card's
     text stays in the blue. Not a box-shadow: the photo-link pulse
     animates the item heading's box-shadow and would wipe it out. */
  --rpt-card-gap: 7px;
  --rpt-card-line: 1px;
  /* The line's color. Build 103 made every card's line black ("Let's try
     making that gray line black"); build 104 (dls 2026-10-17: "I only want
     the task lines to be black. I want the other lines to be gray"): the
     report line's and the day card's lines are the light --line gray, the
     task cards' (.rpt-item) black. Build 105 (dls: "I want those task lines
     to be dark gray"): #555555. Build 106 (dls: "let's try 53%, all
     sevens"): #777777, 53% dark by the color code and 50% by perceived
     darkness (100 minus CIE L*): it looks halfway between white and black.
     Build 107 (dls: "30%"): #ababab, 30% by perceived darkness (the scale
     in SPEC-V1.md build 106). */
  --rpt-card-line-color: var(--line);
  --rpt-task-line-color: #ababab;
}

/* Build 126 (dls 2026-10-17: "anything longer than "This Stipend Month:
   Fri Oct 16 to Today" we can put the date range on the next line"): when
   the period text is too wide to sit beside Go To Top, report.js puts its
   dates on a third row and sets this class on <body>. The line grows by
   that row (26px) and one more 4px gap between rows: 72 + 30 = 102px of
   blue, 110px with the card's foot. Everything that sits under the line
   (the day header's `top`, the item heading's `top`, report.js's tap
   math) reads --rpt-h-report, so it all follows. A plain number, not
   calc(), because report.js reads it. */
.report-page.rpt-range-split {
  --rpt-h-report: 110px;
}

/* position: sticky needs the VIEWPORT to be the scrolling box. The
   shared rule above puts overflow-x: hidden on body, which turns body
   into its own (never scrolling) scroll box and silently disables
   sticky. On this page body uses `clip` instead, which clips without
   becoming a scroll box (browsers that do not know `clip` keep
   `visible`). The html element's overflow-x: hidden still applies to
   the viewport, so the page still never scrolls sideways. */
body.report-page {
  overflow-x: visible;
  overflow-x: clip;
}

/* ── Top block (scrolls away) ──────────────────────────────────── */

/* "My tasks": a participant's way back to their own page from the
   shared report (REQ-RPT-17). Hidden for the manager. Since build 072 it
   is a .rpt-top-btn under "Income history report" (see
   .report-head-buttons). */

/* The title. Not sticky: once the reader scrolls into the report, the
   report line below takes over. Since build 071 the build number is on
   the line under it (.report-subline). */
.report-title {
  margin: 0;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Controls (these scroll away) ──────────────────────────────── */

.controls {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 22px;
  background: var(--card);
}

.control-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* A label and its <select> on one line. */
/* REQ-RPT-19: the note just under the controls box, in the normal text
   color (dls, build 065: "just under the control area not inside the
   control box", "normal black").
   WHY the negative top margin: the box above keeps its 22px bottom
   margin for when it stands alone, and the two margins collapse into
   one, so -12px leaves a 10px gap: close enough to read as belonging
   to the controls. Below it, 34px of white space before the report
   line (build 066, dls: "a little more white space under it"; was 22px). */
.controls-note {
  margin: -12px 0 34px;
  padding: 0 4px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

/* The note belongs to the controls: when they are hidden (no key or no
   config yet, see report.html), it is hidden too, with no script. */
.controls[hidden] + .controls-note {
  display: none;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.control-row .control-label {
  flex: 0 0 64px;
  margin: 0;
}

.control-select {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  /* 16px or more stops iOS Safari zooming in on focus. */
  font-size: 16px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

/* ── Build 340: the filters in three groups (SPEC-V1.md REQ-OPEN-17 to 21)
   dls 2026-11-27 16:19, "the organization fix": PEOPLE, ALSO SHOW and
   TASKS, each under its small gray heading (.control-label, the PERIOD /
   DATE ORDER look). Inside a group the rows stand close together (each is
   already a full tap tall), and a group ends with the same 12px as the
   rows above it. */
.filter-group {
  margin-bottom: 12px;
}

.filter-group > .control-label {
  margin-bottom: 2px;
}

.filter-group .control-row {
  margin-bottom: 0;
}

/* PEOPLE: two equal columns, filled row by row (David, Michelle, then
   Katrina, Pam), so the names stand in straight columns and never wrap
   into a ragged row. minmax(0, 1fr): a long name wraps inside its own
   column instead of widening it. */
.filter-row--people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

/* One box and its words. Build 340: the words as a sentence writes them,
   at normal weight (until build 340 every box was in capitals, "SHOW [x]
   DAVID", per the first mock); only the group headings are in capitals. */
.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
  text-transform: none;
}

/* Build 340: every box exactly 22px whatever its words: flex none, so a
   long label can never squeeze it, and no margin, so each box starts at
   the same place. */
.filter-check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
}

/* The words beside the box: they take the room left and wrap there, under
   themselves (never under the box), so nothing pushes the row past a
   320px screen. */
.filter-check-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* "(8)" after a kind's words: how many task lines its list holds. */
.filter-count {
  color: var(--muted);
}

/* A kind's row (TASKS): its box and words, then "Show list" at the right
   on the same row. The words give way first (they wrap), the link never
   does. */
.filter-cat .filter-check {
  flex: 1 1 auto;
  min-width: 0;
}

/* Build 308 (dls 2026-11-20): the tasks under each include-box ("Include
   stipend tasks", "Include non-stipend tasks", "My Private Tasks"), one box
   per task, indented as subheadings of their box (report.js
   drawTaskList).
   WHY 30px in: the include-box's own box (22px) plus its gap (8px), so
   each task's box stands under the first letter of the include-box's
   words, the usual look of a list that belongs to the line above it.
   WHY -6px on top: the include-box's row keeps its 12px bottom margin
   for when it stands alone; pulled up, the list reads as part of it.
   Build 340: in the TASKS group the rows have no bottom margin, so the
   list starts right under its row and ends with 6px before the next. */
.task-filters {
  margin: -6px 0 12px 30px;
}

.filter-group .task-filters {
  margin: 0 0 6px 30px;
}

.task-filters-list {
  display: flex;
  flex-direction: column;
}

/* A task's box: the include-box's look, a little smaller, and the task's
   name as the report writes it (until build 340 the include-boxes and the
   people were upper case, and a task name in capitals would have read as
   one more heading; since build 340 every box's words are as written).
   36px tall: still an easy tap, and a list of eight is not a wall.
   Build 325: one look in every state. The grayed look a line had while
   its include-box was unticked (.task-check--off) is gone, because every
   line now stays tappable (report.js drawTaskList). */
.task-check {
  min-height: 36px;
  font-size: 16px;
  text-transform: none;
}

/* Build 322 (SPEC-V1.md "Report filters: one line per name"): a line that
   stands for several people's tasks of the same name ("Check Kitchen
   Trash") names them on a small gray line under its name ("David,
   Michelle"; report.js taskLinePeopleText).
   WHY wrap: the people line is the label's third child, so a tap on it
   ticks the line too; wrapping puts it on a row of its own.
   WHY row-gap 0: the label's 8px gap is for the space between box and
   name; between the name and its people line it would float apart.
   WHY 30px in: the same 22px box plus 8px gap as the list itself, so
   the people stand under the first letter of the task's name.
   WHY the name gets flex 1 1 0 here: in a wrapping row a long name would
   otherwise drop to a row of its own under the box; this keeps it beside
   the box, wrapping inside its own space as it does on every other line. */
.task-check--people {
  flex-wrap: wrap;
  row-gap: 0;
}

.task-check--people .task-check-name {
  flex: 1 1 0;
  min-width: 0;
}

.task-check-people {
  flex-basis: 100%;
  padding-left: 30px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}

/* "Show list" / "Hide list" (build 340; until then "Show tasks (12)" above
   a list of more than eight tasks): every kind's list starts folded behind
   this small link-like button at the right of its row, so the panel reads
   as three short groups. The same plain link look as "Press for Info"
   (.info-link). flex none: it never shrinks or wraps. */
.task-filters-fold {
  display: block;
  flex: none;
  min-height: 36px;
  padding: 4px 0;
  border: none;
  background: none;
  color: #1a0dab;
  font: inherit;
  font-size: 15px;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.date-input {
  flex: 1 1 130px;
  min-width: 0;
  min-height: var(--tap);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}

.date-sep {
  color: var(--muted);
  font-size: 15px;
}

/* ── Our own date-range calendar (build 217) ──────────────────────
   dls 2026-10-25: "[date] to [date] and then have a single calendar
   icon"; "card in middle, screen dimmed"; weeks Saturday to Friday, a
   tab before each week that picks the whole week, a rectangle round the
   week picked. */
.range-btn {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--tap);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.range-btn[hidden] {
  display: none;
}

.range-icon {
  flex: none;
  color: var(--icon-blue);
}

.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}

.cal-modal[hidden] {
  display: none;
}

.cal-card {
  width: 100%;
  max-width: 380px;
  max-height: calc(100% - 8px);
  overflow-y: auto;
  padding: 14px 12px 12px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.cal-heading {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.cal-title {
  font-size: 16px;
  font-weight: 700;
}

.cal-nav {
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--icon-blue);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* One row: the week's tab, then Saturday ... Friday. Build 221: no gaps
   between the days or between the weeks, so the chosen days' edges (the
   outline, see .cal-edge-*) join into one unbroken line; the tab keeps
   its own space with a margin. */
.cal-row {
  display: grid;
  grid-template-columns: 30px repeat(7, 1fr);
  align-items: center;
  gap: 0;
}

.cal-dow-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* A finger dragging across the days chooses a range; it must never
   scroll the page instead. */
.cal-grid {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.cal-week {
  margin: 0;
}

.cal-tab {
  height: 34px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #eef1f4;
  color: var(--icon-blue);
  font-size: 13px;
  cursor: pointer;
}

/* The week picked by its tab: the tab lit. The outline round its days is
   the rectangle (dls: "the selected week will have a rectangle around
   it"); until build 221 it was a box round the whole row. */
.cal-week--selected .cal-tab {
  background: var(--icon-blue);
  color: #ffffff;
}

/* Square, touching days with a 2px border that is clear until it is part
   of the outline, so the outline never moves anything. */
.cal-day {
  box-sizing: border-box;
  height: 38px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}

/* Build 221: the outline round the chosen days (calendar.js paint). */
.cal-day.cal-edge-t {
  border-top-color: var(--icon-blue);
}

.cal-day.cal-edge-b {
  border-bottom-color: var(--icon-blue);
}

.cal-day.cal-edge-l {
  border-left-color: var(--icon-blue);
}

.cal-day.cal-edge-r {
  border-right-color: var(--icon-blue);
}

/* Days of the months around, and days after today: lighter. */
.cal-day--other,
.cal-day--future {
  color: #a7adb5;
}

.cal-day--today {
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-weight: 700;
}

.cal-day--inrange {
  background: var(--green-soft);
}

.cal-day--end {
  background: var(--green);
  color: #ffffff;
  font-weight: 700;
}

.cal-range {
  margin: 10px 0 2px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.cal-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.cal-actions {
  display: flex;
  gap: 10px;
}

.cal-btn {
  flex: 1 1 0;
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.cal-btn--done {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

/* ── Report line (sticky at the very top) ──────────────────────── */

/* "STIPEND REPORT", the period's dates, and the date order. It sits
   in the page flow right after the controls and sticks once they have
   scrolled away. z-index above the whole stream (the stream is its
   own stacking context, see .rpt-stream), below the error banner and
   the map pop-up. */
.rpt-line0 {
  position: sticky;
  top: 0;
  z-index: 40;
  /* Build 099: two rows stacked (title + clock; period + Go To Top),
     centered in the fixed height. */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 4px;
  height: var(--rpt-h-report);
  overflow: hidden;
  /* Full width of the screen: cancel the page's 16px side padding. The
     bottom padding is the card's white (build 102, see --rpt-card-gap). */
  margin: 0 -16px;
  padding: 0 16px var(--rpt-card-gap);
  /* Build 093 (dls 2026-10-17: "the bar below that also says stipend
     report ... the word stipend report, white, the background. That same
     dark blue"): the top section's blue, white text. Build 102: a card,
     so its bottom 7px is white and a gray line closes it. */
  background: linear-gradient(to top, var(--bg) var(--rpt-card-gap), var(--icon-blue) var(--rpt-card-gap));
  background-clip: padding-box;
  border-bottom: var(--rpt-card-line) solid var(--rpt-card-line-color);
  color: #ffffff;
  /* Build 066 (dls: "a gray line above the stipend report header"). WHY a
     shadow and not a border: a shadow takes no room, so the line's 1px
     never moves the page. While the header is stuck at the top of the
     screen, it sits 1px off the top edge, out of sight. (The line under
     it is the card's own line since build 102: the border-bottom.) */
  box-shadow: 0 -1px 0 var(--line);
  cursor: pointer;
}

/* Each row (build 099): text at the left that gives way ("..." on a narrow
   phone), and at the right a piece that never shrinks: the clock on row
   1, Go To Top on row 2 (dls: "right justified ... very similar to the
   placement of the copy link button"). */
.rpt-line0-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  /* 26px since build 125 (was 24), room for the larger period text. */
  height: 26px;
}

.rpt-line0-title,
.rpt-line0-range {
  flex: 1 1 auto;
  min-width: 0;
}

.rpt-line0-title,
.rpt-line0-range,
.rpt-line0-clock {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The ticking date and time (build 098), right of the title since build
   099, white like the period. tabular-nums gives every digit the same
   width, so nothing shifts sideways each second as the digits change. */
.rpt-line0-clock {
  flex: 0 0 auto;
  line-height: 18px;
  font-size: 14px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.rpt-line0-title {
  height: 22px;
  line-height: 22px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rpt-line0-range {
  /* Build 125 (dls: "the part that says today colon Saturday, October
     17th, I want that bigger ... Probably the size of what stipend report
     is right now"): STIPEND REPORT's 16px bold (without its letter
     spacing, which suits capitals only). Was 14px regular. */
  height: 22px;
  line-height: 22px;
  font-size: 16px;
  font-weight: 700;
  /* Build 093 (dls: "the actual from and to text. Can be white"). Was
     the muted gray on white. */
  color: #ffffff;
}

/* "Go To Top" (build 096; "Date ↑" / "Date ↓" before, REQ-RPT-15). Display only: pointer-events none
   so a tap on it is simply a tap on the report line (back to top).
   Build 093 (dls 2026-10-17: "that date button should be made the same
   styling as the copy link button"): Copy Link's pill (.rpt-copy-link),
   small black text on the blue-gray #c8d7e0. Was gray text in a gray
   outlined box. */
.order-indicator {
  flex: 0 0 auto;
  /* Build 094: as wide as Copy Link (see --small-pill-width). */
  box-sizing: border-box;
  min-width: var(--small-pill-width);
  text-align: center;
  padding: 2px 8px;
  border: 0;
  border-radius: 999px;
  background: #c8d7e0;
  color: #000000;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

/* ── The stream ────────────────────────────────────────────────── */

/* Full screen width (the design note asks for full-width photos), so
   the stream cancels the page's side padding and every text row below
   puts its own 16px back.

   position: relative + z-index: 0 make the stream its own stacking
   context. report.js gives each day header a z-index that grows down
   the page (2, 3, 4...; the item headings sit at 1, under every day
   header), and a long custom range can have hundreds of
   day sections; inside this context those numbers can never climb
   above the report line, the error banner or the map pop-up. */
.rpt-stream {
  position: relative;
  z-index: 0;
  margin: 0 -16px;
}

/* One participant on one date. `overflow: clip` cuts off anything
   hanging below the section's end, which is what makes the hand-off
   clean: as the next day's header rises, it eats this day's summary
   from the bottom up instead of the summary sliding over the next
   day's first item. `clip` (unlike `hidden`) does not make the
   section a scroll box, so the day header inside still sticks to the
   screen. Browsers that do not know `clip` show the overhang, which
   the next header's higher z-index then covers.

   The same clip ends the current item's heading cleanly (build 011):
   the last item's box ends where the section ends, so its stuck
   heading is carried up with the section, under the day header, and
   never past the section's bottom.

   report.js writes --summary-h on each section (the height of its
   summary, 0px when empty); the item headings inside inherit it. */
.rpt-day {
  overflow: clip;
}

/* ── Day header (sticky under the report line) ─────────────────── */

/* The box that sticks: the day line, then the summary of EVERY item
   of the day (build 039, dls 2026-10-15), both in the page flow. The
   summary no longer grows while scrolling, so it no longer needs to
   hang out of the flow (builds 010 to 028 did that so its growth never
   moved the photos). z-index is set inline by report.js (2 + the
   section's number, so it is always above the item headings at 1). */
.rpt-dayhead {
  position: sticky;
  top: var(--rpt-h-report);
  /* Baby blue like the item heading bars (dls 2026-10-15: "I want that
     heading to also have the baby blue background"); was light gray.
     The summary is inside this box, so it shares the color. Build 102: a
     card (see --rpt-card-gap): 7px of white under the summary, then the
     gray line; the item content scrolls under that line. (Until then a
     thin #c9ced4 shadow line sat right under the summary.) */
  padding-bottom: var(--rpt-card-gap);
  /* Build 157: black, on every day (see "The day headers"). Build 159 (dls
     2026-10-18: "Let's try the background to be dark gray so 75% black"):
     #3b3b3b, 75% dark on the perceived darkness scale used for the card
     lines (100 minus CIE L*, build 106). Build 160 (dls: "85%"): #262626. */
  background: linear-gradient(to top, var(--bg) var(--rpt-card-gap), #262626 var(--rpt-card-gap));
  background-clip: padding-box;
  border-bottom: var(--rpt-card-line) solid var(--rpt-card-line-color);
}

/* "✗ Thursday, October 15th, 2026 · DAVID". One row; tapping it
   jumps to the start of this day. */
.rpt-dayline {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--rpt-h-day);
  padding: 0 16px;
  /* Build 157: white on the black day header (see "The day headers"). */
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

/* On a narrow phone the date gives way ("Wednesday, September 30th,
   20...") and the name never does. */
.rpt-dayline-date {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rpt-dayline-who {
  flex: 0 0 auto;
  white-space: pre; /* keeps the space before the "·" */
}

/* The summary: "✓ Clean Room 1  ✓ Clean Room 2  ✗ Healthy Meal",
   every item of the day (build 039). Under the day line, inside the
   same box and on the same background. Wraps to as many rows as it
   needs (dls: never so many items that a limit matters); its height
   is measured by report.js and written to --summary-h. */
.rpt-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  padding: 0 16px 6px;
  font-size: 15px;
  line-height: 26px;
}

/* One entry; tapping it jumps to that item. Never split across two
   rows; a name too long for the screen is shortened with "...". */
.rpt-summary-entry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  /* Build 157: white on the black day header (see "The day headers"). */
  color: #ffffff;
  cursor: pointer;
}

/* Build 215: "Completed Early", a row of its own in the summary: white on
   the black header, at the left edge where the marks above start, with a
   gray line just above the words and exactly as wide as they are (the
   label's own top border, so it starts and stops with the wording). */
.rpt-summary-early {
  flex: 0 0 100%;
  /* dls 2026-10-25: "left justified to line up under the green checkmarks
     above it as well the gray line": no indent of its own, so the words
     and the line start where the first mark of each row starts. */
  text-align: left;
  color: #ffffff;
  line-height: 20px;
  padding-top: 4px;
}

.rpt-summary-early-label {
  display: inline-block;
  border-top: 1px solid #9a9a9a;
  padding-top: 2px;
  font-size: 14px;
  font-weight: 700;
}

/* The box the current-place rectangle is drawn on (build 039): the
   mark and the task name, plus the photo numbers it covers ("Car Clean
   1 2" on the second photo). 4px of padding each side, taken back by
   the margins, so moving a number in or out never moves the text. */
.rpt-summary-part {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 4px;
  margin: 0 -4px;
  border-radius: 4px;
}

/* Where the reader is (dls 2026-10-15): "a blue rectangle around car
   clean one", stretching "out to the next image and the next image".
   An inset shadow takes no room, so it never shifts anything. The
   app's blue. */
.rpt-summary-part--current {
  /* Build 157 made it baby blue for the black day header; build 158 (dls
     2026-10-18: "Let's try the highlight to be the dark blue for the
     rectangle"): the app's blue again. */
  box-shadow: inset 0 0 0 2px var(--icon-blue);
}

.rpt-summary-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpt-summary-entry--missing {
  color: var(--red);
}

.rpt-summary-entry--pending {
  color: var(--muted);
}

/* ── The day headers (build 157) ──────────────────────────────────
   dls 2026-10-18: "background is black ... I just don't want to fade to
   the baby blue. Then we will also need to change the highlight rectangle
   from dark blue to baby Blue. Of course the text the white text stays
   white. The gray text however will need to be a lighter gray ... halfway
   between what it is now and white. So it will just remain that it's a
   static styling no longer fading and it will be the same for every header
   ... the tasks themselves remain the baby blue background no change to
   them." Every day header (date line and summary) is black with white
   text, always; the not-yet-due gray is lightened for the black (the
   entries and their "–" marks); red and the colored marks keep their
   colors; the "you are here" rectangle is baby blue. Builds 141 to 147
   drew only the coming day this way and faded it to the baby blue. */
.rpt-dayhead .rpt-summary-entry--pending {
  /* Halfway between the old grays (#6d7480 text, #9aa1ab marks) and white.
     Build 282: the entries' words only; the "–" marks it also lightened
     are now empty boxes, never gray. */
  color: #b6bac0;
}

/* ── Item headings (sticky inside their item box, build 011) ────── */

/* "✓ Clean Room 2", one per photo (or one per task with no photos).

   Each item is a box (.rpt-itembox, no styling of its own) holding
   its heading and its content. The heading is sticky INSIDE that box:
   once it reaches the bottom of the day header's summary it stays
   there while its photo scrolls under it, and when the box ends (the
   next item's heading arrives) it is carried off. That is the push
   dls described: exactly one stuck heading at a time, with no code.
   The item box must never get an overflow rule: hidden or auto would
   make it a scroll box and silently stop the sticking.

   top: the report line, plus the day line, plus the summary's height
   (--summary-h, written on the day section by report.js once measured;
   0px when there is none). So the heading sits right under the
   summary.

   z-index 1: above the photos scrolling under it, and below every day
   header (report.js numbers those from 2), so a heading being pushed
   up slides under the summary and the day line rather than over them.
   The background is opaque so the photo under it never shows through.

   The summary lists every item of the day (build 039); the stuck
   heading's item has the blue rectangle there, and --summary-h is the
   summary's full height. */
.rpt-item {
  position: sticky;
  /* Under the stuck day card: the report line, the day line, the summary,
     and the day card's foot (build 102: its white, then its line). */
  top: calc(var(--rpt-h-report) + var(--rpt-h-day) + var(--summary-h, 0px) + var(--rpt-card-gap) + var(--rpt-card-line));
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  /* The card's foot is inside this height (border-box), so it is added
     here: the blue part stays as tall as before. */
  min-height: calc(var(--tap) + var(--rpt-card-gap));
  /* Build 102: the bottom padding holds the card's 7px of white too. */
  padding: 8px 16px calc(8px + var(--rpt-card-gap));
  /* Baby blue (dls 2026-10-15), opaque, so a photo scrolling under a
     stuck heading never shows through. Build 102 (dls 2026-10-17: "I
     don't like the images scrolling up right up underneath the cards. I
     want there to be some white space under the card and then another
     gray line, and then the images will scroll up underneath that gray
     line"): a card (see --rpt-card-gap), blue, then 7px of white, then
     the gray line. Until build 101 a thin #c9ced4 edge sat right under
     the blue. */
  /* Build 144: always the baby blue again (builds 141 and 142 painted the
     item headings of an upcoming day too). */
  background: linear-gradient(to top, var(--bg) var(--rpt-card-gap), var(--baby-blue) var(--rpt-card-gap));
  background-clip: padding-box;
  /* 30% gray (#ababab, build 107; black in 104, #555555 in 105, #777777 in
     106): only the task cards' lines. */
  border-bottom: var(--rpt-card-line) solid var(--rpt-task-line-color);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.rpt-item-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Build 218: a task completed before its due date starts its heading with
   a line of its own, "Completed Early"; the mark, the name and Copy Link
   follow on the next line as usual. Only these headings wrap, and their
   text starts from no width (flex-basis 0), so a long name still shrinks
   beside Copy Link instead of pushing it onto a line of its own. */
.rpt-item--early {
  flex-wrap: wrap;
  row-gap: 2px;
}

.rpt-item--early .rpt-item-text {
  flex-basis: 0;
}

.rpt-item-early {
  flex: 0 0 100%;
  font-size: 14px;
  /* Build 222 (dls 2026-10-25: "The words completed early on the task
     heading should be bold just like the font in the main summary
     heading"): both were weight 700, but dark words on the light blue bar
     read thinner than white words on the black header, so this one is a
     step heavier to look the same. Build 223 (dls: "bump it up one more to
     900"): 900. */
  font-weight: 900;
  line-height: 18px;
}

/* REQ-RPT-20: the "Copy Link" button at the BOTTOM RIGHT of a photo's
   heading bar (dls 2026-10-16: "Bottom right of section header"): last in
   the row, pushed down to the bar's bottom edge, its words on one line.
   Build 070 (dls): a button with round end caps, tight top and bottom,
   small black text, on a darker, grayer version of the bar's baby blue:
   the same hue (203 degrees), saturation 14% -> 11%, value 98% -> 88%,
   which is #c8d7e0 (the bar's #d6ecfa is 203/14/98).
   WHY the ::after: the button is small, so an invisible full rectangle
   reaching 12px above and below it and 10px to each side takes the tap,
   without making the bar any taller. */
.rpt-copy-link {
  position: relative;
  flex: 0 0 auto;
  align-self: flex-end;
  box-sizing: border-box;
  min-width: var(--small-pill-width);
  text-align: center;
  padding: 2px 8px;
  border: 0;
  border-radius: 999px;
  background: #c8d7e0;
  color: #000000;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.rpt-copy-link::after {
  content: '';
  position: absolute;
  inset: -12px -10px;
}

/* Missing: red on gray (red is reserved for a deadline that has
   passed undone). */
.rpt-item--missing {
  color: var(--red);
}

/* Not yet due: neutral, nothing is judged. */
.rpt-item--pending {
  color: var(--muted);
}

/* " · due Fri Oct 16" on a weekly task shown early (REQ-RPT-11). */
.rpt-due {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}

/* (Build 339's OPEN NOW block, .rpt-open and its lines, stood here; build
   340 removed it at dls's word. The current tasks due after today are
   drawn as day blocks of the stream, with the day blocks' own classes:
   report.js buildOpenFutureSection.) */

/* "Taken THU October 15, 1:35 PM · uploaded" inside a photo's item
   heading: small and gray so it fits beside the label, and free to
   wrap under it on a narrow phone (dls 2026-10-15). */
.rpt-item-taken {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: normal;
}

/* Status marks. Build 282 (dls 2026-11-12: "The report will use the same
   styles. It will match."): each mark is the task page's own box
   (report.js buildMark, marks.js buildBox, the .checkbox block above), in
   the task's look: the stipend task's rounded box with a green outline,
   the non-stipend task's thin square, the event's calendar; ✓ drawn in
   it, "?" and ✗ laid over it, an empty box for not yet due. This span
   only holds the box and its spoken word; its class (rpt-mark--done,
   --late, --nophoto, --verylate, --missing, --pending) names the mark,
   and the colors are the box's.
   Until build 282 the marks were characters in these colors: ✓ green,
   yellow (late since build 089, no photo since 088) or red (very late,
   dls 2026-10-16), ✗ red, and a gray – (--faint) for not yet due, which
   is now the empty box. */
.rpt-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* On the report the box shows the bar behind it (the item headings'
   baby blue, the day header's dark gray) instead of the task page's
   white, so an outline in the header's white text color still shows. */
.rpt-mark .checkbox {
  background: transparent;
}

/* The dark day header (its day line and summary): the same looks,
   smaller. 20px is the width the report's marks have always had, so the
   summary keeps its 26px rows with room between them (a 26px box would
   touch the next row's) and wraps its entries as before. The square and
   the calendar keep their 2px inset (16px), the check and the "?" shrink
   to fit. The outline of an open non-stipend box or event is white, the
   header's text color (black would vanish on it). */
.rpt-dayhead .checkbox {
  --box-size: 20px;
  --box-radius: 5px;
  --check-size: 14px;
  --q-size: 13px;
  --event-q-size: 9px;
  --box-ink: #ffffff;
}

/* ── Under an item heading: photo, details, divider ────────────── */

/* White space between an item heading (or its comment) and what follows
   it (dls 2026-10-15: "We need white space between a header like healthy
   meal or car clean and the picture that follows the white space can be
   the same height as the header"). var(--tap) is the heading's own height
   (.rpt-item min-height; a heading only grows past it when its text
   wraps). A block of its own (.rpt-item-gap) so the comment can sit right
   under the heading, above it. Inside the item box, so the sticking is
   unchanged. */
.rpt-item-gap {
  height: var(--tap);
}

/* A participant's comment, after the white space under the heading and
   before the photo (dls 2026-10-16: "in
   red pure red ... we can put Michelle's comment and the colon ... in
   bold"). Pure red by his choice, although red elsewhere means missing;
   the bold "<Name>'s Comment:" says what it is. */
.rpt-comment {
  /* Below the white space and above the photo, with a little room
     before the photo. */
  padding: 0 16px 8px;
  /* Build 156: a note written on several lines keeps its line breaks. */
  white-space: pre-line;
  color: #ff0000;
  font-size: 16px;
}

.rpt-comment-label {
  font-weight: 700;
}

/* The photo's box. report.js sets aspect-ratio on it from the stored
   width and height (or 4 / 3 for older photos), so the box is the
   right size before the photo arrives. The gray shows until it does. */
.rpt-photo {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--card);
  /* A thin black border around every photo (dls 2026-10-16). Drawn as a
     1px shadow just outside the box: it takes no room, so the box keeps
     the photo's exact shape and nothing is cropped or bar-boxed. */
  box-shadow: 0 0 0 1px #000000;
}

/* REQ-RPT-20: the photo a link points at. Its border pulses blue THREE
   times (dls 2026-10-16: "three pulses of a blue border"), 0.6s each,
   around the usual thin black border. report.js PHOTO_HIGHLIGHT_MS
   (1800ms = 3 x 0.6s) must match. */
.rpt-photo.rpt-photo--linked,
.rpt-item.rpt-photo--linked {
  animation: rpt-photo-pulse 0.6s ease-in-out 3;
}

@keyframes rpt-photo-pulse {
  0%, 100% { box-shadow: 0 0 0 1px #000000; }
  50% { box-shadow: 0 0 0 1px #000000, 0 0 0 5px var(--icon-blue); }
}

/* A phone set to reduce motion gets a steady blue border for the same
   time instead of pulses. */
@media (prefers-reduced-motion: reduce) {
  .rpt-photo.rpt-photo--linked,
  .rpt-item.rpt-photo--linked {
    animation: none;
    box-shadow: 0 0 0 1px #000000, 0 0 0 5px var(--icon-blue);
  }
}

.rpt-photo-link {
  display: block;
  width: 100%;
  height: 100%;
}

/* Build 150 (dls 2026-10-18: "the images have a black border. i'd like the
   inside to unfade from white to opaque ... as the image is scrolling up
   from offscreen from the bottom initially it's just white and it becomes
   opaque as you scroll up"): a white veil over the inside of the box,
   its opacity --photo-veil (1 white .. 0 clear), set by report.js
   (fadeEnteringPhotos) from how much of the photo has risen above the
   bottom of the screen. The border is outside the box, so it always
   shows; taps pass through the veil to the photo. */
.rpt-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: var(--photo-veil, 0);
  pointer-events: none;
}

/* contain, not cover: the whole photo is evidence, nothing is cropped.
   When the box's shape is a guess (4:3) the photo gets gray bars. */
.rpt-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rpt-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--faint);
  font-size: 14px;
}

.rpt-details {
  padding: 8px 16px 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* The location line: "Uploaded from" / "Taken at" in plain black, then the
   address as a standard blue link (dls 2026-10-15), then any hint. A full
   44px row so the link is easy to hit with a thumb. */
.rpt-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: var(--tap);
  color: var(--faint);
}

.rpt-address-prefix {
  color: #000000;
  white-space: pre;
}

/* Standard link blue, the conventional color for links on the web. */
.rpt-address-link {
  color: #1a0dab;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rpt-address-hint {
  font-style: italic;
  white-space: pre;
}

/* Stale note. The design rule keeps true red for missing / X only, so
   this uses a softer, desaturated rose: noticeable, but it reads as
   "look closer" rather than as a verdict. */

/* The white space that ends each item, before the next card. Until build
   102 a thin gray line ended each item; dls 2026-10-17 dropped it ("Let's
   drop it and see what it looks like"), since every card now brings its
   own line. 29px keeps the next card's blue exactly where it was (21px +
   the 1px line + build 101's 7px strip). The item's box ends here, so when this
   space has scrolled up to the stuck card's line, the next card is right
   behind it and pushes the whole card off, white and line included. */
.rpt-item-end {
  height: 29px;
}

/* Completed with no photo: complete, but say plainly there is no
   evidence. */
.rpt-nophoto {
  padding: 10px 16px 0;
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
}

/* ── Map pop-up (REQ-RPT-12) ───────────────────────────────────── */
/*
   A bottom sheet over a dimmed page. touch-action: none on both stops
   the page behind from scrolling (and Android's pull-to-refresh from
   firing) while the reader swipes the card down to close it.
*/

/* ── Photo viewer (build 062, dls 2026-10-16) ─────────────────────
   A tapped photo, full screen on black, from the copy already on the
   phone. touch-action none: the page does not scroll or zoom under it;
   report.js does the pinch, drag and double-tap itself. Above the map
   pop-up (150) and everything else on the page. */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #000000;
  touch-action: none;
  overscroll-behavior: contain;
}

/* Fills the screen; object-fit contain shows the whole photo, centered,
   at any shape. Zoom is a transform about its center (report.js, and
   photo-viewer.js on the task page since build 131). */
.photo-viewer-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 50%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.photo-viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 22px;
  line-height: 44px;
  cursor: pointer;
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(22, 24, 28, 0.45);
  overscroll-behavior: contain;
  touch-action: none;
}

.map-card {
  width: 100%;
  max-width: 420px;
  /* 20px side padding matches MAP_SIDE_ROOM_PX in report.js. */
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  background: var(--bg);
  touch-action: none;
}

/* The grab handle: a hint that the card can be swiped down. */
.map-card::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 2px;
  background: var(--line);
}

.map-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.map-card-title {
  padding-top: 10px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.map-close {
  flex: 0 0 auto;
  min-width: var(--tap);
  min-height: var(--tap);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.map-slot {
  display: flex;
  justify-content: center;
}

.map-osm-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  margin-top: 6px;
  color: var(--green-dark);
  font-weight: 600;
}

/* The map itself: a window onto a mosaic of 256px OSM tiles that
   report.js positions so the photo's location is dead center. Its
   width and height are set inline by report.js. The edge is a
   box-shadow, not a border, so it takes no space and the marker sits
   exactly on the point. */
.map-wrap {
  max-width: 100%;
}

.map-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
  background: var(--card);
}

.map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  display: block;
}

/* A green dot with a white ring, so it stands out on any map
   coloring. Centered by offsetting half its own size. */
.map-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(22, 24, 28, 0.35);
}

/* Required attribution (OpenStreetMap tile usage policy). */
.map-attrib {
  margin-top: 4px;
  font-size: 11px;
  color: var(--faint);
}

.report-empty {
  padding: 40px 8px;
  text-align: center;
  color: var(--faint);
}

/* ════════════════════════════════════════════════════════════════
   Reduced motion
   ════════════════════════════════════════════════════════════════
   Some people get motion sick, and some just do not want confetti.
   When the OS says so, every animation collapses to its end state:
   the check is simply there, the strikethrough is simply drawn. JS
   also checks this same media query and skips spawning particles at
   all, so nothing is merely invisible-but-running.
*/

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .task-row.anim-strike .task-name::after {
    width: 100%;
  }
}


/* ════════════════════════════════════════════════════════════════
   BUILD NUMBER (build-check.js)
   The footer keeps the live build one glance away so dls can verify
   what is deployed. The mismatch bar is deliberately loud: it only
   appears after a silent auto-refresh has already failed to bring
   the page up to the server's build, meaning the page is stale in a
   way that needs a human.
   ════════════════════════════════════════════════════════════════ */

.build-footer {
  text-align: center;
  color: #b0b6ad;
  font-size: 12px;
  padding: 20px 0 calc(12px + env(safe-area-inset-bottom));
  user-select: all; /* one tap selects the whole string for copying */
}

.build-mismatch {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300; /* above banner (which sits at a lower z) and overlays */
  background: #c62828;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px calc(12px);
  padding-top: calc(12px + env(safe-area-inset-top));
  text-align: center;
}

/* Build 143 (dls 2026-10-18: "a little refresh icon on it as well. So if
   it sticks, then we can force a refresh"): a white pill on the red bar,
   under the message (build-check.js icbForceRefresh). */
.build-mismatch-refresh {
  display: block;
  margin: 8px auto 0;
  padding: 4px 14px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #c62828;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Inline top placement of the build number (inside the report title
   and beside the participant name). Small and dim so it informs
   without competing with the real content. */
.build-top {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #b0b6ad;
  margin-left: 6px;
  white-space: nowrap;
}


/* ════════════════════════════════════════════════════════════════
   INSTALLED APP FRAME: REMOVED in build 093
   From build 025 the installed app drew a thin line in the icon's blue
   round the screen (body::after), joining the phone's blue status bar
   and button bar (colored by the manifest's theme_color /
   background_color) into one frame. Build 081 dropped the sides ("get
   rid of the blue sidebars"); build 093 (dls 2026-10-17, "3px yes")
   dropped the top and bottom 3px lines too. The phone's own blue bars
   stay, and so does the blue app bar at the top of each page.
   ════════════════════════════════════════════════════════════════ */


/* ── Links to the income tool (dls 2026-10-15) ────────────────────
   Report page: the "Income history report" button to the right of the
   title (a button since build 071). Participant page: "Income tool" in
   tiny letters in the footer, in standard link blue. */
/* The report's two top buttons, "Income history report" and, under it,
   "My tasks" (build 071 and 072, dls 2026-10-16). TEXT styled like the
   old "My tasks" button (15px, bold 600, green); SHAPE and BACKGROUND like
   "Copy Link" (round end caps, tight top and bottom, #c8d7e0). WHY the
   ::after: an invisible rectangle 10px around each takes the tap, as on
   Copy Link, without making the lines taller. */
.rpt-top-btn {
  position: relative;
  flex: 0 0 auto;
  padding: 3px 12px;
  /* A <button> (the task page's Progress report) has its own border and
     font by default; these make it match the links exactly. */
  border: 0;
  font-family: inherit;
  cursor: pointer;
  border-radius: 999px;
  /* Build 085 (dls 2026-10-16: "make all the button backgrounds that gray
     color again"): the blue-gray #c8d7e0 with black text (build 084 tried
     baby blue; before it, #c8d7e0 with green, then blue, text). */
  background: #c8d7e0;
  color: #000000;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.rpt-top-btn::after {
  content: '';
  position: absolute;
  inset: -10px -8px;
}
/* ── The hamburger menu (build 076, dls 2026-10-16) ─────────────────
   In the upper left of the task page and the report, in the buttons'
   blue-gray. The menu drops down over the page (it takes no room while
   closed); its items are bold text, black like the buttons' text since
   build 093 (dls 2026-10-17: "menu items black"; they were green). */
.app-header,
.report-title-row {
  position: relative;
}

/* Build 079 (dls 2026-10-16: "the gray box around the menu, there must be
   some better styling for a hamburger menu"): a plain three-line icon
   (an SVG in the page, so it is crisp on every phone), no box. The button
   is a full 44px for the thumb; the negative margin lines the icon's left
   edge up with the page's text below. A light circle shows only while
   pressed. */
.menu-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px 6px 0 -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn:active {
  background: var(--line);
}

.menu-icon {
  display: block;
}

.app-menu {
  position: absolute;
  top: 46px;
  left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 4px 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.app-menu-item {
  display: block;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: #000000;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.app-menu-item + .app-menu-item {
  border-top: 1px solid var(--line);
}

/* The task page's date and name, between the menu and the top buttons. */
.header-who {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

/* The report's title takes the room between the menu and its button. */
.report-title-row .report-title {
  flex: 1 1 auto;
}

/* ── The notifications pop-up (build 076, notify.js) ─────────────────
   dls: "a little pop-up screen that you can X out or hit okay"; since
   build 077 no X ("just an instruction"): each state has its own OK. */
.notify-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}

.notify-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 20px 18px 16px;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.notify-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.notify-text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
}

.notify-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* The About box (build 094, menu.js) reuses this pop-up's look; its text is
   one paragraph with a line break between facts. */
.about-text {
  white-space: pre-line;
}

/* Build 137: Help is longer than About; on a short screen its card
   scrolls rather than pushing OK out of reach. */
.help-modal .notify-card {
  max-height: 90vh;
  overflow-y: auto;
}

.help-subtitle {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.notify-btn {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: #e6ebef;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Build 085: like every button, the blue-gray with black text. */
.notify-btn--primary {
  background: #c8d7e0;
  color: #000000;
}

/* ── The activity log page (build 074, REQ-LOG-03) ─────────────── */
.log-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
}

.log-copy:disabled {
  opacity: 0.5;
}

.log-copy-status {
  font-size: 13px;
  color: var(--muted);
}

.log-fallback {
  width: 100%;
  min-height: 160px;
  margin-bottom: 12px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
}

.log-day {
  margin-bottom: 18px;
}

/* The day's heading in the report's baby blue, like its item bars. */
.log-day-head {
  margin: 0 0 6px;
  padding: 6px 10px;
  background: var(--baby-blue);
  font-size: 15px;
  font-weight: 700;
}

.log-line {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

.log-line-top {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.log-time {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.log-mark {
  flex: 0 0 auto;
  font-weight: 700;
}

.log-line--ok .log-mark { color: var(--green-dark); }
.log-line--fail .log-mark { color: var(--red); }
.log-line--cancel .log-mark,
.log-line--info .log-mark { color: var(--muted); }

.log-name {
  font-size: 15px;
}

.log-error {
  margin-top: 2px;
  font-size: 13px;
  color: var(--red);
}

.log-detail {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.log-empty {
  color: var(--muted);
}

.footer-link {
  color: #1a0dab;
  text-decoration: underline;
  user-select: none;
}
.report-title-row {
  display: flex;
  justify-content: space-between;
  /* Centered, not baseline: the button on the right is taller than the
     title's letters. */
  align-items: center;
  gap: 12px;
}

/* The report's blue bar. Build 093 (dls 2026-10-17: "the top section,
   even though it will remain scrollable, we want that to be the same blue
   ... It will look similar to the task input"). Build 094 (dls: "put
   income history report and my tasks down below, very similar to the way
   the two buttons look on the task entry page"; the build number and pic
   count "removed from view on the stipend report screen"): the bar now
   holds only the menu and STIPEND REPORT, laid out exactly like the task
   page's app bar (.app-header): full width (the negative margins cancel
   the page's 16px padding at the top and sides), 60px tall, the menu icon
   6px from the edge. It still scrolls away; only the report line sticks.
   The two buttons follow it in a .header-actions row, as on the task
   page. (Builds 083 to 093 had the buttons in a column at the right and
   the build line under the title.) */
.report-head {
  display: flex;
  align-items: center;
  min-height: 60px;
  margin: -16px -16px 14px;
  padding: 0 16px 0 6px;
  background: var(--icon-blue);
}

.report-head .report-title-row {
  flex: 1 1 auto;
  min-width: 0;
}

/* Build 175 (dls 2026-10-20: "pull down refresh ios only yes. remove the
   refresh button yes"): the round Update button of build 171 is gone. On
   an iPhone's installed app the report refreshes by pulling down
   (pull-refresh.js): a white circle with the same arrow, in the app's
   blue, comes down from above the top edge with the finger. Above the
   report's sticky lines (z 40) and the menu (60); the pop-ups above it
   (150 and up) stop a pull anyway. No taps: it only shows the pull. */
.pull-refresh {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 50%;
  z-index: 90;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  color: var(--icon-blue);
  pointer-events: none;
  transform: translateY(-60px);
  /* Eases back up when let go; none while the finger leads (below). */
  transition: transform 0.2s ease;
}

.pull-refresh.is-dragging {
  transition: none;
}

/* Faint until the pull is far enough to refresh, then solid. */
.pull-refresh-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.5;
}

.pull-refresh.is-ready .pull-refresh-icon,
.pull-refresh.is-refreshing .pull-refresh-icon {
  opacity: 1;
}

/* Let go past the line: it spins until the page reloads (an animation
   wins over the turn the pull set on the arrow). */
.pull-refresh.is-refreshing .pull-refresh-icon {
  animation: pull-refresh-spin 0.8s linear infinite;
}

@keyframes pull-refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* On the blue: STIPEND REPORT and the menu icon in white, as on the task
   page's app bar. The icon sits at the bar's own 6px inset, so the
   general rule's negative margin (which lined it up with text below it
   on white) is not wanted here. */
.report-head .report-title {
  color: #ffffff;
}

/* Build 098: STIPEND REPORT and the ticking date and time. Build 100 (dls
   2026-10-17: "align the date and time on the top blue bar as well", like
   the sticky report line's clock at the right of its title): the clock
   sits at the right end of the title's line. WHY a wrapping row: with the
   menu button, the title and the clock may be wider than a narrow phone;
   then the clock drops to its own line under the title, still at the
   right (margin-left: auto), instead of cutting the title short. */
.report-title-stack {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
}

.report-clock {
  margin-left: auto;
  font-size: 14px;
  line-height: 18px;
  color: #ffffff;
  white-space: nowrap;
  /* Same-width digits, so nothing shifts as the seconds change. */
  font-variant-numeric: tabular-nums;
}

.report-head .menu-btn {
  margin: 0;
  color: #ffffff;
}

.report-head .menu-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

/* The menu drops from the bottom edge of the 60px bar: the title row is
   44px tall and centered in it, so its top is 8px down. */
.report-head .app-menu {
  top: 52px;
}

/* The report's two buttons under the bar (build 094). Same row as the task
   page's, but "Income History Report" is long: on a narrow phone a half
   width is less than its one-line width, so here a label may wrap to two
   lines (centered both ways) instead of spilling out of its button; both
   buttons then grow to the same height. The task page's short labels never
   need this, so its row is unchanged. */
.header-actions--wrap .rpt-top-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
}

/* Build 108 (dls 2026-10-17): My Tasks at the left, Income History Report
   at the right. Each is pinned to its own column, so for a reader with no
   My Tasks (the viewer) Income History Report still sits at the right
   rather than sliding over to the left. */
.header-actions--wrap .my-tasks-link {
  grid-column: 1;
}

.header-actions--wrap .income-history-link {
  grid-column: 2;
}

/* ── The task form while a Save runs (build 122) ───────────────────
   dls 2026-10-17: "ensure that while saving photos that dialog turns
   inert, gray, modal". app.js setFormLocked puts .is-saving on the
   overlay and disables its controls; here no tap reaches the card, and
   everything but the photos (with their "saving..." / "saved ✓"), the
   progress line and "Keep uploading in the background" is grayed. The
   overlay already covers the page, so the page behind stays out of reach. */
.overlay.is-saving .overlay-card {
  pointer-events: none;
}

/* Build 224: "Saving images" over a spinning circle while a Save runs
   (app.js setFormLocked). Not grayed like the locked controls: it is the
   thing to watch. The circle is a ring with one blue quarter, turned by
   the same spin as the refresh glyph. */
.save-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 12px 0 6px;
}

.save-spinner[hidden] {
  display: none;
}

.save-spinner-text {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.save-spinner-circle {
  width: 36px;
  height: 36px;
  border: 4px solid #d6e4f5;
  border-top-color: var(--icon-blue);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

/* Build 323: .photo-hints ("Photo Not Required") dims with the photo
   buttons it sits under, here and in the locked form below, so a full red
   line never stands out of a grayed form. */
.overlay.is-saving .overlay-header,
.overlay.is-saving .field-label,
.overlay.is-saving .text-input,
.overlay.is-saving .photo-buttons,
.overlay.is-saving .photo-hints,
.overlay.is-saving .storage-warning,
.overlay.is-saving .download-note,
.overlay.is-saving .complete-row,
.overlay.is-saving .overlay-actions {
  opacity: 0.4;
}

/* (Build 122's .save-background, "Keep uploading in the background",
   was here until build 283.) */

/* ── A task with a queued Save is locked (build 284) ────────────────
   dls 2026-11-13: "if you open a task that has queued items in it, then it
   should not allow you to do anything with it until it's done. you would be
   able to hit cancel or exit that dialog." app.js setQueueLockControls puts
   .is-queue-locked on the overlay and disables the note, the Link, the
   photo pickers, Mark Complete and Save. Unlike .is-saving, taps still
   reach the card: the ✕, Cancel, the info icon, a photo (to see it), and a
   refused Save's Try again and Discard all work. The editing parts are
   grayed, a little less than during a Save, so the note and the Link stay
   readable: they are what the waiting Save will save. */
.overlay.is-queue-locked .field-label,
.overlay.is-queue-locked .text-input,
.overlay.is-queue-locked .photo-buttons,
.overlay.is-queue-locked .photo-hints,
.overlay.is-queue-locked .complete-row {
  opacity: 0.55;
}

/* The two photo buttons are <label>s for hidden file inputs: the inputs
   are disabled, and the labels take no taps either. */
.overlay.is-queue-locked .photo-buttons {
  pointer-events: none;
}

/* The box at the top of a locked form (#detail-lock): how the upload
   stands, in bold ("Uploading 2 of 3"), and under it why nothing can be
   changed. Plain while uploading; the row's amber while waiting for
   signal; red once the server refused it. */
.lock-box {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4f6f8;
}

.lock-box[hidden] {
  display: none;
}

.lock-box-state {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.lock-box-text {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.lock-box.is-waiting .lock-box-state {
  color: #8a6510;
}

.lock-box.is-refused {
  border-color: #f0cfcd;
  background: var(--red-soft);
}

.lock-box.is-refused .lock-box-state {
  color: var(--red);
}

/* ════════════════════════════════════════════════════════════════
   THE AZM REPORT (build 265), on the report page before the Stipend
   Report while "Include AZM" is ticked (report.js "The AZM Report").
   Its parts borrow the report's own looks: the band is the Stipend
   Report band's, each person's header a day header's (white on black),
   each section's heading an item heading's (baby blue), and (build 300)
   both weeks' bars are the task page's AZM bar (.azm-track and its parts
   above, this week's with its Now line and today's gray).
   ════════════════════════════════════════════════════════════════ */

.report-page {
  /* The AZM blue is the app's own blue, as on the task page's bar. The
     calendar's four shades are that blue at 25%, 50%, 75% and 100% over
     white (the darkest is twice the daily pace or more), and a day with
     no AZM is a light gray square. */
  --azm-blue: var(--icon-blue);
  --azm-blue-dark: #0f56aa;
  --azm-shade-0: #eceff2;
  --azm-shade-1: #c6defa;
  --azm-shade-2: #8dbdf5;
  --azm-shade-3: #549cf1;
  --azm-shade-4: var(--icon-blue);
}

/* The whole AZM Report: full screen width like the stream (.rpt-stream),
   and some room before the Stipend Report band. */
.azm-rpt {
  margin: 0 -16px 34px;
}

/* "AZM REPORT": the Stipend Report band's look (.rpt-line0), its rows
   (.rpt-line0-row, -title, -range) reused as they are. A fixed 80px (the
   band's usual height): it never has the Stipend Report band's third row.
   Build 300 (dls 2026-11-17: "AZM REPORT / (EMPTY SECOND LINE)"): the
   second row is there and empty (.rpt-line0-row's fixed 26px keeps its
   height), so the band is two rows tall like the Stipend Report band.
   Build 293 (dls 2026-11-14: "Every report type should stop at the very
   top"): it STICKS at the very top of the screen while the AZM Report is
   scrolled, exactly as the Stipend Report band does (.rpt-line0's own
   three lines: position sticky, top 0, z-index 40). Until then it had no
   position: sticky at all (build 265 kept it scrolling away on purpose,
   so the report had exactly three sticky things). Its sticky box is its
   parent, the AZM Report (.azm-rpt), so it stays only while that is on
   screen: as the Stipend Report band scrolls up, the AZM Report's end
   carries this band off the top and the Stipend Report band takes the
   top, as stacked sticky sections do. Nothing between it and the page
   scrolls on its own (the same ancestors as .rpt-line0, see
   body.report-page's overflow-x: clip), which sticky needs. */
.azm-rpt-band {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 4px;
  height: 80px;
  overflow: hidden;
  padding: 0 16px var(--rpt-card-gap);
  background: linear-gradient(to top, var(--bg) var(--rpt-card-gap), var(--icon-blue) var(--rpt-card-gap));
  background-clip: padding-box;
  border-bottom: var(--rpt-card-line) solid var(--rpt-card-line-color);
  color: #ffffff;
}

/* A line in place of the people (loading, nothing to show, an error). */
.azm-rpt-msg {
  margin: 12px 16px;
  color: var(--muted);
  font-size: 16px;
}

.azm-rpt-msg--error {
  color: var(--red-text);
}

/* One person's block. */
.azm-rpt-person {
  margin-bottom: 18px;
}

/* The person's header: the day header's look (.rpt-dayhead, .rpt-dayline:
   white on #262626, 16px bold, the card's white foot and line). Build 300
   (dls 2026-11-17: "DAVID AZM REPORT / (BLANK SECOND LINE)"): two lines,
   "DAVID AZM REPORT" over an empty line, as a day header's day line sits
   over its summary line; until then one line, "DAVID · THIS WEEK (MON NOV
   2 TO SUN NOV 8) · 85 / 140 AZM". A name too long for the line (a 320px
   phone) wraps inside it, so nothing is cut off or pushed off the
   screen. */
.azm-rpt-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(40px + var(--rpt-card-gap));
  padding: 8px 16px calc(8px + var(--rpt-card-gap));
  background: linear-gradient(to top, var(--bg) var(--rpt-card-gap), #262626 var(--rpt-card-gap));
  background-clip: padding-box;
  border-bottom: var(--rpt-card-line) solid var(--rpt-card-line-color);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

/* Each of the header's two lines, the second empty: min-height gives the
   empty one a line's height (an empty box otherwise has none). */
.azm-rpt-head-line {
  min-height: 22px;
  overflow-wrap: anywhere;
}

/* The section headings, an item heading's look (.rpt-item: baby blue,
   16px, the card's white foot and the task line), not sticky. Build 300:
   two per person, "David AZM This Week / Last Week" and "David AZM
   Trends" (build 293 had three: "David, AZM this week", "David, AZM last
   week", "TRENDS"). The existing baby blue is kept for dls's "blue
   section". */
.azm-rpt-sechead {
  display: flex;
  align-items: center;
  min-height: calc(var(--tap) + var(--rpt-card-gap));
  padding: 8px 16px calc(8px + var(--rpt-card-gap));
  background: linear-gradient(to top, var(--bg) var(--rpt-card-gap), var(--baby-blue) var(--rpt-card-gap));
  background-clip: padding-box;
  border-bottom: var(--rpt-card-line) solid var(--rpt-task-line-color);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.azm-rpt-sec {
  padding: 12px 16px 16px;
}

/* Build 300: the line over each week's bar, "This Week: 51/140 (7/Day
   Avg)" and "Last Week: 151/140 (21/Day Avg) ✓": bold black, the size of
   the section heading. Colored by its grade (below). */
.azm-rpt-week-line {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

/* This week's line: room under it for "Now" over the bar (.azm-now-label
   stands 16px above the bar's top), with 6px to spare. */
.azm-rpt-week-line--now {
  margin-bottom: 22px;
}

/* Last week's line: some room after this week's numbers. */
.azm-rpt-week-line--last {
  margin-top: 16px;
}

/* Build 300: each line in its grade's color (report.js azmLineClass: an X
   is red). Build 336 (SPEC-V1.md REQ-AZMREP-86): the colors are THE AZM
   PACE COLORS, shared with the task page (see "Build 336: THE AZM PACE
   COLORS"): green --green-dark as before, yellow the task page's gold
   (build 338: --azm-yellow letters at 600 with the two-step rim; the
   lines are 700 otherwise), red the bright --red, in place of build
   300's darker --yellow-text (#856a00) and --red-text (#99342e), which
   stay for everything else. The mark after the Last Week line keeps the
   marks' own colors (.azm-grade--*) and no rim: only the words take the
   line's color. */

/* Each week's bar: the task page's (.azm-track), the whole width (build
   300: no label before it). */
.azm-rpt-bar {
  display: flex;
}

.azm-rpt-bar .azm-track {
  margin-left: 0;
}

/* Each day's minutes, one under each day of the bar. Build 300: 8px
   under the bar (was 4px), so this week's Now line, which reaches 6px
   under the bar, stays clear of the numbers. */
.azm-rpt-nums {
  display: flex;
  margin-top: 8px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.azm-rpt-num {
  flex: 1 1 0;
  min-height: 21px;
}

.azm-rpt-num--today {
  font-weight: 700;
}

/* Week | Month | Year | All, and Weekly | Cumulative | Calendar (and in the
   full-screen view Daily): joined buttons, the chosen one in the app blue. */
.azm-seg {
  display: flex;
  margin-bottom: 8px;
}

.azm-seg-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 4px 6px;
  border: 1px solid var(--widget-border);
  border-left-width: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}

.azm-seg-btn:first-child {
  border-left-width: 1px;
  border-radius: 8px 0 0 8px;
}

.azm-seg-btn:last-child {
  border-radius: 0 8px 8px 0;
}

.azm-seg-btn--on {
  background: var(--azm-blue);
  border-color: var(--azm-blue);
  color: #ffffff;
  font-weight: 600;
}

/* Build 267: the five views (Days | Weeks | Total | Average | Calendar).
   Each button as wide as its word plus an even share of the rest, so
   "Calendar" fits on a 320px phone where five equal shares would not. */
.azm-seg--views .azm-seg-btn {
  flex: 1 1 auto;
  padding: 4px 4px;
}

/* Build 267: ‹ the window's dates ›, then Log scale and Full screen. */
.azm-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* The days the chart covers, between the arrows. */
.azm-rpt-span {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.azm-opts {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.azm-opts-btns {
  display: flex;
  gap: 8px;
}

/* Log scale and Full screen: small outlined buttons; Log scale pressed is
   the app blue, and disabled (a view with no bars) faded. */
.azm-opt-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--widget-border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
}

.azm-opt-btn--on {
  background: var(--azm-blue);
  border-color: var(--azm-blue);
  color: #ffffff;
  font-weight: 600;
}

.azm-opt-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* The chart's holder. Build 267: a tap reads the chart (the cursor), so
   the pointer is a crosshair; pan-y keeps the page's own up-and-down
   scrolling working over it, and hands a sideways drag to the chart.
   Build 269: a sideways drag moves through time, the chart sliding with
   the finger; overflow hidden cuts off what slides past the holder's
   edges, so the page never gets wider during a drag. */
.azm-chart {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}

.azm-chart svg {
  display: block;
}

/* Build 267: the legend under a chart: a swatch in each drawn thing's
   look, then its words. */
.azm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.azm-legend-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.azm-key {
  display: inline-block;
  width: 12px;
  height: 10px;
  margin-right: 4px;
  border-radius: 2px;
}

.azm-key--met {
  background: var(--azm-blue);
}

.azm-key--under {
  background: var(--azm-shade-2);
}

.azm-key--tbar {
  background: var(--azm-shade-1);
}

/* The lines' swatches: a short line in the line's look. */
.azm-key--goal,
.azm-key--line,
.azm-key--avg7,
.azm-key--avg28 {
  height: 0;
  border-radius: 0;
}

.azm-key--goal {
  border-top: 2px dashed var(--muted);
}

.azm-key--line {
  border-top: 3px solid var(--azm-blue);
}

.azm-key--avg7 {
  border-top: 2px solid var(--azm-shade-3);
}

.azm-key--avg28 {
  border-top: 3px solid var(--azm-blue-dark);
}

.azm-key--cal0 {
  background: var(--azm-shade-0);
}

.azm-key--cal1 {
  background: var(--azm-shade-1);
}

.azm-key--cal2 {
  background: var(--azm-shade-2);
}

.azm-key--cal3 {
  background: var(--azm-shade-3);
}

.azm-key--cal4 {
  background: var(--azm-shade-4);
}

/* The SVG's parts. Numbers in tabular figures, so they line up. */
.azm-svg text {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.azm-tick {
  fill: var(--muted);
  font-size: 11px;
}

/* The goal line's words and number: a white edge around each letter, so
   they stay readable where they cross a bar. */
.azm-tick--goal {
  fill: #4a525c;
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 3px;
  stroke-linejoin: round;
}

/* Build 267: the full-screen view's bigger type. */
.azm-svg--large .azm-tick,
.azm-svg--large .azm-val,
.azm-svg--large .azm-wk,
.azm-svg--large .azm-wkname {
  font-size: 13px;
}

.azm-val {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.azm-bar {
  fill: var(--azm-blue);
}

.azm-bar--sel {
  fill: var(--azm-blue-dark);
}

/* Build 267: a bar under its goal line (a day under the daily goal, a
   week under the weekly goal): a lighter blue, so the bars that met it
   stand out. Pointed at: one step darker. */
.azm-bar--under {
  fill: var(--azm-shade-2);
}

.azm-bar--under.azm-bar--sel {
  fill: var(--azm-shade-3);
}

/* Build 267: Total's daily bars, pale under the running total's line. */
.azm-tbar {
  fill: var(--azm-shade-1);
}

.azm-tbar--sel {
  fill: var(--azm-shade-3);
}

/* Build 267: the week totals over the daily bars (bold, with a check
   mark, when the week met the goal) and the faint line between weeks. */
.azm-wk {
  fill: var(--muted);
  font-size: 11px;
}

.azm-wk--met {
  fill: var(--ink);
  font-weight: 700;
}

.azm-wk-sep {
  stroke: var(--line);
  stroke-width: 1;
}

/* Build 293: the Total view's week boxes (report.js addAzmWeekBoxes): an
   outline only, thin, in the chart's axis gray (.azm-axis), never a grade
   color; the bars and lines are drawn over it. */
.azm-wkbox {
  fill: none;
  stroke: var(--widget-border);
  stroke-width: 1;
}

/* Build 294: the words over the Total view's week boxes ("In progress",
   "This week", "Last week"; report.js addAzmBoxWords): the chart's
   ordinary gray type at the week totals' size (11px, 13px full screen),
   never bold and never a grade color, so they read as names, not data. */
.azm-wkname {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

/* Build 294: full screen, where the 13px words would touch each other or
   leave the chart (a 320px phone held upright), they are 11px, the
   inline chart's size (report.js azmBoxWordsType). After the 13px rule
   above, so it wins. */
.azm-svg--large .azm-wkname--small {
  font-size: 11px;
}

/* Build 267: the log scale's faint lines at 1, 3, 10, 30... */
.azm-grid {
  stroke: var(--line);
  stroke-width: 1;
}

/* Build 267: the rolling averages: the 7-day lighter and thinner (it
   moves fast), the 28-day darker and thicker (the trend). */
.azm-avg {
  fill: none;
  stroke-linejoin: round;
}

.azm-avg7 {
  stroke: var(--azm-shade-3);
  stroke-width: 2;
}

.azm-avg28 {
  stroke: var(--azm-blue-dark);
  stroke-width: 2.5;
}

/* Build 267: the cursor: a thin dark line through the item pointed at,
   and a white dot ringed in the line's color where it crosses a line. */
.azm-cursor {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-opacity: 0.7;
  pointer-events: none;
}

.azm-cursor-dot {
  fill: var(--bg);
  stroke-width: 2.5;
  pointer-events: none;
}

.azm-cursor-dot--line {
  stroke: var(--azm-blue);
}

.azm-cursor-dot--avg7 {
  stroke: var(--azm-shade-3);
}

.azm-cursor-dot--avg28 {
  stroke: var(--azm-blue-dark);
}

/* The goal line (weekly), the daily pace (daily) and the goal's pace
   (cumulative): gray and dashed, so it never reads as data. */
.azm-goal {
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  fill: none;
}

.azm-axis {
  stroke: var(--widget-border);
  stroke-width: 1;
}

.azm-line {
  stroke: var(--azm-blue);
  stroke-width: 2.5;
  stroke-linejoin: round;
  fill: none;
}


.azm-cal--0 {
  fill: var(--azm-shade-0);
}

.azm-cal--1 {
  fill: var(--azm-shade-1);
}

.azm-cal--2 {
  fill: var(--azm-shade-2);
}

.azm-cal--3 {
  fill: var(--azm-shade-3);
}

.azm-cal--4 {
  fill: var(--azm-shade-4);
}

.azm-cal--sel {
  stroke: var(--ink);
  stroke-width: 2;
}

/* ── The full-screen view ── */

/* The whole screen, white, above the report (and its error banner); the
   page under it does not scroll while it is open. */
.azm-full {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  padding: calc(8px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-right, 0px))
    calc(8px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
  background: var(--bg);
  /* A screen too short for everything (a phone on its side with the
     browser's bars showing) scrolls the view instead of cutting it off. */
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.azm-full-open {
  overflow: hidden;
}

.azm-full-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.azm-full-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.azm-full-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--widget-border);
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  line-height: 42px;
  cursor: pointer;
}

/* "Turn your phone sideways for a wider view". */
.azm-full-hint {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}

/* The tabs and the chart switch, side by side when the screen is wide. */
.azm-full-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
}

.azm-full-controls .azm-seg {
  flex: 1 1 260px;
}

.azm-full-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.azm-full-arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 36px;
  border: 1px solid var(--widget-border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.azm-full-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Build 267: the full-screen view's Log scale, after the arrows. */
.azm-full-nav .azm-opt-btn {
  min-height: 36px;
}

.azm-full-span {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* The chart takes the room that is left. flex-basis 0 and overflow
   hidden: its size never depends on the chart drawn in it, so after a
   turn of the phone it is measured afresh and the chart drawn to fit.
   touch-action: none: every drag is the page's script's (a sideways one
   moves through time, an up-and-down one does nothing), never the
   browser's scrolling. */
.azm-chart--full {
  flex: 1 1 0;
  overflow: hidden;
  min-height: 160px;
  touch-action: none;
  cursor: crosshair;
}

/* The item under the cursor in words, or what to do before a tap.
   Build 267: above the chart, inline too; always two lines tall (a
   longer text is cut, never pushing the chart down under the finger
   while it drags). Measured: every readout fits two lines at a 320px
   phone. */
.azm-readout {
  height: calc(2 * 1.35em);
  overflow: hidden;
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

/* A short screen (a phone on its side): every row above and below the
   chart a little tighter, so the chart keeps most of the height. Measured
   in a 800 x 380 window: the rows took 190px before. */
@media (max-height: 500px) {
  .azm-full {
    padding-top: calc(4px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }

  .azm-full-head {
    margin-bottom: 2px;
  }

  .azm-full-close {
    width: 36px;
    height: 36px;
    line-height: 34px;
  }

  .azm-full .azm-seg {
    margin-bottom: 4px;
  }

  .azm-full .azm-seg-btn {
    min-height: 30px;
    padding: 2px 6px;
  }

  .azm-full-arrow {
    height: 30px;
  }

  .azm-chart--full {
    min-height: 120px;
  }

  .azm-readout {
    margin-bottom: 2px;
    font-size: 13px;
  }

  .azm-full-nav .azm-opt-btn {
    min-height: 30px;
    padding: 2px 8px;
  }
}

/* ── Build 271: the AZM Pic's numbers, chart and grade ───────────── */
/* SPEC-V1.md "AZM Pic: the week's total, a six-week chart and a
   performance grade". The task form's #detail-azm (app.js "The AZM Pic's
   numbers") and the report item's snapshot (report.js
   buildAzmPicSnapshot) both hold azm-pic-chart.js's block: the headline,
   the six-week chart (the report's chart classes above: .azm-svg,
   .azm-bar, .azm-goal, .azm-wk ...) and the legend (.azm-legend). */

/* A done AZM Pic graded X: a red box with a red ✗ (the "?" overlay,
   .checkbox-q, carries the glyph). */
.checkbox--failed {
  position: relative;
  border-color: var(--red);
  color: var(--red);
}

/* The form's part, above the note: separated from it by a little room. */
.azm-pic-section {
  margin: 4px 0 14px;
}

/* Build 299: the headline, two lines, large, the first thing read: the
   week ("AZM for Nov 9-15", on the report "Michelle AZM for Nov 9-15"),
   then its totals ("377 AZM Total (53/Day Avg)"). Until build 299 one
   line, "151 AZM · 21 a day", at 26px. */
.azm-pic-headline {
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* Both lines the same size, so they read as one headline. WHY clamp():
   the longest line ("Michelle AZM for Oct 26-Nov 1") is about 15 times
   its type size wide, and the column is the screen less 32px, so a fixed
   size big enough for a 390px phone would wrap on a 320px one. 5.8% of
   the screen's width keeps every line on one line from 320px up (18.6px
   there), and 18px and 24px bound it on very narrow and wide screens
   (measured in the SPEC). A line still too long (a longer name) wraps at
   a space, never widening the page. */
.azm-pic-headline-week,
.azm-pic-headline-totals {
  margin: 0;
  font-size: clamp(18px, 5.8vw, 24px);
}

/* The chart scales to the width it is given (drawn once at its viewBox
   size), so it never needs measuring and never widens the page. Static:
   no crosshair, no gestures (unlike the report's .azm-chart). */
.azm-pic-chart {
  width: 100%;
}

.azm-pic-svg {
  display: block;
  width: 100%;
  height: auto;
  /* The viewBox's own shape (azm-pic-chart.js WIDTH x HEIGHT), so a
     browser that does not take the height from the viewBox still draws
     it at the right height. */
  aspect-ratio: 360 / 176;
}

/* Each week's grade mark after its total, in the task marks' colors.
   Build 293: the same marks in the page's text too (the AZM Report's
   pace and last-week lines, the Total legend), so each color is given
   twice: `fill` colors it in a chart (SVG), `color` in ordinary text. The
   same tokens, no new colors. */
.azm-grade {
  font-weight: 800;
}

.azm-grade--green {
  fill: var(--green);
  color: var(--green);
}

.azm-grade--yellow {
  fill: var(--yellow);
  color: var(--yellow);
}

.azm-grade--red,
.azm-grade--x {
  fill: var(--red);
  color: var(--red);
}

/* While the server reads the week: the Save spinner's circle, and its
   words beside it. */
.azm-pic-wait {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.azm-pic-spinner {
  flex: 0 0 auto;
}

.azm-pic-wait-text {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

/* Without the numbers: one plain line where they would be. */
.azm-pic-later {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

/* On the report: inside the item, with the comment's side margins. */
.rpt-azm-pic {
  padding: 0 16px 10px;
}

/* ── Build 272: the AZM Pic chart's week dates and its task week's
   rectangle ───────────────────────────────────────────────────────── */
/* SPEC-V1.md "AZM Pic chart: week ranges, the task's week framed in its
   grade color". The chart's bars and legend are unchanged (dls
   2026-11-10: only the last week's rectangle is new). */

/* Each week's dates under its column ("Oct26-1"): the scale's gray, a
   point smaller than its 11, so the longest ("Oct12-18") keeps a gap from
   its neighbours. In the chart's own units, so it shrinks with the chart
   in a narrow column (measured in the SPEC). */
.azm-pic-wklabel {
  font-size: 10px;
}

/* The task week's rectangle: an outline only, in the color of the task's
   grade, the task marks' own colors (.checkbox--green, --donelate,
   --doneverylate, --failed): green, yellow, red, and for X the red of the
   X mark. */
.azm-pic-frame {
  fill: none;
  stroke-width: 2;
}

.azm-pic-frame--green {
  stroke: var(--green);
}

.azm-pic-frame--yellow {
  stroke: var(--yellow);
}

.azm-pic-frame--red,
.azm-pic-frame--x {
  stroke: var(--red);
}

/* ── Build 279: the Weight task's latest weigh-in and year graph ───── */
/* SPEC-V1.md "Weight task from weigh-ins". The task form's #detail-weight
   (app.js "The Weight task's weigh-in") and the report item's snapshot
   (report.js buildWeightPicSnapshot) both hold weight-chart.js's block:
   the headline, then the small year graph. The waiting spinner and the
   no-weigh-in line reuse the AZM Pic's look (.azm-pic-wait,
   .azm-pic-later). */

/* The form's part, above the note, like the AZM Pic's. */
.weight-pic-section {
  margin: 4px 0 14px;
}

/* "182.4 lb · Wed Nov 11, 7:42 AM": large, the first thing read. It may
   wrap after the dot in a narrow column, never sideways. */
.weight-pic-headline {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* Build 296 (SPEC-V1.md "Weigh-in setup and troubleshooting in the
   app"): the form's own lines. "Just weighed in? It can take a while to
   arrive." under the headline, quieter than it; under the no-weigh-in
   line, "Latest weigh-in here: ...", then the link "Weigh-in not showing
   up?" (the app's .text-link blue), padded so it is easy to tap. */
.weight-pic-just {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.weight-pic-newest {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.weight-pic-help {
  margin: 2px 0 0;
  font-size: 15px;
}

.weight-pic-help-link {
  display: inline-block;
  padding: 6px 0;
}

.weight-pic-just .weight-pic-help-link {
  padding: 2px 0;
}

/* The graph scales to the width it is given (drawn once at its viewBox
   size), so it never needs measuring and never widens the page. */
.weight-pic-chart {
  width: 100%;
}

.weight-pic-svg {
  display: block;
  width: 100%;
  height: auto;
  /* The viewBox's own shape (weight-chart.js WIDTH x HEIGHT). */
  aspect-ratio: 360 / 140;
}

.weight-pic-svg text {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

/* The light scale in lb and the months: the charts' gray, small. */
.weight-pic-tick {
  fill: var(--muted);
  font-size: 10px;
}

.weight-pic-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.weight-pic-month-mark {
  stroke: var(--widget-border);
  stroke-width: 1;
}

/* The task's week: a light band behind its days. */
.weight-pic-week {
  fill: var(--baby-blue);
}

/* The weigh-ins joined by a line, each a small point. */
.weight-pic-line {
  stroke: var(--icon-blue);
  stroke-width: 1.5;
  stroke-linejoin: round;
  fill: none;
}

.weight-pic-dot {
  fill: var(--icon-blue);
}

/* The latest weigh-in: larger, ringed in the page's background so it
   stands out from the line and the band. */
.weight-pic-dot--latest {
  fill: var(--ink);
  stroke: var(--bg);
  stroke-width: 1.5;
}

/* On the report: inside the item, with the comment's side margins. */
.rpt-weight-pic {
  padding: 0 16px 10px;
}

/* ── Build 309: the Healthy Meal's AI estimate (David's prototype) ──── */
/* SPEC-V1.md "AI meal estimate for Healthy Meal, prototype for David".
   The task form's #detail-meal (app.js "The AI meal estimate on the doing
   page") and the report item's one line (report.js buildMealEstimateLine).
   The waiting spinner reuses the AZM Pic's look (.azm-pic-wait). The
   page's own tokens only, no new colors. */

/* The form's part, above the note, like the Weight task's. */
.meal-ai-section {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

/* "AI estimate": a small heading, so the numbers below read as the AI's. */
.meal-ai-title {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meal-ai-wait {
  padding: 4px 0;
}

/* "≈ 626 kcal": large, the first number read. */
.meal-ai-kcal {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

/* The compact table: the macro's name, its grams, its calories; the carbs'
   split on its own row under them. Numbers line up (tabular), and a long
   row wraps rather than widening the page. */
.meal-ai-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.meal-ai-table th,
.meal-ai-table td {
  padding: 2px 8px 2px 0;
  text-align: left;
  vertical-align: top;
}

.meal-ai-label {
  font-weight: 700;
}

.meal-ai-grams {
  text-align: right;
  white-space: nowrap;
}

.meal-ai-row-kcal {
  color: var(--muted);
  white-space: nowrap;
}

.meal-ai-split-text {
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

/* The plain lines: the items found, how it measured, the confidence.
   Build 310: the framing tip ("Tip: Step back a little ...") is one of
   them, its own line, in the same plain text. */
.meal-ai-items,
.meal-ai-measured,
.meal-ai-tip,
.meal-ai-confidence {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* "Estimated by AI ...; can be off by 20-40%.": quieter, last. */
.meal-ai-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

/* "Could not estimate: ...", then Try again under it. */
.meal-ai-failed {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* On the report: one compact line inside the item, with the comment's side
   margins, above the comment. */
.rpt-meal-ai {
  padding: 0 16px 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* ── Build 311: the one-shot estimate (what the AI sees, a grade, the
   saved conversation) ──
   SPEC-V1.md "AI meal estimate in one shot". The doing page's new lines
   (app.js buildMealEstimateOneShot) and the report's two-line view with
   its write-up (report.js buildMealEstimateLine). The page's own tokens
   only, no new colors. */

/* The grade, colored by how good it is: A and B in the done green's
   darker shade, C in the darker yellow, D and F in the darker red. The
   text shades, not the marks' own colors, since these are words (the
   --yellow-text and --red-text notes at the top of this file). */
.meal-ai-grade {
  font-weight: 800;
}

.meal-ai-grade--green {
  color: var(--green-dark);
}

.meal-ai-grade--yellow {
  color: var(--yellow-text);
}

.meal-ai-grade--red {
  color: var(--red-text);
}

/* The verdict and its suggestion, right under the headline. */
.meal-ai-verdict,
.meal-ai-suggestion {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Build 342: the plate grade's one line (app.js buildMealPlateBlock, under
   the suggestion; report.js the same under the report's two lines), bold
   like the headline so it reads as a second grade, and its write-up a tap
   opens (the report's .rpt-meal-ai-line and -more). The page's own tokens
   only, no new colors. */
.meal-ai-plate {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.meal-ai-plate-line,
.meal-ai-plate-status {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.meal-ai-plate-status {
  margin: 0;
}

/* "What the AI sees", "Portions": small headings like the block's own
   title, so each part reads as one. */
.meal-ai-subhead {
  margin: 12px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meal-ai-description,
.meal-ai-portion,
.meal-ai-photos {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* The scale reasoning: lighter, under the description. */
.meal-ai-scale {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* The one-shot layout's dish line sits between the portions and the table. */
.meal-ai-done--one-shot .meal-ai-measured {
  margin: 8px 0 4px;
}

/* "Estimated from 1 of 1 photos and your note." sits under the tip; with
   no photo at all ("Estimated from your note only: ...") it is bold, so it
   is not missed. */
.meal-ai-photos {
  margin-top: 6px;
}

.meal-ai-photos--none {
  font-weight: 700;
}

/* "Show the AI conversation": the browser's own disclosure triangle on its
   summary line, big enough to tap, blue like the other actions. */
.meal-ai-convo {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 14px;
}

.meal-ai-convo-summary {
  box-sizing: border-box;
  min-height: var(--tap);
  padding: 10px 0;
  color: var(--icon-blue);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.meal-ai-convo-facts {
  margin: 0 0 6px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.meal-ai-convo-label {
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* The prompt and the raw reply: monospace, wrapping (never sideways), and
   a scrolling box of their own so a long one does not push the form far
   down. */
.meal-ai-convo-text {
  box-sizing: border-box;
  max-height: 50vh;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The report's two-line view is one button: the line, then the verdict's
   first sentence; a tap opens the write-up under it. It looks like the
   plain line it replaced, not like a button. */
.rpt-meal-ai-line {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rpt-meal-ai-head,
.rpt-meal-ai-first {
  display: block;
}

/* Build 342: the plate grade's line under the report's two lines (and on
   the Admin page's Meal review), the same bold line, a little apart. */
.rpt-meal-ai-plate {
  margin: 4px 0 0;
}

.rpt-meal-ai-first {
  margin: 2px 0 0;
  font-weight: 400;
  line-height: 1.4;
}

/* The write-up a tap opens: the plain weight of the page's text. */
.rpt-meal-ai-more {
  margin: 6px 0 0;
  font-weight: 400;
}

.rpt-meal-ai-more p {
  margin: 4px 0 0;
  line-height: 1.4;
}

.rpt-meal-ai-more .meal-ai-subhead {
  margin: 10px 0 2px;
}

/* ── Build 344: both meal grades on the report for the admin ──
   SPEC-V1.md "Meal grades on the report for the admin (build 344)". The
   block report.js buildMealGradesBlock draws at the top of a Healthy Meal
   (in .rpt-meal-ai's frame): the overview of the two grades, the calories
   line, the row of buttons and their panels. The page's own tokens only,
   no new colors. */

/* "Today's grade: B   Plate grade: 3 C": the two side by side with room
   between, each on its own line when the phone is narrow. */
.rpt-meal-grades-overview {
  display: flex;
  flex-wrap: wrap;
  column-gap: 18px;
  row-gap: 2px;
}

/* "not yet", "failed", "no grade": quieter than a grade. */
.rpt-meal-grades-word {
  color: var(--muted);
  font-weight: 600;
}

/* "About 520 kcal: protein 30 g (120 kcal), ...": the page's plain
   weight, under the overview. */
.rpt-meal-grades-kcal {
  margin: 2px 0 0;
  font-weight: 400;
  line-height: 1.4;
}

/* The buttons: one row that wraps, each a small plain toggle like the AZM
   Report's option buttons (.azm-opt-btn); an open one has a darker edge
   and bold words, so it reads as on. */
.rpt-meal-grades-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

.rpt-meal-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--widget-border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.rpt-meal-btn[aria-expanded="true"] {
  border-color: var(--ink);
  font-weight: 700;
}

/* The panels under the row, in the buttons' order; "Loading the AI
   conversation..." and "No conversation kept." are quieter. */
.rpt-meal-panel {
  margin: 8px 0 0;
}

.rpt-meal-convo-status,
.rpt-meal-convo-none {
  color: var(--muted);
}

/* ── Build 331: "AI evaluate meal" and the multi-photo parts ──
   SPEC-V1.md "AI evaluate meal before saving; multi-photo prompt". The
   form's #detail-meal-preview (app.js "AI evaluate meal"), the estimate's
   "Each photo" and "Between photos" lines, and the "Photo 1" labels on the
   meal's thumbnails. The page's own tokens only, no new colors. */

/* The part under the photos: the same frame as the estimate's, a little
   space above it so it does not crowd the photo buttons. */
.meal-preview-section {
  margin: 10px 0 12px;
}

/* The button spans the part, big enough to tap. */
.meal-preview-btn {
  width: 100%;
  min-height: var(--tap);
}

/* "Needs a connection", "Add a photo or a note to evaluate.": quiet, under
   the gray button, so the gray has a reason. */
.meal-preview-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.meal-preview-wait {
  margin-top: 8px;
}

.meal-preview-result {
  margin-top: 10px;
}

/* "Out of date": in the darker red text shade, bold, so the answer above
   is not mistaken for the meal as it is now. */
.meal-preview-stale {
  margin: 0 0 6px;
  color: var(--red-text);
  font-size: 15px;
  font-weight: 800;
}

/* "Each photo" and "Between photos": plain lines, as the portions. */
.meal-ai-photo-note,
.meal-ai-between {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* "Photo 1" on a meal's thumbnail, at its top left (the remove button is
   at the top right, the badge along the bottom), on the badge's dark
   backing so it reads on any picture. Taps go through it to the photo. */
.thumb-label {
  position: absolute;
  top: 2px;
  left: 2px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(22, 24, 28, 0.62);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  pointer-events: none;
}


/* ════════════════════════════════════════════════════════════════
   Build 286: the task editor (task-editor.js), the admin only
   SPEC-V1.md "Editing tasks: simple edits, the gear, Add Task (build 286,
   2026-11-13)".
   ════════════════════════════════════════════════════════════════ */

/* The gear: small, first thing in the task's upper left, before its name
   (dls: "a small GEAR icon inside the task dialog, upper left, first thing,
   just before the task's name"). Big enough to tap, quiet in color. */
.gear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 6px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  vertical-align: middle;
  cursor: pointer;
}

.gear-btn[hidden] {
  display: none;
}

/* Disabled (build 284: the task's Save is still on the phone; a tap does
   nothing) and, build 292, gray while the task dialog has changes not
   saved yet (dls: "the gear icon will become Gray"). The gray one still
   takes a tap, which says "Changes made, save or cancel first", so it is
   aria-disabled, not disabled (task-editor.js drawGearState); both look
   the same. */
.gear-btn:disabled,
.gear-btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}

.gear-icon {
  width: 20px;
  height: 20px;
}

/* Build 288: the gear's "which days?" question (#gear-ask), a small pop-up
   over the gear's card (an info pop-up, 300), so a little higher. (Build
   287's When line and its date-time changer, whose place it shared, went
   in build 292.) */
.gear-ask-modal {
  z-index: 310;
}

.gear-ask-card {
  max-width: 360px;
}

/* Build 292: "Changes made, save or cancel first" (#gear-notice), the small
   info pop-up a tap on the gray gear shows over the task dialog: one line
   and OK. The line leaves room on its right for the ✕, as a title does. */
.gear-notice-card {
  max-width: 360px;
}

.gear-notice-text {
  padding-right: 52px;
}

/* A message from an edit (no signal, a refusal): red, plain. */
.editor-msg {
  width: 100%;
  margin: 6px 0 0;
  color: var(--red);
  font-size: 15px;
}

.editor-msg[hidden] {
  display: none;
}

/* SKIPPED, under the list (the admin's skipped occurrences, Un-skip). */
.skipped-list {
  margin: 18px 0 8px;
}

.skipped-list[hidden] {
  display: none;
}

.skipped-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.skipped-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.skipped-undo {
  flex: none;
}

/* The editor card: a little wider than an info pop-up; each part a field. */
.task-editor-card {
  max-width: 480px;
  position: relative;
}

.editor-field {
  margin: 0 0 12px;
}

.editor-select {
  appearance: auto;
}

.editor-info {
  min-height: 70px;
  resize: vertical;
}

/* Build 288 (Add Task in plain words): a value shown as text (a field with
   one possible value, or one not changed here), in the normal text color,
   never grayed out; and a quiet line under a field saying what it means. */
.editor-value {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.editor-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Build 302 (the task form asks only atomic questions): a labeled
   checkbox (PEOPLE's boxes, STIPEND's "Counts for the stipend"), the
   phone's own checkbox with its words beside it (the Mark Complete
   pattern: a tap on the words ticks it too; build 301's Private box was
   the first). A value a rule fixes: disabled, its words in the quiet
   color, the reason under them (an .editor-hint). */
.editor-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  font-size: 16px;
  cursor: pointer;
}

.editor-check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
}

.editor-check.is-off {
  color: var(--muted);
  cursor: default;
}

/* Build 302: PEOPLE, a box per person in two columns (David | Michelle,
   Katrina | Pam), so four names take two rows of the card, not four. */
.people-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
}

/* Build 302: KIND (To-do | Appointment) and VISIBILITY (Private | Shared),
   a choice of two as a segmented control: the app's own view buttons
   (.view-toggle with .toggle-btn, the chosen one baby blue), full width
   and in the form's 16px words. Fixed by a rule (.is-fixed): shown set,
   grayed, and a tap does nothing (the buttons are disabled); the reason
   is the .editor-hint under it. */
.editor-segmented {
  flex: none;
  width: 100%;
}

.editor-segmented .toggle-btn {
  font-size: 16px;
}

.editor-segmented .toggle-btn:disabled {
  cursor: default;
}

.editor-segmented.is-fixed {
  opacity: 0.55;
}

/* Build 303: one choice a rule keeps from being chosen (VISIBILITY's
   Private while several people are ticked or the stipend is), grayed like
   a fixed control; the other choice stays as usable as ever. */
.editor-segmented .toggle-btn.is-unavailable {
  opacity: 0.45;
}

/* Build 303: ENDS, "Never | On" and the phone's date picker side by side
   (the due-controls row). The date box is used only with "On", so it is
   grayed while Never is chosen (or for a one-time task). */
.ends-controls > .ends-date:disabled {
  opacity: 0.45;
}

/* Build 312: REPEATS, "Does not repeat | Repeats" (a segmented control),
   then the unit (Daily, Weekly, Monthly, Yearly) and "Every [n] day" on
   the lines under it. While Does not repeat is chosen (or for an
   appointment) the unit and the Every line are shown grayed, in the quiet
   color, like STIPEND under Private (.editor-check.is-off). */
.repeats-controls,
.repeats-every-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 16px;
}

.repeats-controls > .repeats-unit {
  flex: 1 1 auto;
  min-width: 0;
}

.repeats-every-line > .repeats-every {
  flex: none;
  width: 5em;
  text-align: center;
}

.repeats-controls.is-off,
.repeats-every-line.is-off {
  color: var(--muted);
}

.repeats-controls.is-off > select:disabled,
.repeats-every-line.is-off > input:disabled {
  opacity: 0.45;
}

/* DUE: the phone's date (or weekday) and time pickers side by side, then
   Due in words under them ("Sat Nov 14 at midnight"). */
.due-controls {
  display: flex;
  gap: 8px;
}

.due-controls > * {
  flex: 1 1 0;
  min-width: 0;
}

/* Build 295: OPENS is laid out like DUE (the due-controls row): its day
   part and the phone's time picker side by side, then Opens in words. A
   weekly task's day choice ("2 days before it's due (Monday)") is the
   longest, so it gets the larger share; a daily task's "Each day" is
   plain words, centered on the time box beside it. */
.opens-controls > .opens-select {
  flex-grow: 1.5;
}

.opens-controls > .opens-day {
  align-self: center;
}

/* IF NOT DONE: the timeline after Due, one line each: "Yellow (late)
   until:" with its choice, "Red (very late) until:" with its, "Then:
   missed". */
.timeline-row {
  margin: 0 0 8px;
}

.timeline-label {
  display: block;
  margin: 0 0 4px;
  font-size: 15px;
}

.timeline-then {
  margin: 0;
  font-size: 15px;
}

/* Build 288: the gear's "Edit task" header, with the task's title on the
   line under it. */
.editor-subtitle {
  margin: -4px 0 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

/* The live preview ("Next: Mon Nov 16, due midnight, ..."). */
.editor-preview {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--card);
}

.editor-preview:empty {
  display: none;
}

.editor-preview-line {
  margin: 2px 0;
  font-size: 15px;
}

/* The validator's sentences before Save. */
.editor-problems {
  margin: 8px 0;
  padding-left: 20px;
  color: var(--red);
  font-size: 15px;
}

.editor-problems[hidden] {
  display: none;
}

.gear-choice {
  margin: 0 0 12px;
}

.gear-choice-btn {
  width: 100%;
  font-weight: 700;
}

.gear-choice-text {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Build 307: what else a choice does, under its line ("Replaces the
   rename to Weekly Car Clean planned for Mon Nov 23."): in ink, not muted,
   so a planned rename it removes is read before the tap. */
.gear-choice-notice {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

/* Build 316: the change being saved, at the top of "Change which days?"
   and "Just for you, or for everyone?" ("Due: Sat Nov 21 → Mon Dec 21"),
   one line per field, in ink, a little apart from the choices under it. A
   long title wraps instead of widening the pop-up. */
.gear-ask-change {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.gear-ask-change + .gear-choice {
  margin-top: 14px;
}

.gear-exception {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}

/* Build 287: each on its own line (display block), not side by side.
   Build 288: the gear's Edit task has Skip this day (and, until build 315,
   Remove this task), and End task, at the bottom of its form. */
.gear-skip,
.gear-end,
.gear-duplicate {
  display: block;
  margin: 0 0 12px;
}

/* Build 315 (SPEC-V1.md "Delete a task"): Delete this task, the last thing
   in Edit task, on its own line in the red outline. A task built into the
   app shows it grayed (a tap does nothing) with the reason under it, the
   same look as a grayed "Change which days?" choice. */
.gear-delete-wrap {
  margin: 0 0 12px;
}

.gear-delete {
  display: block;
}

.gear-delete-wrap.is-unavailable .gear-delete {
  opacity: 0.45;
  cursor: default;
}

/* ── Task management (build 289) ───────────────────────────────────
   dls 2026-11-13: one simple list of every task, for David only, so a task
   that is not on any list yet (moved to a later day) can be found and
   changed. A full-screen page over the task page (task-editor.js), shaped
   like a phone's own settings list: the blue app bar with a back arrow and
   the title, then groups whose names fold and unfold them, then rows of
   two lines. Above the page (0) and below the task dialog (150), which
   opens over it; the editor card and the date-time changer (300, 310) sit
   over both. Nothing is grayed out: every word is in the text color. */
.task-list-page {
  position: fixed;
  inset: 0;
  z-index: 140;
  overflow-y: auto;
  background: var(--bg);
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom, 0px));
}

/* The app bar's arrow and title in white, like the task page's. */
.task-list-header .menu-btn {
  margin: 0;
  color: #ffffff;
}

.task-list-header .menu-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

.task-list-body {
  max-width: 640px;
  margin: 0 auto;
}

/* A group's name: one full-width button with its count and a small arrow
   (down: open; right: folded), at least a thumb's height. */
.tm-group {
  margin: 0 0 6px;
}

.tm-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tm-group-head:active {
  background: var(--card);
}

.tm-group-name {
  flex: 1 1 auto;
  font-size: 18px;
  font-weight: 700;
}

.tm-group-count {
  flex: none;
  font-size: 15px;
  color: var(--ink);
}

.tm-chevron {
  flex: none;
  width: 18px;
  height: 18px;
}

/* A task: its title line ("Areas Clean · David, Michelle, Katrina, Pam"),
   then "Every Tuesday · Due Tue Nov 17 · Open now". */
.tm-row {
  display: block;
  width: 100%;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tm-row:active {
  background: var(--card);
}

.tm-title-line {
  display: block;
  font-size: 17px;
}

.tm-title {
  font-weight: 600;
}

.tm-detail {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.tm-status {
  font-weight: 600;
}

.tm-wait {
  margin: 16px 4px;
}

/* Build 320 (SPEC-V1.md "Find, duplicate, reorder, undo an older change"):
   "Find a task", the search box at the top of Task management, the page's
   own text field at its full width; "No tasks match." under it when a
   search finds nothing. */
.tm-find {
  margin: 0 0 10px;
}

.tm-no-match {
  margin: 16px 4px;
}

/* Build 320: a row with Move up and Move down: the row's own button takes
   the room left, and the two arrows sit at its right end, side by side,
   each a full tap wide and as tall as the row (a phone's reorder arrows).
   A move the row cannot make (the first row up, the last down) is an empty
   place of the same size, so the arrows of every row line up. The line
   under the row is the row's own, drawn under the arrows too. */
.tm-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.tm-item .tm-row {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: 0;
}

.tm-moves {
  display: flex;
  flex: none;
}

.tm-move,
.tm-move-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  min-height: var(--tap);
}

.tm-move {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.tm-move:active {
  background: var(--card);
}

.tm-move-icon {
  width: 22px;
  height: 22px;
}

.tm-retry {
  margin: 8px 0 16px;
}

/* Build 289: in the task dialog, the plain line of a task opened from Task
   management that cannot be done from here ("Opens Mon Nov 16."). */
.detail-note {
  margin: 4px 0 8px;
  font-size: 17px;
  color: var(--ink);
}

/* Build 318 (SPEC-V1.md "The past never changes"): Edit task opened on a
   turn that is over says where its changes start ("Changes start with Sat
   Nov 21; past days stay as they were."), and a task built into the app
   says why most of its fields are grayed ("Built into the app; changed in
   the code."): one line each, under the title, like the line below. */
.editor-past-line,
.editor-built-in-line {
  margin: -6px 0 14px;
  font-size: 15px;
  color: var(--ink);
}

/* Build 318: a built-in task's fixed fields (PEOPLE, STIPEND, VISIBILITY,
   DUE, OPENS, IF NOT DONE, PROOF): shown set, in the quiet color, every
   control disabled and faded, like a field a rule fixes. */
.is-built-in {
  color: var(--muted);
}

.is-built-in input:disabled,
.is-built-in select:disabled,
.is-built-in button:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Build 326: an all-day appointment's fixed parts: HEADS-UP shown set to
   None (.editor-field.is-off) and DUE's time box while All day is ticked,
   in the quiet color and faded, like a field a rule fixes. */
.editor-field.is-off {
  color: var(--muted);
}

.editor-field.is-off select:disabled,
.due-controls > .due-time:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Build 289: the gear's "This changes Clean Room for David, Michelle and
   Katrina." for a task more than one person has. */
.editor-shared-line {
  margin: -6px 0 14px;
  font-size: 15px;
  color: var(--ink);
}

/* ── Build 306: seeing what changed ─────────────────────────────────
   dls 2026-11-19: "I'm not sure how I'm supposed to know after the fact
   what exactly it was that I changed". */

/* Task management: a rename scheduled for a later date, after the title
   ("Car Clean → Weekly Car Clean from Mon Nov 23"), in the text's own
   weight so the current title still reads first. */
.tm-rename {
  font-weight: 400;
}

/* Edit task's CHANGES (n): folded like a Task management group (a
   full-width name, its count and a small arrow), one line per change when
   open. */
.editor-changes {
  margin: 8px 0;
}

.editor-changes-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.editor-changes-label {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.editor-changes-list {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 15px;
}

.editor-changes-list[hidden] {
  display: none;
}

.editor-change {
  margin: 0 0 6px;
}

/* Build 319 (SPEC-V1.md "Restore, change repeats both ways, undo a skip"):
   a skip in CHANGES whose turn is not over has Undo at the end of its line,
   laid out like a one-day change's Undo (.gear-exception): the words, then
   the button, side by side; long words wrap. */
.editor-change--undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-change-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.editor-change-undo {
  flex: 0 0 auto;
}

/* A choice that cannot be made is shown grayed and disabled, with its
   reason under it (build 302's rule). Build 316: "Change which days?" no
   longer has one (it leaves such a choice out); Delete this task's "Delete
   everything" still does. */
.gear-choice.is-unavailable .gear-choice-btn {
  opacity: 0.45;
  cursor: default;
}

/* The Saved note: a dark bar at the bottom of the page the dialogs close
   back to (the phone's "snackbar"), over the list and Task management
   (140) and the task dialog (150), under the pop-ups (300). It goes away
   after a few seconds, or at a tap. */
.saved-note {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 160;
  max-width: 608px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* Build 315: a note with an Undo (after Delete this task): its words, then
   the Undo button at its right end, in bold white on the dark bar, with a
   full tap's height. */
.saved-note--undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-note-text {
  min-width: 0;
}

.saved-note-undo {
  flex: none;
  min-height: var(--tap);
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.saved-note[hidden] {
  display: none;
}
