/* THIS APP'S OWN PAGES: the sign-in page, Today, More, Appearance, the password
 * page and Manage accounts; from M1 (2026-10-18) onboarding, Weight, and the
 * profile, health and targets settings, with the form parts and the figure
 * lists they share (at the end). Everything every page shares is in app-shell.css,
 * and so are the rules for editing both files: tokens only (no literal colour
 * that a token means), logical properties only, mobile first, and the accent
 * on chrome only - a FIXED meaning (the three thirds, the macros, over/under)
 * never reads --accent. Sections in page order. */

/* ===========================================================================
 * SIGN IN (Pages/Login.razor)
 * ===========================================================================
 * Quiet on purpose: one card, the name, the hadith line it comes from, two
 * fields. The wash behind the card is built from var(--accent) through
 * color-mix, so it follows the phone's colour, light, dark and print with
 * nothing to keep in step; a browser without color-mix drops the declaration
 * and lands on the flat var(--bg) underneath. */

/* `.wrap.login-page`, two classes, so it outranks `.wrap` on specificity: the
   page keeps .wrap ONLY because `.wrap[lang="ar"]` is where the Arabic type
   treatment hangs, and every box metric .wrap brings is replaced here. */
.wrap.login-page {
  max-inline-size: none;
  margin: 0;
  /* svh: 100vh would put the card's foot under the address bar on first paint. */
  min-block-size: 100svh;
  padding-block: clamp(24px, 8svh, 64px);
  padding-inline: 16px;
  display: grid;
  justify-items: center;
  /* `safe` centre: on a short landscape phone the card is taller than the
     viewport, and plain centring overflows in both directions - putting the
     name above the top of the page, where it cannot be scrolled back to. */
  align-content: safe center;
  background-color: var(--bg);
  background-image:
    radial-gradient(125% 80% at 50% -12%,
      color-mix(in srgb, var(--accent) 20%, transparent) 0%,
      transparent 62%),
    radial-gradient(95% 55% at 50% 112%,
      color-mix(in srgb, var(--accent) 10%, transparent) 0%,
      transparent 58%);
  background-repeat: no-repeat;
}
.login-stack { inline-size: 100%; max-inline-size: 25rem; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(22px, 6vw, 34px);
  box-shadow: var(--lift-shadow);
}

/* The wordmark: both spellings, stacked, because a name is the same object in
   either language. This is the page's <h1>; the children carry the type. */
.login-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-block: 0 10px;
  font-size: 1rem;
  letter-spacing: normal;
}
.login-name-ar {
  /* Named explicitly: the Arabic name is painted on the ENGLISH page too, where
     `.wrap[lang="ar"]` does not match. */
  font-family: 'Cairo', "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic",
               "Geeza Pro", "Arabic Typesetting", system-ui, sans-serif;
  font-size: clamp(2.2rem, 11vw, 2.8rem);
  font-weight: 700;
  /* Headroom for the damma and the sukun above the letters: at a tighter line
     height the marks are clipped by the flex line's box. */
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--text);
}
.login-name-en {
  font-size: clamp(0.82rem, 3.4vw, 0.95rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.3em;
  /* Tracking adds space AFTER the last letter too, shifting a centred word half
     a step; this puts it back (resolved against the span's own dir="ltr"). */
  margin-inline-start: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.login-tagline {
  margin-block: 0 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.9;
}
/* "You were signed out" - a statement of fact, so neutral, not a warning. */
.login-notice {
  margin-block: 0 16px;
  padding-block: 10px;
  padding-inline: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
/* "The server did not answer" carries its own Retry (2026-10-18). */
.login-notice > p { margin: 0 0 8px; }

.login-submit {
  display: block;
  inline-size: 100%;
  min-block-size: 48px;
  margin-block-start: 20px;
  padding-block: 12px;
  padding-inline: 18px;
  font: inherit;
  line-height: 1.4;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.login-submit:hover { filter: brightness(1.08); }
.login-submit:focus-visible { outline-offset: 3px; }
/* aria-disabled, not disabled: Login.razor explains why the button stays
   focusable while a sign-in is in flight. */
.login-submit[aria-disabled="true"] { cursor: progress; opacity: 0.72; filter: none; }
.login-foot {
  margin-block: 20px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}
.login-alt { margin-block: 18px 0; text-align: center; }
@media print {
  /* Nobody prints a sign-in page on purpose; one printed by accident must not
     spend a sheet of ink on a gradient. */
  .wrap.login-page { min-block-size: 0; padding: 0; background-image: none; }
  .login-card { box-shadow: none; }
}

/* ===========================================================================
 * TODAY (Pages/Today.razor)
 * =========================================================================== */
.greeting {
  margin-block: 4px 14px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.5;
}
.thirds {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Each third in its FIXED colour, through one custom property set from its
   data-third; the side rule and the icon read it. Never the accent: a phone
   set to indigo still shows drink in drink's colour. */
.third[data-third="food"] { --third: var(--third-food); }
.third[data-third="drink"] { --third: var(--third-drink); }
.third[data-third="breath"] { --third: var(--third-breath); }
.third {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-block: 12px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--third);
  border-radius: 12px;
  background: var(--bg);
}
.third-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  color: var(--third);
  background: color-mix(in srgb, var(--third) 14%, transparent);
}
.third-text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.third-text strong { color: var(--text); }
.third-text span { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
/* COMPACT on Today from M1 (2026-10-18): three across even on a phone, the
   mark and the title only. The sentence under each stays in the markup for a
   screen reader (visually hidden, never display:none) and is one tap away
   behind the card's (i). No accent anywhere here: these are fixed meanings. */
.thirds-compact .thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thirds-compact .third {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-block: 10px;
  padding-inline: 6px;
  text-align: center;
}
.thirds-compact .third-mark { inline-size: 36px; block-size: 36px; }
.thirds-compact .third-text strong { font-size: 0.86rem; line-height: 1.4; }
.thirds-compact .third-text > span {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Today's two M1 cards: the targets, and the weight with its button. */
.numbers-light-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-block: 0 12px;
}
.today-how { display: inline-flex; align-items: center; min-block-size: 44px; font-weight: 600; }
.today-weigh { margin-block-start: 12px; }
.clinician-note { flex-direction: column; align-items: flex-start; }

/* ===========================================================================
 * MORE (Pages/More.razor) - the name and its hadith
 * =========================================================================== */
.name-lead { color: var(--muted); }
.hadith {
  margin-block: 14px;
  margin-inline: 0;
  padding-block: 14px;
  padding-inline: 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}
/* The quotation, set in Cairo on BOTH pages (it is Arabic on the English page
   too), with room above each line for its vowel marks. Its own direction:
   it is quoted RTL text even inside an LTR page. */
.hadith-text {
  margin: 0;
  font-family: 'Cairo', "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic",
               "Geeza Pro", "Arabic Typesetting", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 2.2;
  text-align: start;
  letter-spacing: 0;
}
.hadith-source {
  margin-block-start: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}
.hadith-meaning { color: var(--muted); font-size: 0.95rem; line-height: 1.8; margin: 0; }
.disclaimer-card {
  border-color: var(--warn-border);
  border-inline-start-width: 4px;
  background: var(--warn-bg);
}
.disclaimer-card p:last-child { margin: 0; }
.more-who { margin-block: 0 8px; margin-inline: 8px; color: var(--muted); font-size: 0.9rem; }

/* ===========================================================================
 * APPEARANCE (Pages/SettingsAppearance.razor) - ported from Sokkara
 * ===========================================================================
 * .look points nothing at a meaning: the tiles show each accent as this phone
 * would (the --accent-<name> tokens), and the chosen tile's border is the
 * accent in effect, so the page is its own preview. Each tile a whole <label>
 * with its radio visible - the chosen one is marked by the dot AND the border. */
.look-note { display: flex; align-items: center; gap: 6px; margin-block: 0 12px; }
.look-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 700px) {
  .look-swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.look-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-block-size: 56px;
  padding-block: 8px;
  padding-inline: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.look-swatch input {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.look-swatch:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.look-swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.look-dot {
  flex: none;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent);
}
.look-dot[data-swatch="teal"] { --swatch: var(--accent-teal); }
.look-dot[data-swatch="indigo"] { --swatch: var(--accent-indigo); }
.look-dot[data-swatch="plum"] { --swatch: var(--accent-plum); }
.look-dot[data-swatch="slate"] { --swatch: var(--accent-slate); }
.look-name { min-inline-size: 0; overflow-wrap: anywhere; }
/* "حسب إعداد الهاتف" is long: one way per row on a phone, three across from 560px. */
.choice-options.look-modes { grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .choice-options.look-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===========================================================================
 * CHANGE PASSWORD (Pages/SettingsPassword.razor)
 * =========================================================================== */
.pw-card { max-inline-size: 30rem; }
.pw-form .btn-block { margin-block-start: 8px; }
/* Sign out, and in forced mode the language pill beside it (2026-10-18). */
.pw-signout { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 8px; }
.forced-banner { max-inline-size: 30rem; }

/* ===========================================================================
 * MANAGE ACCOUNTS (Pages/AdminUsers.razor, Components/Admin/*)
 * =========================================================================== */
.admin-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-block: 0 12px;
}
.admin-note .ico { margin-block-start: 3px; }
.admin-form .btn-block { margin-block-start: 4px; }
.user-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 900px) {
  .user-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.user-card {
  padding-block: 12px;
  padding-inline: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  min-inline-size: 0;
}
.user-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
}
.user-name { font-size: 1.02rem; overflow-wrap: anywhere; }
/* A username is Latin and may be long: it breaks rather than push the card
   wider than a 375px screen. */
.user-login { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
/* ...and its isolate must be allowed to (2026-10-18, review): .num-inline is
   nowrap everywhere, and overflow-wrap does nothing where wrapping is forbidden,
   so a legal 32-letter name of wide letters ran past the card - scrolling the
   Arabic page sideways and clipping the English one. A username has no sign or
   range that a break could misplace (the reason for nowrap, app-shell.css), so
   do not "restore" it here. Not an ellipsis either: the name is which account a
   Reset or a Disable will act on. Pinned by ThemeCssTests.
   Targets_are_44px_long_usernames_break_and_names_take_their_own_direction. */
.user-login .num-inline { white-space: normal; }
.user-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 8px; }
.user-added, .user-self, .user-temp { margin-block: 4px 0; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 10px; }
.user-actions .btn { flex: 1 1 9rem; }
/* A disabled account stays readable - it is still an account - but recedes. */
.user-disabled .user-name { color: var(--muted); }

/* The temporary password: a token, so LTR and monospaced, large enough to read
   aloud over a phone without l/1 or O/0 being taken for each other. */
/* The sentence's one isolate is the username: allowed to break, as on the card. */
.temp-for { margin-block-end: 14px; overflow-wrap: anywhere; }
.temp-for .num-inline { white-space: normal; }
.temp-until { margin-block: 8px 0; }
.temp-head { display: flex; align-items: center; gap: 2px; margin-block-end: 6px; }
.temp-row { display: flex; gap: 8px; align-items: stretch; }
.temp-value {
  flex: 1 1 auto;
  min-inline-size: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
}
.temp-row .btn { flex: none; }
.temp-status { min-block-size: 1.6em; margin-block: 6px 10px; color: var(--muted); font-size: 0.9rem; }
.temp-once { margin-block-end: 16px; }

/* ===========================================================================
 * THE SETUP CHECK THAT FAILED (Layout/MainLayout.razor), M1
 * ===========================================================================
 * The one line above the page asked for, never a wall: .wrap for lang/dir,
 * with no bottom padding so the page under it starts where it always does. */
.wrap.setup-unchecked { padding-block-end: 0; }

/* ===========================================================================
 * ONBOARDING (Pages/Onboarding.razor), M1
 * ===========================================================================
 * Calm and phone-first: one column, the steps as a numbered row that wraps,
 * the current step marked by its number's fill AND aria-current, a finished
 * one by its tick colour AND a hidden "done" - never by colour alone. */
.onb-head { margin-block-end: 12px; }
.onb-head h2 { font-size: 1.2rem; margin-block-end: 4px; }
.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-block: 0 14px;
  margin-inline: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-block-size: 44px;
  padding-block: 6px;
  padding-inline: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  min-inline-size: 0;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.step-name { min-inline-size: 0; overflow-wrap: anywhere; }
.step[data-state="current"] { color: var(--text); border-color: var(--accent); }
.step[data-state="current"] .step-num { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.step[data-state="done"] .step-num { border-color: var(--ok); color: var(--ok); }
/* The step's own heading takes focus after each step change (Onboarding.razor);
   like the page title FocusOnNavigate focuses, it is not a control, so no ring. */
.onb-step-title[tabindex="-1"]:focus { outline: none; }
.onb-step-lead { margin-block: 0 14px; }
.onb-done { margin-block-start: 14px; }

/* ===========================================================================
 * WEIGHT (Pages/Weight.razor, Components/Body/*), M1
 * =========================================================================== */
.readings {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.reading {
  padding-block: 10px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  min-inline-size: 0;
}
.reading-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 12px;
}
.reading-kg { font-size: 1.08rem; }
.reading-when { color: var(--muted); font-size: 0.9rem; }
.reading-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 6px 0; }
.reading-tags:empty { display: none; }
/* A person's own note: free text, any language - it may be long and has no
   spaces to break at on a 375px screen. */
.reading-notes { margin-block: 6px 0; overflow-wrap: anywhere; }
.reading-note { margin-block: 6px 0; }
.reading-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 8px; }
.reading-actions .btn { flex: 1 1 7rem; }
/* A removed reading stays readable (Undo is beside it) but recedes. */
.reading-withdrawn { border-style: dashed; }
.reading-withdrawn .reading-kg { color: var(--muted); text-decoration: line-through; }
.weight-stale { margin-block: 10px 0; }
/* The read-back: the question large enough to be read at arm's length. */
.readback-question { font-size: 1.08rem; font-weight: 600; }
.readback-note { margin-block-end: 16px; }

/* ===========================================================================
 * SETTINGS: PROFILE, HEALTH, TARGETS (Pages/Settings*.razor), M1
 * =========================================================================== */
.settings-stamp { margin-block: 12px 0; }
.settings-elsewhere { margin-block: 0 12px; }
/* "Reload the app" sits under the outdated sentence, beside the Save button. */
.reload-app { margin-block: 0 10px; }
.health-disclaimer h3 { font-size: 1rem; }
.health-private {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-block: 0 16px;
  padding-block: 10px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.health-private .ico { color: var(--muted); margin-block-start: 4px; }
.health-private p { margin-block-end: 4px; }
.health-q { margin-block-end: 18px; }
.health-q .field { margin-block-end: 4px; }
.override {
  margin-block-end: 14px;
  padding-block-end: 10px;
  border-block-end: 1px solid var(--border);
}
.override:last-of-type { border-block-end: 0; }
.override .field.check { margin-block-end: 4px; }
.override-computed { margin-block: 0 10px; }

/* ===========================================================================
 * M1 FORM PARTS (Components/Entry/{OptionList,CheckBox,DateBox,TimeBox})
 * =========================================================================== */

/* A choice with a line of explanation: full-width rows, each a whole <label>
   at least 48px tall, the native radio visible; chosen = dot AND border. */
.option-list { display: grid; gap: 8px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-block-size: 48px;
  padding-block: 10px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.option input {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  margin-block-start: 3px;
  accent-color: var(--accent);
}
.option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-bad .option { border-color: var(--danger); }
.option-text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.option-name { font-weight: 700; line-height: 1.4; }
.option-detail { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
/* Not offered: still read, its reason in its detail line - not a ghost. */
.option-off { cursor: not-allowed; border-style: dashed; }
.option-off .option-name { color: var(--muted); }
.options-hint { margin-block: -10px 18px; }

/* A tick that is a choice: the whole row is the label, 44px at least. */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-block-size: 44px;
  padding-block: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.check-row input {
  flex: none;
  inline-size: 20px;
  block-size: 20px;
  margin: 0;
  margin-block-start: 2px;
  accent-color: var(--accent);
}
.check-text { font-weight: 600; line-height: 1.5; min-inline-size: 0; }
.check-hint { margin-block: 0; }

/* Two short fields side by side - a date and a time, the two ends of the night
   - that wrap to one per row before either is squeezed (no sideways scroll at
   375px: a native date input has an intrinsic width). */
.field-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0 10px;
}
.field-pair > * { min-inline-size: 0; }
fieldset.night { margin-inline: 0; padding: 0; border: 0; min-inline-size: 0; }
fieldset.night > legend { padding: 0; margin-block-end: 2px; }
.input-date, .input-time { min-inline-size: 0; }

/* ===========================================================================
 * FIGURES - targets, the trend, the derivation (Components/Targets/*,
 * Components/Body/WeightSummary.razor, Today), M1
 * ===========================================================================
 * A <dl> of rows: the name on its own line in the page's direction, the figure
 * under it. Every number inside is a Bidi.Iso span, so nothing here sets a
 * direction (see the Do-NOT on td.num in app-shell.css). */
.figures {
  display: grid;
  gap: 8px;
  margin: 0;
}
@media (min-width: 560px) {
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.figure {
  padding-block: 10px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  min-inline-size: 0;
}
.figure dt { color: var(--muted); font-size: 0.86rem; font-weight: 700; }
.figure dd { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.figure-value { font-size: 1.15rem; font-weight: 800; line-height: 1.5; }
.figure-lead .figure-value { font-size: 1.3rem; }
/* "Hidden" in numbers-light: a word in the figure's place, quiet, the card's
   shape unchanged. */
.figure-hidden { color: var(--muted); font-weight: 600; }
.figures-compact .figure-lead .figure-value { font-size: 1.15rem; }
.today-figures { margin-block-end: 6px; }

/* "How this was worked out": label and value, a note under the value. */
.derive { display: grid; gap: 0; margin: 0 0 12px; }
.derive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding-block: 8px;
  border-block-end: 1px solid var(--border);
}
.derive-row:last-child { border-block-end: 0; }
@media (min-width: 560px) {
  .derive-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; }
}
.derive-row dt { color: var(--muted); font-weight: 600; }
.derive-row dd { margin: 0; font-weight: 700; }
.derive-note { display: block; color: var(--muted); font-size: 0.88rem; font-weight: 500; line-height: 1.55; }
.reasons-t { margin-block: 12px 6px; }
.reasons { margin: 0 0 12px; padding-inline-start: 1.2em; }
.reasons li { margin-block-end: 6px; line-height: 1.65; }

/* Not ready: what is missing, and the way to onboarding. */
.setup-cta p { margin-block-end: 6px; }
.setup-missing { margin-block: 0 12px; padding-inline-start: 1.2em; }
