@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand Tokens */
  --green: #0f4c3a;
  --green-hover: #08382b;
  --green-light: #ecfdf5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --ink: #0f172a;
  --muted: #475569;
  --muted-light: #94a3b8;
  --paper: #f8fafc;
  --white: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --lime: #d1fae5;
  --lime-ink: #065f46;
  --orange: #fef3c7;
  --orange-ink: #92400e;

  /* Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 28px -6px rgba(15, 23, 42, 0.09), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 20px 36px -8px rgba(15, 76, 58, 0.14), 0 6px 16px -4px rgba(15, 23, 42, 0.06);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--green);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--emerald-600);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ba5800;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  background: #ffffff;
  color: var(--green);
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  z-index: 999;
  border: 2px solid var(--green);
}

/* Header & Navigation Bar */
body > header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  background: #ffffff;
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
  margin: 0;
}

nav {
  max-width: 1180px;
  margin: auto;
  padding: 14px 28px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.brand {
  font-weight: 850;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--green);
  text-decoration: none;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.brand:hover {
  color: var(--green);
  opacity: 0.92;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--emerald-500), var(--green));
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

nav a:not(.brand) {
  color: #334155;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.16s ease;
}

nav a:not(.brand):hover {
  color: var(--green);
  background: #f1f5f9;
}

nav a.nav-cta,
nav a[href*="classes.readernook.com"] {
  background: var(--green);
  color: #ffffff !important;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(15, 76, 58, 0.2);
  transition: all 0.16s ease;
  text-decoration: none;
}

nav a.nav-cta:hover,
nav a[href*="classes.readernook.com"]:hover {
  background: var(--green-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 76, 58, 0.28);
}

nav button.secondary {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  box-shadow: var(--shadow-xs);
  transition: all 0.16s ease;
}

nav button.secondary:hover {
  color: var(--green);
  border-color: var(--green);
  background: #f8fafc;
  transform: translateY(-1px);
}

/* Main Content Layout */
main {
  max-width: 1180px;
  margin: auto;
  padding: 40px 28px 76px;
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 800;
}

h1 {
  font-size: clamp(1.95rem, 3.8vw, 2.75rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
  max-width: 980px;
  margin: 14px 0 18px;
  word-break: normal;
  overflow-wrap: normal;
}

h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: 10px;
}

p {
  max-width: 78ch;
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--ink);
}

/* Eyebrow & Badges - Compact Pill Styling */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 0.76rem;
  color: var(--green);
  background: rgba(15, 76, 58, 0.08);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
  align-self: flex-start;
  box-shadow: var(--shadow-xs);
}

.lead {
  font-size: 1.22rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 22px;
}

.hero {
  padding: 16px 0 32px;
}

.hero p a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.hero p a:hover {
  color: var(--green);
  background: rgba(15, 76, 58, 0.08);
  border-color: rgba(15, 76, 58, 0.2);
}

.hero > a:not(.button) {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: #ffffff;
  color: var(--green);
  border: 1.5px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.94rem;
  box-shadow: var(--shadow-xs);
  margin-left: 10px;
  transition: all 0.18s ease;
}

.hero > a:not(.button):hover {
  background: #f8fafc;
  border-color: var(--green);
  transform: translateY(-1px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lime);
  color: var(--lime-ink);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 14px;
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  width: fit-content;
  align-self: flex-start;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.card,
section.panel {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
}

.grid .card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.grid .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(16, 185, 129, 0.4);
}

.card h2 {
  font-size: 1.55rem;
  margin-top: 6px;
  margin-bottom: 12px;
}

.card h2 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

.card h2 a:hover {
  color: var(--green);
}

.card p {
  color: var(--muted);
}

/* Callout Notes */
.note {
  border-left: 5px solid var(--emerald-500);
  padding: 18px 22px;
  background: #ffffff;
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-xs);
  margin: 24px 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.note strong {
  color: var(--green);
}

.draft {
  border-left-color: #f59e0b;
  background: #fffdf5;
  border-color: #fed7aa;
}

/* Primary & Secondary Buttons */
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 9px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(15, 76, 58, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.button:hover,
button:hover {
  background: var(--green-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 76, 58, 0.26);
}

.button:active,
button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 76, 58, 0.2);
}

.secondary {
  background: var(--white);
  color: var(--green);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.secondary:hover {
  background: #f8fafc;
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-1px);
}

/* Card Actions - Styled Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 4px;
  align-items: center;
}

.grid .card .actions {
  margin-top: auto;
  padding-top: 18px;
}

.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.actions a:first-child {
  background: var(--green);
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 4px rgba(15, 76, 58, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.actions a:first-child:hover {
  background: var(--green-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 76, 58, 0.26);
}

.actions a:not(:first-child) {
  background: #ffffff;
  color: var(--muted);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.actions a:not(:first-child):hover {
  background: #f8fafc;
  color: var(--green);
  border-color: var(--green);
  transform: translateY(-1px);
}

/* Tables & Structured Data */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.94rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #fafaf9;
}

table td:first-child {
  font-family: var(--font-mono);
  font-weight: 750;
  color: var(--muted);
  font-size: 0.9rem;
}

table td a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(15, 76, 58, 0.06);
  color: var(--green);
  font-weight: 650;
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

table td a:hover {
  background: var(--green);
  color: #ffffff;
}

ol, ul {
  padding-left: 24px;
  margin: 12px 0;
}

li {
  margin: 7px 0;
  color: var(--ink);
}

/* Code Blocks */
pre {
  padding: 24px 26px;
  background: #090d16;
  color: #f1f5f9;
  border-radius: 14px;
  overflow: auto;
  font-size: 0.92rem;
  line-height: 1.7;
  border: 1px solid #1e293b;
  box-shadow: var(--shadow-md);
  margin: 18px 0;
}

code {
  font-family: var(--font-mono);
}

p code,
li code,
td code {
  background: #f1f5f9;
  color: #0f4c3a;
  padding: 2.5px 7px;
  border-radius: 6px;
  font-size: 0.88em;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

/* Disclosures & Accordions */
details {
  margin: 16px 0;
  padding: 0;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

details[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
  padding: 16px 20px;
  background: #f8fafc;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease;
  list-style: none;
}

summary:hover {
  background: #f1f5f9;
  color: var(--green);
}

details[open] summary {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

summary::-webkit-details-marker,
summary::marker {
  display: none !important;
  content: "" !important;
}

summary::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: 12px;
}

details[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--green);
}

details > *:not(summary) {
  padding: 18px 20px;
}

/* Checkpoints & Lesson Intro */
.checkpoint {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 18px 24px;
  margin: 20px 0;
  box-shadow: var(--shadow-xs);
  color: #065f46;
}

.lesson-intro {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf9 100%);
  border: 1.5px solid #a7f3d0;
  border-left: 5px solid var(--emerald-500);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}

.lesson-intro strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 10px;
}

.lesson-intro ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0 16px;
}

.lesson-intro li {
  position: relative;
  padding-left: 24px;
  margin: 8px 0;
  font-weight: 550;
  color: var(--ink);
}

.lesson-intro li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--emerald-600);
  font-weight: 800;
  font-size: 1rem;
}

.timing {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.lesson-section {
  scroll-margin-top: 30px;
}

/* Presentation Dock */
.lesson-nav {
  position: sticky;
  bottom: 16px;
  z-index: 70;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  border-radius: 40px;
  margin-top: 24px;
}

.lesson-nav[hidden] {
  display: none;
}

.lesson-nav [data-position] {
  font-weight: 750;
  font-size: 0.92rem;
  color: var(--ink);
}

.lesson-nav button {
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 0.9rem;
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 20px 0;
}

.block {
  padding: 9px 18px;
  border: 2px solid #245599;
  border-radius: 7px;
  background: #e4edff;
  font-weight: 650;
}

.block.event {
  background: #fff0b4;
  border-color: #9b7100;
}

.block.looks {
  background: #f0e5ff;
  border-color: #7347aa;
}

.answer-space {
  height: 65px;
  border-bottom: 1px dashed #94a3b8;
}



.presenting .lesson-section {
  font-size: 1.3rem;
  min-height: 65vh;
}

.presenting .lesson-section h2 {
  font-size: 2.3rem;
}

.presenting .hero,
.presenting .lesson-intro {
  display: none;
}

.presenting .lesson-section pre {
  font-size: 1em;
}

/* Interactive Self-Check Component */
.self-check {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 26px 28px;
  margin: 26px 0;
  box-shadow: var(--shadow-sm);
}

.self-check .question-title {
  font-weight: 750;
  font-size: 1.08rem;
  margin: 0 0 16px;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.quiz-btn {
  display: flex;
  align-items: center;
  text-align: left;
  background: #ffffff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 13px 18px;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  font-family: inherit;
  box-shadow: var(--shadow-xs);
}

.quiz-btn:hover {
  background: #f8fafc;
  border-color: var(--emerald-500);
  transform: translateX(3px);
  color: var(--ink);
}

.quiz-btn:focus-visible {
  outline: 3px solid #ba5800;
  outline-offset: 2px;
}

.quiz-btn.is-correct {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
  font-weight: 700;
  box-shadow: 0 0 0 1px #10b981;
}

.quiz-btn.is-incorrect {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
  box-shadow: 0 0 0 1px #f59e0b;
}

.quiz-btn:disabled {
  cursor: default;
  opacity: 0.85;
}

.quiz-feedback {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 14px;
}

.quiz-feedback.correct {
  background: #ecfdf5;
  border-left: 5px solid #10b981;
  color: #065f46;
}

.quiz-feedback.incorrect {
  background: #fffbeb;
  border-left: 5px solid #f59e0b;
  color: #92400e;
}

.quiz-feedback h1,
.quiz-feedback h2,
.quiz-feedback h3,
.quiz-feedback h4,
.quiz-feedback h5,
.quiz-feedback h6 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  display: inline;
}

.quiz-feedback code {
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 0.9em;
  color: inherit;
}

/* Scratch 3 Visual Blocks */
.scratch-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 16px 0;
  gap: 3px;
}

.scratch-block {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin: 2px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
  user-select: none;
  line-height: 1.35;
}

.scratch-block.event {
  background: #ffbf00;
  border: 1px solid #d49e00;
  color: #402c00;
  border-radius: 14px 14px 8px 8px;
}

.scratch-block.motion {
  background: #4c97ff;
  border: 1px solid #2f73d6;
  color: #fff;
}

.scratch-block.looks {
  background: #9966ff;
  border: 1px solid #7347cc;
  color: #fff;
}

.scratch-block.control {
  background: #ffab19;
  border: 1px solid #d98d00;
  color: #fff;
}

.scratch-block.sensing {
  background: #5cb1d6;
  border: 1px solid #3c8fae;
  color: #fff;
}

.scratch-block.operator {
  background: #59c059;
  border: 1px solid #3c993c;
  color: #fff;
}

.scratch-block.variable {
  background: #ff8c1a;
  border: 1px solid #d46b00;
  color: #fff;
}

.scratch-block.custom {
  background: #ff6680;
  border: 1px solid #d9435d;
  color: #fff;
}

.scratch-slot {
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-block;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.16);
}

.scratch-slot.dropdown {
  background: rgba(0, 0, 0, 0.18);
  color: #ffffff;
  border-radius: 10px;
  padding: 2px 8px;
}

.scratch-c-wrap {
  display: flex;
  flex-direction: column;
  border-left: 14px solid #ffab19;
  padding-left: 8px;
  margin: 2px 0 2px 5px;
}

/* Visual CSS Box Model */
.box-model-diagram {
  max-width: 520px;
  margin: 24px auto;
  font-family: var(--font-sans);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.bm-margin {
  background: #fff7ed;
  border: 2px dashed #f59e0b;
  border-radius: 14px;
  padding: 16px;
  color: #92400e;
}

.bm-border {
  background: #ffedd5;
  border: 3px solid var(--green);
  border-radius: 10px;
  padding: 14px;
  color: var(--green);
}

.bm-padding {
  background: #ecfdf5;
  border: 2px dashed var(--green);
  border-radius: 8px;
  padding: 12px;
  color: var(--green);
}

.bm-content {
  background: #ffffff;
  border: 2px solid #80b0a5;
  border-radius: 6px;
  padding: 14px;
  color: var(--ink);
  font-size: 0.95rem;
}

/* Scratch Stage Coordinate Compass */
.scratch-compass-card {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin: 22px 0;
  max-width: 520px;
  box-shadow: var(--shadow-sm);
}

.scratch-compass-card svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Milestone Checklist */
.milestone-check {
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-left: 5px solid var(--emerald-500);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 20px 0;
  box-shadow: var(--shadow-xs);
}

.milestone-check ul {
  list-style: none;
  padding-left: 0;
  margin: 10px 0 0;
}

.milestone-check li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  font-weight: 600;
}

.milestone-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  cursor: pointer;
  border-radius: 6px;
}

/* Flyer Styling (Preserving Exact Layout Dimensions for 1-Page PDFs) */
.flyer {
  max-width: 850px;
  background: #ffffff;
  border-top: 12px solid var(--green);
  margin: 30px auto;
  padding: 42px;
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow-md);
}

.flyer h1 {
  font-size: 3rem;
}

.flyer .offer {
  background: var(--green);
  color: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.flyer .offer h2 {
  font-size: 1.35rem;
  color: #ffffff;
}

.flyer .grid {
  gap: 18px;
}

.flyer h2 {
  font-size: 1.3rem;
}

.flyer .registration {
  border: 2px dashed #a5b5ab;
  padding: 18px;
  margin-top: 20px;
  border-radius: 10px;
  background: #fbfbfa;
}

.flyer .registration p {
  margin: 5px 0;
}

.flyer ul {
  margin-top: 8px;
}

.flyer .lead {
  font-size: 1.1rem;
}

.flyer footer {
  font-size: 0.8rem;
  margin-top: 20px;
  color: var(--muted);
}

/* Curated References Panel */
.references-panel {
  margin-top: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}

.references-panel h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  color: var(--ink);
  font-weight: 750;
}

.references-panel p {
  margin: 0 0 12px;
  font-size: 0.93rem;
  color: var(--muted);
}

.references-panel ul {
  margin: 0;
  padding-left: 20px;
}

.references-panel li {
  margin: 6px 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
}

.references-panel a {
  font-weight: 650;
  color: var(--green);
  text-decoration: underline;
}

.references-panel a:hover {
  color: var(--green-hover);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }
  main {
    padding: 24px 18px 60px;
  }
  .card, section.panel {
    padding: 22px;
    border-radius: 14px;
  }
  .flyer {
    margin: 0;
    padding: 24px;
  }
  .flyer h1 {
    font-size: 2.2rem;
  }
  nav {
    padding: 14px 18px;
    gap: 10px;
  }
  .lesson-nav {
    flex-wrap: wrap;
    border-radius: 16px;
  }
  th, td {
    padding: 10px 12px;
  }
}

/* Blog, Educational Guides & Local SEO Enhancements */
.breadcrumb {
  margin: 0 0 20px 0;
  font-size: 0.95rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
}
.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: var(--muted-light);
}
.breadcrumb li[aria-current="page"] {
  color: var(--muted);
  font-weight: 500;
}

.blog-article {
  max-width: 860px;
  margin: 0 auto;
}
.blog-header {
  position: static !important;
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: none !important;
  z-index: auto !important;
  padding: 0 !important;
  margin-bottom: 32px;
}
.blog-header h1 {
  font-size: 2.35rem;
  line-height: 1.25;
  margin: 8px 0 16px 0;
}
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.pill-local {
  display: inline-block;
  padding: 3px 10px;
  background: var(--green-light);
  color: var(--green);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--lime);
}

.local-callout {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-left: 4px solid var(--emerald-600);
  margin: 28px 0;
  padding: 24px;
}
.local-callout h2 {
  font-size: 1.35rem;
  margin-top: 0;
  color: var(--green);
}

.blog-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.blog-card {
  display: flex;
  flex-direction: column;
}
.blog-card h2 {
  font-size: 1.3rem;
  line-height: 1.35;
  margin: 8px 0;
}
.blog-meta-card {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.blog-card .actions {
  margin-top: auto;
  padding-top: 14px;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: none;
  user-select: none;
  transition: background 0.15s ease;
}
.faq-item summary:hover {
  background: #f8fafc;
}
.faq-item[open] summary {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.faq-item summary::-webkit-details-marker,
.faq-item summary::marker {
  display: none !important;
  content: "" !important;
}
.faq-item summary h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.4;
}
.faq-item summary::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border: none;
  border-right: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green);
  transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
  margin-left: 16px;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--green);
}
.faq-answer {
  padding: 16px 20px 18px;
  border-top: none;
  margin-top: 0;
  background: #f8fafc;
  color: var(--ink-light);
  line-height: 1.6;
}
.faq-answer p {
  margin: 0;
}

.cta-panel {
  text-align: center;
  background: linear-gradient(135deg, #0f4c3a 0%, #064e3b 100%);
  color: var(--white);
  padding: 36px 28px;
  border-radius: 16px;
  margin: 36px 0;
}
.cta-panel h2 {
  color: var(--white);
  font-size: 1.8rem;
  margin-top: 0;
}
.cta-panel .lead {
  color: #d1fae5;
  max-width: 640px;
  margin: 0 auto 24px auto;
}
.cta-panel .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.cta-panel .button {
  background: var(--white);
  color: var(--green);
  font-weight: 700;
}
.cta-panel .button:hover {
  background: #f0fdf4;
}
.cta-panel .secondary {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}
.cta-panel .secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.footer, footer {
  width: 100%;
  background: #091e17;
  border-top: 3px solid var(--emerald-500);
  padding: 48px 0 42px;
  color: #cbd5e1;
  font-size: 0.92rem;
  text-align: center;
  margin-top: 64px;
  box-sizing: border-box;
}

.footer-wrap {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
  padding: 0 28px;
  box-sizing: border-box;
}

.footer-tagline {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.footer-tagline strong {
  color: #34d399;
}

.footer-local {
  font-size: 0.92rem;
  color: #94a3b8;
  margin: 0 0 22px 0;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.footer-nav a,
footer a,
.footer a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.16s ease;
}

.footer-nav a:hover,
footer a:hover,
.footer a:hover {
  color: #34d399;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-contact {
  font-size: 0.92rem;
  color: #94a3b8;
  margin: 0 0 18px 0;
}

.footer-contact a {
  color: #34d399;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.footer-contact a:hover {
  color: #6ee7b7;
}

.footer-copy {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  letter-spacing: 0.01em;
}

/* Strict Print Styling - Preserves Exact 1-Page Flyer Layout for A4 & Letter */
@page {
  size: auto;
  margin: 14mm;
}

@media print {
  body {
    background: white;
    font-size: 11pt;
  }
  header, .no-print, .lesson-nav, .skip {
    display: none !important;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .card, section.panel {
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
    padding: 15px;
    margin: 12px 0;
  }
  h1 {
    font-size: 28pt;
  }
  h2 {
    font-size: 19pt;
  }
  h3 {
    break-after: avoid;
  }
  a {
    color: inherit;
  }
  pre {
    white-space: pre-wrap;
    background: #f0f0f0;
    color: black;
    border: 1px solid #ccc;
  }
  .lesson-section[hidden] {
    display: block !important;
  }
  .presenting .hero, .presenting .lesson-intro {
    display: block;
  }
  .presenting .lesson-section {
    font-size: 11pt;
    min-height: 0;
  }
  .presenting .lesson-section h2 {
    font-size: 19pt;
  }
  .footer {
    padding: 10px 0;
  }
  .flyer {
    max-width: none;
    margin: 0;
    padding: 6mm 5mm;
    border-top-width: 4mm;
    font-size: 10pt;
    line-height: 1.45;
  }
  .flyer h1 {
    font-size: 28pt;
    margin: 12px 0;
  }
  .flyer .lead {
    font-size: 12pt;
  }
  .flyer .meta {
    margin: 12px 0;
  }
  .flyer .offer {
    padding: 15px;
    background: #edf2ed;
    color: black;
  }
  .flyer .grid {
    grid-template-columns: 1fr 1fr;
  }
  .flyer .registration {
    margin-top: 12px;
    padding: 12px;
  }
  .flyer h2 {
    font-size: 14pt;
  }
  .flyer footer {
    margin-top: 10px;
  }
  .flyer .pill {
    background: #eee;
  }
  .flyer .eyebrow {
    margin-top: 0;
  }
  .quiz-btn {
    border: 1px solid #aaa !important;
    background: none !important;
    color: black !important;
    padding: 4px 8px !important;
    margin: 4px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: normal !important;
  }
  .quiz-btn::before {
    content: "☐ ";
    font-size: 1.1em;
  }
  .quiz-feedback {
    display: none !important;
  }
}
