/* ═══════════════════════════════════════════════════════════
   YTResearchAI — glass design system
   ═══════════════════════════════════════════════════════════ */

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  /* Surface */
  --bg: #04060E;
  --bg-deep: #010206;
  --glass: rgba(255,255,255,.045);
  --glass-strong: rgba(255,255,255,.07);
  --glass-hover: rgba(255,255,255,.065);
  --field: rgba(255,255,255,.035);
  --line: rgba(255,255,255,.08);
  --line-soft: rgba(255,255,255,.055);

  /* Ink */
  --text: #EEF2FB;
  --text-2: #A3B1CE;
  --text-muted: #6B7A9B;

  /* Accent */
  --cyan: #5BE9FF;
  --violet: #A78BFA;
  --pink: #F778BA;
  --green: #3FB950;
  --amber: #E3A72C;
  --red: #FF5F5F;
  --grad: linear-gradient(120deg, var(--cyan) 0%, var(--violet) 50%, var(--pink) 100%);

  /* Form */
  --r-sm: 10px; --r-md: 14px; --r-lg: 22px; --r-xl: 28px;
  --blur: blur(28px) saturate(165%);
  --shadow: 0 24px 70px -28px rgba(0,0,0,.85), 0 2px 10px -4px rgba(0,0,0,.6);
  --ease: cubic-bezier(.4,0,.2,1);
  --spring: cubic-bezier(.34,1.4,.5,1);

  --font: 'Inter','SF Pro Display',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --mono: 'JetBrains Mono','SF Mono','Fira Code',ui-monospace,Menlo,monospace;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-feature-settings: 'cv02','cv03','cv04','ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(91,233,255,.25); }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.is-hidden { display: none !important; }
[id] { scroll-margin-top: 96px; }
:focus-visible { outline: 2px solid rgba(91,233,255,.65); outline-offset: 3px; }
/* the field wrappers signal focus themselves */
input:focus-visible { outline: none; }

/* ═══ AMBIENT BACKDROP ═══════════════════════════════════ */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; will-change: transform; }
.aurora-1 { width: 62vw; height: 62vw; max-width: 820px; max-height: 820px; top: -22vw; right: -14vw;
  background: radial-gradient(circle at 30% 30%, rgba(91,233,255,.5), transparent 68%);
  animation: drift-a 26s var(--ease) infinite alternate; }
.aurora-2 { width: 54vw; height: 54vw; max-width: 700px; max-height: 700px; top: 18vh; left: -18vw;
  background: radial-gradient(circle at 60% 40%, rgba(167,139,250,.42), transparent 68%);
  animation: drift-b 32s var(--ease) infinite alternate; }
.aurora-3 { width: 48vw; height: 48vw; max-width: 620px; max-height: 620px; bottom: -14vw; right: 4vw;
  background: radial-gradient(circle at 50% 50%, rgba(247,120,186,.3), transparent 70%);
  animation: drift-c 38s var(--ease) infinite alternate; }
@keyframes drift-a { to { transform: translate3d(-9vw, 7vh, 0) scale(1.14); } }
@keyframes drift-b { to { transform: translate3d(11vw, -6vh, 0) scale(.88); } }
@keyframes drift-c { to { transform: translate3d(-7vw, -9vh, 0) scale(1.2); } }

.grid-veil { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 78%); }
.noise { position: absolute; inset: 0; opacity: .028; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.vignette { position: absolute; inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 0%, transparent 40%, rgba(1,2,6,.75) 100%); }

/* ═══ GLASS PRIMITIVE ════════════════════════════════════ */
.glass {
  position: relative;
  background: linear-gradient(158deg, var(--glass-strong), var(--glass) 46%, rgba(255,255,255,.022));
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
  isolation: isolate;
}
/* hairline gradient edge */
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(158deg, rgba(255,255,255,.28), rgba(255,255,255,.06) 34%, rgba(255,255,255,.02) 62%, rgba(91,233,255,.16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; z-index: 2;
}

/* ═══ LAYOUT ═════════════════════════════════════════════ */
.app { position: relative; z-index: 1; padding: 0 24px 96px; }
.wrap { max-width: 1080px; margin: 0 auto; }
.wrap-narrow { max-width: 720px; margin: 0 auto; }
.section { padding: 96px 0 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.eyebrow { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cyan); opacity: .85; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.35rem, 3.4vw, 1.95rem); font-weight: 650; letter-spacing: -.028em; }

/* ═══ NAV ════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px max(24px, calc((100vw - 1080px) / 2));
  transition: padding .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.nav::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: rgba(4,6,14,.6); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line-soft); transition: opacity .35s var(--ease);
}
.nav.scrolled { padding-top: 10px; padding-bottom: 10px; }
.nav.scrolled::after { opacity: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 620; letter-spacing: -.02em; font-size: .92rem; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #04060E;
  background: var(--grad); box-shadow: 0 6px 20px -6px rgba(91,233,255,.7); transition: transform .4s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-mark.small { width: 22px; height: 22px; border-radius: 7px; }
.brand-ai { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: .82rem; color: var(--text-2); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); color: var(--text);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background .25s, border-color .25s, transform .25s var(--spring); }
.nav-cta:hover { background: var(--glass-hover); border-color: rgba(255,255,255,.16); transform: translateY(-1px); }

/* ═══ HERO ═══════════════════════════════════════════════ */
.hero { text-align: center; padding: 152px 0 40px; }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 12px; border-radius: 999px;
  font-size: .74rem; color: var(--text-2); letter-spacing: .01em;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); margin-bottom: 30px; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); position: relative; }
.chip-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: var(--green);
  opacity: .35; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 70%,100% { transform: scale(2.2); opacity: 0; } }

.hero h1 { font-size: clamp(2.1rem, 6.4vw, 3.65rem); font-weight: 660; line-height: 1.06;
  letter-spacing: -.042em; margin-bottom: 22px; }
.shine { display: block; background: var(--grad); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine 9s linear infinite; }
@keyframes shine { to { background-position: 220% 0; } }
.hero-sub { color: var(--text-2); font-size: clamp(.92rem, 2.1vw, 1.06rem); line-height: 1.68;
  max-width: 560px; margin: 0 auto; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 26px; }
.mini-badge { font-size: .68rem; color: var(--text-muted); padding: 5px 11px; border-radius: 8px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); font-family: var(--mono);
  transition: color .25s, border-color .25s, transform .25s var(--spring); }
.mini-badge:hover { color: var(--text-2); border-color: var(--line); transform: translateY(-2px); }

/* ═══ CONSOLE ════════════════════════════════════════════ */
.console { padding: 18px; margin-top: 14px; }
.console-glow {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; z-index: 3;
  background: conic-gradient(from var(--angle), transparent 0deg, var(--cyan) 40deg, var(--violet) 90deg, var(--pink) 130deg, transparent 180deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .5s var(--ease); pointer-events: none;
  animation: spin-angle 5s linear infinite;
}
@keyframes spin-angle { to { --angle: 360deg; } }
.console:focus-within .console-glow, .console.is-busy .console-glow { opacity: .85; }
.console:focus-within { box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.09), 0 0 60px -14px rgba(91,233,255,.28); }

.url-bar { display: flex; align-items: center; gap: 10px; padding: 5px 5px 5px 16px; border-radius: 16px;
  background: var(--field); border: 1px solid var(--line-soft); transition: border-color .3s, background .3s; }
.url-bar:focus-within { border-color: rgba(91,233,255,.35); background: rgba(255,255,255,.05); }
.url-icon { display: grid; place-items: center; color: var(--text-muted); flex-shrink: 0; transition: color .3s; }
.url-bar:focus-within .url-icon { color: var(--cyan); }
.url-bar input { flex: 1; min-width: 0; background: none; border: none; outline: none; padding: 14px 0;
  font-size: .95rem; letter-spacing: -.01em; }
.url-bar input::placeholder { color: var(--text-muted); }
.kbd-hint { flex-shrink: 0; font-family: var(--mono); font-size: .68rem; color: var(--text-muted);
  padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid var(--line-soft);
  opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s var(--spring); }
.url-bar:focus-within .kbd-hint { opacity: 1; transform: none; }

.btn-primary { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; flex-shrink: 0; border: none; border-radius: 12px; cursor: pointer;
  font-size: .875rem; font-weight: 600; letter-spacing: -.01em; color: #04060E; overflow: hidden;
  background: linear-gradient(135deg, #7CEEFF 0%, var(--cyan) 40%, var(--violet) 100%);
  box-shadow: 0 8px 24px -10px rgba(91,233,255,.85), inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .28s var(--spring), box-shadow .28s var(--ease), filter .28s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -12px rgba(91,233,255,.95), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-primary:disabled { filter: grayscale(.5) brightness(.75); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sheen { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform .75s var(--ease); }
.btn-primary:hover .btn-sheen { transform: translateX(120%); }
.btn-primary:disabled .btn-sheen { display: none; }
.btn-arrow { transition: transform .3s var(--spring); }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.console-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 0 4px; min-height: 22px; }
.foot-spacer { flex: 1; }
.ghost-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
  font-size: .78rem; color: var(--text-muted); padding: 4px 6px; border-radius: 8px; transition: color .2s; }
.ghost-link:hover { color: var(--text-2); }
.chev { transition: transform .35s var(--spring); }
.ghost-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.key-status { font-size: .72rem; color: var(--text-muted); font-family: var(--mono); white-space: nowrap;
  animation: fade-in .3s var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Collapse */
.collapse { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: 0;
  transition: grid-template-rows .45s var(--ease), opacity .3s var(--ease), margin-top .45s var(--ease); }
.collapse.open { grid-template-rows: 1fr; opacity: 1; margin-top: 12px; }
.collapse-inner { overflow: hidden; min-height: 0; }

.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px;
  padding-top: 14px; border-top: 1px solid var(--line-soft); }
.switch { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; border-radius: 12px;
  cursor: pointer; user-select: none; transition: background .25s; }
.switch:hover { background: rgba(255,255,255,.03); }
/* kept 1px rather than 0 so it stays in the accessibility tree */
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
.switch-track { position: relative; flex-shrink: 0; width: 36px; height: 20px; margin-top: 2px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); transition: background .3s var(--ease), box-shadow .3s; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #7F8FB0; transition: transform .35s var(--spring), background .3s; }
.switch input:checked + .switch-track { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent;
  box-shadow: 0 0 18px -4px rgba(91,233,255,.75); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(16px); background: #04060E; }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(91,233,255,.3); }
.switch-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.switch-text b { font-size: .8rem; font-weight: 550; color: var(--text); }
.switch-text i { font-size: .7rem; font-style: normal; color: var(--text-muted); }

.seg-field { display: flex; flex-direction: column; gap: 7px; padding: 11px 12px; }
.seg-caption { font-size: .7rem; color: var(--text-muted); }
.segmented { position: relative; display: inline-flex; align-self: flex-start; padding: 3px; border-radius: 11px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); }
.seg-glider { position: absolute; top: 3px; bottom: 3px; left: 3px; width: var(--seg-w, 52px);
  transform: translateX(var(--seg-x, 0px)); border-radius: 8px;
  background: linear-gradient(135deg, rgba(91,233,255,.24), rgba(167,139,250,.24));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 4px 14px -6px rgba(91,233,255,.6);
  transition: transform .4s var(--spring), width .4s var(--spring); }
.seg-btn { position: relative; z-index: 1; background: none; border: none; cursor: pointer; border-radius: 8px;
  padding: 6px 13px; font-size: .74rem; font-weight: 550; color: var(--text-muted); transition: color .25s; }
.seg-btn:hover { color: var(--text-2); }
.seg-btn.is-active { color: var(--text); }

.key-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 3px 14px; border-radius: 12px;
  background: var(--field); border: 1px solid var(--line-soft); transition: border-color .3s; }
.key-bar:focus-within { border-color: rgba(91,233,255,.28); }
.key-icon { display: grid; place-items: center; color: var(--text-muted); flex-shrink: 0; }
.key-bar input { flex: 1; min-width: 0; background: none; border: none; outline: none; padding: 11px 0; font-size: .82rem; }
.key-bar input::placeholder { color: var(--text-muted); }
.key-note { font-size: .68rem; color: var(--text-muted); white-space: nowrap; opacity: .75; }

.form-msg { font-size: .78rem; color: var(--amber); line-height: 1.5; max-height: 0; overflow: hidden;
  transition: max-height .35s var(--ease), margin-top .35s var(--ease); margin-top: 0; }
.form-msg.show { max-height: 90px; margin-top: 12px; }

/* ═══ PANELS ═════════════════════════════════════════════ */
.panel { padding: 22px; margin-top: 14px; }
.panel:not(.is-hidden) { animation: panel-in .55s var(--spring) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ═══ PROGRESS ═══════════════════════════════════════════ */
.prog-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.prog-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); flex-shrink: 0;
  box-shadow: 0 0 12px var(--cyan); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.75); } }
.prog-label { font-size: .88rem; font-weight: 550; letter-spacing: -.01em; flex: 1; }
.prog-pct { font-family: var(--mono); font-size: .78rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.prog-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.prog-fill { position: relative; height: 100%; width: 0%; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--pink));
  transition: width .7s var(--ease); }
.prog-shimmer { position: absolute; inset: 0; animation: shimmer 1.8s linear infinite;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.prog-cap { position: absolute; right: 0; top: 0; bottom: 0; width: 14px; background: #fff; filter: blur(6px); opacity: .7; }
.prog-detail { color: var(--text-muted); font-size: .8rem; margin-top: 12px; min-height: 1.2em; }

.prog-steps { display: flex; justify-content: space-between; gap: 6px; list-style: none; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--line-soft); }
.prog-steps li { display: flex; align-items: center; gap: 7px; font-size: .72rem; color: var(--text-muted);
  transition: color .4s var(--ease); }
.prog-steps li span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.14);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--spring); }
.prog-steps li.done { color: var(--text-2); }
.prog-steps li.done span { background: var(--cyan); box-shadow: 0 0 10px rgba(91,233,255,.8); transform: scale(1.25); }
.prog-steps li.active { color: var(--text); }
.prog-steps li.active span { background: var(--violet); box-shadow: 0 0 12px rgba(167,139,250,.9);
  animation: pulse 1.4s var(--ease) infinite; }

/* ═══ REPORT ═════════════════════════════════════════════ */
.report-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.report-bar-left { display: flex; gap: 7px; flex-wrap: wrap; }
.action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
  font-size: .78rem; font-weight: 520; cursor: pointer; color: var(--text-2);
  background: rgba(255,255,255,.045); border: 1px solid var(--line-soft);
  transition: background .22s, border-color .22s, color .22s, transform .22s var(--spring); }
.action-btn:hover { background: rgba(255,255,255,.08); border-color: var(--line); color: var(--text); transform: translateY(-1px); }
.action-btn:active { transform: translateY(0) scale(.97); }
.action-btn.ghost { background: none; border-color: transparent; color: var(--text-muted); }
.action-btn.ghost:hover { background: rgba(255,255,255,.05); color: var(--text); }
.action-btn.done { color: var(--green); border-color: rgba(63,185,80,.3); background: rgba(63,185,80,.1); }
.report-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .76rem;
  color: var(--text-muted); margin-bottom: 26px; }
.report-meta .meta-title { color: var(--text); font-weight: 600; font-size: .88rem; width: 100%; letter-spacing: -.015em; }
.report-meta .tag { padding: 4px 10px; border-radius: 7px; background: rgba(255,255,255,.045);
  border: 1px solid var(--line-soft); font-family: var(--mono); font-size: .68rem; }

.prose { font-size: .935rem; line-height: 1.82; color: var(--text-2); }
.prose > * { animation: prose-in .5s var(--ease) both; }
@keyframes prose-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.prose h1 { font-size: 1.45rem; font-weight: 640; color: var(--text); letter-spacing: -.028em;
  margin: 34px 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.prose h2 { font-size: 1.12rem; font-weight: 600; margin: 32px 0 12px; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.prose h3 { font-size: .99rem; font-weight: 600; color: var(--text); margin: 24px 0 10px; }
.prose h4 { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); margin: 20px 0 8px; }
.prose p { margin: 13px 0; }
.prose ul, .prose ol { padding-left: 20px; margin: 12px 0; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--cyan); }
.prose code { font-family: var(--mono); font-size: .82em; color: var(--cyan);
  background: rgba(91,233,255,.09); border: 1px solid rgba(91,233,255,.16); padding: 1px 6px; border-radius: 6px; }
.prose pre { background: rgba(0,0,0,.4); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 16px 18px; margin: 16px 0; overflow-x: auto; }
.prose pre code { background: none; border: none; padding: 0; color: var(--text-2); font-size: .78rem; line-height: 1.65; }
.prose blockquote { border-left: 2px solid transparent; border-image: var(--grad) 1;
  padding: 4px 0 4px 16px; margin: 16px 0; color: var(--text-2); font-style: italic; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 16px 0; font-size: .82rem;
  border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.prose th, .prose td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.prose tr:last-child td { border-bottom: none; }
.prose th { background: rgba(255,255,255,.04); font-weight: 600; color: var(--text); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .06em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(91,233,255,.35); transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--cyan); }
.prose img { max-width: 100%; border-radius: var(--r-md); }
.prose hr { border: none; height: 1px; background: var(--line-soft); margin: 28px 0; }

/* ═══ ERROR ══════════════════════════════════════════════ */
.error-card { background: linear-gradient(158deg, rgba(255,95,95,.1), rgba(255,95,95,.03)); }
.error-card::before { background: linear-gradient(158deg, rgba(255,95,95,.35), rgba(255,95,95,.06) 60%, transparent); }
.error-row { display: flex; gap: 14px; align-items: flex-start; }
.error-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 11px;
  background: rgba(255,95,95,.14); color: var(--red); }
.error-body h3 { font-size: .95rem; font-weight: 600; margin-bottom: 5px; }
#error-msg { color: var(--text-2); font-size: .8rem; font-family: var(--mono); line-height: 1.65; word-break: break-word; }
#retry-btn { margin-top: 18px; }

/* ═══ RECENT ═════════════════════════════════════════════ */
.recent { padding: 18px 20px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.recent-head h4 { font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.recent-live { display: inline-flex; align-items: center; gap: 6px; font-size: .66rem; color: var(--text-muted); font-family: var(--mono); }
.recent-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: pulse 2s var(--ease) infinite; }
.recent-item { display: flex; align-items: center; gap: 10px; padding: 10px 2px; font-size: .78rem;
  border-bottom: 1px solid var(--line-soft); animation: prose-in .4s var(--ease) both; }
.recent-item:last-child { border-bottom: none; }
.recent-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.recent-state { flex-shrink: 0; font-size: .7rem; font-family: var(--mono); color: var(--text-muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-complete { background: var(--green); box-shadow: 0 0 8px rgba(63,185,80,.7); }
.status-failed { background: var(--red); box-shadow: 0 0 8px rgba(255,95,95,.6); }
.status-running { background: var(--amber); box-shadow: 0 0 8px rgba(227,167,44,.7); animation: pulse 1.5s var(--ease) infinite; }

/* ═══ PIPELINE ═══════════════════════════════════════════ */
.pipe { position: relative; display: flex; align-items: stretch; justify-content: space-between; gap: 10px; }
.pipe-track { position: absolute; top: 21px; left: 8%; right: 8%; height: 1px; background: var(--line); overflow: hidden; }
.pipe-pulse { position: absolute; top: 0; left: 0; width: 22%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: travel 3.6s var(--ease) infinite; }
@keyframes travel { 0% { transform: translateX(-120%); } 100% { transform: translateX(560%); } }
.pipe-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; padding-top: 34px; }
.pipe-dot { position: absolute; top: 14px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center;
  transition: transform .35s var(--spring), border-color .35s, box-shadow .35s; }
.pipe-dot::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 10px rgba(91,233,255,.9); opacity: .55; transition: opacity .35s; }
.pipe-item:hover .pipe-dot { transform: scale(1.25); border-color: rgba(91,233,255,.55); box-shadow: 0 0 22px -4px rgba(91,233,255,.7); }
.pipe-item:hover .pipe-dot::after { opacity: 1; }
.pipe-item b { font-size: .8rem; font-weight: 550; letter-spacing: -.01em; }
.pipe-item i { font-size: .68rem; font-style: normal; color: var(--text-muted); }

/* ═══ STATS ══════════════════════════════════════════════ */
.stats { display: flex; align-items: center; justify-content: space-around; gap: 30px 12px; flex-wrap: wrap;
  padding: 34px 28px; margin-top: 72px; }
.stat { text-align: center; flex: 1; min-width: 110px; }
.stat em { display: block; font-style: normal; font-size: clamp(1.7rem, 4.6vw, 2.5rem); font-weight: 680;
  letter-spacing: -.045em; line-height: 1.1; font-variant-numeric: tabular-nums;
  background: linear-gradient(175deg, #FFFFFF 0%, #9FB0D4 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { display: block; font-size: .66rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .11em; margin-top: 8px; }
.stat-div { width: 1px; align-self: stretch; background: linear-gradient(180deg, transparent, var(--line), transparent); }

/* ═══ FEATURES ═══════════════════════════════════════════ */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 14px; }
.f-card { padding: 26px 24px; transition: transform .4s var(--spring), box-shadow .4s var(--ease); }
.f-card > * { position: relative; z-index: 1; }
.f-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 0; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.08), transparent 62%);
  opacity: 0; transition: opacity .4s var(--ease); }
.f-card:hover { transform: translateY(-4px); box-shadow: 0 32px 80px -30px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.1); }
.f-card:hover::after { opacity: 1; }
.f-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; font-size: 1.15rem;
  margin-bottom: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--line-soft);
  transition: transform .4s var(--spring), border-color .4s; }
.f-card:hover .f-icon { transform: translateY(-2px) rotate(-6deg) scale(1.06); border-color: rgba(91,233,255,.3); }
.f-card h4 { font-size: .92rem; font-weight: 600; letter-spacing: -.018em; margin-bottom: 7px; }
.f-card p { font-size: .8rem; line-height: 1.68; color: var(--text-muted); }

/* ═══ CTA ════════════════════════════════════════════════ */
.cta { text-align: center; padding: 46px 32px; margin-top: 96px; overflow: hidden; }
.cta > * { position: relative; z-index: 1; }
.cta::after { content: ''; position: absolute; inset: -40% 18% auto; height: 220px; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(91,233,255,.22), transparent 70%); filter: blur(30px); }
.cta h3 { font-size: 1.4rem; font-weight: 640; letter-spacing: -.03em; margin-bottom: 8px; }
.cta p { color: var(--text-2); font-size: .88rem; margin-bottom: 24px; }

/* ═══ FOOTER ═════════════════════════════════════════════ */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 80px; padding-top: 26px; border-top: 1px solid var(--line-soft);
  font-size: .76rem; color: var(--text-muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2); font-weight: 550; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ═══ TOAST ══════════════════════════════════════════════ */
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 100; padding: 11px 20px; border-radius: 999px;
  font-size: .8rem; font-weight: 520; color: var(--text); white-space: nowrap;
  background: rgba(14,18,32,.8); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 18px 50px -18px rgba(0,0,0,.9);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: transform .45s var(--spring), opacity .3s var(--ease); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ═══ SPINNER ════════════════════════════════════════════ */
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(4,6,14,.25);
  border-top-color: #04060E; border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ SCROLL REVEAL ══════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none;
  transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--spring) var(--d, 0ms); }

/* ═══ RESPONSIVE ═════════════════════════════════════════ */
@media (max-width: 860px) {
  .stats { padding: 26px 18px; }
  .stat-div { display: none; }
  .stat { min-width: 42%; }
}
@media (max-width: 720px) {
  .app { padding: 0 16px 72px; }
  .nav { padding: 12px 16px; }
  .nav-links { gap: 14px; font-size: .78rem; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 116px 0 30px; }
  .hero h1 { font-size: clamp(1.75rem, 8.5vw, 2.4rem); }
  .section { padding: 72px 0 0; }
  .console { padding: 14px; }
  .url-bar { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
  .url-bar input { padding: 4px 2px; }
  .url-icon, .kbd-hint { display: none; }
  .btn-primary { width: 100%; height: 48px; }
  .key-note { display: none; }
  .panel { padding: 18px; }
  .prog-steps { flex-wrap: wrap; gap: 10px 16px; }
  .pipe { flex-direction: column; gap: 4px; align-items: stretch; }
  .pipe-track { top: 10px; bottom: 10px; left: 7px; right: auto; width: 1px; height: auto; }
  .pipe-pulse { width: 100%; height: 20%; background: linear-gradient(180deg, transparent, var(--cyan), transparent);
    animation: travel-v 3.6s var(--ease) infinite; }
  @keyframes travel-v { 0% { transform: translateY(-120%); } 100% { transform: translateY(500%); } }
  .pipe-item { flex-direction: row; align-items: center; gap: 10px; text-align: left; padding: 9px 0 9px 28px; }
  .pipe-dot { top: 50%; left: 0; transform: translateY(-50%); }
  .pipe-item:hover .pipe-dot { transform: translateY(-50%) scale(1.2); }
  .pipe-item i { margin-left: auto; }
  .stats { margin-top: 56px; }
  .cta { padding: 36px 22px; margin-top: 72px; }
  .footer { flex-direction: column; text-align: center; gap: 14px; }
  .report-bar { flex-direction: column; align-items: stretch; }
  .report-bar-left { justify-content: center; }
}
@media (max-width: 420px) {
  .hero { padding: 100px 0 24px; }
  .chip { font-size: .68rem; padding: 6px 12px 6px 10px; }
  .stat { min-width: 100%; }
  .stat em { font-size: 1.85rem; }
}

/* ═══ MOTION PREFERENCES ═════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .aurora { animation: none; }
}
