:root {
  --ink: #102b3c;
  --navy: #123c56;
  --teal: #14a89d;
  --mint: #dff5ed;
  --lime: #c9e650;
  --cream: #f7f5ed;
  --line: #d9e3df;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
a { text-decoration: none; color: inherit; }

nav {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: auto;
  padding: 0 32px;
  position: relative;
  z-index: 5;
}
.brand { display: flex; gap: 11px; align-items: center; font-weight: 850; letter-spacing: .12em; }
.brand small { display: block; font-size: 8px; letter-spacing: .08em; font-weight: 650; color: #557080; }
.mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px 14px 14px 3px; background: var(--teal); color: white; font: 900 24px Georgia, serif; }
.navLinks { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 700; }
.navCta, .button { background: var(--navy); color: white; padding: 13px 20px; border-radius: 8px; }
.themeToggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 12px; border: 1px solid #b8c9c8; border-radius: 999px; background: #ffffffb8; color: var(--ink); font-weight: 800; cursor: pointer; }
.themeToggle > span:first-child { font-size: 19px; line-height: 1; }

.hero { min-height: 720px; background: radial-gradient(circle at 75% 40%, #e8faf4 0 24%, transparent 50%), linear-gradient(120deg, #f8f6ef, #f9fbf8); overflow: hidden; }
.heroGrid { max-width: 1180px; margin: auto; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 60px; padding: 75px 32px 110px; }
.eyebrow { font-size: 12px; font-weight: 850; letter-spacing: .18em; color: #168d84; }
.hero h1 { font-family: Georgia, serif; font-size: clamp(58px, 7vw, 91px); line-height: .94; letter-spacing: -.055em; margin: 18px 0 24px; max-width: 650px; }
.lede { font-size: 19px; line-height: 1.7; color: #486170; max-width: 620px; }
.actions { display: flex; gap: 26px; align-items: center; margin: 34px 0 17px; }
.button { display: inline-flex; gap: 28px; align-items: center; padding: 17px 22px; font-weight: 800; }
.textLink { font-weight: 800; border-bottom: 2px solid var(--teal); padding-bottom: 3px; }
.time { font-size: 12px; color: #71838d; }

.varkArt { height: 520px; position: relative; }
.varkArt::before { content: ""; position: absolute; inset: 60px; border: 1px dashed #a7cbc3; border-radius: 50%; }
.orb { position: absolute; display: grid; place-items: center; text-align: center; border-radius: 50%; box-shadow: 0 15px 40px #173c5220; }
.orb b { font: 42px Georgia, serif; }
.orb small { font-size: 11px; font-weight: 800; }
.center { width: 205px; height: 205px; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 14px; background: var(--navy); color: white; }
.learnerPortrait { width: 80px; height: 80px; flex: 0 0 80px; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 7px 18px #07192355; }
.profileCopy { display: grid; gap: 2px; }
.center .profileCopy b { font-size: 18px; letter-spacing: .15em; }
.center .profileCopy small { line-height: 1.35; color: #b9d9dd; }
.v, .a, .r, .k { width: 110px; height: 110px; }
.v { left: 42%; top: 7%; background: #cae755; }
.a { right: 4%; top: 39%; background: #f0ae61; }
.r { left: 42%; bottom: 3%; background: #d8eef0; }
.k { left: 2%; top: 40%; background: #b8e6d7; }

.section { max-width: 1180px; margin: auto; padding: 110px 32px; }
.sectionHead { max-width: 640px; }
.section h2, .promise h2 { font: 500 clamp(39px, 5vw, 59px)/1.08 Georgia, serif; letter-spacing: -.035em; margin: 15px 0 50px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.step { padding: 32px 35px 25px 0; border-right: 1px solid var(--line); margin-right: 35px; }
.step:last-child { border: 0; }
.step > span { font: italic 20px Georgia, serif; color: var(--teal); }
.step h3 { font-size: 22px; margin: 35px 0 12px; }
.step p { color: #5a6f7a; line-height: 1.7; }
.promise { background: var(--navy); color: white; padding: 95px max(32px, calc((100vw - 1116px) / 2)); display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: end; }
.promise p:last-child { font-size: 18px; line-height: 1.8; color: #cfe0e5; }
.promise h2 { margin-bottom: 0; }
footer { max-width: 1180px; margin: auto; padding: 48px 32px; display: flex; justify-content: space-between; align-items: center; color: #71838d; font-size: 12px; }

.flowShell { min-height: 100vh; background: var(--cream); }
.flowHeader { background: white; border-bottom: 1px solid var(--line); }
.flowHeader nav { height: 76px; }
.progressNav { display: flex; max-width: 760px; margin: auto; padding: 14px 20px 18px; }
.progressNav span { flex: 1; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; color: #8b999e; border-top: 3px solid #dbe3e0; padding-top: 9px; }
.progressNav .done, .progressNav .active { border-color: var(--teal); color: var(--ink); }
.content { max-width: 920px; margin: auto; padding: 60px 24px 100px; }
.introCard, .card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 34px; box-shadow: 0 12px 35px #1538490d; }
.content h1 { font: 500 clamp(40px, 6vw, 64px)/1.03 Georgia, serif; letter-spacing: -.04em; margin: 10px 0 18px; }
.content h2 { font: 500 33px Georgia, serif; }
.content .sub { font-size: 17px; line-height: 1.7; color: #5e727d; }
.consent { display: flex; gap: 13px; background: #edf8f4; padding: 18px; border-radius: 10px; margin: 28px 0; line-height: 1.5; }
.consent input { width: 20px; height: 20px; accent-color: var(--teal); flex: 0 0 auto; }
.primaryBtn { border: 0; background: var(--navy); color: white; border-radius: 8px; padding: 16px 24px; font: 800 15px inherit; cursor: pointer; }
.primaryBtn:disabled { opacity: .45; cursor: not-allowed; }
.secondaryBtn { border: 1px solid var(--line); background: white; border-radius: 8px; padding: 15px 20px; font-weight: 800; cursor: pointer; }

.question { margin: 18px 0; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.content .questionTitle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font: 800 17px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
.options { display: grid; gap: 9px; margin-top: 18px; }
.option { display: flex; gap: 12px; padding: 13px; border: 1px solid #dce5e1; border-radius: 9px; cursor: pointer; line-height: 1.45; }
.option:has(input:checked) { border-color: var(--teal); background: #edfaf6; }
.option input { accent-color: var(--teal); flex: 0 0 auto; }
.stickyActions { position: sticky; bottom: 0; z-index: 4; background: #f7f5edeb; backdrop-filter: blur(12px); padding: 18px 0; display: flex; justify-content: space-between; align-items: center; }
.meter { height: 7px; background: #dfe7e3; border-radius: 9px; overflow: hidden; margin: 20px 0; }
.meter i { display: block; height: 100%; background: var(--teal); transition: width .2s ease; }
.resultGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 25px 0; }
.score { padding: 18px; border-radius: 12px; background: #f4f7f5; text-align: center; }
.score b { display: block; font: 34px Georgia, serif; }

.field { display: grid; gap: 8px; margin: 20px 0; }
.field label, .label { font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #cbd8d3; background: white; border-radius: 9px; padding: 14px; }
.field textarea { min-height: 110px; }
.plannerForm { margin-top: 18px; }
.plannerForm small { color: #6d7f85; }
.advancedToggle { display: flex; align-items: center; gap: 10px; margin: 18px 0; font-weight: 800; }
.advancedToggle input { width: 18px; height: 18px; accent-color: var(--teal); }
.generateBtn { display: inline-flex; align-items: center; gap: 10px; min-width: 210px; justify-content: center; }
.spinner { width: 18px; height: 18px; border: 2px solid #ffffff55; border-top-color: white; border-radius: 50%; animation: loaderSpin .75s linear infinite; }
.generationNote { color: #657880; font-size: 14px; line-height: 1.6; margin-bottom: 0; }
.errorBox { display: grid; gap: 4px; margin-top: 18px; padding: 16px; border: 1px solid #e7b9ae; border-radius: 10px; background: #fff3ef; color: #7a2d20; }

.lesson { margin-top: 30px; scroll-margin-top: 20px; }
.lessonHero { padding: 30px; background: var(--navy); color: white; border-radius: 14px; }
.lessonHero h2 { margin: 4px 0; font-size: 38px; }
.lessonGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 15px 0; }
.lessonBlock { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.lessonBlock > span { font-size: 12px; font-weight: 900; color: var(--teal); letter-spacing: .1em; }
.lessonBlock h3 { margin: 8px 0; }
.lessonBlock p, .lessonBlock li { color: #49616e; line-height: 1.68; }
.lessonBlock ul { margin: 10px 0 0; padding-left: 21px; }
.lessonBlock small { display: inline-block; padding: 4px 8px; border-radius: 99px; background: #eef5f2; color: #5f747b; font-weight: 750; }
.lessonOverview { margin-top: 14px; }
.twoCols, .homeworkGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.homeworkGrid { margin-top: 18px; }
.homeworkGrid > div { border-left: 3px solid var(--teal); padding: 2px 0 2px 14px; }
.homeworkGrid p { margin-bottom: 0; }
.lessonActions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.lessonActions .primaryBtn { margin-left: auto; }
.roleCard { margin-top: 24px; }
.activity-v { border-top: 4px solid #b8d83d; }
.activity-a { border-top: 4px solid #efa95a; }
.activity-r { border-top: 4px solid #85cbd0; }
.activity-k { border-top: 4px solid #67c5a9; }

.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: left; font-weight: 800; cursor: pointer; display: flex; justify-content: space-between; gap: 15px; }
.role:hover { border-color: var(--teal); background: #eff9f5; }
.surveyQ { margin: 22px 0; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.surveyQ textarea { width: 100%; min-height: 90px; margin-top: 10px; border: 1px solid #cbd8d3; border-radius: 8px; padding: 12px; }
.radioRow { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.radioRow label { padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; }
.surveyStatus { margin: 16px 0; color: #5e727d; }
.success { text-align: center; padding: 80px 30px; }
.successIcon { width: 75px; height: 75px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: var(--mint); color: var(--teal); font-size: 38px; }

.installPrompt { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 50; transform: translateX(-50%); display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; width: min(680px, calc(100vw - 28px)); padding: 13px 14px; border: 1px solid #b9d6d1; border-radius: 16px; background: #fffffff2; color: var(--ink); box-shadow: 0 18px 55px #102b3c33; backdrop-filter: blur(18px); }
.installPrompt[hidden] { display: none; }
.installPrompt img { border-radius: 12px; }
.installPrompt strong { display: block; font-size: 14px; }
.installPrompt p { margin: 4px 0 0; color: #557080; font-size: 12px; line-height: 1.4; }
.installAction { border: 0; border-radius: 8px; background: var(--navy); color: #fff; padding: 10px 14px; font-weight: 800; cursor: pointer; }
.installDismiss { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 25px; line-height: 1; cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #14a89d66; outline-offset: 2px; }
@keyframes loaderSpin { to { transform: rotate(360deg); } }

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6f0f2;
  --teal: #55d8cc;
  --mint: #123e3b;
  --cream: #08151d;
  --line: #29414c;
}
html[data-theme="dark"] body { background: #08151d; }
html[data-theme="dark"] .hero { background: radial-gradient(circle at 75% 40%, #153b3a 0 24%, transparent 50%), linear-gradient(120deg, #0b1b24, #0b2226); }
html[data-theme="dark"] .flowHeader,
html[data-theme="dark"] .introCard,
html[data-theme="dark"] .card,
html[data-theme="dark"] .question,
html[data-theme="dark"] .lessonBlock,
html[data-theme="dark"] .lessonActions,
html[data-theme="dark"] .role,
html[data-theme="dark"] .secondaryBtn { background: #102630; }
html[data-theme="dark"] .flowShell { background: #08151d; }
html[data-theme="dark"] .themeToggle { border-color: #38535e; background: #102630; color: #edf7f8; }
html[data-theme="dark"] .navCta { box-shadow: inset 0 0 0 1px #43677a; }
html[data-theme="dark"] .brand small,
html[data-theme="dark"] .time,
html[data-theme="dark"] footer,
html[data-theme="dark"] .step p,
html[data-theme="dark"] .lede,
html[data-theme="dark"] .content .sub,
html[data-theme="dark"] .plannerForm small,
html[data-theme="dark"] .generationNote,
html[data-theme="dark"] .surveyStatus,
html[data-theme="dark"] .lessonBlock p,
html[data-theme="dark"] .lessonBlock li { color: #acc1c8; }
html[data-theme="dark"] .promise p:last-child { color: #c4d9de; }
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .lessonBlock > span { color: #6ee3d8; }
html[data-theme="dark"] .consent { background: #123530; }
html[data-theme="dark"] .option { border-color: #314a55; background: #0d222c; }
html[data-theme="dark"] .option:has(input:checked) { border-color: #55d8cc; background: #123d3a; }
html[data-theme="dark"] .stickyActions { background: #08151deb; }
html[data-theme="dark"] .meter { background: #263c45; }
html[data-theme="dark"] .score { background: #0b2029; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .surveyQ textarea { border-color: #36505b; background: #091b24; color: #edf7f8; }
html[data-theme="dark"] .lessonBlock small { background: #18313a; color: #b8cbd1; }
html[data-theme="dark"] .role:hover { border-color: #55d8cc; background: #123d3a; }
html[data-theme="dark"] .radioRow label { border-color: #36505b; background: #0d222c; }
html[data-theme="dark"] .successIcon { background: #123e3b; color: #6ee3d8; }
html[data-theme="dark"] .errorBox { border-color: #743f3a; background: #321d1d; color: #ffb9ad; }
html[data-theme="dark"] .installPrompt { border-color: #38535e; background: #102630f2; }
html[data-theme="dark"] .installPrompt p { color: #acc1c8; }
html[data-theme="dark"] .v,
html[data-theme="dark"] .a,
html[data-theme="dark"] .r,
html[data-theme="dark"] .k { color: #102b3c; }

@media (max-width: 760px) {
  .heroGrid, .promise { grid-template-columns: 1fr; }
  .heroGrid { padding-top: 35px; }
  .varkArt { height: 420px; }
  .navLinks > a:first-child { display: inline-flex; }
  .navLinks { gap: 12px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); margin: 0; }
  .promise { gap: 25px; }
  .lessonGrid, .roles, .twoCols, .homeworkGrid { grid-template-columns: 1fr; }
  .resultGrid { grid-template-columns: 1fr 1fr; }
  .content { padding-top: 35px; }
  .question { padding: 19px; }
  .hero h1 { font-size: 58px; }
  .lessonActions .primaryBtn { width: 100%; margin-left: 0; }
  .center { width: 190px; height: 190px; }
  .learnerPortrait { width: 72px; height: 72px; flex-basis: 72px; }
  .installPrompt { grid-template-columns: auto minmax(0, 1fr) auto; }
  .installPrompt .installAction { grid-column: 2; }
  .installDismiss { grid-column: 3; grid-row: 1; }
  .installPrompt img { grid-row: 1 / span 2; }
}

@media (max-width: 480px) {
  nav { padding: 0 18px; }
  .brand small { display: none; }
  .themeToggle { width: 40px; min-width: 40px; padding: 8px; }
  .themeText { display: none; }
  .navCta { padding: 12px 13px; }
  .installPrompt { bottom: max(10px, env(safe-area-inset-bottom)); }
  .installPrompt p { font-size: 11px; }
  .progressNav span { font-size: 8px; }
  .content { padding-left: 15px; padding-right: 15px; }
  .introCard, .card { padding: 24px 20px; }
  .actions { align-items: flex-start; flex-direction: column; }
  footer { align-items: flex-start; gap: 20px; flex-direction: column; }
}

/* Shared demo/account navigation stays usable on narrow screens. */
.navLinks { gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.adminLoginLink { font-size: 12px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
nav a:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
@media (max-width: 760px) {
  .flowHeader nav { height: auto; min-height: 76px; padding: 16px 20px; gap: 16px; flex-wrap: wrap; }
  .navLinks { gap: 12px; }
}
@media (max-width: 480px) {
  .navLinks { width: 100%; justify-content: flex-start; }
  .navLinks .navCta { padding: 10px 14px; }
}
