:root {
  --navy: #0b3557;
  --navy-deep: #07283f;
  --teal: #0b9294;
  --teal-dark: #087679;
  --aqua: #d8f5f1;
  --aqua-soft: #f1fbf9;
  --gold: #f2b84b;
  --cream: #fbfaf6;
  --white: #fff;
  --ink: #152c3d;
  --muted: #617586;
  --line: #d9e5e8;
  --red: #c44d4d;
  --shadow-sm: 0 10px 28px rgba(11, 53, 87, .08);
  --shadow-lg: 0 24px 68px rgba(11, 53, 87, .14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.brand,
button,
legend {
  font-family: "Manrope", "DM Sans", system-ui, sans-serif;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.page-shell {
  width: min(1460px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 10px 15px;
  color: var(--white);
  background: var(--navy);
  border-radius: 8px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(11, 53, 87, .08);
  background: rgba(251, 250, 246, .94);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 1.1rem;
  line-height: 1.1;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--teal-dark);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--teal);
  content: "";
}

.brand-mark::before { transform: rotate(45deg); }
.brand-mark::after { transform: rotate(-45deg); }

.brand-mark span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border: 2px solid var(--cream);
  border-radius: 50%;
}

.brand-mark span:nth-child(1) { top: -3px; }
.brand-mark span:nth-child(2) { right: -3px; }
.brand-mark span:nth-child(3) { bottom: -3px; left: 2px; }

.app-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-header nav a {
  color: #355269;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.app-header nav a:hover {
  color: var(--teal-dark);
}

.app-header .back-link {
  padding: 10px 16px;
  color: var(--white);
  background: var(--navy);
  border-radius: 999px;
}

.tool-intro {
  position: relative;
  overflow: hidden;
  padding: 54px 0 48px;
  background:
    radial-gradient(circle at 6% 0, rgba(216, 245, 241, .9), transparent 30%),
    radial-gradient(circle at 92% 30%, rgba(242, 184, 75, .17), transparent 24%),
    var(--cream);
}

.tool-intro::after {
  position: absolute;
  right: -120px;
  bottom: -170px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(11, 146, 148, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(11, 146, 148, .035), 0 0 0 96px rgba(11, 146, 148, .02);
  content: "";
}

.intro-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: end;
  gap: 64px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--teal-dark);
  font-family: "Manrope", sans-serif;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  background: currentColor;
}

.tool-intro h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 5vw, 5.4rem);
}

.tool-intro p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: #4e6575;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.intro-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .74);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.intro-facts div {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 9px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.intro-facts div:last-child {
  border-right: 0;
}

.intro-facts strong {
  color: var(--teal-dark);
  font-family: "Manrope", sans-serif;
  font-size: 1.75rem;
  line-height: 1;
}

.intro-facts span {
  margin-top: 8px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.3;
}

.builder-section {
  padding: 42px 0 90px;
  background: linear-gradient(180deg, var(--cream), #eef8f7);
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(390px, 455px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.builder-panel,
.lesson-workspace {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 25px;
  box-shadow: var(--shadow-sm);
}

.builder-panel {
  position: sticky;
  top: 100px;
  padding: 26px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.step-number {
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: 15px;
  font-family: "Manrope", sans-serif;
  font-size: .82rem;
  font-weight: 850;
}

.panel-heading p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.5rem;
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0 0 23px;
  border: 0;
}

legend,
.form-field > span {
  display: block;
  width: 100%;
  margin-bottom: 9px;
  color: #345064;
  font-size: .84rem;
  font-weight: 800;
}

legend small,
.form-field > span small {
  color: #82929d;
  font-family: "DM Sans", sans-serif;
  font-size: .73rem;
  font-weight: 600;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice-card,
.duration-row label,
.support-grid label {
  position: relative;
  cursor: pointer;
}

.choice-card input,
.duration-row input,
.support-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-card > span {
  display: flex;
  min-height: 73px;
  flex-direction: column;
  justify-content: center;
  padding: 11px 12px;
  color: #455f72;
  border: 1px solid var(--line);
  background: #fbfdfd;
  border-radius: 13px;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.choice-card > span:hover {
  border-color: #9abdc0;
  transform: translateY(-1px);
}

.choice-card b {
  font-size: .82rem;
}

.choice-card small {
  margin-top: 3px;
  font-size: .68rem;
  line-height: 1.25;
}

.choice-card input:checked + span {
  color: var(--white);
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: 0 8px 20px rgba(11, 146, 148, .2);
}

.choice-card input:focus-visible + span,
.duration-row input:focus-visible + span,
.support-grid input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 23px;
}

.form-field {
  display: block;
}

.form-field select,
.form-field input {
  width: 100%;
  min-height: 49px;
  padding: 11px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fbfdfd;
  border-radius: 12px;
  outline: 0;
  font-size: .92rem;
}

.form-field select:focus,
.form-field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 146, 148, .12);
}

.builder-panel > form > .form-field {
  margin-bottom: 23px;
}

.duration-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.duration-row span {
  display: grid;
  min-height: 42px;
  place-items: center;
  color: #526979;
  border: 1px solid var(--line);
  background: #fbfdfd;
  border-radius: 11px;
  font-size: .76rem;
  font-weight: 800;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.duration-row input:checked + span {
  color: var(--navy);
  border-color: var(--gold);
  background: #fff4d9;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.support-grid label > span {
  display: flex;
  min-height: 68px;
  flex-direction: column;
  justify-content: center;
  padding: 10px 11px 10px 35px;
  color: #526979;
  border: 1px solid var(--line);
  background: #fbfdfd;
  border-radius: 12px;
  transition: border-color .18s ease, background .18s ease;
}

.support-grid label > span::before {
  position: absolute;
  top: 50%;
  left: 12px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--white);
  border: 1px solid #a9bbc3;
  border-radius: 5px;
  content: "";
  font-size: .62rem;
  transform: translateY(-50%);
}

.support-grid b {
  font-size: .76rem;
}

.support-grid small {
  margin-top: 2px;
  font-size: .66rem;
  line-height: 1.25;
}

.support-grid input:checked + span {
  color: var(--navy);
  border-color: #88c3c1;
  background: var(--aqua-soft);
}

.support-grid input:checked + span::before {
  border-color: var(--teal);
  background: var(--teal);
  content: "✓";
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.primary-button,
.secondary-button,
.live-button,
.workspace-actions button,
.live-controls button,
.live-header-actions button,
.saved-actions button {
  min-height: 46px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 800;
  transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--white);
  background: var(--teal);
  box-shadow: 0 9px 22px rgba(11, 146, 148, .22);
}

.primary-button:hover,
.live-button:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
}

.secondary-button {
  color: var(--navy);
  border-color: var(--line);
  background: var(--white);
}

.secondary-button:hover {
  border-color: #a7bec5;
  background: #f7fbfb;
}

.privacy-note {
  display: flex;
  gap: 8px;
  margin: 15px 0 0;
  color: #6c7e8b;
  font-size: .72rem;
  line-height: 1.4;
}

.privacy-note span {
  color: var(--teal);
  font-weight: 900;
}

.lesson-workspace {
  overflow: hidden;
}

.workspace-topbar,
.workspace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: #f7fafb;
}

.workspace-topbar {
  border-bottom: 1px solid var(--line);
}

.workspace-footer {
  border-top: 1px solid var(--line);
}

.workspace-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--teal-dark);
  font-size: .78rem;
  font-weight: 800;
}

.workspace-status i,
.live-dot {
  width: 9px;
  height: 9px;
  background: #24aa79;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(36, 170, 121, .45);
  animation: live-pulse 2.5s ease-out infinite;
}

.workspace-topbar p {
  margin: 2px 0 0;
  color: #80909b;
  font-size: .7rem;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.workspace-actions button {
  min-height: 39px;
  padding: 8px 11px;
  color: #4a6272;
  border-color: var(--line);
  background: var(--white);
}

.workspace-actions button:hover {
  color: var(--navy);
  border-color: #a7bec5;
}

.workspace-actions button.is-saved {
  color: var(--white);
  border-color: var(--teal);
  background: var(--teal);
}

.lesson-sheet {
  min-height: 850px;
  padding: clamp(28px, 4.5vw, 62px);
  background: var(--white);
}

.lesson-hero {
  position: relative;
  overflow: hidden;
  padding: 30px;
  color: var(--white);
  background:
    radial-gradient(circle at 90% 5%, rgba(242, 184, 75, .38), transparent 31%),
    linear-gradient(135deg, var(--navy), #0c5f75);
  border-radius: 22px;
}

.lesson-hero::after {
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(255, 255, 255, .035);
  content: "";
}

.lesson-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.lesson-meta span {
  padding: 6px 10px;
  color: #e7f5f5;
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
}

.lesson-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-bottom: 11px;
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3.55rem);
}

.lesson-hero > p {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0;
  color: #d2e5ea;
  font-size: 1rem;
}

.lesson-overview {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 18px;
  margin-top: 20px;
}

.lesson-section {
  padding: 23px;
  border: 1px solid var(--line);
  background: #fbfdfd;
  border-radius: 17px;
}

.lesson-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 1.14rem;
}

.section-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--teal-dark);
  background: var(--aqua);
  border-radius: 9px;
  font-size: .83rem;
}

.goal-list,
.materials-list,
.assessment-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.goal-list li,
.materials-list li,
.assessment-list li {
  position: relative;
  padding-left: 22px;
  margin-top: 8px;
  color: #496071;
  font-size: .9rem;
}

.goal-list li::before,
.assessment-list li::before {
  position: absolute;
  top: .45em;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--gold);
  border: 2px solid #fff5dc;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--gold);
  content: "";
}

.materials-list li::before {
  position: absolute;
  left: 0;
  color: var(--teal);
  content: "✓";
  font-weight: 900;
}

.lesson-timeline {
  margin-top: 20px;
}

.lesson-loading {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  padding: 36px;
  text-align: center;
}

.lesson-loading > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 15px;
  color: var(--navy);
  background: var(--gold);
  border-radius: 18px;
  font-size: 1.6rem;
}

.lesson-loading h2 {
  margin-bottom: 8px;
  font-size: 1.55rem;
}

.lesson-loading p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
}

.lesson-timeline > h3,
.differentiation > h3,
.isat-panel > h3,
.tool-bridge > h3 {
  margin-bottom: 16px;
  font-size: 1.26rem;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 11px;
}

.timeline-list::before {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 24px;
  width: 2px;
  background: linear-gradient(var(--teal), var(--gold));
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 15px;
}

.timeline-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: var(--teal);
  border: 4px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  font-size: .72rem;
  font-weight: 850;
}

.timeline-copy h4 {
  margin: 2px 0 5px;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: .96rem;
}

.timeline-copy p {
  margin: 0;
  color: #536a79;
  font-size: .88rem;
}

.time-pill {
  padding: 5px 9px;
  color: var(--navy);
  background: #fff3d6;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 850;
  white-space: nowrap;
}

.differentiation {
  margin-top: 24px;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.diff-card {
  padding: 18px;
  border-radius: 15px;
}

.diff-card:nth-child(1) { background: #edf7fb; }
.diff-card:nth-child(2) { background: var(--aqua-soft); }
.diff-card:nth-child(3) { background: #fff5df; }

.diff-card span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.diff-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: .9rem;
}

.diff-card p {
  margin: 0;
  color: #536a79;
  font-size: .81rem;
  line-height: 1.55;
}

.lesson-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.assessment-panel,
.isat-panel,
.tool-bridge {
  padding: 22px;
  border-radius: 17px;
}

.assessment-panel {
  border: 1px solid var(--line);
  background: #fbfdfd;
}

.isat-panel {
  border: 1px solid #b7dcda;
  background: var(--aqua-soft);
}

.isat-words {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0 0 13px;
  list-style: none;
}

.isat-words li {
  padding: 6px 10px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid #c9e5e2;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 750;
}

.isat-panel p {
  margin: 0;
  color: #4d6675;
  font-size: .84rem;
}

.tool-bridge {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-column: 1 / -1;
  align-items: center;
  gap: 20px;
  color: var(--white);
  background: var(--navy);
}

.tool-bridge h3 {
  margin-bottom: 6px;
  color: var(--white);
}

.tool-bridge p {
  margin: 0;
  color: #c8d8e2;
  font-size: .86rem;
}

.tool-bridge a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--navy);
  background: var(--gold);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.live-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--white);
  background: var(--teal);
}

.workspace-launchers {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.student-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--navy);
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 8px 20px rgba(242, 184, 75, .22);
}

.student-button:hover {
  border-color: #ffd16f;
  background: #ffd16f;
}

.saved-section {
  padding: 88px 0;
  background: var(--white);
}

.section-heading {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: end;
  gap: 52px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.section-heading > p {
  margin: 0 0 6px;
  color: var(--muted);
}

.saved-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.saved-card {
  display: flex;
  min-height: 225px;
  flex-direction: column;
  padding: 21px;
  border: 1px solid var(--line);
  background: #fbfdfd;
  border-radius: 17px;
  box-shadow: var(--shadow-sm);
}

.saved-card-meta {
  color: var(--teal-dark);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.saved-card h3 {
  margin: 12px 0 8px;
  font-size: 1.24rem;
}

.saved-card p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.saved-actions {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding-top: 17px;
}

.saved-actions button {
  min-height: 37px;
  padding: 7px 11px;
  color: var(--navy);
  border-color: var(--line);
  background: var(--white);
}

.saved-actions .delete-saved {
  color: var(--red);
  margin-left: auto;
}

.saved-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 42px 24px;
  color: var(--muted);
  border: 1px dashed #b9cbd1;
  background: #fbfdfd;
  border-radius: 17px;
  text-align: left;
}

.saved-empty[hidden] {
  display: none;
}

.saved-empty > span {
  color: var(--teal);
  font-size: 2.4rem;
}

.saved-empty strong {
  color: var(--navy);
}

.saved-empty p {
  margin: 3px 0 0;
  font-size: .86rem;
}

body > footer {
  color: #bccbd4;
  background: var(--navy-deep);
}

.footer-inner {
  display: grid;
  min-height: 116px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-size: .78rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner strong {
  color: var(--white);
}

.footer-inner a {
  justify-self: end;
  color: var(--gold);
  font-weight: 800;
}

.live-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 0;
  margin: 0;
  color: var(--white);
  border: 0;
  background: var(--navy-deep);
}

.live-dialog::backdrop {
  background: rgba(4, 19, 31, .78);
  backdrop-filter: blur(9px);
}

.live-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 10% 20%, rgba(11, 146, 148, .25), transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(242, 184, 75, .16), transparent 26%),
    var(--navy-deep);
}

.live-header,
.live-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border-color: rgba(255, 255, 255, .11);
  border-style: solid;
  border-width: 0 0 1px;
  background: rgba(5, 32, 51, .72);
}

.live-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-header-actions button,
.live-controls button {
  color: #e9f3f6;
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
}

.live-header-actions button:hover,
.live-controls button:hover {
  background: rgba(255, 255, 255, .15);
}

.live-header-actions .close-button {
  width: 44px;
  padding: 0;
  font-size: 1.7rem;
}

.live-main {
  display: flex;
  width: min(1100px, calc(100% - 48px));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  padding: 54px 0;
  text-align: center;
}

.live-progress {
  width: min(620px, 100%);
  height: 7px;
  margin-bottom: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
}

.live-progress span {
  display: block;
  width: 33.333%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: inherit;
  transition: width .35s ease;
}

.live-step-label {
  margin-bottom: 11px;
  color: var(--gold);
  font-size: .84rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.live-main h2 {
  max-width: 980px;
  margin-bottom: 17px;
  color: var(--white);
  font-size: clamp(3rem, 8vw, 7rem);
}

.live-instruction {
  max-width: 960px;
  margin-bottom: 28px;
  color: #ccdae2;
  font-size: clamp(1.05rem, 2.2vw, 1.65rem);
  line-height: 1.55;
}

.live-timer {
  color: var(--white);
  font-family: "Manrope", sans-serif;
  font-size: clamp(5rem, 15vw, 12rem);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: -.07em;
  line-height: .95;
  text-shadow: 0 14px 45px rgba(0, 0, 0, .25);
}

.live-timer.is-ending {
  color: var(--gold);
}

.live-timer.is-finished {
  color: #ff8f80;
}

.live-tip {
  max-width: 780px;
  min-height: 28px;
  margin: 23px 0 0;
  color: #9fb8c5;
  font-size: .9rem;
}

.live-controls {
  border-width: 1px 0 0;
}

.timer-controls {
  display: flex;
  gap: 8px;
}

.live-controls .timer-primary {
  min-width: 150px;
  color: var(--navy);
  border-color: var(--gold);
  background: var(--gold);
}

.live-controls button:disabled {
  cursor: default;
  opacity: .38;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 700;
  max-width: min(390px, calc(100% - 44px));
  padding: 13px 17px;
  color: var(--white);
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  padding: 13px 17px;
  color: var(--white);
  background: var(--red);
  border-radius: 10px;
}

.student-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 0;
  margin: 0;
  color: var(--ink);
  border: 0;
  background: #edf7f6;
}

.student-dialog::backdrop {
  background: rgba(4, 19, 31, .82);
  backdrop-filter: blur(9px);
}

.student-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
  background:
    radial-gradient(circle at 96% 12%, rgba(242, 184, 75, .16), transparent 22%),
    linear-gradient(145deg, #f7fbfa, #eaf6f5);
}

.student-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 13px 24px;
  color: var(--white);
  background: var(--navy-deep);
  box-shadow: 0 8px 25px rgba(7, 40, 63, .14);
}

.student-brand {
  display: flex;
  min-width: 230px;
  align-items: center;
  gap: 12px;
}

.student-brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: 13px;
  font-size: 1.35rem;
  font-weight: 900;
}

.student-brand div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.student-brand strong {
  font-family: "Manrope", sans-serif;
  font-size: .98rem;
}

.student-brand small {
  overflow: hidden;
  margin-top: 2px;
  color: #9fb8c5;
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.student-header-actions button {
  min-height: 40px;
  padding: 8px 11px;
  color: #e8f2f5;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  border-radius: 10px;
  font-size: .76rem;
  font-weight: 750;
}

.student-header-actions button:hover,
.student-header-actions button[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .16);
}

.student-header-actions .student-close {
  width: 42px;
  padding: 0;
  color: var(--white);
  font-size: 1.65rem;
}

.student-main {
  width: min(1560px, calc(100% - 48px));
  margin-inline: auto;
  padding: 24px 0 30px;
}

.student-progress {
  height: 8px;
  overflow: hidden;
  margin-bottom: 21px;
  background: #d7e6e7;
  border-radius: 999px;
}

.student-progress span {
  display: block;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: inherit;
  transition: width .3s ease;
}

.student-titlebar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
}

.student-titlebar p {
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: .77rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.student-titlebar h2 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.35rem, 4.6vw, 5rem);
}

.student-lesson-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.student-lesson-badges span {
  padding: 7px 11px;
  color: #476171;
  border: 1px solid #cddfe1;
  background: rgba(255, 255, 255, .76);
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
}

.student-step-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 13px;
}

.student-step-nav button {
  display: flex;
  min-width: 0;
  min-height: 66px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #577080;
  border: 1px solid #d3e1e3;
  background: rgba(255, 255, 255, .76);
  border-radius: 14px;
  text-align: left;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.student-step-nav button:hover {
  border-color: #9ebfc1;
  transform: translateY(-2px);
}

.student-step-nav button > span {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  background: #eef5f5;
  border-radius: 10px;
  font-size: 1.08rem;
}

.student-step-nav button b {
  overflow: hidden;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-step-nav button.active {
  color: var(--white);
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: 0 12px 26px rgba(11, 53, 87, .17);
}

.student-step-nav button.active > span {
  background: rgba(255, 255, 255, .14);
}

.student-step-nav button.complete:not(.active) {
  color: #14724f;
  border-color: #b8dfcf;
  background: #effaf5;
}

.student-task-card {
  --task-accent: var(--teal);
  position: relative;
  display: grid;
  min-height: 390px;
  overflow: hidden;
  grid-template-columns: minmax(150px, .25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  padding: clamp(32px, 5vw, 70px);
  border: 1px solid color-mix(in srgb, var(--task-accent) 28%, #dbe5e8);
  background:
    radial-gradient(circle at 93% 8%, color-mix(in srgb, var(--task-accent) 12%, transparent), transparent 27%),
    var(--white);
  border-radius: 27px;
  box-shadow: 0 22px 60px rgba(11, 53, 87, .1);
}

.student-task-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--task-accent);
  content: "";
}

.student-task-card.task-observe { --task-accent: #1686aa; }
.student-task-card.task-talk { --task-accent: #8a5db2; }
.student-task-card.task-work { --task-accent: #0b9294; }
.student-task-card.task-show { --task-accent: #d88a16; }
.student-task-card.task-finish { --task-accent: #239768; }

.student-task-icon {
  display: grid;
  width: clamp(125px, 13vw, 190px);
  aspect-ratio: 1;
  place-items: center;
  color: var(--navy);
  background: color-mix(in srgb, var(--task-accent) 12%, white);
  border: 2px solid color-mix(in srgb, var(--task-accent) 30%, white);
  border-radius: 36px;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--task-accent) 15%, transparent);
  font-size: clamp(3.8rem, 7vw, 6.8rem);
}

.student-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.student-task-meta span {
  padding: 6px 10px;
  color: color-mix(in srgb, var(--task-accent) 75%, var(--navy));
  background: color-mix(in srgb, var(--task-accent) 9%, white);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 850;
}

.student-task-copy h3 {
  max-width: 1000px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 4.7vw, 5rem);
}

.student-task-copy > p {
  max-width: 1080px;
  margin-bottom: 21px;
  color: #3f596b;
  font-size: clamp(1.2rem, 2vw, 1.72rem);
  line-height: 1.5;
}

.student-choice-panel {
  display: grid;
  max-width: 900px;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 2px 0 20px;
}

.student-choice-panel[hidden],
.student-share-panel[hidden],
.student-step-view[hidden],
.student-station-view[hidden] {
  display: none !important;
}

.student-choice-panel span {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  color: var(--navy);
  border: 1px solid #d3e2e3;
  background: #f8fbfb;
  border-radius: 13px;
  font-size: .9rem;
  font-weight: 800;
}

.student-choice-panel b {
  font-size: 1.4rem;
}

.student-word-bank {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.student-word-bank span {
  margin-right: 2px;
  color: #718592;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.student-word-bank b {
  padding: 6px 10px;
  color: var(--navy);
  background: var(--aqua-soft);
  border: 1px solid #c9e3e1;
  border-radius: 999px;
  font-size: .76rem;
}

.student-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 13px;
  padding-top: 15px;
}

.student-controls > button,
.student-timer-box button {
  min-height: 50px;
  padding: 10px 16px;
  color: var(--navy);
  border: 1px solid #cbdcdf;
  background: rgba(255, 255, 255, .86);
  border-radius: 13px;
  font-size: .83rem;
  font-weight: 800;
}

.student-controls > button:first-child {
  justify-self: start;
}

.student-controls .student-complete-button {
  min-width: 220px;
  justify-self: end;
  color: var(--white);
  border-color: var(--teal);
  background: var(--teal);
}

.student-controls .student-complete-button.is-complete {
  border-color: #239768;
  background: #239768;
}

.student-controls button:disabled {
  cursor: default;
  opacity: .38;
}

.student-timer-box {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  background: var(--navy);
  border-radius: 15px;
  box-shadow: 0 10px 28px rgba(11, 53, 87, .15);
}

.student-timer-box strong {
  min-width: 94px;
  color: var(--white);
  font-family: "Manrope", sans-serif;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.student-timer-box strong.is-ending { color: var(--gold); }
.student-timer-box strong.is-finished { color: #ff9689; }

.student-timer-box button {
  min-height: 41px;
  padding: 7px 11px;
  color: #dfecef;
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .09);
}

.student-timer-box .student-timer-start {
  color: var(--navy);
  border-color: var(--gold);
  background: var(--gold);
}

.station-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 16px;
}

.station-intro span,
.student-station-card > small,
.student-station-finish small {
  color: var(--teal-dark);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.station-intro h3 {
  margin: 4px 0 0;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem);
}

.station-intro > p {
  max-width: 490px;
  margin: 0;
  color: var(--muted);
}

.student-station-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.student-station-card {
  display: flex;
  min-height: 365px;
  flex-direction: column;
  padding: clamp(22px, 2.5vw, 35px);
  border: 1px solid #d1e1e2;
  background: var(--white);
  border-radius: 23px;
  box-shadow: var(--shadow-sm);
}

.student-station-card:nth-child(1) { border-top: 7px solid #1686aa; }
.student-station-card:nth-child(2) { border-top: 7px solid var(--teal); }
.student-station-card:nth-child(3) { border-top: 7px solid #d88a16; }

.station-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}

.station-card-top > span {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  background: #eff7f7;
  border-radius: 17px;
  font-size: 2.1rem;
}

.station-card-top b {
  padding: 6px 10px;
  color: var(--navy);
  background: #fff2d3;
  border-radius: 999px;
  font-size: .75rem;
}

.student-station-card h4 {
  margin: 7px 0 12px;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.12;
}

.student-station-card p {
  margin: 0 0 22px;
  color: #4c6474;
  font-size: 1rem;
}

.student-station-card button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  margin-top: auto;
  color: var(--navy);
  border: 1px solid #cbdcdf;
  background: #f7fbfb;
  border-radius: 11px;
  font-size: .78rem;
  font-weight: 850;
}

.student-station-finish {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 17px 22px;
  margin-top: 13px;
  border: 1px solid #bce0d1;
  background: #f0faf5;
  border-radius: 18px;
}

.student-station-finish > span {
  font-size: 2.1rem;
}

.student-station-finish strong {
  display: block;
  margin: 2px 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.student-station-finish p {
  margin: 0;
  color: #526b79;
  font-size: .84rem;
}

.student-station-finish > b {
  color: #14724f;
  white-space: nowrap;
}

.student-share-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 24px;
  background: rgba(4, 25, 40, .82);
  backdrop-filter: blur(10px);
}

.student-share-card {
  position: relative;
  width: min(480px, 100%);
  padding: 30px;
  background: var(--white);
  border-radius: 25px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
  text-align: center;
}

.student-share-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: var(--navy);
  border: 1px solid var(--line);
  background: #f6f9f9;
  border-radius: 11px;
  font-size: 1.5rem;
}

.student-share-kicker {
  margin-bottom: 7px;
  color: var(--teal-dark);
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.student-share-card h2 {
  margin-bottom: 10px;
  font-size: 2.1rem;
}

.student-share-card > p:not(.student-share-kicker) {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .9rem;
}

.student-qr-code {
  width: min(250px, 78vw);
  margin: 0 auto 17px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 17px;
}

.student-qr-code svg {
  display: block;
  width: 100%;
  height: auto;
}

.student-share-card label {
  display: block;
  margin-bottom: 6px;
  color: #526978;
  font-size: .74rem;
  font-weight: 800;
  text-align: left;
}

.student-share-card input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: #405969;
  border: 1px solid var(--line);
  background: #f7fafb;
  border-radius: 10px;
  font-size: .76rem;
}

.student-copy-link {
  width: 100%;
  min-height: 47px;
  margin-top: 8px;
  color: var(--white);
  border: 1px solid var(--teal);
  background: var(--teal);
  border-radius: 11px;
  font-size: .84rem;
  font-weight: 850;
}

.student-share-card > small {
  display: block;
  margin-top: 12px;
  color: #718490;
  font-size: .68rem;
}

.student-dialog.is-simple .student-titlebar p,
.student-dialog.is-simple .student-lesson-badges,
.student-dialog.is-simple .student-task-meta {
  display: none;
}

.student-dialog.is-simple .student-task-card {
  min-height: 520px;
}

.student-dialog.is-simple .student-task-copy > p {
  max-width: 980px;
  font-size: clamp(1.45rem, 2.7vw, 2.25rem);
}

.student-dialog.is-simple .student-word-bank b {
  padding: 8px 12px;
  font-size: .95rem;
}

.student-print-sheet {
  display: none;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(36, 170, 121, .55); }
  70% { box-shadow: 0 0 0 8px rgba(36, 170, 121, 0); }
  100% { box-shadow: 0 0 0 0 rgba(36, 170, 121, 0); }
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .intro-facts {
    max-width: 620px;
  }

  .builder-layout {
    grid-template-columns: 1fr;
  }

  .builder-panel {
    position: static;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .saved-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .student-header {
    align-items: flex-start;
  }

  .student-task-card {
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 32px;
  }

  .student-task-icon {
    width: 125px;
    border-radius: 28px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 30px, 1460px);
  }

  .header-inner {
    min-height: 70px;
  }

  .app-header nav a:not(.back-link) {
    display: none;
  }

  .app-header .back-link {
    padding: 9px 13px;
    font-size: .78rem;
  }

  .brand-copy small {
    display: none;
  }

  .tool-intro {
    padding: 45px 0 38px;
  }

  .tool-intro h1 {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }

  .intro-facts div {
    min-height: 96px;
  }

  .builder-section {
    padding-top: 24px;
  }

  .builder-panel {
    padding: 20px;
    border-radius: 20px;
  }

  .field-row,
  .lesson-overview,
  .lesson-bottom-grid,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    grid-template-columns: 1fr;
  }

  .lesson-workspace {
    border-radius: 20px;
  }

  .workspace-topbar,
  .workspace-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-launchers {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .lesson-sheet {
    min-height: 0;
    padding: 18px;
  }

  .lesson-hero {
    padding: 23px;
  }

  .timeline-item {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-list::before {
    left: 20px;
  }

  .time-pill {
    justify-self: start;
    grid-column: 2;
  }

  .diff-grid,
  .saved-list {
    grid-template-columns: 1fr;
  }

  .tool-bridge {
    grid-template-columns: 1fr;
  }

  .tool-bridge a {
    justify-self: start;
  }

  .section-heading {
    gap: 13px;
  }

  .saved-empty {
    align-items: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 30px 0;
    text-align: center;
  }

  .footer-inner a {
    justify-self: center;
  }

  .live-header,
  .live-controls {
    padding: 14px 16px;
  }

  .live-header-actions #fullscreen-button {
    display: none;
  }

  .live-main {
    width: min(100% - 30px, 1100px);
    padding: 35px 0;
  }

  .live-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .timer-controls {
    order: -1;
    grid-column: 1 / -1;
  }

  .timer-controls button {
    flex: 1;
  }

  .student-header {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
    padding: 12px 15px;
  }

  .student-brand {
    min-width: 0;
  }

  .student-header-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .student-header-actions button {
    min-width: 0;
    padding-inline: 7px;
  }

  #student-fullscreen-button {
    display: none;
  }

  .student-main {
    width: min(100% - 30px, 1560px);
    padding-top: 17px;
  }

  .student-titlebar,
  .station-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .student-titlebar h2 {
    font-size: clamp(2.1rem, 10vw, 3.5rem);
  }

  .student-lesson-badges {
    justify-content: flex-start;
  }

  .student-step-nav {
    display: flex;
    padding-bottom: 7px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .student-step-nav button {
    min-width: 150px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .student-task-card,
  .student-dialog.is-simple .student-task-card {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 26px 22px;
  }

  .student-task-icon {
    width: 88px;
    border-radius: 22px;
    font-size: 3.2rem;
  }

  .student-task-copy h3 {
    font-size: clamp(2rem, 10vw, 3.4rem);
  }

  .student-choice-panel {
    grid-template-columns: 1fr;
  }

  .student-controls {
    grid-template-columns: 1fr 1fr;
  }

  .student-timer-box {
    order: -1;
    grid-column: 1 / -1;
    justify-content: center;
  }

  .student-controls > button:first-child,
  .student-controls .student-complete-button {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .student-station-grid {
    grid-template-columns: 1fr;
  }

  .student-station-card {
    min-height: 0;
  }

  .student-station-finish {
    align-items: start;
    grid-template-columns: auto 1fr;
  }

  .student-station-finish > b {
    grid-column: 2;
  }
}

@media (max-width: 460px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice-card > span {
    min-height: 62px;
  }

  .duration-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-facts {
    grid-template-columns: 1fr;
  }

  .intro-facts div {
    min-height: 72px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .intro-facts div:last-child {
    border-bottom: 0;
  }

  .workspace-actions button {
    padding-inline: 6px;
  }

  .student-header-actions {
    grid-template-columns: 1fr 1fr;
  }

  .student-header-actions .student-close {
    width: 100%;
  }

  .student-task-card {
    border-radius: 21px;
  }

  .student-task-copy > p,
  .student-dialog.is-simple .student-task-copy > p {
    font-size: 1.16rem;
  }

  .student-controls {
    grid-template-columns: 1fr;
  }

  .student-timer-box {
    grid-column: 1;
  }

  .student-share-panel {
    padding: 12px;
  }

  .student-share-card {
    padding: 27px 18px 22px;
    border-radius: 20px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 13mm;
  }

  body {
    color: #111;
    background: #fff;
    font-size: 11pt;
  }

  .app-header,
  .tool-intro,
  .builder-panel,
  .workspace-topbar,
  .workspace-footer,
  .saved-section,
  body > footer,
  .toast,
  .live-dialog,
  .noscript {
    display: none !important;
  }

  .builder-section {
    padding: 0;
    background: #fff;
  }

  .page-shell,
  .builder-layout {
    display: block;
    width: 100%;
  }

  .lesson-workspace,
  .lesson-sheet {
    min-height: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .lesson-hero {
    color: #111;
    border: 2px solid #0b3557;
    background: #eef8f7;
    break-inside: avoid;
  }

  .lesson-hero h2,
  .lesson-hero > p {
    color: #111;
  }

  .lesson-meta span {
    color: #111;
    border-color: #999;
    background: #fff;
  }

  .lesson-section,
  .timeline-item,
  .diff-card,
  .assessment-panel,
  .isat-panel,
  .tool-bridge {
    color: #111;
    border: 1px solid #aaa;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
  }

  .tool-bridge h3,
  .tool-bridge p {
    color: #111;
  }

  .tool-bridge a {
    display: none;
  }

  .timeline-list::before {
    background: #999;
  }
}

@media print {
  body.print-student {
    color: #111;
    background: #fff;
    font-size: 10pt;
  }

  body.print-student > *:not(.student-dialog) {
    display: none !important;
  }

  body.print-student > .student-dialog {
    position: static;
    display: block !important;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    color: #111;
    background: #fff;
  }

  body.print-student .student-shell,
  body.print-student .student-share-panel {
    display: none !important;
  }

  body.print-student .student-print-sheet {
    display: block !important;
  }

  .student-print-sheet > header {
    display: grid;
    grid-template-columns: 1fr 105px;
    align-items: start;
    gap: 18px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 3px solid #0b3557;
  }

  .student-print-sheet header small {
    color: #087679;
    font-size: 8pt;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .student-print-sheet header h1 {
    margin: 4px 0 5px;
    color: #0b3557;
    font-size: 24pt;
  }

  .student-print-sheet header p {
    margin: 0;
    color: #405969;
  }

  .print-qr svg {
    display: block;
    width: 96px;
    height: 96px;
  }

  .print-qr span {
    display: block;
    margin-top: 2px;
    font-size: 7pt;
    text-align: center;
  }

  .print-task-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .print-task-grid article {
    min-height: 160px;
    padding: 12px;
    border: 1px solid #9aafb7;
    border-radius: 9px;
    break-inside: avoid;
  }

  .print-task-grid article:last-child {
    grid-column: 1 / -1;
    min-height: 130px;
  }

  .print-task-top {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .print-task-top > span {
    font-size: 18pt;
  }

  .print-task-top b {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: #fff;
    background: #0b3557;
    border-radius: 50%;
  }

  .print-task-top small {
    margin-left: auto;
    font-weight: 800;
  }

  .print-task-grid h2 {
    margin: 7px 0 5px;
    color: #0b3557;
    font-size: 15pt;
  }

  .print-task-grid p {
    margin: 0;
    line-height: 1.4;
  }

  .print-task-grid ul {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0;
    margin: 8px 0 0;
    list-style: none;
  }

  .print-task-grid li {
    padding: 3px 6px;
    border: 1px solid #bbc8cc;
    border-radius: 999px;
    font-size: 8pt;
  }

  .student-print-sheet > footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
    margin-top: 10px;
    color: #405969;
    border-top: 1px solid #9aafb7;
    font-size: 8pt;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Námsbrú v3.2 · Verkefnavélin */
.task-engine-settings {
  position: relative;
  padding: 18px;
  margin: 2px 0 23px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    radial-gradient(circle at 100% 0, rgba(242, 184, 75, .24), transparent 38%),
    linear-gradient(145deg, var(--navy), #0a4766);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(7, 40, 63, .16);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.engine-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.engine-heading > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.engine-heading strong {
  color: var(--white);
  font-family: "Manrope", "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.25;
}

.engine-heading small {
  margin-top: 2px;
  color: #b8dcdd;
  font-size: .73rem;
  line-height: 1.35;
}

.engine-spark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: 9px;
}

.engine-intro {
  margin: 0 0 15px;
  color: #dcecef;
  font-size: .82rem;
  line-height: 1.55;
}

.engine-field-grid {
  display: grid;
  gap: 10px;
}

.task-engine-settings .form-field > span {
  margin-bottom: 5px;
  color: #dcecef;
  font-size: .75rem;
}

.task-engine-settings .form-field select {
  min-height: 44px;
  color: var(--navy);
  border-color: rgba(255, 255, 255, .24);
  background: var(--white);
  font-size: .84rem;
}

.engine-quality {
  display: flex;
  gap: 9px;
  padding-top: 13px;
  margin: 15px 0 0;
  color: #cfe5e6;
  border-top: 1px solid rgba(255, 255, 255, .13);
  font-size: .73rem;
  line-height: 1.45;
}

.engine-quality > span:first-child {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: 50%;
  font-weight: 900;
}

.engine-quality strong {
  color: var(--white);
}

.generated-task-pack {
  padding: 24px;
  margin-top: 26px;
  border: 1px solid #c8e1e1;
  background:
    radial-gradient(circle at 95% 4%, rgba(242, 184, 75, .18), transparent 24%),
    linear-gradient(180deg, #f3fbfa, #fff 28%);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(11, 53, 87, .08);
}

.task-pack-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 18px;
  margin-bottom: 17px;
  border-bottom: 1px solid #d4e5e5;
}

.task-pack-heading > div:first-child > p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 5px;
  color: var(--teal-dark);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.task-pack-heading > div:first-child > p span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: 8px;
}

.task-pack-heading h3 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.task-pack-tags,
.generated-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-pack-tags span,
.generated-task-meta span {
  padding: 4px 8px;
  color: #476273;
  border: 1px solid #d2e3e3;
  background: rgba(255, 255, 255, .9);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
}

.task-pack-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.task-pack-actions button {
  min-height: 42px;
  padding: 8px 12px;
  color: var(--navy);
  border: 1px solid #bdd7d8;
  background: var(--white);
  border-radius: 11px;
  font-size: .75rem;
  font-weight: 850;
}

.task-pack-actions button:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}

.task-pack-actions .task-edit-button {
  color: var(--white);
  border-color: var(--teal);
  background: var(--teal);
}

.generated-task-list {
  display: grid;
  gap: 12px;
}

.generated-task-card {
  --card-accent: var(--teal);
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 16px;
}

.generated-task-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--card-accent);
  content: "";
}

.generated-task-card.task-card-observe { --card-accent: #1686aa; }
.generated-task-card.task-card-talk { --card-accent: #8a5db2; }
.generated-task-card.task-card-work { --card-accent: #0b9294; }
.generated-task-card.task-card-show { --card-accent: #d88a16; }
.generated-task-card.task-card-finish { --card-accent: #239768; }

.generated-task-number {
  display: grid;
  width: 48px;
  height: 48px;
  grid-template-columns: 1fr;
  place-items: center;
  align-content: center;
  color: var(--navy);
  background: color-mix(in srgb, var(--card-accent) 10%, white);
  border-radius: 14px;
  line-height: 1;
}

.generated-task-number span {
  font-size: 1.15rem;
}

.generated-task-number b {
  margin-top: 3px;
  font-size: .67rem;
}

.generated-task-content h4 {
  margin: 8px 0 5px;
  color: var(--navy);
  font-size: 1rem;
}

.generated-task-content > p {
  margin: 0;
  color: #496273;
  font-size: .88rem;
  line-height: 1.6;
}

.generated-task-outcome {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr);
  gap: 8px;
  margin-top: 12px;
}

.generated-task-outcome > span {
  padding: 10px 12px;
  border: 1px solid #e0e9ea;
  background: #f8fbfb;
  border-radius: 11px;
}

.generated-task-outcome small {
  display: block;
  margin-bottom: 2px;
  color: #708491;
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.generated-task-outcome b {
  display: block;
  color: #304d60;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.45;
}

.generated-task-content details {
  padding-top: 9px;
  margin-top: 9px;
  border-top: 1px dashed #d4e0e2;
}

.generated-task-adaptations {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.generated-task-adaptations p {
  padding: 9px 11px;
  margin: 0;
  color: #476273;
  border-left: 3px solid var(--teal);
  background: var(--aqua-soft);
  border-radius: 0 9px 9px 0;
  font-size: .75rem;
  line-height: 1.5;
}

.generated-task-adaptations p:nth-child(2) {
  border-left-color: var(--gold);
  background: #fff8e8;
}

.generated-task-adaptations span {
  margin-right: 6px;
  color: var(--navy);
  font-weight: 850;
}

.generated-task-content summary {
  color: var(--teal-dark);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 850;
}

.generated-task-content details p {
  margin: 7px 0 0;
  color: #566c7b;
  font-size: .78rem;
}

.task-pack-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 13px;
  margin: 14px 0 0;
  color: #526c79;
  background: #fff7e5;
  border-radius: 12px;
  font-size: .75rem;
}

.task-pack-note span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--white);
  background: #d88a16;
  border-radius: 50%;
  font-weight: 900;
}

.task-edit-dialog {
  width: min(920px, calc(100% - 28px));
  max-height: min(88vh, 920px);
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.task-edit-dialog::backdrop {
  background: rgba(7, 40, 63, .72);
  backdrop-filter: blur(5px);
}

.task-edit-shell {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.task-edit-shell > header,
.task-edit-shell > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--white);
}

.task-edit-shell > header {
  color: var(--white);
  background: var(--navy);
}

.task-edit-shell > header p {
  margin: 0 0 3px;
  color: #80d3cf;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.task-edit-shell > header h2 {
  margin: 0;
  color: var(--white);
  font-size: 1.45rem;
}

.task-edit-close {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  border-radius: 12px;
  font-size: 1.6rem;
}

.task-edit-help {
  padding: 13px 22px;
  margin: 0;
  color: #506878;
  border-bottom: 1px solid var(--line);
  background: var(--aqua-soft);
  font-size: .85rem;
}

.task-edit-fields {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  overflow-y: auto;
  background: #f6f9f9;
}

.task-edit-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 14px;
}

.task-edit-item legend {
  display: block;
  width: auto;
  padding: 0 5px;
  margin: 0 0 0 -5px;
  color: var(--navy);
  font-size: .82rem;
}

.task-edit-item label {
  color: #405b6d;
  font-size: .75rem;
  font-weight: 800;
}

.task-edit-item input,
.task-edit-item textarea {
  display: block;
  width: 100%;
  padding: 10px 11px;
  margin-top: 5px;
  color: var(--ink);
  border: 1px solid #cedcdf;
  background: #fbfdfd;
  border-radius: 10px;
  font: inherit;
  font-size: .88rem;
  line-height: 1.5;
  resize: vertical;
}

.task-edit-item input:focus,
.task-edit-item textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(11, 146, 148, .12);
}

.task-edit-shell > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.task-edit-shell > footer button {
  width: auto;
  min-height: 45px;
  margin: 0;
}

.student-task-details {
  display: grid;
  max-width: 1000px;
  grid-template-columns: minmax(170px, .65fr) minmax(260px, 1.35fr);
  gap: 9px;
  margin-top: 19px;
}

.student-task-details p {
  padding: 11px 13px;
  margin: 0;
  border: 1px solid #d8e4e5;
  background: #f9fbfb;
  border-radius: 13px;
}

.student-task-details span {
  display: block;
  margin-bottom: 2px;
  color: #6b808e;
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.student-task-details b {
  display: block;
  color: var(--navy);
  font-size: clamp(.8rem, 1.2vw, 1rem);
  line-height: 1.45;
}

@media (max-width: 980px) {
  .task-pack-heading {
    flex-direction: column;
  }

  .task-pack-actions {
    width: 100%;
  }

  .task-pack-actions button {
    flex: 1;
  }
}

@media (max-width: 680px) {
  .generated-task-pack {
    padding: 16px;
    border-radius: 17px;
  }

  .task-pack-actions,
  .generated-task-outcome,
  .student-task-details {
    grid-template-columns: 1fr;
  }

  .task-pack-actions {
    display: grid;
  }

  .generated-task-card {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 14px 12px;
  }

  .generated-task-number {
    width: 38px;
    height: 44px;
  }

  .task-edit-shell > header,
  .task-edit-shell > footer,
  .task-edit-fields,
  .task-edit-help {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media print {
  .generated-task-pack {
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }

  .task-pack-actions,
  .task-pack-note,
  .generated-task-content details,
  .task-edit-dialog {
    display: none !important;
  }

  .generated-task-card {
    color: #111;
    border-color: #999;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
  }
}
