@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;800&display=swap');
/* ReddyBox app. Tokens copied from the reddybox.co.nz "Modernist" design system. */

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-raised: #ffffff;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-accent-ink: #d12a10;
  --color-on-accent: #f3f2f2;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);
  --color-hairline: color-mix(in srgb, #201e1d 16%, transparent);
  --color-muted: color-mix(in srgb, #201e1d 58%, transparent);
  --color-neutral-200: #eae7e7;
  --color-neutral-800: #444141;
  --color-accent-100: #fff2ef;
  --color-accent-200: #ffe0d9;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-800: #7c1405;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #191817; --color-surface: #252322; --color-raised: #2d2b2a; --color-text: #f3f2f2;
    --color-on-accent: #fff;
    --color-divider: color-mix(in srgb, #f3f2f2 34%, transparent);
    --color-hairline: color-mix(in srgb, #f3f2f2 14%, transparent);
    --color-muted: color-mix(in srgb, #f3f2f2 60%, transparent);
    --color-neutral-200: #34312f; --color-neutral-800: #d7d3d3;
    --color-accent-100: #3a1a14; --color-accent-200: #4d170e; --color-accent-800: #ffc4b8;
    --color-accent-700: #ff9783;
    --color-accent: #d9402a; --color-accent-ink: #ff9d8a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --color-bg: #191817; --color-surface: #252322; --color-raised: #2d2b2a; --color-text: #f3f2f2;
  --color-on-accent: #fff;
  --color-divider: color-mix(in srgb, #f3f2f2 34%, transparent);
  --color-hairline: color-mix(in srgb, #f3f2f2 14%, transparent);
  --color-muted: color-mix(in srgb, #f3f2f2 60%, transparent);
  --color-neutral-200: #34312f; --color-neutral-800: #d7d3d3;
  --color-accent-100: #3a1a14; --color-accent-200: #4d170e; --color-accent-800: #ffc4b8;
  --color-accent-700: #ff9783;
  --color-accent: #d9402a; --color-accent-ink: #ff9d8a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 8px; }
h1 { font-size: 30px; } h2 { font-size: 24px; } h3 { font-size: 19px; } h4 { font-size: 16px; }
p { margin: 0 0 12px; }
a { color: var(--color-accent-ink); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
.muted { color: var(--color-muted); }
.small { font-size: 13px; }
.kicker { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-ink); font-weight: 600; margin-bottom: 6px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* — shell — */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: var(--color-bg);
  border-bottom: 2px solid var(--color-divider);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; margin-right: auto; }
.brand svg, .brand img { width: 26px; height: 30px; display: block; }
.brand b { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text small { font-size: 10.5px; font-weight: 600; color: var(--color-accent-ink); letter-spacing: 0.02em; margin-top: 2px; white-space: nowrap; }
.topbar .hh { font-size: 12px; color: var(--color-muted); max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { max-width: 720px; margin: 0 auto; padding: 20px 16px calc(var(--nav-h) + var(--safe-b) + 28px); }
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(var(--nav-cols, 5), 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--color-bg); border-top: 2px solid var(--color-divider);
}
.bottomnav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: transparent; cursor: pointer; font-size: 11px; font-weight: 600; color: var(--color-muted);
  position: relative;
}
.bottomnav button svg { width: 22px; height: 22px; }
.bottomnav button[aria-current="page"] { color: var(--color-accent-ink); }
.bottomnav button[aria-current="page"]::before { content: ""; position: absolute; top: -2px; left: 22%; right: 22%; height: 3px; background: var(--color-accent); }
.bottomnav .dot { position: absolute; top: 9px; right: calc(50% - 18px); min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; line-height: 17px; text-align: center; background: var(--color-accent); color: var(--color-on-accent); }
@media (min-width: 900px) {
  .bottomnav { position: sticky; top: 52px; bottom: auto; height: auto; max-width: 720px; margin: 0 auto; grid-template-columns: repeat(var(--nav-cols, 5), auto); justify-content: start; gap: 4px; border: 0; padding: 12px 16px 0; background: var(--color-bg); z-index: 19; box-shadow: 0 0 0 100vmax var(--color-bg); clip-path: inset(0 -100vmax -2px); border-bottom: 2px solid var(--color-divider); }
  .bottomnav button { flex-direction: row; font-size: 14px; padding: 8px 12px; gap: 6px; }
  .bottomnav button svg { width: 18px; height: 18px; }
  .bottomnav button[aria-current="page"]::before { top: auto; bottom: 0; left: 0; right: 0; }
  .bottomnav .dot { position: static; }
  main { padding-bottom: 48px; }
}

.bottomnav button > span:not(.dot) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.bottomnav .nav-short { display: none; }
@media (max-width: 520px) { .bottomnav.nav6 button { font-size: 10px; letter-spacing: -0.01em; } .bottomnav.nav6 .dot { right: calc(50% - 16px); }
  .bottomnav.nav6 .nav-long { display: none; } .bottomnav.nav6 .nav-short { display: inline; } }

/* — read-only sections with a pencil to edit — */
body { zoom: var(--zoom, 1); }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.sec-head h2, .sec-head h3 { margin: 0; }
.sec-head.h3 { padding-bottom: 8px; border-bottom: 2px solid var(--color-divider); margin-bottom: 12px; }
.sec-head .btn svg { width: 16px; height: 16px; }
.editing-note { font-size: 13px; background: var(--color-accent-100); border-left: 3px solid var(--color-accent); padding: 8px 12px; margin: 0 0 14px; }
.view-list { border-top: 2px solid var(--color-divider); }
.view-field { padding: 12px 0; border-bottom: 1px solid var(--color-hairline); }
.view-field > span { display: block; font-size: 13px; color: var(--color-muted); margin-bottom: 2px; }
.view-val { white-space: pre-wrap; overflow-wrap: anywhere; }
.view-val.muted { color: var(--color-muted); font-style: italic; font-size: 14px; }
.factors b a { color: var(--color-accent-ink); }
.factors b .small { font-weight: 400; display: block; }

/* — event report, shopping list, shop, team view — */
.sos { background: var(--color-accent); color: var(--color-on-accent); padding: 12px 16px; margin: 0 0 20px; font-size: 14px; }
.sos a { color: inherit; text-decoration: underline; }
.seg.seg-sm { margin: 0; }
.seg.seg-sm button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.use-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--color-hairline); }
.opt-card { display: block; width: 100%; text-align: left; border: 2px solid var(--color-divider); background: transparent; padding: 14px 16px; cursor: pointer; margin-top: 10px; }
.opt-card[aria-pressed="true"] { border-color: var(--color-accent); background: var(--color-accent-100); }
.ev-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.tick-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--color-hairline); cursor: pointer; }
.tick-row input { width: 22px; height: 22px; accent-color: var(--color-accent); margin: 1px 0 0; flex: none; }
.tick-row.done .t { text-decoration: line-through; color: var(--color-muted); }
.bar-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 32px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.bar-track { display: block; height: 14px; background: var(--color-neutral-200); }
.bar { display: block; height: 100%; background: var(--color-accent); }
.back { padding-left: 0; margin-bottom: 4px; }
@media print { .topbar, .bottomnav, .demo-bar, .no-print, .toast { display: none !important; } body { zoom: 1; background: #fff; } main { padding: 0; } }

/* — home launcher tiles — */
.welcome { font-size: 32px; margin: 4px 0 4px; }
.launch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0 28px; }
.launch button { position: relative; background: var(--color-raised); border: 1px solid var(--color-hairline); box-shadow: var(--shadow-sm); padding: 12px 10px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; color: var(--color-text); }
.launch button svg { width: 24px; height: 24px; color: var(--color-accent-ink); margin-bottom: 4px; }
.launch .lt { font-weight: 800; font-size: 14.5px; line-height: 1.2; }
.launch .ls { font-size: 11.5px; color: var(--color-muted); line-height: 1.3; }
.launch .alert .ls { color: var(--color-accent-ink); font-weight: 600; }
.launch .ev { background: var(--color-accent-100); border-color: var(--color-accent-200); }
.launch button:active { transform: scale(0.98); }

.launch .n { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; background: var(--color-accent); color: var(--color-on-accent); }
@media (hover: hover) { .launch button:hover { background: var(--color-surface); } .launch .ev:hover { background: var(--color-accent-200); } }
/* Always 2 x 2, whatever the screen width. A fifth tile (Pantry) spans the full row. */
.faq details { border-bottom: 1px solid var(--color-hairline); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; font-size: 14px; }

/* — supplies read-only view — */
.vrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-hairline); }
.vrow .item-title { font-size: 15px; }
.vrow .item-meta { font-size: 12.5px; }
.vgroup { font-size: 15px; margin: 18px 0 4px; display: flex; justify-content: space-between; align-items: baseline; }

/* — resources — */
.res-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.res-head h2 { margin: 0; }
.region-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.region-pick select { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--color-divider); background: var(--color-accent-100); color: var(--color-accent-800); }
.res-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-hairline); text-decoration: none; color: var(--color-text); }
.res-link b { display: block; font-size: 15px; }
.res-link .small { display: block; }
.res-link .dom { flex: none; font-size: 12px; color: var(--color-accent-ink); font-weight: 600; white-space: nowrap; }
.res-list { border-top: 2px solid var(--color-divider); }
.guide details { border-bottom: 1px solid var(--color-hairline); padding: 12px 0; }
.guide summary { cursor: pointer; font-weight: 700; }
.guide ul { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.guide li + li { margin-top: 4px; }
.sos a { white-space: nowrap; }
.print-plan h1 { font-size: 26px; }
.print-plan .factors b { white-space: pre-wrap; }
@media (max-width: 420px) { .topbar .hh { display: none; } }

/* — shop kits — */
.chip[aria-pressed="true"] .muted { color: inherit; opacity: 0.85; }
.kit-list { display: grid; gap: 10px; margin-top: 10px; }
@media (min-width: 600px) { .kit-list { grid-template-columns: 1fr 1fr; } }
.kit { background: var(--color-raised); border: 1px solid var(--color-hairline); box-shadow: var(--shadow-sm); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.kit h4 { margin: 0; }
.kit .sugg { font-size: 12.5px; color: var(--color-accent-800); background: var(--color-accent-100); padding: 4px 8px; align-self: flex-start; }
.kit-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* — readiness breakdown — */
button.readiness { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 0; }
.readiness-more { display: inline-block; margin-top: 10px; color: var(--color-accent-ink); font-weight: 700; font-size: 14px; }
.rd-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 16px; }
.rd-head .ring { width: 120px; height: 120px; flex: none; }
.rd-cat { background: var(--color-raised); border: 1px solid var(--color-hairline); box-shadow: var(--shadow-sm); padding: 14px; margin-top: 10px; }
.rd-cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rd-cat-head b { font-size: 16px; }
.rd-cat-head .w { font-size: 12px; color: var(--color-muted); font-weight: 400; margin-left: 6px; }
.rd-cat .bar-track { margin: 8px 0 4px; }
.rd-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--color-hairline); flex-wrap: wrap; }
.rd-item:first-of-type { border-top: 0; }
.rd-item .lbl { flex: 1 1 180px; font-size: 14px; }
.rd-item .hint { display: block; font-size: 12px; color: var(--color-muted); }
.rd-ok { font-weight: 800; color: var(--color-neutral-800); white-space: nowrap; font-size: 14px; }
.ev-link { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 28px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--color-hairline); background: transparent; color: var(--color-muted); font: inherit; font-size: 13px; cursor: pointer; text-align: center; }
.ev-link svg { width: 16px; height: 16px; flex: none; }
.ev-link b { color: var(--color-accent-ink); font-weight: 700; }
.best-line { color: var(--color-accent-ink); font-weight: 600; }
.welcome-step { max-width: 480px; }
.food-box { border-left: 4px solid var(--color-accent); background: var(--color-raised); box-shadow: var(--shadow-sm); }
.box-list { margin-top: 12px; border-top: 1px solid var(--color-hairline); padding-top: 10px; }
.box-list summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.box-list ul { margin: 8px 0 0; padding-left: 20px; font-size: 14px; }
.box-list li + li { margin-top: 3px; }
.meal-day { margin-top: 22px; scroll-margin-top: 80px; background: var(--color-raised); border: 1px solid var(--color-hairline); box-shadow: var(--shadow-sm); padding: 14px; }
.meal-day h3 { margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--color-divider); }
.meal { padding: 10px 0; border-bottom: 1px solid var(--color-hairline); }
.meal .kicker { margin-bottom: 2px; }
.meal p { margin: 2px 0 0; }
.rd-ask { font: inherit; font-size: 14px; font-weight: 800; white-space: nowrap; padding: 6px 10px; border: 2px solid var(--color-accent-ink); background: transparent; color: var(--color-accent-ink); cursor: pointer; }
.ask-card { display: flex !important; flex-direction: column; gap: 2px; text-align: left; border: 2px solid var(--color-accent-ink) !important; cursor: pointer; margin: 8px 0 12px; color: inherit; }
.rd-item.flash { animation: rqflash 1.6s ease-out; }
@keyframes rqflash { 0%, 40% { background: var(--color-accent-100); } 100% { background: transparent; } }
.intro { border-left: 4px solid var(--color-accent); }
.intro ol { margin: 8px 0 12px; padding-left: 20px; }
.intro li { margin: 6px 0; }
.checklist { display: flex; flex-direction: column; }
.ck { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--color-hairline); padding: 12px 0; cursor: pointer; }
.ck .num { flex: none; width: 26px; height: 26px; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 2px solid var(--color-divider); }
.ck.done .num { background: var(--color-neutral-200); border-color: transparent; color: var(--color-muted); }
.ck.done b { color: var(--color-muted); text-decoration: line-through; font-weight: 600; }
.ck.next .num { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.ck .small { display: block; }
.print-card { border-left: 4px solid var(--color-accent); }
.rd-no { font-weight: 800; color: var(--color-accent-ink); white-space: nowrap; font-size: 14px; }
.rd-item .input { width: 110px; min-height: 36px; padding: 6px 8px; }

/* — survival guide — */
.gd-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.gd-jump .chip { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.gd-sec { margin-top: 26px; scroll-margin-top: 80px; }
.gd-sec > h3 { padding-bottom: 8px; border-bottom: 2px solid var(--color-divider); margin-bottom: 6px; }
details.gd { border-bottom: 1px solid var(--color-hairline); }
details.gd > summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.gd > summary::-webkit-details-marker { display: none; }
details.gd > summary::after { content: "+"; color: var(--color-accent-ink); font-size: 22px; line-height: 1; }
details.gd[open] > summary::after { content: "\2212"; }
.gd-body { padding: 0 0 14px; }
.gd-body ol { margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.5; }
.gd-body li + li { margin-top: 6px; }
.gd-body li::marker { color: var(--color-accent-ink); font-weight: 800; }
.gd-call { font-size: 14px; background: var(--color-accent-100); border-left: 3px solid var(--color-accent); padding: 8px 12px; margin: 12px 0 0; }
figure.dg { margin: 4px 0 14px; background: var(--color-raised); border: 1px solid var(--color-hairline); padding: 12px; }
.dg-svg { width: 100%; height: auto; display: block; max-width: 420px; margin: 0 auto; }
.dg-big { font: 800 30px var(--font); } .dg-big2 { font: 800 20px var(--font); } .dg-sm { font: 600 11.5px var(--font); }
.dg-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; justify-content: center; }
.dg-step { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 6px 4px; background: var(--color-accent-100); }
.dg-step b { font-size: 22px; color: var(--color-accent-ink); line-height: 1; }
.dg-step span { font-size: 10.5px; font-weight: 600; text-align: center; margin-top: 3px; line-height: 1.15; }
.dg-arrow { color: var(--color-muted); font-weight: 800; }
.dg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dg-card { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--color-bg); }
.dg-card svg { width: 36px; height: 36px; }
.dg-card span { font-size: 12.5px; line-height: 1.35; }
.dg-bars { display: flex; flex-direction: column; gap: 10px; }
.dg-bar { display: grid; grid-template-columns: 112px 1fr; gap: 4px 10px; align-items: center; font-size: 13px; }
.dg-bar b { grid-column: 2; font-size: 12.5px; color: var(--color-muted); }
.dg-bl { grid-row: span 2; font-weight: 600; }
.dg-track { display: block; height: 12px; background: var(--color-neutral-200); }
.dg-track span { display: block; height: 100%; background: var(--color-accent); }

/* — cleaner home — */
.ready-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--color-raised); border: 1px solid var(--color-hairline); box-shadow: var(--shadow-sm); padding: 12px 14px; cursor: pointer; color: var(--color-text); font: inherit; margin-bottom: 12px; }
.ready-card .ring { width: 76px; height: 76px; flex: none; }
.ready-card .ring-num { font-size: 64px; }
.ready-card > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ready-band { font-size: 20px; font-weight: 800; color: var(--color-accent-700); line-height: 1.15; }
.ready-ring-empty { width: 60px; height: 60px; flex: none; display: grid !important; place-items: center; border: 8px solid var(--color-neutral-200); border-radius: 50%; font-weight: 800; color: var(--color-muted); }
.chev { flex: none !important; font-size: 26px; color: var(--color-accent-ink); font-weight: 800; }
.launch { margin: 0 0 10px; }
.launch button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ev-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--color-accent-100); border: 1px solid var(--color-accent-200); padding: 12px 14px; cursor: pointer; color: var(--color-text); font: inherit; }
.ev-btn svg { width: 24px; height: 24px; color: var(--color-accent-ink); flex: none; }
.ev-btn > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.ev-btn > span:last-child { font-size: 26px; color: var(--color-accent-ink); font-weight: 800; }
.due-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--color-hairline); padding: 10px 0; cursor: pointer; color: var(--color-text); font: inherit; }
.due-row > span:first-child { display: flex; flex-direction: column; }

.list-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--color-raised); border: 1px solid var(--color-hairline); padding: 14px 16px; margin: 0 0 10px; user-select: all; -webkit-user-select: all; color: var(--color-text); }

/* — on/off switch — */
.switch-row:disabled { opacity: 0.6; cursor: default; }
.switch-row { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 16px; text-align: left; background: var(--color-surface); border: 0; padding: 14px 16px; cursor: pointer; font-size: 15px; }
.switch-track { flex: none; width: 50px; height: 28px; position: relative; background: var(--color-neutral-200); border: 1px solid var(--color-divider); transition: background .15s, border-color .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--color-raised); box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch-row[aria-checked="true"] .switch-track { background: var(--color-accent); border-color: var(--color-accent); }
.switch-row[aria-checked="true"] .switch-track::after { transform: translateX(22px); background: #fff; }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-track::after { transition: none; } }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  padding: 10px 16px; cursor: pointer; text-decoration: none; font-weight: 800; font-size: 15px; line-height: 1.2;
  color: var(--color-text); background: transparent; border: 1px solid transparent; border-radius: 0;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:active { background: var(--color-accent-700); }
@media (hover: hover) { .btn-primary:hover { background: var(--color-accent-600); } .btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); } }
.btn-secondary { border-color: var(--color-divider); }
.btn-ghost { color: var(--color-accent-ink); padding-inline: 8px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--color-accent-700); border-color: var(--color-accent); }
.btn-google { background: var(--color-raised); border-color: var(--color-divider); font-weight: 600; }
.btn-google svg { width: 18px; height: 18px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 12px; }

/* — forms — */
.field { display: block; }
.field > span { display: block; font-size: 13px; margin-bottom: 5px; color: var(--color-muted); }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--color-text);
  caret-color: var(--color-accent); background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: 0;
}
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 96px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--color-accent); margin: 2px 0 0; flex: none; }
.seg { display: flex; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--color-divider); margin-bottom: 16px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; border: 0; background: transparent; padding: 10px 14px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 42px; }
.seg button + button { border-left: 1px solid var(--color-divider); }
.seg button[aria-pressed="true"] { background: var(--color-accent); color: var(--color-on-accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--color-divider); background: transparent; padding: 8px 12px; font-size: 14px; cursor: pointer; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }

/* — cards, tiles, lists — */
.card { background: var(--color-surface); padding: 16px; }
.card + .card { margin-top: 12px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--color-divider); border: 2px solid var(--color-divider); margin: 16px 0 24px; }
.tile { background: var(--color-bg); padding: 14px; border: 0; text-align: left; cursor: pointer; }
.tile .v { font-size: 30px; font-weight: 800; line-height: 1; }
.tile .l { font-size: 13px; font-weight: 600; margin-top: 6px; }
.tile .s { font-size: 12px; color: var(--color-muted); }
.tile.alert .v, .tile.alert .s { color: var(--color-accent-ink); }
.list { border-top: 2px solid var(--color-divider); }
.item { padding: 14px 0; border-bottom: 1px solid var(--color-hairline); }
.item-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.item-title { font-weight: 800; font-size: 16px; line-height: 1.25; }
.item-meta { font-size: 13px; color: var(--color-muted); margin-top: 2px; }
.item-actions { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.item-actions .field { flex: 1 1 150px; }
.item-actions .field > span { font-size: 12px; }
.item-actions .input { min-height: 38px; padding: 6px 10px; font-size: 15px; }
.status { display: inline-block; padding: 4px 10px; font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; font-weight: 600; }
.status.bad { background: var(--color-accent); color: var(--color-on-accent); }
.status.warn { background: var(--color-accent-200); color: var(--color-accent-800); }
.status.ok { background: var(--color-neutral-200); color: var(--color-neutral-800); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 9px; background: var(--color-neutral-200); color: var(--color-neutral-800); }
.tag.accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.note { font-size: 13px; color: var(--color-muted); border-left: 3px solid var(--color-accent); padding: 4px 0 4px 12px; margin: 20px 0 0; }
.banner { background: var(--color-accent-100); color: var(--color-text); padding: 14px 16px; margin-bottom: 16px; border-left: 4px solid var(--color-accent); }
.banner p { margin-bottom: 10px; font-size: 14px; }
.empty { padding: 24px 0; color: var(--color-muted); font-size: 14px; }
details.add { background: var(--color-surface); margin: 0 0 20px; }
details.add > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
details.add > summary::-webkit-details-marker { display: none; }
details.add > summary::after { content: "+"; font-size: 22px; color: var(--color-accent-ink); line-height: 1; }
details.add[open] > summary::after { content: "\2212"; }
details.add .body { padding: 0 16px 16px; }
.saved { font-size: 12px; color: var(--color-muted); min-height: 18px; }
.tips .card .kicker { margin-bottom: 4px; }
.member { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--color-hairline); }
.avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--color-accent); color: var(--color-on-accent); font-weight: 800; }
.section { margin-top: 28px; }
.section > h3 { padding-bottom: 8px; border-bottom: 2px solid var(--color-divider); }

/* — auth — */
.auth { max-width: 420px; margin: 0 auto; padding: calc(32px + var(--safe-t)) 16px 40px; }
.auth .mark { width: 64px; height: 74px; margin-bottom: 20px; }
.auth h1 { font-size: 34px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--color-muted); font-size: 13px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--color-divider); }

/* — dialog + toast — */
.dialog-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; padding: 16px; background: color-mix(in srgb, #2d2b2b 55%, transparent); }
@media (min-width: 600px) { .dialog-backdrop { place-items: center; } }
.dialog { width: min(460px, 100%); background: var(--color-bg); padding: 20px; box-shadow: var(--shadow-lg); padding-bottom: calc(20px + var(--safe-b)); }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 60; max-width: 480px; margin: 0 auto; padding: 12px 16px; background: var(--color-text); color: var(--color-bg); font-size: 14px; box-shadow: var(--shadow-lg); }
.toast.err { background: var(--color-accent-700); color: #fff; }
.demo-bar { background: var(--color-text); color: var(--color-bg); font-size: 12px; padding: 6px 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.demo-bar button { background: transparent; color: inherit; border: 1px solid currentColor; padding: 3px 8px; font-size: 12px; cursor: pointer; }
.offline { background: var(--color-accent-200); color: var(--color-accent-800); font-size: 13px; padding: 6px 16px; text-align: center; }
.spinner { display: grid; place-items: center; min-height: 60vh; color: var(--color-muted); }

/* — readiness — */
.readiness { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; margin: 8px 0 28px; }
.ring { width: 180px; height: 180px; display: block; }
.ring-num { font: 800 54px var(--font); fill: var(--color-text); letter-spacing: -0.02em; }
.ring-num.soon { font-size: 34px; fill: var(--color-muted); }
.ring-label { font: 600 11px var(--font); letter-spacing: 0.12em; fill: var(--color-muted); }
.readiness-title { color: var(--color-accent-700); font-size: 28px; text-wrap: balance; }
.factors { border-top: 1px solid var(--color-divider); margin: 4px 0 12px; }
.factors > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-divider); font-size: 14px; }
.factors span { color: var(--color-muted); }
.factors b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .readiness { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
  .readiness-body { width: 100%; }
  .ring { width: 150px; height: 150px; }
  .readiness-title { text-align: center; }
}

/* — equipment groups, restock, steppers — */
.group { margin-top: 20px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 17px; margin-bottom: 6px; }
.restock-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .btn-sm { min-width: 38px; padding-inline: 0; font-size: 18px; }
.stepper .qty { min-width: 26px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-hairline); }
h4.sub { margin: 20px 0 6px; }
.cat + .cat { margin-top: 14px; }
.cat .kicker { margin-bottom: 6px; }
a.btn { color: var(--color-on-accent); }
a.btn-secondary, a.btn-ghost { color: inherit; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .seg button { padding: 10px 9px; font-size: 13.5px; } }
.seg .short { display: none; }
@media (max-width: 520px) { .seg .long { display: none; } .seg .short { display: inline; } }

/* — contacts and radio — */
.contact { padding: 14px 0; border-bottom: 1px solid var(--color-hairline); }
.contact h4 { margin-bottom: 8px; }
.contact > .btn { margin-top: 6px; }
.contact-list { border-top: 2px solid var(--color-divider); }
.input.warn { border-color: var(--color-accent); background: var(--color-accent-100); }
.hint { font-size: 12px; color: var(--color-accent-800); min-height: 0; margin-top: 4px; }
.hint:empty { display: none; }
.table-wrap { overflow-x: auto; margin: 8px 0 12px; }
table.freq { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.freq th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); padding: 8px 8px 8px 0; border-bottom: 2px solid var(--color-divider); }
table.freq td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--color-hairline); }
table.freq td:first-child { font-weight: 600; }

/* — light / dark toggle — */
.top-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 70px; height: 48px; padding: 4px 8px; flex: none; border: 1px solid var(--color-accent-200); background: var(--color-accent-100); color: var(--color-accent-700); font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; }
.top-btn svg { width: 20px; height: 20px; }
/* Larger text on a small phone: drop the wordmark (the logo stays) so both buttons still fit. */
@media (max-width: 420px) { html[data-zoom] .brand-text { display: none; } html[data-zoom="1.3"] .top-btn { min-width: 64px; padding: 4px 6px; } }
.top-btn[aria-current="page"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.top-btn[aria-current="page"] .hh-dot { background: var(--color-on-accent); }
@media (hover: hover) { .top-btn:hover { border-color: var(--color-accent); } }
.hh-btn { position: relative; }
.hh-btn svg { width: 22px; height: 22px; }
.hh-btn[aria-current="page"] { border-color: var(--color-accent); color: var(--color-accent-ink); }
.hh-dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; background: var(--color-accent); }
.theme-btn { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--color-divider); background: transparent; color: var(--color-text); cursor: pointer; padding: 0; }
.theme-btn svg { width: 20px; height: 20px; }
@media (hover: hover) { .theme-btn:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); } }
.auth-top { display: flex; justify-content: flex-end; margin-bottom: -24px; }


/* very narrow phones (320px): keep the top bar on screen */
@media (max-width: 340px) { .topbar { gap: 6px; padding-left: 12px; padding-right: 12px; } .top-btn { min-width: 56px; padding: 4px 4px; font-size: 10px; } }
