/* Shared chrome for all pages: header/nav + content-page layout + footer + forms.
   The app (index.html) keeps its own big inline styles; this file owns only the shared chrome. */
/* Brand font — SN Pro (Google Fonts). @import loads it on every page (site.css is in each <head>).
   For production, switching to <link rel="preconnect"> + <link> in the head is a bit faster. */
@import url('https://fonts.googleapis.com/css2?family=SN+Pro:wght@400;500;600;700&display=swap');
:root {
  --text: #1e293b; --muted: #64748b; --primary: #2563eb; --primary-hover: #1d4ed8;
  --ink: #0f172a; --line: #e2e8f0; --bg: #f8fafc;
}

/* ── HEADER / NAV ─────────────────────────────────────────────────────── */
/* Sticky wrapper: #site-header is a direct child of <body> (the scroll container), so stickiness
   works here — not on the inner .site-header, whose parent is only 67px tall. z-index sits above the
   drawer (41) so the header (and its shadow) always stay on top. */
#site-header { position: sticky; top: 0; z-index: 50; }
.site-header {
  background: #FDFCFA; color: #fff; height: 67px; padding: 0 60px;   /* Figma: H 67, left inset 60 */
  font-family: 'SN Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  display: flex; align-items: center; gap: 29px;                     /* Figma: brand → tagline gap */
  box-shadow: 0 2px 8px rgba(0,0,0,.3); position: relative; z-index: 50; box-sizing: border-box;
}
.site-header .brand {
  display: flex; align-items: center; gap: 15px; flex: none; white-space: nowrap;   /* Figma: logo → "PeckCheck" gap; never shrink */
  font-size: 24px; font-weight: 700; letter-spacing: 0; line-height: 1.5; color: #161816; text-decoration: none;
}
.site-header .brand img { height: 50px; width: 50px; border-radius: 50%; object-fit: cover; display: block; }  /* Figma: 50×50 circle */
.brand-accent { color: #6A984D; }   /* the "Check" half — joined, just two-tone */
.site-tagline { color: #161816; font-size: 16px; font-weight: 500; line-height: 1.5; white-space: nowrap; flex: none; }
/* Nav tabs — in FLOW (flex:1) so they centre in the space between brand/tagline and the actions and can
   never overlap them (the old absolute-centred version overlapped on anything narrower than ~ultrawide). */
.site-nav { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; gap: 48px; align-items: center; }
.site-nav a {
  color: #161816; text-decoration: none; font-size: 20px; font-weight: 500;   /* inactive: SN Pro Medium 20 */
  line-height: 1.5; white-space: nowrap; transition: color .15s;
}
.site-nav a:hover { opacity: .65; }   /* subtle feedback — text stays #161816, no colour change */
/* Active tab (Figma): 16px text (always #161816) + a 1px GREEN frame, transparent fill, radius 8,
   padding 10/24 → exact H 44 frame (16×1.5 + 10×2 = 44). Green appears ONLY on the border. */
.site-nav a.active { color: #161816; font-size: 16px; border: 1px solid #305738; border-radius: 8px; padding: 10px 24px; background: transparent; }
/* Right-side actions group (checks pill + account button) — the header's right cluster. */
.nav-actions { margin-left: auto; flex: none; display: flex; align-items: center; gap: 24px; }  /* pill ↔ Login (Figma ≈ 45px) */
/* Account/Login button — Figma: green fill #305738, white text #FDFCFA SN Pro Bold 16, radius 8, padding 10/24. */
.nav-account {
  background: #305738; color: #FDFCFA; border: none; border-radius: 8px;
  padding: 10px 24px; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.5;
  cursor: pointer; white-space: nowrap;
}
.nav-account:hover { background: #264a2e; }
/* Checks-available pill — coins icon + "N checks available". Clickable, opens the credit-pack picker.
   Figma: rounded capsule, light-grey fill + border (747685 @ 15%), coins.webp 18×20, SN Pro Bold 12 in #747685. */
.nav-checks {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(116,118,133,.15); border: 1px solid rgba(116,118,133,.4); border-radius: 999px;
  padding: 6px 20px;
  font-family: inherit; font-size: 12px; font-weight: 700; color: #747685; line-height: 1.5;
  cursor: pointer; white-space: nowrap;
}
.nav-checks::before {
  content: ''; width: 18px; height: 20px; flex-shrink: 0;               /* Figma: coins image 18×20 */
  background: url('/assets/coins.webp') center / contain no-repeat;
}
.nav-checks:hover { background: rgba(116,118,133,.22); }
.nav-checks.empty { color: #b45309; border-color: rgba(180,83,9,.4); }  /* 0 left → subtle amber cue */
.nav-toggle { display: none; margin-left: auto; background: none; border: none; color: #161816; font-size: 26px; line-height: 1; cursor: pointer; }

/* ── ACCOUNT DROPDOWN ─────────────────────────────────────────────────── */
/* Account dropdown — styled with the site's design system (SN Pro, brand green, greys). */
.account-menu {
  position: fixed; z-index: 55; width: 320px; max-width: calc(100vw - 24px);
  background: #FDFCFA; color: #373737; border: 1px solid #ECECEC; border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 16px;
  font-family: 'SN Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; font-size: 14px;
}
.account-menu .acct-loading, .account-menu .acct-err { color: #828282; font-size: 13px; padding: 6px 0; }
.account-menu .acct-err { color: #BB0000; }
.acct-email { font-weight: 500; color: #161816; font-size: 14px; word-break: break-all; padding-bottom: 14px; border-bottom: 1px solid #ECECEC; }
.acct-balance { padding: 14px 0; border-bottom: 1px solid #ECECEC; }
.acct-total { font-size: 16px; font-weight: 700; color: #161816; }
.acct-line { font-size: 12px; color: #828282; margin-top: 4px; }
.acct-buy-btn { margin-top: 14px; width: 100%; background: #305738; color: #FDFCFA; border: none; border-radius: 8px; padding: 10px; font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.acct-buy-btn:hover { background: #264a2e; }
.acct-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #828282; margin: 14px 0 8px; }
.acct-list { max-height: 168px; overflow-y: auto; }
.acct-buy-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #ECECEC; }
.acct-buy-row:last-child { border-bottom: none; }
.acct-buy-name { font-size: 13px; font-weight: 500; color: #161816; }
.acct-buy-meta { font-size: 11.5px; color: #828282; }
.acct-empty { font-size: 12px; color: #828282; padding: 2px 0 6px; }
.acct-logout { margin-top: 14px; width: 100%; background: transparent; color: #BB0000; border: 1px solid #F69497; border-radius: 8px; padding: 10px; font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.acct-logout:hover { background: #FBE6E5; }

/* ── HEADER RESPONSIVE ──────────────────────────────────────────────────── */
/* Tagline only stays while there's room for BOTH it and the full-size nav (else it crowds the nav). */
@media (max-width: 1600px) { .site-tagline { display: none; } }
/* Once the tagline is gone, tighten the nav in step so its items never spill into the brand / actions. */
@media (max-width: 1360px) {
  .site-header { padding: 0 40px; gap: 20px; }
  .site-nav { gap: 28px; }
  .site-nav a { font-size: 18px; }
}
@media (max-width: 1180px) {
  .site-header { padding: 0 24px; }
  .site-nav { gap: 20px; }
  .site-nav a { font-size: 16px; }
  .site-nav a.active { padding: 8px 14px; }
  .nav-actions { gap: 14px; }
  .nav-account { padding: 9px 16px; }
  .nav-checks { padding: 6px 14px; }
}
/* Narrow: collapse the nav into a hamburger dropdown (light, design-system; hamburger sits after the actions). */
@media (max-width: 1100px) {
  .nav-toggle { display: block; order: 3; margin-left: 10px; }
  .nav-actions { order: 2; margin-left: auto; }
  .site-nav {
    order: 4; flex: none; position: absolute; top: 100%; left: 0; right: 0; transform: none;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px;
    background: #FDFCFA; padding: 8px; border-top: 1px solid #ECECEC;
    box-shadow: 0 8px 16px rgba(0,0,0,.15); display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 16px; padding: 12px 14px; border-radius: 8px; }
  .site-nav a.active { border: none; padding: 12px 14px; background: rgba(48,87,56,.08); color: #305738; }
}
/* Phones: shrink the brand + Account, drop the checks pill (its count lives in the Account dropdown). */
@media (max-width: 560px) {
  .site-header { padding: 0 16px; gap: 10px; }
  .site-header .brand { font-size: 20px; gap: 10px; }
  .site-header .brand img { height: 40px; width: 40px; }
  .nav-checks { display: none; }
  .nav-account { padding: 9px 14px; font-size: 15px; }
}

/* ── CONTENT PAGES ────────────────────────────────────────────────────── */
body.page-body { margin: 0; background: #EDEBDF; color: var(--text);
  font-family: 'SN Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; line-height: 1.6; }
/* Form controls don't inherit font-family by default → force it site-wide so SN Pro reaches inputs/buttons too. */
button, input, select, textarea { font-family: inherit; }
.page { max-width: 820px; margin: 0 auto; padding: 40px 20px 64px; }
.page h1 { font-size: 30px; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.5px; }
.page .lede { font-size: 16px; color: var(--muted); margin: 0 0 32px; }
.page h2 { font-size: 20px; color: var(--ink); margin: 34px 0 10px; }
.page p { margin: 0 0 14px; }
.page ul { margin: 0 0 16px; padding-left: 22px; }
.page li { margin: 5px 0; }
.page a { color: var(--primary); }

/* Step / feature cards */
.cards { display: grid; gap: 14px; margin: 18px 0; }
.cards.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .cards.two { grid-template-columns: 1fr; } }
.card-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.card-box h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card-box .step-n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.card-box p { margin: 0; font-size: 14px; color: var(--muted); }
/* Lists inside a card (e.g. the friction legend in step 3) match the card's paragraph text:
   small + muted, with the colored .dot acting as the bullet (so no default disc). */
.card-box ul { margin: 8px 0; padding-left: 2px; list-style: none; }
.card-box li { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0 0 5px; }
.card-box li .dot { vertical-align: middle; margin-right: 4px; }
.card-box li strong { color: var(--ink); font-weight: 600; }

/* Callout / note box */
.callout {
  background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid #f59e0b;
  border-radius: 10px; padding: 14px 16px; margin: 22px 0; font-size: 14.5px; color: #92400e;
}

/* Friction legend chips */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.low { background: #22c55e; } .dot.medium { background: #f59e0b; }
.dot.high { background: #ef4444; } .dot.unknown { background: #cbd5e1; }

/* ── MARKETING PAGES (How it works, etc.) — wider layout + design-system frames ──
   Scoped to .page-wide so the legal pages (Privacy / Terms) keep the narrow reading layout. */
.page-wide { max-width: 1294px; }                                   /* → inner content ≈ 1254px with the 20px page padding */
.page-wide h1 { font-size: 48px; font-weight: 700; }                /* SN Pro Bold 48 */
.page-wide .lede { font-size: 24px; font-weight: 400; color: var(--ink); margin: 0 0 32px; }   /* SN Pro Regular 24 */
/* 3 step cards — FDFCFA fill, BABAC1 stroke, radius 8. */
.page-wide .card-box { position: relative; background: #FDFCFA; border: 1px solid #BABAC1; border-radius: 8px; padding: 28px 29px 24px; }
.page-wide .card-box h3 { align-items: flex-start; gap: 12px; margin: 0 0 10px; font-size: 20px; font-weight: 700; color: #161816; }   /* SN Pro Bold 20 */
.page-wide .card-box .step-n { width: 35px; height: 35px; flex: none; border-radius: 50%; background: #305738; color: #fff; font-size: 24px; font-weight: 700; }   /* green circle, Bold 24 */
.page-wide .card-box p { font-size: 16px; font-weight: 400; color: #828282; }   /* SN Pro Regular 16 */
.page-wide .card-box li { font-size: 16px; color: #828282; }
.page-wide .card-box .tn-note { font-size: 16px; font-weight: 700; color: #BB0000; }   /* Tennessee-only note */
/* Card 3 status list — indent to the number-circle's right edge so it stands out; friction-dot colours. */
.page-wide .card-box ul { margin-left: 35px; }
.page-wide .card-box .dot.low     { background: #6A984D; }
.page-wide .card-box .dot.medium  { background: #FFA913; }
.page-wide .card-box .dot.high    { background: #BB0000; }
.page-wide .card-box .dot.unknown { background: #828282; }

/* ── What we check — subheadings + body; text column 1218 (heading uses the shared page-wide position/size). */
.page-wc h2 { font-size: 20px; font-weight: 700; line-height: 30px; letter-spacing: 0; color: #161816; max-width: 1254px; }   /* SN Pro Bold 20 */
.page-wc p  { font-size: 16px; font-weight: 400; line-height: 24px; letter-spacing: 0; color: #828282; max-width: 1254px; }   /* SN Pro Regular 16 */
.page-wc .lede { font-size: 16px; font-weight: 400; line-height: 24px; color: #828282; }   /* intro is regular body text here, not the big lede */

/* ── FAQ — intro as regular text; each question in a framed box (W 1254, FDFCFA, BABAC1 stroke, radius 8, gap 10). */
.page-faq .lede { font-size: 16px; font-weight: 400; line-height: 24px; color: #828282; }
.page-faq .faq { max-width: 1254px; }
.page-faq .faq details { position: relative; background: #FDFCFA; border: 1px solid #BABAC1; border-radius: 8px; margin-bottom: 10px; padding: 0; }
/* Question row: text at X43/Y19, SN Pro Bold 20 / 161816; collapsed frame ≈ 67px (19+30+18). */
.page-faq .faq summary { padding: 19px 20px 18px 43px; font-size: 20px; font-weight: 700; line-height: 30px; color: #161816; }
/* +/- icon: 20×20 at X13/Y24, drawn with a 1.5px #305738 stroke (SVG). */
.page-faq .faq summary::before {
  content: ''; position: absolute; left: 13px; top: 24px; width: 20px; height: 20px;
  background: url("/assets/icons/green_plus.svg") no-repeat center / 20px 20px;
}
.page-faq .faq details[open] summary::before {
  content: '';   /* override the base rule's '－' glyph so only the icon shows */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cline x1='0.75' y1='9.25' x2='19.25' y2='9.25' stroke='%23305738' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 20px 20px;
}
/* Answer — regular text, aligned under the question. */
.page-faq .faq details > p { margin: 0; padding: 0 20px 20px 43px; font-size: 16px; font-weight: 400; line-height: 24px; color: #828282; }

/* ── Contact — heading + intro centred on the page so their centre lines up with the centred form. */
.page-contact h1, .page-contact .lede { text-align: center; }
.page-contact .lede { font-size: 16px; font-weight: 400; line-height: 24px; color: #828282; }
/* Form card (W 576, padding 40, FDFCFA, BABAC1, radius 8) — inner fields stack with gap 24. */
.page-contact .form { display: flex; flex-direction: column; gap: 24px; max-width: 576px; width: 100%; box-sizing: border-box; margin: 24px auto 0; padding: 40px; background: #FDFCFA; border: 1px solid #BABAC1; border-radius: 8px; }
.page-contact .form .field { display: flex; flex-direction: column; gap: 8px; }
.page-contact .form label { margin: 0; }
/* Inputs — W494 (fill), F7F9FB fill, C3C6D7 stroke, radius 12. */
.page-contact .form input, .page-contact .form textarea { width: 100%; box-sizing: border-box; background: #F7F9FB; border: 1px solid #C3C6D7; border-radius: 12px; color: #191C1E; }
.page-contact .form input { height: 48px; padding: 13px 16px; }
.page-contact .form textarea { min-height: 154px; padding: 16px; resize: vertical; }
.page-contact .form input:focus, .page-contact .form textarea:focus { border-color: #305738; box-shadow: 0 0 0 3px rgba(48,87,56,.12); outline: none; }
/* Send button — full width, H56, green. */
.page-contact .form button { width: 100%; height: 56px; margin: 0; background: #305738; color: #FDFCFA; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; }
.page-contact .form button:hover { background: #264a2e; }
.page-contact .form button:disabled { opacity: .6; cursor: default; }
.page-contact .form-note { margin: 0; }
.page-contact .form-note:empty { display: none; }   /* no empty 24px gap under the button */
/* 2 warning boxes — FFA913 stroke (1px, inside) + FFA913 10% fill, radius 8; text 85590D. */
.page-wide .callout {
  background: rgba(255,169,19,.10); border: 1px solid #FFA913; border-left: 1px solid #FFA913;
  border-radius: 8px; color: #85590D;
  font-size: 16px; font-weight: 400; line-height: 26px; letter-spacing: 0;   /* main text: SN Pro Regular 16 / lh 26 */
}
.page-wide .callout-head { display: block; font-size: 16px; font-weight: 700; line-height: 28px; letter-spacing: 0; color: #85590D; margin-bottom: 6px; }   /* SN Pro Bold 16 */
.page-wide .callout-icon { width: 20px; height: 20px; vertical-align: middle; margin-right: 4px; }   /* warning icon 20×20 */

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 12px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '＋ '; color: var(--primary); }
.faq details[open] summary::before { content: '－ '; }
.faq details > p { padding-bottom: 12px; margin: 0; color: var(--muted); font-size: 14.5px; }

/* Forms */
.form { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; max-width: 560px; }
.form label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 14px 0 5px; }
.form label:first-child { margin-top: 0; }
.form input, .form textarea {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--text); background: #fff; outline: none;
}
.form input:focus, .form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form button {
  margin-top: 18px; background: var(--primary); color: #fff; border: none; border-radius: 8px;
  padding: 12px 22px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.form button:hover { background: var(--primary-hover); }
.form button:disabled { opacity: .6; cursor: default; }
.form-note { margin-top: 14px; font-size: 14px; }
.form-note.ok { color: #15803d; } .form-note.err { color: #b91c1c; }

/* ── FOOTER ───────────────────────────────────────────────────────────── */
/* Light footer, Figma: H 212, bg FDFCFA, 12-column layout guide. Three content blocks
   (About / Platform / Company); the 12th "Social" column is intentionally omitted for now. */
.site-footer {
  min-height: 212px; box-sizing: border-box;
  border-top: 1px solid #EAEAE0; background: #FDFCFA; color: #191C1E;
  font-family: 'SN Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  padding: 40px 64px 24px; display: flex; flex-direction: column; gap: 28px;
}
.footer-grid {
  width: 100%; max-width: 1312px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 32px;   /* 3 blocks stretched evenly across the full width, About→left, Company→right */
}
.site-footer .footer-about { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.site-footer .footer-brand {
  display: inline-flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; line-height: 1.5;
  color: #161816; text-decoration: none; letter-spacing: 0;
}
.site-footer .footer-brand img { height: 50px; width: 50px; border-radius: 50%; object-fit: cover; display: block; }
.site-footer .footer-desc { margin: 4px 0 0; max-width: 280px; font-size: 12px; font-weight: 400; color: #434655; line-height: 1.5; }
.site-footer .footer-col { display: flex; flex-direction: column; gap: 14px; }
.site-footer .footer-col-title { font-size: 20px; font-weight: 500; color: #161816; margin-bottom: 4px; }
.site-footer .footer-col a { font-size: 16px; font-weight: 400; color: #161816; text-decoration: none; }
.site-footer .footer-col a:hover { color: #305738; }
.site-footer .footer-copy { max-width: 1312px; margin: 0 auto; width: 100%; text-align: center; font-size: 10px; font-weight: 400; color: #000000; line-height: 1.6; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { padding: 32px 24px 20px; }
}

/* ── LEGAL PAGES (Privacy / Terms) ────────────────────────────────────── */
/* Design-system refresh: FDFCFA reading card on the beige page, SN Pro, dark headings, green links. */
.legal { max-width: 860px; margin: 40px auto; padding: 44px 48px; background: #FDFCFA; border: 1px solid #BABAC1; border-radius: 8px; }
.legal h1 { font-size: 40px; font-weight: 700; color: #161816; letter-spacing: -0.5px; margin: 0 0 8px; }
.legal .updated { font-size: 14px; color: #828282; margin: 0 0 28px; }
.legal h2 { font-size: 22px; font-weight: 700; color: #161816; margin: 34px 0 10px; }
.legal h3 { font-size: 17px; font-weight: 600; color: #161816; margin: 22px 0 6px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; color: #373737; }
.legal ul { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal a { color: #305738; text-decoration: underline; }
.legal a:hover { color: #264a2e; }
@media (max-width: 640px) { .legal { padding: 28px 20px; margin: 20px auto; } .legal h1 { font-size: 32px; } }
