/* Headwater Surety · bond page components (shared by every /bonds/ page) */

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 22px; font: 500 12.5px/1.3 var(--mono); letter-spacing: .04em; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--current); }
.crumbs [aria-current] { color: var(--fg); }

/* Hero: copy left, live calculator right */
.bp-hero { padding-block: 56px 88px; position: relative; overflow: hidden; scroll-margin-top: 70px; background: radial-gradient(900px 500px at 85% 20%, rgba(95, 224, 195, .07), transparent 65%), radial-gradient(700px 400px at 10% 100%, rgba(217, 128, 63, .07), transparent 70%); }
.bp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 64px; align-items: start; }
.bp-hero h1 { font-size: clamp(38px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; margin: 14px 0 20px; }
.bp-hero h1 span { color: var(--current); }
.bp-lede { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 56ch; }
.bp-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.bp-updated { margin-top: 22px; font: 500 12px/1.4 var(--mono); letter-spacing: .06em; color: var(--muted); }
.bp-hero .calc { margin-top: 8px; }

/* Quick facts strip */
.facts { border-block: 1px solid var(--line-soft); background: var(--surface); }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts div { padding: 26px 24px; display: grid; gap: 8px; align-content: start; }
.facts div + div { border-left: 1px solid var(--line-soft); }
.facts dt { font: 500 11.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font: 700 19px/1.25 var(--display); letter-spacing: -0.01em; }
.facts dd small { display: block; margin-top: 6px; font: 400 14px/1.45 var(--body); color: var(--muted); letter-spacing: 0; }

/* Generic content section */
.bp-sec { padding-block: 104px; border-top: 1px solid var(--line-soft); scroll-margin-top: 70px; }
.bp-sec:first-of-type { border-top: 0; }
.bp-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.bp-head h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; }
.bp-head p { color: var(--muted); font-size: 17px; max-width: 62ch; }

/* Downstream flow: one bond, three protected parties */
.flow { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr) minmax(0, 360px); align-items: center; }
.flow-src { position: relative; padding: 28px 24px; border-radius: var(--radius); background: linear-gradient(160deg, #18324f, var(--surface)); border: 1px solid rgba(217, 128, 63, .45); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); display: grid; gap: 10px; }
.flow-src .tag { font: 500 11px/1 var(--mono); letter-spacing: .16em; color: var(--copper-hi); }
.flow-src b { font: 750 22px/1.15 var(--display); }
.flow-src p { color: var(--muted); font-size: 14.5px; }
.flow-src svg { width: 46px; height: 46px; }
.flow-lines { width: 100%; height: 340px; display: block; }
.flow-lines path { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.flow-lines .p1 { stroke: var(--copper); }
.flow-lines .p2, .flow-lines .p3 { stroke: var(--current); }
.flow-lines .dash { stroke-dasharray: 2 12; stroke-width: 3; opacity: .9; }
@media (prefers-reduced-motion: no-preference) { .flow-lines .dash { animation: flowdash 1.6s linear infinite; } }
@keyframes flowdash { to { stroke-dashoffset: -28; } }
.flow-to { display: grid; gap: 14px; }
.party { padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.party .k { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.party.perf .k { color: var(--copper-hi); }
.party.pay .k { color: var(--current); }
.party b { font: 700 17px/1.25 var(--display); }
.party span:last-child { color: var(--muted); font-size: 14.5px; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.pair article { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 12px; align-content: start; }
.pair h3 { font-size: 22px; }
.pair p, .pair li { color: var(--muted); font-size: 15.5px; }
.pair ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.pair .perf h3 { color: var(--copper-hi); }
.pair .pay h3 { color: var(--current); }

/* Law table */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.law { width: 100%; border-collapse: collapse; min-width: 720px; }
.law th, .law td { text-align: left; padding: 18px 22px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.law thead th { font: 500 11.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: rgba(10, 22, 38, .5); }
.law tbody th { font: 700 16px/1.3 var(--display); width: 26%; }
.law td { color: var(--muted); font-size: 15px; }
.law td b { color: var(--fg); font: 700 17px/1.3 var(--display); display: block; margin-bottom: 4px; }
.law tr:last-child th, .law tr:last-child td { border-bottom: 0; }
.law .cite { font: 500 12px/1.5 var(--mono); color: var(--muted); }
.note { margin-top: 20px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 18px 20px; border-radius: 12px; border: 1px solid rgba(95, 224, 195, .3); background: var(--current-soft); color: var(--fg); font-size: 15px; max-width: 880px; }
.note::before { content: "i"; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--current); color: var(--bg); font: 700 14px/1 var(--display); }
.note.copper { border-color: rgba(217, 128, 63, .4); background: rgba(217, 128, 63, .1); }
.note.copper::before { content: "!"; background: var(--copper); }

/* Cost table */
.cost-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.cost { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cost th, .cost td { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); text-align: right; }
.cost th:first-child, .cost td:first-child { text-align: left; }
.cost thead th { font: 500 11.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cost td { font: 600 17px/1.2 var(--display); }
.cost td.p { color: var(--current); }
.cost caption { caption-side: bottom; text-align: left; padding-top: 14px; color: var(--muted); font-size: 13.5px; }
.factors { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.factors li { display: grid; gap: 4px; padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.factors b { font: 700 16px/1.3 var(--display); }
.factors span { color: var(--muted); font-size: 14.5px; }

/* Underwriting tiers */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tier { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 12px; align-content: start; }
.tier .k { font: 500 11.5px/1 var(--mono); letter-spacing: .14em; color: var(--current); }
.tier h3 { font-size: 20px; }
.tier p { color: var(--muted); font-size: 15px; }
.tier ul { margin: 0; padding-left: 18px; color: var(--fg); font-size: 15px; display: grid; gap: 6px; }

/* Related bonds */
.related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.related a { padding: 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; display: grid; gap: 6px; transition: border-color .18s, transform .18s; }
.related a:hover { border-color: var(--current); transform: translateY(-2px); }
.related b { font: 700 16px/1.3 var(--display); color: var(--fg); }
.related span { color: var(--muted); font-size: 14px; }
.related a:focus-visible, .crumbs a:focus-visible { outline: 2px solid var(--current); outline-offset: 3px; }

.sources { margin-top: 28px; color: var(--muted); font-size: 13.5px; line-height: 1.7; max-width: 880px; }
.sources a { color: var(--muted); }

@media (max-width: 1020px) {
  .bp-grid, .cost-grid { grid-template-columns: 1fr; gap: 40px; }
  /* Phones: show the price right after the headline (Ads traffic lands here) */
  .bp-hero .bp-grid { display: flex; flex-direction: column; gap: 0; }
  .bp-copy { display: contents; }
  .bp-copy > * { order: 1; }
  .bp-copy > .crumbs, .bp-copy > .eyebrow, .bp-copy > h1, .bp-copy > .bp-lede { order: 0; }
  .bp-hero .calc, .bp-hero .glance { order: 0; margin: 28px 0 8px; }
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow-lines { display: none; }
  .flow-to { margin-top: 0; padding: 22px 0 0 22px; border-left: 2px dashed var(--current); margin-left: 30px; }
  .tiers { grid-template-columns: 1fr; }
  .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .pair { grid-template-columns: 1fr; }
  .bp-sec { padding-block: 72px; }
  .bp-hero { padding-block: 32px 64px; }
}
@media (max-width: 520px) {
  .facts dl, .related { grid-template-columns: 1fr; }
  .facts div + div { border-left: 0; border-top: 1px solid var(--line-soft); }
}

/* "At a glance" card (bond pages without a calculator) */
.glance { position: relative; margin-top: 8px; background: linear-gradient(180deg, #11263d, var(--surface)); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px 28px; display: grid; gap: 16px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.glance-mark { width: 52px; height: 52px; }
.glance-name { font: 750 22px/1.2 var(--display); letter-spacing: -0.01em; margin: 0; }
.glance dl { margin: 0; display: grid; }
.glance dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.glance dt { color: var(--muted); font-size: 14.5px; }
.glance dd { margin: 0; font: 650 15px/1.35 var(--display); text-align: right; color: var(--fg); }
.glance dl div:first-child dd { color: var(--current); font-size: 17px; }

/* Long-form text */
.prose { max-width: 72ch; display: grid; gap: 18px; }
.prose p, .prose li { color: #B8C8D3; font-size: 17.5px; line-height: 1.75; }
.prose p { margin: 0; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; margin-top: 26px; }
.prose h3 { font-size: 21px; margin-top: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.prose strong { color: var(--fg); }
.prose a:not(.btn) { color: var(--current); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(95, 224, 195, .4); }
.prose a:not(.btn):hover { text-decoration-color: var(--current); }
.prose .tbl-wrap { margin: 6px 0; }

/* Guides */
.guide-hero { padding-block: 56px 40px; }
.guide-hero h1 { max-width: 20ch; }
.guide-hero .bp-lede { max-width: 64ch; }
.byline { margin-top: 18px; font: 500 12.5px/1.4 var(--mono); letter-spacing: .04em; color: var(--muted); }
.guide-hero + .bp-sec { padding-top: 32px; }
.guide-cta { margin-top: 18px !important; padding: 20px 22px; border-radius: 14px; border: 1px solid rgba(217, 128, 63, .4); background: rgba(217, 128, 63, .08); color: var(--fg) !important; }
.prose .sources { font-size: 13.5px; line-height: 1.7; color: var(--muted); }
