/* The Off-Grid Toolkit — screen styles. Mobile first, no framework.
   Palette from the book cover: charcoal with contour lines, signal yellow, snow white.
   Signal yellow is only a FILL behind near-black text, or yellow text on charcoal; never yellow text on light. */

@font-face { font-family: "Anton"; src: url("../fonts/anton-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f4f1e8;          /* snow paper */
  --surface: #ffffff;
  --surface-2: #ebe7da;
  --text: #141614;
  --muted: #4a4f49;       /* 7.9:1 on --bg */
  --border: #cfc9b8;
  --strong-border: #141614;
  --ink: #121412;         /* charcoal (hero, tab bar) */
  --ink-2: #1d211d;
  --on-ink: #f2f0e8;
  --on-ink-muted: #b9bcb3;
  --accent: #f5c518;      /* signal yellow, fills only */
  --on-accent: #111111;   /* 12.6:1 on yellow */
  --accent-ink: #f5c518;  /* yellow text: only on charcoal (11:1) */
  --accent-dark: #7a5a00; /* "yellow" text on light surfaces: 6.4:1 on #fff */
  --link: #0b5d8a;        /* 6.6:1 on --bg */
  --focus: #0b5d8a;
  --ok: #1f7a3a; --ok-ink: #1f7a3a; --help: #b3261e; --left: #3d4a57;
  --r-vh: #b3261e; --r-vh-t: #ffffff;   /* 6.0:1 */
  --r-rh: #e8641b; --r-rh-t: #111111;   /* 6.0:1 */
  --r-rm: #f5c518; --r-rm-t: #111111;
  --r-rl: #9cc39a; --r-rl-t: #111111;
  --r-vl: #d5e6d0; --r-vl-t: #111111;
  --r-na: #d9d6cc; --r-na-t: #111111;
  --radius: 18px; --radius-s: 12px;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 10px 30px -18px rgba(20,22,20,.35);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --gutter: 16px;
  --tabbar-h: 0px;
  --topo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360' viewBox='0 0 360 360'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.4'%3E%3Cpath d='M40 180c0-70 60-120 140-120s140 50 140 120-60 125-140 125S40 250 40 180z'/%3E%3Cpath d='M75 182c0-52 46-90 106-90s104 38 104 90-44 92-104 92S75 234 75 182z'/%3E%3Cpath d='M112 184c0-34 30-58 70-58s68 24 68 58-29 60-68 60-70-26-70-60z'/%3E%3Cpath d='M148 186c0-16 15-28 34-28s32 12 32 28-14 28-32 28-34-12-34-28z'/%3E%3Cpath d='M-20 40c60 10 90-30 150-20s100 50 170 30 80-40 90-40'/%3E%3Cpath d='M-20 330c50-20 100 10 160 0s110-40 170-20 60 30 70 30'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1110; --surface: #181b18; --surface-2: #222622; --text: #f2f0e8; --muted: #b9bcb3; --border: #343a34; --strong-border: #f2f0e8;
    --ink: #0a0b0a; --ink-2: #161916; --accent-dark: #f5c518; --ok-ink: #6fd18a; --link: #8fd0ff; --focus: #f5c518;
    --r-vl: #2e4a33; --r-vl-t: #eaf3e6; --r-rl: #4f7d4f; --r-rl-t: #ffffff; --r-na: #2d312d; --r-na-t: #d8dad3;
    --shadow: 0 1px 0 rgba(255,255,255,.03), 0 16px 34px -20px rgba(0,0,0,.9);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1110; --surface: #181b18; --surface-2: #222622; --text: #f2f0e8; --muted: #b9bcb3; --border: #343a34; --strong-border: #f2f0e8;
  --ink: #0a0b0a; --ink-2: #161916; --accent-dark: #f5c518; --ok-ink: #6fd18a; --link: #8fd0ff; --focus: #f5c518;
  --r-vl: #2e4a33; --r-vl-t: #eaf3e6; --r-rl: #4f7d4f; --r-rl-t: #ffffff; --r-na: #2d312d; --r-na-t: #d8dad3;
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 16px 34px -20px rgba(0,0,0,.9);
}

html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
html.ts-large { font-size: 115%; }
html.ts-xl { font-size: 132%; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 500; font-size: 1.0625rem; line-height: 1.55; overflow-x: hidden; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6rem; text-wrap: balance; }
h2 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.6rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 0.85rem; text-wrap: pretty; }
cite { font-style: italic; }
small { font-size: 0.86em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 8px; }

/* ---------- SOS bar ---------- */
.sos-bar { background: var(--ink); color: var(--on-ink); font-size: 0.9rem; border-bottom: 3px solid var(--accent); }
.sos-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 44px; flex-wrap: wrap; }
.sos-text { font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; }
.sos-nums { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sos-call { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--on-ink); text-decoration: none; font-weight: 800; padding: 0.25rem 0.6rem; border: 2px solid rgba(255,255,255,.28); border-radius: 999px; min-height: 36px; }
.sos-call img { width: 20px; height: 15px; border-radius: 2px; }
.sos-call.is-here { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sos-call:focus-visible { outline-color: var(--accent); }

/* ---------- Header ---------- */
.site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 0.75rem; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); margin-right: auto; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--accent); flex: none; box-shadow: inset 0 0 0 2px rgba(245,197,24,.35); }
.brand-text { display: grid; min-width: 0; }
.brand-name { font-family: var(--display); font-size: 1.28rem; letter-spacing: 0.02em; line-height: 1.05; text-transform: uppercase; }
.brand-sub { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-nav { display: none; }
.header-tools { display: flex; align-items: center; gap: 0.4rem; }
.textsize, .unitsys { display: flex; align-items: center; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 999px; }
.ts-label { font-family: var(--cond); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); padding: 0 0.35rem 0 0.5rem; display: none; }
.ts-btn { min-width: 40px; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 700 0.95rem var(--font); cursor: pointer; display: inline-grid; place-items: center; }
.ts-btn-2 { font-size: 1.1rem; } .ts-btn-3 { font-size: 1.3rem; }
.ts-btn[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); }
.theme-btn { background: var(--surface-2); }
.status-row { display: flex; justify-content: flex-end; }
.status-row:has(.offline-badge[hidden]) { display: none; }
.offline-badge { font-size: 0.78rem; font-weight: 700; color: var(--ok-ink); padding: 0 0 4px; }
@media (max-width: 520px) { .textsize .ts-btn-1 { display: none; } .brand-sub { display: none; } .brand-name { font-size: 1.12rem; } }
@media (max-width: 380px) { .ts-btn { min-width: 36px; } .header-row { gap: 0.4rem; } }

/* ---------- Bottom tab bar (phones) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--ink); border-top: 3px solid var(--accent); padding-bottom: env(safe-area-inset-bottom); }
.tabbar > a, .tabbar summary { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 7px; min-height: 60px; color: var(--on-ink-muted); text-decoration: none; font: 700 0.72rem var(--cond); letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; list-style: none; }
.tabbar summary::-webkit-details-marker { display: none; }
.tabbar [aria-current="page"], .tabbar .menu[open] summary { color: var(--accent-ink); }
.tabbar [aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(245,197,24,.45)); }
.tabbar a:focus-visible, .tabbar summary:focus-visible { outline-color: var(--accent); outline-offset: -4px; }
.menu { position: relative; }
.menu-list { position: absolute; right: 8px; bottom: calc(100% + 10px); margin: 0; padding: 8px; list-style: none; background: var(--ink-2); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; min-width: 240px; box-shadow: 0 20px 40px rgba(0,0,0,.45); }
.menu-list a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; color: var(--on-ink); text-decoration: none; font-weight: 600; border-radius: 10px; }
.menu-list a:hover, .menu-list a[aria-current="page"] { background: rgba(245,197,24,.14); color: var(--accent-ink); }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) {
  .tabbar { display: none; }
  body { padding-bottom: 0; }
  .top-nav { display: flex; gap: 2px; order: 2; margin-right: 0.5rem; }
  .top-nav a { white-space: nowrap; color: var(--text); text-decoration: none; font-weight: 700; padding: 0.5rem 0.75rem; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
  .top-nav a:hover { background: var(--surface-2); }
  .top-nav a[aria-current="page"] { background: var(--ink); color: var(--accent-ink); }
  .header-tools { order: 3; }
  .ts-label { display: inline; }
}
@media (min-width: 960px) and (max-width: 1599px) { .ts-label { display: none; } }
@media (min-width: 960px) and (max-width: 1399px) { .brand-sub { display: none; } }
@media (min-width: 960px) and (max-width: 1180px) { .brand-sub { display: none; } .top-nav a { padding: 0.5rem 0.55rem; } }
@media (min-width: 1280px) { .header-row { flex-wrap: nowrap; } }

/* ---------- Layout ---------- */
main { padding: 1.25rem 0 2.5rem; min-height: 60vh; }
main:focus { outline: none; }
.view { animation: rise 0.28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }
.page-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); line-height: 1; display: flex; align-items: center; gap: 0.6rem; margin: 0.25rem 0 0.9rem; }
.page-title:focus { outline: none; }
.title-icon { width: 0.8em; height: 0.8em; background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 0.12em; }
.lead { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.28rem); max-width: 62ch; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1rem, 0.8rem + 1vw, 1.5rem); margin: 0 0 1rem; box-shadow: var(--shadow); }
.panel > h2, .panel h2:first-child { display: flex; align-items: center; gap: 0.5rem; }
.notice { background: var(--surface-2); border-left: 6px solid var(--accent); border-radius: var(--radius-s); padding: 0.85rem 1rem; margin: 0 0 1rem; }
.notice.calm { border-left-color: var(--ok-ink); }
.notice p:last-child { margin: 0; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.92rem; margin: 0.3rem 0 0; }
.source-note { color: var(--muted); font-size: 0.88rem; border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 1.25rem; max-width: 80ch; }
.status { min-height: 1.2em; font-weight: 600; color: var(--ok-ink); }
.loading { color: var(--muted); padding: 2rem 0; }
.kicker { display: inline-flex; align-items: center; gap: 0.4rem; font: 700 0.85rem var(--cond); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-dark); margin: 0 0 0.5rem; }

/* ---------- Buttons, chips, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 50px; padding: 0.6rem 1.15rem; border-radius: 14px; border: 2px solid transparent; font: 700 1rem var(--font); text-decoration: none; cursor: pointer; transition: transform 0.12s, background-color 0.15s; line-height: 1.15; text-align: left; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 #b38c00; }
.btn-primary:hover { background: #ffd23a; }
.btn-secondary { background: var(--ink); color: var(--on-ink); }
.btn-secondary:hover { background: #2a2f2a; }
:root[data-theme="dark"] .btn-secondary, :root[data-theme="dark"] .btn-quiet { border-color: var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-secondary { background: var(--surface-2); border-color: #4a514a; } }
:root[data-theme="dark"] .btn-secondary { background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--border); }
.btn-quiet:hover { border-color: var(--strong-border); }
.btn-danger { background: var(--help); color: #fff; }
.btn-done { background: var(--ok); color: #fff; }
.btn-lg { min-height: 58px; font-size: 1.1rem; padding: 0.7rem 1.4rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0; }
.btn-icon { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 12px; cursor: pointer; font: 700 1.1rem var(--font); }
.btn-icon:hover { border-color: var(--strong-border); }
.btn-icon:disabled { opacity: 0.35; cursor: default; }
.chip { min-height: 44px; padding: 0.35rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: 600 0.95rem var(--font); cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
:root[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); } }
.chip-row { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.15rem 0.1rem 0.5rem; margin: 0 0 0.35rem; scrollbar-width: thin; overscroll-behavior-x: contain; }
.chip-long { display: none; }
.field { display: grid; gap: 0.3rem; margin: 0 0 0.8rem; min-width: 0; }
.field label, .field legend, .zip-label, .setting-label { font-weight: 700; }
input[type="text"], input[type="search"], input[type="tel"], input[type="date"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; min-height: 50px; padding: 0.55rem 0.8rem; font: 500 1.05rem var(--font); color: var(--text); background: var(--surface); border: 2px solid var(--border); border-radius: 12px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--help); }
fieldset { border: 0; padding: 0; margin: 0 0 0.8rem; min-width: 0; }
legend { padding: 0; margin-bottom: 0.4rem; }
.field-error, .zip-msg.is-error { color: var(--help); font-weight: 700; }
:root[data-theme="dark"] .field-error, :root[data-theme="dark"] .zip-msg.is-error { color: #ff9b8f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error, :root:not([data-theme="light"]) .zip-msg.is-error { color: #ff9b8f; } }
input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--ink); flex: none; margin: 0.1rem 0 0; }
:root[data-theme="dark"] input[type="checkbox"] { accent-color: var(--accent); }
.check-l { display: flex; gap: 0.6rem; align-items: flex-start; min-height: 44px; padding: 0.45rem 0.6rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.check-l:has(input:checked) { border-color: var(--strong-border); background: var(--surface-2); }
.check-l small { display: block; color: var(--muted); font-size: 0.8rem; }
.check-grid { display: grid; gap: 0.45rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin: 0.8rem 0; }
.inline-form .field { flex: 1 1 200px; margin: 0; }

/* ---------- Home: bento ---------- */
.bento { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 1.25rem; }
.view-home { container-type: inline-size; }
.tile { position: relative; display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 1.05rem; color: var(--text); text-decoration: none; box-shadow: var(--shadow); overflow: hidden; transition: transform 0.18s, box-shadow 0.18s; }
a.tile:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -22px rgba(0,0,0,.5); }
.tile-k { display: flex; align-items: center; gap: 0.45rem; font: 700 0.92rem var(--cond); text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }
.tile-d { color: var(--muted); font-size: 0.95rem; }
.tile-s { font: 700 0.85rem var(--cond); letter-spacing: 0.05em; text-transform: uppercase; }
.tile-lock { margin-top: auto; align-self: flex-start; display: inline-flex; gap: 0.25rem; align-items: center; font: 700 0.72rem var(--cond); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.tile-lock .icon { width: 1em; height: 1em; }
.tile-hero { grid-column: 1 / -1; outline: 1px solid rgba(255,255,255,.06); outline-offset: -1px; background: var(--ink) var(--topo) center / 360px; color: var(--on-ink); border: 0; padding: clamp(1.3rem, 1rem + 2.5vw, 2.6rem); }
.tile-hero .kicker { color: var(--accent-ink); }
.hero-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.4rem, 1.4rem + 6vw, 5rem); line-height: 0.95; margin: 0.1rem 0 0.4rem; letter-spacing: 0.005em; }
.hero-title em { font-style: normal; color: var(--accent-ink); }
.hero-sub { color: var(--on-ink-muted); font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); max-width: 40ch; }
.tile-hero .zip-label { color: var(--on-ink); }
.tile-hero .zip-msg { color: var(--on-ink-muted); }
.tile-hero .zip-msg.is-error { color: #ffb4a8; }
.tile-hero .choose-btn { background: var(--ink-2); color: var(--on-ink); border-color: rgba(255,255,255,.2); }
.tile-hero :focus-visible { outline-color: var(--accent); }
.tile-hero a { color: #8fd0ff; }
.zip-form { margin: 0.8rem 0 0; max-width: 560px; }
.zip-label { display: block; margin-bottom: 0.35rem; font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.06em; }
.zip-row { display: flex; gap: 0.5rem; }
.zip-input { flex: 1 1 auto; min-width: 0; font: 700 clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem) var(--font) !important; letter-spacing: 0.12em; min-height: 64px !important; border-radius: 16px !important; text-align: center; }
.zip-hero .zip-input { background: #fff; color: #111; border-color: #fff; }
.zip-go { min-height: 64px; border-radius: 16px; flex: none; font-size: 1.1rem; }
.zip-msg { font-size: 0.92rem; margin: 0.45rem 0 0; color: var(--muted); }
.choose { margin: 0.8rem 0 0; }
.choose-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.choose-btn { width: 100%; display: flex; align-items: center; gap: 0.7rem; min-height: 56px; text-align: left; padding: 0.6rem 0.9rem; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: 600 1rem var(--font); cursor: pointer; }
.choose-btn:hover { border-color: var(--accent); }
.choose-btn small { display: block; color: inherit; opacity: 0.75; font-weight: 500; }
.saved-place { display: grid; gap: 0.45rem; margin: 0.4rem 0 0.4rem; padding: 0.85rem 1rem; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); color: var(--on-ink) !important; text-decoration: none; max-width: 640px; }
.sp-name { display: flex; gap: 0.4rem; align-items: center; font-weight: 800; font-size: 1.15rem; }
.sp-top { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.sp-go { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--accent-ink); font-weight: 700; }
.big-num { font-family: var(--display); font-size: clamp(2.6rem, 2rem + 3vw, 3.6rem); line-height: 1; }
.big-num small { font-size: 0.45em; color: var(--muted); }
.tile-projects { background: var(--accent); color: var(--on-accent); border: 0; }
.tile-projects .tile-d, .tile-projects .big-num small, .tile-projects .tile-lock { color: #3a3000; }
.fw-dots { display: flex; gap: 5px; margin-top: auto; }
.fw-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--strong-border); }
.fw-dots i.on { background: var(--ok); border-color: var(--ok-ink); }
.sign-mini { display: flex; gap: 0.4rem; }
.sign-mini b { font-family: var(--display); font-weight: 400; font-size: 1.7rem; padding: 0.05rem 0.6rem; border-radius: 10px; color: #fff; }
.s-ok { background: var(--ok); } .s-help { background: var(--help); }
.tile-calls .call-list { margin: 0.2rem 0 0.3rem; }
.tile-more { font-weight: 700; margin-top: auto; }
.tile-book { flex-direction: row; align-items: center; gap: 0.9rem; }
.tile-book img { width: 64px; height: auto; border-radius: 6px; box-shadow: 0 8px 18px rgba(0,0,0,.35); flex: none; }
.tile { grid-column: 1 / -1; }
.next-list li:nth-child(n+4) { display: none; }
.tile-projects .book-bars { flex: 1 1 64px; min-height: 64px; height: auto; }
.tile-stat { margin-top: auto; font: 700 0.85rem var(--cond); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.tile-stat strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: 0; margin-right: 0.1rem; }
.tile .tile-lock + .tile-stat, .tile-stat + .tile-lock { margin-top: 0; }
.tile-stat + .tile-lock { margin-top: 0.2rem; }
.book-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; align-items: stretch; height: 64px; margin: 0.3rem 0 0.1rem; }
.bb { display: flex; flex-direction: column; text-align: center; min-height: 0; }
.bb b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(17,17,17,.1); border-radius: 4px; overflow: hidden; min-height: 0; }
.bb i { display: block; background: rgba(17,17,17,.82); min-height: 3px; }
.bb small { font: 700 0.62rem var(--cond); color: #3a3000; }
.tile-projects .tile-s { color: #3a3000; margin-top: auto; }
.next-list { list-style: none; margin: 0.2rem 0 0.4rem; padding: 0; display: grid; gap: 0.35rem; }
.next-list li { display: flex; gap: 0.5rem; align-items: baseline; font-weight: 600; font-size: 0.95rem; line-height: 1.25; }
.nx-n { flex: none; min-width: 2.1em; text-align: center; font-family: var(--display); font-weight: 400; font-size: 0.95rem; background: var(--ink); color: var(--accent-ink); border-radius: 6px; padding: 0 0.25rem; }
.tile-fw .fw-dots { margin-top: auto; }
.houses { display: flex; gap: 6px; margin: 0.2rem 0; }
.houses i { width: 24px; height: 22px; background: var(--surface-2); clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%); }
.houses i.on { background: var(--ok); }
.tile-book img { width: 72px; }
/* Phones: 2 columns; tablets (>= 700 px of content): 8 columns; desktop (>= 1100 px): 12 columns. Every tile sits next to a tile of similar height. */
@container (min-width: 700px) {
  .bento { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .tile-hero { grid-column: span 8; }
  .tile-projects, .tile-fw, .tile-signs, .tile-kitchen, .tile-storm, .tile-block { grid-column: span 4; }
  .tile-calls { grid-column: span 8; }
  .tile-calls .call-compact { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .tile-book { grid-column: span 8; }
}
@container (min-width: 1100px) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tile-hero { grid-column: span 8; grid-row: span 2; }
  .tile-projects, .tile-fw { grid-column: span 4; }
  .tile-signs, .tile-kitchen, .tile-storm, .tile-block { grid-column: span 3; }
  .tile-calls { grid-column: span 8; }
  .tile-calls .call-compact { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .tile-book { grid-column: span 4; flex-direction: column; align-items: flex-start; justify-content: center; }
  .next-list li:nth-child(n+4) { display: flex; }
  .tile-book img { width: 110px; }
}
.unlocked-note { display: flex; gap: 0.5rem; align-items: center; color: var(--ok-ink); font-weight: 700; }
.code-card h2 { display: flex; gap: 0.5rem; align-items: center; }
.code-form { max-width: 460px; }
.start-here, .fw-link { display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1.1rem; border-radius: var(--radius); background: var(--ink); color: var(--on-ink); text-decoration: none; margin: 0 0 1rem; min-height: 64px; }
.start-here strong, .fw-link strong { display: block; color: var(--accent-ink); }
.start-here .icon, .fw-link > .icon:first-child { width: 2rem; height: 2rem; color: var(--accent-ink); }
.fw-link span { flex: 1; }

/* ---------- Calls ---------- */
.call-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.call-compact { grid-template-columns: 1fr; gap: 0.35rem; }
.call-btn { display: flex; align-items: center; gap: 0.7rem; min-height: 56px; padding: 0.55rem 0.9rem; border-radius: 14px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.call-btn:hover { background: var(--accent); color: var(--on-accent); }
.call-num { font: 800 1.2rem var(--font); white-space: nowrap; }
.call-label { display: grid; font-weight: 600; min-width: 0; }
.call-label small { color: inherit; opacity: 0.8; font-weight: 500; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.link-list li { display: grid; }
.link-note { color: var(--muted); font-size: 0.92rem; }

/* ---------- Risk ---------- */
.risk-search .zip-form { max-width: 620px; }
.manual { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.manual summary, .hz-more summary, .pg-books summary, .near summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.manual-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 0.6rem; }
.result { margin: 1.25rem 0; scroll-margin-top: 90px; }
.result-head { background: var(--ink) var(--topo) center / 300px; color: var(--on-ink); border-radius: 22px; padding: clamp(1.1rem, 0.9rem + 1.5vw, 1.9rem); margin-bottom: 1rem; }
.result-head .kicker { color: var(--accent-ink); }
.result-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.9rem, 1.2rem + 3.6vw, 3.6rem); line-height: 1; }
.result-title:focus { outline: none; }
.result-overall, .result-top { margin: 0.4rem 0 0; color: var(--on-ink-muted); }
.result-top strong { color: var(--on-ink); }
.result-explain { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.6rem 0 0; max-width: 78ch; font-size: 0.92rem; color: var(--on-ink-muted); }
.result-explain .icon { color: var(--accent-ink); margin-top: 0.1rem; }
.rbadge { display: inline-flex; align-items: center; gap: 0.35rem; font: 700 0.82rem var(--cond); letter-spacing: 0.05em; text-transform: uppercase; padding: 0.22rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.rdot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.r-vh .rbadge, .rbadge.r-vh, .chip-hz.r-vh { background: var(--r-vh); color: var(--r-vh-t); }
.r-rh .rbadge, .rbadge.r-rh, .chip-hz.r-rh { background: var(--r-rh); color: var(--r-rh-t); }
.r-rm .rbadge, .rbadge.r-rm, .chip-hz.r-rm { background: var(--r-rm); color: var(--r-rm-t); }
.r-rl .rbadge, .rbadge.r-rl { background: var(--r-rl); color: var(--r-rl-t); }
.r-vl .rbadge, .rbadge.r-vl { background: var(--r-vl); color: var(--r-vl-t); }
.r-na .rbadge, .rbadge.r-na { background: var(--r-na); color: var(--r-na-t); }
.hz-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.hz-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1rem 1.05rem 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.45rem; border-top: 8px solid var(--r-na); }
.hz-card.r-vh { border-top-color: var(--r-vh); } .hz-card.r-rh { border-top-color: var(--r-rh); } .hz-card.r-rm { border-top-color: var(--r-rm); }
.hz-top { display: flex; justify-content: space-between; align-items: center; }
.hz-icon { width: 2.6rem; height: 2.6rem; padding: 0.45rem; border-radius: 14px; background: var(--surface-2); }
.hz-card.r-vh .hz-icon { background: var(--r-vh); color: #fff; }
.hz-card.r-rh .hz-icon { background: var(--r-rh); color: #111; }
.hz-card.r-rm .hz-icon { background: var(--r-rm); color: #111; }
.hz-rank { font-family: var(--display); font-size: 1.7rem; color: var(--muted); line-height: 1; }
.hz-name { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.7rem; letter-spacing: 0.01em; margin: 0.1rem 0 0; }
.hz-card .rbadge { align-self: flex-start; }
.rmeter { display: flex; gap: 4px; }
.rmeter i { flex: 1; height: 7px; border-radius: 4px; background: var(--surface-2); }
.r-vh .rmeter i.on { background: var(--r-vh); } .r-rh .rmeter i.on { background: var(--r-rh); } .r-rm .rmeter i.on { background: #d4a800; }
.hz-what { margin: 0; }
.hz-score { margin: 0; font-size: 0.9rem; color: var(--muted); }
.hz-focus { margin: 0.2rem 0 0; font-size: 0.95rem; border-top: 1px dashed var(--border); padding-top: 0.5rem; }
.hz-more { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0.3rem 1rem; margin: 0 0 0.7rem; }
.hz-mini { list-style: none; padding: 0 0 0.6rem; margin: 0; display: grid; gap: 0.35rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.hz-mini li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; }
.hz-mini li > span:not(.rbadge) { flex: 1; font-weight: 600; }
.hz-icon-s { width: 1.5rem; height: 1.5rem; }
.always-box { border-left: 6px solid var(--accent); background: var(--surface-2); border-radius: 12px; padding: 0.75rem 1rem; margin: 0 0 1rem; }
.always-box p { display: flex; gap: 0.6rem; margin: 0; }
.result-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0; }
.chip-hz { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem 0.2rem 0.45rem; border-radius: 999px; background: var(--surface-2); color: var(--text); font: 700 0.85rem var(--cond); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0.2rem 0.25rem 0; }
.chip-hz .icon { width: 1.1em; height: 1.1em; }

/* ---------- Plan ---------- */
.plan-head { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.plan-head > div:first-child { flex: 1 1 280px; }
.plan-head .kicker { color: var(--text); font-size: 1.05rem; }
.ring { --p: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring span { width: 84px; height: 84px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--display); font-size: 1.8rem; line-height: 1; }
.ring small { font-size: 0.5em; color: var(--muted); }
.plan-level { margin: 1.25rem 0; }
.lvl-h { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); }
.lvl-h small { font: 700 0.9rem var(--cond); color: var(--muted); letter-spacing: 0.05em; margin-left: auto; }
.lvl-tag { display: inline-flex; align-items: center; font: 700 0.78rem var(--cond); text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.55rem; border-radius: 8px; white-space: nowrap; }
.lvl-1 { background: var(--accent); color: var(--on-accent); }
.lvl-2 { background: var(--ink); color: var(--on-ink); }
.lvl-3 { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--strong-border); }
:root[data-theme="dark"] .lvl-2 { background: #39413a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lvl-2 { background: #39413a; } }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.plan-item { display: flex; align-items: stretch; gap: 0.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0.5rem; }
.plan-item.is-done { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); }
.plan-item.is-done .plan-title { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--ok-ink); }
.plan-link { flex: 1; min-width: 0; display: grid; text-decoration: none; color: var(--text); padding: 0.2rem 0.3rem; border-radius: 10px; }
.plan-num { font: 700 0.8rem var(--cond); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.plan-title { font-weight: 700; font-size: 1.05rem; }
.plan-why { font-size: 0.88rem; color: var(--muted); }
.tick { width: 52px; min-height: 52px; flex: none; border-radius: 14px; border: 2.5px solid var(--strong-border); background: transparent; color: transparent; display: grid; place-items: center; cursor: pointer; }
.tick[aria-pressed="true"] { background: var(--ok); border-color: var(--ok-ink); color: #fff; }
.tick:hover { color: var(--muted); }
.tick[aria-pressed="true"]:hover { color: #fff; }
.tick-ph { width: 52px; min-height: 52px; flex: none; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--display); font-size: 1.2rem; }

/* ---------- Projects list ---------- */
.progress-panel .pg-total { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.pg-levels { flex: 1 1 260px; display: grid; gap: 0.2rem; }
.pg-levels p { margin: 0.3rem 0 0; display: flex; gap: 0.5rem; align-items: center; }
.pg-levels strong { margin-left: auto; }
.pbar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pbar span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.pg-books { margin-top: 0.8rem; border-top: 1px solid var(--border); padding-top: 0.4rem; }
.pg-book-list { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.6rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.pg-book-list li { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.5rem; font-size: 0.95rem; }
.pg-book-list .pbar { grid-column: 1 / -1; }
.filters { position: sticky; top: 61px; z-index: 5; background: var(--bg); padding: 0.4rem 0 0.2rem; margin: 0 0 0.4rem; }
.search-field input { min-height: 54px; font-size: 1.1rem; }
.count { font-weight: 700; color: var(--muted); margin: 0.2rem 0 0.6rem; }
.pj-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.pj-tile { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 0.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 0.8rem 0.8rem 0.6rem 0.95rem; box-shadow: var(--shadow); }
.pj-tile.is-done { border-color: var(--ok-ink); }
.pj-tile.is-done .pj-num { background: var(--ok); color: #fff; }
.pj-link { display: grid; gap: 0.25rem; text-decoration: none; color: var(--text); min-width: 0; }
.pj-link::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.pj-tile .tick { position: relative; z-index: 2; width: 46px; min-height: 46px; }
.pj-meta { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.pj-num { font-family: var(--display); font-size: 1.05rem; min-width: 2.2em; text-align: center; padding: 0.05rem 0.35rem; border-radius: 8px; background: var(--ink); color: var(--accent-ink); }
.fw-tag { font: 700 0.72rem var(--cond); text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-dark); }
.pj-title { font-weight: 700; font-size: 1.04rem; line-height: 1.25; }
.pj-sub { color: var(--muted); font-size: 0.86rem; }
.pj-date { grid-column: 1 / -1; font-size: 0.8rem; font-weight: 700; color: var(--ok-ink); }
.pj-date:empty { display: none; }
@media (min-width: 760px) { .chip-long { display: inline; } .chip-row { flex-wrap: wrap; overflow: visible; } .filters { position: static; } }

/* ---------- Project card ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; font-size: 0.92rem; color: var(--muted); margin: 0 0 0.6rem; }
.crumbs a { display: inline-flex; align-items: center; gap: 0.2rem; font-weight: 700; min-height: 44px; }
.pcard { container-type: inline-size; }
.pc-head { background: var(--ink) var(--topo) center / 320px; color: var(--on-ink); border-radius: 24px; padding: clamp(1.1rem, 0.9rem + 2vw, 2.2rem); margin: 0 0 1rem; }
.pc-kicker { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0 0 0.5rem; }
.pc-n { font: 700 0.95rem var(--cond); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.pc-head .fw-tag { color: var(--accent-ink); }
.pc-head .lvl-3 { background: transparent; color: var(--on-ink); box-shadow: inset 0 0 0 1.5px var(--on-ink); }
.pc-head .lvl-2 { background: #3a413a; }
.pc-title { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.6rem); margin: 0 0 0.9rem; }
.pc-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pc-meta li { display: flex; gap: 0.5rem; align-items: center; background: rgba(255,255,255,.07); border-radius: 12px; padding: 0.5rem 0.7rem; min-width: 0; }
.pc-meta .icon { color: var(--accent-ink); }
.pc-meta span { display: grid; min-width: 0; font-weight: 700; }
.pc-meta small { font: 700 0.72rem var(--cond); letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-ink-muted); }
.pc-hz { margin: 0.9rem 0 0; color: var(--on-ink-muted); }
.pc-head .chip-hz { background: rgba(255,255,255,.1); color: var(--on-ink); }
.pc-done-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0 0 1rem; }
.pc-done-row input[type="date"] { width: auto; }
.pc-date-l { font-weight: 700; margin-left: 0.4rem; }
.pc-why { font-size: 1.12rem; max-width: 70ch; }
.pc-cols { display: grid; gap: 1rem; }
.pc-need, .pc-steps, .pc-note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.pc-need h3, .pc-steps h3, .pc-note h3 { font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.15rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.checklist label { display: flex; gap: 0.6rem; align-items: flex-start; min-height: 44px; cursor: pointer; padding: 0.35rem 0.2rem; border-radius: 10px; }
.checklist label:has(input:checked) span { text-decoration: line-through; color: var(--muted); }
.pc-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 0.7rem; }
.pc-steps ol > li { counter-increment: s; position: relative; padding-left: 2.6rem; min-height: 2rem; }
.pc-steps ol > li::before { content: counter(s); position: absolute; left: 0; top: -0.1rem; width: 2rem; height: 2rem; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-family: var(--display); display: grid; place-items: center; font-size: 1.05rem; }
.pc-steps ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.pc-note { margin: 1rem 0 0; }
.pc-box { border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 1rem 0; border: 2px solid var(--border); background: var(--surface); }
.pc-box p:last-child { margin: 0; }
.box-label { display: flex; align-items: center; gap: 0.45rem; font: 700 0.95rem var(--cond); text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 0.35rem !important; }
.box-warning { background: var(--ink); color: var(--on-ink); border: 0; border-left: 10px solid var(--accent); }
.box-warning .box-label { color: var(--accent-ink); }
.box-tip { border-color: var(--accent); }
.box-tip .box-label { color: var(--accent-dark); }
.box-check { border-style: dashed; }
.pc-done { font-size: 1.08rem; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 2px solid var(--ok); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 1rem 0; }
.pc-see { display: flex; gap: 0.5rem; color: var(--muted); }
.pc-nav { display: flex; justify-content: space-between; gap: 0.6rem; margin: 1.2rem 0; }
.table-wrap { overflow-x: auto; max-width: 100%; border-radius: 12px; }
.pc-table, .log-table, .menu-table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.pc-table th, .pc-table td, .log-table th, .log-table td, .menu-table th, .menu-table td { border-bottom: 1px solid var(--border); padding: 0.55rem 0.6rem; text-align: left; vertical-align: top; }
.pc-table thead th, .log-table thead th, .menu-table thead th { font: 700 0.85rem var(--cond); text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); }
@container (min-width: 760px) {
  .pc-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
  .pc-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Quotes from the book ---------- */
.quote { margin: 0 0 0.9rem; padding: 0.7rem 1rem; border-left: 5px solid var(--accent); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.quote p { margin: 0 0 0.3rem; }
.quote cite, .src { display: block; font: 700 0.8rem var(--cond); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.quote-list { margin: 0 0 0.3rem; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.never-box { background: var(--ink) var(--topo) center / 300px; color: var(--on-ink); border-radius: var(--radius); padding: clamp(1rem, 0.8rem + 1.5vw, 1.6rem); margin: 0 0 1rem; border-left: 10px solid var(--accent); }
.never-box .sec-label { display: flex; gap: 0.5rem; align-items: center; color: var(--accent-ink); font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); }
.never-box .quote { background: rgba(255,255,255,.06); }
.never-box .quote cite, .never-box .src { color: var(--on-ink-muted); }
.two-col { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.two-col h3 { color: var(--accent-ink); font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Tabs, lists, logs ---------- */
.tabs { display: flex; gap: 0.4rem; overflow-x: auto; margin: 0 0 1rem; padding-bottom: 0.3rem; }
.tab { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 48px; padding: 0 1rem; border-radius: 999px; border: 1.5px solid var(--border); text-decoration: none; color: var(--text); font-weight: 700; white-space: nowrap; background: var(--surface); }
.tab[aria-current="page"] { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.room-list, .item-list, .tree, .meal-list { list-style: none; padding: 0; margin: 0; }
.room details > summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; align-items: center; cursor: pointer; min-height: 48px; }
.room-name { font-family: var(--display); font-size: 1.4rem; text-transform: uppercase; }
.room-count { font: 700 0.85rem var(--cond); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.room-checks { display: grid; gap: 0.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); margin: 0.6rem 0; }
.room-photos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }
.thumb { position: relative; margin: 0; }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--surface-2); display: block; }
.thumb-x { position: absolute; top: -8px; right: -8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--help); color: #fff; font-size: 1.2rem; cursor: pointer; }
.file-btn { cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.room-sub { margin-top: 0.8rem; font-family: var(--cond); text-transform: uppercase; letter-spacing: 0.05em; }
.item-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--border); padding: 0.35rem 0; }
.total-line { font-size: 1.1rem; }
.late { color: var(--help); }
.log-table tr.is-done td { color: var(--muted); text-decoration: line-through; }
.row-act { white-space: nowrap; text-align: right; }
.row-act .btn-icon { margin-left: 0.25rem; }
@media (max-width: 640px) {
  .log-table thead { display: none; }
  .log-table, .log-table tbody, .log-table tr, .log-table td { display: block; width: 100%; }
  .log-table tr { border: 1px solid var(--border); border-radius: 14px; padding: 0.5rem 0.7rem; margin: 0 0 0.6rem; background: var(--surface); }
  .log-table td { border: 0; padding: 0.2rem 0; }
  .log-table td[data-l]::before { content: attr(data-l) ": "; font: 700 0.8rem var(--cond); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
  .row-act { text-align: left; }
}
.clear-control { margin: 1rem 0; }
.clear-confirm { background: var(--surface-2); border-radius: 12px; padding: 0.8rem 1rem; }

/* ---------- Block Ready ---------- */
.sign-pick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin: 0 0 0.5rem; }
.sign-btn { display: grid; justify-items: start; gap: 0.2rem; padding: 1.2rem 1.3rem; border-radius: 22px; border: 0; color: #fff; cursor: pointer; text-align: left; min-height: 150px; font: inherit; box-shadow: var(--shadow); }
.sign-word { font-family: var(--display); font-size: clamp(3.2rem, 2.4rem + 4vw, 5rem); line-height: 1; }
.sign-hint { font-weight: 700; }
.sign-ok { background: var(--ok); } .sign-help { background: var(--help); } .sign-left { background: var(--left); }
.sign-btn:focus-visible { outline: 4px solid var(--strong-border); outline-offset: 4px; }
.sign-full { position: fixed; inset: 0; z-index: 2147483600; display: grid; place-content: center; text-align: center; color: #fff; padding: 24px; }
.sign-full[hidden] { display: none; }
.sf-word { font-family: var(--display); font-size: min(46vw, 42vh); line-height: 0.9; margin: 0; }
.sf-line { font-family: var(--display); font-size: min(9vw, 9vh); margin: 0.2em 0 0; letter-spacing: 0.04em; }
.sf-sub { font-size: min(5vw, 5vh); font-weight: 700; margin: 0.4em 0 0; }
.sf-close { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; display: inline-flex; gap: 0.4rem; align-items: center; min-height: 52px; padding: 0 1rem; border-radius: 999px; border: 2px solid rgba(255,255,255,.7); background: rgba(0,0,0,.25); color: #fff; font: 700 1rem var(--font); cursor: pointer; }
body.sign-on { overflow: hidden; }
.block-map { overflow: hidden; }
.bm-row { list-style: none; margin: 0; padding: 0.4rem 0; display: flex; gap: 0.5rem; overflow-x: auto; min-height: 90px; }
.bm-home { display: grid; gap: 0.1rem; place-items: center; min-width: 92px; min-height: 84px; padding: 0.4rem; border-radius: 14px 14px 6px 6px; border: 2px solid var(--strong-border); background: var(--surface); color: var(--text); font: 600 0.95rem var(--font); cursor: pointer; position: relative; }
.bm-home small { font: 700 0.72rem var(--cond); text-transform: uppercase; letter-spacing: 0.04em; }
.bm-home.st-ok { background: var(--ok); color: #fff; border-color: var(--ok-ink); }
.bm-home.st-help { background: var(--help); color: #fff; border-color: var(--help); }
.bm-home.st-away { background: var(--left); color: #fff; border-color: var(--left); }
.bm-flag { position: absolute; top: 4px; right: 6px; font-weight: 900; color: var(--help); }
.st-help .bm-flag, .st-ok .bm-flag, .st-away .bm-flag { color: #fff; }
.bm-skill { position: absolute; top: 4px; left: 6px; font-size: 0.75rem; font-weight: 800; }
.bm-street { background: var(--ink); color: var(--on-ink); border-radius: 8px; padding: 0.5rem 1rem; text-align: center; font: 700 0.9rem var(--cond); letter-spacing: 0.3em; text-transform: uppercase; background-image: linear-gradient(90deg, var(--accent) 50%, transparent 0); background-size: 40px 3px; background-repeat: repeat-x; background-position: 0 50%; }
.bm-street span { background: var(--ink); padding: 0 0.6rem; }
.tree li { padding: 0.45rem 0; border-bottom: 1px solid var(--border); }

/* ---------- Kitchen ---------- */
.staple-group { margin: 0 0 1rem; }
.staple-group legend { font: 700 1rem var(--cond); letter-spacing: 0.05em; text-transform: uppercase; }
.meal-list { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.meal { display: grid; gap: 0.2rem; padding: 0.7rem 0.9rem; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.meal-cold { border-left: 6px solid var(--ok); } .meal-cook { border-left: 6px solid var(--r-rh); }
.meal-tag { display: inline-flex; gap: 0.3rem; align-items: center; font: 700 0.78rem var(--cond); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.meal-name { font-weight: 700; }
.meal small { color: var(--muted); }
.near { margin-top: 0.8rem; }
.warn-line { display: flex; gap: 0.5rem; background: var(--surface-2); border-left: 6px solid var(--help); padding: 0.6rem 0.8rem; border-radius: 0 12px 12px 0; margin-top: 0.8rem; }
.menu-table td { min-width: 9rem; }
.mt-cook { color: var(--r-rh); }
@media (max-width: 640px) {
  .menu-table thead { display: none; }
  .menu-table, .menu-table tbody, .menu-table tr, .menu-table th, .menu-table td { display: block; width: 100%; }
  .menu-table tr { border: 1px solid var(--border); border-radius: 14px; margin: 0 0 0.5rem; padding: 0.4rem 0.7rem; }
  .menu-table th[scope="row"]::before { content: "Day "; }
  .menu-table th, .menu-table td { border: 0; padding: 0.15rem 0; }
  .menu-table td::before { content: attr(data-l) ": "; font: 700 0.8rem var(--cond); text-transform: uppercase; color: var(--muted); }
}

/* ---------- Books, about ---------- */
.kit-panel, .about-book { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: start; }
.kit-cover, .about-cover { width: min(220px, 60%); height: auto; border-radius: 8px; box-shadow: 0 16px 34px rgba(0,0,0,.35); }
@media (min-width: 700px) { .kit-panel, .about-book { grid-template-columns: 220px 1fr; } .kit-cover, .about-cover { width: 100%; } }
.setting { padding: 0.8rem 0; border-top: 1px solid var(--border); }
.setting:first-of-type { border-top: 0; }

/* ---------- Private area (from the sister site) ---------- */
.pv-login { display: grid; gap: 0.6rem; max-width: 26rem; }
.pv-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.pv-nav h2 { margin: 0; text-align: center; flex: 1; }
.pv-nav .btn { min-width: 52px; font-size: 1.5rem; }
.pv-totals { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 0.9rem 0; }
.pv-chart { width: 100%; height: auto; display: block; }
.pv-bar { fill: var(--accent); }
.pv-grid { stroke: currentColor; stroke-opacity: 0.15; stroke-width: 1; }
.pv-axis { fill: currentColor; font-size: 12px; opacity: 0.75; }
.pv-year { border-top: 2px solid currentColor; padding: 0.5rem 0; }
.pv-year summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 600; }
.pv-year ul { list-style: none; margin: 0.3rem 0 0; padding: 0; }
.pv-month { display: flex; justify-content: space-between; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 0.6rem 0.2rem; font: inherit; color: inherit; cursor: pointer; }
.pv-month:hover, .pv-month.is-sel { background: var(--accent); color: var(--on-accent); }
.pv-note { font-size: 0.9rem; color: var(--muted); }
.pv-clicks { border-collapse: collapse; width: 100%; }
.pv-clicks th, .pv-clicks td { border-bottom: 1px solid var(--border); padding: 0.4rem; text-align: left; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink) var(--topo) center / 360px; color: var(--on-ink-muted); padding: 2rem 0 1.5rem; font-size: 0.95rem; }
.site-footer a { color: var(--on-ink); }
.site-footer a:focus-visible { outline-color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-private { opacity: 0.7; }
.footer-src { font-size: 0.82rem; }
.print-book-line, #print-root { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media (forced-colors: active) { .tick[aria-pressed="true"], .chip[aria-pressed="true"], .ts-btn[aria-pressed="true"] { outline: 3px solid CanvasText; } }
