/* TorchLight site — 1.3 "Ledger" look: paper, ink, one ink-blue, serif numerals, square corners, postmark.
   Tokens match the app (casebeacon-1.3-design/REPORT.md). Light by default, dark follows the system. */
:root {
  --bg: #f5f2eb;
  --bg-2: #ece7da;
  --ink: #15181d;
  --soft: #6c6f74;
  --rule: #d8d3c5;
  --accent: #1d3f72;
  --accent-ink: #f5f2eb;
  --ok: #2f6b4f;
  --bad: #a3342a;
  --band: #e6e1d4;
  --shadow: 0 1px 0 rgba(21, 24, 29, .04), 0 18px 40px -18px rgba(21, 24, 29, .35);
  --serif: ui-serif, "New York", "Iowan Old Style", "Charter", "Georgia", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --bg-2: #1a1b1f;
    --ink: #ece8df;
    --soft: #9a9890;
    --rule: #2d2e31;
    --accent: #93b4e8;
    --accent-ink: #121316;
    --ok: #7cc5a0;
    --bad: #f08c80;
    --band: #232427;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 18px 40px -18px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }

/* airmail edge */
.airmail {
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, var(--bg) 12px 24px);
}

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 6px; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--bg) !important;
  padding: 11px 18px; border-radius: 3px; text-decoration: none !important; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; }
.btn:hover { opacity: .88; }
.btn.ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--ink); }
.nav-links a, .btn { white-space: nowrap; }
@media (max-width: 720px) { .nav-links .hide-s { display: none; } .nav-links { gap: 14px; } }
@media (max-width: 480px) { .nav-links .hide-xs { display: none; } .brand { font-size: 20px; } }

/* type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; margin: 0; line-height: 1.08; }
h1 { font-size: clamp(40px, 7vw, 72px); }
h1 em, h2 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(30px, 4.4vw, 46px); }
h3 { font-size: 22px; line-height: 1.2; }
.eyebrow { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); font-weight: 600; margin: 0 0 14px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--soft); max-width: 34em; margin: 22px 0 0; }
.rule-top { border-top: 2px solid var(--ink); }
section { padding: 84px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  border-top: 2px solid var(--ink); padding-top: 12px; margin-bottom: 36px; }
.section-head .eyebrow { margin: 0; color: var(--ink); }
.section-head .count { font-family: var(--serif); color: var(--soft); font-size: 15px; }

/* hero */
.hero { padding: 28px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 22px; margin-top: 34px; }
.badge { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg) !important;
  padding: 10px 20px 10px 16px; border-radius: 6px; text-decoration: none !important; }
.badge svg { width: 26px; height: 26px; fill: currentColor; }
.badge small { display: block; font-size: 11px; line-height: 1; opacity: .8; }
.badge strong { display: block; font-size: 21px; line-height: 1.1; font-weight: 600; }
.meta { font-size: 14px; color: var(--soft); line-height: 1.5; }
.meta b { color: var(--ink); font-weight: 600; }
.stage { position: relative; justify-self: center; width: min(100%, 360px); }
.phone { border: 1px solid var(--rule); border-radius: 38px; overflow: hidden; background: #f5f2eb; box-shadow: var(--shadow); }
.phone img { width: 100%; height: auto; }
.phone.crop { aspect-ratio: 780 / 1420; }
.phone.crop img { height: 100%; object-fit: cover; object-position: top; }
.phone.hero-crop { aspect-ratio: 780 / 1400; }
.phone.hero-crop img { margin-top: -12.8%; }
.sample { font-size: 12px; color: var(--soft); text-align: center; margin: 14px 0 0; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .stage { width: min(78%, 320px); }
}

/* ledger rows (features) */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.ledger li { display: grid; grid-template-columns: 56px 1fr; gap: 8px 20px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.ledger .n { font-family: var(--serif); font-size: 26px; color: var(--soft); line-height: 1.1; }
.ledger h3 { margin-bottom: 8px; }
.ledger p { margin: 0; color: var(--soft); max-width: 44em; }
.ledger p + p { margin-top: 8px; }
.ledger .src { font-size: 14px; }
.feature-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.feature-split .sticky { position: sticky; top: 28px; }
@media (max-width: 880px) { .feature-split { grid-template-columns: 1fr; gap: 28px; } .feature-split .sticky { position: static; } .ledger li { grid-template-columns: 40px 1fr; } }

/* where-you-stand */
.stand { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.stand .phone { width: min(100%, 340px); justify-self: center; }
@media (max-width: 880px) { .stand { grid-template-columns: 1fr; gap: 32px; } .stand .phone { width: min(78%, 320px); } }

/* pricing */
.tiers { border-top: 2px solid var(--ink); }
.tier { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 26px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.tier .what { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.tier .price { font-family: var(--serif); font-size: 34px; font-weight: 600; text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.tier .price small { display: block; font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--soft); }
.tier .desc { grid-column: 1 / -1; color: var(--soft); margin: 0; max-width: 40em; }
.tier.free .price { color: var(--ok); }
.fineprint { font-size: 14px; color: var(--soft); margin: 18px 0 0; max-width: 46em; }

/* trust panel */
.panel-ink { background: var(--accent); color: var(--accent-ink); padding: clamp(28px, 5vw, 56px); border-radius: 3px; }
.panel-ink h2 em { color: inherit; opacity: .78; }
.panel-ink p { color: inherit; opacity: .9; max-width: 36em; margin: 18px 0 0; }
.panel-ink a { color: inherit; }
.checks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.langs span { border: 1px solid currentColor; padding: 5px 12px; font-size: 14px; border-radius: 3px; opacity: .9; }

/* bulletin teaser */
.teaser { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 44px 0; }
.teaser p { color: var(--soft); max-width: 34em; margin: 16px 0 0; }
.teaser .btn { margin-top: 24px; }
.mini { width: 100%; height: auto; display: block; }
@media (max-width: 880px) { .teaser { grid-template-columns: 1fr; gap: 28px; } }

/* faq */
.faq-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 56px; }
@media (max-width: 880px) { .faq-grid { grid-template-columns: 1fr; gap: 24px; } }
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 20px 36px 20px 0; font-family: var(--serif); font-size: 21px; font-weight: 600; list-style: none; position: relative; line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--sans); font-weight: 300; font-size: 28px; color: var(--soft); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 22px; color: var(--soft); max-width: 44em; }

/* final + footer */
.final { text-align: center; }
.final .icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 28px; box-shadow: var(--shadow); }
.final p { color: var(--soft); margin: 16px 0 28px; }
footer { border-top: 2px solid var(--ink); padding: 28px 0 48px; font-size: 14px; color: var(--soft); }
footer .row { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer nav a { color: var(--ink); }
.disclaimer { margin: 18px 0 0; max-width: 60em; }

/* legal / support pages */
.doc { padding: 36px 0 90px; }
.doc-head { border-bottom: 2px solid var(--ink); padding-bottom: 22px; margin-bottom: 6px; }
.doc-head h1 { font-size: clamp(34px, 5vw, 52px); }
.doc-head p { margin: 12px 0 0; color: var(--soft); }
.doc article { max-width: 760px; }
.doc section { padding: 30px 0; border-bottom: 1px solid var(--rule); }
.doc section:last-child { border-bottom: 0; }
.doc h2 { font-size: 26px; margin-bottom: 14px; }
.doc h4 { font-family: var(--sans); font-size: 16px; margin: 18px 0 4px; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 6px 0 12px; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .muted, .doc .purpose { color: var(--soft); font-size: 15px; }
.doc details { border: 1px solid var(--rule); border-radius: 3px; margin: 10px 0; }
.doc details summary { cursor: pointer; padding: 14px 16px; font-weight: 600; }
.doc details div { padding: 0 16px 16px; color: var(--soft); }
.doc .toc { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; }

/* visa bulletin page */
.vb-head { padding: 36px 0 10px; }
.vb-head p.lede { margin-top: 16px; }
.vb-controls { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; background: transparent; color: var(--ink); border: 0; padding: 8px 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cats button { font: inherit; font-size: 14px; font-weight: 600; background: transparent; color: var(--ink); border: 1px solid var(--rule); padding: 7px 12px; border-radius: 3px; cursor: pointer; }
.cats button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.cats .grp { align-self: center; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); padding: 0 4px 0 8px; }
.cats .grp:first-child { padding-left: 0; }
.vb-status { font-size: 14px; color: var(--soft); margin: 18px 0 4px; min-height: 1.5em; }
.vb-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 18px 0 6px; }
.vb-title h2 { font-size: clamp(26px, 3.4vw, 34px); }
.vb-title span { color: var(--soft); font-size: 15px; }
.grid5 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
@media (max-width: 980px) { .grid5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid5 { grid-template-columns: 1fr; } }
.cp { position: relative; border-top: 2px solid var(--ink); padding: 14px 0 26px; }
.cp header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cp h3 { font-size: 19px; }
.cp .now { font-family: var(--serif); font-size: 22px; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; text-align: right; line-height: 1.2; }
.cp .now small { display: block; font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--soft); margin-top: 2px; min-height: 1.3em; }
.cp svg { width: 100%; height: auto; display: block; margin: 10px 0 4px; touch-action: pan-y; overflow: visible; }
.cp .stat { margin: 0; font-size: 14px; color: var(--soft); min-height: 3em; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; padding: 6px 9px; border-radius: 3px; white-space: nowrap; transform: translate(-50%, -100%); z-index: 4; display: none; }
.tip b { font-weight: 600; display: block; }
.tip .tl { display: block; opacity: .8; font-size: 12px; }
.tip .tl:empty { display: none; }
.tbl .lag { color: var(--soft); font-size: 12.5px; }
.vb-axis { font-size: 14px; color: var(--soft); max-width: 52em; margin: 0 0 6px; }
.ax text { fill: var(--soft); font-family: var(--sans); font-size: 10.5px; }
.ax line.g { stroke: var(--rule); stroke-width: 1; }
.ax line.base { stroke: var(--soft); stroke-width: 1; }
.ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.cur-lab { fill: var(--soft); }
.cross { stroke: var(--soft); stroke-width: 1; }
.notes { font-size: 14px; color: var(--soft); max-width: 52em; }
.notes p { margin: 0 0 8px; }
.tbl-wrap { overflow-x: auto; margin-top: 8px; }
.tbl { border-collapse: collapse; font-size: 14px; min-width: 560px; width: 100%; }
.tbl th, .tbl td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl th { font-weight: 600; border-bottom: 2px solid var(--ink); }
details.tblv { margin: 18px 0 8px; }
details.tblv summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.err { padding: 18px; border: 1px solid var(--bad); color: var(--bad); border-radius: 3px; }
noscript .err { margin-top: 24px; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
