:root {
  --ink: #07151d;
  --panel: #0d202a;
  --panel-raised: #102b37;
  --line: #294857;
  --muted: #9cafb6;
  --text: #f2f7f6;
  --green: #20c574;
  --green-deep: #0d9f59;
  --cyan: #56d7d8;
  --danger: #ec7f7f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--ink);
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse 72% 48% at 85% -10%, #17424a 0%, transparent 65%), var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 5; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1360px) / 2)); background: rgba(7,21,29,.94); border-bottom: 1px solid rgba(81,123,138,.36); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 850; letter-spacing: .1px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #06120d; background: var(--green); font-weight: 950; letter-spacing: -1px; }
.brand span { color: var(--green); }
.nav { display: flex; height: 100%; align-items: center; gap: 2px; }
.nav button { height: 100%; color: var(--muted); padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 13px; font-weight: 720; }
.nav button:hover, .nav button.active { color: var(--text); border-bottom-color: var(--green); }
.account-button { min-height: 38px; padding: 0 13px; border: 1px solid #34705a; color: #dff8eb; background: rgba(32,197,116,.09); font-weight: 780; font-size: 13px; }
.container { width: min(1280px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 80px; }
.eyebrow { color: var(--green); font-size: 11px; line-height: 1.1; font-weight: 850; letter-spacing: 1.8px; text-transform: uppercase; }
.hero { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(360px, .84fr); gap: 52px; align-items: end; padding: 54px 0 48px; border-bottom: 1px solid var(--line); }
h1 { max-width: 760px; margin: 13px 0 16px; color: #f6fbf9; font-size: clamp(42px, 5.3vw, 76px); line-height: .98; letter-spacing: 0; }
.hero-copy { max-width: 660px; color: #b6c7c9; font-size: 18px; line-height: 1.56; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 29px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 47px; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: 2px; font-size: 14px; font-weight: 800; }
.button.primary { color: #06150d; background: var(--green); }
.button.primary:hover { background: #43d58d; }
.button.secondary { color: #dfe9e9; background: transparent; border-color: #456270; }
.button.ghost { min-height: 36px; padding: 0 10px; color: #b6cbd0; background: transparent; border-color: transparent; }
.button.danger { color: #ffb8b8; background: transparent; border-color: #7b4144; }
.hero-status { padding: 24px; border: 1px solid #37606d; background: linear-gradient(145deg, rgba(20,53,63,.9), rgba(8,27,36,.82)); }
.status-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid rgba(115,160,170,.25); }
.status-title { font-size: 17px; font-weight: 820; }
.pill { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; color: #b9ffda; background: rgba(32,197,116,.14); border: 1px solid rgba(32,197,116,.38); font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.status-lines { display: grid; gap: 13px; margin-top: 21px; }
.status-line { display: flex; justify-content: space-between; gap: 14px; color: #a5b8bd; font-size: 13px; }
.status-line strong { color: #edf5f3; text-align: right; }
.status-rule { margin: 22px 0 0; height: 5px; background: repeating-linear-gradient(90deg, var(--green) 0 28px, transparent 28px 36px); }

.section { margin-top: 48px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 19px; }
h2 { margin: 5px 0 0; font-size: 29px; letter-spacing: 0; }
.section-note { color: var(--muted); font-size: 13px; text-align: right; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { min-height: 220px; padding: 24px; background: rgba(11,31,40,.84); border: 1px solid #294856; border-radius: 3px; }
.card:hover { border-color: #4b7783; background: rgba(15,40,50,.92); }
.card-top { display: flex; align-items: center; justify-content: space-between; color: var(--green); font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.card h3 { margin: 27px 0 10px; font-size: 22px; }
.card p { margin: 0; min-height: 48px; color: #9fb2b8; font-size: 14px; line-height: 1.5; }
.card-link { display: inline-block; margin-top: 25px; color: #d6efe4; font-size: 13px; font-weight: 820; }
.overview { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 18px; }
.panel { padding: 24px; background: rgba(10,28,37,.88); border: 1px solid var(--line); border-radius: 3px; }
.panel h3 { margin: 0; font-size: 19px; }
.panel p { color: var(--muted); line-height: 1.55; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric { padding: 18px 16px 18px 0; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; padding-left: 16px; }
.metric + .metric { padding-left: 16px; }
.metric strong { display: block; color: var(--text); font-size: 29px; }
.metric span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 760; letter-spacing: 1px; }
.limit { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }
.limit:last-child { border-bottom: 0; }
.limit strong { display: block; font-size: 14px; }
.limit span { color: var(--muted); font-size: 12px; }
.route-view { display: none; }
.route-view.active { display: block; }

.workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.side-panel { position: sticky; top: 94px; }
.side-panel h3, .question-panel h3 { margin: 0 0 14px; }
.field { display: grid; gap: 7px; margin-top: 15px; }
.field label { color: #a9bdc2; font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.field input, .field select { width: 100%; min-height: 43px; padding: 0 12px; color: var(--text); background: #091b24; border: 1px solid #345463; border-radius: 2px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--green); }
.choice-grid { display: grid; gap: 10px; margin-top: 21px; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.question-title { margin: 27px 0 23px; max-width: 850px; font-size: 25px; line-height: 1.3; }
.answers { display: grid; gap: 9px; }
.answer { display: flex; align-items: center; min-height: 57px; padding: 10px 14px; color: #e2eded; text-align: left; background: #0b202a; border: 1px solid #355363; border-radius: 2px; }
.answer:hover { border-color: #72a6b1; }
.answer.selected { border-color: var(--green); background: rgba(32,197,116,.1); }
.answer .letter { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; margin-right: 11px; color: #b6c6cb; border: 1px solid #496573; font-size: 12px; font-weight: 900; }
.answer.selected .letter { color: #072316; background: var(--green); border-color: var(--green); }
.quiz-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 27px; }
.progress { height: 4px; margin: 18px 0 4px; background: #223c48; }
.progress > div { height: 100%; background: var(--green); }
.result { padding: 20px; color: #dff8eb; background: rgba(32,197,116,.09); border: 1px solid rgba(32,197,116,.35); }
.hidden { display: none !important; }

.documents { display: grid; gap: 10px; }
.document { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 17px; background: #0b202a; border: 1px solid #2f4c59; }
.document strong { display: block; font-size: 14px; }
.document span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.empty { padding: 38px 20px; color: var(--muted); text-align: center; border: 1px dashed #3a5a67; }

.account-layout { display: grid; grid-template-columns: minmax(0, .86fr) minmax(420px, 1.14fr); gap: 18px; }
.account-details { display: grid; gap: 12px; margin-top: 24px; }
.account-detail { padding: 14px; background: #0a1c25; border: 1px solid #294856; }
.account-detail span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.account-detail strong { display: block; margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }
.message { margin-top: 16px; padding: 12px 14px; color: #d5e4e8; background: rgba(68,113,128,.16); border: 1px solid #3b6170; font-size: 13px; line-height: 1.45; }
.message.error { color: #ffd0d0; background: rgba(151,49,49,.16); border-color: #914c4e; }

.modal-backdrop { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; padding: 20px; background: rgba(0,8,12,.7); backdrop-filter: blur(8px); }
.modal { width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 25px; background: #0b202a; border: 1px solid #436876; box-shadow: 0 25px 80px rgba(0,0,0,.5); }
.modal-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.modal h2 { margin: 5px 0 0; font-size: 27px; }
.modal .switch { display: flex; gap: 10px; margin-top: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.modal .switch button { padding: 0 0 8px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 13px; font-weight: 800; }
.modal .switch button.active { color: var(--text); border-bottom-color: var(--green); }
.close { width: 35px; height: 35px; color: #c5d3d6; background: transparent; border: 1px solid #40616c; font-size: 21px; }
.modal-form { display: grid; gap: 14px; margin-top: 17px; }
.helper { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.footer { width: min(1280px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0; color: #80979f; border-top: 1px solid var(--line); font-size: 12px; }

@media (max-width: 900px) {
  .topbar { padding: 0 20px; }
  .nav { display: none; }
  .container { width: min(100% - 32px, 680px); padding-top: 30px; }
  .hero, .overview, .workspace, .account-layout { grid-template-columns: 1fr; }
  .hero { gap: 25px; padding-top: 28px; }
  .cards { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .section-note { text-align: left; }
}
@media (max-width: 520px) {
  .topbar { height: 62px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 29px; height: 29px; }
  .account-button { min-height: 34px; padding: 0 10px; font-size: 12px; }
  .container, .footer { width: min(100% - 28px, 680px); }
  .metrics { grid-template-columns: 1fr; }
  .metric, .metric + .metric { padding: 13px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  h1 { font-size: 43px; }
  .hero-copy { font-size: 16px; }
  .question-title { font-size: 21px; }
}
