:root {
  --ink: #0e1a2b;
  --ink-2: #16263d;
  --ink-3: #22375a;
  --paper: #f7f5f0;
  --paper-2: #efebe2;
  --white: #ffffff;
  --text: #1b2433;
  --muted: #5b6678;
  --line: #e2ddd1;
  --gold: #c9962e;
  --gold-2: #e2b85a;
  --teal: #1d6e76;
  --teal-soft: #e3f0f0;
  --red-soft: #f8e7e3;
  --green: #2f7a4b;
  --green-soft: #e4f1e8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 26, 43, .06), 0 8px 24px rgba(14, 26, 43, .06);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
h4 { margin: 0 0 .5rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; border: 0; border-radius: 999px; padding: .8rem 1.4rem; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--white); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:disabled { opacity: .5; cursor: progress; transform: none; }
.btn-line { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--ink); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(14, 26, 43, .92); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { display: flex; align-items: baseline; gap: .5rem; text-decoration: none; color: var(--white); }
.brand-mark { font: 700 1.15rem var(--sans); letter-spacing: .22em; }
.brand-sub { font: 500 1rem var(--serif); color: var(--gold-2); }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a { color: rgba(255,255,255,.78); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav-links a:hover { color: var(--white); }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(201,150,46,.18), transparent 60%), linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: var(--white); padding: 88px 0 96px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(180deg, #000 20%, transparent 95%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; position: relative; }
.eyebrow, .kicker { font: 600 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); margin: 0 0 1rem; }
.kicker { color: var(--teal); }
.kicker-gold { color: var(--gold-2); }
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
.lead { font-size: 1.12rem; color: rgba(255,255,255,.78); margin: 1.4rem 0 2rem; max-width: 40rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-note { margin-top: 2rem; font-size: .85rem; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: .6rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4fd18b; box-shadow: 0 0 0 4px rgba(79,209,139,.15); }

.feed-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 20px 20px 14px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.feed-head { display: flex; align-items: center; gap: .8rem; font-size: .85rem; color: rgba(255,255,255,.7); padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.live { display: inline-flex; align-items: center; gap: .4rem; background: rgba(79,209,139,.12); color: #7fe0a8; font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #4fd18b; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(79,209,139,.6); } 100% { box-shadow: 0 0 0 10px rgba(79,209,139,0); } }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.feed li:last-child { border-bottom: 0; }
.feed a { color: var(--white); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; line-height: 1.45; }
.feed a:hover { color: var(--gold-2); }
.feed-meta { display: flex; gap: .6rem; font-size: .72rem; color: rgba(255,255,255,.5); margin-bottom: 4px; font-family: var(--mono); }
.feed-foot { font-size: .75rem; color: rgba(255,255,255,.45); padding-top: 10px; }
.skeleton { height: 58px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; margin: 8px 0; border: 0 !important; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Stats */
.stats { background: var(--white); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font: 600 2.4rem var(--serif); color: var(--ink); line-height: 1.1; }
.stat span { font-size: .88rem; color: var(--muted); }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--paper-2); }
.section-ink { background: var(--ink); color: var(--white); }
.section h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); max-width: 46rem; }
.section-lead { color: var(--muted); margin: .8rem 0 0; max-width: 44rem; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.pillar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.pillar-n { font: 500 .8rem var(--mono); color: var(--gold); }
.pillar h3 { font-size: 1.45rem; margin: .6rem 0 .6rem; }
.pillar p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-top: 40px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: .6rem 1.2rem; border-radius: 999px; font: 600 .9rem var(--sans); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--ink); color: var(--white); }
.panel { margin-top: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); min-height: 420px; }
.panel[hidden] { display: none; }
.panel-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.panel-head p { margin: 0; color: var(--muted); max-width: 36rem; font-size: .95rem; }
.loading, .empty { color: var(--muted); padding: 40px 0; text-align: center; font-size: .95rem; }
.error { color: #9a3b2a; background: var(--red-soft); padding: 14px 16px; border-radius: 10px; font-size: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--white); color: var(--text); padding: .3rem .75rem; border-radius: 999px; font: 500 .8rem var(--sans); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip small { opacity: .6; margin-left: 4px; }

.badge { display: inline-block; font: 600 .68rem var(--sans); letter-spacing: .05em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 6px; background: var(--paper-2); color: var(--muted); white-space: nowrap; }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-gold { background: #f6ecd6; color: #8a6414; }
.badge-green { background: var(--green-soft); color: var(--green); }
.cc { display: inline-block; font: 600 .7rem var(--mono); padding: .12rem .4rem; border-radius: 5px; background: var(--ink); color: var(--white); margin-right: 3px; }

/* Radar list */
.list { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; padding: 16px 4px; border-top: 1px solid var(--line); align-items: start; }
.row:first-child { border-top: 0; }
.row-date { font: 500 .82rem var(--mono); color: var(--muted); padding-top: 2px; }
.row-title { font-size: .95rem; line-height: 1.5; }
.row-title a { color: var(--text); text-decoration: none; }
.row-title a:hover { color: var(--teal); text-decoration: underline; }
.row-meta { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.row-celex { font: .75rem var(--mono); color: var(--muted); }

/* Watch cards */
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); gap: 4px; }
select { font: 500 .9rem var(--sans); padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--text); min-width: 180px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--white); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: #cfc8b8; box-shadow: var(--shadow); }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.card h3 { font-size: 1.15rem; }
.card .celex { font: .75rem var(--mono); color: var(--muted); }
.card p { margin: 0; font-size: .9rem; color: var(--muted); }
.card-status { font-size: .82rem; color: var(--text); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-status b { font-weight: 600; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.recent { color: #8a6414; font-weight: 600; }

/* Assistant */
.ask-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.ask-form { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--paper); }
.ask-form textarea { width: 100%; border: 0; background: transparent; resize: vertical; font: 1rem/1.5 var(--sans); color: var(--text); outline: none; }
.ask-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ask-scope { font-size: .82rem; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.ask-scope button { border: 0; background: none; color: var(--teal); cursor: pointer; font-size: .82rem; }
.answer { margin-top: 20px; font-size: .98rem; line-height: 1.7; }
.answer p { margin: 0 0 .9rem; }
.answer ul, .answer ol { margin: 0 0 .9rem; padding-left: 1.3rem; }
.answer h3, .answer h4 { font-family: var(--serif); text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
.cite { display: inline-block; font: 600 .7rem var(--mono); background: var(--teal-soft); color: var(--teal); padding: 0 .35rem; border-radius: 4px; cursor: pointer; vertical-align: 1px; }
.cite:hover { background: var(--teal); color: var(--white); }
.notice { background: #f6ecd6; color: #6d4f10; padding: 12px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 14px; }
.meta-line { font-size: .78rem; color: var(--muted); margin-top: 12px; }
.typing::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--gold); }
@keyframes blink { 50% { opacity: 0; } }
.ask-sources { border-left: 1px solid var(--line); padding-left: 24px; max-height: 640px; overflow: auto; }
.sources-empty { font-size: .88rem; color: var(--muted); }
.src { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; font-size: .85rem; transition: box-shadow .2s, border-color .2s; }
.src.flash { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.src-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.src-head b { font-size: .85rem; }
.src-text { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.src a { font-size: .78rem; }

/* API */
.api-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
.api-endpoints { display: flex; flex-direction: column; gap: 6px; }
.ep { text-align: left; border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; }
.ep:hover { border-color: #cfc8b8; }
.ep.active { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--gold); }
.ep code { font: 500 .8rem var(--mono); color: var(--ink); }
.ep .method { font: 700 .68rem var(--mono); color: var(--green); margin-right: 6px; }
.ep span { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.api-console { background: var(--ink); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.console-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.console-bar code { font: .8rem var(--mono); color: var(--gold-2); overflow-x: auto; white-space: nowrap; }
.console-out { margin: 0; padding: 16px; color: #cfe3ff; font: .78rem/1.55 var(--mono); height: 440px; overflow: auto; white-space: pre; }
.console-out .k { color: #8fc1ff; } .console-out .s { color: #b9e5b0; } .console-out .n { color: #f3c37a; }
.api-foot { margin: 0; padding: 10px 14px; font-size: .8rem; color: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.08); }
.api-foot a { color: var(--gold-2); }

/* How it works */
.flow { display: grid; grid-template-columns: 1fr 48px 1.1fr 48px 1fr; align-items: stretch; margin-top: 48px; }
.flow-col { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.flow-col ul { list-style: none; margin: 0; padding: 0; }
.flow-col li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.flow-col li:first-child { border-top: 0; }
.flow-core { background: var(--ink); color: var(--white); border-color: var(--ink); }
.flow-core h4 { color: var(--gold-2); }
.flow-core li { border-color: rgba(255,255,255,.1); }
.flow-arrow { position: relative; }
.flow-arrow::before { content: ""; position: absolute; top: 50%; left: 8px; right: 12px; height: 2px; background: var(--gold); }
.flow-arrow::after { content: ""; position: absolute; top: calc(50% - 6px); right: 6px; border: 7px solid transparent; border-left-color: var(--gold); border-right: 0; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 56px; }
.trust h4 { color: var(--ink); font-size: .85rem; }
.trust p { margin: 0; font-size: .9rem; color: var(--muted); }

/* Pilot */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.phase { border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 28px 24px; background: rgba(255,255,255,.03); }
.phase-tag { font: 600 .74rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.phase h3 { font-size: 1.35rem; margin: .7rem 0; }
.phase p { margin: 0; color: rgba(255,255,255,.7); font-size: .95rem; }
.pilot-cta { display: flex; align-items: center; gap: 20px; margin-top: 40px; flex-wrap: wrap; color: rgba(255,255,255,.6); font-size: .9rem; }

.footer { background: #0a1320; color: rgba(255,255,255,.55); font-size: .8rem; padding: 28px 0; }
.footer-inner { display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; }
.footer p { margin: 0; max-width: 60rem; }
.footer b { color: var(--white); }
.footer a { color: var(--gold-2); }

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(14,26,43,.45); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--white); z-index: 50; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; padding: 32px; box-shadow: -20px 0 60px rgba(0,0,0,.2); }
.drawer.open { transform: none; }
.drawer-close { position: absolute; top: 14px; right: 16px; border: 0; background: var(--paper-2); width: 36px; height: 36px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.drawer h2 { font-size: 1.5rem; margin: 8px 40px 6px 0; }
.drawer .full-title { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.drawer section { margin-top: 24px; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: .88rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 18px; font-size: .86rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.timeline .t-date { font: .75rem var(--mono); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .78rem; background: var(--paper-2); padding: .2rem .55rem; border-radius: 6px; }
.text-search { display: flex; gap: 8px; margin-bottom: 12px; }
.text-search input { flex: 1; font: .9rem var(--sans); padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.article { border-top: 1px solid var(--line); padding: 12px 0; font-size: .86rem; }
.article b { display: block; margin-bottom: 4px; }
.article div { color: var(--muted); white-space: pre-line; max-height: 180px; overflow: auto; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

@media (max-width: 1020px) {
  .hero-grid, .ask-grid, .api-grid { grid-template-columns: 1fr; }
  .pillars, .trust { grid-template-columns: repeat(2, 1fr); }
  .phases { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .flow-arrow { height: 28px; }
  .flow-arrow::before { top: 4px; bottom: 4px; left: 50%; right: auto; width: 2px; height: auto; }
  .flow-arrow::after { top: auto; bottom: 0; left: calc(50% - 6px); right: auto; border: 7px solid transparent; border-top-color: var(--gold); border-bottom: 0; }
  .ask-sources { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .nav-links { display: none; }
  .nav-inner .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  .hero { padding: 56px 0 64px; }
  .section { padding: 64px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 20px 12px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .pillars, .trust { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .row > :last-child { justify-self: start; }
  .cards { grid-template-columns: 1fr; }
  .drawer { padding: 24px 18px; }
  .dl { grid-template-columns: 1fr; }
}
