/* PhishGuard — dark HUD theme over a live WebGL scene */
:root {
  --bg: #05030a;
  --ink: #f4f1ff;
  --muted: #9a94b8;
  --dim: #6b6585;
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(14, 10, 28, .58);
  --accent: #9b6bff;
  --accent-2: #d9c2ff;
  --good: #2ee6a6;
  --warn: #ffb020;
  --bad: #ff3b6b;
  --font-display: 'Saira Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Saira', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body[data-state="safe"]       { --accent: #17d99b; --accent-2: #bfffe8; }
body[data-state="suspicious"] { --accent: #ffa31a; --accent-2: #ffe2ac; }
body[data-state="phishing"]   { --accent: #ff3b6b; --accent-2: #ffb4a0; }
body[data-state="scanning"]   { --accent: #5b94ff; --accent-2: #b9f3ff; }

[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #05030a; }
.mono { font-family: var(--font-mono); }
.dim { color: var(--dim); }

/* ---------- stage ---------- */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(5, 3, 10, .75) 100%);
}
.cursor-glow {
  position: fixed; z-index: 1; width: 520px; height: 520px; left: 0; top: 0; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%);
  transform: translate(calc(var(--mx, -999px) - 50%), calc(var(--my, -999px) - 50%));
  transition: background .8s;
}
body.no-webgl { background: radial-gradient(ellipse at 50% 35%, #2a1659 0%, #05030a 60%); }
body.no-webgl #stage { display: none; }

main, .foot, .nav { position: relative; z-index: 2; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px clamp(16px, 5vw, 72px);
  font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  background: linear-gradient(#05030a 0%, rgba(5, 3, 10, 0));
}
.pill {
  display: inline-flex; align-items: center; gap: 12px; height: 38px; padding: 0 22px 0 8px;
  border: 1px solid var(--line); border-radius: 99px; background: rgba(5, 3, 10, .6);
  backdrop-filter: blur(10px); transition: border-color .3s, transform .3s var(--ease);
}
.pill:hover { border-color: var(--accent); transform: translateY(-1px); }
.tri {
  width: 24px; height: 24px; border-radius: 50%; background: #fff; position: relative; flex: none;
}
.tri::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -58%);
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid #05030a;
}
.nav nav { display: flex; gap: clamp(16px, 3.5vw, 48px); }
.nav nav a { position: relative; color: var(--ink); padding-bottom: 4px; opacity: .85; transition: opacity .2s; }
.nav nav a i { display: inline-block; width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; margin-left: 8px; vertical-align: middle; }
.nav nav a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav nav a:hover { opacity: 1; }
.nav nav a:hover::after { transform: scaleX(1); }
.status { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 0 transparent; }
.status.on .dot { background: var(--good); animation: ping 2s infinite; }
.status.off .dot { background: var(--bad); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(46, 230, 166, .6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(46, 230, 166, 0); } }

/* ---------- hero ---------- */
section { padding: 0 clamp(16px, 5vw, 72px); }
.hero {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-top: 90px; padding-bottom: 150px; position: relative;
}
.eyebrow { text-shadow: 0 0 14px #05030a; font: 400 11px/1 var(--font-mono); letter-spacing: .38em; color: var(--accent-2); margin-bottom: 28px; transition: color .6s; }
.title {
  display: flex; justify-content: center; gap: clamp(8px, 2.6vw, 44px);
  font: 200 clamp(44px, 9.5vw, 150px)/1 var(--font-display); text-transform: uppercase;
  text-shadow: 0 0 40px rgba(155, 107, 255, .35);
  user-select: none;
}
.title span { display: inline-block; opacity: 0; transform: translateY(40px) rotateX(-70deg); animation: letter 1s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 250ms); }
@keyframes letter { to { opacity: 1; transform: none; } }
.tagline { max-width: 520px; margin-top: 30px; color: #c9c3e0; text-shadow: 0 1px 18px #05030a, 0 0 6px #05030a; font-weight: 300; font-size: clamp(14px, 1.6vw, 17px); }
.cta {
  margin-top: 34px; display: inline-flex; align-items: center; gap: 14px; height: 48px; padding: 0 12px 0 28px;
  border: 1px solid var(--line); border-radius: 99px; background: rgba(5, 3, 10, .55); backdrop-filter: blur(10px);
  font: 500 12px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.cta b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #05030a; font-size: 14px; animation: bob 2s ease-in-out infinite; }
.cta:hover { border-color: var(--accent); box-shadow: 0 0 40px -6px var(--accent); transform: translateY(-2px); }
@keyframes bob { 50% { transform: translateY(3px); } }

.hud {
  position: absolute; left: clamp(16px, 5vw, 72px); right: clamp(16px, 5vw, 72px); bottom: 36px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; text-align: left;
}
.hud-block { border-top: 1px solid var(--line); padding-top: 12px; position: relative; }
.hud-block::before { content: ''; position: absolute; top: -1px; left: 0; width: 28px; height: 1px; background: var(--accent); transition: background .6s; }
.hud-block small { display: block; font: 400 10px/1 var(--font-mono); letter-spacing: .2em; color: var(--dim); margin-bottom: 8px; }
.hud-block strong { font: 300 clamp(20px, 2.6vw, 34px)/1 var(--font-display); letter-spacing: .06em; }

/* ---------- detector ---------- */
.detect {
  min-height: 100vh; padding-top: 120px; padding-bottom: 80px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(240px, .7fr) minmax(0, 1.05fr); gap: clamp(16px, 3vw, 44px);
  align-items: stretch; max-width: 1500px; margin: 0 auto;
}
.col-core { display: flex; align-items: flex-end; justify-content: center; text-align: center; pointer-events: none; }
.readout { padding-bottom: 28px; width: 100%; text-shadow: 0 0 22px #05030a; }
@media (min-width: 1101px) { .col-core { position: sticky; top: 90px; height: calc(100vh - 170px); height: calc(100svh - 170px); align-self: start; } }
.readout small { color: var(--accent-2); letter-spacing: .3em; font-size: 10px; display: block; margin-bottom: 10px; transition: color .6s; }
.verdict {
  font: 200 clamp(28px, 3vw, 46px)/1 var(--font-display); letter-spacing: .22em; padding-left: .22em; white-space: nowrap; text-transform: uppercase;
  color: var(--ink); text-shadow: 0 0 28px color-mix(in srgb, var(--accent) 70%, transparent); transition: text-shadow .6s;
}
.score { margin-top: 14px; font: 300 14px var(--font-mono); color: var(--muted); }
.score span { font: 300 34px/1 var(--font-display); color: var(--ink); letter-spacing: .06em; }
.score em { font-style: normal; margin-left: 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.meter { height: 2px; margin: 16px auto 0; max-width: 280px; background: var(--line); overflow: hidden; border-radius: 2px; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 14px var(--accent); transition: width 1.2s var(--ease), background .6s; }

/* cards */
.card {
  position: relative; padding: 22px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden; transition: border-color .6s, box-shadow .6s;
}
.card::before, .card::after { content: ''; position: absolute; width: 14px; height: 14px; border: 1px solid var(--accent); transition: border-color .6s; opacity: .8; }
.card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.card::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
body[data-state="phishing"] #output-card, body[data-state="phishing"] #input-card { border-color: rgba(255, 59, 107, .4); box-shadow: 0 30px 90px -30px rgba(255, 59, 107, .35); }
body[data-state="safe"] #output-card, body[data-state="safe"] #input-card { border-color: rgba(23, 217, 155, .35); box-shadow: 0 30px 90px -30px rgba(23, 217, 155, .25); }
body[data-state="suspicious"] #output-card { border-color: rgba(255, 163, 26, .4); }
.card-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; font: 500 11px/1 var(--font-mono); letter-spacing: .18em; color: var(--accent-2); text-transform: uppercase; }
.card-head .dim { letter-spacing: .04em; text-transform: none; font-weight: 300; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); cursor: pointer;
  font: 400 11px/1 var(--font-mono); letter-spacing: .04em; color: var(--muted);
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-2px); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.chip.bad::before, .chip.good::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; background: var(--bad); }
.chip.good::before { background: var(--good); }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font: 400 10px/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5, 3, 10, .55);
  outline: none; resize: vertical; font-size: 14px; transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { min-height: 150px; line-height: 1.55; font-family: var(--font-mono); font-size: 12.5px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); background: rgba(5, 3, 10, .8); }
::placeholder { color: #5c5675; }

.actions { display: flex; gap: 10px; margin-top: 6px; }
.btn { height: 48px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; font: 500 12px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s, opacity .25s; position: relative; overflow: hidden; }
.btn.primary { flex: 1; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 90%, #fff 0%), color-mix(in srgb, var(--accent) 55%, #1a0f40)); color: #fff; border-color: transparent; box-shadow: 0 10px 40px -10px var(--accent); }
.btn.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 50px -8px var(--accent); }
.btn.primary:active:not(:disabled) { transform: translateY(0) scale(.99); }
.btn-label { position: relative; z-index: 1; }
.btn-glow { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); }
.btn.primary:hover .btn-glow { transition: transform .9s var(--ease); transform: translateX(120%); }
.btn.primary:disabled { opacity: .85; cursor: progress; }
.btn.primary.loading .btn-label::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 12px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite; }
.btn.ghost { padding: 0 22px; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
button:focus-visible, a:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.scanline { position: absolute; left: 0; right: 0; top: 0; height: 90px; pointer-events: none; opacity: 0; background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 30%, transparent), transparent); border-bottom: 1px solid var(--accent); }
body[data-state="scanning"] .scanline { opacity: 1; animation: scan 1.1s linear infinite; }
@keyframes scan { from { transform: translateY(-90px); } to { transform: translateY(560px); } }

/* output */
#output-card { min-height: 100%; scroll-margin-top: 90px; }
.empty { display: grid; place-items: center; text-align: center; gap: 18px; padding: 70px 10px; color: var(--muted); font-weight: 300; }
.empty p span { font-size: 13px; color: var(--dim); }
.orbit { position: relative; width: 64px; height: 64px; }
.orbit i { position: absolute; inset: 0; border: 1px solid var(--accent); border-radius: 50%; opacity: .5; animation: orbit 3.6s linear infinite; }
.orbit i:nth-child(2) { inset: 10px; animation-duration: 2.4s; animation-direction: reverse; border-style: dashed; }
.orbit i:nth-child(3) { inset: 24px; background: var(--accent); border: 0; animation: pulse 1.8s ease-in-out infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .4; } }

.results h3 { font: 500 10px/1 var(--font-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--dim); margin: 20px 0 12px; }
.results h3:first-child { margin-top: 0; }
.signals { list-style: none; display: grid; gap: 10px; }
.signal {
  display: grid; grid-template-columns: 8px 1fr; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .025); opacity: 0; transform: translateX(18px); animation: in .6s var(--ease) forwards; animation-delay: calc(var(--i) * 80ms);
}
.signal .bar { width: 4px; border-radius: 4px; background: var(--c); box-shadow: 0 0 12px var(--c); align-self: stretch; transform-origin: top; transform: scaleY(0); animation: grow .8s var(--ease) forwards; animation-delay: calc(var(--i) * 80ms + 150ms); }
.signal.risk { --c: var(--bad); }
.signal.good { --c: var(--good); }
.signal strong { display: block; font-weight: 500; font-size: 14px; }
.signal p { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.strength { margin-top: 8px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; background: var(--c); animation: fill 1s var(--ease) forwards; animation-delay: calc(var(--i) * 80ms + 300ms); }
@keyframes in { to { opacity: 1; transform: none; } }
@keyframes grow { to { transform: scaleY(1); } }
@keyframes fill { to { width: var(--w); } }

.terms { display: flex; flex-wrap: wrap; gap: 8px; }
.term { padding: 6px 11px; border-radius: 8px; font: 400 12px var(--font-mono); background: color-mix(in srgb, var(--bad) calc(var(--a) * 28%), transparent); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); opacity: 0; animation: in .5s var(--ease) forwards; animation-delay: calc(var(--i) * 60ms); transform: translateY(8px); }
.urls { list-style: none; display: grid; gap: 8px; }
.urls li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 300 12px var(--font-mono); overflow-wrap: anywhere; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; opacity: 0; animation: in .5s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms); }
.tag { padding: 2px 7px; border-radius: 6px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 59, 107, .16); color: #ff8aa6; }
.tag.ok { background: rgba(46, 230, 166, .14); color: #7dffd0; }
.error { margin-top: 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255, 59, 107, .4); background: rgba(255, 59, 107, .1); color: #ffb1c3; font-size: 14px; }

/* ---------- telemetry / how ---------- */
.telemetry, .how { max-width: 1500px; margin: 0 auto; padding-top: 90px; padding-bottom: 40px; }
.sec-head { margin-bottom: 36px; }
.sec-head small { font: 400 11px var(--font-mono); letter-spacing: .3em; color: var(--accent-2); }
.sec-head h2 { font: 200 clamp(34px, 5.4vw, 72px)/1.05 var(--font-display); letter-spacing: .12em; text-transform: uppercase; margin: 10px 0; }
.sec-head p { color: var(--muted); max-width: 560px; font-weight: 300; }
.tele-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.metric { display: grid; grid-template-columns: 110px 1fr 70px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); font: 400 12px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.metric:last-child { border: 0; }
.metric .track { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.metric .track i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px var(--accent); transition: width 1.4s var(--ease); }
.metric b { text-align: right; color: var(--ink); font-weight: 500; }
.cm { display: grid; grid-template-columns: auto 1fr 1fr; grid-template-rows: auto 1fr 1fr; gap: 8px; align-items: stretch; min-height: 210px; }
.cm .h { font: 400 10px var(--font-mono); letter-spacing: .14em; color: var(--dim); text-transform: uppercase; display: grid; place-items: center; }
.cm .cell { display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); font: 200 clamp(28px, 4vw, 52px)/1 var(--font-display); background: color-mix(in srgb, var(--accent) calc(var(--v) * 40%), transparent); }
.note { margin-top: 20px; color: var(--dim); font-size: 13px; max-width: 760px; }
.note b { color: var(--accent-2); font-weight: 500; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.steps article b { font: 200 44px/1 var(--font-display); color: var(--accent); letter-spacing: .08em; transition: color .6s; }
.steps h4 { font: 400 22px var(--font-display); letter-spacing: .14em; text-transform: uppercase; margin: 14px 0 8px; }
.steps p { color: var(--muted); font-size: 14px; font-weight: 300; }
.tilt { transform-style: preserve-3d; transition: transform .3s var(--ease), border-color .6s, box-shadow .6s; will-change: transform; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 60px clamp(16px, 5vw, 72px) 36px; font: 400 11px var(--font-mono); letter-spacing: .2em; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-delay: calc(var(--d, 0ms) + 900ms); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .detect { grid-template-columns: 1fr 1fr; }
  .col-core { grid-column: 1 / -1; order: -1; min-height: 38vh; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav { background: linear-gradient(#05030a 65%, rgba(5, 3, 10, 0)); padding-bottom: 28px; }
  .nav nav { display: none; }
  .verdict { font-size: 34px; }
  .detect { grid-template-columns: 1fr; padding-top: 100px; }
  .tele-grid, .steps { grid-template-columns: 1fr; }
  .hud { grid-template-columns: repeat(2, 1fr); bottom: 24px; }
  .hero { padding-bottom: 210px; }
  .title { gap: 3px; font-size: 11.2vw; }
  .metric { grid-template-columns: 84px 1fr 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .title span { opacity: 1; transform: none; }
}

/* ---------- mode tabs ---------- */
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 3, 10, .5); }
.tab { position: relative; z-index: 1; height: 36px; border: 0; background: none; cursor: pointer; border-radius: 9px; font: 500 11px/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); transition: color .25s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: #fff; }
.tab-ink { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, transparent), color-mix(in srgb, var(--accent) 30%, #1a0f40)); box-shadow: 0 6px 24px -8px var(--accent); transition: transform .35s var(--ease), background .6s; }
.tabs[data-mode="site"] .tab-ink { transform: translateX(100%); }
.tab:focus-visible { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.hint { font-size: 12px; line-height: 1.5; color: var(--dim); margin: -2px 0 14px; }

/* ---------- screenshot dropzone ---------- */
.drop { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; margin-bottom: 16px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 12px; cursor: pointer; background: color-mix(in srgb, var(--accent) 5%, transparent); transition: background .25s, border-color .25s, transform .25s var(--ease); overflow: hidden; }
.drop::before { content: ''; flex: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: center / 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9c2ff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0l-4 4m4-4l4 4M4 15v3a2 2 0 002 2h12a2 2 0 002-2v-3'/%3E%3C/svg%3E"); }
.drop:hover, .drop:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: var(--accent); }
.drop.over { background: color-mix(in srgb, var(--accent) 22%, transparent); border-style: solid; border-color: var(--accent); transform: scale(1.01); }
.drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drop-text strong { font: 500 13px/1.3 var(--font-body); }
.drop-text span { font-size: 12px; color: var(--muted); }
.drop img { flex: none; width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); order: -1; }
.drop.has-img::before { display: none; }
.drop-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; background: rgba(5, 3, 10, .82); font: 400 11px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); }
.drop-busy i { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--accent-2); border-radius: 50%; animation: spin .7s linear infinite; }

/* ---------- voice agent ---------- */
.voice { pointer-events: auto; margin: 22px auto 0; max-width: 320px; padding: 14px; text-shadow: none; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 3, 10, .62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 50px -20px #000; }
.voice-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.voice-btn { white-space: nowrap; height: 42px; padding: 0 18px; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; background: rgba(5, 3, 10, .6); backdrop-filter: blur(10px); border-radius: 99px; }
.voice-btn:hover { border-color: var(--accent); box-shadow: 0 0 28px -6px var(--accent); }
.voice-btn .ico { width: 0; height: 0; border-left: 9px solid var(--accent-2); border-top: 6px solid transparent; border-bottom: 6px solid transparent; transition: all .2s; }
.voice-btn[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, rgba(5, 3, 10, .6)); }
.voice-btn[aria-pressed="true"] .ico { width: 11px; height: 11px; border: 0; background: var(--accent-2); border-radius: 2px; }
.wave { display: flex; align-items: center; gap: 3px; height: 26px; }
.wave i { width: 3px; height: 4px; border-radius: 2px; background: var(--accent-2); opacity: .45; transition: height .12s, opacity .3s; }
body.speaking .wave i { opacity: 1; animation: wave .9s ease-in-out infinite; animation-delay: calc(var(--k, 0) * 90ms); }
.wave i:nth-child(1) { --k: 0 } .wave i:nth-child(2) { --k: 3 } .wave i:nth-child(3) { --k: 1 } .wave i:nth-child(4) { --k: 4 } .wave i:nth-child(5) { --k: 2 } .wave i:nth-child(6) { --k: 5 } .wave i:nth-child(7) { --k: 1 }
@keyframes wave { 0%, 100% { height: 4px } 50% { height: 22px } }
.auto { display: inline-flex; align-items: center; gap: 6px; font: 400 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); cursor: pointer; }
.auto input { accent-color: var(--accent); width: 14px; height: 14px; }
.voice-opts { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.voice-opts select { max-width: 170px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5, 3, 10, .7); color: var(--muted); font: 400 11px var(--font-mono); }
.voice-opts select:focus-visible { outline: 2px solid var(--accent-2); }
.caption { min-height: 4.6em; margin-top: 12px; text-align: left; font-size: 13px; line-height: 1.55; color: var(--ink); opacity: .85; text-shadow: 0 0 14px #05030a, 0 0 4px #05030a; }

@media (max-width: 760px) {
  .tab { letter-spacing: .1em; }
  .card-head .dim { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.speaking .wave i { animation: none; height: 14px; }
  .tab-ink, .drop { transition: none; }
}

/* ---------- intro / loading screen ---------- */
body.booting { overflow: hidden; }
body.booting .title span { animation-play-state: paused; }
#splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: #05030a; overflow: hidden; color: var(--ink); }
.sp-glow { position: absolute; inset: -20%; background: radial-gradient(ellipse 50% 40% at 50% 52%, rgba(155, 107, 255, .28), transparent 70%), radial-gradient(ellipse 30% 22% at 50% 60%, rgba(91, 148, 255, .18), transparent 70%); animation: spGlow 4s ease-in-out infinite alternate; }
@keyframes spGlow { to { transform: scale(1.08); opacity: .8; } }
.sp-stage { position: relative; width: min(560px, 88vw); text-align: center; display: flex; flex-direction: column; align-items: center; }
.sp-sea { width: 100%; height: auto; overflow: hidden; margin-bottom: -6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.sp-wave { stroke-linecap: round; }
.sp-wave.w1 { animation: spDrift 2.6s linear infinite; }
.sp-wave.w2 { animation: spDrift 4.2s linear infinite reverse; }
@keyframes spDrift { to { transform: translateX(100px); } }
.sp-fin-track { animation: spSwim 2.9s cubic-bezier(.45, .05, .25, 1) .35s both; }
@keyframes spSwim { from { transform: translateX(-60px); } to { transform: translateX(700px); } }
.sp-fin { animation: spBob .7s ease-in-out infinite alternate; transform-origin: 0 0; }
@keyframes spBob { from { transform: rotate(-2deg) translateY(0); } to { transform: rotate(3deg) translateY(2px); } }
.sp-wake { opacity: .4; }
.sp-brand { display: flex; justify-content: center; gap: .04em; margin-top: 18px; font: 200 clamp(44px, 10vw, 84px)/1 var(--font-display); letter-spacing: .14em; text-indent: .14em; text-shadow: 0 0 36px rgba(155, 107, 255, .65); }
.sp-brand span { display: inline-block; opacity: 0; transform: translateY(26px) scaleY(1.4); filter: blur(8px); animation: spLetter .9s var(--ease) forwards; }
.sp-brand span:nth-child(1) { animation-delay: 1.0s } .sp-brand span:nth-child(2) { animation-delay: 1.07s } .sp-brand span:nth-child(3) { animation-delay: 1.14s } .sp-brand span:nth-child(4) { animation-delay: 1.21s } .sp-brand span:nth-child(5) { animation-delay: 1.28s }
.sp-brand span:nth-child(7) { animation-delay: 1.4s } .sp-brand span:nth-child(8) { animation-delay: 1.47s } .sp-brand span:nth-child(9) { animation-delay: 1.54s } .sp-brand span:nth-child(10) { animation-delay: 1.61s }
.sp-gap { width: .3em; }
@keyframes spLetter { to { opacity: 1; transform: none; filter: none; } }
.sp-by { margin-top: 14px; font: 400 12px/1 var(--font-mono); letter-spacing: .34em; text-transform: uppercase; color: var(--muted); opacity: 0; animation: spFade .8s ease 2s forwards; }
.sp-by b { color: var(--accent-2); font-weight: 500; text-shadow: 0 0 18px var(--accent); }
.sp-load { width: min(360px, 80vw); margin-top: 38px; opacity: 0; animation: spFade .6s ease 1.5s forwards; }
.sp-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.sp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5b94ff, #d9c2ff); box-shadow: 0 0 14px #9b6bff; }
.sp-meta { display: flex; justify-content: space-between; margin-top: 10px; font: 400 10px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.sp-app { margin-top: 28px; font: 400 10px/1 var(--font-mono); letter-spacing: .5em; color: var(--dim); opacity: 0; animation: spFade .8s ease 2.3s forwards; }
@keyframes spFade { to { opacity: 1; } }
.sp-skip { position: absolute; right: clamp(16px, 4vw, 40px); bottom: clamp(16px, 4vh, 36px); padding: 9px 16px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; font: 400 10px/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; transition: color .2s, border-color .2s; }
.sp-skip:hover, .sp-skip:focus-visible { color: var(--ink); border-color: var(--accent); outline: none; }
/* exit: the screen splits open like a gate, revealing the app */
#splash::before, #splash::after { content: ''; position: absolute; left: 0; right: 0; height: 50.5%; background: #05030a; z-index: 0; transition: transform .9s cubic-bezier(.7, 0, .2, 1); }
#splash::before { top: 0; } #splash::after { bottom: 0; }
#splash .sp-glow, #splash .sp-stage, #splash .sp-skip { z-index: 1; }
#splash.out { background: transparent; pointer-events: none; }
#splash.out::before { transform: translateY(-101%); } #splash.out::after { transform: translateY(101%); }
#splash.out .sp-glow, #splash.out .sp-stage, #splash.out .sp-skip { opacity: 0; transition: opacity .35s ease; }
.credit { font-weight: 400; color: var(--dim); letter-spacing: .12em; }
@media (prefers-reduced-motion: reduce) {
  .sp-fin-track { animation-duration: .01s; animation-delay: 0s; transform: translateX(300px); }
  .sp-brand span, .sp-by, .sp-load, .sp-app { animation-delay: 0s !important; animation-duration: .01s !important; }
  .sp-wave, .sp-fin, .sp-glow { animation: none; }
}
