:root {
  --ink: #1b1330; --ink-soft: #241640; --sapphire: #1e52b0; --blue: #2e6fd8;
  --paper: #fff; --bone: #faf8f5; --linen: #f2efe9; --sand: #e8e4dc;
  --stone: #c9c3b8; --ash: #8f8a80; --slate: #5e5a53; --graphite: #33312d;
  --success: #29725a; --warning: #9c691f; --error: #a33d3d;
  --spectrum: linear-gradient(90deg, #b36be8, #5baafa);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
  --shadow: 0 12px 36px rgba(27, 19, 48, .07); --focus: 0 0 0 3px rgba(46,111,216,.25);
  --fast: 140ms ease; --normal: 200ms ease;
}
* { box-sizing: border-box; }
html { background: var(--bone); color: var(--graphite); font-family: var(--font); }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--sapphire); }
:focus-visible { outline: 0; box-shadow: var(--focus); }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: white; padding: 10px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 16px; }
.shell { min-height: 100vh; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 4px); align-items: center; gap: 3px; width: 28px; height: 28px; }
.brand-mark i { display: block; border-radius: 2px; background: #8e74dd; height: 14px; }
.brand-mark i:nth-child(2) { height: 24px; background: #69c7ef; }
.brand-mark i:nth-child(3) { height: 17px; background: #a04bd5; }
.landing { min-height: 100vh; background: var(--bone); }
.landing-nav { height: 80px; max-width: 1280px; margin: auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; }
.landing-main { max-width: 1280px; margin: auto; padding: 72px 32px 64px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 80px; align-items: center; }
.eyebrow { color: var(--sapphire); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 18px 0 24px; color: var(--ink); font-size: clamp(48px, 7vw, 88px); line-height: .98; letter-spacing: -.065em; font-weight: 650; }
.hero p { max-width: 610px; margin: 0 0 32px; color: var(--slate); font-size: 19px; line-height: 1.65; }
.trust-row { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--sand); display: flex; gap: 28px; flex-wrap: wrap; color: var(--slate); font-size: 13px; }
.trust-row span { display: flex; gap: 8px; align-items: center; }
.trust-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--sapphire); }
.archive-card { background: var(--ink); color: white; min-height: 520px; border-radius: 18px; padding: 36px; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.archive-card:before { content: ""; height: 3px; inset: 0 0 auto; position: absolute; background: var(--spectrum); }
.archive-card .label { color: #b7adc7; font-size: 13px; }
.archive-card h2 { margin: 60px 0 12px; font-size: 28px; letter-spacing: -.03em; font-weight: 580; }
.archive-card p { color: #c9c0d5; line-height: 1.6; margin: 0; }
.archive-lines { margin-top: auto; display: grid; gap: 12px; }
.archive-line { padding: 16px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; color: #e6e0ec; font-size: 14px; }
.btn { border: 1px solid transparent; border-radius: var(--r-sm); min-height: 42px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 650; transition: background var(--fast), border var(--fast), color var(--fast); }
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: var(--ink-soft); }
.btn-blue { background: var(--sapphire); color: white; }
.btn-blue:hover { background: #17438f; }
.btn-secondary { background: var(--paper); color: var(--graphite); border-color: var(--sand); }
.btn-secondary:hover { border-color: var(--stone); background: var(--bone); }
.btn-ghost { background: transparent; color: var(--slate); }
.btn-ghost:hover { background: var(--linen); color: var(--graphite); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 43%) 1fr; }
.auth-brand { background: var(--ink); color: white; padding: 40px clamp(32px, 5vw, 72px); display: flex; flex-direction: column; }
.auth-brand .auth-message { margin: auto 0; max-width: 470px; }
.auth-brand h1 { font-size: clamp(38px, 5vw, 62px); line-height: 1.04; letter-spacing: -.05em; font-weight: 580; margin: 0 0 24px; }
.auth-brand p { color: #c9c0d5; font-size: 17px; line-height: 1.65; }
.auth-brand small { color: #9487a8; }
.auth-pane { background: var(--paper); display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: min(100%, 420px); }
.auth-form h2 { color: var(--ink); font-size: 32px; letter-spacing: -.04em; margin: 0 0 10px; }
.auth-form > p { color: var(--slate); margin: 0 0 32px; line-height: 1.55; }
.field { display: grid; gap: 7px; margin: 0 0 18px; }
.field label { font-size: 13px; font-weight: 650; }
.input { width: 100%; border: 1px solid var(--stone); border-radius: var(--r-sm); background: white; min-height: 46px; padding: 11px 13px; color: var(--graphite); }
.input:hover { border-color: var(--ash); }
.input:focus { border-color: var(--blue); outline: 0; box-shadow: var(--focus); }
textarea.input { min-height: 92px; resize: vertical; line-height: 1.5; }
.form-error { background: #fff5f4; border: 1px solid #e8c6c1; border-radius: var(--r-sm); color: var(--error); padding: 11px 13px; font-size: 13px; margin-bottom: 16px; }
.form-note { color: var(--slate); text-align: center; margin-top: 22px; font-size: 14px; }
.auth-form .btn { width: 100%; }
.app-header { height: 72px; background: var(--ink); color: white; padding: 0 32px; display: flex; align-items: center; gap: 24px; }
.header-title { border-left: 1px solid rgba(255,255,255,.18); padding-left: 24px; font-size: 14px; color: #cdc6d7; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sync-state { font-size: 12px; color: #bab2c6; display: flex; gap: 7px; align-items: center; }
.sync-state i { width: 7px; height: 7px; background: #77bea2; border-radius: 50%; }
.profile-button { border: 1px solid rgba(255,255,255,.16); background: transparent; color: white; width: 36px; height: 36px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.profile-menu { position: absolute; right: 32px; top: 62px; width: 240px; background: white; color: var(--graphite); border: 1px solid var(--sand); border-radius: var(--r-md); padding: 8px; box-shadow: var(--shadow); z-index: 20; }
.profile-menu .identity { padding: 10px; border-bottom: 1px solid var(--sand); margin-bottom: 4px; overflow-wrap: anywhere; font-size: 13px; }
.profile-menu button { border: 0; background: none; width: 100%; text-align: left; padding: 10px; border-radius: var(--r-sm); }
.profile-menu button:hover { background: var(--linen); }
.vault-main { width: min(100%, 1480px); margin: auto; padding: 40px 32px 96px; }
.vault-intro { display: flex; align-items: end; gap: 32px; justify-content: space-between; margin-bottom: 28px; }
.vault-intro h1 { color: var(--ink); font-size: clamp(34px, 4vw, 52px); line-height: 1; letter-spacing: -.05em; margin: 8px 0 10px; font-weight: 620; }
.vault-intro p { color: var(--slate); margin: 0; }
.privacy-note { white-space: nowrap; color: var(--slate); font-size: 12px; padding: 9px 12px; border: 1px solid var(--sand); border-radius: 20px; background: var(--paper); }
.tabs-wrap { border-bottom: 1px solid var(--sand); overflow-x: auto; scrollbar-width: thin; }
.tabs { display: flex; min-width: max-content; gap: 28px; }
.tab { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 13px 1px 12px; color: var(--slate); font-weight: 600; font-size: 14px; }
.tab[aria-selected="true"] { color: var(--ink); border-image: var(--spectrum) 1; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; margin-top: 24px; align-items: start; }
.view-stack { min-width: 0; display: grid; gap: 20px; }
.panel { background: var(--paper); border: 1px solid var(--sand); border-radius: var(--r-md); }
.panel-header { padding: 20px 22px 16px; display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.panel-header h2, .panel-header h3 { color: var(--ink); margin: 0; letter-spacing: -.025em; }
.panel-header h2 { font-size: 21px; }.panel-header h3 { font-size: 17px; }
.panel-header p { color: var(--slate); margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.measure { padding: 22px; min-height: 142px; }
.measure span { color: var(--slate); font-size: 12px; }
.measure strong { display: block; color: var(--ink); font-size: 32px; letter-spacing: -.04em; margin: 16px 0 7px; }
.measure small { color: var(--ash); }
.record-list { border-top: 1px solid var(--sand); }
.record { padding: 18px 22px; border-bottom: 1px solid var(--sand); display: grid; gap: 8px; }
.record:last-child { border-bottom: 0; }
.record-top { display: flex; justify-content: space-between; gap: 16px; }
.record h3 { color: var(--graphite); margin: 0; font-size: 15px; }
.record p { color: var(--slate); margin: 0; font-size: 13px; line-height: 1.55; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ash); font-size: 11px; }
.badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 4px 8px; background: var(--linen); color: var(--slate); font-size: 11px; }
.badge-success { background: #edf7f2; color: var(--success); }
.badge-warning { background: #fff7e8; color: var(--warning); }
.empty { padding: 48px 24px; text-align: center; }
.empty-icon { width: 42px; height: 42px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--sapphire); border: 1px solid #cbd8ee; border-radius: 50%; font-size: 20px; }
.empty h3 { color: var(--ink); margin: 0 0 8px; }.empty p { max-width: 500px; margin: auto; color: var(--slate); line-height: 1.6; font-size: 14px; }
.ask-panel { position: sticky; top: 20px; border-top: 3px solid var(--ink); }
.ask-body { padding: 0 20px 20px; }
.ask-form { display: grid; gap: 10px; }
.ask-form textarea { min-height: 104px; }
.ask-form .btn { justify-self: end; }
.answer { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sand); }
.answer-label { color: var(--sapphire); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.answer-text { line-height: 1.65; font-size: 14px; white-space: pre-wrap; }
.sources { margin-top: 20px; }.sources h4 { font-size: 13px; margin: 0 0 8px; }
.source { border-top: 1px solid var(--sand); padding: 11px 0; font-size: 12px; }
.source strong { display: block; margin-bottom: 3px; }.source span { color: var(--slate); }
.connectors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 20px 20px; }
.connector { border: 1px solid var(--sand); border-radius: var(--r-md); padding: 16px; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.connector-icon { width: 38px; height: 38px; background: var(--linen); border-radius: 8px; display: grid; place-items: center; font-weight: 750; color: var(--ink); }
.connector h3 { font-size: 14px; margin: 1px 0 5px; }.connector p { color: var(--slate); font-size: 12px; line-height: 1.45; margin: 0 0 12px; }
.connector .status { font-size: 11px; color: var(--slate); }.connector .status:before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--stone); border-radius: 50%; margin-right: 6px; }
.status.live:before { background: var(--success); }
.error-panel { padding: 28px; border-color: #e8c6c1; background: #fffafa; }
.error-panel h2 { margin: 0 0 8px; color: var(--error); font-size: 20px; }.error-panel p { margin: 0; color: var(--slate); line-height: 1.55; }
.skeleton { overflow: hidden; position: relative; background: var(--linen); height: 14px; border-radius: 4px; }
.skeleton:after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.loading-stack { padding: 22px; display: grid; gap: 14px; }.loading-stack .skeleton:nth-child(2) { width: 78%; }.loading-stack .skeleton:nth-child(3) { width: 55%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 1050px) { .landing-main { gap: 40px; }.content-grid { grid-template-columns: 1fr; }.ask-panel { position: static; }.overview-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 760px) { .landing-nav, .app-header { padding-inline: 20px; }.landing-main { padding: 44px 20px; grid-template-columns: 1fr; }.archive-card { min-height: 400px; }.auth-layout { grid-template-columns: 1fr; }.auth-brand { min-height: 280px; }.auth-brand .auth-message { margin: 60px 0; }.auth-brand small { display: none; }.vault-main { padding: 28px 20px 72px; }.vault-intro { align-items: start; flex-direction: column; }.privacy-note { white-space: normal; }.header-title, .sync-state span { display: none; }.overview-grid, .connectors { grid-template-columns: 1fr; }.record-top { flex-direction: column; gap: 6px; }.profile-menu { right: 16px; }.tabs { gap: 22px; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
