/* ============================================================
   operator.fyi - Shared CSS reference
   
   This file is NOT loaded by the mock HTML files. Each mock 
   embeds its own <style> block so it renders standalone in a 
   browser. This file is the extracted single source of truth 
   for what every page has in common.
   
   Use during P720 (tokens -> app/globals.css + tailwind.config) 
   and P721/P722 (components -> React primitives).
   
   Last updated: April 20, 2026
   ============================================================ */

/* ============================================================
   TOKENS - Colors, lines, semantic variables
   Port these verbatim into app/globals.css and expose via 
   Tailwind theme.extend.colors
   ============================================================ */

:root {
  /* Surface + background */
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --surface-2: #ECEAE6;
  --surface-3: #F1EFE8;

  /* Text */
  --ink: #0A0A0A;
  --ink-2: #3a3a37;
  --muted: #6B6760;
  --muted-2: #9b988f;

  /* Lines */
  --border: rgba(10,10,10,0.10);
  --border-soft: rgba(10,10,10,0.06);

  /* Semantic */
  --accent: #CAFF00;     /* chartreuse - CTAs + highlights */
  --good: #00C805;       /* success indicators */
  --good-dark: #0F6E56;  /* money positive, stat emphasis */
  --warn: #F4A732;       /* warnings */
  --bad: #FF3A3A;        /* errors + red X in comparisons */
}

/* ============================================================
   RESET + BASE TYPOGRAPHY
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; color-scheme: light; }

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ============================================================
   CONTAINERS
   ============================================================ */

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }  /* methodology, trust, blog */

/* ============================================================
   NAVIGATION
   Build as <Nav activePath="..." /> component in P721
   ============================================================ */

.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,244,240,0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 9px; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(202,255,0,0.18); }

.nav-links { display: flex; align-items: center; gap: 32px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-links a:not(.nav-cta):hover { opacity: 0.6; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 600;
  transition: transform 0.15s;
}
.nav-cta:hover { transform: translateY(-1px); }

@media (max-width: 780px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ============================================================
   BREADCRUMB
   Build as <Breadcrumb items={[...]} /> component in P721
   Emits BreadcrumbList JSON-LD when items.length > 1
   ============================================================ */

.breadcrumb { padding: 20px 0 0; font-size: 13px; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li::after { content: '›'; margin-left: 6px; color: var(--muted-2); }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted-2); }
.breadcrumb a:hover { color: var(--ink); }

/* ============================================================
   PILL - Small metadata badge
   Build as <Pill tone="default|live|warn|good"> in P722
   ============================================================ */

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pill-dot.live { animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ============================================================
   STATBAR - 2 to 5 col horizontal stat strip
   Build as <StatBar stats={[{n,l},...]} /> in P722
   ============================================================ */

.statbar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
}
.statbar .s { padding: 22px 24px; border-right: 1px solid var(--border-soft); }
.statbar .s:last-child { border-right: none; }
.statbar .n { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.statbar .l { font-size: 12px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 900px) {
  .statbar { grid-template-columns: repeat(2, 1fr); }
  .statbar .s { border-right: none; border-bottom: 1px solid var(--border-soft); }
}

/* ============================================================
   REVEAL ON SCROLL
   Build as <RevealOnScroll delay={0|1|2|3}> in P722
   Uses IntersectionObserver; add .in class when visible
   ============================================================ */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s, transform 0.7s; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.06s; }
.reveal.d2 { transition-delay: 0.12s; }
.reveal.d3 { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   HEADINGS + SECTION PRIMITIVES
   ============================================================ */

.eyebrow {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 14px;
}

h1 {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
}
h1 .em {
  background: linear-gradient(120deg, var(--ink) 0%, #575751 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic;
}

h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
}

h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }

.hero-sub { font-size: 20px; color: var(--muted); max-width: 62ch; line-height: 1.5; }
.section-sub { font-size: 17px; color: var(--muted); max-width: 60ch; margin-top: 14px; }

section { padding: 72px 0; }

/* ============================================================
   FAQ ACCORDION
   Build as <FaqAccordion items={[{q,a},...]} generateSchema> in P722
   Single-open behavior (clicking one closes others)
   Optional generateSchema prop emits FAQPage JSON-LD
   ============================================================ */

.faq-list { margin-top: 28px; max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; }

.faq-q {
  font-size: 18px; font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq-q::after {
  content: '+'; font-size: 24px; font-weight: 300;
  color: var(--muted); transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }

.faq-a {
  font-size: 15px; color: var(--muted); line-height: 1.65;
  margin-top: 12px; max-width: 75ch; display: none;
}
.faq-item.open .faq-a { display: block; }

/* ============================================================
   CTA SECTION - Dark band with chartreuse button
   Build as <CtaCard title description ctaLabel ctaHref> in P722
   ============================================================ */

.cta-section {
  background: var(--ink); color: var(--bg);
  border-radius: 28px; padding: 72px 48px;
  text-align: center; margin: 72px 28px;
}
.cta-section h2 { color: var(--bg); margin: 0 auto; }
.cta-section p { color: rgba(245,244,240,0.65); margin-top: 16px; font-size: 18px; }

.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px; padding: 14px 26px; border-radius: 999px;
  background: var(--accent); color: var(--ink);
  font-weight: 600; font-size: 15px;
}

/* ============================================================
   TABLE - Used by pricing comparison, leaderboards, cost benchmarks
   ============================================================ */

.table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--surface-2); }
th {
  text-align: left; padding: 14px 18px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); border-bottom: 1px solid var(--border);
}
td { padding: 16px 18px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-3); }

.num { font-variant-numeric: tabular-nums; font-weight: 500; }

/* ============================================================
   FOOTER
   Build as <Footer /> component in P721
   ============================================================ */

footer { border-top: 1px solid var(--border-soft); padding: 48px 0 56px; margin-top: 40px; }

.foot-top { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 40px; }

@media (max-width: 900px) {
  .foot-top { grid-template-columns: 1fr 1fr; }
}

.foot-tag { font-size: 13px; color: var(--muted); margin-top: 10px; max-width: 32ch; line-height: 1.6; }

.foot-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 14px; font-weight: 600;
}
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot-col a:hover { color: var(--muted); }

.foot-bottom {
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
}
.foot-bottom a { margin-left: 18px; }

/* ============================================================
   KAI DARK THEME OVERRIDE (scoped to /kai/ route only)
   Apply via wrapping <div class="kai-theme"> in kai.html only
   In Next.js app: scope via route-level layout, do NOT set global
   ============================================================ */

.kai-theme {
  --bg: #0A0A0A;
  --surface: #151512;
  --surface-2: #1e1e1a;
  --ink: #F5F4F0;
  --ink-2: #d4d2cc;
  --muted: #8a877e;
  --muted-2: #5e5c55;
  --border: rgba(245,244,240,0.10);
  --border-soft: rgba(245,244,240,0.06);
}

/* ============================================================
   BLOG ARTICLE BODY (Source Serif 4)
   Only applied within .article-body scope on blog posts
   ============================================================ */

.article-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px; line-height: 1.7; color: var(--ink-2);
}
.article-body p { margin-bottom: 24px; }
.article-body h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px; font-weight: 600; letter-spacing: -0.015em;
  margin: 40px 0 14px; color: var(--ink); line-height: 1.2;
}
.article-body h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px; font-weight: 600; margin: 32px 0 10px; color: var(--ink);
}
.article-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted-2); }
.article-body strong { font-weight: 600; color: var(--ink); }
.article-body em { font-style: italic; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px; margin: 32px 0;
  font-style: italic; color: var(--ink);
  font-size: 22px; line-height: 1.4;
}

/* ============================================================
   FONT LOADING
   In production (Next.js), use next/font/google instead of @import
   Inter: weights 300-700
   Source Serif 4: weights 400-600 (blog body only)
   ============================================================ */

/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Source+Serif+4:ital,wght@0,400;0,500;0,600;1,400&display=swap'); */
