/* ═══════════════════════════════════════════════════════════════════════════
   KaffeLink Intelligence — Design System v1.0 (see docs/DESIGN_SYSTEM.md)
   Warm paper · Espresso ink · Ember accent · heyeaslo-grade minimalism
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Warm-paper neutrals (quiet café, not cold lab) */
  --bg-canvas: #FAF7F3;
  --bg-surface: #FFFFFF;
  --bg-fill: rgba(45, 36, 28, 0.045);
  --bg-obsidian: #1D1D1F;

  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #71717A;           /* AA ≥4.5:1 at 11px */
  --text-on-dark: #F5F5F7;

  --border-hairline: rgba(29, 25, 20, 0.09);
  --border-strong: rgba(29, 25, 20, 0.18);

  /* Brand + semantic */
  --accent: #D94E28;               /* KaffeLink ember terracotta */
  --accent-soft: rgba(217, 78, 40, 0.08);
  --accent-hover: #C2431F;
  --sage: #0E7A4F;
  --sage-soft: rgba(14, 122, 79, 0.08);
  --amber: #B87D14;
  --amber-soft: rgba(184, 125, 20, 0.10);
  --link: #0066CC;

  /* Gradients — WebGradients-inspired, tuned to brand hues (AA-safe) */
  --grad-ember: linear-gradient(100deg, #D94E28 0%, #ED7B35 55%, #C98A1B 100%);
  --grad-espresso: linear-gradient(135deg, #241A13 0%, #1D1D1F 62%);
  --grad-dawn: radial-gradient(120% 80% at 50% 0%, rgba(237, 138, 60, 0.10) 0%, rgba(250, 247, 243, 0) 62%);

  /* Graph palette (white nodes, colored strokes) */
  --g-origin: #D94E28;
  --g-gi: #0E7A4F;
  --g-oem: #1D1D1F;
  --g-port: #B87D14;
  --g-importer: #2F5FD0;

  /* Elevation — soft, layered, Apple-like */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Motion — Apple's signature easing */
  --ease-out: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.5, 1);
  --dur-fast: 0.18s;
  --dur-med: 0.45s;
  --dur-slow: 0.7s;

  /* Type */
  --font-sans: 'Inter', 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  --font-display: 'Inter', 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; background: var(--bg-canvas); line-height: 1.55; }

::selection { background: rgba(217, 78, 40, 0.18); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Accessibility — skip link (first focusable element) ──────────────────── */
.skip-link { position: fixed; top: -52px; left: 16px; z-index: 300; background: var(--bg-obsidian); color: var(--text-on-dark); padding: 10px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; text-decoration: none; transition: top var(--dur-fast) var(--ease-out); box-shadow: var(--shadow-md); }
.skip-link:focus-visible { top: 12px; outline-color: #FFF; }

/* ── Scroll reveal ─────────────────────────────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
[data-reveal].revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ── Notice ribbon ─────────────────────────────────────────────────────────── */
.telemetry-bar {
  background: var(--bg-obsidian); color: rgba(245, 245, 247, 0.85);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em;
  padding: 7px 24px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.telemetry-left, .telemetry-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #30D158; display: inline-block; box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.18); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(48,209,88,0.18); } 50% { box-shadow: 0 0 0 6px rgba(48,209,88,0.06); } }
.telemetry-pill { background: rgba(255,255,255,0.08); padding: 2px 9px; border-radius: var(--radius-pill); color: rgba(245,245,247,0.75); border: 1px solid rgba(255,255,255,0.10); }
.telemetry-rev-live { color: #FF9F7E; font-weight: 600; cursor: pointer; transition: color var(--dur-fast); }
.telemetry-rev-live:hover { color: #FFC4AE; }

/* ── Frosted header ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 251, 253, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-hairline);
}
.header-inner { max-width: 1280px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand-lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-primary); }
.brand-mark {
  width: 36px; height: 36px; background: var(--bg-obsidian);
  border-radius: 10px; display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 24px; height: 24px; display: block; }
.brand-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; line-height: 1.1; }
.brand-subtitle { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-tertiary); letter-spacing: 0.08em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-link {
  padding: 7px 13px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: color var(--dur-fast), background var(--dur-fast);
  text-decoration: none;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-fill); }

/* ── Nav dropdown — grouped menu (Graph · Data ▾ · Directory · Advertise) ── */
.nav-dropdown { position: relative; }
.nav-dropdown-btn { display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent; font-family: var(--font-sans); }
.nav-caret { transition: transform var(--dur-fast) var(--ease-out); opacity: 0.55; }
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown-panel {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.98);
  min-width: 290px; background: var(--bg-surface);
  border: 1px solid var(--border-hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 60;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.nav-dropdown.open .nav-dropdown-panel { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0) scale(1); }
.nav-drop-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; transition: background var(--dur-fast); }
.nav-drop-item:hover { background: var(--bg-fill); }
.nav-drop-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.nav-drop-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; }
.nav-drop-desc { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-tertiary); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hamburger { display: none; background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: 10px; padding: 8px 12px; font-size: 17px; cursor: pointer; }

.lang-switch { display: flex; background: var(--bg-fill); border-radius: var(--radius-pill); padding: 3px; }
.lang-btn { border: none; background: transparent; padding: 5px 12px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; cursor: pointer; color: var(--text-tertiary); border-radius: var(--radius-pill); transition: all var(--dur-fast); }
.lang-btn.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
  padding: 9px 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline); background: var(--bg-surface); color: var(--text-primary);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-out); white-space: nowrap;
  box-shadow: var(--shadow-xs);
}
.btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--bg-obsidian); color: var(--text-on-dark); border-color: var(--bg-obsidian); }
.btn-primary:hover { background: #333336; }
.btn-accent { background: var(--accent); color: #FFF; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-sm { padding: 6px 13px; font-size: 12px; box-shadow: none; }
.cart-badge { background: var(--accent); color: #FFF; font-family: var(--font-mono); font-size: 10.5px; padding: 1px 7px; border-radius: 99px; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section-block { padding: 72px 0; border-bottom: 1px solid var(--border-hairline); }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 10px; font-weight: 600; }
.section-title { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; }
.section-desc { color: var(--text-secondary); font-size: 15px; max-width: 640px; margin-top: 8px; line-height: 1.6; }

/* ── Hero — Apple keynote style ────────────────────────────────────────────── */
.hero-workstation { padding: 88px 0 72px; border-bottom: 1px solid var(--border-hairline); text-align: center; background: var(--grad-dawn); }
.hero-card { max-width: 900px; margin: 0 auto; }
.hero-badge-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.mono-tag { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--bg-fill); color: var(--text-secondary); display: inline-block; letter-spacing: 0.04em; }
.mono-tag.accent { background: var(--accent-soft); color: var(--accent); }
.mono-tag.sage { background: var(--sage-soft); color: var(--sage); }
.mono-tag.amber { background: var(--amber-soft); color: var(--amber); }
.hero-headline { font-family: var(--font-display); font-size: clamp(34px, 5.4vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.06; margin-bottom: 20px; }
.hero-headline .grad { background: var(--grad-ember); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--text-secondary); font-size: 17px; line-height: 1.65; margin: 0 auto 36px; max-width: 720px; }

.search-console {
  background: var(--bg-surface); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill); padding: 6px 6px 6px 22px;
  display: flex; align-items: center; gap: 10px; margin: 0 auto 14px; max-width: 640px;
  box-shadow: var(--shadow-md); transition: box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-fast);
}
.search-console:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.search-input { flex: 1; border: none; background: transparent; padding: 10px 0; font-family: var(--font-sans); font-size: 15px; color: var(--text-primary); outline: none; min-width: 0; }
.search-input::placeholder { color: var(--text-tertiary); }
.search-kbd { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-tertiary); background: var(--bg-fill); border: 1px solid var(--border-hairline); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.quick-chips { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 40px; }
.chip-btn {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 500; padding: 6px 13px;
  border-radius: var(--radius-pill); border: none; background: var(--bg-fill); color: var(--text-secondary);
  cursor: pointer; transition: all var(--dur-fast) var(--ease-out);
}
.chip-btn:hover { background: var(--bg-obsidian); color: var(--text-on-dark); }
.chip-btn.active { background: var(--bg-obsidian); color: var(--text-on-dark); }

/* ── How-it-works — 3-step onboarding strip (clarifies the RFQ flow) ───────── */
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 780px; margin: 0 auto 40px; text-align: left; }
.how-step { background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-md); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; transition: box-shadow var(--dur-fast), transform var(--dur-fast); }
.how-step:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.how-num { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; padding-top: 2px; }
.how-title { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 3px; }
.how-desc { display: block; font-size: 12px; color: var(--text-secondary); line-height: 1.55; }

.drawer-explainer { font-size: 12.5px; color: var(--text-secondary); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; line-height: 1.6; }

/* ── RFQ workflow clarity — flow steps + success state ─────────────────────── */
.rfq-flow { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 16px; }
.rfq-flow-step { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; background: var(--bg-fill); border-radius: var(--radius-sm); padding: 9px 12px; }
.rfq-flow-num { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 99px; width: 20px; height: 20px; display: grid; place-items: center; flex-shrink: 0; }
.rfq-success-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--sage-soft); color: var(--sage); font-size: 24px; font-weight: 700; display: grid; place-items: center; margin: 8px 0 12px; animation: modalIn 0.4s var(--ease-spring); }
.rfq-ref { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); background: var(--bg-fill); border-radius: var(--radius-sm); padding: 8px 12px; margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rfq-ref strong { color: var(--text-primary); }

/* ── RFQ status badges + tracking card ─────────────────────────────────────── */
.st { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; display: inline-block; letter-spacing: 0.05em; }
.st-PENDING { background: var(--amber-soft); color: var(--amber); }
.st-QUOTED { background: var(--sage-soft); color: var(--sage); }
.st-CLOSED { background: var(--bg-fill); color: var(--text-tertiary); }
.track-card { background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-md); padding: 16px; color: var(--text-primary); animation: fadeIn var(--dur-fast) var(--ease-out); }

.trust-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: -18px auto 40px; }

/* ── Why KaffeLink — USP cards + comparison table ──────────────────────────── */
.why-usp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
.usp-card { background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); padding: 24px; transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out); }
.usp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.usp-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.015em; margin: 10px 0 6px; }
.usp-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.cmp-wrap { overflow-x: auto; border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); background: var(--bg-surface); box-shadow: var(--shadow-xs); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 700px; font-size: 13.5px; }
.cmp-table th, .cmp-table td { padding: 13px 16px; text-align: center; border-bottom: 1px solid var(--border-hairline); }
.cmp-table thead th { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-tertiary); background: var(--bg-fill); }
.cmp-table td:first-child, .cmp-table th:first-child { text-align: left; font-weight: 600; color: var(--text-primary); font-family: var(--font-sans); font-size: 13px; text-transform: none; letter-spacing: 0; }
.cmp-table tbody tr:last-child td { border-bottom: none; }
.cmp-table .cmp-kl { background: var(--accent-soft); font-weight: 700; }
.cmp-table thead th.cmp-kl { color: var(--accent); background: rgba(217, 78, 40, 0.12); }
.cmp-yes { color: var(--sage); font-weight: 700; }
.cmp-no, .cmp-mid { color: var(--text-tertiary); }

.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 860px; margin: 0 auto; }
.stat-box { padding: 18px 8px; border-radius: var(--radius-md); background: transparent; transition: background var(--dur-fast); }
.stat-box:hover { background: var(--bg-fill); }
.stat-num { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.stat-label { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.global-search-results { max-width: 720px; margin: 0 auto 16px; text-align: left; }

/* ── Knowledge Graph — enterprise flow canvas ──────────────────────────────── */
.graph-shell {
  background: var(--bg-surface); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md);
}
.graph-toolbar-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid var(--border-hairline); background: var(--bg-fill);
}
.graph-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.graph-controls .form-select { width: auto; min-width: 200px; background: var(--bg-surface); }
.graph-zoom { display: flex; gap: 4px; background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-pill); padding: 3px; }
.graph-zoom button {
  width: 30px; height: 30px; border: none; background: transparent; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
  display: grid; place-items: center; transition: all var(--dur-fast);
}
.graph-zoom button:hover { background: var(--bg-fill); color: var(--text-primary); }
.graph-zoom .zoom-label { width: auto; padding: 0 10px; font-family: var(--font-mono); font-size: 11px; }

.graph-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 22px; border-bottom: 1px solid var(--border-hairline); font-family: var(--font-mono); font-size: 10.5px; color: var(--text-tertiary); letter-spacing: 0.03em; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 2px solid currentColor; background: #fff; }

.graph-canvas-wrap { display: grid; grid-template-columns: 1.7fr 0.9fr; min-height: 480px; }
.graph-svg-container { position: relative; overflow: hidden; background: radial-gradient(circle at 30% 20%, #FDFAF5 0%, var(--bg-surface) 60%); cursor: grab; }
.graph-svg-container:active { cursor: grabbing; }
.graph-svg-container svg { display: block; user-select: none; }

.graph-edge { fill: none; stroke: #D8D5CE; stroke-width: 1.4; transition: stroke var(--dur-fast), stroke-width var(--dur-fast), opacity var(--dur-med); animation: edgeIn var(--dur-med) var(--ease-out) both; }
.graph-edge.hot { stroke: var(--accent); stroke-width: 2.2; }
.graph-edge.dim { opacity: 0.12; }
@keyframes edgeIn { from { opacity: 0; } to { opacity: 1; } }

.graph-node { cursor: pointer; animation: nodeIn 0.55s var(--ease-spring) both; transition: opacity var(--dur-med); }
.graph-node circle.main { fill: #fff; stroke-width: 2; transition: filter var(--dur-fast); }
.graph-node:hover circle.main { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18)); }
.graph-node.dim { opacity: 0.18; }
.graph-node text { pointer-events: none; }
@keyframes nodeIn { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
.graph-node { transform-box: fill-box; transform-origin: center; }

.graph-tooltip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--bg-obsidian); color: var(--text-on-dark);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12px;
  box-shadow: var(--shadow-lg); max-width: 240px; opacity: 0;
  transition: opacity var(--dur-fast);
}
.graph-tooltip.show { opacity: 1; }
.graph-tooltip .tt-type { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.65; margin-bottom: 2px; }
.graph-tooltip .tt-name { font-weight: 700; font-size: 13px; }

.graph-detail-panel { border-left: 1px solid var(--border-hairline); padding: 22px; overflow-y: auto; max-height: 560px; background: var(--bg-surface); }
.gdp-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 2px; }
.gdp-sub { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 14px; }
.gdp-path { display: flex; flex-direction: column; gap: 0; margin: 12px 0; }
.gdp-path-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 7px 0; border-bottom: 1px solid var(--border-hairline); }
.gdp-path-row:last-child { border-bottom: none; }
.gdp-edge-list { margin-top: 14px; }
.gdp-edge-row { font-size: 12px; padding: 7px 0; border-bottom: 1px solid var(--border-hairline); color: var(--text-secondary); }
.gdp-edge-row b { color: var(--text-primary); font-weight: 600; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.region-group-head { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 26px 4px 6px; border-bottom: 1px solid var(--line, rgba(0,0,0,0.08)); margin-top: 8px; }
.region-group-head:first-child { padding-top: 6px; margin-top: 0; }
.region-name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.region-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); letter-spacing: 0.05em; text-transform: uppercase; }
.region-tag { background: rgba(47,95,208,0.08); color: #2F5FD0; }
.entity-card {
  background: var(--bg-surface); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg); padding: 22px; cursor: pointer;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-fast);
  display: flex; flex-direction: column; gap: 9px;
}
.entity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.card-meta { font-size: 12.5px; color: var(--text-tertiary); }
.card-body { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-tag { font-family: var(--font-mono); font-size: 10px; padding: 3px 9px; border-radius: 99px; background: var(--bg-fill); color: var(--text-secondary); }
.verified-box { background: var(--sage-soft); border-radius: var(--radius-sm); padding: 9px 12px; }
.verified-src { font-size: 11px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.empty { padding: 40px; text-align: center; color: var(--text-tertiary); background: var(--bg-fill); border-radius: var(--radius-lg); grid-column: 1 / -1; }

/* ── Filter toolbar — floating capsule ─────────────────────────────────────── */
.filter-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px; padding: 12px 16px;
  background: var(--bg-surface); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-xs);
}

/* ── Persona — segmented control + panels ──────────────────────────────────── */
.persona-tabs { display: inline-flex; gap: 3px; flex-wrap: wrap; margin-bottom: 26px; background: var(--bg-fill); border-radius: var(--radius-pill); padding: 4px; }
.persona-tab { padding: 9px 20px; border-radius: var(--radius-pill); border: none; background: transparent; font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all var(--dur-fast) var(--ease-out); }
.persona-tab:hover { color: var(--text-primary); }
.persona-tab.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.persona-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.persona-block { background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); padding: 24px; transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out); }
.persona-block:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.persona-block h3 { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 6px; }
.persona-block p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; }

/* ── Seasonal calendar ─────────────────────────────────────────────────────── */
.seasonal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.seasonal-card { background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-md); padding: 16px; transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out); }
.seasonal-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.seasonal-name { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; }
.seasonal-harvest { font-size: 12px; color: var(--text-secondary); margin-top: 4px; font-family: var(--font-mono); }

/* ── Ads ───────────────────────────────────────────────────────────────────── */
.ads-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ad-card { position: relative; background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.ad-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.ad-badge { position: absolute; top: 12px; left: 12px; background: rgba(29,29,31,0.75); backdrop-filter: blur(8px); color: #fff; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; padding: 4px 9px; border-radius: var(--radius-pill); letter-spacing: 0.06em; z-index: 2; }
.ad-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.ad-img-sm { width: 100%; height: 96px; object-fit: cover; display: block; border-radius: 8px; }
.ad-body { padding: 16px; }
.ad-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; margin-bottom: 12px; }
.ads-packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ad-package-card { background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); padding: 24px; transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out); }
.ad-package-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* ── Member console — dark premium panel ───────────────────────────────────── */
.revenue-console { background: var(--grad-espresso); color: var(--text-on-dark); border-radius: var(--radius-xl); padding: 40px; box-shadow: var(--shadow-lg); }
.rev-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.rev-kpi-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); border-radius: var(--radius-md); padding: 18px; }
.rev-kpi-val { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: #FFF; letter-spacing: -0.02em; }
.blueprint-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── Drawer cart ───────────────────────────────────────────────────────────── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(29,29,31,0.4); backdrop-filter: blur(3px); z-index: 90; opacity: 0; pointer-events: none; transition: opacity var(--dur-med) var(--ease-out); }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(440px, 100vw);
  background: var(--bg-surface); z-index: 100; transform: translateX(102%);
  transition: transform 0.5s var(--ease-out); display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.cart-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px; border-bottom: 1px solid var(--border-hairline); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px; }
.drawer-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 18px 24px; border-top: 1px solid var(--border-hairline); }

/* ── Modals ────────────────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(29,29,31,0.5); backdrop-filter: blur(8px); z-index: 110; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; animation: fadeIn var(--dur-fast) var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-panel { background: var(--bg-surface); border-radius: var(--radius-xl); max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 30px; box-shadow: var(--shadow-lg); animation: modalIn 0.4s var(--ease-spring); }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.form-input, .form-select, .form-textarea {
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline); background: var(--bg-surface);
  font-family: var(--font-sans); font-size: 14px; color: var(--text-primary); width: 100%;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── Toasts ────────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg-obsidian); color: var(--text-on-dark);
  padding: 13px 20px; border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg);
  max-width: min(420px, 90vw); animation: toastIn 0.45s var(--ease-spring);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .graph-canvas-wrap { grid-template-columns: 1fr; }
  .graph-detail-panel { border-left: none; border-top: 1px solid var(--border-hairline); max-height: none; }
  .blueprint-layout { grid-template-columns: 1fr; }
  .rev-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ads-grid, .ads-packages-grid, .persona-panel { grid-template-columns: 1fr; }
  .why-usp-grid { grid-template-columns: 1fr 1fr; }
  .seasonal-grid { grid-template-columns: repeat(2, 1fr); }
  .section-block { padding: 56px 0; }
}
@media (max-width: 860px) {
  .hamburger { display: block; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-top: 8px; }
  .main-nav.open { display: flex; }
  .nav-link { padding: 11px 14px; border-radius: var(--radius-sm); }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-btn { width: 100%; justify-content: space-between; padding: 11px 14px; }
  .nav-dropdown-panel { position: static; transform: none; min-width: 0; margin: 2px 0 6px; box-shadow: none; border: none; background: var(--bg-fill); display: none; opacity: 1; pointer-events: auto; }
  .nav-dropdown.open .nav-dropdown-panel { display: block; }
  .header-inner { padding: 12px 16px; }
  .container { padding: 0 16px; }
  .hero-workstation { padding: 56px 0 48px; }
  .search-console { flex-direction: column; align-items: stretch; border-radius: var(--radius-lg); padding: 10px; }
  .search-console .search-kbd { display: none; }
  .search-console .btn { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: 1fr; max-width: 460px; }
  .why-usp-grid { grid-template-columns: 1fr; }
  .trust-row { margin: -8px auto 32px; }
  .cards-grid { grid-template-columns: 1fr; }
  .filter-toolbar { flex-direction: column; align-items: stretch; border-radius: var(--radius-lg); }
  .revenue-console { padding: 26px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .rev-kpi-grid { grid-template-columns: 1fr; }
  .header-actions .btn { padding: 7px 12px; font-size: 12px; }
}

/* ── For Partners — market pulse ─────────────────────────────────────────── */
.pulse-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pulse-tile { background: var(--bg-surface); border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); padding: 16px 18px; transition: transform var(--dur-med) var(--ease-spring), box-shadow var(--dur-med) var(--ease-out); }
.pulse-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pulse-num { font-family: var(--font-mono); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.pulse-label { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; line-height: 1.4; }

/* Graph Studio entry (homepage → /graph/) */
.graph-studio-btn { white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
