:root {
  --bg: #090d1a;
  --panel: #11182b;
  --panel-2: #17223b;
  --line: #263452;
  --text: #f4f7ff;
  --muted: #9aa8c7;
  --accent: #76e4c0;
  --accent-2: #8ca7ff;
  --warning: #ffc875;
  --danger: #ff8f9e;
  --shadow: 0 18px 50px rgba(0,0,0,.25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 50% -10%, #1a2851 0, var(--bg) 42rem); min-height: 100vh; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100%, 760px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 0 24px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 14px; font-weight: 900; letter-spacing: .04em; color: #07131c; background: var(--accent); }
.eyebrow { margin: 0 0 3px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 18px; line-height: 1.1; }
h2 { margin-bottom: 12px; font-size: clamp(27px, 7vw, 44px); line-height: 1.04; letter-spacing: -.035em; }
h3 { margin: 0; font-size: 17px; }
.screen { display: none; animation: appear .2s ease-out; }
.screen.active { display: block; }
@keyframes appear { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.hero-card { background: linear-gradient(145deg, rgba(118,228,192,.14), rgba(140,167,255,.1)); border: 1px solid rgba(118,228,192,.22); border-radius: 22px; padding: 28px 22px; margin: 8px 0 26px; box-shadow: var(--shadow); }
.hero-card h2 { margin-top: 18px; }
.hero-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 16px; }
.pill, .boss-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .1em; color: #07131c; background: var(--accent); }
.boss-pill { margin-left: 6px; color: #25180b; background: var(--warning); }
.field-label { display: block; margin: 0 0 8px; color: #d6def2; font-size: 13px; font-weight: 750; }
textarea { width: 100%; color: var(--text); background: rgba(8,13,27,.72); border: 1px solid var(--line); border-radius: 16px; outline: none; resize: vertical; line-height: 1.5; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(118,228,192,.12); }
.jd-input { min-height: 230px; padding: 16px; font-size: 16px; }
.answer-input { min-height: 190px; padding: 15px; font-size: 17px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.primary-button, .secondary-button, .text-button, .icon-button { min-height: 48px; border-radius: 13px; border: 1px solid transparent; font-weight: 800; transition: transform .15s, opacity .15s; }
.primary-button:active, .secondary-button:active, .text-button:active, .icon-button:active { transform: scale(.98); }
.primary-button { flex: 1 1 190px; padding: 12px 18px; color: #06141b; background: var(--accent); }
.secondary-button { flex: 1 1 140px; padding: 12px 18px; color: var(--text); background: var(--panel-2); border-color: var(--line); }
.text-button { display: block; width: 100%; margin-top: 10px; min-height: 44px; color: var(--muted); background: transparent; }
.icon-button { margin-left: auto; padding: 8px 12px; min-height: 44px; color: var(--muted); background: transparent; border-color: var(--line); font-size: 12px; }
.full-width { width: 100%; margin-top: 24px; }
.microcopy, .muted { color: var(--muted); font-size: 12px; line-height: 1.5; }
.notice { padding: 12px 14px; margin-bottom: 14px; border: 1px solid rgba(255,200,117,.3); border-radius: 12px; color: #ffe0a8; background: rgba(255,200,117,.1); font-size: 13px; }
.section-heading, .question-topline, .level-line, .skills-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-heading { margin: 12px 0 20px; align-items: flex-start; }
.xp-chip { white-space: nowrap; padding: 8px 11px; border: 1px solid rgba(118,228,192,.25); border-radius: 10px; color: var(--accent); background: rgba(118,228,192,.08); font-size: 12px; font-weight: 850; }
.overview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
.overview-grid > div, .context-line { min-height: 72px; padding: 13px; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; border-radius: 14px; border: 1px solid var(--line); background: rgba(17,24,43,.76); }
.context-line { min-height: auto; flex-direction: row; align-items: center; margin-bottom: 24px; }
.skill-item .microcopy { margin-top: 8px; font-size: 11px; }
#questionEvidence { margin: -8px 0 15px; }
#resultBreakdown { margin: -10px 0 15px; }
.stat-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.overview-grid strong { font-size: 15px; }
.skills-header { margin-bottom: 10px; }
.skill-list { display: grid; gap: 8px; }
.skill-item { padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: rgba(17,24,43,.72); }
.skill-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.skill-kind { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.bar { height: 6px; overflow: hidden; border-radius: 99px; background: #26324c; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.question-topline { margin: 12px 0 18px; }
.level-line { margin: 0 0 13px; color: var(--muted); font-size: 12px; }
#questionTitle { font-size: clamp(25px, 6vw, 36px); margin-bottom: 15px; }
.question-card { padding: 20px 17px; border-left: 3px solid var(--accent); border-radius: 0 15px 15px 0; color: #f5f7ff; background: var(--panel); font-size: 19px; line-height: 1.45; box-shadow: var(--shadow); }
.answer-wrap { margin-top: 23px; }
.result-banner { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 20px; padding: 16px; border-radius: 16px; background: linear-gradient(100deg, rgba(118,228,192,.15), rgba(140,167,255,.1)); border: 1px solid rgba(118,228,192,.26); }
.result-banner span:first-child { color: var(--accent); font-size: 25px; font-weight: 900; }
.result-banner span:last-child { color: var(--muted); font-size: 12px; }
#resultTitle { font-size: 30px; }
.result-summary { color: var(--muted); line-height: 1.5; }
.score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 18px 0; }
.score-card { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.score-card > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #dce3f6; }
.score-card strong { color: var(--accent); }
.insight-block { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(17,24,43,.7); }
.insight-block p { margin: 6px 0 0; color: #dce3f6; font-size: 14px; line-height: 1.55; }
.insight-label { color: var(--accent); font-size: 10px; letter-spacing: .11em; font-weight: 900; }
.correction { border-color: rgba(255,200,117,.3); }
.correction .insight-label { color: var(--warning); }
.result-actions { margin-top: 22px; }
.footer { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 30px; color: #697895; font-size: 11px; }
@media (min-width: 600px) { .overview-grid { grid-template-columns: repeat(4, 1fr); } .jd-input { min-height: 260px; } .answer-input { min-height: 220px; } }
@media (max-width: 380px) { .app-shell { padding-left: 14px; padding-right: 14px; } .score-grid { grid-template-columns: 1fr; } }
