/* ==========================================================================
   FairFile — comparison ("vs") pages, shared stylesheet.
   Brand: The Paper Trail (reskin 2026-07-12). Tokens mirror public/index.html
   :root exactly so the vs-pages read as one continuous brand with the site.
   Zilla Slab (display) / Karla (body) / IBM Plex Mono (labels).
   ========================================================================== */

:root {
  color-scheme: light;
  --font-display: "Zilla Slab", "Rockwell", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;

  --text-2xs: 0.6875rem; --text-xs: 0.75rem; --text-sm: 0.8125rem; --text-base: 0.9375rem;
  --text-md: 1.0625rem; --text-lg: 1.25rem; --text-xl: 1.625rem; --text-2xl: 2.125rem; --text-3xl: 2.75rem;
  --text-4xl: clamp(2.5rem, 5vw, 3.5rem);
  --leading-tight: 1.15; --leading-snug: 1.35; --leading-normal: 1.6;

  --accent-50: #eaf0eb; --accent-100: #d3e0d7; --accent-200: #aec6b4; --accent-300: #82a68c;
  --accent-400: #5c8467; --accent-500: #47664f; --accent-600: #3f5b45; --accent-700: #334a39;
  --accent-800: #26372b; --accent-900: #18251d;

  --ink-50: #f3f4f6; --ink-100: #e2e5ea; --ink-200: #c7ccd6; --ink-300: #9aa2b2; --ink-400: #6b7386;
  --ink-500: #4b5266; --ink-600: #363c4d; --ink-700: #262b38; --ink-800: #1a1e28; --ink-900: #12151c;

  --success-fg: #2f6b4f; --success-bg: #e7f2ec; --success-border: #b9d9c8;
  --warn-fg: #8a5a12; --warn-bg: #fdf1de; --warn-border: #f0d4a3;
  --danger-fg: #b34a24; --danger-bg: #f7e7df; --danger-border: #e8c3ae;
  --info-fg: #2f5f8a; --info-bg: #eaf2f8; --info-border: #c3d9ea;

  --bg-canvas: #efe8d8; --bg-surface: #fffdf7; --bg-surface-raised: #fffdf7;
  --bg-sunken: #e6ddc9; --bg-chrome: #ebe3d1;

  --border-subtle: #ddd1b6; --border-default: #cdbf9c; --border-strong: #b8a877;

  --text-primary: #2b2a22; --text-secondary: #565040; --text-tertiary: #857c62; --text-on-accent: #f4efe2;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 22px; --radius-pill: 999px;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-20: 80px;

  --shadow-xs: 0 1px 2px rgba(52, 33, 12, 0.06);
  --shadow-sm: 0 2px 6px rgba(52, 33, 12, 0.07), 0 1px 2px rgba(52, 33, 12, 0.05);
  --shadow-md: 0 8px 24px rgba(52, 33, 12, 0.10), 0 2px 6px rgba(52, 33, 12, 0.06);
  --shadow-lg: 0 20px 48px rgba(52, 33, 12, 0.14), 0 6px 16px rgba(52, 33, 12, 0.08);
  --shadow-focus: 0 0 0 3px rgba(63, 91, 69, 0.30);

  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms; --duration-base: 220ms; --duration-slow: 420ms;

  --max-width: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --accent-500: #7faa88; --accent-400: #9cc0a4; --accent-600: #5c8467;
    --ink-50: #12151c; --ink-900: #f3f4f6;
    --success-fg: #7fd6ac; --success-bg: #133226; --success-border: #245240;
    --warn-fg: #f0c583; --warn-bg: #332309; --warn-border: #5c451a;
    --danger-fg: #e8917a; --danger-bg: #2e1712; --danger-border: #5c2c20;
    --info-fg: #9dc3e4; --info-bg: #101f2c; --info-border: #24445e;
    --bg-canvas: #14170f; --bg-surface: #1c2016; --bg-surface-raised: #242a1d;
    --bg-sunken: #10130b; --bg-chrome: #181c12;
    --border-subtle: #2c3324; --border-default: #3a4430; --border-strong: #50603f;
    --text-primary: #f2efe2; --text-secondary: #c6c3a8; --text-tertiary: #948f74; --text-on-accent: #14170f;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.34), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.42), 0 2px 6px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.50), 0 6px 16px rgba(0, 0, 0, 0.34);
    --shadow-focus: 0 0 0 3px rgba(127, 170, 136, 0.32);
  }
}
[data-theme="dark"] {
  color-scheme: dark;
  --accent-500: #7faa88; --accent-400: #9cc0a4; --accent-600: #5c8467;
  --ink-50: #12151c; --ink-900: #f3f4f6;
  --success-fg: #7fd6ac; --success-bg: #133226; --success-border: #245240;
  --warn-fg: #f0c583; --warn-bg: #332309; --warn-border: #5c451a;
  --danger-fg: #e8917a; --danger-bg: #2e1712; --danger-border: #5c2c20;
  --info-fg: #9dc3e4; --info-bg: #101f2c; --info-border: #24445e;
  --bg-canvas: #14170f; --bg-surface: #1c2016; --bg-surface-raised: #242a1d;
  --bg-sunken: #10130b; --bg-chrome: #181c12;
  --border-subtle: #2c3324; --border-default: #3a4430; --border-strong: #50603f;
  --text-primary: #f2efe2; --text-secondary: #c6c3a8; --text-tertiary: #948f74; --text-on-accent: #14170f;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.34), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.42), 0 2px 6px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.50), 0 6px 16px rgba(0, 0, 0, 0.34);
  --shadow-focus: 0 0 0 3px rgba(127, 170, 136, 0.32);
}
[data-theme="light"] { color-scheme: light; }

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-canvas); color: var(--text-primary);
  font-family: var(--font-body); font-size: var(--text-base); line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: var(--leading-tight); margin: 0; color: var(--text-primary); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent-200); color: var(--accent-900); }

.shell { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-6); }
.section-pad { padding: var(--space-20) 0; }
@media (max-width: 780px) { .section-pad { padding: var(--space-12) 0; } }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-600); font-weight: 600; margin-bottom: var(--space-4);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-500); display: inline-block; }

.section-head { max-width: 680px; margin: 0 0 var(--space-10); }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.section-head p { color: var(--text-secondary); font-size: var(--text-md); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 13px 24px; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 700;
  border: 1px solid transparent; transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
  white-space: nowrap;
}
.btn-primary { background: var(--accent-500); color: var(--text-on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-600); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-default); }
.btn-secondary:hover { border-color: var(--accent-400); color: var(--accent-700); }
.btn-lg { padding: 16px 30px; font-size: var(--text-base); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: var(--text-2xs); font-weight: 700; white-space: nowrap; letter-spacing: 0.02em;
}
.badge.info { background: var(--info-bg); color: var(--info-fg); border: 1px solid var(--info-border); }
.badge.success { background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-border); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-border); }
.badge.accent { background: var(--accent-50); color: var(--accent-700); border: 1px solid var(--accent-200); }
[data-theme="dark"] .badge.accent, html:not([data-theme="light"]) .badge.accent { background: color-mix(in srgb, var(--accent-500) 18%, transparent); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg-canvas) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner { max-width: var(--max-width); margin: 0 auto; padding: var(--space-3) var(--space-6); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.nav-brand { display: flex; align-items: center; gap: var(--space-2); }
.nav-brand .mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(145deg, var(--accent-400), var(--accent-600)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-brand .mark svg { width: 17px; height: 17px; color: var(--text-on-accent); }
.nav-brand .wordmark { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; }
.nav-brand .wordmark .sub { font-family: var(--font-body); font-weight: 500; font-size: var(--text-xs); color: var(--text-tertiary); margin-left: 6px; }
.nav-links { display: none; align-items: center; gap: var(--space-6); }
.nav-links a { font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary); transition: color var(--duration-fast); }
.nav-links a:hover { color: var(--accent-600); }
.nav-links a.current { color: var(--accent-600); }
@media (min-width: 880px) { .nav-links { display: flex; } }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.theme-toggle { width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-secondary); font-size: 16px; display: inline-flex; align-items: center; justify-content: center; transition: border-color var(--duration-fast); }
.theme-toggle:hover { border-color: var(--accent-400); }

/* ---- Hero ---- */
.vs-hero { padding: var(--space-16) 0 var(--space-12); }
.vs-hero .breadcrumb { font-size: var(--text-xs); color: var(--text-tertiary); margin-bottom: var(--space-5); }
.vs-hero .breadcrumb a:hover { color: var(--accent-600); }
.vs-hero h1 { font-size: var(--text-4xl); max-width: 880px; margin-bottom: var(--space-5); }
.vs-hero .lede { font-size: var(--text-md); color: var(--text-secondary); max-width: 660px; margin-bottom: var(--space-8); }
.vs-hero .cta-row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }

/* ---- Concession card (leads every page) ---- */
.concession {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-left: 4px solid var(--accent-500);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: var(--space-8); max-width: 820px; margin: 0 0 var(--space-6);
}
.concession .label { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-700); font-weight: 700; margin-bottom: var(--space-3); }
.concession .label svg { width: 15px; height: 15px; }
.concession h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.concession p { color: var(--text-secondary); font-size: var(--text-md); }
.concession p + p { margin-top: var(--space-3); }

/* ---- Wedge grid ---- */
.wedge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-5); }
.wedge-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-6); }
.wedge-card .wedge-icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--accent-50); color: var(--accent-600); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); }
[data-theme="dark"] .wedge-card .wedge-icon, html:not([data-theme="light"]) .wedge-card .wedge-icon { background: color-mix(in srgb, var(--accent-500) 16%, transparent); color: var(--accent-400); }
.wedge-card .wedge-icon svg { width: 20px; height: 20px; }
.wedge-card h3 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.wedge-card p { font-size: var(--text-sm); color: var(--text-secondary); }

/* ---- Comparison table ---- */
.compare-section { background: var(--bg-sunken); }
.compare-scroll { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm); background: var(--bg-surface); }
table.vs-matrix { width: 100%; border-collapse: collapse; min-width: 560px; }
table.vs-matrix th, table.vs-matrix td { padding: var(--space-3) var(--space-4); text-align: center; border-bottom: 1px solid var(--border-subtle); font-size: var(--text-sm); vertical-align: middle; }
table.vs-matrix th { background: var(--bg-chrome); font-family: var(--font-body); font-weight: 700; color: var(--text-secondary); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.03em; }
table.vs-matrix td.feature-col, table.vs-matrix th.feature-col { text-align: left; min-width: 240px; color: var(--text-primary); font-weight: 600; }
table.vs-matrix th.us-col, table.vs-matrix td.us-col { background: color-mix(in srgb, var(--accent-500) 8%, transparent); font-weight: 700; }
table.vs-matrix tr:last-child td { border-bottom: none; }
.cell-win { color: var(--success-fg); font-weight: 700; }
.cell-match { color: var(--info-fg); font-weight: 600; }
.cell-partial { color: var(--warn-fg); font-weight: 600; }
.cell-no { color: var(--text-tertiary); }
.cell-na { color: var(--text-tertiary); opacity: 0.6; }
.vs-legend { display: flex; gap: var(--space-5); justify-content: center; flex-wrap: wrap; margin-top: var(--space-5); font-size: var(--text-xs); color: var(--text-tertiary); }
.vs-legend span { display: inline-flex; align-items: center; gap: 5px; }
.vs-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.source-note { font-size: var(--text-xs); color: var(--text-tertiary); margin-top: var(--space-5); max-width: 720px; margin-left: auto; margin-right: auto; text-align: center; line-height: var(--leading-normal); }

/* ---- Pricing strip ---- */
.price-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); margin-top: var(--space-8); }
.price-cell { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-xs); }
.price-cell .who { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); font-weight: 700; margin-bottom: var(--space-2); }
.price-cell .amount { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); }
.price-cell .amount.us { color: var(--accent-600); }
[data-theme="dark"] .price-cell .amount.us, html:not([data-theme="light"]) .price-cell .amount.us { color: var(--accent-400); }
.price-cell p { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-2); }

/* ---- FAQ ---- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); background: none; border: none; text-align: left; font-family: var(--font-body); font-weight: 700; font-size: var(--text-base); color: var(--text-primary); }
.faq-q .chev { flex-shrink: 0; width: 20px; height: 20px; transition: transform var(--duration-base) var(--ease-standard); color: var(--text-tertiary); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); color: var(--accent-500); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--duration-slow) var(--ease-standard); }
.faq-a-inner { padding: 0 var(--space-5) var(--space-5); font-size: var(--text-sm); color: var(--text-secondary); }
.faq-item.open .faq-a { max-height: 600px; }

/* ---- Legal line (load-bearing, every page) ---- */
.legal-line { max-width: 820px; margin: 0 auto; text-align: center; font-size: var(--text-sm); color: var(--text-secondary); background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: var(--radius-md); padding: var(--space-5) var(--space-6); }
.legal-line strong { color: var(--warn-fg); }

/* ---- CTA band ---- */
.cta-band { background: var(--accent-600); color: var(--text-on-accent); }
[data-theme="dark"] .cta-band, html:not([data-theme="light"]) .cta-band { background: var(--accent-800); }
.cta-band h2 { color: var(--text-on-accent); font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.cta-band p { color: color-mix(in srgb, var(--text-on-accent) 82%, transparent); font-size: var(--text-md); max-width: 560px; margin: 0 auto var(--space-8); }
.cta-band .btn-primary { background: var(--bg-surface); color: var(--accent-700); }
.cta-band .btn-primary:hover { background: var(--bg-surface-raised); }
.cta-band .other-compares { margin-top: var(--space-8); font-size: var(--text-sm); color: color-mix(in srgb, var(--text-on-accent) 78%, transparent); }
.cta-band .other-compares a { text-decoration: underline; font-weight: 600; }
.cta-band .other-compares a:hover { color: var(--text-on-accent); }

/* ---- Footer ---- */
.site-footer { background: var(--bg-chrome); border-top: 1px solid var(--border-subtle); padding: var(--space-12) 0 var(--space-8); }
.footer-grid { display: flex; justify-content: space-between; gap: var(--space-8); flex-wrap: wrap; margin-bottom: var(--space-8); }
.footer-brand { max-width: 320px; }
.footer-brand .wordmark { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; }
.footer-brand p { color: var(--text-secondary); font-size: var(--text-sm); margin-top: var(--space-3); }
.footer-cols { display: flex; gap: var(--space-10); flex-wrap: wrap; }
.footer-col h5 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); font-weight: 700; margin-bottom: var(--space-3); }
.footer-col a { display: block; margin-bottom: var(--space-2); font-size: var(--text-sm); color: var(--text-secondary); }
.footer-col a:hover { color: var(--accent-600); }
.footer-bottom { border-top: 1px solid var(--border-subtle); padding-top: var(--space-6); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-xs); color: var(--text-tertiary); }
.footer-preview-note { max-width: 640px; }

/* ---- Reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 640ms var(--ease-standard), transform 640ms var(--ease-standard); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent-500); color: var(--text-on-accent); padding: 10px 16px; border-radius: var(--radius-md); z-index: 999; }
.skip-link:focus { left: var(--space-4); top: var(--space-4); }
