@font-face {
  font-family: Inter;
  src: url("/hilfetreppe/assets/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Playfair;
  src: url("/hilfetreppe/assets/playfair-display-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
/* Brand preserved. DESIGN_VARIANCE:4; MOTION_INTENSITY:2; VISUAL_DENSITY:4.
   Radius: controls 6px, work surfaces 10px. Layers: toast 20, native dialogs top layer. */
:root {
  color-scheme: light;
  --paper: #f4ede0;
  --surface: #fffdf8;
  --tint: #ebe2d3;
  --ink: #302b27;
  --muted: #6a6057;
  --accent: #a12a3a;
  --accent-ink: #fffaf2;
  --line: #c9bdac;
  --soft: #f5e7e5;
  --focus: #8e2433;
  --shadow: 0 18px 50px #55433112;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #23211f;
  --surface: #2d2a27;
  --tint: #38332e;
  --ink: #f3eadd;
  --muted: #c4b8a9;
  --accent: #f09aa6;
  --accent-ink: #302127;
  --line: #74695e;
  --soft: #403034;
  --focus: #ffc1cb;
  --shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #23211f;
    --surface: #2d2a27;
    --tint: #38332e;
    --ink: #f3eadd;
    --muted: #c4b8a9;
    --accent: #f09aa6;
    --accent-ink: #302127;
    --line: #74695e;
    --soft: #403034;
    --focus: #ffc1cb;
    --shadow: none;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.65 Inter,
    Arial,
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
button:active:not(:disabled),
.button:active {
  transform: translateY(1px);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  font-family: Playfair, Georgia, serif;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 30px;
  line-height: 1.2;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
}
p {
  margin-bottom: 16px;
}
button {
  border-radius: 6px;
}
button,
a {
  touch-action: manipulation;
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 30;
  padding: 12px;
  background: var(--surface);
}
.skip:focus {
  top: 12px;
}
.site-header {
  max-width: 1280px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
  font:
    700 17px/1.08 Playfair,
    Georgia,
    serif;
}
.brand > span:first-child {
  font:
    italic 700 48px/1.1 Playfair,
    Georgia,
    serif;
  color: var(--accent);
  padding-bottom: 5px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.site-header nav a {
  color: var(--ink);
  text-decoration: none;
}
.icon-button {
  background: none;
  border: 1px solid var(--line);
  padding: 9px 12px;
  font-size: 12px;
  min-height: 40px;
}
.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 58px 24px 64px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 90px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 18px;
}
h1 {
  font-size: clamp(42px, 4.5vw, 60px);
  line-height: 1.08;
  font-weight: 600;
  margin-bottom: 22px;
}
.lede {
  font-size: 16px;
  color: var(--muted);
  max-width: 430px;
  margin-bottom: 26px;
  line-height: 1.7;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 46px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.primary:hover {
  filter: brightness(0.94);
}
.secondary {
  background: var(--surface);
  color: var(--ink);
}
.secondary:hover,
.icon-button:hover {
  background: var(--tint);
}
.text-button {
  background: none;
  border: 0;
  padding: 10px 0;
  min-height: 44px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero-demo {
  padding-top: 10px;
}
.demo-caption {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.demo-task {
  font-family: Playfair, Georgia, serif;
  font-size: 24px;
  margin-bottom: 22px;
}
.demo-rungs {
  display: grid;
  gap: 10px;
}
.demo-rungs button {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  text-align: left;
  min-height: 58px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
}
.demo-rungs button[data-demo="1"] {
  margin-left: 28px;
}
.demo-rungs button[data-demo="2"] {
  margin-left: 56px;
}
.rung-number {
  color: var(--accent);
  font-size: 12px;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}
.demo-sign {
  margin-left: auto;
  color: var(--accent);
  font-size: 22px;
  font-weight: 300;
}
.demo-rungs button[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--soft);
}
.demo-rungs > p {
  font-size: 13px;
  padding: 4px 18px;
  margin: 0 0 6px;
}
.demo-note {
  font-size: 12px;
  color: var(--muted);
  margin: 17px 0 0 56px;
}
.workbench {
  max-width: 1216px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
  overflow: clip;
}
.workbench-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 26px;
}
.tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: none;
  padding: 20px 0 17px;
  font-size: 13px;
  color: var(--muted);
}
.tabs button[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.save-state {
  font-size: 11px;
  color: var(--muted);
}
.editor-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.editor-aside {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.editor-aside h2 {
  font-size: 25px;
}
.editor-aside > p {
  font-size: 13px;
  color: var(--muted);
}
.aside-actions {
  display: grid;
  gap: 3px;
  justify-items: start;
  margin: 22px 0 28px;
}
.outline {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.outline a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  padding: 7px 0;
  overflow-wrap: anywhere;
}
.outline span {
  font-size: 11px;
  color: var(--accent);
  min-width: 18px;
}
.guidance {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 12px;
}
.guidance p {
  margin: 12px 0;
  color: var(--muted);
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
}
form {
  padding: 36px 40px;
  min-width: 0;
}
.editor-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.editor-heading h2 {
  margin: 0;
}
.small-label {
  font-size: 10px;
  color: var(--accent);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.form-intro {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 26px;
}
.field-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 22px;
  min-width: 0;
}
label {
  font-size: 12px;
  font-weight: 650;
}
.optional,
.required {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}
input:not([type="checkbox"]),
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
}
textarea {
  resize: vertical;
  min-height: 84px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:focus,
textarea:focus {
  border-color: var(--accent);
}
[aria-invalid="true"] {
  border-color: var(--accent) !important;
  background: var(--soft) !important;
}
.section-heading {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 32px;
}
.section-heading h2 {
  margin: 0 0 8px;
}
.section-heading p {
  font-size: 13px;
  color: var(--muted);
}
.step-editor {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 18px;
  overflow: hidden;
}
.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.step-header h3 {
  font-size: 12px;
  margin: 0;
}
.step-tools {
  display: flex;
  gap: 4px;
}
.step-tools button {
  border: 0;
  background: none;
  min-width: 36px;
  min-height: 36px;
  padding: 4px 8px;
  font-size: 12px;
}
.step-tools button:hover {
  background: var(--tint);
}
.step-body {
  padding: 18px 20px 0;
}
.step-body .field {
  margin-bottom: 18px;
}
.step-body label {
  font-size: 12px;
}
.step-body textarea {
  min-height: 116px;
}
.field-help {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}
.add-step {
  margin-top: 20px;
}
.reflection-settings {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 12px;
  font-size: 13px;
}
.reflection-settings .field {
  margin-top: 16px;
}
.editor-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
}
.editor-bottom p {
  font-size: 11px;
  color: var(--muted);
  max-width: 240px;
  margin: 0;
}
.local-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  border-top: 1px solid var(--line);
}
.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.check-label input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}
.local-bar p {
  color: var(--muted);
  font-size: 11px;
  margin: 5px 0 0 26px;
  max-width: 540px;
}
.local-actions {
  display: flex;
  gap: 24px;
  white-space: nowrap;
}
.preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 30px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.preview-toolbar p {
  margin: 0;
}
.learner {
  max-width: 760px;
  margin: auto;
  padding: 48px 40px 56px;
}
.learner-subject {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.learner :is(h1, h2) {
  font-size: 36px;
  overflow-wrap: anywhere;
  margin-bottom: 22px;
}
.task-text {
  font-size: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.learning-goal {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 17px;
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 24px 0;
}
.learner-instruction {
  margin: 32px 0 20px;
  font-size: 14px;
}
.learner-instruction strong {
  display: block;
  margin-bottom: 4px;
}
.learner-instruction span {
  color: var(--muted);
  font-size: 13px;
}
.learner-step {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}
.reveal-button {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  width: 100%;
  background: var(--paper);
  border: 0;
  padding: 20px;
  min-height: 68px;
  border-radius: 0;
}
.reveal-button strong {
  font-size: 14px;
  flex: 1;
  overflow-wrap: anywhere;
}
.reveal-button .reveal-action {
  font-size: 12px;
  color: var(--accent);
}
.reveal-button:disabled {
  opacity: 0.8;
  color: var(--muted);
}
.learner-step.is-open {
  border-color: var(--accent);
}
.help-content {
  padding: 22px;
}
.help-content > p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.help-pause {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.learner-progress {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 28px;
}
.learner-complete {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.learner-complete p {
  font-size: 13px;
}
.done-box {
  background: var(--soft);
  padding: 22px;
  border-radius: 6px;
  margin-top: 20px;
}
.done-box h3 {
  margin-bottom: 10px;
}
.done-box p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.share-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 70px;
  padding: 46px 44px;
}
.share-intro {
  color: var(--muted);
  font-size: 14px;
}
.share-option {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 18px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.option-number {
  font-size: 25px;
  color: var(--accent);
}
.share-option h3 {
  margin-bottom: 8px;
}
.share-option p {
  font-size: 13px;
  color: var(--muted);
}
.share-aside {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.share-aside h3 {
  font-size: 15px;
}
.share-aside ul {
  padding-left: 18px;
  font-size: 13px;
  margin-bottom: 30px;
}
.share-aside li {
  padding-bottom: 13px;
}
.share-aside p {
  font-size: 12px;
  color: var(--muted);
}
.link-row {
  display: flex;
  gap: 10px;
  margin: 8px 0 12px;
}
.link-row input {
  font-size: 12px;
  min-width: 0;
}
#link-result {
  margin-top: 20px;
}
#open-student {
  font-size: 13px;
}
.print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.about-tool {
  max-width: 1050px;
  margin: 72px auto;
  padding: 0 24px;
}
.about-tool h2 {
  font-size: 34px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
}
.about-grid > p {
  font-size: 15px;
  color: var(--muted);
}
.about-grid details {
  border-top: 1px solid var(--line);
  padding: 8px 0;
  font-size: 13px;
}
.about-grid details p {
  color: var(--muted);
  margin-top: 12px;
}
.site-footer {
  max-width: 1216px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.site-footer div {
  display: flex;
  gap: 24px;
}
.site-footer a {
  color: var(--muted);
}
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: min(650px, calc(100% - 32px));
  max-height: 85dvh;
  padding: 30px;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #211a1780;
}
dialog p {
  color: var(--muted);
  font-size: 14px;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dialog-head h2 {
  margin-bottom: 12px;
}
.example-card {
  width: 100%;
  text-align: left;
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 18px 20px;
  margin-top: 12px;
}
.example-card:hover {
  border-color: var(--accent);
}
.example-card span {
  font-size: 11px;
  color: var(--accent);
}
.example-card strong {
  display: block;
  font-size: 17px;
  margin: 3px 0;
}
.example-card p {
  margin: 0;
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100% - 32px);
  width: max-content;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.validation {
  background: var(--soft);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin-top: 22px;
  font-size: 13px;
}
.validation a {
  display: block;
  margin: 5px 0;
}
.no-script {
  padding: 30px;
  text-align: center;
}
.student-page .hero,
.student-page .workbench-bar,
.student-page .about-tool,
.student-page .local-bar,
.student-page .site-header nav,
.student-page .preview-toolbar {
  display: none;
}
.student-page .workbench {
  max-width: 850px;
  margin: 40px auto;
}
.student-page .site-footer {
  max-width: 850px;
}
.student-page .site-footer div {
  display: none;
}
.student-page main {
  min-height: 70dvh;
}
.student-top {
  font-size: 12px;
  color: var(--muted);
  padding: 24px 40px 0;
  max-width: 760px;
  margin: auto;
}
.student-error {
  padding: 48px;
  max-width: 650px;
  margin: auto;
}
.student-error h2 {
  font-size: 30px;
}
#print-root {
  display: none;
}
@media (min-width: 1400px) {
  .hero {
    padding-top: 70px;
    padding-bottom: 76px;
  }
}
@media (max-width: 1000px) {
  .workbench {
    margin: 0 24px;
  }
  .hero {
    gap: 40px;
  }
  .editor-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .editor-aside {
    padding: 30px 22px;
  }
  form {
    padding: 30px 26px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .share-layout {
    gap: 32px;
    padding: 34px 28px;
    grid-template-columns: minmax(0, 1fr) 210px;
  }
  .about-grid {
    gap: 40px;
  }
  .local-bar {
    align-items: start;
  }
  .local-actions {
    flex-direction: column;
    gap: 0;
  }
  .save-state {
    max-width: 180px;
    text-align: right;
  }
}
@media (max-width: 767px) {
  .site-header {
    height: 72px;
    padding: 0 20px;
  }
  .site-header nav {
    gap: 12px;
    font-size: 12px;
  }
  .brand {
    font-size: 14px;
    gap: 9px;
  }
  .brand > span:first-child {
    font-size: 40px;
  }
  .icon-button {
    font-size: 11px;
    padding: 7px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 36px 24px 38px;
    gap: 32px;
  }
  .hero h1 {
    font-size: 45px;
  }
  .hero .lede {
    max-width: 440px;
  }
  .hero-demo {
    max-width: 450px;
    width: 100%;
    padding-top: 0;
  }
  .demo-task {
    font-size: 22px;
  }
  .demo-caption {
    font-size: 11px;
  }
  .demo-note {
    margin-left: 0;
  }
  .workbench {
    margin: 0 12px;
  }
  .workbench-bar {
    padding: 0 18px;
    display: block;
  }
  .tabs {
    gap: 24px;
  }
  .tabs button {
    font-size: 12px;
    padding: 18px 0 14px;
  }
  .save-state {
    display: block;
    text-align: left;
    max-width: none;
    font-size: 10px;
    padding-bottom: 10px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-aside {
    padding: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .editor-aside h2 {
    margin-bottom: 10px;
  }
  .editor-aside > p {
    margin-bottom: 10px;
  }
  .aside-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 12px 0 0;
  }
  .outline,
  .guidance {
    display: none;
  }
  form {
    padding: 26px 20px;
  }
  .editor-heading h2 {
    font-size: 27px;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .step-body {
    padding: 16px 14px 0;
  }
  .step-header {
    padding: 7px 12px;
  }
  .editor-bottom {
    flex-direction: column;
    align-items: start;
    gap: 14px;
  }
  .editor-bottom p {
    max-width: none;
  }
  .local-bar {
    flex-direction: column;
    padding: 22px 20px;
    gap: 8px;
  }
  .local-actions {
    flex-direction: row;
    gap: 24px;
  }
  .local-bar p {
    margin-left: 0;
  }
  .learner {
    padding: 30px 20px 40px;
  }
  .learner :is(h1, h2) {
    font-size: 30px;
  }
  .reveal-button {
    padding: 16px 14px;
    gap: 10px;
  }
  .reveal-button strong {
    font-size: 13px;
  }
  .reveal-button .reveal-action {
    font-size: 10px;
  }
  .preview-toolbar {
    padding: 12px 20px;
    align-items: start;
  }
  .preview-toolbar p {
    max-width: 180px;
    font-size: 11px;
  }
  .share-layout {
    grid-template-columns: 1fr;
    padding: 28px 20px;
    gap: 12px;
  }
  .share-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 22px 0 0;
  }
  .share-option {
    gap: 10px;
    grid-template-columns: 22px 1fr;
  }
  .share-option .button {
    white-space: normal;
    text-align: center;
  }
  .link-row {
    flex-direction: column;
  }
  .link-row .button {
    align-self: start;
  }
  .about-tool {
    margin: 44px auto;
  }
  .about-tool h2 {
    font-size: 30px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .site-footer {
    margin: 0 20px;
    padding: 20px 0;
    flex-direction: column;
    gap: 12px;
  }
  .site-footer div {
    gap: 20px;
  }
  .student-page .workbench {
    margin: 22px 12px;
  }
  .student-top {
    padding: 22px 20px 0;
  }
  dialog {
    padding: 22px;
  }
  .dialog-head {
    align-items: start;
  }
  .dialog-head h2 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  .icon-button,
  .demo-rungs button {
    transition:
      transform 0.15s,
      background-color 0.15s;
  }
  .help-content,
  .done-box {
    animation: appear 0.2s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
@page {
  size: A4;
  margin: 16mm;
}
@media print {
  body {
    background: #fff !important;
    color: #222 !important;
    font:
      11pt/1.5 Inter,
      Arial,
      sans-serif;
  }
  body > *:not(#print-root) {
    display: none !important;
  }
  #print-root {
    display: block !important;
  }
  .print-header {
    display: flex;
    align-items: center;
    gap: 5mm;
    border-bottom: 1pt solid #a12a3a;
    padding-bottom: 5mm;
    margin-bottom: 9mm;
  }
  .print-header img {
    width: 12mm;
    height: 12mm;
    object-fit: contain;
  }
  .print-header span {
    font-size: 9pt;
    color: #555;
  }
  .print-title {
    font:
      600 23pt/1.2 Playfair,
      Georgia,
      serif;
    margin: 0 0 4mm;
  }
  .print-intro {
    font-size: 10pt;
    margin-bottom: 7mm;
  }
  .print-card {
    border: 1px dashed #777;
    padding: 7mm;
    margin-bottom: 7mm;
    break-inside: avoid;
    overflow-wrap: anywhere;
  }
  .print-card h2 {
    font:
      700 14pt/1.3 Inter,
      Arial,
      sans-serif;
    letter-spacing: 0;
    color: #a12a3a;
    margin: 0 0 4mm;
  }
  .print-card .card-task-title {
    font-size: 9pt;
    color: #555;
    margin-bottom: 3mm;
  }
  .print-card p,
  .print-task {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin-bottom: 3mm;
  }
  .print-pause {
    font-size: 9pt;
    color: #555;
    border-top: 1px solid #bbb;
    padding-top: 3mm;
    margin-top: 5mm;
  }
  .writing-lines {
    height: 100mm;
    background: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 9.7mm,
      #bbb 9.7mm,
      #bbb 10mm
    );
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .print-goal {
    padding: 4mm 0;
    border-top: 1px solid #bbb;
    font-size: 10pt;
  }
  .print-reflection {
    margin-top: 10mm;
    white-space: pre-wrap;
  }
  .print-reflection h2 {
    font:
      600 13pt Inter,
      Arial,
      sans-serif;
    letter-spacing: 0;
  }
  .print-reflection-lines {
    height: 30mm;
    border-bottom: 1px solid #bbb;
  }
  .print-card.long {
    break-inside: auto;
  }
}

/* Guide: visible entry, scrollable reading area, close controls always available. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.guide-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(840px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
}
.guide-dialog[open] {
  display: flex;
  flex-direction: column;
}
.guide-head {
  flex-shrink: 0;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
}
.guide-head h2 {
  margin: 0;
  font-size: 29px;
}
.guide-head .icon-button {
  flex-shrink: 0;
}
.guide-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px 32px;
}
.guide-body .guide-purpose {
  font-size: 15px;
  color: var(--ink);
}
.guide-steps {
  padding-left: 25px;
  margin: 28px 0;
}
.guide-steps > li {
  padding-left: 10px;
  margin-bottom: 26px;
}
.guide-steps > li::marker {
  color: var(--accent);
  font-weight: 650;
}
.guide-steps h3 {
  margin-bottom: 8px;
  font-size: 16px;
}
.guide-steps p {
  margin-bottom: 12px;
}
.guide-hints {
  margin: 16px 0;
  padding: 16px 18px;
  background: var(--paper);
  border-left: 2px solid var(--accent);
}
.guide-hints > div + div {
  margin-top: 12px;
}
.guide-hints dt {
  font-size: 13px;
  font-weight: 650;
}
.guide-hints dd {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.guide-options {
  padding-left: 18px;
  font-size: 14px;
  color: var(--muted);
}
.guide-options li {
  margin: 10px 0;
}
.guide-classroom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.guide-classroom h3 {
  font-size: 17px;
}
.guide-saving {
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.guide-saving p {
  margin-top: 12px;
}
.guide-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
}
@media (max-width: 767px) {
  .guide-head {
    padding: 18px;
    gap: 12px;
  }
  .guide-head h2 {
    font-size: 24px;
  }
  .guide-body {
    padding: 20px 18px;
  }
  .guide-steps {
    padding-left: 20px;
  }
  .guide-steps > li {
    padding-left: 5px;
  }
  .guide-hints {
    padding: 14px;
  }
  .guide-footer {
    padding: 14px 18px;
  }
}
