/* Household emergency kit (AMERG) — shared styles. All text 16px or more (agreed 23 Nov 2026)
   Layout idea: calm, gallery-like pages of large rounded tiles on soft grey,
   one warm "signal" colour used sparingly for the brand and progress. */
:root {
  --bg: #ffffff;
  --tile: #f5f5f7;
  --tile-2: #e8e8ed;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --link: #0066cc;
  --signal: #f56300;
  --signal-2: #ffb340;
  --good: #1f9d55;
  --warn: #c77700;
  --danger: #d70015;
  --night: #0b0b0d;
  --night-ink: #f5f5f7;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.08);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius-xl: 28px;
  --radius-l: 20px;
  --radius-m: 14px;
  --wrap: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --tile: #161617; --tile-2: #232326; --ink: #f5f5f7; --muted: #a1a1a6;
    --line: #38383d; --link: #2997ff; --signal: #ff7a1f; --signal-2: #ffb340;
    --good: #30d158; --warn: #ffb340; --danger: #ff453a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --tile: #161617; --tile-2: #232326; --ink: #f5f5f7; --muted: #a1a1a6;
  --line: #38383d; --link: #2997ff; --signal: #ff7a1f; --signal-2: #ffb340;
  --good: #30d158; --warn: #ffb340; --danger: #ff453a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.47; letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -0.03em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { color: var(--ink); opacity: .8; font-size: 16px; letter-spacing: -0.01em; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; text-decoration: none; }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); font-size: 22px; padding: 8px; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 52px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 22px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 20px; font-weight: 600; opacity: 1; border-bottom: 1px solid var(--line); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 17px; font-weight: 500; line-height: 1;
  padding: 13px 22px; border-radius: 980px; border: 1px solid transparent; cursor: pointer;
  background: var(--link); color: #fff; transition: transform .15s ease, filter .15s ease, background .15s;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn.secondary { background: transparent; color: var(--link); border-color: var(--link); }
.btn.quiet { background: var(--tile-2); color: var(--ink); }
.btn.signal { background: linear-gradient(135deg, var(--signal), #ff8a2a); }
.btn.small { font-size: 16px; padding: 9px 16px; }
.link-arrow { font-size: 17px; display: inline-flex; align-items: center; gap: 4px; }
.link-arrow::after { content: "›"; font-size: 1.25em; line-height: 1; transform: translateY(-1px); }
.actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: center; }

/* ---------- Typography helpers ---------- */
.eyebrow { font-size: 17px; font-weight: 600; color: var(--signal); letter-spacing: -0.01em; }
.headline { font-size: clamp(40px, 7vw, 80px); line-height: 1.04; font-weight: 700; }
.title { font-size: clamp(32px, 5vw, 56px); line-height: 1.07; font-weight: 700; }
.subtitle { font-size: clamp(21px, 2.6vw, 28px); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.lede { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.38; color: var(--muted); font-weight: 400; max-width: 34em; }
.muted { color: var(--muted); }
.gradient-text {
  background: linear-gradient(100deg, var(--signal) 0%, var(--signal-2) 55%, #ff375f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Sections & tiles ---------- */
section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-grey { background: var(--tile); }
.section-night { background: var(--night); color: var(--night-ink); }
.section-night .lede, .section-night .muted { color: #a1a1a6; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-l { display: flex; flex-direction: column; gap: 28px; }

.hero { padding: 72px 0 40px; text-align: center; overflow: hidden; }
.hero .stack { align-items: center; }
.hero-art { margin: 44px auto 0; max-width: 980px; }
.hero-art svg { width: 100%; height: auto; display: block; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--tile);
  padding: 44px 36px 0; min-height: 520px; display: flex; flex-direction: column; align-items: center; text-align: center;
  color: var(--ink); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow); }
.tile.dark { background: #111113; color: #f5f5f7; }
.tile.dark .muted { color: #a1a1a6; }
.tile .stack { align-items: center; gap: 10px; }
.tile h3 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 700; }
.tile p { font-size: 19px; }
.tile .art { margin-top: auto; width: 100%; display: flex; justify-content: center; padding-top: 28px; }
.tile .art svg { width: 100%; max-width: 420px; height: auto; display: block; }
.tile .link-arrow { color: var(--link); }
.tile.dark .link-arrow { color: #2997ff; }
.tile.wide { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 460px; padding: 36px 22px 0; }
}

.card { background: var(--bg); border-radius: var(--radius-l); padding: 28px; box-shadow: var(--shadow); }
.section-grey .card { background: var(--bg); }
.card.flat { box-shadow: none; background: var(--tile); }

/* Essentials grid */
.essentials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.essential { background: var(--bg); border-radius: var(--radius-l); padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; }
.essential .glyph {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 28px;
  color: #fff; background: linear-gradient(145deg, var(--c1, #ff9f0a), var(--c2, #f56300));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c2, #f56300) 35%, transparent);
}
.essential h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.essential p { color: var(--muted); font-size: 16px; }
@media (max-width: 900px) { .essentials { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .essentials { grid-template-columns: 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.step { display: flex; flex-direction: column; gap: 10px; }
.step .num { font-family: var(--font-display); font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.step h3 { font-size: 24px; font-weight: 600; }
.step p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* Numbers strip */
.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #2c2c2e; border-radius: var(--radius-l); overflow: hidden; }
.number { background: #161617; padding: 26px 24px; display: flex; flex-direction: column; gap: 6px; }
.number .digits { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.number .digits.long { font-size: 26px; }
.number .what { color: #f5f5f7; font-weight: 600; font-size: 17px; }
.number .when { color: #a1a1a6; font-size: 16px; }
@media (max-width: 760px) { .numbers { grid-template-columns: 1fr; } }

/* Callout */
.callout { display: flex; gap: 16px; align-items: flex-start; border-radius: var(--radius-m); padding: 18px 20px; background: color-mix(in srgb, var(--signal) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--signal) 30%, transparent); }
.callout .icon { font-size: 24px; color: var(--signal); margin-top: 2px; }
.callout.danger { background: color-mix(in srgb, var(--danger) 8%, var(--bg)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.callout.danger .icon { color: var(--danger); }
.callout.info { background: color-mix(in srgb, var(--link) 7%, var(--bg)); border-color: color-mix(in srgb, var(--link) 28%, transparent); }
.callout.info .icon { color: var(--link); }
.callout p { font-size: 16px; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: 64px 0 36px; text-align: center; }
.page-head .stack { align-items: center; }
.page-head .head-icon { width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; font-size: 40px; color: #fff; background: linear-gradient(145deg, var(--c1, #ff9f0a), var(--c2, #f56300)); box-shadow: 0 10px 28px color-mix(in srgb, var(--c2, #f56300) 35%, transparent); margin-bottom: 8px; }

/* ---------- Segmented control ---------- */
.segmented { display: inline-flex; background: var(--tile-2); padding: 4px; border-radius: 980px; gap: 2px; flex-wrap: wrap; justify-content: center; }
.segmented button, .segmented a {
  font: inherit; font-size: 16px; font-weight: 500; border: 0; background: transparent; color: var(--ink);
  padding: 9px 18px; border-radius: 980px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.segmented a:hover { text-decoration: none; }
.segmented [aria-selected="true"] { background: var(--bg); box-shadow: 0 2px 8px rgba(0,0,0,.12); font-weight: 600; }

/* ---------- Guides ---------- */
.guide { display: none; }
.guide.active { display: block; }
.guide-hero { border-radius: var(--radius-xl); overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; background: var(--tile); }
.guide-hero .copy { padding: 44px; display: flex; flex-direction: column; gap: 14px; }
.guide-hero .copy h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 700; line-height: 1.08; }
.guide-hero svg { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .guide-hero { grid-template-columns: 1fr; } .guide-hero .copy { padding: 32px 24px 8px; } }
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.phase { background: var(--tile); border-radius: var(--radius-l); padding: 28px 26px; }
.phase h3 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.phase h3 .pill { font-size: 16px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 4px 10px; border-radius: 980px; background: var(--tile-2); color: var(--muted); }
.phase ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.phase li { display: flex; gap: 10px; font-size: 16px; line-height: 1.45; }
.phase li .icon { color: var(--signal); margin-top: 3px; font-size: 17px; }
@media (max-width: 900px) { .phases { grid-template-columns: 1fr; } }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.level { border-radius: var(--radius-l); padding: 22px 24px; background: var(--tile); border-top: 6px solid var(--lc); }
.level strong { display: block; font-size: 18px; margin-bottom: 4px; }
.level span { color: var(--muted); font-size: 16px; }
@media (max-width: 760px) { .levels { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: -0.005em; }
input[type="text"], input[type="tel"], input[type="number"], textarea, select {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 4px color-mix(in srgb, var(--link) 22%, transparent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Stepper */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.stepper:last-child { border-bottom: 0; }
.stepper .who { display: flex; align-items: center; gap: 14px; }
.stepper .who .icon { font-size: 26px; color: var(--signal); }
.stepper .who strong { display: block; font-size: 17px; }
.stepper .who small { color: var(--muted); font-size: 16px; }
.stepper .ctrl { display: flex; align-items: center; gap: 10px; }
.stepper .ctrl button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tile-2); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.stepper .ctrl button:hover { background: var(--line); }
.stepper .ctrl output { min-width: 2ch; text-align: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Calculator layout */
.calc { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.calc .panel { background: var(--tile); border-radius: var(--radius-xl); padding: 14px 28px 24px; position: sticky; top: 70px; }
.calc .panel h2 { font-size: 22px; font-weight: 600; padding: 16px 0 4px; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } .calc .panel { position: static; } }
.days-range { width: 100%; accent-color: var(--signal); }
.results { display: flex; flex-direction: column; gap: 14px; }
.big-water { border-radius: var(--radius-xl); padding: 36px; background: linear-gradient(160deg, #0a84ff 0%, #0040dd 100%); color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; overflow: hidden; }
.big-water .num { font-family: var(--font-display); font-size: clamp(56px, 9vw, 96px); font-weight: 700; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.big-water .unit { font-size: 28px; font-weight: 600; opacity: .9; }
.big-water p { opacity: .88; font-size: 17px; }
.bottles { display: grid; grid-template-columns: repeat(6, 22px); gap: 6px; }
.bottles svg { width: 22px; height: 44px; }
@media (max-width: 560px) { .big-water { grid-template-columns: 1fr; } }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.result { background: var(--tile); border-radius: var(--radius-l); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.result .icon { font-size: 28px; color: var(--signal); }
.result .val { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.result .lab { font-weight: 600; }
.result .note { color: var(--muted); font-size: 16px; }
@media (max-width: 560px) { .result-grid { grid-template-columns: 1fr; } }
.shopping { background: var(--tile); border-radius: var(--radius-l); padding: 26px 28px; }
.shopping h3 { font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.shopping ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; }
.shopping li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.shopping li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .shopping ul { columns: 1; } }

/* ---------- Checklist ---------- */
.progress-card { display: flex; align-items: center; gap: 28px; background: var(--tile); border-radius: var(--radius-xl); padding: 28px 32px; }
.ring { width: 120px; height: 120px; flex: none; }
.ring circle { fill: none; stroke-width: 12; }
.ring .track { stroke: var(--tile-2); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1); transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring text { font-family: var(--font-display); font-size: 26px; font-weight: 700; fill: var(--ink); }
.progress-card .stack { gap: 6px; }
.progress-card .bar-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (max-width: 600px) { .progress-card { flex-direction: column; text-align: center; } }
.chip { font-size: 16px; font-weight: 600; padding: 5px 11px; border-radius: 980px; background: var(--tile-2); color: var(--muted); }
.chip.done { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.list-group { margin-top: 18px; background: var(--tile); border-radius: var(--radius-l); overflow: hidden; }
.list-group header { display: flex; align-items: center; gap: 14px; padding: 20px 24px 12px; }
.list-group header .glyph { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2)); flex: none; }
.list-group header h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.list-group header .count { margin-left: auto; font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: flex-start; gap: 14px; padding: 14px 24px; border-top: 1px solid var(--line); cursor: pointer; }
.check:hover { background: color-mix(in srgb, var(--tile-2) 60%, transparent); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; transition: background .2s, border-color .2s, transform .2s; margin-top: 1px; }
.check .box .icon { font-size: 16px; color: #fff; stroke-width: 3; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .2s; }
.check input:checked + .box { background: var(--good); border-color: var(--good); }
.check input:checked + .box .icon { opacity: 1; transform: scale(1); }
.check input:focus-visible + .box { outline: 3px solid var(--link); outline-offset: 2px; }
.check .txt strong { display: block; font-weight: 500; font-size: 16.5px; }
.check .txt small { display: block; color: var(--muted); font-size: 16px; margin-top: 2px; }
.check input:checked ~ .txt strong { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }

/* ---------- Plan ---------- */
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.plan-section { background: var(--tile); border-radius: var(--radius-xl); padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.plan-section > header { display: flex; align-items: center; gap: 14px; }
.plan-section > header .glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2)); flex: none; }
.plan-section > header h2 { font-size: 24px; font-weight: 600; }
.plan-section > header p { color: var(--muted); font-size: 16px; }
.rows { display: flex; flex-direction: column; gap: 12px; }
.row-item { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.row-item .remove { background: none; border: 0; color: var(--muted); font-size: 20px; padding: 10px; cursor: pointer; border-radius: 10px; }
.row-item .remove:hover { color: var(--danger); background: var(--tile-2); }
@media (max-width: 700px) { .row-item { grid-template-columns: 1fr; } .row-item .remove { justify-self: end; } }
.save-bar { position: sticky; bottom: 16px; z-index: 20; margin-top: 8px; display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow); border: 1px solid var(--line); }
.save-state { font-size: 16px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }

/* Dialog */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 22px; background: rgba(0,0,0,.4); backdrop-filter: blur(6px); }
.modal.open { display: grid; }
.modal .sheet { background: var(--bg); border-radius: 22px; padding: 28px; max-width: 380px; width: 100%; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.modal .sheet h2 { font-size: 22px; }
.modal .sheet .actions { margin-top: 6px; gap: 10px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 120; background: #1d1d1f; color: #f5f5f7; padding: 12px 18px; border-radius: 980px; font-size: 16px; box-shadow: var(--shadow); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
.footer { background: var(--tile); color: var(--muted); font-size: 16px; padding: 36px 0 44px; line-height: 1.5; }
.footer .wrap { display: flex; flex-direction: column; gap: 16px; }
.footer .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.footer h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.01em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }
@media (max-width: 760px) { .footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Motion ---------- */
@keyframes rise { from { transform: translateY(18px); opacity: .001; } to { transform: none; opacity: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes beam { 0%, 100% { opacity: .55; } 50% { opacity: .9; } }
.hero .stack > * { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.hero .stack > *:nth-child(2) { animation-delay: .08s; }
.hero .stack > *:nth-child(3) { animation-delay: .16s; }
.hero .stack > *:nth-child(4) { animation-delay: .24s; }
.hero-art { animation: rise 1.1s .3s cubic-bezier(.2,.8,.2,1) both; }
.float { animation: float 6s ease-in-out infinite; }
.float.d2 { animation-delay: -2s; } .float.d3 { animation-delay: -4s; }
.beam { animation: beam 4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Print ---------- */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .nav, .footer, .no-print, .save-bar, .page-head .head-icon, .toast, .modal { display: none !important; }
  .print-only { display: block; }
  section, .page-head { padding: 0 !important; }
  .plan-section, .list-group, .card, .tile, .phase { background: #fff !important; box-shadow: none !important; border: 1px solid #bbb; break-inside: avoid; }
  input, textarea, select { border: 0; border-bottom: 1px solid #999; border-radius: 0; padding: 4px 0; background: transparent; color: #000; }
  .glyph { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
