:root {
  --ink: #10233f;
  --muted: #5e6f86;
  --paper: #fffdf7;
  --cream: #fff8df;
  --white: #ffffff;
  --cyan: #20c8db;
  --cyan-dark: #057e98;
  --yellow: #ffd74a;
  --coral: #ff7568;
  --violet: #8167ed;
  --green: #53c889;
  --line: #dfe8ec;
  --shadow: 0 18px 50px rgba(26, 62, 91, 0.12);
  --small-shadow: 0 8px 24px rgba(26, 62, 91, 0.10);
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, rgba(32, 200, 219, .18), transparent 25rem),
    radial-gradient(circle at 92% 9%, rgba(255, 215, 74, .30), transparent 25rem),
    linear-gradient(180deg, #fffdf4 0%, #f4fbfc 48%, #fff9e9 100%);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}
body.registration-required { overflow: hidden; }

button, input { font: inherit; }
button { color: inherit; }
a { color: var(--cyan-dark); }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 50; padding: .7rem 1rem; background: var(--ink); color: white; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.page-shell { min-height: 100vh; }
.site-header {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(4px 5px 0 rgba(32, 200, 219, .35)); }
.brand-copy { display: grid; }
.brand-copy strong { font: 700 1.08rem/1.15 "Space Grotesk", sans-serif; }
.brand-copy small { color: var(--muted); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.save-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.save-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(83, 200, 137, .16); }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); cursor: pointer; }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.icon-button:hover { transform: translateY(-2px); box-shadow: var(--small-shadow); }

#app { width: min(1180px, calc(100% - 36px)); margin: 0 auto; min-height: 70vh; }
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1.35fr .65fr; gap: 36px;
  padding: clamp(34px, 6vw, 76px); border: 1px solid rgba(16,35,63,.08); border-radius: 34px;
  background: linear-gradient(125deg, #fff9dc 0%, #ffffff 46%, #dbf9fc 100%); box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; width: 210px; height: 210px; right: -70px; top: -70px; border: 30px solid rgba(129,103,237,.12); border-radius: 50%; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--cyan-dark); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 4px; border-radius: 4px; background: var(--coral); }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; letter-spacing: -.035em; }
h1 { max-width: 760px; margin: 0; font-size: clamp(2.4rem, 5.7vw, 5.3rem); line-height: .98; }
h1 span { color: var(--violet); }
.hero-copy { max-width: 720px; margin: 22px 0 28px; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.22rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px;
  padding: 0 20px; border: 0; border-radius: 15px; background: var(--ink); color: white;
  font-weight: 800; cursor: pointer; box-shadow: 0 7px 0 rgba(16,35,63,.18); transition: .18s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 0 rgba(16,35,63,.15); }
.button:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(16,35,63,.18); }
.button.secondary { background: white; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.button.coral { background: var(--coral); }
.button.cyan { background: var(--cyan-dark); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.hero-metric { align-self: center; position: relative; z-index: 1; display: grid; place-items: center; }
.metric-ring { width: min(240px, 70vw); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--cyan) var(--progress, 0%), #e7eff1 0); box-shadow: inset 0 0 0 16px rgba(255,255,255,.85), var(--small-shadow); }
.metric-center { width: 70%; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border-radius: 50%; background: white; }
.metric-center strong { font: 700 clamp(2.2rem, 5vw, 4rem)/1 "Space Grotesk"; }
.metric-center span { margin-top: 5px; color: var(--muted); font-size: .82rem; font-weight: 700; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 52px 0 22px; }
.section-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.section-heading p { margin: 6px 0 0; color: var(--muted); }
.tiny-button { border: 0; background: none; color: var(--muted); font-size: .84rem; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.module-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.module-card { position: relative; overflow: hidden; min-height: 270px; display: flex; flex-direction: column; padding: 22px; border: 1px solid rgba(16,35,63,.08); border-radius: 24px; background: var(--white); box-shadow: var(--small-shadow); }
.module-card::before { content: ""; position: absolute; width: 110px; height: 110px; right: -45px; top: -45px; border-radius: 50%; background: var(--accent-soft); }
.module-card .module-number { position: relative; color: var(--accent); font: 700 .82rem/1 "Space Grotesk"; letter-spacing: .12em; }
.module-card h3 { position: relative; margin: 22px 0 8px; font-size: 1.35rem; line-height: 1.1; }
.module-card p { position: relative; margin: 0; color: var(--muted); font-size: .9rem; }
.module-progress { margin-top: auto; padding-top: 22px; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #edf2f3; }
.progress-fill { height: 100%; width: var(--progress); border-radius: inherit; background: var(--accent); }
.progress-label { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.module-card .button { min-height: 42px; margin-top: 14px; padding: 0 14px; background: var(--accent); box-shadow: none; }
.module-card[data-module="regulations"] { --accent: var(--coral); --accent-soft: rgba(255,117,104,.16); }
.module-card[data-module="airspace"] { --accent: var(--cyan-dark); --accent-soft: rgba(32,200,219,.17); }
.module-card[data-module="weather"] { --accent: var(--violet); --accent-soft: rgba(129,103,237,.15); }
.module-card[data-module="performance"] { --accent: #d79c00; --accent-soft: rgba(255,215,74,.24); }
.module-card[data-module="operations"] { --accent: #238e59; --accent-soft: rgba(83,200,137,.18); }
.method-strip { margin-top: 38px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--line); }
.method-step { min-height: 145px; padding: 24px; background: rgba(255,255,255,.92); }
.method-step strong { display: block; width: 32px; height: 32px; margin-bottom: 14px; padding-top: 5px; border-radius: 10px; text-align: center; background: var(--yellow); font-family: "Space Grotesk"; }
.method-step h3 { margin: 0 0 4px; font-size: 1rem; }
.method-step p { margin: 0; color: var(--muted); font-size: .86rem; }

.study-shell { max-width: 900px; margin: 34px auto 0; }
.study-topline { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.breadcrumb button { border: 0; padding: 0; background: none; color: var(--cyan-dark); font-weight: 800; cursor: pointer; }
.lesson-count { font-size: .86rem; font-weight: 800; }
.lesson-progress { height: 10px; margin-bottom: 22px; overflow: hidden; border-radius: 20px; background: rgba(16,35,63,.08); }
.lesson-progress > div { height: 100%; width: var(--progress); background: linear-gradient(90deg, var(--cyan), var(--violet)); border-radius: inherit; transition: width .25s ease; }
.fact-card { position: relative; overflow: hidden; min-height: 470px; display: flex; flex-direction: column; padding: clamp(28px, 6vw, 62px); border: 1px solid rgba(16,35,63,.08); border-radius: 32px; background: white; box-shadow: var(--shadow); }
.fact-card::after { content: attr(data-number); position: absolute; right: 24px; top: 10px; color: rgba(16,35,63,.045); font: 700 clamp(6rem, 20vw, 13rem)/1 "Space Grotesk"; }
.fact-label { position: relative; z-index: 1; display: inline-flex; align-items: center; align-self: flex-start; padding: 7px 12px; border-radius: 99px; color: var(--ink); background: var(--yellow); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fact-card h1 { position: relative; z-index: 1; margin: 28px 0 22px; max-width: 780px; font-size: clamp(1.75rem, 4.2vw, 3.15rem); line-height: 1.12; }
.fact-note { position: relative; z-index: 1; display: flex; gap: 12px; max-width: 720px; padding: 16px 18px; border-left: 5px solid var(--cyan); border-radius: 0 15px 15px 0; background: #effbfc; color: #3e6171; }
.fact-note::before { content: "Remember"; color: var(--cyan-dark); font-weight: 800; }
.fact-source { position: relative; z-index: 1; margin-top: 20px; color: var(--muted); font-size: .86rem; }
.fact-actions { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 34px; }
.text-button { border: 0; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }

.quiz-card { min-height: 560px; padding: clamp(27px, 5vw, 52px); border: 1px solid rgba(16,35,63,.08); border-radius: 32px; background: white; box-shadow: var(--shadow); }
.quiz-kicker { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.quiz-card h1 { max-width: 760px; margin: 0 0 26px; font-size: clamp(1.55rem, 3.4vw, 2.6rem); line-height: 1.15; }
.answer-list { display: grid; gap: 12px; }
.answer-option { position: relative; display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 18px; border: 2px solid var(--line); border-radius: 17px; background: white; text-align: left; cursor: pointer; transition: .15s ease; }
.answer-option:hover:not(:disabled) { border-color: var(--cyan); transform: translateX(3px); }
.answer-letter { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--cream); font-weight: 800; }
.answer-option.correct { border-color: var(--green); background: #eefbf4; }
.answer-option.correct .answer-letter { background: var(--green); color: white; }
.answer-option.incorrect { border-color: var(--coral); background: #fff3f1; }
.answer-option.incorrect .answer-letter { background: var(--coral); color: white; }
.feedback { margin-top: 20px; padding: 18px; border-radius: 16px; background: #f4f8fa; }
.feedback strong { display: block; margin-bottom: 4px; }
.feedback p { margin: 0; color: var(--muted); }
.quiz-next { display: flex; justify-content: flex-end; margin-top: 24px; }

.result-card { max-width: 780px; margin: 45px auto 0; overflow: hidden; border-radius: 32px; background: white; box-shadow: var(--shadow); text-align: center; }
.result-top { padding: 44px clamp(26px, 6vw, 62px); background: linear-gradient(135deg, #fff2b8, #dffbfd); }
.score-badge { width: 130px; height: 130px; margin: 0 auto 22px; display: grid; place-content: center; border: 12px solid rgba(255,255,255,.8); border-radius: 50%; background: var(--ink); color: white; box-shadow: var(--small-shadow); }
.score-badge strong { font: 700 2.6rem/1 "Space Grotesk"; }
.score-badge span { font-size: .72rem; font-weight: 700; opacity: .78; }
.result-top h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); }
.result-top p { max-width: 560px; margin: 12px auto 0; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 28px; }
.missed-list { padding: 0 28px 30px; text-align: left; }
.missed-list h2 { font-size: 1.15rem; }
.missed-item { margin-top: 10px; padding: 15px; border-radius: 14px; background: #fff5f3; }
.missed-item strong { display: block; }
.missed-item span { color: var(--muted); font-size: .88rem; }

.site-footer { width: min(1180px, calc(100% - 36px)); margin: 54px auto 0; padding: 26px 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-top: 1px solid rgba(16,35,63,.12); color: var(--muted); font-size: .78rem; }
.site-footer p { max-width: 560px; margin: 0; }
.footer-notes { display: grid; gap: 5px; }
.footer-powered { display: flex; align-items: center; justify-content: flex-end; gap: 15px; flex: 0 0 auto; }
.footer-powered > span { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.footer-powered img { display: block; object-fit: contain; }
.footer-powered img:first-of-type { width: 54px; height: 50px; }
.footer-powered img:last-of-type { width: 118px; height: 50px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 20; max-width: 330px; padding: 13px 17px; border-radius: 13px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.registration-gate {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto; display: grid; place-items: center;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 10% 15%, rgba(32, 200, 219, .34), transparent 26rem),
    radial-gradient(circle at 90% 8%, rgba(255, 215, 74, .55), transparent 28rem),
    radial-gradient(circle at 82% 90%, rgba(129, 103, 237, .20), transparent 26rem),
    #fffaf0;
}
.registration-gate[hidden] { display: none; }
.registration-card {
  width: min(980px, 100%); display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(24px, 5vw, 60px);
  padding: clamp(26px, 5vw, 58px); border: 1px solid rgba(16,35,63,.10); border-radius: 34px;
  background: rgba(255,255,255,.94); box-shadow: 0 28px 80px rgba(26,62,91,.18); backdrop-filter: blur(14px);
}
.registration-brand { grid-row: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; min-height: 420px; padding: 26px; border-radius: 28px; background: linear-gradient(145deg, #fff2b6, #f9ffff 62%, #d7f8fb); text-align: center; }
.registration-brand img { width: min(300px, 80%); height: auto; filter: drop-shadow(0 18px 24px rgba(16,35,63,.12)); }
.registration-brand span { color: var(--ink); font: 700 1.05rem/1.2 "Space Grotesk", sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.registration-copy { align-self: end; }
.registration-copy h1 { max-width: 530px; font-size: clamp(2.15rem, 5vw, 4rem); line-height: 1.02; }
.registration-copy > p:last-child { margin: 17px 0 0; color: var(--muted); font-size: 1.02rem; }
.registration-form { align-self: start; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: grid; gap: 7px; }
.form-field label { font-size: .82rem; font-weight: 800; }
.form-field input { width: 100%; min-height: 52px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: white; color: var(--ink); outline: none; }
.form-field input:focus { border-color: var(--cyan-dark); box-shadow: 0 0 0 4px rgba(32,200,219,.15); }
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.registration-submit { grid-column: 1 / -1; width: 100%; margin-top: 4px; }
.registration-status, .registration-note { grid-column: 1 / -1; margin: 0; font-size: .78rem; }
.registration-status { min-height: 1.2rem; color: var(--muted); font-weight: 700; }
.registration-status.success { color: #1b7b4b; }
.registration-status.error { color: #b5342b; }
.registration-note { color: var(--muted); line-height: 1.45; }
.powered-by { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.powered-by > span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.powered-logos { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.partner-logo { display: block; object-fit: contain; }
.partner-logo-tjop { width: 70px; height: 64px; }
.partner-logo-dhrc { width: 145px; height: 64px; }
.partner-divider { width: 1px; height: 38px; background: var(--line); }

@media (max-width: 1000px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .module-card:last-child { grid-column: span 2; }
}
@media (max-width: 760px) {
  .site-header { width: min(100% - 24px, 1180px); padding: 15px 0; }
  .save-state { display: none; }
  #app, .site-footer { width: min(100% - 24px, 1180px); }
  .hero { grid-template-columns: 1fr; padding: 30px 24px; border-radius: 26px; }
  .hero-metric { justify-self: start; }
  .metric-ring { width: 175px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .method-strip { grid-template-columns: 1fr 1fr; }
  .fact-card, .quiz-card { min-height: 0; border-radius: 24px; }
  .fact-note { display: block; }
  .fact-note::before { display: block; margin-bottom: 3px; }
  .fact-actions { align-items: stretch; flex-direction: column-reverse; }
  .fact-actions .button { width: 100%; }
  .site-footer { flex-direction: column; }
  .footer-powered { align-self: flex-start; justify-content: flex-start; }
  .registration-gate { place-items: start center; padding: 14px; }
  .registration-card { grid-template-columns: 1fr; gap: 24px; padding: 22px; border-radius: 25px; }
  .registration-brand { grid-row: auto; min-height: 0; flex-direction: row; justify-content: flex-start; padding: 13px 16px; border-radius: 18px; }
  .registration-brand img { width: 90px; }
  .registration-brand span { text-align: left; font-size: .86rem; }
  .registration-copy h1 { font-size: clamp(2rem, 11vw, 3.2rem); }
}
@media (max-width: 540px) {
  .brand-copy small { font-size: .72rem; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card:last-child { grid-column: auto; }
  .method-strip { grid-template-columns: 1fr; }
  .study-topline { align-items: flex-start; flex-direction: column; gap: 7px; }
  .button-row .button { width: 100%; }
  .result-actions .button { width: 100%; }
  .registration-form { grid-template-columns: 1fr; }
  .powered-by { align-items: flex-start; flex-direction: column; }
  .powered-logos { width: 100%; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
