/*
 * Styling for Taali's static content / guide pages (e.g. /agentic-hiring).
 *
 * These pages are framework-free static HTML so every crawler — including AI
 * answer engines that don't run JavaScript — sees the full content. To stay
 * faithful to the real product they reproduce Taali's actual design system:
 * the token values, the .app-nav / .logo / .btn chrome, and the dark footer
 * are lifted from src/styles/{00-tokens,02-shell-nav}.css and the marketing
 * footer. Dark mode keys off the same `data-theme="dark"` + `taali-theme`
 * localStorage contract as the app (see public/theme.js + lib/themePreference).
 *
 * NOTE: this is a hand-mirrored subset, not the compiled app CSS — if the
 * design tokens or nav/footer change materially, refresh this file.
 */

/* ── Tokens (Taali brand, light — from 00-tokens.css [data-brand="taali"]) ── */
:root {
  color-scheme: light;
  --font-display: "Geist", system-ui, -apple-system, sans-serif;
  --font-sans: "Geist", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --radius: 14px;
  --radius-lg: 22px;
  --pad-x: clamp(20px, 4vw, 48px);

  --ink: #15121a;
  --ink-2: #3a3343;
  --ink-soft: #6b6478;
  --mute: #8b8595;
  --line: #e8e2ee;
  --line-2: #f1edf5;
  --bg: #f7f4fb;
  --bg-2: #ffffff;
  --bg-3: #efe8f7;

  --accent: #5e3aa8;
  --accent-deep: #4a2d80;
  --purple: var(--accent);
  --purple-2: var(--accent-deep);
  --purple-soft: #ede5f8;
  --purple-lav: #c4a5fd;

  /* semantic (from 00-tokens.css [data-brand="taali"]) — used by the
     decision badges + score chips in the product snapshots */
  --green: #15a36a;
  --amber: #d88a1c;
  --red: #e64a4a;

  --shadow-sm: 0 1px 2px rgba(21, 18, 26, 0.06);
  --shadow-md: 0 8px 28px -12px rgba(21, 18, 26, 0.18);
  --shadow-lg: 0 28px 60px -28px rgba(21, 18, 26, 0.22);
}

/* ── Dark mode (opt-in, mirrors html[data-theme="dark"][data-brand="taali"]) ── */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3effb;
  --ink-2: #d9d2e8;
  --ink-soft: #b9b1cc;
  --mute: #a79cbe;
  --line: #2a2340;
  --line-2: #201a34;
  --bg: #0e0a18;
  --bg-2: #16102a;
  --bg-3: #1c1535;
  --accent: #8867c4;
  --accent-deep: #6e4ba8;
  --purple-soft: #2e1a4e;
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 0 rgba(0, 0, 0, 0.3), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* Match the app's global 80% density: src/styles/01-base.css sets the root
     font-size to 0.8rem so every rem-based size renders at 80% scale. Without
     this the guides render ~30% larger and look "zoomed in" next to the app. */
  font-size: 0.8rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 52rem; margin: 0 auto; padding: 0 var(--pad-x); }

/* ── Nav (from 02-shell-nav.css .app-nav) ── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--line);
}
.app-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
  padding: 0 var(--pad-x);
}
.logo { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; }
.logo:hover { text-decoration: none; }
.logo svg { flex-shrink: 0; }
.logo .tile { fill: var(--purple); }
.logo .lines { stroke: #fff; }
.logo-word { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.025em; text-transform: lowercase; line-height: 1; color: var(--ink); }
.logo-word em { font-style: normal; color: var(--purple); }

.nav-mid { display: inline-flex; gap: 22px; }
.nav-right { display: inline-flex; align-items: center; gap: 10px; }

/* ── Buttons (from 02-shell-nav.css) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 10px 18px;
  background: transparent; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--purple); color: #fff; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: var(--purple-2); color: #fff; }
.btn-outline { background: var(--bg-2); border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { color: var(--purple); }
.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 24px; font-size: 0.96875rem; }

.icon-btn {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.icon-btn:hover { color: var(--purple); border-color: var(--purple); }
.icon-btn svg { display: block; }

/* ── Article ── */
main { padding: 0 0 1rem; }
.kicker { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple); }
.breadcrumb { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--mute); padding: 1.75rem 0 0; text-transform: uppercase; }
.breadcrumb a { color: var(--mute); }
.article-head { padding: 1rem 0 1.5rem; }
h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.2rem, 5.4vw, 3.4rem); line-height: 1.02; letter-spacing: -0.04em;
  margin: 0.7rem 0 0.85rem; color: var(--ink);
}
.lead { font-size: 1.2rem; line-height: 1.5; color: var(--ink-2); margin: 0; }
article h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: -0.03em; margin: 2.75rem 0 0.75rem; line-height: 1.1; color: var(--ink); }
article h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.015em; margin: 1.75rem 0 0.4rem; color: var(--ink); }
article p { margin: 0.85rem 0; color: var(--ink-2); }
article strong { color: var(--ink); font-weight: 600; }
article ul, article ol { margin: 0.85rem 0; padding-left: 1.25rem; }
article li { margin: 0.5rem 0; color: var(--ink-2); }

.definition {
  border-left: 4px solid var(--purple);
  background: var(--purple-soft);
  padding: 1.1rem 1.4rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.75rem 0;
}
.definition p { margin: 0; color: var(--ink); font-size: 1.1rem; line-height: 1.55; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem 1.35rem; background: var(--bg-2); box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.card p { margin: 0; font-size: 0.95rem; }

.faq { margin-top: 1rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.4rem 1.2rem; margin: 0.65rem 0; background: var(--bg-2); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 0.7rem 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--purple); font-weight: 700; font-size: 1.1rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 0.85rem; color: var(--ink-2); }

.related { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.4rem 0; }
@media (max-width: 640px) { .related { grid-template-columns: 1fr; } }
.related a.card { display: block; color: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.related a.card:hover { border-color: var(--purple); box-shadow: var(--shadow-md); text-decoration: none; }
.related .card .kicker { display: block; margin-bottom: 0.3rem; }

/* ── CTA band (mirrors the landing's bottom CTA gradient) ── */
.cta-band { margin: 3.5rem 0 0; color: #fff; }
.cta-inner {
  max-width: 85rem; margin: 0 auto;
  background: linear-gradient(135deg, color-mix(in oklab, var(--purple) 75%, #000) 0%, var(--purple) 60%, var(--purple-lav) 100%);
  border-radius: 18px; padding: 3rem clamp(1.5rem, 4vw, 3.5rem); margin-bottom: 1rem;
}
.cta-band h2 { margin: 0 0 0.5rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.025em; }
.cta-band p { margin: 0 0 1.5rem; opacity: 0.88; max-width: 35rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta-actions .btn-on-dark { background: #fff; color: var(--purple); border-color: #fff; }
.cta-actions .btn-on-dark:hover { background: #fff; color: var(--purple-2); }
.cta-actions .btn-ghost-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.cta-actions .btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ── Footer (dark — mirrors the marketing footer) ── */
.site-footer { border-top: 1px solid var(--line); background: var(--ink); color: var(--bg); }
.footer-wrap { max-width: 85rem; margin: 0 auto; padding: 3.5rem var(--pad-x) 3rem; }
.footer-cols { display: grid; grid-template-columns: 1.1fr 0.9fr 0.9fr 0.9fr; gap: 2.5rem; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 460px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-brand .logo-word { color: var(--bg); }
.footer-blurb { margin: 1.25rem 0 0; max-width: 17.5rem; font-size: 0.9375rem; line-height: 1.7; color: var(--bg); opacity: 0.7; }
.footer-blurb .tally { font-family: var(--font-display); color: var(--purple-lav); }
.footer-col h4 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 1rem; color: var(--bg); }
.footer-col a { display: block; color: var(--bg); opacity: 0.7; font-size: 0.875rem; margin: 0.55rem 0; transition: opacity 0.15s; }
.footer-col a:hover { opacity: 1; text-decoration: none; }
.footer-watermark { margin-top: 2.5rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(72px, 12vw, 164px); line-height: 0.8; letter-spacing: -0.08em; color: var(--bg); opacity: 0.08; user-select: none; }
.footer-watermark em { font-style: normal; color: var(--purple-lav); }
.footer-legal { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid color-mix(in oklab, var(--bg) 14%, transparent); display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; font-size: 0.8125rem; color: var(--bg); opacity: 0.55; }
.footer-legal a { color: var(--bg); opacity: 0.85; }

@media (max-width: 640px) { .nav-mid, .nav-signin { display: none; } }

/* ── Product snapshots — static reproductions of live Taali UI, so the
      guides show the product, not just prose. Mirrors the marketing mocks
      (agent strip, jobs KPIs, decision feed, six-axis candidate report). ── */
.product { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow-md); overflow: hidden; margin: 1.75rem 0; }
.product-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; color: var(--mute); }
.product-bar .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; display: inline-block; }
.product-bar .url { margin-left: 0.6rem; }
.product-bar .tag { margin-left: auto; background: var(--bg); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.64rem; font-weight: 600; }
.product-body { padding: 1.1rem 1.2rem; }
.product-cap { margin: 1.75rem 0 0.5rem; font-size: 0.95rem; color: var(--ink-2); }
.product-cap strong { color: var(--ink); }

/* agent status strip (the "Agent on" bar) */
.agent-strip { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.7rem 0.95rem; border-radius: 12px; color: #fff; background: linear-gradient(135deg, color-mix(in oklab, var(--purple) 82%, #000), var(--purple)); margin-bottom: 1rem; font-size: 0.85rem; }
.agent-strip .spark { display: inline-flex; align-items: center; }
.agent-strip .lbl { font-weight: 600; }
.agent-strip .pend { background: rgba(255,255,255,0.22); border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.72rem; font-weight: 700; }
.agent-strip .tick { opacity: 0.82; font-size: 0.8rem; }
.agent-strip .budget { margin-left: auto; display: inline-flex; align-items: center; gap: 0.5rem; font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.agent-strip .budget .bar { width: 90px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.25); overflow: hidden; }
.agent-strip .budget .bar i { display: block; height: 100%; width: 62%; background: #fff; }

/* jobs KPI tiles (from .mc-jobs-kpi) */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 600px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 0.85rem 1rem; box-shadow: var(--shadow-sm); }
.kpi .k { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); margin-bottom: 0.35rem; }
.kpi .v { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1; color: var(--ink); }
.kpi .d { font-size: 0.72rem; color: var(--mute); margin-top: 0.3rem; }

/* decision feed */
.feed-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: start; padding: 0.9rem 0.25rem; border-top: 1px solid var(--line-2); }
.feed-row:first-child { border-top: 0; }
.feed-row .who { min-width: 0; }
.feed-row .nm { font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.feed-row .rsn { color: var(--ink-2); font-size: 0.82rem; line-height: 1.45; margin-top: 0.2rem; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.12rem 0.55rem; font-size: 0.66rem; font-weight: 600; }
.role-pill { background: var(--bg-3); color: var(--ink-2); font-family: var(--font-mono); letter-spacing: 0.02em; }
.meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; white-space: nowrap; }
.score-chip { font-family: var(--font-mono); font-weight: 700; border-radius: 8px; padding: 0.28rem 0.5rem; font-size: 0.8rem; min-width: 2.4rem; text-align: center; }
.score-chip.hi { background: color-mix(in oklab, var(--green) 14%, var(--bg-2)); color: var(--green); }
.score-chip.mid { background: color-mix(in oklab, var(--amber) 18%, var(--bg-2)); color: var(--amber); }
.score-chip.none { background: var(--bg-3); color: var(--mute); }
.decision { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 6px; }
.decision.advance { background: color-mix(in oklab, var(--green) 14%, var(--bg-2)); color: var(--green); }
.decision.escalate { background: color-mix(in oklab, var(--amber) 18%, var(--bg-2)); color: var(--amber); }
.decision.reject { background: color-mix(in oklab, var(--red) 12%, var(--bg-2)); color: var(--red); }

/* six-axis candidate report */
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.15rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; color: var(--mute); text-transform: uppercase; letter-spacing: 0.04em; }
.report-head .verdict { color: var(--purple); font-weight: 700; }
.report-body { padding: 1.2rem; display: flex; flex-direction: column; gap: 0.9rem; }
.axis { display: grid; grid-template-columns: 11rem 1fr; gap: 0.85rem; align-items: center; }
@media (max-width: 520px) { .axis { grid-template-columns: 1fr; gap: 0.25rem; } }
.axis .lab { font-size: 0.86rem; color: var(--ink); }
.axis .track { height: 0.5rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.axis .fill { height: 100%; border-radius: 999px; background: var(--purple); }
