/* Raincheck NYC — light, water-toned, single-purpose quote site */
:root {
  --ink: #12263a;
  --ink-2: #44586c;
  --ink-3: #7a8b9b;
  --surface: #f6f9fb;
  --card: #ffffff;
  --line: #dde6ed;
  --blue: #0b6e99;
  --blue-deep: #084f6e;
  --blue-soft: #e3f0f7;
  --accent: #0fa3b1;
  --warn-bg: #fff6e6;
  --warn-ink: #8a5a00;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ── Nav ── */
nav {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
nav .wrap { display: flex; align-items: center; gap: 24px; height: 58px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--blue-deep); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 34px; height: 34px; object-fit: contain; }
nav a.link { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
nav a.link:hover, nav a.link.active { color: var(--blue); }
nav .spacer { flex: 1; }

/* ── Hero ── */
.hero { padding: 56px 0 8px; text-align: center; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin: 0 0 12px; letter-spacing: -0.02em; }
.hero p.sub { color: var(--ink-2); max-width: 620px; margin: 0 auto; font-size: 1.05rem; }

/* ── Quote form ── */
.quote-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 28px auto 0;
  max-width: 640px;
  box-shadow: 0 4px 20px rgba(11, 110, 153, 0.07);
}
.addr-row { display: flex; gap: 10px; position: relative; }
#address {
  flex: 1; font-size: 1.02rem; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; outline: none;
  color: var(--ink); background: #fff;
}
#address:focus { border-color: var(--blue); }
#go {
  background: var(--blue); color: #fff; border: 0; border-radius: 10px;
  padding: 0 22px; font-size: 1rem; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
#go:hover { background: var(--blue-deep); }
#go:disabled { background: var(--ink-3); cursor: wait; }
.hint { color: var(--ink-3); font-size: 0.85rem; margin: 10px 2px 0; }

/* autocomplete */
#suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(18, 38, 58, 0.12); overflow: hidden; z-index: 30;
}
#suggestions div { padding: 10px 14px; cursor: pointer; font-size: 0.95rem; }
#suggestions div:hover, #suggestions div.sel { background: var(--blue-soft); }
.hidden { display: none !important; }

#status { text-align: center; margin: 18px 0 0; color: var(--ink-2); }
#status.error { color: #a33; }

/* ── Result ── */
#result { margin: 34px auto 0; max-width: 720px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 18px;
}
.matched { color: var(--ink-2); font-size: 0.95rem; margin: 0 0 4px; }
.matched b { color: var(--ink); }

.price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 10px 0 2px; }
.price { font-size: 3rem; font-weight: 800; color: var(--blue-deep); letter-spacing: -0.03em; }
.price small { font-size: 1.1rem; font-weight: 600; color: var(--ink-2); }
.price-sub { color: var(--ink-2); font-size: 0.95rem; }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.tier {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 12px;
  text-align: center; background: var(--blue-soft);
}
.tier .depth { font-weight: 700; color: var(--blue-deep); font-size: 1rem; }
.tier .payout { font-size: 1.35rem; font-weight: 800; margin-top: 4px; }
.tier .share { color: var(--ink-3); font-size: 0.8rem; margin-top: 2px; }
.tier-note { color: var(--ink-3); font-size: 0.85rem; margin: 10px 2px 0; }

/* risk meter — single-hue sequential track with a marker */
.meter-wrap { margin-top: 6px; }
.meter-label { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 0.8rem; margin-top: 6px; }
.meter {
  position: relative; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #e3f0f7, #7fb8d3, #0b6e99, #084f6e);
}
.meter .dot {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 4px solid var(--blue-deep);
  box-shadow: 0 1px 6px rgba(18,38,58,0.3);
}
.risk-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.risk-head h3 { margin: 0; }
.risk-big { font-weight: 800; color: var(--blue-deep); }

.facts { margin: 0; padding: 0; list-style: none; }
.facts li {
  padding: 12px 0 12px 34px; position: relative;
  border-top: 1px solid var(--line); color: var(--ink-2);
}
.facts li:first-child { border-top: 0; }
.facts li::before {
  content: "〜"; position: absolute; left: 4px; top: 10px;
  color: var(--accent); font-weight: 700; font-size: 1.1rem;
}

.disclaimer {
  background: var(--warn-bg); color: var(--warn-ink);
  border-radius: 10px; padding: 12px 16px; font-size: 0.85rem;
}

/* ── Info sections ── */
.section { padding: 44px 0 0; }
.section h2 { text-align: center; font-size: 1.5rem; margin: 0 0 24px; letter-spacing: -0.01em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .n {
  width: 30px; height: 30px; border-radius: 50%; background: var(--blue);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 6px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--ink-2); font-size: 0.92rem; }

footer { margin-top: 56px; padding: 26px 0 40px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.85rem; text-align: center; }
footer a { color: var(--blue); }

/* ── Dashboard page ── */
.dash-note { margin: 18px auto; max-width: 880px; }
.dash-frame {
  width: 100%; height: calc(100vh - 170px); min-height: 560px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}

@media (max-width: 640px) {
  .tiers, .steps { grid-template-columns: 1fr; }
  .addr-row { flex-direction: column; }
  #go { padding: 13px; }
  .price { font-size: 2.4rem; }
}

/* Address suggestions: main line + muted locality; status rows */
#suggestions .sugg-sec { color: var(--ink-3); font-weight: 400; }
#suggestions .sugg-note { cursor: default; color: var(--ink-3); }
#suggestions .sugg-note:hover { background: transparent; }

/* Plan switch on the quote card */
.plan-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 4px; }
.plan-name { font-weight: 700; color: var(--blue-deep); }
.plan-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.plan-switch button { background: var(--card); color: var(--ink); border: 0; padding: 8px 14px; font: inherit; font-size: 0.9rem; cursor: pointer; }
.plan-switch button + button { border-left: 1px solid var(--line); }
.plan-switch button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.plan-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Underwriting notes (refer / decline) */
.uw { margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 0.93rem; background: var(--warn-bg); color: var(--warn-ink); }
.uw.uw-decline { font-weight: 600; }
