:root {
  color-scheme: light;
  --navy: #0b3557;
  --navy-deep: #072943;
  --teal: #07969a;
  --teal-dark: #00777d;
  --gold: #f7b83f;
  --ink: #173a55;
  --muted: #597184;
  --line: #cfdee3;
  --paper: #fff;
  --soft: #eef8f6;
  --cream: #fbfaf6;
  --shadow: 0 22px 60px rgba(9, 50, 73, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 7% 6%, rgba(7, 150, 154, .13), transparent 31rem), linear-gradient(180deg, #fff 0, var(--cream) 42rem, #f1f8f7 100%);
  font-family: Inter, Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button, a, select, input, textarea { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(247, 184, 63, .78); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 12px 18px; color: #fff; background: var(--navy); border-radius: 12px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  padding: 12px max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid rgba(11, 53, 87, .1);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand span { display: grid; }
.brand strong { font-size: 1.25rem; line-height: 1.1; }
.brand small { margin-top: 4px; color: var(--teal-dark); font-size: .73rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a { color: var(--ink); font-weight: 800; text-decoration: none; }
.site-header nav a:hover { color: var(--teal-dark); }
.site-header .home-link { padding: 12px 19px; color: #fff; background: var(--navy); border-radius: 999px; }
.site-header .home-link:hover { color: #fff; background: var(--teal-dark); }

main { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 90px; }
.bridge-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr); gap: 80px; align-items: end; padding: 12px 10px 38px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--teal-dark); font-size: .77rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { width: 34px; height: 2px; background: currentColor; }
.bridge-intro h1 { max-width: 850px; margin: 0; color: var(--navy); font-size: clamp(3rem, 5.7vw, 5.8rem); line-height: .93; letter-spacing: -.055em; }
.bridge-intro h1 em { color: var(--teal); font-style: normal; }
.intro-copy > p:first-child { margin: 0; color: #3c5a70; font-size: 1.15rem; line-height: 1.7; }
.local-note { display: flex; align-items: center; gap: 9px; margin: 18px 0 0; color: var(--teal-dark); font-size: .87rem; font-weight: 800; }
.local-note span { display: grid; width: 24px; height: 24px; place-items: center; color: #fff; border-radius: 50%; background: var(--teal); }

.builder-shell { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(310px, .72fr); gap: 22px; align-items: start; }
.theme-form, .builder-guide { border: 1px solid var(--line); border-radius: 30px; background: var(--paper); box-shadow: var(--shadow); }
.theme-form { padding: 30px; }
.form-heading { display: flex; gap: 14px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.form-heading > span { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; color: var(--navy); border-radius: 15px; background: var(--gold); font-weight: 950; }
.form-heading small, .builder-guide header small, .editor-intro small { color: var(--teal-dark); font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.form-heading h2 { margin: 2px 0 0; color: var(--navy); font-size: 1.55rem; line-height: 1.15; }
fieldset { padding: 0; margin: 27px 0 0; border: 0; }
legend, .field > span { display: block; margin-bottom: 9px; color: #294a62; font-size: .88rem; font-weight: 850; }
legend small, .field > span small { color: #7b8c98; font-weight: 650; }

.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-grid label { position: relative; min-width: 0; cursor: pointer; }
.theme-grid input { position: absolute; opacity: 0; pointer-events: none; }
.theme-grid label > span { display: grid; min-height: 125px; align-content: start; padding: 15px; border: 1px solid #d2e0e4; border-radius: 17px; background: #fbfdfd; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.theme-grid b { display: grid; width: 34px; height: 34px; margin-bottom: 12px; place-items: center; color: #fff; border-radius: 11px; background: var(--choice); font-size: .84rem; }
.theme-grid strong { color: var(--navy); font-size: .93rem; line-height: 1.2; }
.theme-grid small { margin-top: 5px; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.theme-grid input:checked + span { border-color: var(--choice); background: color-mix(in srgb, var(--choice) 8%, #fff); box-shadow: 0 10px 24px color-mix(in srgb, var(--choice) 18%, transparent); transform: translateY(-2px); }
.theme-grid input:focus-visible + span { outline: 3px solid rgba(247, 184, 63, .78); outline-offset: 3px; }

.field { display: block; margin-top: 24px; }
.field-row { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(360px, 1.28fr); gap: 16px; align-items: end; }
.field-row .field { margin-top: 24px; }
.field input, .field select, .site-tools input, .editor-foundation input, .editor-foundation textarea, .editor-grid input, .editor-grid select, .editor-grid textarea, .step-editor textarea {
  width: 100%; color: var(--ink); border: 1px solid #c7d9de; border-radius: 14px; background: #fbfdfd;
}
.field input, .field select, .site-tools input, .editor-foundation input, .editor-grid input, .editor-grid select { min-height: 50px; padding: 11px 14px; }
textarea { resize: vertical; }

.duration-choice { margin-top: 24px; }
.duration-choice > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.duration-choice label { position: relative; cursor: pointer; }
.duration-choice input, .scope-choice input, .subject-choice input { position: absolute; opacity: 0; pointer-events: none; }
.duration-choice label span { display: grid; min-height: 50px; place-items: center; color: #38556a; border: 1px solid #cddde1; border-radius: 13px; background: #fbfdfd; font-size: .84rem; font-weight: 850; }
.duration-choice input:checked + span { color: var(--navy); border-color: var(--gold); background: #fff5dc; }

.scope-choice > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.scope-choice label { position: relative; cursor: pointer; }
.scope-choice label > span { display: grid; min-height: 105px; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; gap: 1px 10px; align-content: center; padding: 13px; border: 1px solid #cedee2; border-radius: 16px; background: #fbfdfd; }
.scope-choice b { grid-row: 1 / 3; display: grid; width: 36px; height: 36px; place-items: center; align-self: center; color: var(--navy); border-radius: 11px; background: #e5f4f2; }
.scope-choice strong { align-self: end; color: var(--navy); font-size: .87rem; }
.scope-choice small { color: var(--muted); font-size: .72rem; line-height: 1.35; }
.scope-choice input:checked + span { border-color: var(--teal); background: #eef9f7; box-shadow: inset 0 0 0 1px var(--teal); }
.scope-choice input:focus-visible + span, .subject-choice input:focus-visible + span, .duration-choice input:focus-visible + span { outline: 3px solid rgba(247, 184, 63, .78); outline-offset: 3px; }

.subject-choice > div { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.subject-choice label { position: relative; cursor: pointer; }
.subject-choice label > span { display: grid; min-height: 64px; align-content: center; gap: 2px; padding: 9px 10px; color: #617786; border: 1px solid #d4e1e4; border-radius: 13px; background: #fbfdfd; font-size: .68rem; font-weight: 900; }
.subject-choice strong { color: #294a62; font-size: .74rem; line-height: 1.25; }
.subject-choice input:checked + span { color: var(--teal-dark); border-color: var(--teal); background: #edf9f7; box-shadow: inset 0 0 0 1px var(--teal); }

.site-picker { padding-top: 23px; border-top: 1px solid var(--line); }
.site-tools { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.site-tools input { min-height: 46px; padding: 10px 13px; }
.show-all { display: flex; align-items: center; gap: 8px; color: #3f5d71; font-size: .82rem; font-weight: 800; cursor: pointer; }
.show-all input { width: 18px; height: 18px; accent-color: var(--teal); }
.site-status { margin: 11px 0 8px; color: var(--teal-dark); font-size: .78rem; font-weight: 850; }
.site-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 306px; padding-right: 3px; overflow-y: auto; }
.site-choice { display: grid; min-width: 0; grid-template-columns: 38px minmax(0, 1fr) 22px; gap: 9px; align-items: center; min-height: 67px; padding: 9px; border: 1px solid #d6e3e5; border-radius: 14px; background: #fbfdfd; cursor: pointer; }
.site-choice input { position: absolute; opacity: 0; }
.site-choice-icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--navy); border-radius: 11px; background: #e9f5f3; font-size: .73rem; font-weight: 900; }
.site-choice > span:nth-of-type(2) { display: grid; min-width: 0; }
.site-choice strong { overflow: hidden; color: var(--navy); font-size: .8rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.site-choice small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.site-choice i { display: grid; width: 21px; height: 21px; place-items: center; color: transparent; border: 1px solid #bed2d6; border-radius: 50%; font-size: .7rem; font-style: normal; }
.site-choice.is-selected { border-color: var(--teal); background: #eef9f7; }
.site-choice.is-selected i { color: #fff; border-color: var(--teal); background: var(--teal); }
.site-choice:has(input:focus-visible) { outline: 3px solid rgba(247, 184, 63, .78); outline-offset: 2px; }
.site-empty { padding: 18px; color: var(--muted); border: 1px dashed var(--line); border-radius: 13px; text-align: center; }

.build-button { display: flex; width: 100%; min-height: 58px; align-items: center; justify-content: center; gap: 10px; margin-top: 24px; color: #fff; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--teal), #08777e); box-shadow: 0 15px 30px rgba(7, 150, 154, .22); font-weight: 900; cursor: pointer; }
.build-button:hover { background: var(--navy); transform: translateY(-1px); }
.build-button span { color: var(--gold); }
.privacy-line { margin: 12px 0 0; color: #6b7f8d; font-size: .76rem; text-align: center; }
.privacy-line span { color: var(--teal); font-weight: 900; }

.builder-guide { position: sticky; top: 106px; overflow: hidden; color: #fff; border-color: rgba(255, 255, 255, .1); background: linear-gradient(155deg, var(--navy-deep), #0a4e61); }
.builder-guide::before { position: absolute; inset: 0; opacity: .12; background-image: radial-gradient(circle, #fff 1px, transparent 1.5px); background-size: 28px 28px; content: ""; pointer-events: none; }
.builder-guide > * { position: relative; }
.builder-guide header { display: flex; gap: 13px; align-items: center; padding: 26px 26px 20px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.builder-guide header > span { display: grid; width: 45px; height: 45px; place-items: center; color: var(--navy); border-radius: 14px; background: var(--gold); font-weight: 950; }
.builder-guide header div { display: grid; }
.builder-guide header small { color: #8fe5dd; }
.builder-guide header strong { margin-top: 2px; font-size: 1rem; }
.builder-guide ol { display: grid; gap: 0; padding: 12px 26px; margin: 0; list-style: none; }
.builder-guide li { display: grid; grid-template-columns: 35px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.builder-guide li > span { display: grid; width: 31px; height: 31px; place-items: center; color: var(--gold); border: 1px solid rgba(247, 184, 63, .52); border-radius: 50%; font-size: .75rem; font-weight: 900; }
.builder-guide li div { display: grid; }
.builder-guide li strong { font-size: .88rem; }
.builder-guide li small { margin-top: 2px; color: #b9d1da; font-size: .76rem; line-height: 1.4; }
.guide-question { padding: 20px 24px 24px; background: rgba(255, 255, 255, .08); }
.guide-question small { color: var(--gold); font-size: .66rem; font-weight: 900; letter-spacing: .1em; }
.guide-question p { margin: 7px 0 0; font-size: .92rem; font-weight: 750; line-height: 1.55; }

.theme-workspace { margin-top: 34px; scroll-margin-top: 98px; }
.workspace-toolbar { position: sticky; z-index: 10; top: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .96); box-shadow: 0 12px 36px rgba(8, 47, 75, .11); backdrop-filter: blur(14px); }
.workspace-toolbar .eyebrow { margin-bottom: 4px; font-size: .66rem; }
.workspace-toolbar h2 { margin: 0; color: var(--navy); font-size: 1.24rem; }
.workspace-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.workspace-actions > span { display: flex; align-items: center; padding: 0 9px; color: var(--teal-dark); font-size: .74rem; font-weight: 800; }
.workspace-actions button, .finish-editing { min-height: 42px; padding: 9px 13px; color: var(--navy); border: 1px solid #cadcdf; border-radius: 12px; background: #fff; font-size: .78rem; font-weight: 850; cursor: pointer; }
.workspace-actions .primary, .finish-editing { color: #fff; border-color: var(--teal); background: var(--teal); }
.workspace-actions button:hover, .finish-editing:hover { border-color: var(--teal); background: #eef9f7; }
.workspace-actions .primary:hover, .finish-editing:hover { color: #fff; background: var(--navy); }

#theme-teacher-view { margin-top: 18px; }
.plan-cover { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 26px 28px; color: #fff; border-radius: 28px 28px 0 0; background: linear-gradient(135deg, var(--navy-deep), color-mix(in srgb, var(--theme-accent) 55%, var(--navy))); }
.plan-title { display: flex; gap: 15px; align-items: center; }
.plan-title > span { display: grid; width: 56px; height: 56px; flex: 0 0 auto; place-items: center; color: var(--navy); border-radius: 17px; background: var(--gold); font-size: 1.3rem; font-weight: 900; }
.plan-title small { color: #a9e7e0; font-size: .69rem; font-weight: 900; letter-spacing: .12em; }
.plan-title h2 { margin: 2px 0; color: #fff; font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.05; }
.plan-title p { margin: 0; color: #c9dae1; font-size: .82rem; }
.plan-subjects { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 470px; }
.plan-subjects span { padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .19); border-radius: 999px; background: rgba(255, 255, 255, .09); font-size: .72rem; font-weight: 800; }
.plan-foundation { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 22px 22px; background: #fff; }
.plan-foundation article { padding: 22px 27px; }
.plan-foundation article + article { border-left: 1px solid var(--line); background: #f1f9f7; }
.plan-foundation small, .session-card small { color: var(--teal-dark); font-size: .68rem; font-weight: 900; letter-spacing: .09em; }
.plan-foundation p { margin: 6px 0 0; color: var(--navy); font-size: 1rem; font-weight: 750; line-height: 1.55; }

.session-list { display: grid; gap: 16px; margin-top: 16px; }
.session-card { overflow: hidden; border: 1px solid var(--line); border-radius: 23px; background: #fff; box-shadow: 0 13px 32px rgba(9, 50, 73, .07); }
.session-card > header { display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px; gap: 13px; align-items: center; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.session-number { display: grid; width: 46px; height: 46px; place-items: center; color: var(--navy); border-radius: 14px; background: var(--gold); font-weight: 950; }
.session-card > header div { min-width: 0; }
.session-card h3 { margin: 2px 0 0; color: var(--navy); font-size: 1.28rem; line-height: 1.2; }
.session-card > header p { margin: 3px 0 0; color: var(--muted); font-size: .77rem; }
.session-card > header b { display: grid; width: 47px; height: 47px; place-items: center; color: var(--teal-dark); border-radius: 15px; background: #e9f6f4; font-size: .76rem; }
.session-goal { padding: 16px 22px; border-bottom: 1px solid #cfe7e3; background: #eef9f7; }
.session-goal p { margin: 4px 0 0; color: var(--navy); font-weight: 760; }
.session-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); }
.session-body > section { padding: 20px 23px; }
.session-body > section > p { margin: 5px 0 14px; color: #3f5c70; }
.session-body ol { display: grid; gap: 9px; padding: 0; margin: 0; counter-reset: session-step; list-style: none; }
.session-body li { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: start; color: #294a62; font-size: .88rem; }
.session-body li::before { display: grid; width: 26px; height: 26px; place-items: center; color: var(--teal-dark); border-radius: 8px; background: #e8f6f3; counter-increment: session-step; content: counter(session-step); font-size: .7rem; font-weight: 900; }
.session-body aside { display: grid; align-content: start; border-left: 1px solid var(--line); background: #fbfcfc; }
.session-body aside div { padding: 18px 21px; }
.session-body aside div + div { border-top: 1px solid var(--line); }
.session-body aside p { margin: 4px 0 0; color: #3b586c; font-size: .83rem; }
.session-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 17px; border-top: 1px solid var(--line); background: #f8fbfa; }
.session-site { display: flex; min-width: 0; align-items: center; gap: 9px; color: var(--navy); text-decoration: none; }
.session-site > span { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 10px; background: var(--teal); }
.session-site div { display: grid; min-width: 0; }
.session-site strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.session-card > footer > div { display: flex; gap: 7px; }
.session-card > footer button, .session-card > footer > div a { min-height: 40px; padding: 9px 12px; color: var(--navy); border: 1px solid #c9dcdf; border-radius: 11px; background: #fff; font-size: .75rem; font-weight: 850; text-decoration: none; cursor: pointer; }
.session-card > footer button { color: #fff; border-color: var(--navy); background: var(--navy); }
.session-card > footer button:hover, .session-card > footer > div a:hover { color: #fff; border-color: var(--teal); background: var(--teal); }

#theme-editor { display: grid; gap: 17px; margin-top: 18px; }
.editor-intro { display: flex; gap: 14px; align-items: center; padding: 22px; color: #fff; border-radius: 22px; background: linear-gradient(135deg, var(--navy-deep), #0b5262); }
.editor-intro > span { display: grid; width: 45px; height: 45px; flex: 0 0 auto; place-items: center; color: var(--navy); border-radius: 14px; background: var(--gold); font-weight: 900; }
.editor-intro small { color: #91ddd7; }
.editor-intro h2 { margin: 2px 0; color: #fff; font-size: 1.35rem; }
.editor-intro p { margin: 0; color: #c8dce2; font-size: .82rem; }
.editor-foundation, .editor-session { padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.editor-foundation { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-foundation label:first-child { grid-column: 1 / -1; }
.editor-foundation label, .editor-grid label { display: grid; gap: 7px; color: #294a62; font-size: .8rem; font-weight: 850; }
.editor-foundation textarea, .editor-grid textarea, .step-editor textarea { min-height: 88px; padding: 12px 13px; line-height: 1.5; }
.editor-sessions { display: grid; gap: 14px; }
.editor-session > header { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.editor-session > header > span { display: grid; width: 42px; height: 42px; place-items: center; color: var(--navy); border-radius: 13px; background: var(--gold); font-weight: 900; }
.editor-session > header div { display: grid; }
.editor-session > header small { color: var(--teal-dark); font-size: .66rem; font-weight: 900; letter-spacing: .1em; }
.editor-session > header h3 { margin: 2px 0 0; color: var(--navy); font-size: 1.12rem; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.editor-grid .wide { grid-column: 1 / -1; }
.step-editor { padding-top: 18px; margin-top: 19px; border-top: 1px solid var(--line); }
.step-editor > div:first-child { display: grid; margin-bottom: 10px; }
.step-editor > div:first-child small { color: var(--teal-dark); font-size: .65rem; font-weight: 900; letter-spacing: .1em; }
.step-editor > div:first-child strong { color: var(--navy); }
.step-editor > div:nth-child(2) { display: grid; gap: 8px; }
.step-editor label { display: grid; grid-template-columns: 32px 1fr 34px; gap: 8px; align-items: start; }
.step-editor label > span { display: grid; width: 30px; height: 30px; place-items: center; color: var(--teal-dark); border-radius: 9px; background: #eaf7f4; font-size: .72rem; font-weight: 900; }
.step-editor textarea { min-height: 68px; }
.step-editor label button { width: 34px; height: 34px; color: #a64d45; border: 0; border-radius: 10px; background: #fff0ed; cursor: pointer; }
.step-editor > button { min-height: 39px; padding: 8px 12px; margin: 10px 0 0 40px; color: var(--teal-dark); border: 1px solid #b9d8d5; border-radius: 11px; background: #eef9f7; font-size: .75rem; font-weight: 850; cursor: pointer; }
.finish-editing { display: block; min-height: 50px; margin: 16px 0 0 auto; padding: 11px 20px; }
#theme-editor[hidden] + .finish-editing { display: none; }

.student-dialog { width: min(1480px, calc(100% - 30px)); max-width: none; padding: 0; color: #fff; border: 0; border-radius: 28px; background: var(--navy-deep); box-shadow: 0 35px 100px rgba(0, 22, 39, .45); }
.student-dialog::backdrop { background: rgba(4, 27, 44, .82); backdrop-filter: blur(8px); }
.student-shell { min-height: min(880px, calc(100vh - 35px)); }
.student-header { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; padding: 18px 24px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.student-brand { display: flex; gap: 11px; align-items: center; }
.student-brand > span { display: grid; width: 42px; height: 42px; place-items: center; color: var(--navy); border-radius: 13px; background: var(--gold); font-weight: 950; }
.student-brand div { display: grid; }
.student-brand small { color: #88d8d2; font-size: .66rem; font-weight: 900; letter-spacing: .1em; }
.student-brand strong { font-size: .95rem; }
.student-progress { display: flex; justify-content: center; gap: 10px; }
.student-progress button { display: grid; width: 35px; height: 35px; place-items: center; color: #9eb8c5; border: 1px solid rgba(255, 255, 255, .24); border-radius: 50%; background: transparent; font-size: .74rem; font-weight: 900; cursor: pointer; }
.student-progress button.is-current { color: var(--navy); border-color: var(--gold); background: var(--gold); transform: scale(1.12); }
.student-progress button.is-complete { color: #fff; border-color: var(--teal); background: var(--teal); }
#close-theme-student { width: 45px; height: 45px; color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: 1.5rem; cursor: pointer; }
.student-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 24px; padding: 30px; }
.student-copy { padding: 28px; color: var(--ink); border-radius: 23px; background: #fff; }
.student-meta { margin: 0 0 6px; color: var(--teal-dark); font-size: .83rem; font-weight: 850; }
.student-copy h2 { margin: 0 0 19px; color: var(--navy); font-size: clamp(2.1rem, 4vw, 4.1rem); line-height: 1; letter-spacing: -.04em; }
.student-goal, .student-opening { padding: 17px 19px; border-left: 4px solid var(--teal); border-radius: 0 14px 14px 0; background: #eef9f7; }
.student-opening { margin-top: 10px; border-left-color: var(--gold); background: #fff8e7; }
.student-goal small, .student-opening small, .student-side small { color: var(--teal-dark); font-size: .68rem; font-weight: 900; letter-spacing: .1em; }
.student-goal p, .student-opening p { margin: 5px 0 0; color: var(--navy); font-size: 1.08rem; font-weight: 760; }
.student-steps { display: grid; gap: 10px; padding: 0; margin: 18px 0 0; list-style: none; }
.student-steps li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; padding: 13px; border: 1px solid #d6e4e6; border-radius: 14px; }
.student-steps span { display: grid; width: 39px; height: 39px; place-items: center; color: var(--navy); border-radius: 12px; background: var(--gold); font-weight: 900; }
.student-steps p { margin: 0; font-size: 1rem; }
.student-side { display: grid; align-content: start; gap: 12px; }
.student-side article { padding: 21px; color: var(--ink); border-radius: 19px; background: #fff; }
.student-side article p { margin: 7px 0 0; color: var(--navy); font-size: .98rem; font-weight: 730; }
#student-theme-site { display: flex; min-height: 54px; align-items: center; justify-content: center; padding: 12px; color: var(--navy); border-radius: 15px; background: var(--gold); font-weight: 900; text-decoration: none; }
.student-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; border-top: 1px solid rgba(255, 255, 255, .15); }
.student-footer button { min-height: 45px; padding: 10px 17px; color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; background: rgba(255, 255, 255, .08); font-weight: 850; cursor: pointer; }
.student-footer button:disabled { opacity: .35; cursor: default; }

.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: min(420px, calc(100% - 44px)); padding: 14px 18px; color: #fff; border-radius: 14px; background: var(--navy); box-shadow: var(--shadow); font-weight: 800; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px max(24px, calc((100vw - 1440px) / 2)); color: #c5d9e1; background: var(--navy-deep); font-size: .78rem; }
.site-footer p { margin: 0; }

@media (max-width: 1120px) {
  .builder-shell { grid-template-columns: 1fr; }
  .builder-guide { position: static; display: grid; grid-template-columns: .7fr 1.3fr; }
  .builder-guide ol { grid-template-columns: 1fr 1fr; }
  .builder-guide li:nth-child(3), .builder-guide li:nth-child(4) { border-bottom: 0; }
  .guide-question { grid-column: 1 / -1; }
  .workspace-toolbar { position: static; align-items: flex-start; }
  .workspace-actions { max-width: 560px; }
}

@media (max-width: 880px) {
  .site-header { min-height: 74px; }
  .site-header nav a:not(.home-link) { display: none; }
  .bridge-intro { grid-template-columns: 1fr; gap: 20px; }
  .bridge-intro h1 { font-size: clamp(3rem, 11vw, 5.1rem); }
  .intro-copy > p:first-child { font-size: 1rem; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .subject-choice > div { grid-template-columns: repeat(3, 1fr); }
  .workspace-toolbar { display: grid; }
  .workspace-actions { justify-content: flex-start; }
  .plan-cover { align-items: flex-start; flex-direction: column; }
  .plan-subjects { justify-content: flex-start; }
  .session-body { grid-template-columns: 1fr; }
  .session-body aside { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 0; }
  .session-body aside div + div { border-top: 0; border-left: 1px solid var(--line); }
  .student-main { grid-template-columns: 1fr; }
  .student-side { grid-template-columns: 1fr 1fr; }
  #student-theme-site { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  main { width: min(100% - 24px, 1440px); padding-top: 28px; }
  .site-header { padding: 10px 14px; }
  .brand img { width: 42px; height: 42px; }
  .brand strong { font-size: 1.08rem; }
  .site-header .home-link { padding: 10px 13px; font-size: .78rem; }
  .bridge-intro { padding: 5px 3px 27px; }
  .bridge-intro h1 { font-size: 2.95rem; }
  .theme-form { padding: 18px; border-radius: 22px; }
  .theme-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .theme-grid label > span { min-height: 116px; padding: 12px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .scope-choice > div { grid-template-columns: 1fr; }
  .scope-choice label > span { min-height: 78px; }
  .subject-choice > div { grid-template-columns: 1fr 1fr; }
  .site-tools { grid-template-columns: 1fr; }
  .site-list { grid-template-columns: 1fr; }
  .builder-guide { display: block; }
  .builder-guide ol { grid-template-columns: 1fr; }
  .builder-guide li:nth-child(3) { border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .workspace-toolbar { padding: 16px; }
  .workspace-actions > span { width: 100%; padding: 0; }
  .workspace-actions button { flex: 1 1 auto; }
  .plan-cover { padding: 21px; border-radius: 22px 22px 0 0; }
  .plan-title > span { width: 46px; height: 46px; }
  .plan-foundation { grid-template-columns: 1fr; }
  .plan-foundation article + article { border-top: 1px solid var(--line); border-left: 0; }
  .session-card > header { grid-template-columns: 42px minmax(0, 1fr); padding: 16px; }
  .session-number { width: 40px; height: 40px; }
  .session-card > header b { display: none; }
  .session-goal, .session-body > section { padding: 16px; }
  .session-body aside { grid-template-columns: 1fr; }
  .session-body aside div + div { border-top: 1px solid var(--line); border-left: 0; }
  .session-card > footer { align-items: stretch; flex-direction: column; }
  .session-card > footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .session-card > footer button, .session-card > footer > div a { display: flex; align-items: center; justify-content: center; text-align: center; }
  .editor-foundation, .editor-grid { grid-template-columns: 1fr; }
  .editor-foundation label:first-child, .editor-grid .wide { grid-column: auto; }
  .editor-intro { align-items: flex-start; }
  .student-dialog { width: calc(100% - 12px); border-radius: 20px; }
  .student-header { grid-template-columns: 1fr auto; gap: 12px; padding: 13px; }
  .student-progress { grid-column: 1 / -1; grid-row: 2; }
  .student-main { padding: 12px; }
  .student-copy { padding: 17px; }
  .student-copy h2 { font-size: 2.1rem; }
  .student-side { grid-template-columns: 1fr; }
  #student-theme-site { grid-column: auto; }
  .student-footer { padding: 13px; }
  .student-footer strong { display: none; }
  .student-footer button { padding: 9px 11px; font-size: .78rem; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .site-header, .bridge-intro, .builder-shell, .workspace-toolbar, .finish-editing, .site-footer, .toast, .student-dialog { display: none !important; }
  body { color: #111; background: #fff; }
  main { width: 100%; padding: 0; }
  .theme-workspace { margin: 0; }
  #theme-teacher-view { margin: 0; }
  .plan-cover { color: #111; border: 2px solid #173a55; background: #fff; break-inside: avoid; }
  .plan-title h2, .plan-title p, .plan-subjects span { color: #111; }
  .plan-subjects span { border-color: #999; }
  .session-card { box-shadow: none; break-inside: avoid; }
}
