/* Tide Agent — mobile-first (iPhone) · desktop enhanced */
:root {
  --bg: #0a0a0a;
  --bg-elev: #111;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: #c8c8c8;   /* secondary labels — lighter for phone readability */
  --faint: #a8a8a8;   /* hints / captions — was too dark */
  --sage: #a8b9ab;
  --sage-dim: rgba(141, 159, 145, 0.2);
  --good: #4ae09a;
  --good-bg: rgba(61, 214, 140, 0.14);
  --warn: #ffb84d;
  --warn-bg: rgba(245, 165, 36, 0.14);
  --bad: #ff7a96;
  --bad-bg: rgba(243, 18, 96, 0.14);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --max: 980px;
  --pad: 12px;
  --base: 15px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: var(--base);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: var(--sage); text-decoration: none; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ambient {
  pointer-events: none;
  position: fixed;
  inset: -10% 0 auto;
  height: 40vh;
  z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(141, 159, 145, 0.12), transparent 70%);
}
.top, main, .foot, .area-bar { position: relative; z-index: 1; }

/* —— Header —— */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(8px + var(--safe-top)) var(--pad) 6px;
}
.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo {
  display: block;
  height: 26px;
  width: auto;
  max-width: min(72vw, 240px);
  object-fit: contain;
  object-position: left center;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* High-contrast Tide pill — solid so it never inherits dim text */
.btn-assumptions {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #c5d2c7;
  background: #ffffff;
  color: #1a1a1a !important;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-assumptions:hover,
.btn-assumptions:focus {
  background: #f4f4f4;
  outline: none;
  box-shadow: 0 0 0 3px rgba(141, 159, 145, 0.45);
}
.btn-assumptions:active {
  background: #e8e8e8;
  transform: scale(0.98);
}
.btn-assumptions--hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  background: #8d9f91;
  border-color: #8d9f91;
  color: #0a0a0a !important;
}
.btn-assumptions--hero:hover,
.btn-assumptions--hero:focus {
  background: #9aaf9e;
  border-color: #9aaf9e;
}
.pill-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* Assumptions modal / bottom sheet */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.modal-backdrop.is-open {
  display: flex;
}
.modal-sheet {
  width: 100%;
  max-width: 560px;
  max-height: min(88dvh, 720px);
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(16px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.55);
  animation: sheet-up 0.28s var(--ease);
  color: #fff;
}
@keyframes sheet-up {
  from { transform: translateY(28px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-grab {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  margin: 4px auto 10px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.modal-close {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.modal-intro {
  margin: 0 0 12px;
  font-size: 13px;
  color: #c8c8c8;
  line-height: 1.4;
}
.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 120px;
  padding-bottom: 8px;
}
.assump-block {
  margin-bottom: 14px;
}
.assump-block h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b4c5b8;
  font-weight: 700;
}
.assump-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}
.assump-row span {
  color: #c8c8c8;
  line-height: 1.35;
  flex: 1 1 auto;
  min-width: 0;
}
.assump-row b {
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex: 0 1 48%;
  white-space: normal;
  line-height: 1.35;
}
.assump-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #b0b0b0;
  line-height: 1.45;
}
.modal-done {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 10px;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #8d9f91;
  color: #0a0a0a !important;
  font-weight: 700;
  font-size: 15px;
  padding: 14px;
  cursor: pointer;
  min-height: 48px;
}
.modal-done:active { background: #9aaf9e; }
@media (min-width: 720px) {
  .modal-backdrop.is-open { align-items: center; padding: 24px; }
  .modal-sheet {
    border-radius: 18px;
    max-height: min(80vh, 680px);
  }
  .modal-grab { display: none; }
}
.pill-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--good);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(61, 214, 140, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0); }
}

/* —— Hero (compact on phone) —— */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6px var(--pad) 10px;
  text-align: center;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}
.hero h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}
.lede {
  margin: 8px auto 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

/* —— Area picker (TOP priority) —— */
.area-bar {
  max-width: var(--max);
  margin: 0 auto 10px;
  padding: 0 var(--pad);
}
.area-inner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 10px 8px;
}
.micro-label {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.zip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.zip-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  min-height: 48px; /* Apple HIG touch */
}
.zip-pill .z-code {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.02em;
}
.zip-pill .z-name {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 400;
  white-space: normal;
}
.zip-pill .z-exit {
  font-size: 12px;
  color: var(--sage);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.zip-pill.on {
  background: var(--sage-dim);
  border-color: rgba(141, 159, 145, 0.55);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(141, 159, 145, 0.15);
}
.zip-pill.on .z-name { color: #e0e0e0; }
.zip-pill.on .z-code { color: #fff; }
.zip-pill.warn-zip { border-color: rgba(245, 165, 36, 0.4); }
.area-hint {
  margin: 8px 0 2px !important;
  font-size: 13px !important;
  color: var(--muted) !important;
  line-height: 1.4 !important;
}

/* —— Stage —— */
.stage {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) calc(20px + var(--safe-bottom));
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.panel {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.panel-head h2 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Fields — compact */
.field { margin: 0 0 14px; }
.field.compact { margin-bottom: 12px; }
.field.dimmed { opacity: 0.4; pointer-events: none; filter: grayscale(0.3); }
.field-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}
.field label {
  font-size: 14px;
  color: #e8e8e8;
  font-weight: 500;
}
.field output {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.label-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sage);
  border: 1px solid rgba(141, 159, 145, 0.45);
  vertical-align: middle;
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  background: transparent;
  margin: 0;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage), rgba(141, 159, 145, 0.2));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(141, 159, 145, 0.2);
}
input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sage), rgba(141, 159, 145, 0.2));
  border: none;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: #fff;
}

/* Number fields: compact, full width but short */
.num {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 16px; /* prevent iOS zoom */
  line-height: 1.2;
}
.num:focus {
  outline: none;
  border-color: rgba(141, 159, 145, 0.5);
}

.hint {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* Cost split — tight on mobile */
.cost-split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 2px 0 12px;
}
.split-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 6px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.split-card.profit {
  border-color: rgba(141, 159, 145, 0.3);
  background: rgba(141, 159, 145, 0.08);
}
.split-label {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.split-value {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.split-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Options */
.options { border-top: 1px solid var(--line); padding-top: 2px; }
.options-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: none;
  color: #fff;
  padding: 12px 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.options-toggle svg {
  transition: transform 0.25s var(--ease);
  color: var(--muted);
  flex-shrink: 0;
}
.options-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.options-body { padding: 0 0 4px; animation: open-in 0.25s var(--ease); }
.options-intro {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
@keyframes open-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 6px;
  cursor: pointer;
  user-select: none;
}
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-ui {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  flex: 0 0 auto;
  margin-top: 1px;
  position: relative;
}
.check-row input:checked + .check-ui {
  background: var(--sage);
  border-color: var(--sage);
}
.check-row input:checked + .check-ui::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #0a0a0a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.check-copy strong { font-size: 14px; font-weight: 600; color: #fff; }
.check-copy small { font-size: 12px; color: var(--muted); }

.divider {
  height: 1px;
  background: var(--line);
  margin: 12px 0 10px;
}
.text-btn {
  background: none;
  border: none;
  color: var(--sage);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0 2px;
  cursor: pointer;
}

/* Results */
.results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.results.thinking-on { border-color: rgba(141, 159, 145, 0.3); }
.results.v-good { box-shadow: 0 0 0 1px rgba(61, 214, 140, 0.12); }
.results.v-warn { box-shadow: 0 0 0 1px rgba(245, 165, 36, 0.12); }
.results.v-bad { box-shadow: 0 0 0 1px rgba(243, 18, 96, 0.1); }

.thinking {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(141, 159, 145, 0.08);
  border: 1px solid rgba(141, 159, 145, 0.18);
}
.thinking.show { display: flex; }
.thinking p { margin: 0; font-size: 13px; color: var(--sage); font-weight: 500; }
.orbit { width: 18px; height: 18px; position: relative; flex-shrink: 0; }
.orbit span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--sage);
  animation: spin 0.8s linear infinite;
}
.orbit span:nth-child(2) {
  inset: 3px;
  animation-duration: 1.1s;
  animation-direction: reverse;
  border-top-color: rgba(141, 159, 145, 0.45);
}
.orbit span:nth-child(3) { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.verdict-wrap { text-align: center; }
.verdict-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  color: #e8e8e8;
  border: 1px solid var(--line);
}
.verdict-badge.fit {
  background: var(--good-bg);
  color: var(--good);
  border-color: rgba(61, 214, 140, 0.35);
}
.verdict-badge.negotiate {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: rgba(245, 165, 36, 0.35);
}
.verdict-badge.stretch {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: rgba(243, 18, 96, 0.3);
}
.verdict-sub {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
  min-height: 2.4em;
  padding: 0 4px;
}

.hero-metric { text-align: center; padding: 2px 0; }
.metric-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.metric-value {
  margin: 6px 0 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #fff;
}
.metric-value.tick { animation: value-pop 0.35s var(--ease); }
@keyframes value-pop {
  0% { opacity: 0.5; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}
.metric-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  padding: 0 6px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.m-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.m-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.m-value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.advice {
  border-left: 2px solid var(--sage);
  background: linear-gradient(90deg, rgba(141, 159, 145, 0.1), transparent);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #f0f0f0;
}
.advice strong { font-weight: 700; color: #fff; }

.waterfall { border-top: 1px solid var(--line); padding-top: 2px; }
.wf-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.wf-row span { color: var(--muted); }
.wf-row b { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; color: #fff; }
.wf-row.muted span, .wf-row.muted b { color: var(--muted); font-size: 13px; }
.wf-row.total {
  border-bottom: none;
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 10px;
}
.wf-row.total span { color: #fff; font-weight: 500; }

.disclaimer {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--pad) calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.foot-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.foot-logo {
  height: 36px;
  width: auto;
  opacity: 0.95;
  border-radius: 4px;
}

/* —— Larger phones / landscape —— */
@media (min-width: 400px) {
  :root { --pad: 16px; }
  .hero h1 { font-size: 1.7rem; }
  .metric-value { font-size: 2.15rem; }
}

/* —— Tablet+ —— */
@media (min-width: 720px) {
  :root { --pad: 20px; --base: 16px; }
  .brand-logo { height: 32px; max-width: 220px; }
  .hero { padding: 16px var(--pad) 14px; }
  .hero h1 { font-size: 2.1rem; }
  .lede { font-size: 15px; margin-top: 10px; }
  .zip-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .zip-pill { padding: 12px 12px; }
  .zip-pill .z-code { font-size: 15px; }
  .zip-pill .z-name { font-size: 13px; }
  .zip-pill .z-exit { font-size: 13px; }
  .stage {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
    padding-bottom: 40px;
  }
  .results { position: sticky; top: 12px; }
  .panel { padding: 16px 18px; }
  .metric-value { font-size: 2.5rem; }
  .m-value { font-size: 17px; }
  .split-value { font-size: 15px; }
  .field label, .field output { font-size: 15px; }
}

@media (min-width: 900px) {
  .zip-grid { grid-template-columns: repeat(5, 1fr); }
}

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