/* ==========================================================================
   gist. — design system (Hybrid 3 · Heavy & Signed)
   --------------------------------------------------------------------------
   Brand: gist.
   Voice: Marker (sharp, brief, second-person, contractions).
   Visual: heavy sans wordmark + butter squiggle signature.
   Domain: gist.insure (canonical) · see branding/domain-options.md.

   Per-insurer brand colours are applied as CSS custom properties on a
   top-level [data-brand] element by render.mjs. The gist house tokens are
   constants and remain stable across every page.
   ========================================================================== */

:root {
  /* ---------- gist house palette ---------- */
  --gist-ink:    #0B0B0E;
  --gist-paper:  #F8F4EC;       /* warm cream */
  --gist-butter: #F4D35E;       /* primary accent — pull-quotes, squiggles, highlights */
  --gist-pink:   #FF3D6E;       /* secondary accent — emphasis, the "human" touch */
  --gist-rose:   #C75D5E;       /* serious/warning red */
  --gist-muted:  #6E6A63;       /* secondary text */
  --gist-rule:   #E5DCC9;       /* subtle dividers */
  --gist-success:#2FB36A;
  --gist-warn:   #FFB547;
  --gist-danger: #E5484D;

  /* ---------- defaults for the public-site shell ---------- */
  /* Per-insurer pages override these via render.mjs.            */
  --primary:      var(--gist-butter);
  --primary-deep: #DDB94A;
  --ink:          var(--gist-ink);
  --ink-2:        #3A352E;
  --surface:      var(--gist-paper);
  --surface-2:    #FCFAF4;
  --border:       var(--gist-rule);
  --accent:       var(--gist-pink);
  --warn:         var(--gist-warn);
  --danger:       var(--gist-danger);
  --success:      var(--gist-success);

  --radius:    14px;
  --maxw:      880px;
  --shadow:    0 1px 2px rgba(11,11,14,.05), 0 8px 28px rgba(11,11,14,.06);

  /* Body — Inter is the default fallback, GT Alpina if licensed */
  --font-body: "Inter", "Söhne", "GT Alpina", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* Display — heavy sans (the H3 wordmark) */
  --font-display: "Söhne", "Geist", "Inter", system-ui, sans-serif;
  /* Display alt — italic serif (used for editorial pull-quotes only, never for the wordmark) */
  --font-editorial: "PP Editorial New", "GT Sectra", "Source Serif Pro", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gist-butter);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--gist-rose); text-decoration-color: var(--gist-pink); }

/* ----- Top thin band (was the cyan strip) ------------------------------- */
.bp-top-bar { height: 6px; background: var(--gist-ink); }

/* ----- Site header ------------------------------------------------------ */
.bp-site-header { background: var(--gist-ink); color: #fff; padding: 24px 24px; }
.bp-site-header .wrap { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* The gist wordmark (also used by render.mjs for the rendered insurer shell) */
.gist-mark { display: inline-flex; align-items: center; gap: 14px; }
.gist-mark .word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -1.1px;
  color: #fff;
  line-height: 1;
}
.gist-mark .word.dark { color: var(--gist-ink); }
.gist-mark small {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--gist-butter);
  letter-spacing: 1.5px;
  font-weight: 600;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

/* The brand of an insurer (e.g. "freely") sits in the same slot on per-insurer pages */
.bp-brand { font-weight: 800; font-size: 28px; letter-spacing: -.5px; color: #fff; }
.bp-brand small { font-size: 11px; color: var(--gist-butter); font-style: normal; letter-spacing: 1.5px; display: block; font-weight: 600; text-transform: uppercase; margin-top: 2px; }
.bp-brand[data-style="italic-script"] { font-family: Georgia, serif; font-style: italic; }
.bp-brand[data-style="uppercase-bold"] { text-transform: uppercase; font-family: var(--font-display); }
/* gist wordmark in the page header (every insurer page). Gist always owns the chrome. */
.bp-brand-gist { display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; }
.bp-brand-gist:hover { opacity: 0.9; }

/* Insurer brand mark sits inside the hero — clearly the insurer's territory, not ours. */
.bp-insurer-mark { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 18px; }
.bp-insurer-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.5px;
  color: var(--brand-primary, var(--gist-ink));
  line-height: 1;
}
.bp-insurer-mark[data-style="italic-script"] .bp-insurer-wordmark { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; letter-spacing: 0; }
.bp-insurer-mark[data-style="uppercase-bold"] .bp-insurer-wordmark { text-transform: uppercase; letter-spacing: 0.5px; }
.bp-insurer-logo { max-height: 44px; width: auto; display: block; }

.bp-site-header nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.bp-site-header nav a { color: #fff; text-decoration: none; opacity: .85; }
.bp-site-header nav a:hover { opacity: 1; color: var(--gist-butter); }

/* ----- Hero ------------------------------------------------------------- */
.bp-hero { background: linear-gradient(180deg, var(--surface) 0%, #FFFFFF 100%); padding: 48px 24px 32px; }
.bp-hero .wrap { max-width: var(--maxw); margin: 0 auto; }

main.bp-main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 64px; }

footer.bp-site-footer { background: var(--gist-ink); color: #fff; padding: 36px 24px; font-size: 14px; }
footer.bp-site-footer .wrap { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer.bp-site-footer a { color: var(--gist-butter); }

/* ----- Independence banner — present on every page ---------------------- */
.bp-independence {
  background: var(--gist-ink);
  color: #fff;
  padding: 10px 24px;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid #1B1B22;
}
.bp-independence b { color: var(--gist-butter); font-weight: 700; }
.bp-independence a { color: var(--gist-butter); text-decoration: underline; text-decoration-color: rgba(244,211,94,.4); }
.bp-independence a:hover { text-decoration-color: var(--gist-butter); }

/* ----- Type ------------------------------------------------------------- */
.bp-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--gist-butter); color: var(--gist-ink); font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
h1 { font-size: 40px; line-height: 1.1; margin: 0 0 12px; letter-spacing: -1px; font-weight: 800; font-family: var(--font-display); }
h2 { font-size: 26px; line-height: 1.2; margin: 48px 0 14px; letter-spacing: -.4px; font-weight: 800; font-family: var(--font-display); }
h3 { font-size: 19px; line-height: 1.3; margin: 28px 0 8px; font-weight: 700; }
p { margin: 0 0 14px; }
.bp-lede { font-size: 19px; color: var(--ink-2); line-height: 1.5; }
.bp-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.bp-meta b { color: var(--ink); }
.bp-read-time { display: inline-flex; align-items: center; gap: 6px; background: var(--gist-butter); color: var(--gist-ink); padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; }

/* ----- Toolbar (sticky search) ------------------------------------------ */
.bp-toolbar { position: sticky; top: 0; z-index: 10; background: rgba(248,244,236,.92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--gist-rule); }
.bp-toolbar .wrap { max-width: var(--maxw); margin: 0 auto; padding: 10px 24px; display: flex; gap: 14px; align-items: center; }
.bp-toolbar input { flex: 1; padding: 9px 12px; border: 1px solid var(--gist-rule); border-radius: 10px; font-size: 14px; outline: none; font-family: inherit; background: #fff; }
.bp-toolbar input:focus { border-color: var(--gist-ink); }
.bp-toolbar .ask { background: var(--gist-ink); color: var(--gist-butter); border: 0; padding: 9px 14px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.bp-toolbar .ask:hover { background: #1B1B22; }

/* ----- TOC -------------------------------------------------------------- */
.bp-toc { background: var(--surface-2); border: 1px solid var(--gist-rule); border-radius: var(--radius); padding: 24px; margin: 24px 0 8px; }
.bp-toc h3 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 800; }
.bp-toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .bp-toc ol { columns: 1; } }
.bp-toc a { display: block; padding: 4px 0; text-decoration: none; color: var(--ink); font-size: 15px; }
.bp-toc a:hover { color: var(--gist-rose); }

/* ----- Cards / sections ------------------------------------------------- */
section.bp-card { background: #fff; border: 1px solid var(--gist-rule); border-radius: var(--radius); padding: 28px 28px 22px; margin: 20px 0; box-shadow: var(--shadow); }
.bp-source-ref { font-size: 12px; color: var(--gist-muted); background: var(--surface-2); padding: 3px 8px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.bp-summary { font-size: 18px; color: var(--ink); background: #FCF6E2; border-left: 4px solid var(--gist-butter); padding: 14px 18px; border-radius: 8px; margin: 8px 0 18px; }
.bp-summary strong { color: var(--gist-rose); }
.bp-crumbs { font-size: 13px; color: var(--gist-muted); margin-bottom: 6px; }
.bp-crumbs a { color: var(--gist-muted); }

/* ----- Pill list (covered/not covered/tips/warnings) -------------------- */
.bp-pill-list { list-style: none; padding: 0; margin: 0; }
.bp-pill-list li { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.bp-pill-list li.ok    { background: #EAFBF1; color: #103A22; }
.bp-pill-list li.no    { background: #FDECEC; color: #621A1D; }
.bp-pill-list li.tip   { background: #FCF6E2; color: #4A3D00; }
.bp-pill-list li.warn  { background: #FFF6E5; color: #5C3F00; }
.bp-pill-list li::before { font-weight: 800; font-size: 14px; line-height: 1.4; }
.bp-pill-list li.ok::before  { content: "✓"; color: var(--gist-success); }
.bp-pill-list li.no::before  { content: "✗"; color: var(--gist-danger); }
.bp-pill-list li.tip::before { content: "★"; color: var(--gist-butter); }
.bp-pill-list li.warn::before { content: "⚠"; }

/* ----- Tables ----------------------------------------------------------- */
table.bp-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 14px 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--gist-rule); table-layout: auto; }
table.bp-table th { background: var(--gist-butter); color: var(--gist-ink); text-align: left; padding: 12px 14px; font-weight: 800; }
table.bp-table td { padding: 12px 14px; border-top: 1px solid var(--gist-rule); vertical-align: top; }
table.bp-table tr:nth-child(even) td { background: var(--surface-2); }
table.bp-table .num { font-variant-numeric: tabular-nums; font-weight: 700; }
/* Single-tier table: keep the limit column on one line if it fits. */
table.bp-table:not(.bp-table-tiered) .num { white-space: nowrap; }
/* Tiered table: balanced columns, narrow tier cells, wider benefit + note. */
table.bp-table-tiered { font-size: 14px; }
table.bp-table-tiered th, table.bp-table-tiered td { padding: 10px 12px; }
table.bp-table-tiered th:first-child, table.bp-table-tiered td:first-child { width: 28%; }
table.bp-table-tiered th:last-child, table.bp-table-tiered td:last-child { width: 22%; font-size: 13px; color: var(--gist-muted); }
table.bp-table-tiered .num { text-align: right; white-space: nowrap; font-size: 14px; }
table.bp-table-tiered td.bp-indent { padding-left: 28px; color: var(--gist-muted); font-size: 13px; }
@media (max-width: 760px) {
  table.bp-table-tiered { font-size: 13px; }
  table.bp-table-tiered th, table.bp-table-tiered td { padding: 8px 8px; }
  table.bp-table-tiered th:first-child, table.bp-table-tiered td:first-child { width: auto; }
  table.bp-table-tiered th:last-child, table.bp-table-tiered td:last-child { display: none; }
}
.bp-footnote { font-size: 13px; color: var(--gist-muted); margin: 6px 0 0; }
.bp-improvements-link { margin: 14px 0 0; font-size: 14px; }
.bp-improvements-link a { color: var(--gist-pink, #C75D5E); border-bottom: 1px dashed currentColor; text-decoration: none; padding-bottom: 1px; }
.bp-improvements-link a:hover { color: var(--gist-ink, #0B0B0E); }

/* ----- Boost cards ------------------------------------------------------ */
.bp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .bp-grid-2 { grid-template-columns: 1fr; } }
.bp-tag { display: inline-block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--gist-ink); color: #fff; font-weight: 700; margin-right: 6px; vertical-align: middle; }
.bp-tag.daily { background: var(--gist-butter); color: var(--gist-ink); }
.bp-tag.trip  { background: var(--gist-pink); color: #fff; }
.bp-boost { padding: 14px 16px; background: var(--surface-2); border-radius: 10px; margin-bottom: 10px; }
.bp-boost h4 { margin: 0 0 4px; font-size: 16px; }
.bp-boost p  { margin: 0; font-size: 14px; color: var(--gist-muted); }

/* ----- Glossary --------------------------------------------------------- */
.bp-glossary dt { font-weight: 800; margin-top: 14px; }
.bp-glossary dd { margin: 4px 0 0; color: var(--ink-2); }

/* ----- Callouts --------------------------------------------------------- */
.bp-callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; margin: 14px 0; align-items: flex-start; font-size: 15px; }
.bp-callout .ico { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-weight: 800; font-size: 14px; }
.bp-callout.tip { background: #FCF6E2; color: #4A3D00; }
.bp-callout.tip .ico { background: var(--gist-butter); color: var(--gist-ink); }
.bp-callout.warn { background: #FFF6E5; color: #5C3F00; }
.bp-callout.warn .ico { background: var(--gist-warn); color: var(--gist-ink); }
.bp-callout.danger { background: #FDECEC; color: #621A1D; }
.bp-callout.danger .ico { background: var(--gist-danger); color: #fff; }

/* ----- Ribbon ----------------------------------------------------------- */
.bp-ribbon { background: var(--gist-ink); color: #fff; border-radius: 14px; padding: 24px 26px; margin: 36px 0 8px; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bp-ribbon .text { flex: 1; min-width: 240px; }
.bp-ribbon h3 { margin: 0 0 4px; color: #fff; }
.bp-ribbon p  { margin: 0; color: #C8C2B5; }
.bp-ribbon .btn { background: var(--gist-butter); color: var(--gist-ink); text-decoration: none; padding: 10px 16px; border-radius: 10px; font-weight: 800; }

/* ----- Disclosure-style (collapsible benefits) -------------------------- */
details.bp-details { border: 1px solid var(--gist-rule); border-radius: 10px; padding: 0; margin: 8px 0; background: #fff; }
details.bp-details > summary { padding: 12px 16px; cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.bp-details > summary::after { content: "+"; font-size: 22px; color: var(--gist-rose); font-weight: 400; }
details.bp-details[open] > summary::after { content: "–"; }
details.bp-details > div { padding: 0 16px 14px; }

/* ----- Public-site landing-specific ------------------------------------- */
.bp-insurer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 18px 0; }
.bp-insurer-card { display: block; background: var(--surface-2); border: 1px solid var(--gist-rule); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.bp-insurer-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gist-ink); }
.bp-insurer-card h4 { margin: 0 0 4px; font-size: 17px; font-family: var(--font-display); font-weight: 800; }
.bp-insurer-card .biz { font-size: 13px; color: var(--gist-muted); }
.bp-insurer-card .pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--gist-butter); color: var(--gist-ink); display: inline-block; margin-top: 8px; font-weight: 800; }
.bp-insurer-card .pill.gap { background: var(--surface-2); color: var(--gist-muted); border: 1px dashed var(--gist-rule); }

.bp-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.bp-pill-row .pill { background: #fff; border: 1px solid var(--gist-rule); padding: 4px 10px; border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.bp-pill-row .pill b { color: var(--gist-ink); font-weight: 700; }
