/* Lessonsmith design: green and chalk-yellow, Bricolage Grotesque headings,
   Source Sans 3 body text, IBM Plex Mono labels. */
:root {
  --bg: #F3FAF6;
  --surface: #FFFFFF;
  --ink: #10211C;
  --muted: #4E625C;
  --line: #D4E4DD;
  --accent: #137A5E;
  --accent-ink: #FFFFFF;
  --soft: #E1F4EB;
  --mint: #2DBE8F;
  --deep: #0E4D3E;
  --chalk: #F4C842;
  --chalk-ink: #1B1A12;
  --gold-text: #B8870F;
  --danger: #B3261E;
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Source Sans 3', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1613; --surface: #15221E; --ink: #E7EFEC; --muted: #97A9A3; --line: #283A35;
    --accent: #5CC4A6; --accent-ink: #08201A; --soft: #1A2F28; --mint: #3FD3A2; --deep: #0A2E25; --chalk: #E8C95A; --chalk-ink: #1B1A12; --gold-text: #F0C94A; --danger: #FF8A80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1613; --surface: #15221E; --ink: #E7EFEC; --muted: #97A9A3; --line: #283A35;
  --accent: #5CC4A6; --accent-ink: #08201A; --soft: #1A2F28; --mint: #3FD3A2; --deep: #0A2E25; --chalk: #E8C95A; --chalk-ink: #1B1A12; --gold-text: #F0C94A; --danger: #FF8A80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 64px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--ink); }
.brand svg { flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -.01em; line-height: 1; }
.tag { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.usage { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); letter-spacing: .03em; }

/* ---------- buttons ---------- */
button, .btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 12px;
  cursor: pointer; font-weight: 600; font-size: .9rem; line-height: 1.2; text-decoration: none; display: inline-block; color: var(--ink);
}
button:hover:not(:disabled), .btn:hover { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover:not(:disabled), .btn.primary:hover { filter: brightness(1.07); }
button.big, .btn.big { padding: 12px 18px; font-size: 1rem; }
button.small { padding: 6px 10px; font-size: .84rem; }
button.warn { color: var(--danger); }
button.link { border: 0; background: none; padding: 0; color: var(--muted); font-weight: 400; text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- forms ---------- */
form.stack, .stack { display: flex; flex-direction: column; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.lbl, legend {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: 0; margin-bottom: 6px; display: block; font-weight: 500;
}
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; line-height: 1.3; font-weight: 400;
}
textarea { resize: vertical; min-height: 84px; }
.hint, .fine { font-size: .84rem; color: var(--muted); font-weight: 400; margin: 0; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; }
.notice {
  border: 1px solid var(--line); border-left: 4px solid var(--chalk); border-radius: 6px;
  padding: 8px 12px; font-size: .92rem; background: var(--surface); margin: 0;
}

/* ---------- cards and marketing pages ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; min-width: 0; }
.card h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); }
.card.featured { border: 2px solid var(--accent); }
.cards.pricing { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: stretch; }
.cards.pricing .card { display: flex; flex-direction: column; position: relative; }
.card .flag.corner { position: absolute; top: -11px; left: 16px; }
.card p.price { color: var(--ink); }
.cards.pricing { padding-top: 12px; }
.cards.pricing .card ul { flex: 1; }
.cards.pricing .card button { align-self: flex-start; }
.plan-choice { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hero { padding: 64px 0 36px; text-align: center; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 5.5vw, 3.2rem);
  line-height: 1.08; letter-spacing: -.02em; margin: 14px auto 16px; max-width: 820px; text-wrap: balance;
}
.hero p.lead { color: var(--muted); font-size: 1.2rem; max-width: 640px; margin: 0 auto 26px; }
.flag {
  display: inline-block; background: var(--chalk); color: var(--chalk-ink); font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px;
}
section.block { padding: 30px 0; }
section.block > h2 { font-family: var(--font-display); font-weight: 700; text-align: center; font-size: 1.7rem; margin: 0 0 22px; }
.price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; margin: 6px 0; }
.price small { font-family: var(--font-body); font-size: 1rem; color: var(--muted); font-weight: 400; }
.card ul { padding-left: 20px; color: var(--muted); margin: 10px 0 16px; }
footer { color: var(--muted); text-align: center; padding: 40px 16px; font-size: .9rem; }
dialog {
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
  padding: 24px; width: min(420px, calc(100vw - 32px));
}
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog h2 { font-family: var(--font-display); margin: 0; }

/* ---------- header menu (Trust & safety) ---------- */
details.menu { position: relative; }
details.menu summary {
  list-style: none; cursor: pointer; padding: 8px 10px; border-radius: 8px; color: var(--accent); font-weight: 600;
}
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary::after { content: " ▾"; font-size: .8em; }
details.menu[open] summary { background: var(--soft); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(560px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgb(0 0 0 / .12);
  padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px;
}
.menu-panel a:not(.btn) { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu-panel a:not(.btn):hover { color: var(--accent); }
.menu-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.menu-foot {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; color: var(--muted); font-weight: 600; font-size: .92rem;
}
@media (max-width: 560px) { .menu-panel { grid-template-columns: 1fr; right: -90px; } }

/* ---------- tool carousel (home page) ---------- */
.tools-showcase {
  background: var(--soft); padding: 52px 0 40px; margin: 8px 0 24px;
  border-block: 1px solid var(--line);
}
.showcase-head { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.showcase-head h2 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  line-height: 1.1; letter-spacing: -.02em; margin: 12px 0 10px; max-width: 760px;
}
/* Chalk-underlined highlight in the brand green. */
.showcase-head .hl { color: var(--accent); background: linear-gradient(transparent 68%, var(--chalk) 68%, var(--chalk) 90%, transparent 90%); }
.showcase-head .lead { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 640px; }
.carousel-controls { display: flex; gap: 10px; }
.stat-strip {
  order: 3; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0;
}
.stat-strip li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px;
  color: var(--muted); font-size: .92rem;
}
.stat-strip b { font-family: var(--font-display); color: var(--accent); font-size: 1.15rem; margin-right: 4px; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 12px; padding: 0; font-size: 1.3rem; line-height: 1;
  background: var(--surface); border: 1px solid var(--line);
}
.carousel-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.carousel-track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  list-style: none; margin: 0; padding: 6px 4px 14px; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.tool-card { flex: 0 0 clamp(250px, 30%, 300px); scroll-snap-align: start; }
.tool-card a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  border-top: 5px solid var(--accent); transition: transform .15s ease, border-color .15s ease;
}
.tool-card a:hover, .tool-card a:focus-visible { transform: translateY(-3px); border-color: var(--accent); }
.tool-preview { position: relative; height: 170px; padding: 46px 16px 0; overflow: hidden; }
.tone-g { background: #E3EEEA; }
.tone-y { background: #FDF4D6; }
.tone-b { background: #E3EEF8; }
.tone-o { background: #FBE6DE; }
.tone-p { background: #EEE8F5; }
/* A lined exercise-book page with a margin rule. */
.paper {
  background: #fff; color: #12201D; border-radius: 6px 6px 0 0; height: 100%;
  padding: 10px 12px 10px 26px; font-size: .78rem; line-height: 1.65;
  border: 1px solid #D3DDD9; border-bottom: 0; position: relative;
}
.paper::before { content: ""; position: absolute; left: 16px; top: 0; bottom: 0; border-left: 2px solid #F2B8A8; }
.paper b { display: block; font-family: var(--font-display); font-size: .9rem; margin-bottom: 4px; }
.paper i { display: block; font-style: normal; color: #52635E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid #DCE8F2; }
.tool-tag {
  position: absolute; left: 14px; top: 12px; background: var(--chalk); color: var(--chalk-ink);
  border-radius: 999px; padding: 4px 11px; font-size: .78rem; font-weight: 600;
}
.tool-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.tool-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 0 0 6px; }
.tool-body p { color: var(--muted); margin: 0 0 14px; flex: 1; }
.tool-cta { align-self: flex-start; color: var(--accent); font-weight: 600; border-bottom: 2px solid var(--chalk); }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin: 6px 0 18px; }
.carousel-dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: width .2s ease, background .2s ease; }
.carousel-dots span.on { width: 26px; background: var(--accent); }
@media (max-width: 700px) { .carousel-controls { display: none; } .tool-card { flex-basis: 80%; } }
.showcase-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- trust centre ---------- */
.trust-hero { text-align: center; padding: 48px 0 24px; }
.trust-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); margin: 10px 0; letter-spacing: -.02em; }
.trust-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 28px; }
.trust-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; text-decoration: none; background: var(--surface); font-weight: 600; }
.trust-section { scroll-margin-top: 16px; margin-bottom: 18px; }
.trust-section h2 { margin-top: 0; }
.trust-section details { border-top: 1px solid var(--line); padding: 10px 0; }
.trust-section summary { cursor: pointer; font-weight: 600; }

/* ---------- builder ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-block: 20px 40px; }
@media (min-width: 900px) {
  .app { grid-template-columns: 400px minmax(0, 1fr); align-items: start; }
  .brief { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.brief form { gap: 16px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.type { position: relative; display: block; cursor: pointer; min-width: 0; font-weight: 400; }
.type input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tb { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; height: 100%; background: var(--surface); }
.tb b { display: block; font-weight: 600; font-size: .95rem; line-height: 1.25; }
.tb span { display: block; font-size: .8rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.type input:checked + .tb { border-color: var(--accent); background: var(--soft); box-shadow: 0 0 0 1px var(--accent); }
.type input:focus-visible + .tb { outline: 2px solid var(--chalk); outline-offset: 2px; }
.field { display: block; min-width: 0; font-weight: 400; }
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1 1 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; cursor: pointer; display: inline-block; font-weight: 400; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: .88rem; background: var(--surface); }
.chip input:checked + span { border-color: var(--accent); background: var(--soft); }
.chip input:checked + span::before { content: "\2713\00a0"; color: var(--accent); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip input:disabled + span { opacity: .55; }
.chip .x2 { margin-left: 4px; background: var(--chalk); color: var(--chalk-ink); border-radius: 999px; padding: 1px 7px; font-size: .74rem; font-weight: 600; }
.chip input:disabled { cursor: not-allowed; }
details.more summary { cursor: pointer; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
details.more[open] summary { margin-bottom: 8px; }
#go { width: 100%; padding: 12px 16px; font-size: 1rem; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 14px; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 8px 10px; color: var(--muted); margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.bar .grow { flex: 1 1 auto; }
.meta { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); letter-spacing: .03em; min-width: 0; }
.status { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); min-height: 1.4em; margin: 0 0 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.busy .dot { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .busy .dot { animation: none; } }
#flag { margin-bottom: 10px; }
#editor { min-height: 60vh; font-family: var(--font-mono); font-size: .86rem; line-height: 1.5; }

.revise { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.revise .row2 { align-items: stretch; }
.revise input { flex: 1 1 auto; }
.revise button { flex: 0 0 auto; }

.item { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .t { min-width: 0; flex: 1 1 200px; }
.item .t b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.item .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { color: var(--muted); padding: 10px 0; }

/* ---------- rendered resource ---------- */
.doc { min-width: 0; overflow-wrap: anywhere; }
.doc h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.65rem; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 12px; text-wrap: balance; }
.doc h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 26px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--line); text-wrap: balance; }
.doc h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 18px 0 6px; }
.doc h4 { font-weight: 600; margin: 14px 0 4px; }
.doc p { margin: 0 0 10px; max-width: 72ch; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 1.3em; max-width: 72ch; }
.doc li { margin: 2px 0; }
.doc blockquote { margin: 0 0 12px; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 0 6px 6px 0; }
.doc blockquote p:last-child { margin: 0; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.doc code { font-family: var(--font-mono); font-size: .88em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.doc input[type=checkbox] { margin-right: 4px; }
.tw { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 6px; }
.doc table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 7px 10px; border-bottom: 1px solid var(--line); min-width: 90px; }
.doc th { background: var(--soft); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 500; }
.doc tr:last-child td { border-bottom: 0; }

/* Visual layout: callout boxes and diagrams. */
.doc .callout {
  --c-line: #17604E; --c-fill: #E3EEEA;
  border-left: 5px solid var(--c-line); background: var(--c-fill); color: #12201D;
  border-radius: 0 8px 8px 0; padding: 10px 14px; margin: 0 0 14px; max-width: 72ch;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.doc .callout-tip { --c-line: #B8901A; --c-fill: #FDF4D6; }
.doc .callout-task { --c-line: #3B82C4; --c-fill: #E3EEF8; }
.doc .callout-warn { --c-line: #D9663F; --c-fill: #FBE6DE; }
.doc .callout-example { --c-line: #7A5BA8; --c-fill: #EEE8F5; }
.doc .callout-title { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; }
.doc .callout > :last-child { margin-bottom: 0; }
.doc .callout code { background: rgb(255 255 255 / .6); }
/* Diagrams are drawn for a white page, so they keep a white card in dark mode too. */
.doc figure.diagram {
  margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.doc figure.diagram svg { display: block; width: 100%; height: auto; }
.doc .diagram-missing { color: var(--muted); font-style: italic; }
.doc pre { background: var(--soft); border-radius: 6px; padding: 10px; overflow-x: auto; }
.doc pre code { background: none; padding: 0; }

/* ---------- admin dashboard ---------- */
.admin { padding-bottom: 24px; }
.admin .card { margin-bottom: 16px; }
.admin h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 10px; }
.admin-title { font-family: var(--font-display); font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 24px 0 12px; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 2px; margin: 0 !important; }
.kpi b { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); }
.admin-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.admin-table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.admin-table th, .admin-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.admin-table td:first-child { color: var(--muted); }
.tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tip { border-left: 4px solid var(--accent); background: var(--soft); border-radius: 0 8px 8px 0; padding: 8px 12px; }
.tip-warn { border-color: #D9663F; }
.tip-ok { border-color: var(--accent); }

/* Legal pages reuse .doc inside a card. */
main.legal { max-width: 800px; margin: 24px auto; }

@media print {
  header.top, .brief, .tabs, .bar, .status, .revise, footer, #banner { display: none !important; }
  body { background: #fff; color: #000; }
  .app { display: block; padding: 0; }
  .panel { border: 0; padding: 0; }
}

/* ---------- feature rows with illustrations (home page) ---------- */
.features { display: grid; gap: 56px; margin-top: 56px; }
.feature { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.feature.flip .feature-text { order: 2; }
.feature-text h3 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.15; letter-spacing: -.015em; margin: 6px 0 14px; text-wrap: balance;
}
.feature-text > p { color: var(--muted); font-size: 1.1rem; margin: 0 0 14px; }
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 0; }
.e-green { color: var(--accent); }
.e-gold { color: #A9790B; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 999px;
  background: var(--chalk); color: var(--chalk-ink); font-size: .75rem; font-weight: 700; display: grid; place-items: center;
}
/* Illustration panels: fixed light colours so the mock-ups read the same in dark mode. */
.feature-art {
  position: relative; border-radius: 22px; padding: 28px; min-height: 360px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 14px; color: #12201D;
}
.art-green { background: linear-gradient(135deg, #CFE5DC, #E3EEEA); }
.art-gold { background: linear-gradient(135deg, #F7E3A1, #FDF4D6); }
.art-deep { background: linear-gradient(135deg, #17604E, #2C7D68); }
.art-soft { background: linear-gradient(135deg, #E3EEF8, #EAF4EF); }
.mock {
  background: #FFFFFF; border: 1px solid #D3DDD9; border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(18, 32, 29, .12); font-size: .88rem; position: relative;
}
.mock b { font-family: var(--font-display); font-weight: 600; }
.mock p { margin: 0; }
/* Personalised: worksheet with a gap-fill card over it. */
.sheet { width: 82%; padding: 0; overflow: hidden; }
.sheet-head { background: #17604E; color: #fff; padding: 10px 14px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sheet-head span { font-family: var(--font-mono); font-size: .7rem; opacity: .85; align-self: center; }
.sheet-body { padding: 12px 14px; display: grid; gap: 10px; }
.sheet-box { background: #FDF4D6; border-left: 4px solid #F0C94A; border-radius: 6px; padding: 8px 10px; }
.sheet-box b { display: block; margin-bottom: 2px; }
.sheet-box i, .sheet-lines i { display: block; font-style: normal; color: #52635E; font-size: .8rem; }
.sheet-lines i { height: 14px; border-bottom: 1px solid #DCE8F2; }
.float { margin: -70px 0 0 auto; width: 74%; border: 2px solid #17604E; }
.gap { background: #FFFFFF; }
.gap > b { display: block; margin-bottom: 6px; color: #17604E; }
.gap-text { background: #F2F6F4; border-radius: 8px; padding: 8px 10px; line-height: 1.6; }
.bank { margin-top: 8px !important; color: #17604E; font-weight: 600; font-size: .8rem; }
.bank span { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #52635E; margin-right: 6px; }
.levels { display: flex; gap: 8px; flex-wrap: wrap; }
.lv { border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .8rem; background: #fff; border: 1px solid #D3DDD9; }
.lv1::before { content: "● "; color: #5CC4A6; }
.lv2::before { content: "● "; color: #F0C94A; }
.lv3::before { content: "● "; color: #E07A5F; }
/* Curriculum: objectives picker. */
.align { display: grid; gap: 10px; }
.align-top { display: flex; align-items: center; gap: 10px; border: 1px solid #D3DDD9; border-radius: 10px; padding: 10px 12px; }
.align-top .sq { width: 22px; height: 22px; border-radius: 5px; background: #17604E; flex: none; }
.align-top b { font-size: 1rem; }
.align-selects { display: flex; flex-wrap: wrap; gap: 6px; }
.align-selects span { border: 1px solid #D3DDD9; border-radius: 6px; padding: 5px 24px 5px 8px; font-size: .78rem; position: relative; }
.align-selects span::after { content: "▾"; position: absolute; right: 8px; color: #52635E; }
.align-count { font-family: var(--font-mono); font-size: .72rem !important; letter-spacing: .05em; color: #52635E; text-transform: uppercase; }
.obj { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border: 1px solid #E3EEEA; border-radius: 8px; padding: 8px 10px; font-size: .82rem; }
.obj b { font-family: var(--font-mono); font-size: .74rem; color: #17604E; margin-right: 4px; }
.chk { flex: none; width: 22px; height: 22px; border-radius: 6px; background: #17604E; color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
/* Your own documents: sources and a reading card. */
.sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.src { background: #fff; border-radius: 14px; padding: 16px 8px 12px; display: grid; justify-items: center; gap: 8px; font-weight: 600; font-size: .82rem; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.src svg { width: 40px; height: 40px; fill: none; stroke: #17604E; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reading { display: grid; gap: 4px; }
.reading > b { font-size: .95rem; margin-bottom: 4px; }
.ok { color: #12201D; }
.ok::first-letter { color: #17604E; font-weight: 700; }
.bar-track { height: 8px; background: #E3EEEA; border-radius: 999px; margin: 10px 0 8px; overflow: hidden; }
.bar-track span { display: block; height: 100%; width: 82%; background: #17604E; border-radius: 999px; animation: fill 2.6s ease-in-out infinite alternate; }
@keyframes fill { from { width: 35%; } to { width: 92%; } }
@media (prefers-reduced-motion: reduce) { .bar-track span { animation: none; } }
.reading-title { text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.reading-sub { text-align: center; color: #52635E; font-size: .8rem; }
/* Quality: meters and checklist. */
.quality { display: grid; gap: 10px; width: 88%; }
.quality > b { font-size: 1.05rem; }
.q-row { display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: center; font-size: .8rem; }
.q-row em { font-style: normal; font-family: var(--font-mono); font-size: .72rem; color: #17604E; }
.meter { height: 9px; background: #E3EEEA; border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, #5CC4A6, #17604E); border-radius: 999px; }
.q-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: .8rem; }
.stamp { display: flex; gap: 10px; align-items: center; width: auto; max-width: 70%; margin-top: -34px; background: #FDF4D6; border-color: #F0C94A; }
.stamp > span { font-size: 1.6rem; }
.stamp small { display: block; color: #52635E; font-size: .76rem; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 22px; }
  .feature.flip .feature-text { order: 0; }
  .feature-art { min-height: 0; padding: 20px 16px; }
  .sheet, .quality { width: 100%; }
  .float { width: 92%; margin-top: -40px; }
  .q-row { grid-template-columns: 90px 1fr auto; }
  .q-list { grid-template-columns: 1fr; }
  .stamp { max-width: 100%; margin-top: 0; }
}

/* ---------- site footer ---------- */
footer.site-foot {
  background: #17604E; color: #E7EFEC; text-align: left; padding: 52px 0 28px; margin-top: 40px;
  border-radius: 24px 24px 0 0;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) footer.site-foot { background: #10302A; } }
:root[data-theme="dark"] footer.site-foot { background: #10302A; }
.site-foot a { color: #E7EFEC; text-decoration: none; }
.site-foot a:hover { color: #F0C94A; text-decoration: underline; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.foot-cols nav { display: grid; gap: 10px; align-content: start; }
.foot-cols h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #FFFFFF; margin: 0 0 6px; }
.foot-note { color: #B9D3CA; font-size: .88rem; margin: 34px 0 0; }
.foot-bar {
  display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 18px; padding-top: 20px;
}
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #FFFFFF !important; }
.foot-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: .92rem; }
/* White badge so the Emanations colours read clearly on the green footer. */
.powered { display: inline-flex; align-items: center; gap: 7px; background: #FFFFFF; color: #52635E; border-radius: 999px; padding: 4px 14px 4px 10px; }
.powered img { display: block; }
.powered b { font-family: var(--font-display); color: #2C8F90; letter-spacing: .02em; }
@media (max-width: 820px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-cols { grid-template-columns: 1fr; } footer.site-foot { border-radius: 18px 18px 0 0; } }

/* ---------- "build from your own material" (builder) ---------- */
.own { border: 1px dashed var(--accent) !important; border-radius: 10px; padding: 12px !important; background: var(--soft); display: grid; gap: 8px; }
.own legend { padding: 0 6px; background: var(--soft); border-radius: 4px; }
.own-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.upload-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.own-file { margin: 0; font-size: .88rem; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.own .error:empty { display: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Two-tone logo name: "Lesson" in green, "smith" in gold. */
.brand .brand-name { color: var(--accent); }
.brand .smith { color: var(--gold-text); }
.foot-brand .smith { color: #F0C94A; }

/* ---------- slide decks (builder) ---------- */
.deck-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 4px 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.make-slides {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--soft); border: 1px dashed var(--accent); border-radius: 10px; padding: 10px 12px; margin: 4px 0 12px; font-size: .92rem;
}
.deck { display: grid; gap: 18px; }
/* Fixed colours so slides look the same as the PowerPoint in light and dark mode. */
.slide-frame {
  container-type: inline-size; aspect-ratio: 16 / 9; position: relative; overflow: hidden;
  background: #FFFFFF; color: #12201D; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 18px rgba(18, 32, 29, .08); padding: 5.5cqw 6cqw 8cqw 7cqw;
  border-left: 1.4cqw solid #17604E;
}
.slide-frame h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 5.2cqw; line-height: 1.12; margin: 0 0 1.6cqw;
  letter-spacing: -.01em;
}
.slide-frame h3::after { content: ""; display: block; width: 8cqw; height: .55cqw; background: #F0C94A; margin-top: 1.6cqw; border-radius: 1cqw; }
.slide-body { display: grid; gap: 3cqw; font-size: 3.4cqw; line-height: 1.32; }
.slide-body.has-art { grid-template-columns: 1fr 1.1fr; align-items: center; }
.slide-body ul, .slide-body ol { margin: 0; padding-left: 3.4cqw; display: grid; gap: 1.4cqw; }
.slide-body ul li::marker { color: #17604E; }
.slide-body ol li::marker { color: #17604E; font-weight: 700; }
.slide-body b { color: #17604E; }
.art { margin: 0; }
.art svg { width: 100%; height: auto; max-height: 30cqw; display: block; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4cqw; margin-top: 2cqw; }
.opts div { background: #E3EEEA; border: 1px solid #D3DDD9; border-radius: 1.2cqw; padding: 1.4cqw 1.8cqw; }
.opts div:nth-child(even) { background: #FDF4D6; }
.slide-foot {
  position: absolute; left: 7cqw; right: 4cqw; bottom: 2.6cqw; display: flex; justify-content: space-between; align-items: center;
  font-size: 1.9cqw; color: #52635E;
}
.slide-foot .tag { background: #F0C94A; color: #12201D; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-radius: 999px; padding: .5cqw 1.8cqw; font-size: 1.6cqw; }
.k-title .slide-frame { background: #17604E; color: #FFFFFF; border-left: 0; display: flex; flex-direction: column; justify-content: center; padding-left: 7cqw; }
.k-title h3 { font-size: 7cqw; color: #FFFFFF; }
.k-title p { color: #DDEBE6; font-size: 3.2cqw; margin: 0; }
.k-title .slide-foot { color: #F0C94A; }
.notes { margin-top: 6px; font-size: .9rem; }
.notes summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.notes p { margin: 6px 0 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.deck-after { margin-top: 6px; }
@media print {
  .deck-bar, .make-slides, .notes summary { display: none !important; }
  .slide { break-inside: avoid; page-break-inside: avoid; }
  .slide-frame { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =====================================================================
   Lively theme: brighter greens, gold highlights, gentle motion.
   ===================================================================== */
body {
  background:
    radial-gradient(900px 500px at 100% -10%, color-mix(in srgb, var(--chalk) 22%, transparent), transparent 70%),
    radial-gradient(800px 520px at -10% 30%, color-mix(in srgb, var(--mint) 16%, transparent), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
header.top { position: relative; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); }
header.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--mint) 55%, var(--chalk));
}
button.primary, .btn.primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--mint)));
  border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
button.cta, .btn.cta {
  background: linear-gradient(135deg, #FFD95E, var(--chalk)); color: #1B1A12; border: 0; font-weight: 700;
  box-shadow: 0 6px 18px rgb(244 200 66 / .45);
}
button.cta:hover, .btn.cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: #FFFFFF; border: 2px solid rgb(255 255 255 / .55); }
.btn.ghost:hover { border-color: #FFFFFF; background: rgb(255 255 255 / .08); }
button, .btn { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, filter .15s ease; }

/* Section headings get a gold highlighter and a short lead line. */
.hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--chalk) 75%, transparent) 62%, color-mix(in srgb, var(--chalk) 75%, transparent) 92%, transparent 92%); padding: 0 .08em; }
section.block > h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); letter-spacing: -.015em; margin-bottom: 10px; }
.section-lead { text-align: center; color: var(--muted); font-size: 1.1rem; margin: 0 auto 22px; max-width: 640px; }
section.block > h2 + .cards { margin-top: 18px; }

/* ---------- hero: a bright green panel within the page width ---------- */
.hero {
  position: relative; overflow: hidden; margin-top: 22px; border-radius: 28px; padding: 64px 24px 52px; color: #FFFFFF;
  background:
    radial-gradient(420px 260px at 88% 12%, rgb(244 200 66 / .38), transparent 70%),
    radial-gradient(520px 320px at 8% 100%, rgb(45 190 143 / .45), transparent 70%),
    linear-gradient(135deg, #0E4D3E, #137A5E 55%, #1A9271);
  box-shadow: 0 24px 60px rgb(14 77 62 / .25);
}
.hero::before, .hero::after {
  content: "✦"; position: absolute; color: var(--chalk); opacity: .85; font-size: 34px; top: 34px; left: 7%;
  animation: twinkle 3.2s ease-in-out infinite;
}
.hero::after { content: "✧"; top: auto; bottom: 46px; left: auto; right: 9%; font-size: 44px; animation-delay: 1.4s; }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.8) rotate(20deg); } }
.hero h1 { color: #FFFFFF; }
.hero h1 .hl { color: #FFFFFF; background: linear-gradient(transparent 64%, rgb(244 200 66 / .85) 64%, rgb(244 200 66 / .85) 90%, transparent 90%); }
.hero p.lead { color: #DDF1E9; }
.hero .fine { color: #BFE3D5; }
.hero .flag { background: rgb(255 255 255 / .16); color: #FFFFFF; border: 1px solid rgb(255 255 255 / .3); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-chips { list-style: none; padding: 0; margin: 22px auto 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 720px; }
.hero-chips li { background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; padding: 6px 14px; font-size: .92rem; font-weight: 600; }

/* ---------- moving tool pills (within the page width) ---------- */
.marquee {
  display: grid; gap: 12px; margin: 0 0 30px; overflow: hidden; border-radius: 18px; padding: 16px 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--soft) 80%, var(--surface)), color-mix(in srgb, var(--chalk) 14%, var(--surface)));
  border: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-row { overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: drift 46s linear infinite; }
.marquee-row.reverse .marquee-track { animation-direction: reverse; animation-duration: 52s; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 10px; padding-right: 10px; }
@keyframes drift { to { transform: translateX(-50%); } }
.pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-weight: 600;
  box-shadow: 0 2px 8px rgb(16 33 28 / .06); transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.pill:nth-child(3n+1) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pill:nth-child(3n+2) { border-color: color-mix(in srgb, var(--chalk) 70%, var(--line)); }
.pill:hover, .pill:focus-visible { transform: translateY(-2px); background: var(--chalk); color: #1B1A12; border-color: var(--chalk); }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; padding: 16px; }
  .marquee-track { animation: none; width: auto; }
  .marquee-group { flex-wrap: wrap; }
  .marquee-group[aria-hidden="true"] { display: none; }
  .hero::before, .hero::after { animation: none; }
}

/* ---------- colourful cards ---------- */
.card { border-radius: 14px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
section.block .cards > .card { border-top: 4px solid var(--accent); }
section.block .cards > .card:nth-child(4n+2) { border-top-color: var(--chalk); }
section.block .cards > .card:nth-child(4n+3) { border-top-color: var(--mint); }
section.block .cards > .card:nth-child(4n+4) { border-top-color: #1A9271; }
section.block .cards > .card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgb(16 33 28 / .10); }
.cards.pricing .card { border-top-width: 4px; }
.card.featured { border: 2px solid var(--accent) !important; background: linear-gradient(180deg, var(--soft), var(--surface) 45%); box-shadow: 0 16px 36px rgb(19 122 94 / .16); }
.feature-card { display: block; text-decoration: none; color: var(--ink); }
.feature-card .fi {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.45rem; margin-bottom: 10px;
  background: var(--soft);
}
.feature-cards .feature-card:nth-child(4n+2) .fi { background: color-mix(in srgb, var(--chalk) 28%, var(--surface)); }
.feature-cards .feature-card:nth-child(4n+3) .fi { background: color-mix(in srgb, var(--mint) 22%, var(--surface)); }
.feature-cards .feature-card:nth-child(4n+4) .fi { background: color-mix(in srgb, #3B82C4 16%, var(--surface)); }
.feature-card:hover h3 { color: var(--accent); }
.tools-showcase { background: linear-gradient(180deg, var(--soft), color-mix(in srgb, var(--chalk) 10%, var(--bg))); }
.trust-band { background: linear-gradient(135deg, color-mix(in srgb, var(--soft) 70%, transparent), transparent); border-radius: 24px; padding-inline: 16px !important; }

/* ---------- builder: wider, brighter ---------- */
.wrap.wide { max-width: 1680px; padding-inline: clamp(16px, 2.4vw, 36px); }
@media (min-width: 900px) { .app { grid-template-columns: 420px minmax(0, 1fr); gap: 24px; } }
@media (min-width: 1400px) { .app { grid-template-columns: 470px minmax(0, 1fr); } }
.builder .panel {
  border-radius: 18px; padding: 20px; position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgb(16 33 28 / .06);
}
.builder .panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--mint) 60%, var(--chalk));
}
.builder .brief { overflow-x: hidden; }
@media (min-width: 900px) { .builder .brief { overflow-y: auto; } }
.builder legend, .builder .lbl { color: var(--accent); font-weight: 600; }
.builder legend::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--chalk); margin-right: 7px; vertical-align: 1px; }
.builder .types { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.builder .tb { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: start; border-radius: 12px; padding: 10px 11px; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.builder .tb .ti { grid-row: span 2; font-style: normal; font-size: 1.2rem; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); }
.builder .type:hover .tb { border-color: var(--accent); transform: translateY(-1px); }
.builder .type input:checked + .tb { background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--chalk) 16%, var(--surface))); }
.builder .type input:checked + .tb .ti { background: var(--chalk); }
.builder .chip span { padding: 6px 13px; }
.builder .chip input:checked + span { background: color-mix(in srgb, var(--chalk) 30%, var(--surface)); border-color: var(--chalk); color: var(--ink); }
.builder .chip input:checked + span::before { color: var(--accent); }
.builder #go {
  background: linear-gradient(135deg, #FFD95E, var(--chalk)); color: #1B1A12; border: 0; font-weight: 700; font-size: 1.05rem;
  padding: 14px 16px; border-radius: 12px; box-shadow: 0 8px 20px rgb(244 200 66 / .4);
}
.builder #go:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.04); }
.builder .tab { font-weight: 700; font-size: 1rem; }
.builder .tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--chalk); }
.builder .doc { font-size: 1.04rem; }
.builder .doc p, .builder .doc ul, .builder .doc ol { max-width: 90ch; }
.builder .doc h1 { font-size: clamp(1.7rem, 2.4vw, 2.2rem); }
.builder .doc h2 { border-bottom: 2px solid var(--soft); }
.builder .doc h2::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--chalk); margin-right: 8px; vertical-align: 1px; }
.builder .doc table th { background: var(--soft); }
.builder #outPanel { min-height: 70vh; }
.builder .deck { grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.builder .usage { background: var(--soft); color: var(--accent); border-radius: 999px; padding: 5px 12px; font-weight: 500; }
@media (max-width: 899px) { .builder .types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- school plan with licence picker (pricing) ---------- */
.school-plan {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start; margin-top: 26px;
  border-radius: 24px; padding: 30px; color: #FFFFFF;
  background:
    radial-gradient(420px 260px at 95% 0%, rgb(244 200 66 / .32), transparent 70%),
    linear-gradient(135deg, #0E4D3E, #137A5E 60%, #1A9271);
  box-shadow: 0 22px 50px rgb(14 77 62 / .22); scroll-margin-top: 16px;
}
.school-info h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 10px 0 6px; letter-spacing: -.015em; }
.school-info .flag { background: var(--chalk); color: #1B1A12; }
.school-lead { color: #DDF1E9; font-size: 1.08rem; margin: 0 0 16px; max-width: 560px; }
.school-lead b { color: #FFFFFF; }
.school-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.school-list li { position: relative; padding-left: 30px; color: #DDF1E9; line-height: 1.4; }
.school-list li b { color: #FFFFFF; font-weight: 600; }
.school-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 999px;
  background: var(--chalk); color: #1B1A12; font-size: .74rem; font-weight: 700; display: grid; place-items: center;
}
.school-list li.soon::before { content: "★"; background: rgb(255 255 255 / .18); color: #FFE08A; }
.school-list li.soon::after {
  content: "Coming soon"; margin-left: 8px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.school-quote { color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: 0 14px 34px rgb(0 0 0 / .18); position: sticky; top: 16px; }
.school-quote .lbl { color: var(--accent); }
.lic-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.lic { padding: 10px 6px; border-radius: 10px; font-size: 1rem; font-weight: 700; }
.lic[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent); }
.lic-custom { margin-bottom: 12px; }
.quote-price { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1.05; color: var(--ink); margin-top: 4px; }
.quote-price small { font-family: var(--font-body); font-size: 1rem; font-weight: 400; color: var(--muted); }
.quote-sub { color: var(--muted); margin: 6px 0 10px; min-height: 1.5em; }
.quote-facts { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.school-quote .quote-facts { padding: 0; }
.quote-facts li:empty { display: none; }
.quote-facts li { background: var(--soft); color: var(--accent); border-radius: 999px; padding: 4px 11px; font-size: .86rem; font-weight: 600; }
.quote-facts li + li { background: color-mix(in srgb, var(--chalk) 30%, var(--surface)); color: var(--ink); }
.school-quote #qGo { width: 100%; }
.school-quote .fine { margin-top: 10px; }
@media (max-width: 860px) {
  .school-plan { grid-template-columns: 1fr; padding: 22px 18px; }
  .school-quote { position: static; }
}
