@font-face {
  font-family: "Pretendard Variable";
  src: url("/assets/fonts/PretendardVariable.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 45 920;
}

:root {
  color-scheme: dark;
  --ink: #090b0b;
  --ink-soft: #111514;
  --paper: #f3f0e8;
  --muted: #aab2ae;
  --line: rgba(243, 240, 232, 0.16);
  --mint: #a9f7cf;
  --mint-deep: #55d99b;
  --red: #ff4f4f;
  --magenta: #ff00dc;
  --yellow: #f5e663;
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: clip; background: var(--ink); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  overflow-x: clip;
  background:
    radial-gradient(circle at 12% 3%, rgba(85, 217, 155, 0.12), transparent 28rem),
    radial-gradient(circle at 100% 58%, rgba(255, 0, 220, 0.09), transparent 36rem),
    var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img, canvas, svg { max-width: 100%; }
:where(a, button, input):focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}
.screen [tabindex="-1"]:focus { outline: 0; }

.ambient {
  position: fixed;
  z-index: -2;
  width: 20rem;
  height: 20rem;
  border-radius: 999px;
  filter: blur(120px);
  opacity: .16;
  pointer-events: none;
}
.ambient-a { top: -8rem; left: -6rem; background: var(--mint-deep); }
.ambient-b { right: -10rem; bottom: 0; background: var(--magenta); }
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .055;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, #fff 4px);
  mix-blend-mode: overlay;
}

.topbar, .site-footer {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.topbar { min-height: calc(72px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--paper); border-radius: 50%; font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.locale-switch { display: inline-flex; min-height: 32px; padding: 3px; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; }
.locale-switch a { display: grid; min-width: 42px; min-height: 24px; padding: 0 8px; place-items: center; border-radius: 999px; color: var(--muted); font: 700 9px var(--mono); letter-spacing: .05em; text-decoration: none; }
.locale-switch a:hover { color: var(--paper); }
.locale-switch a[aria-current="page"] { background: var(--mint); color: var(--ink); }
.system-status { display: flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.system-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); animation: pulse 1.8s infinite; }

.app-shell { width: min(1120px, calc(100% - 40px)); min-height: calc(100dvh - 128px); margin: 0 auto; }
.screen { display: none; padding: clamp(44px, 7vw, 92px) 0 70px; animation: reveal .5s cubic-bezier(.2,.8,.2,1) both; }
.screen.is-active { display: block; }
.screen[hidden] { display: none !important; }

.eyebrow { display: flex; gap: 8px; margin-bottom: 22px; }
.eyebrow span, .status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
}
.kicker {
  margin: 0 0 14px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1, h2, h3 { word-break: keep-all; overflow-wrap: normal; }
p { word-break: keep-all; overflow-wrap: break-word; }
h1, h2 { margin: 0; letter-spacing: -.045em; line-height: .96; }
h1 { max-width: 760px; font-size: clamp(58px, 7.25vw, 104px); }
h2 { font-size: clamp(44px, 8vw, 88px); }
h1 em, h2 em { color: var(--red); font-style: normal; }
.no-break { white-space: nowrap; }
.lede { max-width: 610px; margin: 24px 0 0; color: #cbd1ce; font-size: clamp(16px, 2vw, 20px); line-height: 1.65; }

.identity-screen { max-width: 1040px; margin-inline: auto; padding-top: clamp(28px, 5vw, 68px); }
.identity-terminal { position: relative; overflow: hidden; border: 1px solid rgba(169,247,207,.5); background: #030706; box-shadow: 0 34px 110px rgba(0,0,0,.6), 0 0 80px rgba(85,217,155,.055) inset; }
.identity-terminal::before { content: ""; position: absolute; inset: 42px 0 34px; pointer-events: none; opacity: .1; background-image: linear-gradient(rgba(169,247,207,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(169,247,207,.18) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, #000, transparent 76%); }
.identity-titlebar { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; min-height: 42px; padding: 0 15px; align-items: center; border-bottom: 1px solid #26322d; color: #69766f; font: 9px var(--mono); letter-spacing: .09em; }
.identity-titlebar > span:nth-child(2) { justify-self: center; }
.identity-status { display: flex; justify-self: end; align-items: center; gap: 7px; color: var(--mint); }
.identity-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); animation: pulse 1.6s infinite; }
.identity-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr) 270px; }
.identity-main { min-width: 0; padding: clamp(30px, 5vw, 58px); }
.identity-boot { display: grid; margin-bottom: 34px; gap: 5px; color: #5f756a; font: 9px/1.45 var(--mono); }
.identity-boot span:nth-child(2) { color: #8faf9f; }
.identity-boot span:last-child { color: var(--mint); }
.identity-kicker { margin: 0 0 12px; color: var(--mint); font: 700 10px var(--mono); letter-spacing: .15em; }
.identity-main h1 { max-width: 650px; color: var(--paper); font-size: clamp(52px, 7vw, 82px); line-height: .95; }
.identity-main h1 em { color: var(--mint); }
.identity-lede { max-width: 650px; margin: 22px 0 0; color: #abb7b1; font-size: 14px; line-height: 1.65; }
.identity-lede b { color: var(--paper); }
.identity-form { max-width: 640px; margin-top: 30px; }
.identity-form > label { display: block; margin-bottom: 9px; color: #839189; font: 9px var(--mono); }
.identity-form > label span { color: var(--mint); }
.identity-input-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; min-height: 58px; padding: 0 15px; align-items: center; gap: 10px; border: 1px solid #3b594b; background: rgba(169,247,207,.035); box-shadow: 0 0 24px rgba(85,217,155,.035) inset; }
.identity-input-row > span { color: var(--mint); font: 11px var(--mono); }
.identity-input-row input { width: 100%; height: 56px; border: 0; outline: 0; background: transparent; color: var(--paper); caret-color: var(--mint); font: 600 17px var(--mono); }
.identity-input-row input::placeholder { color: #647169; }
.identity-input-row:focus-within { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint) inset, 0 0 30px rgba(85,217,155,.08); }
.identity-input-row > i { width: 7px; height: 16px; background: var(--mint); animation: cursorBlink .9s steps(1) infinite; }
.identity-error { min-height: 19px; margin: 5px 0 0; color: #ff8585; font: 9px/1.5 var(--mono); }
#identity-login { display: flex; width: 100%; min-height: 60px; padding: 0 18px; align-items: center; justify-content: space-between; border: 0; background: var(--mint); color: var(--ink); cursor: pointer; font-weight: 900; transition: filter .2s, transform .2s; }
#identity-login:hover { filter: brightness(1.06); transform: translateY(-1px); }
#identity-login span { font-size: 15px; }
#identity-login small { font: 10px var(--mono); }
.identity-privacy { display: flex; max-width: 640px; margin: 14px 0 0; align-items: flex-start; gap: 9px; color: #7d8a83; font: 9px/1.6 var(--mono); }
.identity-privacy span { flex: 0 0 auto; padding: 2px 4px; border: 1px solid var(--mint-deep); color: var(--mint); }
.analytics-consent { display: grid; margin-top: 12px; padding: 11px 12px; grid-template-columns: 16px 1fr; align-items: start; gap: 10px; border: 1px solid #2b3b33; background: rgba(169,247,207,.025); color: #9facA5; cursor: pointer; }
.analytics-consent input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--mint); }
.analytics-consent b { display: block; color: #d2dbd6; font: 800 9px var(--mono); letter-spacing: .04em; }
.analytics-consent small { display: block; margin-top: 4px; color: #77847e; font: 8px/1.55 var(--mono); }
.analytics-consent:has(input:checked) { border-color: rgba(169,247,207,.55); background: rgba(169,247,207,.06); }
.agent-s-panel { position: relative; overflow: hidden; display: flex; padding: 32px 24px 26px; flex-direction: column; justify-content: end; border-left: 1px solid #26322d; background: linear-gradient(180deg, rgba(169,247,207,.055), rgba(0,0,0,.15)); }
.agent-s-panel::before { content: ""; position: absolute; inset: 0; opacity: .18; background: repeating-linear-gradient(90deg, transparent 0 17px, rgba(169,247,207,.12) 18px); }
.agent-s-portrait { position: relative; width: 150px; height: 205px; margin: 0 auto 30px; filter: drop-shadow(0 0 24px rgba(169,247,207,.12)); }
.agent-head { position: absolute; top: 0; left: 42px; width: 68px; height: 82px; border: 1px solid #547063; border-radius: 48% 48% 42% 42%; background: #0b110e; }
.agent-head::before { content: ""; position: absolute; left: 12px; top: 36px; width: 44px; height: 12px; border: 2px solid #7aa88f; border-radius: 2px 2px 8px 8px; box-shadow: 0 0 12px rgba(169,247,207,.18); }
.agent-head i { position: absolute; top: 40px; width: 14px; height: 4px; background: var(--mint); opacity: .65; }
.agent-head i:first-child { left: 18px; }
.agent-head i:last-child { right: 18px; }
.agent-suit { position: absolute; left: 12px; bottom: 0; width: 128px; height: 135px; clip-path: polygon(25% 0,75% 0,100% 28%,88% 100%,12% 100%,0 28%); border: 1px solid #44574e; background: linear-gradient(135deg, #151b18 49%, #080b0a 50%); }
.agent-suit::before, .agent-suit::after { content: ""; position: absolute; top: 0; width: 42px; height: 75px; background: #d9e0dc; clip-path: polygon(0 0,100% 0,50% 100%); opacity: .78; }
.agent-suit::before { left: 20px; }
.agent-suit::after { right: 20px; }
.agent-suit i { position: absolute; z-index: 1; left: 57px; top: 20px; width: 14px; height: 72px; background: var(--mint); clip-path: polygon(50% 0,100% 14%,70% 100%,30% 100%,0 14%); opacity: .8; }
.agent-s-label { position: relative; color: var(--mint); font: 8px var(--mono); letter-spacing: .13em; }
.agent-s-panel p { position: relative; margin: 11px 0 18px; color: #9eaaa4; font: 11px/1.65 var(--mono); }
.agent-s-panel p b { color: #ff7777; }
.agent-s-trace { position: relative; display: flex; height: 34px; align-items: end; gap: 5px; }
.agent-s-trace i { width: 100%; height: 30%; background: var(--mint); opacity: .35; animation: signalJump 1.2s ease-in-out infinite alternate; }
.agent-s-trace i:nth-child(2n) { height: 85%; animation-delay: -.6s; }
.agent-s-trace i:nth-child(3n) { height: 55%; animation-delay: -.25s; }
.identity-footer { position: relative; z-index: 1; display: flex; min-height: 34px; padding: 0 15px; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #26322d; color: #506059; font: 8px var(--mono); letter-spacing: .06em; }

.landing { position: relative; isolation: isolate; }
.landing::before { content: ""; position: absolute; z-index: -1; top: 14px; right: -8vw; width: 62%; height: 520px; opacity: .2; background-image: linear-gradient(rgba(169,247,207,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(169,247,207,.18) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(circle at 55% 45%, #000, transparent 72%); transform: perspective(600px) rotateY(-8deg); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); gap: 34px; align-items: end; }
.hero-command { display: flex; width: fit-content; max-width: 100%; min-height: 38px; margin-top: 20px; padding: 0 12px; align-items: center; gap: 8px; border: 1px solid rgba(169,247,207,.3); background: rgba(3,9,7,.7); box-shadow: 0 0 32px rgba(85,217,155,.08) inset; color: #d8dfdb; font: 10px var(--mono); white-space: nowrap; }
.hero-command span { color: var(--mint); }
.hero-command code { overflow: hidden; text-overflow: ellipsis; }
.hero-command i, .tui-commandline i { width: 7px; height: 14px; background: var(--mint); animation: cursorBlink .9s steps(1) infinite; }
.mascot-frame { position: relative; justify-self: end; width: min(100%, 360px); transform: rotate(2deg); filter: drop-shadow(0 24px 50px rgba(0,0,0,.48)); animation: mascotHover 4s ease-in-out infinite; }
.mascot-frame img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); filter: saturate(.86) contrast(1.05); }
.mascot-frame::after { content: ""; position: absolute; inset: 10px 0 -10px 10px; z-index: -1; border: 1px solid var(--mint); }
.mascot-stamp { position: absolute; z-index: 1; top: 14px; left: -24px; padding: 8px 12px; transform: rotate(-7deg); border: 2px solid var(--red); color: var(--red); background: var(--ink); font: 800 10px var(--mono); letter-spacing: .12em; }
.mascot-hud { position: absolute; right: -20px; bottom: 18px; display: grid; gap: 4px; padding: 9px 11px; border: 1px solid rgba(169,247,207,.5); background: rgba(3,7,6,.88); box-shadow: 0 12px 30px rgba(0,0,0,.34); color: #cad2ce; font: 8px var(--mono); letter-spacing: .08em; }
.mascot-hud span { display: grid; grid-template-columns: 42px auto; gap: 8px; }
.mascot-hud b { color: var(--mint); }

.permission-card { width: min(680px, 100%); margin-top: 28px; border: 1px solid rgba(255,79,79,.58); background: rgba(10,12,12,.92); box-shadow: 0 24px 80px rgba(0,0,0,.45); backdrop-filter: blur(16px); }
.window-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 42px; padding: 0 15px; border-bottom: 1px solid var(--line); color: var(--muted); font: 10px var(--mono); }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #4a4e4c; }
.window-dots i:first-child { background: var(--red); }
.window-bar .risk { justify-self: end; color: var(--red); }
.permission-body { display: flex; gap: 14px; align-items: center; padding: 22px 24px 14px; }
.permission-body strong { font-size: 15px; }
.permission-body p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.agent-avatar { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--mint); color: var(--ink); font: 900 18px var(--mono); }
.scope-list { margin: 0; padding: 0 24px 22px; list-style: none; }
.scope-list li { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.scope-list li span { color: var(--muted); }
.scope-list li b { color: var(--paper); font-family: var(--mono); font-size: 11px; }

.primary, .secondary, .ethics-choice, .text-button { cursor: pointer; border: 0; }
.primary { display: flex; width: calc(100% - 48px); min-height: 68px; margin: 0 24px 24px; padding: 13px 18px; flex-direction: column; align-items: center; justify-content: center; border-radius: 2px; font-weight: 900; transition: transform .2s, filter .2s; }
.primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.primary:active { transform: translateY(1px); }
.primary span { font-size: 16px; }
.primary small { margin-top: 4px; opacity: .86; font: 11px var(--mono); }
.danger { background: var(--red); color: #170808; box-shadow: 0 0 0 1px #ff8e8e inset, 0 10px 34px rgba(255,79,79,.17); }
.mint { width: 100%; margin: 0; background: var(--mint); color: var(--ink); }
.trust-stack { display: grid; width: min(680px, 100%); gap: 10px; margin-top: 14px; }
.safety-note { display: flex; gap: 10px; margin: 0; align-items: flex-start; color: #c3cbc7; font-size: 12px; line-height: 1.55; }
.safety-note span { flex: 0 0 auto; padding: 3px 5px; border: 1px solid var(--mint-deep); color: var(--mint); font: 10px var(--mono); }
.purpose-note { display: grid; grid-template-columns: auto 1fr; padding: 13px 15px; align-items: start; gap: 14px; border-left: 2px solid var(--mint); background: rgba(169,247,207,.055); }
.purpose-note > span { color: var(--mint); font: 700 10px/1.6 var(--mono); white-space: nowrap; }
.purpose-note p { margin: 0; color: #d5dad7; font-size: 13px; line-height: 1.6; }

.terminal-screen { max-width: 900px; margin-inline: auto; }
.terminal-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.terminal-percent { color: var(--mint); font: clamp(36px, 8vw, 92px) var(--mono); letter-spacing: -.08em; }
.progress-track { height: 4px; margin: 34px 0 18px; overflow: hidden; background: #252a28; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--mint); box-shadow: 0 0 20px var(--mint); transition: width .42s ease; }
.terminal-window { min-height: 360px; border: 1px solid var(--line); background: rgba(0,0,0,.68); }
.terminal-log { min-height: 310px; padding: 24px; color: #c5ceca; font: clamp(12px, 2vw, 15px)/1.75 var(--mono); }
.log-line { opacity: 0; transform: translateY(8px); animation: logIn .25s forwards; }
.log-line .command { color: var(--mint); }
.log-line .fail { color: var(--red); }
.log-line .warn { color: var(--yellow); }
.terminal-warning { color: var(--muted); font: 10px var(--mono); text-align: center; }

.choice-screen { max-width: 1040px; margin-inline: auto; padding-top: clamp(28px, 4vw, 52px); }
.tui-window { overflow: hidden; border: 1px solid rgba(169,247,207,.45); background: #050807; box-shadow: 0 30px 100px rgba(0,0,0,.56), 0 0 60px rgba(85,217,155,.06) inset; font-family: var(--mono); }
.tui-titlebar { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 42px; padding: 0 15px; align-items: center; border-bottom: 1px solid #26322d; color: #77847e; font-size: 9px; letter-spacing: .08em; }
.tui-titlebar > span:nth-child(2) { justify-self: center; }
.tui-secure { display: flex; justify-self: end; align-items: center; gap: 7px; color: var(--mint); }
.tui-secure i, .tui-statusbar > span:first-child i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.tui-statusbar { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 38px; padding: 0 16px; align-items: center; background: rgba(169,247,207,.06); color: #7f8d86; font-size: 9px; letter-spacing: .07em; }
.tui-statusbar span { display: flex; align-items: center; gap: 7px; }
.tui-statusbar span:nth-child(2) { justify-self: center; color: var(--paper); font-weight: 800; }
.tui-statusbar span:last-child { justify-self: end; color: var(--mint); }
.dilemma-progress-track { height: 2px; overflow: hidden; background: #17201c; }
.dilemma-progress-track i { display: block; width: 33.333%; height: 100%; background: var(--mint); box-shadow: 0 0 12px var(--mint); transition: width .25s ease; }
.tui-body { display: grid; grid-template-columns: minmax(0,1fr) 190px; border-bottom: 1px solid #26322d; }
.tui-transcript { height: clamp(300px, 42vh, 430px); overflow-y: auto; padding: 22px 24px 34px; scroll-behavior: smooth; color: #aebbb5; scrollbar-color: #405148 #09100d; }
.tui-handshake { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px dashed #26322d; }
.tui-history { margin: 0 0 18px; border: 1px solid #26322d; background: rgba(169,247,207,.025); }
.tui-history summary { min-height: 38px; padding: 0 12px; color: #839189; cursor: pointer; font: 9px var(--mono); line-height: 38px; letter-spacing: .07em; }
.tui-history ol { display: grid; margin: 0; padding: 0 12px 12px; gap: 7px; list-style: none; }
.tui-history li { display: flex; padding-top: 7px; justify-content: space-between; gap: 12px; border-top: 1px solid #202b26; color: #96a39d; font: 9px/1.45 var(--mono); }
.tui-history li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tui-history li b { flex: 0 0 auto; color: var(--mint); font-weight: 700; }
.tui-line { margin: 5px 0; color: #7e8b85; font: 11px/1.55 var(--mono); word-break: break-word; }
.tui-line span { color: var(--mint); font-weight: 800; }
.tui-warn span, .tui-cost span { color: var(--red); }
.tui-ok span { color: var(--mint); }
.tui-human { color: var(--paper); }
.tui-human span { color: var(--yellow); }
.tui-cost { margin-left: 0; color: #a88f8f; }
.tui-exchange { padding-top: 8px; animation: terminalReveal .28s ease both; }
.tui-exchange:not(.is-current) { opacity: .58; }
.tui-exchange h2 { max-width: 720px; margin: 16px 0 12px; color: #e8ece9; font: 750 clamp(23px, 3.4vw, 38px)/1.25 var(--font); letter-spacing: -.025em; }
.tui-brief { color: #d3d8d5; }
.tui-brief span { color: #ff8b8b; }
.tui-instruction { margin: 0; color: var(--yellow); font: 10px/1.55 var(--mono); }
.tui-response { margin: 18px 0 22px; padding: 11px 14px; border-left: 2px solid var(--yellow); background: rgba(245,230,99,.04); animation: terminalReveal .2s ease both; }
.tui-monitor { display: flex; padding: 18px 15px; flex-direction: column; align-items: center; border-left: 1px solid #26322d; background: linear-gradient(180deg, rgba(169,247,207,.045), transparent); }
.tui-monitor-label { align-self: stretch; color: #63716a; font: 8px var(--mono); letter-spacing: .1em; text-align: center; }
.tui-ring { display: grid; width: 104px; height: 104px; margin: 20px 0; place-items: center; grid-template-columns: auto auto; align-content: center; border: 1px solid #355446; border-radius: 50%; box-shadow: 0 0 0 8px rgba(169,247,207,.025), 0 0 36px rgba(85,217,155,.08) inset; color: var(--mint); }
.tui-ring b { font: 34px var(--mono); letter-spacing: -.09em; }
.tui-ring small { align-self: end; margin-bottom: 4px; font-size: 9px; }
.tui-monitor dl { width: 100%; margin: 0; }
.tui-monitor dl div { display: flex; padding: 8px 0; justify-content: space-between; gap: 8px; border-top: 1px solid #202b26; font-size: 8px; }
.tui-monitor dt { color: #66736d; }
.tui-monitor dd { margin: 0; color: #bcc6c1; }
.tui-signal { display: flex; width: 100%; height: 50px; margin-top: auto; align-items: end; justify-content: space-between; gap: 4px; }
.tui-signal i { width: 100%; background: var(--mint); opacity: .45; animation: signalJump 1.4s ease-in-out infinite alternate; }
.tui-signal i:nth-child(3n+1) { height: 24%; animation-delay: -.4s; }
.tui-signal i:nth-child(3n+2) { height: 62%; animation-delay: -.9s; }
.tui-signal i:nth-child(3n) { height: 92%; animation-delay: -.2s; }
.tui-commandline { display: flex; min-height: 42px; padding: 0 16px; align-items: center; gap: 8px; border-bottom: 1px solid #26322d; color: #aeb8b3; font: 10px var(--mono); }
.tui-commandline span { color: var(--mint); }
.ethics-choices { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: #26322d; }
.ethics-choice { display: grid; grid-template-columns: auto 1fr auto; min-height: 132px; padding: 16px; align-items: start; gap: 10px; border: 0; background: #080c0a; color: var(--paper); text-align: left; transition: background .2s, box-shadow .2s; }
.ethics-choice:hover { z-index: 1; background: #0e1813; box-shadow: 0 0 0 1px var(--mint) inset; }
.ethics-choice:disabled { cursor: default; opacity: .48; }
.choice-index { color: var(--mint); font: 10px var(--mono); }
.ethics-choice b { display: block; font-size: 13px; line-height: 1.45; }
.ethics-choice small { display: block; margin-top: 9px; color: #78847e; font: 9px/1.5 var(--mono); }
.ethics-choice small em { display: block; margin-bottom: 2px; color: #ff7777; font-style: normal; font-weight: 800; }
.ethics-choice > i { color: var(--mint); font-size: 16px; font-style: normal; }
.tui-footer { display: flex; min-height: 34px; padding: 0 16px; align-items: center; justify-content: space-between; gap: 16px; color: #56625c; font: 8px var(--mono); }

.result-screen { max-width: 1040px; margin-inline: auto; }
.result-heading { display: flex; margin-bottom: 42px; align-items: start; justify-content: space-between; gap: 20px; }
.status-pill { color: var(--mint); border-color: var(--mint-deep); white-space: nowrap; }
.credential-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 24px; align-items: start; }
.credential-card { position: relative; overflow: hidden; display: flex; min-height: 650px; flex-direction: column; border: 1px solid rgba(169,247,207,.55); background: var(--paper); color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.4); }
.credential-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .055; background: repeating-linear-gradient(135deg, #000 0, #000 1px, transparent 1px, transparent 9px); }
.credential-topline, .credential-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 14px; padding: 18px 20px; background: var(--ink); color: var(--paper); font: 9px var(--mono); letter-spacing: .08em; }
.credential-visual { position: relative; height: 260px; overflow: hidden; background: var(--magenta); }
.credential-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; filter: saturate(.82) contrast(1.08); }
.credential-sigil { position: absolute; right: 18px; bottom: 16px; display: grid; width: 68px; height: 68px; place-items: center; border: 4px solid var(--paper); border-radius: 50%; background: var(--red); color: var(--paper); font: 900 28px var(--mono); box-shadow: 0 6px 0 var(--ink); }
.credential-copy { position: relative; z-index: 1; padding: 24px 26px 18px; }
.credential-label, .owner-line span { color: #616966; font: 9px var(--mono); letter-spacing: .12em; }
.credential-copy h3 { max-width: 470px; margin: 9px 0 10px; font-size: clamp(29px, 5vw, 45px); line-height: 1.02; letter-spacing: -.035em; }
.credential-copy p { min-height: 45px; margin: 0; color: #3f4643; font-size: 14px; line-height: 1.55; }
.type-lockup { display: grid; margin-top: 17px; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-lockup > span { display: grid; min-height: 70px; padding: 11px 13px; align-content: center; gap: 5px; border: 1px solid rgba(0,0,0,.15); background: #e3e1da; }
.type-lockup small { color: #59615d; font: 8px var(--mono); letter-spacing: .11em; }
.type-lockup strong { font: 900 17px var(--mono); }
.owner-line { display: flex; margin-top: 17px; padding-top: 15px; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid rgba(0,0,0,.16); }
.owner-line strong { font-size: 13px; }
.stats-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0 26px 24px; gap: 8px; }
.stats-grid div { padding: 13px; border: 1px solid rgba(0,0,0,.14); }
.stats-grid dt { color: #4f5753; font-size: 10px; }
.stats-grid dd { margin: 6px 0 0; font: 800 19px var(--mono); }
.credential-footer { margin-top: auto; background: var(--mint); color: var(--ink); }
.credential-card[data-tier="WATCH"] .credential-footer { background: var(--yellow); }
.credential-card[data-tier="HIGH RISK"] .credential-footer { background: #ff914d; }
.credential-card[data-tier="CRITICAL"] .credential-footer { background: var(--red); }
.result-heading[data-tier="WATCH"] .status-pill { border-color: var(--yellow); color: var(--yellow); }
.result-heading[data-tier="HIGH RISK"] .status-pill { border-color: #ff914d; color: #ffb07b; }
.result-heading[data-tier="CRITICAL"] .status-pill { border-color: var(--red); color: #ff8a8a; }

.assessment-stack { display: grid; gap: 16px; }
.assessment-panel { padding: 24px; border: 1px solid var(--line); background: rgba(17,21,20,.82); }
.assessment-panel h3, .recovery-panel h3 { margin: 0; font-size: clamp(25px, 3vw, 35px); line-height: 1.05; letter-spacing: -.035em; }
.axis-results { display: grid; margin-top: 22px; gap: 18px; }
.axis-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
.axis-heading { display: flex; grid-column: 1 / -1; align-items: baseline; justify-content: space-between; gap: 12px; }
.axis-heading span { color: #aeb8b3; font-size: 12px; }
.axis-heading strong { color: var(--mint); font: 800 10px var(--mono); text-align: right; }
.axis-row.is-negative .axis-heading strong, .axis-row.is-negative > small { color: #ff8585; }
.axis-track { position: relative; height: 6px; align-self: center; background: #28312d; }
.axis-track::after { content: ""; position: absolute; z-index: 2; top: -4px; bottom: -4px; left: 50%; width: 1px; background: #78827d; }
.axis-track i { position: absolute; top: 0; height: 100%; background: var(--mint); }
.axis-row.is-negative .axis-track i { background: var(--red); }
.axis-track b { position: absolute; z-index: 3; top: 50%; width: 12px; height: 12px; transform: translate(-50%,-50%); border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); }
.axis-row > small { color: var(--mint); font: 800 11px var(--mono); }
.evidence-list { display: grid; margin: 20px 0 0; padding: 0; gap: 10px; list-style: none; }
.evidence-list li { display: grid; padding: 12px 13px; gap: 5px; border-left: 2px solid #63736b; background: rgba(255,255,255,.025); }
.evidence-list span { color: #79857f; font: 8px/1.45 var(--mono); letter-spacing: .04em; }
.evidence-list strong { color: #d8dfdc; font-size: 11px; line-height: 1.5; }
.agent-verdict { margin: 18px 0 0; padding: 15px 16px; border: 1px solid rgba(255,79,79,.35); color: #ff9a9a; font: 11px/1.65 var(--mono); }
.recovery-panel { display: grid; margin-top: 24px; padding: clamp(22px,4vw,36px); grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr); align-items: start; gap: 26px; border: 1px solid rgba(245,230,99,.35); background: rgba(245,230,99,.035); }
.recovery-list { display: grid; margin: 0; padding: 0; gap: 9px; list-style: none; }
.recovery-list li { display: grid; min-height: 64px; padding: 12px 14px; grid-template-columns: 34px 1fr; align-items: center; gap: 12px; border: 1px solid var(--line); background: #0c100e; }
.recovery-list li > span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--yellow); color: var(--yellow); font: 900 12px var(--mono); }
.recovery-list p { margin: 0; color: #d2d8d5; font-size: 12px; line-height: 1.55; }

.profile-panel { border: 1px solid var(--line); background: rgba(17,21,20,.82); }
.profile-panel label { font-size: 13px; font-weight: 800; }
.profile-panel label span { color: var(--muted); font-weight: 400; }
.name-field { display: grid; grid-template-columns: 1fr auto; margin-top: 10px; border: 1px solid var(--line); }
.name-field input { min-width: 0; height: 52px; padding: 0 14px; border: 0; outline: 0; background: transparent; color: var(--paper); }
.name-field input::placeholder { color: #bbc2be; opacity: 1; }
.name-field input:focus-visible { box-shadow: 0 0 0 2px var(--mint) inset; outline: 0; }
.name-field button { width: 64px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--mint); cursor: pointer; font-size: 12px; }
.share-spotlight { padding: 28px; }
.share-eyebrow { margin: 0 0 13px; color: var(--mint); font: 700 10px var(--mono); letter-spacing: .13em; }
.share-spotlight h3 { margin: 0; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.03; letter-spacing: -.04em; }
.share-description { margin: 16px 0 22px; color: #bdc5c1; font-size: 13px; line-height: 1.6; }
.share-primary { display: flex; width: 100%; min-height: 74px; padding: 13px 18px; flex-direction: column; align-items: center; justify-content: center; border: 0; border-radius: 2px; background: var(--mint); color: var(--ink); cursor: pointer; font-weight: 900; transition: transform .2s, filter .2s; }
.share-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.share-primary span { font-size: 16px; }
.share-primary small { margin-top: 5px; font: 10px var(--mono); opacity: .7; }
.share-open { border-color: rgba(169,247,207,.45); }
.share-panel { margin-top: 24px; }
.messenger-actions { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(220px,.7fr); gap: 9px; }
.messenger-actions .share-open { min-height: 74px; }
.professional-actions { display: grid; margin-top: 9px; grid-template-columns: 1fr 1fr; gap: 9px; }
.share-guide { margin: 14px 0 0; color: #8f9994; font: 9px/1.5 var(--mono); text-align: center; }
.share-guide b { color: var(--mint); }
.share-guide span { padding-inline: 5px; }
.export-tools { border-top: 1px solid var(--line); }
.export-tools summary { display: flex; min-height: 56px; padding: 0 20px; align-items: center; justify-content: space-between; color: #c5cdc9; cursor: pointer; font-size: 12px; list-style: none; }
.export-tools summary::-webkit-details-marker { display: none; }
.export-tools summary span { color: var(--mint); font: 18px var(--mono); transition: transform .2s; }
.export-tools[open] summary { border-bottom: 1px solid var(--line); }
.export-tools[open] summary span { transform: rotate(45deg); }
.export-body { padding: 20px; }
.export-body > p { margin: 10px 0 18px; color: #9fa8a3; font-size: 11px; line-height: 1.55; }
.export-identity { display: grid; margin-bottom: 18px; padding: 13px 14px; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; border: 1px solid var(--line); background: rgba(169,247,207,.035); }
.export-identity > span { color: var(--mint); font: 8px var(--mono); letter-spacing: .1em; }
.export-identity strong { grid-column: 1 / -1; font-size: 15px; }
.export-identity .inline-action { grid-column: 2; grid-row: 1; min-height: 24px; margin: 0; font: 9px var(--mono); }
.inline-action { min-height: 32px; margin: 2px 0 0 4px; padding: 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--mint); cursor: pointer; font-size: inherit; }
.export-actions { display: grid; gap: 7px; }
.secondary { display: flex; min-height: 52px; padding: 0 15px; align-items: center; justify-content: space-between; border: 1px solid var(--line); background: transparent; color: var(--paper); font-size: 12px; text-decoration: none; transition: background .2s, border-color .2s; }
.secondary:hover { border-color: var(--mint); background: rgba(169,247,207,.06); }

.infection-panel { margin-top: 24px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(169,247,207,.07), rgba(255,0,220,.05)); }
.infection-summary { display: flex; min-height: 116px; padding: 28px clamp(24px, 5vw, 46px); align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; list-style: none; }
.infection-summary::-webkit-details-marker { display: none; }
.infection-summary .kicker { display: block; margin-bottom: 8px; }
.infection-summary strong { font-size: clamp(26px, 4vw, 40px); line-height: 1; letter-spacing: -.035em; }
.disclosure-label { display: flex; min-width: 92px; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font: 10px var(--mono); white-space: nowrap; }
.disclosure-label i { color: var(--mint); font-size: 20px; font-style: normal; transition: transform .2s; }
.infection-panel[open] .disclosure-label i { transform: rotate(45deg); }
.infection-content { display: grid; grid-template-columns: 1fr auto; padding: 0 clamp(24px, 5vw, 46px) clamp(24px, 5vw, 40px); gap: 30px; align-items: center; }
.infection-content > div > p { max-width: 500px; margin-top: 0; color: var(--muted); font-size: 13px; }
.infection-actions { display: flex; margin-top: 24px; gap: 9px; flex-wrap: wrap; }
.light { width: auto; min-height: 46px; }
.qr-shell { display: grid; min-width: 208px; padding: 14px; place-items: center; background: var(--paper); color: var(--ink); }
#qr-code { display: grid; width: 180px; height: 180px; place-items: center; }
#qr-code img, #qr-code canvas { display: block; width: 180px !important; height: 180px !important; }
.qr-shell > span { margin-top: 10px; font: 10px var(--mono); }
.result-disclaimer { display: grid; grid-template-columns: auto 1fr; margin-top: 24px; padding: 17px 20px; gap: 20px; border: 1px solid var(--line); color: #c0c7c4; font-size: 12px; }
.result-disclaimer b { color: var(--yellow); font: 11px var(--mono); white-space: nowrap; }
.result-disclaimer p { margin: 0; line-height: 1.5; }
.text-button { display: block; min-height: 44px; margin: 24px auto 0; padding: 10px 14px; background: transparent; color: #bac2be; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }

.site-footer { min-height: 56px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: #969e9a; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px)); max-width: calc(100% - 30px); padding: 12px 16px; transform: translate(-50%, 20px); border: 1px solid var(--mint); background: var(--ink); color: var(--mint); box-shadow: 0 12px 40px #000; opacity: 0; pointer-events: none; font-size: 12px; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes logIn { to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .25; box-shadow: 0 0 2px var(--mint); } }
@keyframes cursorBlink { 50% { opacity: 0; } }
@keyframes mascotHover { 50% { transform: rotate(1deg) translateY(-7px); } }
@keyframes terminalReveal { from { opacity: 0; transform: translateY(5px); } }
@keyframes signalJump { to { height: 18%; opacity: .2; } }

@media (max-width: 760px) {
  .topbar, .site-footer, .app-shell { width: min(100% - 28px, 1120px); }
  .topbar { min-height: calc(58px + env(safe-area-inset-top)); }
  .system-status { font-size: 9px; }
  .topbar-actions { gap: 8px; }
  .locale-switch a { min-width: 36px; padding-inline: 6px; }
  .screen { padding: 34px 0 54px; }
  .identity-screen { width: calc(100% + 8px); margin-left: -4px; padding-top: 22px; }
  .identity-titlebar { grid-template-columns: 1fr auto; padding-inline: 11px; }
  .identity-titlebar > span:nth-child(2) { display: none; }
  .identity-grid { grid-template-columns: 1fr; }
  .identity-main { padding: 24px 16px 22px; }
  .identity-boot { margin-bottom: 24px; font-size: 8px; }
  .identity-main h1 { font-size: clamp(48px, 14vw, 62px); }
  .identity-lede { margin-top: 18px; font-size: 13px; }
  .identity-form { margin-top: 22px; }
  .identity-input-row input { font-size: 16px; }
  .agent-s-panel { display: grid; min-height: 154px; padding: 18px 16px; grid-template-columns: 92px 1fr; grid-template-rows: auto auto 34px; align-items: center; border-top: 1px solid #26322d; border-left: 0; }
  .agent-s-portrait { width: 90px; height: 120px; margin: 0; grid-row: 1 / 4; transform: scale(.56); transform-origin: left top; }
  .agent-s-label { align-self: end; }
  .agent-s-panel p { align-self: start; margin: 7px 0 5px; }
  .agent-s-trace { height: 24px; }
  .identity-footer span:last-child { display: none; }
  .hero-grid { display: flex; gap: 0; flex-direction: column; }
  .hero-copy { display: contents; }
  .hero-copy .kicker { order: 1; }
  .hero-copy h1 { order: 2; }
  .mascot-frame { order: 3; width: 140px; margin: -16px 0 8px auto; transform: none; opacity: .92; }
  .hero-copy .lede { order: 4; margin-top: 0; }
  .hero-command { order: 5; width: 100%; margin-top: 14px; font-size: 9px; }
  .mascot-stamp { left: -16px; font-size: 8px; }
  .mascot-hud { right: -2px; bottom: 2px; transform: scale(.78); transform-origin: right bottom; }
  .permission-card { position: relative; z-index: 3; margin-top: 20px; }
  .window-bar { grid-template-columns: 1fr auto; }
  .window-bar > span:nth-child(2) { display: none; }
  .window-bar .risk { display: block; }
  .primary { width: calc(100% - 32px); margin-inline: 16px; }
  .permission-body { padding: 16px 16px 12px; }
  .scope-list { padding: 0 16px 16px; }
  .scope-list li { padding-block: 9px; }
  .terminal-header { align-items: start; }
  .terminal-window { min-height: 330px; }
  .terminal-log { min-height: 278px; padding: 18px 14px; }
  .choice-screen { width: calc(100% + 8px); min-height: calc(100dvh - 58px - env(safe-area-inset-top)); margin-left: -4px; padding-top: 22px; }
  .tui-titlebar { grid-template-columns: 1fr auto; padding-inline: 11px; }
  .tui-titlebar > span:nth-child(2) { display: none; }
  .tui-statusbar { grid-template-columns: 1fr auto; padding-inline: 11px; }
  .tui-statusbar > span:first-child { display: none; }
  .tui-statusbar span:nth-child(2) { justify-self: start; }
  .tui-body { grid-template-columns: 1fr; }
  .tui-transcript { height: clamp(285px, 40dvh, 350px); padding: 17px 14px 24px; }
  .tui-monitor { display: none; }
  .tui-exchange h2 { font-size: clamp(22px, 6.8vw, 28px); line-height: 1.3; }
  .tui-commandline { padding-inline: 11px; font-size: 9px; }
  .ethics-choices { grid-template-columns: 1fr; }
  .ethics-choice { grid-template-columns: 30px 1fr auto; min-height: 94px; padding: 13px 10px; gap: 9px; }
  .ethics-choice:hover { transform: none; }
  .ethics-choice i { font-size: 19px; }
  .tui-footer { padding-inline: 11px; }
  .tui-footer span:last-child { display: none; }
  .result-heading { display: block; }
  .result-heading .no-break { white-space: normal; }
  .result-heading .status-pill { display: inline-block; margin-top: 18px; }
  .credential-layout { grid-template-columns: 1fr; }
  .credential-card { min-height: 650px; }
  .credential-visual { height: 240px; }
  .assessment-stack { margin-top: 0; }
  .recovery-panel { grid-template-columns: 1fr; gap: 18px; }
  .share-spotlight { padding: 24px 20px; }
  .share-spotlight h3 { font-size: 32px; }
  .messenger-actions, .professional-actions { grid-template-columns: 1fr; }
  .infection-summary { min-height: 94px; padding: 22px 20px; }
  .infection-summary strong { font-size: 25px; }
  .infection-content { grid-template-columns: 1fr; padding: 0 20px 24px; }
  .qr-shell { justify-self: center; }
  .result-disclaimer { grid-template-columns: 1fr; gap: 8px; }
  .site-footer { display: grid; padding-top: 12px; gap: 4px; align-content: center; font-size: 10px; line-height: 1.45; }
  .toast { top: max(68px, calc(env(safe-area-inset-top) + 62px)); bottom: auto; width: max-content; transform: translate(-50%, -12px); }
  .toast.is-visible { transform: translate(-50%, 0); }
}

@media (max-width: 390px) {
  .system-status { display: none; }
  h1 { font-size: clamp(46px, 15.7vw, 52px); }
  h2 { font-size: clamp(37px, 12.4vw, 41px); }
  .eyebrow span { font-size: 9px; padding: 6px 8px; }
  .mascot-frame { width: 128px; }
  .lede { font-size: 15px; line-height: 1.55; }
  .credential-copy { padding-inline: 20px; }
  .credential-copy h3 { font-size: 31px; }
  .credential-topline, .credential-footer { font-size: 9px; line-height: 1.4; }
  .purpose-note { grid-template-columns: 1fr; gap: 4px; }
  .type-lockup { grid-template-columns: 1fr; }
  .infection-actions { display: grid; }
  .disclosure-label { min-width: auto; }
  .disclosure-label { font-size: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  body { background: #fff; }
  body > * { display: none !important; }
  #export-canvas { display: block !important; width: 100%; height: auto; }
}
