/* ============================================================
   Scan and Flag: shared site styles (scanandflag.com)
   Blueprint light (sprint 38 THEMES.light). Light theme only.
   Page layout lives in each page's <style>; everything shared is here.
   Fonts are the staff app's self-hosted files under /app/fonts/
   (apps/web/public/fonts/). Renaming one there breaks this file.
============================================================ */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url(/app/fonts/geist-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url(/app/fonts/geist-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url(/app/fonts/geist-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 700; font-display: swap; src: url(/app/fonts/geist-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/app/fonts/geist-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/app/fonts/geist-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url(/app/fonts/space-grotesk-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url(/app/fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); }

:root {
  color-scheme: light;

  /* surfaces */
  --canvas: #FAFBFC;
  --surface: #FFFFFF;
  --recess: #F4F6F9;
  --sunken: #EDF1F6;

  /* ink and steel */
  --ink: #0F1B2D;
  --fg-2: #3B4658;
  --fg-3: #5D6779;
  --soft: #E5EAF1;
  --border: #D5DCE6;

  /* action */
  --action: #2563D6;
  --action-hover: #1B4DA8;
  --on-action: #FFFFFF;
  --link: #1B4DA8;
  --focus: #DCE7F8;

  /* semantic pairs: [soft background, deep foreground] */
  --ok-bg: #D5EBDF;      --ok-fg: #0F6B43;
  --warn-bg: #FCE5B1;    --warn-fg: #8A5A1F;
  --alert-bg: #FBE0DD;   --alert-fg: #841F18;
  --info-bg: #DCE7F8;    --info-fg: #1B4DA8;
  --neutral-bg: #E5EAF1; --neutral-fg: #3B4658;
  --ink-bg: #0F1B2D;     --ink-fg: #FAFBFC;

  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 1px 1px rgba(15, 27, 45, .04);
  --shadow-lift: 0 18px 40px -24px rgba(15, 27, 45, .35), 0 2px 6px rgba(15, 27, 45, .06);

  /* type */
  --font-body: "Geist", system-ui, -apple-system, "Helvetica Neue", Helvetica, sans-serif;
  --font-display: "Space Grotesk", "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --t-display-xl: clamp(42px, 6.4vw, 84px);
  --t-display-l: clamp(34px, 4.6vw, 60px);
  --t-display-m: clamp(28px, 3.3vw, 42px);
  --t-display-s: clamp(21px, 2vw, 26px);
  --t-lede: clamp(18px, 1.5vw, 20px);
  --t-body: 17px;
  --t-small: 15px;
  --t-micro: 12px;

  /* layout */
  --container: 1200px;
  --gutter: 40px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--action); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
strong { font-weight: 600; color: var(--ink); }
::selection { background: var(--focus); color: var(--ink); }

/* ---------- layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.band { padding: 104px 0; border-bottom: 1px solid var(--soft); }
.band.tight { padding: 72px 0; }
.band.recess { background: var(--recess); }
.band.surface { background: var(--surface); }
.band.ink { background: var(--ink); color: var(--ink-fg); border-bottom-color: var(--ink); }
.band.ink .lede, .band.ink p { color: #C9D2DF; }
.band.ink .eyebrow { color: #9FB0C8; }
.band.ink .eyebrow::before { background: #4C86F0; }
.band.ink h2, .band.ink h3, .band.ink strong { color: var(--ink-fg); }
.band.ink a:not(.btn) { color: #A9C4F5; }
.stack > * + * { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.section-head { display: grid; grid-template-columns: 240px 1fr; gap: 48px; margin-bottom: 56px; align-items: start; }
.section-head .lede { margin-top: 18px; }

/* ---------- type ---------- */
.display-xl, .display-l, .display-m, .display-s {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}
.display-xl { font-size: var(--t-display-xl); line-height: 0.98; letter-spacing: -0.035em; }
.display-l { font-size: var(--t-display-l); line-height: 1.02; }
.display-m { font-size: var(--t-display-m); line-height: 1.08; letter-spacing: -0.025em; }
.display-s { font-size: var(--t-display-s); line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.band.ink .display-xl, .band.ink .display-l, .band.ink .display-m, .band.ink .display-s { color: var(--ink-fg); }
.accent { color: var(--action); }
.lede { font-size: var(--t-lede); line-height: 1.55; color: var(--fg-2); max-width: 640px; margin: 0; text-wrap: pretty; }
.muted { color: var(--fg-3); }
.small { font-size: var(--t-small); }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--action); flex: 0 0 auto; }
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.prose p { color: var(--fg-2); }
.prose h2 { font-family: var(--font-display); font-size: var(--t-display-s); letter-spacing: -0.015em; margin: 40px 0 12px; }

/* ---------- header ---------- */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--ink); color: var(--ink-fg);
  padding: 12px 16px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--ink-fg); }
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  color: var(--ink); text-decoration: none;
  flex: 0 0 auto;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: 0 0 auto; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 15px; font-weight: 500; color: var(--fg-2); text-decoration: none;
}
.site-nav a:hover { color: var(--ink); background: var(--recess); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--action); }
.site-nav .nav-signin { margin-left: 8px; border-left: 1px solid var(--border); padding-left: 20px; }
.site-nav .nav-signin:hover { background: transparent; }
.site-nav a.btn { margin-left: 12px; padding: 0 18px; color: var(--on-action); }
.site-nav a.btn:hover { color: var(--on-action); background: var(--action-hover); }
.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0;
  cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); transition: transform 160ms ease, opacity 120ms ease; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lift);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a { min-height: 52px; padding: 0 4px; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--soft); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--action); padding-left: 14px; }
  .site-nav .nav-signin { margin-left: 0; border-left: 0; padding-left: 4px; }
  .site-nav a.btn { margin: 16px 0 0; justify-content: center; border-bottom: 1px solid var(--action); }
}

/* ---------- buttons (gen.ts btn(): primary, quiet, ghost) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  border-radius: 0;
  background: var(--action); color: var(--on-action); border: 1px solid var(--action);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--on-action); }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-quiet:hover { background: var(--recess); color: var(--ink); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--recess); color: var(--ink); border-color: transparent; }
.band.ink .btn-quiet { background: transparent; color: var(--ink-fg); border-color: #3B4E6B; }
.band.ink .btn-quiet:hover { background: #1A2A42; color: var(--ink-fg); border-color: var(--ink-fg); }
.btn .arr { width: 16px; height: 16px; flex: 0 0 auto; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; color: var(--link); text-decoration: none;
}
.text-link:hover { color: var(--action); text-decoration: underline; }
.text-link svg { width: 16px; height: 16px; }

/* ---------- status pills (gen.ts chip(); sprint 38 decision 4) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4;
  border-radius: 3px; white-space: nowrap;
  background: var(--neutral-bg); color: var(--neutral-fg);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill-new { background: var(--info-bg); color: var(--info-fg); }
.pill-progress { background: var(--ink-bg); color: var(--ink-fg); }
.pill-info { background: var(--warn-bg); color: var(--warn-fg); }
.pill-done { background: var(--ok-bg); color: var(--ok-fg); }
.pill-rejected { background: var(--neutral-bg); color: var(--neutral-fg); }
.tag { display: inline-flex; align-items: center; padding: 3px 7px; border: 1px solid var(--action); color: var(--link); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4; border-radius: 3px; white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }

/* ---------- screenshot frames ---------- */
.shot { margin: 0; }
.shot-frame { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lift); }
.shot-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-bottom: 1px solid var(--soft); background: var(--recess); }
.shot-bar i { width: 8px; height: 8px; background: var(--border); display: block; }
.shot-frame img { width: 100%; }
.shot figcaption { margin-top: 12px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3); }
.phone-frame { background: var(--ink); padding: 10px; box-shadow: var(--shadow-lift); max-width: 300px; }
.phone-frame img { width: 100%; }

/* ---------- QR block ---------- */
.qr-card {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 12px;
  margin: 0; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.qr-card img { width: 160px; height: 160px; image-rendering: pixelated; background: #FFFFFF; }
.qr-card.lg img { width: 200px; height: 200px; }
.qr-card figcaption { max-width: 200px; font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.qr-card .label { color: var(--ink); }

/* ---------- cards and lists ---------- */
.card { background: var(--surface); border: 1px solid var(--border); padding: 28px; }
.card h3 { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 10px; }
.card p { color: var(--fg-2); margin-bottom: 0; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 9px 0 9px 28px; border-top: 1px solid var(--soft); color: var(--fg-2); }
.ticks li:first-child { border-top: 0; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 17px;
  width: 12px; height: 6px; border-left: 2px solid var(--action); border-bottom: 2px solid var(--action);
  transform: rotate(-45deg);
}
.rule-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.rule-list > li { padding: 22px 0; border-bottom: 1px solid var(--border); }
.rule-list > li > strong:first-child { display: block; font-family: var(--font-display); font-size: 20px; letter-spacing: -0.01em; margin-bottom: 4px; }
.rule-list > li > p, .rule-list > li > span { color: var(--fg-2); margin: 0; }
.ico { width: 24px; height: 24px; flex: 0 0 auto; }
.step-no { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--action); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 64px; padding: 14px 0;
  font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3;
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto;
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); font-family: var(--font-mono); font-size: 16px; color: var(--action);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { margin: 0 0 22px; max-width: 720px; color: var(--fg-2); }

/* ---------- inner-page hero, jump links, feature rows ---------- */
.page-hero { padding: 80px 0 64px; border-bottom: 1px solid var(--soft); }
.page-hero h1 { max-width: 920px; margin-bottom: 24px; }
.page-hero .cta-row { margin-top: 32px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 36px 0 0; }
.jump a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--fg-2); text-decoration: none;
}
.jump a:hover { border-color: var(--ink); color: var(--ink); }
.feature-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.feature-row.flip > :first-child { order: 2; }
.feature-row h2 { margin-bottom: 18px; }
.feature-row .lede { margin-bottom: 24px; }
.feature-row .ticks { margin-top: 8px; }
.feature-row .phone-frame { margin: 0 auto; max-width: 280px; }
.plan-tag { display: inline-flex; margin-left: 10px; vertical-align: middle; }
@media (max-width: 960px) {
  .page-hero { padding: 48px 0 40px; }
  .feature-row { grid-template-columns: 1fr; gap: 36px; }
  .feature-row.flip > :first-child { order: 0; }
}

/* ---------- final CTA ---------- */
.cta-band .cta-grid { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.cta-band .lede { margin-top: 18px; }
.cta-band .cta-row { margin-top: 32px; }

/* ---------- footer ---------- */
.site-footer { background: var(--sunken); border-top: 1px solid var(--border); padding: 72px 0 28px; font-size: var(--t-small); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--border); }
.footer-brand p { margin: 16px 0 0; color: var(--fg-2); max-width: 300px; }
.footer-brand .tagline { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 17px; letter-spacing: -0.01em; }
.footer-h { margin: 0 0 10px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg-2); text-decoration: none; }
.footer-grid li a:hover { color: var(--action); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); }

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, video:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus); }
.band.ink a:focus-visible, .band.ink .btn:focus-visible { outline-color: #FFFFFF; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .section-head { grid-template-columns: 1fr; gap: 0; margin-bottom: 40px; }
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .cta-band .cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; --header-h: 60px; }
  .band { padding: 64px 0; }
  .band.tight { padding: 48px 0; }
  .btn { width: 100%; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .site-header .btn { width: auto; }
  .card { padding: 22px; }
}
@media (max-width: 380px) {
  .wordmark { font-size: 17px; }
  .brand svg { width: 26px; height: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
