/* DOES: The one shared stylesheet for preprestore.com (home, homeowners, contractors, carriers, supplements,
         checkout pages). Light mode first; dark mode via html[data-mode="dark"], the same attribute and colors the
         chat-inject edge worker already uses, so its injected rules agree with these.
   IN:   class names used in /index.html, /homeowners/, /contractors/, /carriers/, /supplements/, /checkout/
   OUT:  layout, type, color. No page carries <style> blocks or style= attributes.
   Built 2026-12-04 by claude-opus-5-5 (PrepRestore rebuild). */

:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --soft: #f2eee6;
  --ink: #1a1b1f;
  --ink-soft: #4b4e57;
  --line: rgba(26, 27, 31, 0.14);
  --line-strong: #8a8478;
  --accent: #8c3b22;
  --accent-ink: #ffffff;
  --accent-soft: #f4e7df;
  --link: #7a2e18;
  --ok: #2f5d3a;
  --focus: #1f4fd1;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1240px;
  --pad: clamp(16px, 4vw, 40px);
  --row: 44px;
  --radius: 14px;
}

html[data-mode="dark"] {
  --paper: #101218;
  --card: #171a23;
  --soft: #1d212c;
  --ink: #f4f2ec;
  --ink-soft: #c3c6cf;
  --line: rgba(244, 242, 236, 0.16);
  --line-strong: rgba(244, 242, 236, 0.4);
  --accent: #8c3b22;
  --accent-ink: #ffffff;
  --accent-soft: #2a1f1b;
  --link: #f0c9b6;
  --ok: #9fd3ac;
  --focus: #8fb3ff;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 12px; }
/* The edge worker forces every link to cream text in dark mode; keep the skip link readable on its own background. */
html[data-mode="dark"] a.skip { color: var(--paper) !important; }

.visually-hidden, .hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header: one row, every item the same height ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-head > .bar,
.site-foot > .bar {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.site-head > .bar { min-height: 68px; }

.brand,
.nav a,
.call,
.menu > summary {
  display: inline-flex;
  align-items: center;
  height: var(--row);
  line-height: 1;
  font-family: var(--body);
  flex: 0 0 auto;
}
.brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 0 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: var(--soft); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--soft); }

.call {
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.call:hover { filter: brightness(1.08); }
.call-short { display: none; }

.menu { position: relative; display: none; }
.menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.menu-panel a {
  display: flex;
  align-items: center;
  min-height: var(--row);
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.menu-panel a:hover { background: var(--soft); }

@media (max-width: 960px) {
  .nav { display: none; }
  .menu { display: block; }
}
@media (max-width: 479px) {
  .call-long { display: none; }
  .call-short { display: inline; }
  .call { padding: 0 16px; }
}

/* ---------- Page body ---------- */
main {
  display: block;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(40px, 7vw, 88px); }
.section + .section { border-top: 1px solid var(--line); }

.kicker {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
}

h1, h2, h3 { color: var(--ink); margin: 0; }
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 600; }

.lead {
  margin: 18px 0 0;
  max-width: 40rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
}
.section-head { max-width: 46rem; margin-bottom: 32px; }
.section-head p { margin: 12px 0 0; color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(32px, 6vw, 72px);
}
.hero.hero--single { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}

.perils {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.perils li {
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0;
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
}
.facts > div {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { margin: 4px 0 0; font-weight: 600; }

.map-figure { margin: 0; }
.map-frame {
  padding: clamp(12px, 2vw, 20px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
html[data-mode="dark"] .map-frame { background: #f4f1ea; }
.map-figure img { width: 100%; height: auto; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: 0 0 auto;
}
.swatch--nation { background: #e7e2d6; border: 1px solid #b9b2a2; }
.swatch--daily { background: #c9b48a; border: 1px solid #6b4220; border-radius: 50%; }

/* ---------- ZIP finder (fits at every width) ---------- */
.zip-form { margin-top: 28px; max-width: 30rem; }
.zip-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.zip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.zip-row input {
  flex: 1 1 7.5rem;
  min-width: 0;
  width: 100%;
}
.zip-row .btn { flex: 0 0 auto; }
.hint { margin: 8px 0 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--row);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--body);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--quiet:hover { background: var(--soft); filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ---------- Cards, lists, badges ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19.5rem), 1fr));
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 18px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card p { margin: 0; color: var(--ink-soft); }
.card .btn, .card .more { margin-top: auto; align-self: flex-start; }
.card-link { text-decoration: none; color: inherit; }
.card-link:hover { border-color: var(--line-strong); }
.more { font-weight: 600; }

.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 12px; align-items: start; }
.steps .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-weight: 700;
  font-size: 0.9rem;
}
.ticks { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); }
.ticks li + li { margin-top: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--link);
}
.badge--soon { background: var(--soft); color: var(--ink); border: 1px dashed var(--line-strong); }
.badge--vetted { background: transparent; color: var(--ok); border: 1px solid currentColor; }

.note {
  margin: 0;
  padding-left: 14px;
  border-left: 2px solid var(--line-strong);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--ink);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--row);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6b6e76; opacity: 1; }
html[data-mode="dark"] input::placeholder, html[data-mode="dark"] textarea::placeholder { color: #9fa3ad; }
.form .btn { justify-self: start; }
.form-msg { margin: 0; font-weight: 600; }
.form-msg[data-state="ok"] { color: var(--ok); }
.form-msg[data-state="err"] { color: var(--link); }
.small { font-size: 0.9rem; color: var(--ink-soft); }

.contact-list { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.contact-list li { display: grid; gap: 2px; }
.contact-list .k { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Footer: one row ---------- */
.site-foot {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.site-foot > .bar {
  min-height: 64px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-foot .copy { margin-right: auto; display: inline-flex; align-items: center; height: 36px; }
.site-foot a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.foot-wide { display: inline-flex; align-items: center; height: 36px; }
.toggle {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.toggle[aria-pressed="true"] { background: var(--soft); }
@media (max-width: 760px) { .foot-wide { display: none; } }
@media (max-width: 479px) {
  .site-foot > .bar { gap: 8px; }
  .toggle { padding: 0 10px; }
}

/* ---------- Shared checkout (classes created by /checkout/checkout.js) ---------- */
.co-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  overflow: auto;
}
.co-dialog::backdrop { background: rgba(16, 18, 24, 0.55); }
.co-inner { padding: 24px; display: grid; gap: 14px; }
.co-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.co-head h2 { font-size: 1.6rem; }
.co-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--row);
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.co-mount { min-height: 120px; }
.co-text { margin: 0; color: var(--ink-soft); }

/* ---------- Checkout result page ---------- */
.result { max-width: 40rem; }
.downloads { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }

/* Smallest phones: keep the footer on one row. Kept last so it wins over the wider breakpoints. */
@media (max-width: 359px) {
  .site-foot > .bar { gap: 6px; }
  .site-foot .toggle { padding: 0 8px; }
  .site-foot .copy-name { display: none; }
}

/* ---------- Sliver footer with drop-ups, added 2026-12-05 by claude-sonnet-5-5 ----------
   DOES: Makes the footer one thin bar. Each button opens its panel upward (a drop-up).
            Also lets a page that is only a hero fit one phone screen with no scrolling.
               IN:   markup that assets/pr.js builds inside .site-foot > .bar
                  OUT:  one-row footer on every page, panels open above the bar. */
                  body { display: flex; flex-direction: column; min-height: 100dvh; }
                  body > main { flex: 1 0 auto; width: 100%; }
                  .site-foot { position: sticky; bottom: 0; z-index: 30; margin-top: 0; }
                  .site-foot > .bar { min-height: 46px; gap: 4px; }
                  .site-foot .copy { margin-right: auto; height: 32px; }
                  .up { position: relative; flex: 0 0 auto; }
                  .up > summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 999px; font-size: 0.85rem; font-weight: 600; line-height: 1; color: var(--ink); cursor: pointer; user-select: none; }
                  .up > summary::-webkit-details-marker { display: none; }
                  .up > summary::after { content: "\25B4"; font-size: 0.75em; }
                  .up > summary:hover, .up[open] > summary { background: var(--soft); border-color: var(--line-strong); }
                  .up-panel { position: absolute; right: 0; bottom: calc(100% + 12px); z-index: 40; min-width: 230px; max-width: min(92vw, 380px); max-height: calc(100dvh - 130px); overflow: auto; display: grid; gap: 2px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.14); }
                  .site-foot .up-panel a { display: flex; align-items: center; height: auto; min-height: 38px; padding: 0 12px; border-radius: 8px; color: var(--ink); font-size: 0.95rem; font-weight: 500; text-decoration: none; }
                  .site-foot .up-panel a:hover { background: var(--soft); text-decoration: none; }
                  .up-panel .toggle { width: 100%; justify-content: flex-start; height: 38px; }
                  .up-panel--form { width: min(92vw, 360px); padding: 12px; }
                  .up-panel--form .form { gap: 8px; }
                  .up-panel--form input, .up-panel--form select, .up-panel--form textarea { min-height: 38px; padding: 6px 10px; font-size: 0.95rem; }
                  .up-panel--form textarea { min-height: 64px; }
                  .up-panel--form .btn { min-height: 40px; }
                  .up-title { margin: 0 4px 4px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
                  @media (max-width: 640px) {
                    .site-foot .copy { display: none; }
                      .site-foot > .bar { justify-content: space-between; gap: 0; }
                        .up { position: static; }
                          .up > summary { padding: 0 9px; font-size: 0.8rem; }
                            .up-panel { position: fixed; left: 8px; right: 8px; bottom: 54px; width: auto; max-width: none; min-width: 0; }
                              .up-panel--form { width: auto; }
                              }

                              /* One-screen pages: a page that is only a hero fits the phone with no scrolling. */
                              @media (max-width: 900px) {
                                main > .hero:only-child { padding-block: 14px; gap: 12px; align-content: start; min-height: calc(100dvh - 122px); }
                                  main > .hero:only-child h1 { font-size: clamp(1.9rem, 8.4vw, 2.5rem); }
                                    main > .hero:only-child .lead { margin-top: 10px; font-size: 1rem; line-height: 1.5; }
                                      main > .hero:only-child .perils { margin-top: 12px; }
                                        main > .hero:only-child .zip-form { margin-top: 14px; }
                                          main > .hero:only-child .legend { display: none; }
                                            main > .hero:only-child .map-frame { padding: 8px; }
                                              main > .hero:only-child .map-figure img { max-height: 22dvh; width: auto; margin-inline: auto; }
                                              }
                                              @media (max-width: 900px) and (max-height: 700px) {
                                                main > .hero:only-child .map-figure { display: none; }
                                                }
                                                