/* Shared layout for ClaimRudder pages. Colors, fonts and component polish come from /brand.css, loaded after this file. */
:root {
  --paper: #F4F7F9;
  --surface: #FFFFFF;
  --sunk: #EAF0F3;
  --ink: #0F2233;
  --muted: #536475;
  --line: #D5DFE6;
  --bonnet: #0E7C72;
  --bonnet-ink: #12355B;
  --bonnet-soft: #E3F2EF;
  --leak: #B4470E;
  --leak-soft: #FCEDE3;
  --warn: #8A5300;
  --warn-soft: #FBF0DC;
  --ok: #0A6B62;
  --ok-soft: #E3F3F0;
  --display: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: var(--body); /* no typewriter text; real codes use --code in /brand.css */
  --radius: 10px;
  --wrap: 1120px;
  color-scheme: light; /* light only, like the home page */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
a { color: var(--bonnet); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--bonnet); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 6px; }
.eyebrow { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bonnet); }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 64ch; }
.muted { color: var(--muted); }
.fineprint { font-size: 0.86rem; color: var(--muted); }
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.12rem; color: var(--ink); text-decoration: none; flex: none; }
.mark { width: 28px; height: 28px; border-radius: 7px; background: var(--bonnet); display: grid; place-items: center; }
.mark svg { width: 16px; height: 16px; }
.nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.nav ul a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--ink); }
.nav ul a[aria-current="page"] { font-weight: 600; }
.nav-end { display: flex; align-items: center; gap: 10px; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font: 600 0.88rem var(--body); padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); }
.menu summary::-webkit-details-marker { display: none; }
.menu ul { position: absolute; right: 0; top: calc(100% + 8px); display: grid; gap: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: 0 18px 40px -24px rgba(20, 35, 80, .35); }
.menu ul a { display: block; padding: 9px 10px; border-radius: 6px; color: var(--ink); }
.menu ul a:hover { background: var(--sunk); }
@media (max-width: 1020px) { .nav .links { display: none; } .menu { display: block; } }
.cta-short { display: none; }
@media (max-width: 560px) { .cta-long { display: none; } .cta-short { display: inline; } .nav .wrap { gap: 10px; } }
@media (max-width: 420px) { .nav .btn-sm { padding: 6px 10px; font-size: 0.78rem; white-space: nowrap; } .brand { font-size: 1rem; } }

@media (max-width: 380px) { .brand { font-size: 0.95rem; gap: 6px; } .mark { width: 24px; height: 24px; } .menu summary { padding: 6px 8px; } .nav .btn-sm { padding: 6px 8px; } .nav-end { gap: 6px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 0.95rem var(--body); padding: 11px 18px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--bonnet); color: #fff; }
.btn-primary:hover { background: var(--bonnet-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--bonnet); }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Page layout */
.page-hero { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero .wrap { display: grid; gap: 16px; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section + .section { border-top: 1px solid var(--line); }
.head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 760px; }
.prose { display: grid; gap: 14px; max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 6px; }
.prose h2 { margin-top: 18px; }
.prose h3 { margin-top: 8px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.92rem; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card.lead { border-color: var(--bonnet); box-shadow: 0 0 0 1px var(--bonnet) inset; }
.card p { color: var(--muted); }
.card .price { font-family: var(--mono); font-size: 0.9rem; color: var(--bonnet-ink); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.95rem; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--bonnet); }
.ticks.never li::before { background: var(--leak); }

/* Module block on product pages */
.module { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 40px); align-items: start; }
@media (max-width: 860px) { .module { grid-template-columns: 1fr; } }
.module .copy { display: grid; gap: 14px; min-width: 0; }
.module .copy > p { color: var(--muted); }
.sub { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 14px; }
.sub p { color: var(--muted); font-size: 0.95rem; }

/* Ledger-style sample finding (matches the home page tape) */
.tape { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px -24px rgba(20, 35, 80, .35); overflow: hidden; min-width: 0; }
.tape + .tape { margin-top: 16px; }
.tape-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px dashed var(--line); font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.tape-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 16px; border-bottom: 1px dashed var(--line); font-family: var(--mono); font-size: 0.82rem; }
.tape-row .what { color: var(--ink); overflow-wrap: anywhere; }
.tape-row .amt { color: var(--leak); text-align: right; font-weight: 500; white-space: nowrap; }
.tape-row .amt.ok { color: var(--ok); }
.tape-row .meta { grid-column: 1 / -1; color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.tape-foot { padding: 12px 16px; background: var(--sunk); font-family: var(--mono); font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.tape-foot b { color: var(--ink); font-weight: 500; }

/* Pills and labels */
.synthetic { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; vertical-align: middle; font-family: var(--body); letter-spacing: 0; }
.pill.review { background: var(--warn-soft); color: var(--warn); }
.pill.ready { background: var(--bonnet-soft); color: var(--bonnet-ink); }
.pill.approved { background: var(--ok-soft); color: var(--ok); }
.pill.no { background: var(--leak-soft); color: var(--leak); }
.badge { justify-self: start; font-family: var(--mono); font-size: 0.7rem; letter-spacing: .06em; text-transform: uppercase; background: var(--bonnet); color: var(--surface); padding: 3px 8px; border-radius: 4px; }

/* Callouts */
.callout { border-left: 3px solid var(--bonnet); background: var(--bonnet-soft); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; display: grid; gap: 6px; max-width: 820px; }
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout.leak { border-left-color: var(--leak); background: var(--leak-soft); }
.callout b { color: var(--ink); }
.quote { padding: 20px 24px; border-left: 3px solid var(--bonnet); background: var(--bonnet-soft); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--display); font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 600; color: var(--bonnet-ink); max-width: 820px; }

/* Tables: the wrapper scrolls, never the page */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tablewrap table { min-width: 560px; }
.tablewrap table.wide { min-width: 780px; }
caption { text-align: left; padding: 12px 12px 0; font-weight: 600; }
th { text-align: left; font-weight: 600; font-size: 0.75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--sunk); padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.amt, th.amt { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.now td { background: var(--bonnet-soft); }
tr.group td { background: var(--sunk); font-weight: 600; font-size: 0.82rem; }

/* Pricing calculator */
.calc { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 24px); }
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } }
.calc label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.calc input[type=number] { font: 500 1.1rem var(--mono); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%; max-width: 220px; }
.calc input[type=range] { width: 100%; accent-color: var(--bonnet); }
.calc .out { display: grid; gap: 10px; align-content: start; min-width: 0; }
.calc .big { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; color: var(--bonnet-ink); font-variant-numeric: tabular-nums; }
.calc .row2 { display: flex; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 0.95rem; }
.calc .row2 b { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-err { color: var(--leak); font-size: 0.85rem; min-height: 1.2em; }

/* FAQ */
.faq { display: grid; max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding-block: 16px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--bonnet); }
.faq details[open] summary::after { content: "\2013"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin-top: 10px; color: var(--muted); max-width: 70ch; }

/* Legal summary banner */
.legal-banner { border: 1.5px solid var(--warn); background: var(--warn-soft); color: var(--ink); border-radius: var(--radius); padding: 14px 18px; display: grid; gap: 4px; max-width: 820px; }
.legal-banner b { color: var(--warn); font-family: var(--mono); font-size: 0.78rem; letter-spacing: .06em; text-transform: uppercase; }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 36px 28px; font-size: 0.86rem; color: var(--muted); background: var(--surface); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-bottom: 24px; }
.foot-cols h2 { font-family: var(--mono); font-size: 0.74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); font-weight: 500; margin-bottom: 10px; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-cols a { color: var(--muted); text-decoration: none; }
.foot-cols a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
/* contact form */
.cf label { display: grid; gap: 6px; font-weight: 600; color: var(--ink); font-size: 0.93rem; }
.cf input, .cf select, .cf textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%; }
.cf input:focus, .cf select:focus, .cf textarea:focus { outline: 2px solid var(--bonnet); outline-offset: 1px; }
.cf .cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf button { justify-self: start; cursor: pointer; } .cf button:disabled { opacity: .6; }
.cf-status { margin: 0; } .cf-status.ok { color: var(--ok); } .cf-status.err { color: var(--leak); }
@media (max-width: 760px) { .cf { grid-column: auto !important; } }
address { font-style: normal; }
