* {
  box-sizing: border-box;
}

/* Stefan pilot: one calm starting action and fixed card/form geometry. */
body.stefan-pilot .stefan-start {
  display: grid;
  place-items: center;
}

body.stefan-pilot .stefan-start .student-home-head {
  width: min(760px, 100%);
  align-items: center;
  padding: clamp(1.2rem, 4vw, 2.4rem);
}

body.stefan-pilot .stefan-start h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
}

.stefan-primary-action {
  display: inline-flex;
  min-width: 11rem;
  justify-content: center;
  text-decoration: none;
}

body.stefan-pilot .module-card-grid {
  grid-template-columns: minmax(0, 680px);
  overflow-x: hidden;
}

body.stefan-pilot .module-card {
  grid-template: "main status" auto "progress action" auto / minmax(0, 1fr) auto;
  min-height: 0;
  align-items: end;
}

body.stefan-pilot .module-card-main {
  grid-area: main;
  min-width: 0;
}

body.stefan-pilot .module-card-status {
  grid-area: status;
  align-self: start;
  display: grid;
  justify-items: end;
  white-space: nowrap;
}

body.stefan-pilot .module-card-progress {
  grid-area: progress;
  min-width: 0;
}

body.stefan-pilot .module-card-actions {
  grid-area: action;
}

.stefan-task-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 0 0 .75rem;
  padding: .7rem;
  border: 1px solid #cbdad4;
  border-radius: .75rem;
  background: #f4f8f6;
}

.stefan-task-tools a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

body.stefan-pilot .help-feedback-page {
  gap: .42rem;
}

body.stefan-pilot .help-feedback-page .student-home-head {
  padding: .58rem .75rem;
}

body.stefan-pilot .help-feedback-page .student-home-head h1 {
  font-size: 1.55rem;
}

body.stefan-pilot .feedback-focus-head,
body.stefan-pilot .feedback-context-box,
body.stefan-pilot .feedback-form-panel {
  padding: .52rem .68rem;
}

body.stefan-pilot .feedback-form {
  gap: .38rem;
}

body.stefan-pilot .feedback-field textarea {
  min-height: 4.2rem;
}

@media (max-width: 700px) {
  body.stefan-pilot .stefan-start .student-home-head,
  body.stefan-pilot .module-card {
    grid-template-columns: minmax(0, 1fr);
  }

  body.stefan-pilot .stefan-start .student-home-head {
    align-items: stretch;
  }

  body.stefan-pilot .module-card {
    grid-template-areas: "main" "status" "progress" "action";
  }

  body.stefan-pilot .module-card-status {
    justify-items: start;
    white-space: normal;
  }

  body.stefan-pilot .module-card-actions,
  body.stefan-pilot .module-card-actions button,
  body.stefan-pilot .stefan-primary-action,
  .stefan-task-tools a {
    width: 100%;
  }
}

body.stefan-pilot .stefan-primary-action,
body.stefan-pilot .stefan-task-tools a.primary {
  border: 1px solid #1d2633;
  border-radius: var(--ui-radius-sm, .55rem);
  padding: .62rem .9rem;
  background: #1d2633;
  color: #fff;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --bg: #f3efe7;
  --paper: #fffdf7;
  --paper-soft: #fbf4e8;
  --paper-warm: #fffaf0;
  --paper-2: #fbf4e8;
  --paper-3: #fffaf0;
  --ink: #120f0b;
  --muted: #695f52;
  --soft: #4f463b;
  --line: #d7cbbb;
  --line-dark: #9d907f;
  --link: #285a91;
  --navy: #1d2633;
  --warn: #7a4f08;
  --warn-bg: #fff1c6;
  --good: #2f6f4e;
  --good-bg: #e8f4ec;
  --bad: #9b2f2f;
  --bad-bg: #fbe7e4;
  --shadow: 0 18px 42px rgba(43, 34, 22, .08);
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(255,255,255,.72), transparent 34rem), var(--bg);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
}

button,
input,
textarea,
select {
  font: inherit;
  max-width: 100%;
}

button,
select {
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  padding: .54rem .76rem;
  background: #fffaf0;
  color: var(--ink);
  cursor: pointer;
}

button:hover,
select:hover {
  background: #f4e7d2;
}

button.primary {
  border-color: #1d2633;
  background: #1d2633;
  color: #fffdf7;
}

button.primary a,
button.primary a:visited,
.entry-link.primary,
.entry-link.primary:visited,
.tool-button,
.tool-button:visited {
  color: #fffdf7;
}

button.danger {
  border-color: #a85a4d;
  color: #8f2f20;
}

button.small {
  padding: .34rem .55rem;
  font-size: .88rem;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  padding: .66rem;
  background: #fffefb;
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

label {
  display: block;
  margin-bottom: .75rem;
}

label > span {
  display: block;
  margin-bottom: .25rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .82rem;
  font-weight: 750;
}

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

h1 {
  margin-bottom: .55rem;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: .55rem;
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: .45rem;
  font-size: 1.15rem;
}

p,
li {
  font-size: 1.08rem;
  line-height: 1.58;
}

ul {
  margin: .45rem 0 0;
  padding-left: 1.25rem;
}

li {
  margin: .36rem 0;
}

a {
  color: var(--link);
  font-weight: 700;
}

code {
  padding: .05rem .25rem;
  border: 1px solid var(--line);
  background: #f3eadc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .92em;
}

.kicker {
  margin-bottom: .5rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.builder-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.builder-top,
.lesson-top {
  border-bottom: 1px solid var(--line);
  background: rgba(243, 239, 231, .96);
}

.builder-top-inner {
  width: min(1500px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.builder-title p,
.lesson-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.builder-save-status {
  margin-top: .35rem;
  color: var(--good) !important;
  font-size: .86rem;
  font-weight: 750;
}

.top-actions {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tabs {
  width: min(1500px, calc(100vw - 2rem));
  margin: 0 auto;
  display: flex;
  gap: .4rem;
  padding-bottom: .9rem;
}

.tab {
  border-bottom: 2px solid transparent;
}

.tab.active {
  border-color: #1d2633;
  background: #eee2cc;
}

.builder-grid {
  width: min(1500px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr) 390px;
  gap: 1rem;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel.soft {
  background: var(--paper-2);
}

.block-list {
  display: grid;
  gap: .4rem;
}

.block-add-panel {
  margin-top: 0;
  margin-bottom: .85rem;
  padding-top: 0;
  border-top: 0;
}

.block-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem;
  align-items: stretch;
}

.block-row.active .block-button {
  border-color: #1d2633;
  background: #eee2cc;
}

.block-button {
  width: 100%;
  text-align: left;
  border-color: var(--line);
  background: #fffdf7;
}

.block-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, 2.25rem);
  gap: .3rem;
}

.icon-button {
  width: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  display: grid;
  place-items: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 850;
}

.builder-grid > .panel {
  min-width: 0;
  max-height: calc(100vh - 9.5rem);
  overflow: auto;
  scrollbar-width: thin;
}

.block-type {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
}

.route-chip {
  display: inline-block;
  margin-top: .18rem;
  color: #5f6b35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .72rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

.help-text {
  margin-top: .25rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .88rem;
}

.section-gap {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.term-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: flex-start;
  margin: .35rem 0 .8rem;
}

.term-import-panel {
  margin-bottom: .85rem;
}

.term-import-panel textarea {
  min-height: 118px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .88rem;
}

.term-edit-panel {
  display: grid;
  gap: .72rem;
}

.term-edit-panel textarea {
  min-height: 86px;
}

.term-list-panel h3 {
  margin-bottom: .45rem;
  font-size: 1.05rem;
}

.term-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .45rem;
  align-items: center;
  padding: .48rem 0;
  border-bottom: 1px solid var(--line);
}

.term-row button:first-child {
  min-width: 0;
  display: grid;
  gap: .14rem;
  text-align: left;
}

.term-row button:first-child strong,
.term-row button:first-child span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term-row button:first-child span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.yaml-view {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.yaml-area {
  min-height: 70vh;
  background: var(--paper-warm);
  color: var(--ink);
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.preview-wrap {
  width: min(1000px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.lesson-top-inner {
  width: min(900px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: .9rem 0;
}

.lesson-title {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.lesson-title strong {
  display: block;
  font-size: 1.05rem;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  margin-top: .7rem;
  margin-bottom: .3rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .84rem;
  font-weight: 750;
}

.progress-track {
  height: .34rem;
  border: 1px solid var(--line);
  background: #ebe4d8;
}

.progress-fill {
  height: 100%;
  background: #2b2118;
}

.stage {
  width: min(900px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1.8rem 0 1rem;
}

.slide {
  min-height: 500px;
  display: grid;
  align-content: start;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 4.2rem);
  overflow: hidden;
}

.slide.center {
  align-content: center;
}

.slide h1 {
  max-width: 760px;
}

.slide-text {
  max-width: 760px;
  margin-top: .25rem;
}

.assignment-preview {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(260px, 1fr);
  gap: .75rem;
  max-width: 780px;
  margin-top: 1rem;
}

.assignment-steps,
.assignment-code-preview {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
}

.assignment-steps {
  display: grid;
  gap: .35rem;
  padding: .65rem;
}

.assignment-step {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
  padding: .36rem 0;
  border-bottom: 1px solid var(--line);
}

.assignment-step:last-child {
  border-bottom: 0;
}

.assignment-step > span {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
  font-weight: 850;
}

.assignment-step strong,
.assignment-step p {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.assignment-step p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

body.learner-body .assignment-step p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.assignment-code-preview {
  overflow: hidden;
}

.assignment-code-preview pre {
  margin: 0;
  padding: .75rem .85rem;
  overflow: auto;
  color: var(--ink);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
}

.assignment-code-preview pre code,
.code-panel pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

.code-copy-button {
  white-space: nowrap;
}

.slide-image,
.image-preview {
  width: 100%;
  max-width: 760px;
  max-height: 340px;
  overflow: hidden;
  margin: .65rem 0 1rem;
  border: 1px solid var(--line);
  background: #151515;
}

.image-preview {
  max-height: 260px;
}

.slide-image img,
.image-preview img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.image-preview img {
  max-height: 260px;
}

.warning-box {
  max-width: 760px;
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid #d6ad62;
  background: var(--warn-bg);
  color: var(--warn);
}

.activation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: .85rem 0;
}

.activation-summary > div {
  border: 1px solid var(--line);
  background: var(--paper-warm);
  padding: .65rem;
}

.warning-box p,
.warning-box ul {
  margin-bottom: .55rem;
}

.tool-button {
  display: inline-block;
  width: fit-content;
  margin-top: 1rem;
  border: 1px solid #1d2633;
  border-radius: 3px;
  padding: .65rem .85rem;
  background: #1d2633;
  color: #fffdf7;
  text-decoration: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 800;
}

.lesson-nav {
  width: min(900px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: .1rem 0 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
}

.lesson-nav .right {
  display: flex;
  gap: .5rem;
}

.choice-list,
.focus-list,
.field-list {
  display: grid;
  gap: .55rem;
  margin-top: 1.15rem;
  max-width: 780px;
}

.choice-button {
  width: 100%;
  padding: .7rem .9rem;
  text-align: left;
  background: #fffaf0;
}

.choice-button.selected {
  border-color: #1d2633;
  background: #eee2cc;
}

.choice-button strong {
  display: inline;
  margin-right: .35rem;
}

.choice-button span {
  display: inline;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .92rem;
}

.focus-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}

.focus-item input {
  width: 18px;
  height: 18px;
  margin-top: .25rem;
  accent-color: #2b2118;
}

.focus-label {
  display: block;
  width: 100%;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.term {
  border-bottom: 1px dotted var(--link);
  color: var(--link);
  font: inherit;
  font-weight: inherit;
  cursor: help;
}

.field-help {
  display: block;
  margin: -.12rem 0 .32rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .85rem;
}

.blocked-note-inline {
  max-width: 760px;
  margin-top: 1rem;
  padding: .78rem .9rem;
  border: 1px solid #d9b3ab;
  background: var(--bad-bg);
  color: var(--bad);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .95rem;
  font-weight: 700;
}

.done-box {
  max-width: 760px;
  padding: 1rem;
  border: 1px solid #9ac5a8;
  background: var(--good-bg);
  color: var(--good);
}

.popover {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  width: min(340px, calc(100vw - 2rem));
  border: 1px solid var(--line-dark);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(43, 34, 22, .35);
}

.drawer-card {
  width: min(760px, calc(100vw - 2rem));
  max-height: 82vh;
  overflow: auto;
  border: 1px solid var(--line-dark);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 1.3rem;
}

.term-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.term-card {
  border: 1px solid var(--line);
  padding: .8rem;
  background: #fffaf0;
}

.route-list {
  display: grid;
  gap: .45rem;
}

.route-item {
  padding: .65rem;
  border: 1px solid var(--line);
  background: #fffaf0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .88rem;
}

.code-panel {
  max-width: 780px;
  margin-top: .9rem;
  border: 1px solid var(--line-dark);
  background: #fffaf0;
}

.code-panel-header {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--line);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dbml-box {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: .85rem;
  background: var(--paper-warm);
  color: var(--ink);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
}

.copy-source {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.code-editor-area {
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9rem;
}

.choice-route-editor {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: #fffaf0;
  padding: .8rem;
}

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

@media (max-width: 760px) {
  .builder-top-inner,
  .lesson-title,
  .form-row {
    grid-template-columns: 1fr;
  }

  .top-actions,
  .lesson-nav,
  .lesson-nav .right {
    display: grid;
  }

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


/* FINAL CODEBOX PATCH START */
.code-panel {
  max-width: 780px;
  margin-top: .9rem;
  border: 1px solid var(--line-dark);
  background: #fffaf0;
}

.code-panel-header {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--line);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dbml-textarea {
  display: block !important;
  width: 100% !important;
  min-height: 420px !important;
  max-height: 520px !important;
  margin: 0 !important;
  padding: 1rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  resize: vertical !important;
  overflow: auto !important;
  background: var(--paper-warm) !important;
  color: var(--ink) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  white-space: pre !important;
  tab-size: 2 !important;
  outline: none !important;
}

.dbml-textarea::selection {
  background: #d8c8ae !important;
  color: var(--ink) !important;
}
/* FINAL CODEBOX PATCH END */

/* RE-ANCHOR LIGHT ROUTE MOTOR */
body.entry-body,
body.learner-body,
body.teacher-body {
  min-height: 100vh;
  padding: 0;
  background: radial-gradient(circle at top left, rgba(255,255,255,.72), transparent 34rem), var(--bg);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
}

body.entry-body h1,
body.entry-body h2,
body.learner-body h1,
body.learner-body h2,
body.teacher-body h1,
body.teacher-body h2 {
  letter-spacing: 0;
}

body.learner-body h1,
body.teacher-body h1 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.02;
}

body.learner-body h2,
body.teacher-body h2 {
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.12;
}

body.learner-body p,
body.learner-body li,
body.teacher-body p,
body.teacher-body li {
  font-size: 1.08rem;
  line-height: 1.58;
}

body.learner-body button,
body.teacher-body button,
.entry-link {
  min-height: 0;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: var(--paper-warm);
  color: var(--ink);
  padding: .54rem .76rem;
  font-family: inherit;
  font-weight: 700;
}

body.learner-body button:hover,
body.teacher-body button:hover,
.entry-link:hover {
  background: #f4e7d2;
}

body.learner-body button.primary,
body.teacher-body button.primary,
.entry-link.primary {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--paper);
}

body.learner-body button.danger,
body.teacher-body button.danger {
  border-color: #a85a4d;
  color: var(--bad);
}

body.learner-body input:not([type="checkbox"]),
body.learner-body textarea,
body.teacher-body input,
body.teacher-body textarea {
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: #fffefb;
  color: var(--ink);
  padding: .66rem;
  font-family: inherit;
}

body.learner-body label > span,
body.teacher-body label > span {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.learner-body .badge,
body.teacher-body .badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: var(--paper-warm);
  color: var(--soft);
  padding: .24rem .45rem;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.learner-body .muted,
body.teacher-body .muted,
body.learner-body .field-help {
  color: var(--muted);
}

body.learner-body .kicker,
body.teacher-body .kicker {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0;
}

.entry-shell {
  width: min(980px, calc(100vw - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 1.4rem 0;
}

.entry-panel {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.entry-panel::before {
  content: "";
  display: block;
  width: 5.5rem;
  height: .28rem;
  margin-bottom: 1.2rem;
  background: var(--navy);
}

.entry-panel h1 {
  max-width: 720px;
}

.entry-lead {
  max-width: 760px;
  color: var(--soft);
  font-size: 1.18rem;
}

.entry-subtitle {
  margin: -.2rem 0 .9rem;
  color: var(--soft);
  font-size: 1.22rem;
  font-weight: 700;
}

.entry-note {
  display: grid;
  gap: .1rem;
  margin-top: .85rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: .7rem 0;
  color: var(--soft);
}

.entry-note strong,
.entry-note span {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.entry-note strong {
  font-size: .9rem;
}

.entry-note span {
  color: var(--muted);
  font-size: .84rem;
}

.entry-flow,
.entry-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.entry-flow li,
.entry-benefits article {
  display: grid;
  gap: .2rem;
  align-items: start;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  color: var(--soft);
  padding: .75rem .8rem;
}

.entry-flow span {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .74rem;
  font-weight: 850;
}

.entry-flow strong {
  min-width: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .84rem;
  line-height: 1.2;
}

.entry-benefits strong,
.entry-benefits span {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.entry-benefits strong {
  color: var(--navy);
  font-size: .96rem;
}

.entry-benefits span {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.35;
}

.entry-links {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.entry-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.lesson-shell {
  width: 100%;
  margin: 0;
}

.learner-start {
  width: min(520px, calc(100vw - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: .85rem;
  padding: 2rem 0;
}

.student-home {
  width: min(1180px, calc(100vw - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 2rem 0;
}

.student-home-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.student-home-head h1 {
  margin: .4rem 0 .35rem;
}

.student-home-helper {
  max-width: 680px;
  margin-top: .3rem;
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .96rem !important;
  line-height: 1.42 !important;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.module-card {
  display: grid;
  gap: .85rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.module-card h2 {
  margin-bottom: .35rem;
  font-size: 1.35rem;
}

.module-card p {
  margin-bottom: 0;
}

.module-card-meta {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .7rem;
}

.module-card-meta span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  color: var(--soft);
  padding: .18rem .42rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
  font-weight: 800;
}

.module-card-status {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-top: .7rem;
}

.module-card-signals {
  display: grid;
  gap: .22rem;
  margin-top: .55rem;
}

.module-card-signals span,
.module-signal {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
  font-weight: 750;
}

.module-card-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.2rem;
  gap: .6rem;
  align-items: center;
}

.module-card-progress strong {
  justify-self: end;
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9rem;
}

.goal-card,
.login-panel,
.teacher-card,
.submission-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.goal-card,
.login-panel,
.teacher-card {
  padding: 1.2rem;
}

.goal-card p {
  color: var(--soft);
}

.start-button {
  margin-top: 1rem;
}

.login-form,
.teacher-form {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.local-actions {
  justify-content: flex-start;
  margin-top: .75rem;
}

.local-fallback {
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}

.local-fallback button {
  padding: .32rem .5rem;
  color: var(--muted);
  font-size: .86rem;
}

.local-fallback p {
  max-width: 420px;
  margin: .35rem 0 0;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .82rem;
  line-height: 1.45;
}

body.learner-body .local-fallback p {
  font-size: .82rem;
  line-height: 1.45;
}

body.learner-body .lesson-top {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(243, 239, 231, .96);
}

body.learner-body .lesson-top-inner,
body.learner-body .stage,
body.learner-body .lesson-nav {
  width: min(900px, calc(100vw - 2rem));
}

body.learner-body .lesson-top-inner {
  padding: .9rem 0;
}

body.learner-body .lesson-title {
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

body.learner-body .lesson-title p {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.student-chip,
.status-pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: var(--paper-warm);
  color: var(--soft);
  padding: .2rem .45rem;
  font-size: .8rem;
  font-weight: 800;
}

.status-pill.idle {
  border-color: var(--line);
  background: var(--paper-warm);
}

.status-pill.active,
.status-pill.submitted {
  border-color: #d6ad62;
  background: var(--warn-bg);
  color: var(--warn);
}

.status-pill.feedback {
  border-color: #d9b3ab;
  background: var(--bad-bg);
  color: var(--bad);
}

.status-pill.done {
  border-color: #9ac5a8;
  background: var(--good-bg);
  color: var(--good);
}

body.learner-body .progress-text {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.learner-body .progress-track {
  border-color: var(--line);
  background: #ebe4d8;
}

body.learner-body .progress-fill,
.mini-progress div {
  background: var(--navy);
}

body.learner-body .stage {
  padding: 1.8rem 0 1rem;
}

body.learner-body .slide {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: clamp(2rem, 5vw, 4.2rem);
}

body.learner-body .slide.center {
  align-content: start;
}

body.learner-body .slide-text,
body.learner-body .slide h1,
body.learner-body .code-panel,
body.learner-body .proof-panel,
body.learner-body .done-box {
  max-width: 780px;
}

body.learner-body .slide-text p {
  margin-bottom: .72rem;
}

body.learner-body .slide-text ul {
  margin: .45rem 0 .9rem;
}

body.learner-body .slide-text li + li {
  margin-top: .28rem;
}

body.learner-body code {
  border-color: var(--line);
  background: #f3eadc;
  color: var(--ink);
}

body.learner-body a,
body.teacher-body a,
body.learner-body .term {
  color: var(--link);
}

body.learner-body .warning-box,
body.teacher-body .warning-box {
  border-color: #d6ad62;
  border-radius: 3px;
  background: var(--warn-bg);
  color: var(--warn);
  padding: 1rem 1.05rem;
}

body.learner-body .blocked-note-inline,
body.teacher-body .blocked-note-inline {
  border-color: #d9b3ab;
  border-radius: 3px;
  background: var(--bad-bg);
  color: var(--bad);
  display: flex;
  gap: .28rem;
  align-items: flex-start;
}

body.learner-body .choice-button,
body.learner-body .term-card,
body.learner-body .choice-route-editor {
  border-color: var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  color: var(--ink);
}

body.learner-body .choice-button.selected {
  border-color: var(--navy);
  background: #eee2cc;
}

body.learner-body .focus-item {
  border-bottom-color: var(--line);
}

body.learner-body .focus-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

body.learner-body .focus-label {
  color: var(--ink);
}

body.learner-body .lesson-nav {
  padding: .1rem 0 1.4rem;
}

body.learner-body .lesson-nav .right,
body.learner-body .top-actions {
  gap: .5rem;
}

body.learner-body .lesson-title .top-actions,
.student-home-head .top-actions {
  align-items: center;
}

body.learner-body .code-panel {
  border-color: var(--line-dark);
  border-radius: 3px;
  background: var(--paper-warm);
  overflow: hidden;
}

body.learner-body .code-panel-header {
  border-bottom-color: var(--line);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.learner-body .dbml-textarea {
  min-height: 420px !important;
  max-height: 520px !important;
  background: var(--paper-warm) !important;
  color: var(--ink) !important;
  font-size: 14px !important;
}

body.learner-body .python-code-textarea {
  min-height: 220px !important;
  max-height: 320px !important;
}

.proof-panel {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.proof-combo-field {
  margin-bottom: 0;
}

.proof-text-fallback textarea {
  min-height: 112px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9rem;
}

.submission-status-panel {
  display: grid;
  gap: .65rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .9rem;
}

.submission-status-panel h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.submission-status-compact {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 0;
}

.submission-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.submission-status-grid > div {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: .55rem .65rem;
}

.upload-field input[type="file"] {
  padding: .55rem;
  background: var(--paper-warm);
}

.upload-current {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: .45rem;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  background: #fffaf0;
  color: var(--soft);
}

.upload-current span,
.upload-current small {
  color: var(--good);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .82rem;
  font-weight: 850;
}

.upload-current small {
  color: var(--muted);
  font-weight: 750;
}

.submitted-proof-list {
  display: grid;
  gap: .22rem;
  border-top: 1px solid var(--line);
  padding-top: .65rem;
}

.submitted-proof-list strong,
.submitted-proof-list p,
.submitted-proof-list span {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.submitted-proof-list p {
  margin: 0;
  color: var(--soft);
  font-size: .9rem;
  line-height: 1.35;
}

.submitted-proof-list span {
  color: var(--muted);
  font-weight: 800;
}

.message,
.review-box {
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: var(--paper-soft);
  color: var(--soft);
  padding: .75rem .85rem;
}

body.learner-body .done-box {
  border-color: #9ac5a8;
  border-radius: 3px;
  background: var(--good-bg);
  color: var(--good);
}

.level-card-list,
.group-task-list,
.question-list {
  display: grid;
  gap: .75rem;
  margin-top: 1.1rem;
  max-width: 780px;
}

.level-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: 1rem;
}

.level-card.locked {
  opacity: .72;
}

.level-head,
.question-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: start;
}

.level-head h2 {
  margin-bottom: .25rem;
  font-size: 1.45rem;
}

.level-status {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  padding: .2rem .45rem;
  background: #fffdf7;
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
  font-weight: 850;
}

.level-status.approved,
.level-card.approved {
  border-color: #9ac5a8;
  background: var(--good-bg);
  color: var(--good);
}

.level-status.needs_work,
.level-card.needs_work {
  border-color: #d9b3ab;
  background: var(--bad-bg);
  color: var(--bad);
}

.level-status.submitted {
  border-color: #d6ad62;
  background: var(--warn-bg);
  color: var(--warn);
}

.level-checklist {
  margin-top: .65rem;
}

.level-next {
  margin-top: .75rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  background: #fffdf7;
  color: var(--soft);
}

.group-task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: .75rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .8rem;
}

.group-task-row label {
  margin-bottom: 0;
}

.group-task-text strong {
  display: block;
  font-size: 1rem;
  line-height: 1.45;
}

.group-task-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto auto;
  gap: .45rem;
  align-items: end;
}

.done-check {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding-bottom: .45rem;
}

.done-check input {
  width: 18px;
  height: 18px;
}

.group-task-note {
  grid-column: 1 / -1;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .9rem;
}

.option-list {
  display: grid;
  gap: .35rem;
  margin-top: .6rem;
}

.option-row {
  display: flex;
  gap: .45rem;
  align-items: center;
  margin-bottom: 0;
}

.option-row input {
  width: 18px;
  height: 18px;
}

body.learner-body .popover,
body.learner-body .drawer-card {
  border-color: var(--line-dark);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}

body.learner-body .drawer {
  background: rgba(43, 34, 22, .35);
}

.teacher-shell {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.teacher-login {
  width: min(520px, calc(100vw - 2rem));
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: .85rem;
  padding: 2rem 0;
}

.teacher-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.teacher-header h1 {
  margin: .4rem 0 .25rem;
}

.teacher-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .6rem;
}

.teacher-tab.active {
  border-color: var(--navy);
  background: #eee2cc;
}

.teacher-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: .85rem;
}

.teacher-stat-card,
.student-card,
.module-admin-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.teacher-stat-action {
  width: 100%;
  min-height: 0;
  display: block;
  text-align: left;
  cursor: pointer;
}

.teacher-stat-action:hover {
  border-color: var(--link);
  background: #fff6e6;
}

.teacher-stat-card span {
  display: block;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
  font-weight: 850;
}

.teacher-stat-card strong {
  display: block;
  margin: .2rem 0;
  font-size: 2rem;
  line-height: 1;
}

.teacher-stat-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .95rem;
}

.teacher-overview-panels,
.module-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.next-steps-card {
  background: var(--paper-warm);
}

.next-step-list {
  display: grid;
  gap: .55rem;
  margin: .7rem 0 0;
  padding: 0;
  list-style: none;
}

.next-step-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 9.5rem;
  gap: .65rem;
  align-items: center;
  margin: 0;
  padding: .46rem 0;
  border-top: 1px solid var(--line);
}

.next-step-number {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--paper);
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .82rem;
  font-weight: 850;
}

.next-step-list strong {
  display: block;
  font-size: 1rem;
}

.next-step-list small {
  display: block;
  margin-top: .08rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .8rem;
  line-height: 1.3;
}

.next-step-link {
  width: 100%;
  white-space: nowrap;
  justify-self: stretch;
}

.secondary-action {
  border-color: var(--navy) !important;
  background: #f7ead4 !important;
  color: var(--navy) !important;
  box-shadow: inset 0 0 0 1px rgba(29, 38, 51, .04);
}

.secondary-action:hover {
  background: #eedbbd !important;
  border-color: #253247 !important;
}

.compact-list,
.class-chip-list,
.student-list {
  display: grid;
  gap: .55rem;
}

.compact-list > div {
  border-top: 1px solid var(--line);
  padding-top: .55rem;
}

.compact-list strong,
.compact-list span {
  display: block;
}

.compact-list span {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9rem;
}

.class-chip-list {
  display: flex;
  flex-wrap: wrap;
}

.class-chip-list span {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .28rem .5rem;
  color: var(--soft);
  font-weight: 800;
}

.teacher-two-column {
  display: grid;
  grid-template-columns: minmax(280px, .64fr) minmax(0, 1.86fr);
  gap: .85rem;
  align-items: start;
}

.student-admin-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  margin-bottom: .85rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: .95rem 1rem;
}

.student-admin-head h2 {
  margin-bottom: .25rem;
  font-size: 1.45rem;
}

.student-admin-head p {
  margin-bottom: 0;
}

.student-admin-actions {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.teacher-two-column > div {
  display: grid;
  gap: .85rem;
}

.teacher-import-card h2,
.module-admin-card h2 {
  font-size: 1.45rem;
}

.compact-import-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  align-items: start;
}

.compact-import-card button {
  width: fit-content;
}

.compact-import-card h2,
.compact-import-card p {
  margin-bottom: 0;
}

.import-textarea {
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9rem;
}

.import-example {
  margin: .55rem 0 .85rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .65rem .75rem;
  color: var(--soft);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.advanced-import {
  margin: .2rem 0 .75rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .55rem .65rem;
}

.advanced-import summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 850;
}

.import-preview,
.import-result {
  margin-top: .9rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .85rem;
}

.import-preview h3,
.import-result h3 {
  margin-bottom: .35rem;
}

.import-result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .55rem;
}

.import-result-summary span {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--soft);
  padding: .18rem .42rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .8rem;
  font-weight: 800;
}

.csv-guidance {
  margin-bottom: .45rem;
  color: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .92rem !important;
  font-weight: 800;
  line-height: 1.35 !important;
}

.import-table {
  display: grid;
  gap: .25rem;
  margin-top: .6rem;
}

.import-preview-list {
  display: grid;
  gap: .35rem;
  margin-top: .6rem;
}

.import-preview-row {
  display: grid;
  gap: .08rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  padding: .48rem .55rem;
}

.import-preview-row.skipped {
  border-color: #d9b3ab;
  background: var(--bad-bg);
}

.import-preview-row span,
.import-preview-row small {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
}

.import-table-head,
.import-table-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.2fr) 70px minmax(0, 1fr);
  gap: .45rem;
  align-items: start;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: .45rem .55rem;
}

.import-table-head {
  background: #eee2cc;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
  font-weight: 850;
}

.import-table-row.skipped {
  border-color: #d9b3ab;
  background: var(--bad-bg);
}

.import-table-row small {
  display: block;
  margin-top: .1rem;
  color: var(--muted);
}

.csv-preview,
.email-preview,
.debug-pre {
  width: 100%;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: .7rem;
  color: var(--ink);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.csv-preview {
  min-height: 120px;
  margin-top: .65rem;
}

.teacher-filters.student-filters {
  grid-template-columns: minmax(140px, .7fr) minmax(220px, 1fr);
}

.selection-bar {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  margin-bottom: .55rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .5rem .65rem;
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
}

.selection-bar span {
  color: var(--muted);
}

.student-table-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.student-table-head,
.student-table-row {
  display: grid;
  grid-template-columns: 28px 46px 92px minmax(120px, .9fr) minmax(138px, 1fr) 82px minmax(220px, auto);
  gap: .32rem;
  align-items: center;
  padding: .34rem .5rem;
}

.student-table-head {
  border-bottom: 1px solid var(--line);
  background: #eee2cc;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .72rem;
  font-weight: 850;
}

.student-table-head span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.student-table-row {
  border-bottom: 1px solid var(--line);
}

.student-table-row:last-child {
  border-bottom: 0;
}

.student-table-row div,
.student-select {
  min-width: 0;
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .81rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-name-cell,
.student-email-cell,
.student-number-cell {
  white-space: nowrap;
}

.student-email-cell {
  color: var(--muted);
}

.student-password-cell {
  white-space: nowrap;
}

.student-select {
  display: flex;
  gap: .35rem;
  align-items: center;
  margin: 0;
}

.student-select input {
  width: 16px;
  height: 16px;
}

.student-select span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  color: var(--muted);
  font-size: .76rem;
}

.student-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex-wrap: nowrap;
  gap: .28rem;
  justify-content: flex-end;
  align-items: center;
  overflow: visible;
}

.student-row-actions button {
  min-height: 2.05rem;
  padding: .2rem .3rem;
  font-size: .72rem;
  white-space: nowrap;
}

.invite-link {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9rem;
}

.module-admin-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  gap: .85rem;
  align-items: start;
  margin-bottom: .75rem;
}

.module-create-panel {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: .55rem;
  align-items: end;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: .7rem;
}

.module-create-panel label {
  margin: 0;
}

.module-management-list {
  display: grid;
  gap: .7rem;
}

.module-admin-card {
  display: grid;
  gap: .85rem;
  align-content: space-between;
}

.module-admin-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: start;
}

.module-field-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr .55fr .7fr .55fr .55fr;
  gap: .5rem;
}

.module-field-grid label {
  margin: 0;
}

.module-field-grid input {
  padding: .46rem .5rem;
}

.module-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  padding: .4rem .65rem;
  background: #fffaf0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 800;
  text-decoration: none;
}

.button-link.primary {
  border-color: #1d2633;
  background: #1d2633;
  color: #fffdf7;
}

.button-link.small {
  min-height: 2rem;
  padding: .3rem .55rem;
  font-size: .88rem;
}

.module-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .65rem;
}

.module-detail-row span {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  color: var(--soft);
  padding: .2rem .45rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .8rem;
  font-weight: 800;
}

.technical-id {
  margin-top: .55rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .82rem;
}

.planning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
  align-items: start;
}

.module-fit-card {
  grid-column: 1 / -1;
}

.planning-card {
  grid-column: 1 / -1;
}

.planning-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .6rem;
  margin: .85rem 0;
}

.planning-form {
  display: grid;
  gap: .65rem;
  margin-top: .75rem;
}

.planning-form-row,
.planning-textareas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.planning-form label,
.planning-moment {
  margin: 0;
}

.planning-moments {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .4rem;
}

.planning-moment {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--paper-warm);
  padding: .45rem;
}

.planning-moment > span {
  grid-column: 1 / -1;
}

.planning-moment input[type='checkbox'] {
  width: 18px;
  height: 18px;
}

.planning-moment input[type='number'],
.planning-form input,
.planning-form select,
.planning-form textarea {
  padding: .46rem .52rem;
}

.planning-form textarea {
  min-height: 64px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .86rem;
}

.planning-summary > div {
  border: 1px solid var(--line);
  background: var(--paper-warm);
  padding: .65rem;
}

.planning-roster,
.module-fit-list {
  display: grid;
  gap: .35rem;
  margin-top: .8rem;
}

.planning-roster-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.planning-roster {
  min-width: 960px;
}

.planning-roster-head,
.planning-roster-row {
  display: grid;
  grid-template-columns: 86px repeat(5, minmax(130px, 1fr));
  gap: .35rem;
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: .4rem;
}

.planning-roster-head {
  background: #eee2cc;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
  font-weight: 850;
}

.planning-roster-row > strong {
  display: grid;
  align-content: center;
  color: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9rem;
}

.planning-cell {
  min-height: 58px;
  display: grid;
  align-content: start;
  gap: .2rem;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: .45rem .5rem;
  color: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.planning-cell small {
  color: inherit;
  opacity: .86;
  font-size: .72rem;
  font-weight: 800;
}

.planning-cell strong {
  font-size: .88rem;
  line-height: 1.22;
}

.planning-cell em {
  font-style: normal;
  font-size: .7rem;
  opacity: .84;
}

.planning-cell.lesson {
  border-color: #1d2633;
  background: #1d2633;
}

.planning-cell.exam {
  border-color: #b8751a;
  background: #b8751a;
}

.planning-cell.vacation {
  border-color: #6f7d43;
  background: #6f7d43;
}

.planning-cell.special {
  border-color: #d6c2a2;
  background: #f1e2c8;
  color: #5a4730;
}

.planning-cell.cancelled {
  border-color: #d9b3ab;
  background: #f0d0c8;
  color: #7d3429;
}

.planning-cell.empty {
  border-color: #eadfcd;
  background: #fbf7ef;
}

.module-fit-list > div {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(180px, .8fr) minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: .6rem;
}

.module-fit-list span,
.module-fit-list p {
  margin: 0;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9rem;
  line-height: 1.45;
}

.teacher-filters {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(180px, .8fr) minmax(240px, 1.4fr);
  gap: .75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: .85rem;
}

.teacher-filters label {
  margin-bottom: 0;
}

.submission-list {
  display: grid;
  gap: .75rem;
}

.submission-card {
  padding: 1rem;
}

.submission-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.submission-main h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.submission-main .status-pill.submitted {
  border-color: #9ac5a8;
  background: var(--good-bg);
  color: var(--good);
}

.submission-main .status-pill.open {
  border-color: #d6ad62;
  background: var(--warn-bg);
  color: var(--warn);
}

.submission-main .status-pill.needs_work {
  border-color: #d9b3ab;
  background: var(--bad-bg);
  color: var(--bad);
}

.submission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: .85rem 0;
}

.submission-grid > div,
.teacher-note {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .75rem;
}

.meta-label {
  display: block;
  margin-bottom: .25rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}

.mini-progress {
  height: 7px;
  margin: .25rem 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #ebe4d8;
  overflow: hidden;
}

.mini-progress div {
  height: 100%;
}

.teacher-note {
  display: block;
  margin-bottom: .75rem;
}

.teacher-proof-table {
  display: grid;
  gap: .3rem;
  margin-top: .45rem;
}

.teacher-proof-head,
.teacher-proof-row {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(180px, 1.2fr) minmax(150px, .9fr) 96px;
  gap: .45rem;
  align-items: center;
}

.teacher-proof-head {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .74rem;
  font-weight: 850;
}

.teacher-proof-row {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  padding: .42rem .5rem;
}

.teacher-proof-row strong,
.teacher-proof-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .82rem;
}

.teacher-proof-row span:nth-child(3) {
  color: var(--muted);
}

.teacher-proof-row span:last-child {
  justify-self: end;
}

.proof-text-note {
  margin: .45rem 0 0;
  color: var(--muted);
  font-size: .92rem !important;
  line-height: 1.35 !important;
}

.review-explainer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  margin-bottom: .6rem;
}

.review-explainer > div {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .48rem .55rem;
}

.review-explainer strong,
.review-explainer span {
  display: block;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.review-explainer strong {
  margin-bottom: .18rem;
  font-size: .78rem;
}

.review-explainer span {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.25;
}

.demo-data-card {
  grid-column: 1 / -1;
}

.demo-data-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: .75rem 0;
}

.demo-data-counts > div {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .65rem;
}

.demo-data-counts strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.05;
}

.demo-data-actions {
  justify-content: flex-start;
}

.teacher-review-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: .75rem;
  margin-bottom: .75rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .75rem;
}

.teacher-review-panel label {
  margin-bottom: 0;
}

.review-actions {
  justify-content: flex-start;
}

.teacher-review-levels {
  display: grid;
  gap: .5rem;
  margin: .75rem 0;
}

.teacher-level-row,
.teacher-task-row,
.teacher-answer-row {
  display: grid;
  gap: .45rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-warm);
  padding: .7rem;
}

.teacher-level-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.teacher-level-row.approved,
.teacher-task-row.done {
  border-color: #9ac5a8;
  background: var(--good-bg);
}

.teacher-level-row.needs_work,
.teacher-answer-row.missing {
  border-color: #d9b3ab;
  background: var(--bad-bg);
}

.teacher-task-list,
.teacher-answer-list {
  display: grid;
  gap: .45rem;
}

.teacher-task-row {
  grid-template-columns: minmax(180px, 1.5fr) minmax(100px, .8fr) minmax(120px, 1fr) minmax(100px, .8fr);
  align-items: center;
}

.teacher-answer-row p {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  body.learner-body .lesson-title,
  .student-home-head,
  .teacher-header,
  .submission-main {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.learner-body .top-actions,
  body.learner-body .lesson-nav,
  body.learner-body .lesson-nav .right,
  .entry-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .module-card-grid,
  .entry-flow,
  .entry-benefits,
  .assignment-preview,
  .student-admin-head,
  .compact-import-card,
  .teacher-overview-grid,
  .teacher-overview-panels,
  .teacher-two-column,
  .module-admin-grid,
  .planning-layout,
  .planning-summary,
  .demo-data-counts,
  .teacher-filters,
  .review-explainer,
  .teacher-review-panel,
  .submission-grid,
  .submission-status-grid {
    grid-template-columns: 1fr;
  }

  .group-task-row,
  .teacher-level-row,
  .teacher-task-row,
  .teacher-proof-head,
  .teacher-proof-row,
  .next-step-list li,
  .student-table-head,
  .student-table-row,
  .import-table-head,
  .import-table-row,
  .module-fit-list > div {
    grid-template-columns: 1fr;
  }

  .student-table-head {
    display: none;
  }

  .student-table-row {
    gap: .35rem;
    padding: .75rem;
  }

  .student-table-row div::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-weight: 850;
  }

  .student-select span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    display: inline;
  }

  .planning-card,
  .planning-side-card,
  .module-fit-card {
    grid-column: 1;
  }

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

  body.learner-body .slide {
    min-height: 0;
    padding: 1.25rem;
  }
}

/* VISUAL SCREENSHOT POLISH */
body.entry-body::before,
body.learner-body::before,
body.teacher-body::before,
.builder-shell::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 3px;
  background: linear-gradient(90deg, rgba(29, 38, 51, .92) 0 62%, rgba(47, 111, 78, .88) 62% 86%, rgba(184, 117, 26, .86) 86% 100%);
}

button,
.entry-link {
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.term:focus-visible {
  outline: 3px solid rgba(40, 90, 145, .28);
  outline-offset: 2px;
  border-color: var(--link);
  box-shadow: 0 0 0 1px rgba(40, 90, 145, .2);
}

button.primary:hover,
.entry-link.primary:hover,
.tool-button:hover {
  background: #253247;
  border-color: #253247;
  color: #fff;
}

button.danger:hover {
  background: var(--bad-bg);
  border-color: var(--bad);
}

a:hover {
  color: #1f4b7d;
}

.panel,
.teacher-card,
.teacher-stat-card,
.student-admin-head,
.student-table-card,
.submission-card,
.module-card,
.goal-card,
.login-panel,
.entry-panel {
  border-color: #d4c4ad;
}

.panel::before,
.teacher-card::before,
.module-card::before,
.goal-card::before,
.login-panel::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1.2rem -1.2rem .85rem;
  background: #efe1c7;
}

.panel.soft::before,
.teacher-card.next-steps-card::before,
.teacher-import-card::before {
  background: #e8d8bb;
}

.module-card::before {
  margin: -1rem -1rem .8rem;
}

.submission-card::before {
  content: "";
  display: block;
  height: 3px;
  margin: -1rem -1rem .75rem;
  background: #e8d8bb;
}

.teacher-stat-card {
  background: linear-gradient(180deg, var(--paper) 0, #fffaf0 100%);
}

.teacher-stat-card:nth-child(4) {
  border-color: #d6ad62;
}

.teacher-stat-card:nth-child(4) strong {
  color: var(--warn);
}

.teacher-stat-card:nth-child(3) {
  border-color: #9ac5a8;
}

.teacher-stat-card:nth-child(3) strong {
  color: var(--good);
}

.next-step-number,
.entry-flow span {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.next-step-list li:nth-child(3) .next-step-number,
.entry-flow li:nth-child(2) span {
  border-color: var(--good);
  background: var(--good);
}

.next-step-list li:nth-child(5) .next-step-number,
.entry-flow li:nth-child(3) span {
  border-color: #b8751a;
  background: #b8751a;
}

.status-pill,
.student-chip,
.module-card-meta span,
.module-detail-row span,
.class-chip-list span,
.import-result-summary span {
  border-radius: 999px;
}

.status-pill.open,
.status-pill.active,
.status-pill.submitted,
.level-status.submitted {
  border-color: #d6ad62;
  background: var(--warn-bg);
  color: var(--warn);
}

.status-pill.done,
.status-pill.approved,
.level-status.approved {
  border-color: #9ac5a8;
  background: var(--good-bg);
  color: var(--good);
}

.status-pill.feedback,
.status-pill.needs_work,
.level-status.needs_work {
  border-color: #d9b3ab;
  background: var(--bad-bg);
  color: var(--bad);
}

.module-card-signals {
  grid-template-columns: repeat(2, minmax(0, max-content));
  align-items: start;
}

.module-signal {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-warm);
  padding: .2rem .5rem;
}

.module-signal.feedback-ready {
  border-color: #d6ad62;
  background: var(--warn-bg);
  color: var(--warn);
}

.module-signal.result-ready {
  border-color: #9ac5a8;
  background: var(--good-bg);
  color: var(--good);
}

.student-table-scroll {
  display: grid;
}

.planning-layout {
  grid-template-columns: minmax(0, 1fr);
}

.planning-card,
.module-fit-card {
  grid-column: 1 / -1;
}

.planning-table-row strong,
.planning-table-row span,
.student-table-row div,
.student-select,
.teacher-task-row,
.teacher-answer-row {
  line-height: 1.35;
}

.entry-shell {
  align-items: center;
  padding: 2rem 0 1.4rem;
}

.entry-panel {
  padding: clamp(1.7rem, 4vw, 3rem);
}

.entry-flow li,
.next-step-list li {
  background: #fffaf0;
}

.learner-start {
  align-content: center;
  padding: 1.4rem 0;
}

.login-panel h1,
.goal-card h1 {
  font-size: clamp(2rem, 3vw, 2.55rem);
}

.student-home {
  padding: 1.5rem 0;
}

.module-card {
  align-content: space-between;
  min-height: 250px;
}

.module-card-progress {
  margin-top: .15rem;
}

html.screenshot-mode,
html.screenshot-mode body {
  height: 100%;
}

body.screenshot-mode {
  overflow: hidden;
}

body.screenshot-mode .entry-shell,
body.screenshot-mode .learner-start,
body.screenshot-mode .student-home,
body.screenshot-mode .teacher-login {
  min-height: 100vh;
}

body.screenshot-mode .entry-shell {
  width: min(1100px, calc(100vw - 2rem));
  padding: 1.2rem 0;
}

body.screenshot-mode .entry-panel {
  min-height: 460px;
  display: grid;
  align-content: center;
  padding: 2.2rem 2.5rem;
}

body.screenshot-mode .entry-panel::before {
  margin-bottom: .85rem;
}

body.screenshot-mode .entry-panel h1 {
  font-size: 3rem;
}

body.screenshot-mode .entry-lead,
body.screenshot-mode .entry-subtitle {
  max-width: 760px;
  font-size: 1.08rem;
}

body.screenshot-mode .learner-start {
  width: min(500px, calc(100vw - 2rem));
  gap: .65rem;
  padding: 1rem 0;
}

body.screenshot-mode .goal-card,
body.screenshot-mode .login-panel,
body.screenshot-mode .teacher-card {
  padding: .95rem;
}

body.screenshot-mode .goal-card::before,
body.screenshot-mode .login-panel::before,
body.screenshot-mode .teacher-card::before,
body.screenshot-mode .panel::before {
  margin: -.95rem -.95rem .65rem;
}

body.screenshot-mode .login-form,
body.screenshot-mode .teacher-form {
  gap: .55rem;
  margin-top: .65rem;
}

body.screenshot-mode .local-fallback {
  margin-top: .55rem;
  padding-top: .55rem;
}

body.screenshot-mode .student-home {
  width: min(1180px, calc(100vw - 2rem));
  padding: 1.05rem 0;
}

body.screenshot-mode .student-home-head {
  margin-bottom: .75rem;
}

body.screenshot-mode .student-home-head h1 {
  font-size: 2.65rem;
}

body.screenshot-mode .module-card {
  gap: .7rem;
  min-height: 252px;
  padding: .9rem;
  grid-template-rows: minmax(0, 1fr) auto auto;
}

body.screenshot-mode .module-card::before {
  margin: -.9rem -.9rem .65rem;
}

body.screenshot-mode .module-card h2 {
  font-size: 1.85rem;
}

body.screenshot-mode .lesson-top-inner {
  padding: .55rem 0;
}

body.screenshot-mode .lesson-title strong {
  font-size: 1rem;
}

body.screenshot-mode .progress-text {
  margin-top: .45rem;
}

body.screenshot-mode .stage {
  padding: .75rem 0 .55rem;
}

body.screenshot-mode .slide {
  min-height: 0;
  max-height: calc(100vh - 174px);
  overflow: auto;
  padding: 2rem 2.35rem;
}

body.screenshot-mode .slide h1 {
  font-size: 2.55rem;
}

body.screenshot-mode .slide-text p,
body.screenshot-mode .slide-text li {
  font-size: 1rem;
  line-height: 1.45;
}

body.screenshot-mode .assignment-preview {
  margin-top: .85rem;
}

body.screenshot-mode .assignment-step {
  padding: .28rem 0;
}

body.screenshot-mode .assignment-code-preview pre {
  font-size: 12px;
  line-height: 1.45;
  max-height: 150px;
}

body.screenshot-mode .lesson-nav {
  padding: 0 0 .75rem;
}

body.screenshot-mode .teacher-shell {
  width: min(1220px, calc(100vw - 2rem));
  padding: .75rem 0;
}

body.screenshot-mode .teacher-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: .55rem;
}

body.screenshot-mode .teacher-header h1 {
  font-size: 2.15rem;
  margin: .1rem 0 .05rem;
}

body.screenshot-mode .teacher-header p,
body.screenshot-mode .student-admin-head p,
body.screenshot-mode .teacher-card p {
  font-size: .98rem;
  line-height: 1.42;
}

body.screenshot-mode .teacher-header p {
  font-size: .88rem;
  line-height: 1.25;
}

body.screenshot-mode .teacher-shell > .message {
  display: none;
}

body.screenshot-mode .teacher-tabs {
  gap: .32rem;
  margin-bottom: .45rem;
  padding-bottom: .3rem;
}

body.screenshot-mode .teacher-tab {
  padding: .35rem .55rem;
}

body.screenshot-mode .teacher-overview-grid {
  gap: .6rem;
  margin-bottom: .6rem;
}

body.screenshot-mode .teacher-stat-card {
  padding: .75rem;
}

body.screenshot-mode .teacher-stat-card strong {
  font-size: 1.8rem;
}

body.screenshot-mode .teacher-overview-panels {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .95fr) minmax(260px, .72fr);
  gap: .65rem;
}

body.screenshot-mode .teacher-overview-panels > .teacher-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / span 2;
}

body.screenshot-mode .teacher-overview-panels > .teacher-card:nth-child(2) {
  grid-column: 2 / span 2;
  grid-row: 1;
}

body.screenshot-mode .teacher-overview-panels > .teacher-card:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

body.screenshot-mode .teacher-overview-panels > .teacher-card:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

body.screenshot-mode .teacher-card h2,
body.screenshot-mode .next-steps-card h2,
body.screenshot-mode .teacher-import-card h2 {
  font-size: 1.55rem;
}

body.screenshot-mode .next-step-list {
  gap: .35rem;
  margin-top: .45rem;
}

body.screenshot-mode .next-step-list li {
  grid-template-columns: 1.7rem minmax(0, 1fr) 8.8rem;
  padding: .36rem 0;
}

body.screenshot-mode .compact-list {
  gap: .38rem;
}

body.screenshot-mode .compact-list > div {
  padding-top: .42rem;
}

body.screenshot-mode .student-admin-head {
  padding: .7rem .8rem;
  margin-bottom: .45rem;
}

body.screenshot-mode .student-admin-head h2 {
  font-size: 1.35rem;
}

body.screenshot-mode .teacher-two-column {
  grid-template-columns: minmax(330px, .72fr) minmax(0, 1.7fr);
  gap: .65rem;
  max-height: calc(100vh - 208px);
  overflow: hidden;
}

body.screenshot-mode .teacher-shot-import-layout {
  grid-template-columns: minmax(480px, .96fr) minmax(0, 1.32fr);
}

body.screenshot-mode .teacher-two-column > div {
  gap: .55rem;
  min-height: 0;
  max-height: calc(100vh - 208px);
  overflow: hidden;
}

body.screenshot-mode .teacher-two-column > div:first-child {
  overflow: auto;
}

body.screenshot-mode .teacher-import-card,
body.screenshot-mode .password-export-card,
body.screenshot-mode .teacher-filters {
  padding: .7rem;
}

body.screenshot-mode .teacher-import-card > p.muted {
  display: none;
}

body.screenshot-mode .import-example {
  max-height: 46px;
  overflow: hidden;
  margin: .25rem 0 .45rem;
  padding: .42rem .5rem;
  font-size: 11px;
  line-height: 1.35;
}

body.screenshot-mode .advanced-import {
  display: none;
}

body.screenshot-mode .teacher-import-card label,
body.screenshot-mode .password-export-card label,
body.screenshot-mode .teacher-filters label {
  margin-bottom: .5rem;
}

body.screenshot-mode .import-textarea {
  min-height: 68px;
  max-height: 76px;
  resize: none;
}

body.screenshot-mode .import-preview,
body.screenshot-mode .import-result {
  margin-top: .55rem;
  padding: .55rem;
}

body.screenshot-mode .import-result p.muted {
  display: none;
}

body.screenshot-mode .csv-guidance {
  margin-bottom: .2rem;
  font-size: .78rem !important;
  line-height: 1.2 !important;
}

body.screenshot-mode .password-export-card h2 {
  font-size: 1.25rem;
}

body.screenshot-mode .teacher-shot-import-layout .password-export-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem .55rem;
  align-items: end;
}

body.screenshot-mode .teacher-shot-import-layout .password-export-card::before,
body.screenshot-mode .teacher-shot-import-layout .password-export-card .kicker,
body.screenshot-mode .teacher-shot-import-layout .password-export-card p {
  display: none;
}

body.screenshot-mode .teacher-shot-import-layout .password-export-card h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

body.screenshot-mode .teacher-shot-import-layout .password-export-card label {
  margin-bottom: 0;
}

body.screenshot-mode .import-preview-list {
  gap: .25rem;
  max-height: 70px;
  overflow: auto;
}

body.screenshot-mode .import-preview-row {
  padding: .36rem .45rem;
}

body.screenshot-mode .csv-preview {
  min-height: 48px;
  max-height: 58px;
  font-size: 11px;
}

body.screenshot-mode .teacher-filters.student-filters {
  grid-template-columns: 130px minmax(0, 1fr);
  margin-bottom: .55rem;
}

body.screenshot-mode .student-table-card {
  max-height: calc(100vh - 325px);
}

body.screenshot-mode .student-table-scroll {
  max-height: calc(100vh - 363px);
  overflow: auto;
}

body.screenshot-mode .student-table-head,
body.screenshot-mode .student-table-row {
  grid-template-columns: 22px 40px 78px minmax(92px, .8fr) minmax(118px, 1fr) 78px minmax(206px, 218px);
  gap: .24rem;
  padding: .28rem .42rem;
}

body.screenshot-mode .student-row-actions button {
  padding: .18rem .28rem;
}

body.screenshot-mode .student-row-actions {
  justify-content: flex-start;
}

body.screenshot-mode .student-table-row div,
body.screenshot-mode .student-select {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.screenshot-mode .teacher-shot-import-layout .teacher-import-card input,
body.screenshot-mode .teacher-shot-import-layout .teacher-import-card textarea,
body.screenshot-mode .teacher-shot-import-layout .password-export-card select,
body.screenshot-mode .teacher-shot-import-layout .teacher-filters input,
body.screenshot-mode .teacher-shot-import-layout .teacher-filters select {
  padding: .45rem .52rem;
}

body.screenshot-mode .teacher-shot-import-layout .teacher-import-card h2 {
  font-size: 1.38rem;
}

body.screenshot-mode .teacher-shot-import-layout .import-example {
  display: none;
}

body.screenshot-mode .teacher-shot-import-layout .import-preview-list {
  max-height: 58px;
}

body.screenshot-mode .teacher-shot-import-layout .import-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .3rem .45rem;
  align-items: start;
}

body.screenshot-mode .teacher-shot-import-layout .import-result h3,
body.screenshot-mode .teacher-shot-import-layout .import-result-summary {
  grid-column: 1;
}

body.screenshot-mode .teacher-shot-import-layout .import-result .top-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

body.screenshot-mode .teacher-shot-import-layout .import-result .csv-preview {
  display: none;
}

body.screenshot-mode .teacher-shot-import-layout .student-table-card {
  max-height: 106px;
}

body.screenshot-mode .teacher-shot-import-layout .student-table-scroll {
  max-height: 68px;
}

body.screenshot-mode .planning-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
  max-height: calc(100vh - 170px);
  overflow: hidden;
}

body.screenshot-mode .planning-card,
body.screenshot-mode .module-fit-card {
  overflow: auto;
}

body.screenshot-mode .planning-layout .module-fit-card {
  display: none;
}

body.screenshot-mode .planning-summary {
  gap: .4rem;
  margin: .38rem 0 .45rem;
}

body.screenshot-mode .planning-summary > div,
body.screenshot-mode .planning-roster-head,
body.screenshot-mode .planning-roster-row {
  padding: .36rem .48rem;
}

body.screenshot-mode .planning-roster {
  gap: .24rem;
  margin-top: .55rem;
  min-width: 0;
}

body.screenshot-mode .planning-roster-head,
body.screenshot-mode .planning-roster-row {
  grid-template-columns: 70px repeat(5, minmax(106px, 1fr));
  gap: .18rem;
}

body.screenshot-mode .planning-cell {
  min-height: 40px;
  padding: .24rem .32rem;
}

body.screenshot-mode .planning-cell strong {
  font-size: .78rem;
}

body.screenshot-mode .planning-cell small {
  font-size: .66rem;
}

body.screenshot-mode .planning-form {
  gap: .38rem;
}

body.screenshot-mode .planning-form-row,
body.screenshot-mode .planning-textareas {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .36rem;
}

body.screenshot-mode .planning-moments {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .28rem;
}

body.screenshot-mode .planning-form textarea {
  min-height: 42px;
  max-height: 54px;
}

body.screenshot-mode .module-fit-list > div {
  grid-template-columns: 1fr;
  gap: .12rem;
  padding-top: .45rem;
}

body.screenshot-mode .teacher-filters {
  grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(220px, 1.2fr);
  gap: .55rem;
  margin-bottom: .45rem;
}

body.screenshot-mode .submission-list {
  max-height: calc(100vh - 192px);
  overflow: hidden;
}

body.screenshot-mode .submission-card {
  padding: .75rem;
  max-height: calc(100vh - 198px);
  overflow: auto;
}

body.screenshot-mode .submission-card::before {
  margin: -.75rem -.75rem .55rem;
}

body.screenshot-mode .submission-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .4rem;
  margin: .55rem 0;
}

body.screenshot-mode .submission-main h2 {
  font-size: 1.9rem;
}

body.screenshot-mode .submission-grid > div,
body.screenshot-mode .teacher-note,
body.screenshot-mode .teacher-review-panel,
body.screenshot-mode .review-explainer > div,
body.screenshot-mode .teacher-level-row,
body.screenshot-mode .teacher-task-row,
body.screenshot-mode .teacher-answer-row {
  padding: .48rem .55rem;
}

body.screenshot-mode .teacher-review-levels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
  margin: .5rem 0;
}

body.screenshot-mode .teacher-note {
  margin-bottom: .5rem;
}

body.screenshot-mode .teacher-task-list,
body.screenshot-mode .teacher-answer-list,
body.screenshot-mode .teacher-proof-table {
  max-height: 88px;
  overflow: auto;
}

body.screenshot-mode .teacher-proof-head,
body.screenshot-mode .teacher-proof-row {
  grid-template-columns: minmax(105px, .8fr) minmax(150px, 1.2fr) minmax(120px, .9fr) 82px;
  gap: .32rem;
}

body.screenshot-mode .teacher-proof-row {
  padding: .34rem .42rem;
}

body.screenshot-mode .teacher-proof-row button {
  padding: .22rem .34rem;
}

body.screenshot-mode .teacher-answer-row {
  gap: .18rem;
}

body.screenshot-mode .teacher-answer-row p,
body.screenshot-mode .teacher-note p {
  margin-bottom: 0;
}

body.screenshot-mode .review-explainer {
  gap: .35rem;
  margin-bottom: .45rem;
}

body.screenshot-mode .teacher-review-panel {
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: .55rem;
  margin-bottom: .5rem;
}

body.screenshot-mode .teacher-review-panel.shot-review-panel {
  grid-template-columns: minmax(0, 1fr) 150px minmax(310px, auto);
  align-items: end;
}

body.screenshot-mode .teacher-review-panel textarea {
  min-height: 54px;
  max-height: 68px;
  resize: none;
}

body.screenshot-mode .review-actions button {
  padding: .42rem .62rem;
}

body.screenshot-mode .shot-review-actions button.danger {
  border-color: var(--line);
  background: var(--paper-warm);
  color: var(--muted);
}

body.screenshot-mode .submission-card .review-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: .3rem -.75rem -.75rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: .45rem .75rem;
}

body.screenshot-mode .shot-review-panel .review-actions {
  position: static;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

body.screenshot-mode .builder-shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.screenshot-mode .builder-top-inner {
  padding: .6rem 0;
}

body.screenshot-mode .builder-title h1 {
  font-size: 2.45rem;
  margin-bottom: .22rem;
}

body.screenshot-mode .builder-title p {
  line-height: 1.25;
}

body.screenshot-mode .tabs {
  padding-bottom: .45rem;
}

body.screenshot-mode .builder-grid {
  height: calc(100vh - 154px);
  padding: .65rem 0;
  grid-template-columns: 300px minmax(0, 1fr) 390px;
  overflow: hidden;
}

body.screenshot-mode .builder-grid > .panel {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding: .85rem;
  scrollbar-width: thin;
}

body.screenshot-mode .builder-grid > .panel::before {
  margin: -.85rem -.85rem .6rem;
}

body.screenshot-mode .builder-grid h2 {
  font-size: 1.55rem;
}

body.screenshot-mode .block-list {
  max-height: calc(100vh - 322px);
  overflow: auto;
}

body.screenshot-mode .block-button {
  padding: .38rem .48rem;
}

body.screenshot-mode .section-gap {
  margin-top: .7rem;
  padding-top: .7rem;
}

body.screenshot-mode textarea {
  min-height: 72px;
}

body.screenshot-mode .builder-grid label {
  margin-bottom: .45rem;
}

body.screenshot-mode .builder-grid input,
body.screenshot-mode .builder-grid textarea,
body.screenshot-mode .builder-grid select {
  padding: .48rem .55rem;
}

body.screenshot-mode .code-editor-area {
  min-height: 180px;
}

body.screenshot-mode .term-list-panel {
  max-height: 240px;
  overflow: auto;
}

body.screenshot-mode .yaml-view {
  height: calc(100vh - 154px);
  padding: .65rem 0;
  overflow: hidden;
}

body.screenshot-mode .yaml-view .panel {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: .85rem;
}

body.screenshot-mode .yaml-view .panel::before {
  margin: -.85rem -.85rem .6rem;
}

body.screenshot-mode .yaml-area {
  min-height: 0;
  height: calc(100vh - 315px);
  max-height: none;
  resize: none;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  body.screenshot-mode {
    overflow: hidden;
  }

  body.screenshot-mode .entry-panel {
    padding: 1.35rem;
  }

  body.screenshot-mode .entry-panel h1,
  body.screenshot-mode .student-home-head h1,
  body.screenshot-mode .slide h1 {
    font-size: 2.05rem;
  }

  body.screenshot-mode .entry-flow,
  body.screenshot-mode .entry-benefits,
  body.screenshot-mode .module-card-grid {
    grid-template-columns: 1fr;
  }

  body.screenshot-mode .assignment-preview {
    grid-template-columns: 1fr;
  }

  body.screenshot-mode .python-code-textarea {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  body.screenshot-mode .student-home {
    padding: .85rem 0;
  }

  body.screenshot-mode .student-home-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .45rem;
    margin-bottom: .55rem;
  }

  body.screenshot-mode .student-home-head .top-actions {
    justify-content: flex-end;
  }

  body.screenshot-mode .student-home-helper {
    font-size: .9rem !important;
    line-height: 1.32 !important;
  }

  body.screenshot-mode .module-card {
    min-height: 0;
    gap: .5rem;
    padding: .75rem;
  }

  body.screenshot-mode .module-card::before {
    margin: -.75rem -.75rem .55rem;
  }

  body.screenshot-mode .module-card h2 {
    font-size: 1.35rem;
  }

  body.screenshot-mode .module-card p {
    font-size: .95rem;
    line-height: 1.32;
  }

  body.screenshot-mode .module-card-meta {
    margin-top: .45rem;
  }

  body.screenshot-mode .module-card-signals {
    grid-template-columns: 1fr;
    gap: .16rem;
    margin-top: .35rem;
  }

  body.screenshot-mode .lesson-top-inner {
    padding: .45rem 0;
  }

  body.screenshot-mode .lesson-title {
    gap: .45rem;
  }

  body.screenshot-mode .stage {
    padding: .55rem 0 .4rem;
  }

  body.screenshot-mode .slide {
    max-height: calc(100vh - 210px);
    padding: 1.05rem;
  }

  body.screenshot-mode .lesson-nav {
    padding-bottom: .45rem;
  }
}

/* APP SHELL / UNIFIED UI */
.app-shell {
  width: min(1500px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 1.5rem;
}

.app-shell__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: .85rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
}

.app-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #1d2633, #314258);
  color: #fffdf7;
  text-decoration: none;
  font: 850 .95rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: .06em;
}

.app-brand strong {
  display: block;
  font-size: 1.1rem;
}

.app-brand span,
.app-identity span {
  display: block;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
}

.app-kicker {
  margin-bottom: .1rem;
  color: var(--muted);
  font: 850 .73rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, .8);
  box-shadow: var(--shadow);
}

.app-avatar,
.section-avatar {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: #1d2633;
  color: #fffdf7;
  font: 850 .9rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .85rem;
}

.app-nav-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.4rem;
  padding: .52rem .78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, .92);
  color: var(--ink);
  text-decoration: none;
  font: 750 .92rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: 0 6px 14px rgba(43, 34, 22, .05);
}

.app-nav-item.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--paper);
}

.app-nav-icon {
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.app-nav-icon svg {
  width: 100%;
  height: 100%;
}

.app-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .85rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2rem;
  padding: .34rem .7rem;
  border-radius: 999px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  color: var(--soft);
  font: 750 .82rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.status-chip.neutral {
  background: #fffaf0;
}

.app-shell__content {
  min-width: 0;
}

.app-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,253,247,.98), rgba(251,244,232,.98));
  box-shadow: var(--shadow);
}

.goal-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .4rem;
}

.entry-panel,
.student-home,
.learner-start,
.teacher-shell,
.builder-shell {
  margin-top: .2rem;
}

.entry-panel {
  padding: 1.25rem;
}

.entry-hero {
  margin-bottom: 1rem;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.entry-link {
  border-radius: 999px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}

.app-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.lesson-top,
.builder-top,
.teacher-header,
.student-home-head {
  border-radius: 20px;
}

.lesson-top {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .95);
  box-shadow: var(--shadow);
}

.lesson-top-inner,
.builder-top-inner {
  width: auto;
}

.student-home-head,
.teacher-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.student-home-helper {
  max-width: 56rem;
}

.module-card-grid,
.teacher-overview-grid,
.teacher-overview-panels,
.teacher-two-column,
.planning-layout {
  display: grid;
  gap: .95rem;
}

.module-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-card,
.teacher-card,
.submission-card,
.goal-card,
.login-panel,
.compact-import-card,
.password-export-card,
.planning-card,
.module-fit-card,
.demo-data-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, .96);
  box-shadow: var(--shadow);
}

.module-card {
  padding: 1rem;
  display: grid;
  gap: .85rem;
}

.module-card-meta,
.module-card-signals {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.module-card-meta span,
.module-signal {
  padding: .22rem .55rem;
  border-radius: 999px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  font: 700 .78rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--soft);
}

.module-card-progress {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.module-card-progress strong {
  min-width: 3rem;
}

.mini-progress {
  flex: 1 1 auto;
  height: .42rem;
  border-radius: 999px;
  background: #e8dfd1;
  overflow: hidden;
}

.mini-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #2f6f4e, #1d2633);
}

.teacher-card,
.goal-card,
.login-panel,
.submission-card {
  padding: 1rem;
}

.teacher-header {
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .95);
}

.teacher-tabs,
.tabs {
  flex-wrap: wrap;
  gap: .4rem;
}

.teacher-tab,
.tab {
  border-radius: 999px;
}

.teacher-tab.active,
.tab.active {
  background: var(--navy);
  color: #fffdf7;
}

.teacher-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-overview-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-two-column,
.planning-layout {
  grid-template-columns: 1fr 1fr;
}

.teacher-stat-card {
  border-radius: 18px;
}

.student-table-card,
.import-preview,
.import-result,
.teacher-proof-table,
.submission-status-panel,
.teacher-review-panel,
.teacher-review-levels,
.teacher-note {
  border-radius: 16px;
}

.lesson-nav {
  margin-top: .8rem;
  padding-bottom: .3rem;
}

.builder-grid {
  width: auto;
}

body.entry-body .app-shell,
body.learner-body .app-shell,
body.teacher-body .app-shell {
  padding-top: 1rem;
}

body.entry-body .app-shell__content,
body.learner-body .app-shell__content,
body.teacher-body .app-shell__content {
  min-width: 0;
}

body.screenshot-mode .app-shell {
  width: min(1500px, calc(100vw - 1.2rem));
  padding-top: .7rem;
}

body.screenshot-mode .module-card-grid {
  gap: .75rem;
}

body.screenshot-mode .app-panel,
body.screenshot-mode .teacher-card,
body.screenshot-mode .module-card,
body.screenshot-mode .goal-card,
body.screenshot-mode .login-panel,
body.screenshot-mode .submission-card {
  box-shadow: none;
}

/* COMPACT SHELL POLISH */
.app-shell {
  width: min(1220px, calc(100vw - 1.5rem));
  padding: .65rem 0 1rem;
}

.app-shell--builder {
  width: min(1500px, calc(100vw - 1.5rem));
}

.app-shell__top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: start;
  margin-bottom: .5rem;
}

.app-shell__primary {
  display: grid;
  gap: .42rem;
  justify-items: start;
  min-width: 0;
}

.app-brand {
  gap: .62rem;
}

.app-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  font-size: .82rem;
  letter-spacing: 0;
}

.app-brand strong {
  font-size: 1rem;
  line-height: 1.12;
}

.app-brand span,
.app-identity span {
  font-size: .76rem;
  line-height: 1.15;
}

.app-kicker {
  margin-bottom: .04rem;
  font-size: .66rem;
  letter-spacing: 0;
}

.app-identity {
  gap: .48rem;
  padding: .36rem .48rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(43, 34, 22, .05);
}

.app-identity strong {
  display: block;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
  line-height: 1.1;
}

.app-avatar,
.section-avatar {
  width: 2rem;
  height: 2rem;
  font-size: .78rem;
}

.app-nav {
  gap: .28rem;
  margin: 0;
}

.app-nav-item {
  min-height: 1.95rem;
  padding: .36rem .55rem;
  border-radius: 6px;
  box-shadow: none;
  font-size: .82rem;
}

.app-nav-item.is-active {
  border-color: var(--navy);
  background: #eee2cc;
  color: var(--navy);
  box-shadow: inset 0 -2px 0 var(--navy);
}

.app-nav-icon {
  width: .95rem;
  height: .95rem;
}

.app-status-row {
  gap: .32rem;
  margin: .15rem 0 .6rem;
}

.status-chip {
  min-height: 1.65rem;
  padding: .24rem .52rem;
  border-radius: 6px;
  font-size: .76rem;
}

.app-panel,
.module-card,
.teacher-card,
.submission-card,
.goal-card,
.login-panel,
.compact-import-card,
.password-export-card,
.planning-card,
.module-fit-card,
.demo-data-card,
.student-table-card,
.import-preview,
.import-result,
.teacher-proof-table,
.submission-status-panel,
.teacher-review-panel,
.teacher-review-levels,
.teacher-note,
.lesson-top,
.teacher-header,
.student-admin-head {
  border-radius: 8px;
}

.entry-panel,
.student-home,
.learner-start,
.teacher-shell {
  width: auto;
  min-height: 0;
  padding: 1rem;
}

.teacher-shell {
  margin: 0;
}

.teacher-login,
body.screenshot-mode .teacher-login,
body.screenshot-mode .learner-start,
body.screenshot-mode .student-home,
body.screenshot-mode .entry-shell {
  min-height: 0;
}

.teacher-login {
  width: min(520px, 100%);
  padding: 0;
  align-content: start;
}

.entry-panel {
  padding: 1.05rem;
}

.entry-hero {
  margin-bottom: .75rem;
}

.entry-subtitle,
.entry-lead {
  max-width: 760px;
}

.entry-subtitle {
  margin-bottom: .35rem;
}

.entry-lead {
  margin-bottom: .75rem;
}

.entry-benefits {
  gap: .55rem;
}

.entry-benefits article {
  padding: .65rem .75rem;
  border-radius: 8px;
}

.entry-links {
  margin-top: .85rem;
  gap: .4rem;
}

.entry-link {
  border-radius: 6px;
  padding: .46rem .66rem;
}

.student-home-head,
.teacher-header {
  margin-bottom: .65rem;
  padding: .65rem .75rem;
}

.student-home-head h1,
.teacher-header h1 {
  margin: 0 0 .16rem;
}

.student-home-head h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.student-home-helper {
  margin: 0;
  max-width: 42rem;
  font-size: .9rem !important;
  line-height: 1.32 !important;
}

.module-card-grid {
  gap: .7rem;
}

.module-card {
  gap: .65rem;
  padding: .8rem;
}

.module-card h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.module-card p {
  margin-bottom: .4rem;
  font-size: .96rem;
  line-height: 1.36;
}

.module-card-meta span,
.module-signal {
  border-radius: 6px;
  font-size: .72rem;
}

.lesson-top {
  margin-bottom: .65rem;
}

.lesson-top-inner {
  padding: .52rem .65rem;
}

.lesson-progress-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
}

.lesson-progress-main {
  min-width: 0;
}

.lesson-step-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .55rem;
  align-items: baseline;
  margin-bottom: .34rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.lesson-step-line span {
  color: var(--soft);
  font-size: .84rem;
  font-weight: 850;
}

.lesson-step-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: .95rem;
}

.lesson-step-line em {
  color: var(--muted);
  font-size: .8rem;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.progress-text {
  margin: 0 0 .26rem;
}

.stage {
  padding: .65rem 0 .45rem;
}

.slide {
  min-height: 0;
  border-radius: 8px;
  padding: clamp(1.15rem, 2.2vw, 2rem);
}

.slide h1 {
  font-size: clamp(1.75rem, 3vw, 2.45rem);
}

.code-panel {
  margin-top: .65rem;
  border-radius: 8px;
}

.code-panel-header {
  padding: .48rem .6rem;
}

.dbml-box {
  max-height: 300px;
  padding: .65rem;
}

body.learner-body .python-code-textarea {
  min-height: 170px !important;
  max-height: 240px !important;
}

.lesson-nav {
  margin-top: .55rem;
}

.teacher-header h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.teacher-tabs,
.tabs {
  margin-bottom: .65rem;
  padding-bottom: .38rem;
}

.teacher-tab,
.tab {
  border-radius: 6px;
  padding: .38rem .56rem;
  font-size: .86rem;
}

.teacher-tab.active,
.tab.active {
  background: #eee2cc;
  color: var(--navy);
  box-shadow: inset 0 -2px 0 var(--navy);
}

.teacher-overview-grid,
.teacher-overview-panels,
.teacher-two-column,
.planning-layout {
  gap: .65rem;
}

.teacher-stat-card,
.teacher-card,
.submission-card {
  padding: .78rem;
}

.teacher-stat-card strong {
  font-size: 1.65rem;
}

.next-step-list {
  gap: .35rem;
  margin-top: .45rem;
}

.next-step-list li {
  grid-template-columns: 1.75rem minmax(0, 1fr) 8.5rem;
  gap: .48rem;
  padding: .34rem 0;
}

.student-admin-head {
  margin-bottom: .55rem;
}

.student-admin-head h2,
.teacher-import-card h2,
.module-admin-card h2 {
  font-size: 1.25rem;
}

.teacher-filters,
.teacher-import-card,
.password-export-card {
  padding: .65rem;
}

.student-table-head,
.student-table-row {
  grid-template-columns: 24px 42px 86px minmax(110px, .9fr) minmax(128px, 1fr) 78px minmax(220px, auto);
  padding: .28rem .42rem;
}

.student-row-actions button {
  min-height: 1.85rem;
}

.planning-summary {
  gap: .42rem;
  margin: .55rem 0;
}

.planning-summary > div {
  padding: .46rem .55rem;
}

.planning-roster {
  min-width: 820px;
  gap: .24rem;
  margin-top: .55rem;
}

.planning-roster-head,
.planning-roster-row {
  grid-template-columns: 70px repeat(5, minmax(100px, 1fr));
  gap: .22rem;
  padding: .28rem;
}

.planning-cell {
  min-height: 42px;
  padding: .28rem .34rem;
}

.planning-cell strong {
  font-size: .78rem;
}

.planning-cell small {
  font-size: .66rem;
}

.submission-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  margin: .62rem 0;
}

.submission-grid > div,
.teacher-note,
.teacher-review-panel,
.review-explainer > div,
.teacher-level-row,
.teacher-task-row,
.teacher-answer-row {
  padding: .55rem .6rem;
}

.review-actions {
  align-items: flex-end;
}

.builder-top {
  margin-bottom: .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, .95);
}

.builder-top-inner {
  padding: .5rem .65rem .35rem;
  align-items: center;
}

.builder-title strong {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
}

.builder-title p {
  margin-bottom: 0;
  font-size: .86rem;
  line-height: 1.25;
}

.builder-top .tabs {
  width: auto;
  margin: 0;
  padding: 0 .65rem .5rem;
}

.builder-grid {
  padding: .55rem 0 1rem;
  gap: .75rem;
}

.builder-grid > .panel {
  max-height: calc(100vh - 12.2rem);
  border-radius: 8px;
  padding: .8rem;
}

.yaml-view {
  width: auto;
  padding: .55rem 0 1rem;
}

.yaml-area {
  min-height: 58vh;
}

body.screenshot-mode .app-shell {
  width: min(1220px, calc(100vw - 1rem));
  padding-top: .45rem;
}

body.screenshot-mode .app-shell--builder {
  width: min(1500px, calc(100vw - 1rem));
}

body.screenshot-mode .app-shell__top {
  margin-bottom: .34rem;
}

body.screenshot-mode .app-status-row {
  margin-bottom: .42rem;
}

body.screenshot-mode .entry-panel {
  min-height: 0;
  align-content: start;
  padding: .9rem;
}

body.screenshot-mode .entry-panel h1 {
  font-size: 2.45rem;
}

body.screenshot-mode .student-home {
  width: auto;
  padding: .85rem;
}

body.screenshot-mode .student-home-head h1 {
  font-size: 2.15rem;
}

body.screenshot-mode .module-card {
  min-height: 0;
  padding: .72rem;
}

body.screenshot-mode .lesson-top-inner {
  padding: .42rem .55rem;
}

body.screenshot-mode .stage {
  padding: .45rem 0 .3rem;
}

body.screenshot-mode .slide {
  max-height: calc(100vh - 184px);
  padding: 1rem 1.15rem;
}

body.screenshot-mode .slide h1 {
  font-size: 2.05rem;
}

body.screenshot-mode .teacher-shell {
  width: auto;
  padding: 0;
}

body.screenshot-mode .teacher-header {
  margin-bottom: .42rem;
  padding: .55rem .65rem;
}

body.screenshot-mode .teacher-header h1 {
  font-size: 1.55rem;
}

body.screenshot-mode .teacher-two-column {
  max-height: calc(100vh - 178px);
}

body.screenshot-mode .teacher-two-column > div {
  max-height: calc(100vh - 178px);
}

body.screenshot-mode .planning-layout {
  max-height: calc(100vh - 138px);
}

body.screenshot-mode .submission-list {
  max-height: calc(100vh - 164px);
}

body.screenshot-mode .submission-card {
  max-height: calc(100vh - 168px);
}

body.screenshot-mode .submission-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.screenshot-mode .builder-top-inner {
  padding: .42rem .58rem .28rem;
}

body.screenshot-mode .tabs {
  padding-bottom: .32rem;
}

body.screenshot-mode .builder-grid {
  height: calc(100vh - 176px);
  padding: .45rem 0;
}

body.screenshot-mode .yaml-view {
  height: calc(100vh - 176px);
  padding: .45rem 0;
}

body.screenshot-mode .yaml-area {
  height: calc(100vh - 310px);
}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - .75rem);
    padding-top: .45rem;
  }

  .app-shell__top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .42rem;
  }

  .app-brand {
    gap: .45rem;
  }

  .app-mark {
    width: 2rem;
    height: 2rem;
  }

  .app-kicker,
  .app-brand span {
    display: none;
  }

  .app-identity {
    padding: .28rem .36rem;
  }

  .app-identity strong {
    max-width: 5.8rem;
    font-size: .78rem;
  }

  .app-avatar {
    width: 1.75rem;
    height: 1.75rem;
  }

  .app-nav {
    max-width: calc(100vw - 1rem);
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .08rem;
    scrollbar-width: none;
  }

  .app-nav::-webkit-scrollbar {
    display: none;
  }

  .app-nav-item {
    flex: 0 0 auto;
    min-height: 1.85rem;
    padding: .32rem .46rem;
    font-size: .78rem;
  }

  .app-status-row {
    gap: .24rem;
    margin-bottom: .42rem;
  }

  .status-chip {
    min-height: 1.5rem;
    padding: .2rem .4rem;
    font-size: .7rem;
  }

  .entry-panel,
  .student-home,
  .learner-start,
  .teacher-shell {
    padding: .7rem;
  }

  .entry-benefits,
  .module-card-grid,
  .teacher-overview-grid,
  .teacher-overview-panels,
  .teacher-two-column,
  .planning-layout,
  .submission-grid {
    grid-template-columns: 1fr;
  }

  .student-home-head,
  .teacher-header,
  .lesson-progress-line,
  .builder-top-inner {
    grid-template-columns: 1fr;
  }

  .student-home-head,
  .teacher-header {
    padding: .55rem;
  }

  .student-home-head .top-actions,
  .lesson-progress-line .top-actions {
    justify-content: flex-start;
  }

  .module-card {
    padding: .68rem;
  }

  .slide {
    padding: .9rem;
  }

  body.screenshot-mode .slide {
    max-height: calc(100vh - 178px);
  }

  body.screenshot-mode .student-home-head {
    grid-template-columns: 1fr;
  }
}

/* FINAL SMALL UI POLISH */
.teacher-header--compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: .35rem;
  padding: .38rem .55rem;
  background: rgba(255, 253, 247, .72);
  box-shadow: none;
}

.teacher-header--compact .kicker {
  display: none;
}

.teacher-header--compact h1 {
  margin: 0;
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  line-height: 1.12;
}

.teacher-header--compact .top-actions {
  gap: .32rem;
}

.teacher-header--compact .top-actions button {
  min-height: 1.85rem;
  padding: .3rem .5rem;
  font-size: .8rem;
}

.teacher-header--compact + .teacher-tabs {
  margin-bottom: .42rem;
  padding-bottom: .3rem;
}

.student-admin-head {
  margin-bottom: .42rem;
  padding: .55rem .65rem;
}

.student-admin-head h2 {
  margin-bottom: .12rem;
}

.student-admin-head p {
  font-size: .9rem;
  line-height: 1.3;
}

.builder-top {
  margin-bottom: .48rem;
}

.builder-top-inner {
  padding: .42rem .6rem .26rem;
}

.builder-title .kicker {
  margin-bottom: .12rem;
}

.builder-top .tabs {
  padding-bottom: .42rem;
}

.code-panel,
body.learner-body .code-panel {
  width: 100%;
  max-width: 780px;
  min-width: 0;
}

.dbml-box,
.assignment-code-preview pre,
.dbml-textarea {
  overflow-x: auto !important;
  overflow-y: auto !important;
  white-space: pre !important;
}

.dbml-textarea {
  max-width: 100% !important;
  min-width: 0 !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.code-panel-header {
  min-width: 0;
}

.code-panel-header strong {
  min-width: 0;
}

@media (max-width: 760px) {
  .teacher-header--compact {
    grid-template-columns: 1fr;
    gap: .35rem;
    padding: .42rem .5rem;
  }

  .teacher-header--compact .top-actions {
    justify-content: flex-start;
  }

  .student-admin-head {
    padding: .5rem;
  }

  .module-admin-head,
  .module-create-panel,
  .module-admin-main,
  .module-field-grid,
  .planning-form-row,
  .planning-textareas,
  .planning-moments,
  .activation-summary {
    grid-template-columns: 1fr;
  }

  .module-action-row,
  .student-row-actions {
    justify-content: stretch;
  }

  .student-admin-head p {
    display: none;
  }

  .code-panel,
  body.learner-body .code-panel {
    max-width: 100%;
  }

  .code-panel-header {
    flex-wrap: wrap;
    gap: .4rem;
  }

  .dbml-textarea {
    min-height: 300px !important;
  }

  body.learner-body .python-code-textarea {
    min-height: 210px !important;
  }
}

/* TARGETED STABILITY POLISH */
.app-shell__top {
  min-height: 4.25rem;
}

.app-identity {
  justify-self: end;
}

.app-nav {
  min-height: 1.95rem;
}

.app-nav-item {
  justify-content: center;
  white-space: nowrap;
}

.module-flow-grid {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.5fr);
  gap: .65rem;
  align-items: start;
}

.module-panel-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: start;
  margin-bottom: .65rem;
}

.module-panel-head h2 {
  margin-bottom: .18rem;
  font-size: 1.25rem;
}

.module-list {
  display: grid;
  gap: .42rem;
}

.module-list-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .55rem;
  background: var(--paper-warm);
}

.module-list-row.active {
  border-color: var(--navy);
  background: #eee2cc;
  box-shadow: inset 3px 0 0 var(--navy);
}

.module-list-row strong,
.module-list-row span {
  display: block;
  min-width: 0;
}

.module-list-row strong {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9rem;
  line-height: 1.2;
}

.module-list-row span:not(.status-pill) {
  margin-top: .12rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .78rem;
  line-height: 1.25;
}

.module-list-main {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.module-list-main:hover {
  background: transparent;
}

.module-row-meta {
  display: flex !important;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}

.type-badge {
  display: inline-flex !important;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .1rem .35rem;
  background: #fffdf7;
  color: var(--soft) !important;
  font-size: .72rem !important;
  font-weight: 850;
  text-transform: uppercase;
}

.module-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
  align-items: center;
}

.module-editor-panel {
  min-width: 0;
}

.module-status-field {
  grid-column: span 2;
}

.module-status-field select {
  width: 100%;
}

.module-editor-actions {
  justify-content: flex-start;
}

.teacher-shell--leerlingen .teacher-two-column {
  grid-template-columns: minmax(250px, .7fr) minmax(0, 1.7fr);
}

.student-table-card {
  max-width: 100%;
  overflow-x: auto;
}

.student-table-head,
.student-table-row {
  grid-template-columns: 24px 42px 86px minmax(110px, .9fr) minmax(128px, 1fr) 88px 15rem;
  min-width: 760px;
}

.student-row-actions {
  grid-template-columns: repeat(2, minmax(7rem, 1fr));
  justify-content: end;
  justify-items: stretch;
}

.student-row-actions button {
  width: 100%;
  min-height: 2rem;
  line-height: 1.1;
  font-size: .76rem;
  overflow: visible;
  text-overflow: clip;
}

.planning-summary small {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .72rem;
  line-height: 1.25;
}

body.screenshot-mode .student-table-head,
body.screenshot-mode .student-table-row {
  grid-template-columns: 22px 40px 78px minmax(92px, .8fr) minmax(118px, 1fr) 78px minmax(232px, 240px);
}

body.screenshot-mode .student-row-actions {
  grid-template-columns: repeat(2, minmax(6.85rem, 1fr));
}

@media (max-width: 760px) {
  .app-shell__top {
    min-height: 3.35rem;
  }

  .module-flow-grid,
  .teacher-shell--leerlingen .teacher-two-column {
    grid-template-columns: 1fr;
  }

  .module-list-row,
  .module-field-grid,
  .student-table-head,
  .student-table-row {
    min-width: 0;
  }

  .module-status-field {
    grid-column: auto;
  }

  .student-row-actions {
    grid-template-columns: repeat(2, minmax(7rem, 1fr));
  }
}

/* GENERIC ROLE POLISH */
.builder-top-inner {
  grid-template-columns: minmax(180px, .28fr) minmax(0, 1fr);
  align-items: start;
}

.builder-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: start;
}

.builder-view-group,
.builder-action-group {
  display: grid;
  gap: .28rem;
}

.builder-action-group {
  justify-items: end;
}

.builder-view-group > span,
.builder-action-group > span {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.builder-view-group .tabs {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.builder-action-group .top-actions {
  justify-content: flex-end;
}

.planning-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.student-table-head,
.student-table-row {
  grid-template-columns: 24px 42px 82px minmax(96px, .75fr) minmax(112px, 1fr) 84px 17rem;
  min-width: 820px;
}

.student-row-actions {
  grid-template-columns: repeat(2, minmax(7.5rem, 1fr));
}

.student-row-actions button {
  white-space: nowrap;
}

body.screenshot-mode .student-table-head,
body.screenshot-mode .student-table-row {
  grid-template-columns: 22px 40px 76px minmax(86px, .7fr) minmax(110px, 1fr) 78px 16.5rem;
}

body.screenshot-mode .student-row-actions {
  grid-template-columns: repeat(2, minmax(7.4rem, 1fr));
}

body.screenshot-mode .planning-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .builder-top-inner,
  .builder-toolbar,
  .planning-summary,
  .student-table-head,
  .student-table-row {
    grid-template-columns: 1fr;
  }

  .builder-action-group {
    justify-items: start;
  }

  .builder-action-group .top-actions {
    justify-content: flex-start;
  }

  .student-table-head,
  .student-table-row {
    min-width: 0;
  }
}

/* MVP calm layout pass */
.student-admin-workspace {
  display: grid;
  gap: .65rem;
}

.student-control-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(220px, .72fr) minmax(240px, .82fr);
  gap: .65rem;
  align-items: stretch;
}

.student-admin-workspace--import .student-control-grid {
  grid-template-columns: minmax(360px, 1.2fr) minmax(390px, 1.35fr) minmax(240px, .72fr);
}

.student-control-grid .teacher-filters,
.student-control-grid .teacher-import-card,
.student-control-grid .password-export-card {
  min-width: 0;
  margin: 0;
  box-shadow: none;
}

.student-control-grid .teacher-filters {
  grid-template-columns: minmax(120px, .68fr) minmax(180px, 1fr);
  align-content: start;
}

.student-control-grid .compact-import-card {
  align-content: space-between;
}

.student-control-grid .password-export-card {
  display: grid;
  align-content: start;
}

.student-table-card {
  overflow-x: auto;
}

.student-table-head,
.student-table-row {
  grid-template-columns: 24px 46px 92px minmax(130px, .9fr) minmax(170px, 1.15fr) 104px minmax(9.5rem, 10.5rem);
  min-width: 820px;
  gap: .42rem;
  padding: .42rem .55rem;
}

.student-table-row {
  min-height: 3.1rem;
}

.student-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  justify-content: flex-start;
  align-items: center;
}

.student-row-actions button {
  width: auto;
  min-height: 1.8rem;
  padding: .22rem .42rem;
  white-space: nowrap;
}

.planning-summary--top {
  margin: .55rem 0 .65rem;
}

.planning-summary--top > div {
  min-height: 4.75rem;
}

.planning-summary--top strong {
  display: block;
  font-size: clamp(1.18rem, 2vw, 1.72rem);
  line-height: 1.05;
}

.planning-detail-fields {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-warm);
  padding: .55rem .65rem;
}

.planning-detail-fields summary {
  cursor: pointer;
  color: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
  font-weight: 850;
}

.planning-detail-fields[open] summary {
  margin-bottom: .55rem;
}

.planning-preview-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: end;
  margin: .65rem 0 .35rem;
}

.planning-preview-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.planning-preview-head span {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .84rem;
  font-weight: 750;
  text-align: right;
}

.submission-card {
  display: grid;
  gap: .65rem;
}

.submission-brief-grid {
  grid-template-columns: minmax(170px, 1.1fr) minmax(170px, 1.1fr) minmax(130px, .7fr) minmax(170px, 1fr) minmax(130px, .8fr) minmax(170px, 1fr);
  margin: 0;
}

.submission-brief-grid small {
  display: block;
  margin-top: .18rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .72rem;
  line-height: 1.25;
}

.review-decision-card {
  display: grid;
  gap: .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  padding: .65rem;
}

.review-section {
  display: grid;
  gap: .55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: .65rem;
}

.review-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.review-summary-section .submission-grid {
  margin: 0;
}

.review-feedback-field {
  margin: 0;
}

.review-decision-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
}

.review-decision-strip > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-warm);
  padding: .5rem .55rem;
}

.review-decision-strip strong {
  display: block;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9rem;
  line-height: 1.2;
}

.teacher-review-panel.review-panel-compact {
  grid-template-columns: minmax(150px, .36fr) minmax(310px, auto);
  gap: .6rem;
  align-items: end;
  margin: 0;
  border-radius: 6px;
  box-shadow: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.review-panel-compact textarea {
  min-height: 82px;
}

.review-panel-compact .review-actions {
  gap: .32rem;
}

.review-detail-stack {
  display: grid;
  gap: .55rem;
}

.review-detail-stack .teacher-note,
.review-detail-stack .teacher-review-levels {
  margin: 0;
}

.builder-grid {
  grid-template-columns: minmax(220px, 250px) minmax(0, 1.65fr) minmax(280px, .72fr);
}

.block-editor-panel {
  min-height: calc(100vh - 13rem);
}

.builder-side-panel {
  display: grid;
  gap: .65rem;
  align-content: start;
}

.builder-side-section {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf7;
  padding: .55rem .65rem;
}

.builder-side-section summary {
  cursor: pointer;
  color: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .88rem;
  font-weight: 900;
}

.builder-side-section[open] summary {
  margin-bottom: .55rem;
}

.builder-side-section .section-gap:first-child {
  margin-top: .55rem;
}

.term-empty-state {
  border: 1px dashed var(--line-dark);
  border-radius: 6px;
  background: var(--paper-warm);
  padding: .6rem;
}

.yaml-feedback {
  margin-top: .65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-warm);
  padding: .58rem .65rem;
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9rem;
  font-weight: 750;
}

.yaml-feedback.success {
  border-color: #9ac5a8;
  background: var(--good-bg);
  color: var(--good);
}

.yaml-feedback.error {
  border-color: #d9b3ab;
  background: var(--bad-bg);
  color: var(--bad);
}

body.screenshot-mode .student-control-grid {
  grid-template-columns: minmax(280px, .9fr) minmax(220px, .7fr) minmax(230px, .72fr);
  gap: .5rem;
}

body.screenshot-mode .student-admin-workspace--import .student-control-grid {
  grid-template-columns: minmax(300px, .82fr) minmax(430px, 1.22fr) minmax(215px, .58fr);
}

body.screenshot-mode .student-control-grid .teacher-filters,
body.screenshot-mode .student-control-grid .teacher-import-card,
body.screenshot-mode .student-control-grid .password-export-card {
  padding: .55rem;
}

body.screenshot-mode .student-table-card {
  max-height: calc(100vh - 345px);
}

body.screenshot-mode .student-table-scroll {
  max-height: calc(100vh - 386px);
}

body.screenshot-mode .student-table-head,
body.screenshot-mode .student-table-row {
  grid-template-columns: 22px 40px 76px minmax(92px, .8fr) minmax(140px, 1fr) 88px 9.6rem;
  min-width: 760px;
  gap: .28rem;
  padding: .3rem .42rem;
}

body.screenshot-mode .student-row-actions button {
  min-height: 1.65rem;
  padding: .16rem .34rem;
  font-size: .72rem;
}

body.screenshot-mode .student-admin-workspace--import .student-table-card {
  max-height: 120px;
}

body.screenshot-mode .student-admin-workspace--import .student-table-scroll {
  max-height: 82px;
}

body.screenshot-mode .planning-summary--top {
  margin: .35rem 0 .42rem;
}

body.screenshot-mode .planning-summary--top > div {
  min-height: 3.6rem;
}

body.screenshot-mode .planning-summary--top strong {
  font-size: 1.18rem;
}

body.screenshot-mode .planning-detail-fields {
  padding: .38rem .48rem;
}

body.screenshot-mode .planning-detail-fields:not([open]) {
  padding: .34rem .48rem;
}

body.screenshot-mode .planning-preview-head {
  margin: .46rem 0 .25rem;
}

body.screenshot-mode .submission-brief-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .35rem;
}

body.screenshot-mode .review-decision-card {
  gap: .42rem;
  padding: .5rem;
}

body.screenshot-mode .review-decision-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .32rem;
}

body.screenshot-mode .review-decision-strip > div {
  padding: .38rem .45rem;
}

body.screenshot-mode .teacher-review-panel.review-panel-compact {
  grid-template-columns: minmax(260px, 1fr) 132px minmax(310px, auto);
  gap: .42rem;
  padding: .46rem .5rem;
}

body.screenshot-mode .review-panel-compact textarea {
  min-height: 54px;
  max-height: 64px;
}

body.screenshot-mode .review-detail-stack {
  gap: .42rem;
}

body.screenshot-mode .builder-grid {
  grid-template-columns: 245px minmax(0, 1.7fr) 300px;
}

body.screenshot-mode .block-editor-panel {
  min-height: 0;
}

body.screenshot-mode .builder-side-section {
  padding: .45rem .5rem;
}

@media (max-width: 760px) {
  .student-control-grid,
  .student-admin-workspace--import .student-control-grid,
  .submission-brief-grid,
  .review-decision-strip,
  .teacher-review-panel.review-panel-compact,
  .builder-grid {
    grid-template-columns: 1fr;
  }

  .student-table-card {
    overflow-x: visible;
  }

  .student-table-head,
  .student-table-row {
    min-width: 0;
  }

  .student-row-actions {
    justify-content: flex-start;
  }

  .student-row-actions button {
    flex: 0 1 auto;
  }

  .planning-preview-head {
    display: grid;
    align-items: start;
  }

  .planning-preview-head span {
    text-align: left;
  }

  .review-panel-compact .review-actions {
    justify-content: flex-start;
  }

  .block-editor-panel {
    min-height: 0;
  }
}

/* Targeted header and panel trim */
.app-panel,
.module-card,
.teacher-card,
.submission-card,
.goal-card,
.login-panel,
.compact-import-card,
.password-export-card,
.planning-card,
.module-fit-card,
.demo-data-card,
.student-table-card,
.import-preview,
.import-result,
.teacher-proof-table,
.submission-status-panel,
.teacher-review-panel,
.teacher-review-levels,
.teacher-note,
.lesson-top,
.teacher-header,
.student-admin-head,
.panel,
.builder-side-section,
.review-decision-card,
.review-decision-strip > div {
  border-radius: 6px;
}

.panel::before,
.teacher-card::before,
.module-card::before,
.goal-card::before,
.login-panel::before,
.submission-card::before,
.entry-panel::before {
  display: none;
}

.teacher-header,
.teacher-header--overview,
.teacher-header--compact {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: .15rem 0 .45rem;
}

.teacher-tabs {
  margin-bottom: .7rem;
}

.student-admin-head,
.module-admin-head {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: .15rem 0 .55rem;
}

.learner-start.app-panel,
.student-home.app-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.student-control-grid .teacher-filters,
.student-control-grid .teacher-import-card,
.student-control-grid .password-export-card,
.module-flow-grid .teacher-card,
.planning-layout .teacher-card,
.teacher-overview-panels .teacher-card,
.review-detail-stack .teacher-note,
.review-detail-stack .teacher-review-levels {
  box-shadow: none;
}

.student-control-grid .teacher-filters,
.student-control-grid .teacher-import-card,
.student-control-grid .password-export-card,
.module-list-row,
.planning-detail-fields,
.review-decision-card,
.teacher-review-panel.review-panel-compact,
.review-detail-stack .teacher-note,
.review-detail-stack .teacher-review-levels {
  border-color: #e2d6c5;
  background: rgba(255, 253, 247, .62);
}

.module-list-row.active {
  background: #f1e7d4;
}

.submission-grid > div,
.review-decision-strip > div,
.planning-summary > div,
.activation-summary > div {
  border-color: #e2d6c5;
  background: rgba(255, 250, 240, .58);
}

.submission-brief-grid,
body.screenshot-mode .submission-brief-grid {
  grid-template-columns: minmax(170px, 1.2fr) minmax(130px, .75fr) minmax(170px, 1fr) minmax(130px, .8fr) minmax(170px, 1fr);
}

.builder-side-section {
  background: rgba(255, 253, 247, .6);
}

@media (max-width: 760px) {
  .submission-brief-grid,
  body.screenshot-mode .submission-brief-grid {
    grid-template-columns: 1fr;
  }
}

/* Happy-flow hardening */
.learner-start {
  width: min(760px, calc(100vw - 2rem));
  margin-inline: auto;
}

.login-panel {
  width: min(560px, 100%);
  margin-inline: auto;
}

.login-form,
.teacher-form {
  max-width: 420px;
}

.login-form button,
.teacher-form button {
  width: fit-content;
}

.submission-state {
  width: fit-content;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: .34rem .58rem;
  background: var(--paper);
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
  font-weight: 850;
}

.submission-state.submitted {
  border-color: #b9a98f;
  background: #f7eddc;
}

.submission-state.feedback {
  border-color: #d9b3ab;
  background: var(--bad-bg);
  color: var(--bad);
}

.submission-state.done {
  border-color: #9ac5a8;
  background: var(--good-bg);
  color: var(--good);
}

.upload-active-version,
.upload-versions,
.proof-version-list {
  margin-top: .38rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .84rem;
  font-weight: 750;
}

.upload-versions,
.proof-version-list {
  display: grid;
  gap: .18rem;
  border-left: 2px solid var(--line);
  padding-left: .65rem;
}

.teacher-proof-row span small {
  display: block;
  margin-top: .12rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
}

.review-decision-card {
  gap: .7rem;
}

.teacher-review-panel.review-panel-compact label {
  margin-bottom: 0;
}

.builder-side-section > *:not(summary) {
  margin-top: .55rem;
}

.builder-side-panel textarea {
  min-height: 76px;
}

.term-import-panel textarea {
  min-height: 72px;
}

@media (max-width: 760px) {
  .login-form button,
  .teacher-form button {
    width: 100%;
  }

  .lesson-step-line {
    grid-template-columns: 1fr;
    gap: .12rem;
  }

  .lesson-step-line strong,
  .lesson-step-line em {
    white-space: normal;
  }
}

/* UI polish round */
.entry-panel--choice {
  display: grid;
  gap: 1rem;
  min-height: 0;
}

.entry-panel--choice .entry-hero {
  max-width: 820px;
  margin-bottom: 0;
}

.entry-panel--choice .entry-subtitle {
  max-width: 780px;
  margin-bottom: .28rem;
}

.entry-panel--choice .entry-lead {
  margin-bottom: 0;
}

.entry-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .2rem;
}

.entry-role-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  border: 1px solid #d4c4ad;
  border-radius: 8px;
  background: rgba(255, 253, 247, .86);
  color: var(--ink);
  padding: .8rem;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(43, 34, 22, .05);
}

.entry-role-card.primary {
  border-color: var(--navy);
  background: #1d2633;
  color: var(--paper);
}

.entry-role-card:hover {
  border-color: var(--navy);
  background: #fff7e9;
}

.entry-role-card.primary:hover {
  background: #253247;
  color: #fff;
}

.entry-role-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  font: 850 .78rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.entry-role-copy {
  min-width: 0;
}

.entry-role-copy strong,
.entry-role-copy small,
.entry-role-action,
.module-card-caption,
.module-card-progress > div > span,
.lesson-metrics span,
.lesson-save-status,
.planning-date-hint {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.entry-role-copy strong {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
}

.entry-role-copy small {
  display: block;
  margin-top: .14rem;
  color: inherit;
  opacity: .78;
  font-size: .82rem;
  line-height: 1.28;
}

.entry-role-action {
  color: inherit;
  font-size: .78rem;
  font-weight: 850;
}

.login-panel {
  padding: 1.35rem;
}

.login-panel .goal-head {
  margin-bottom: .65rem;
}

.login-panel h1 {
  margin-bottom: 0;
  font-size: clamp(2.15rem, 3vw, 2.8rem);
}

.login-copy {
  max-width: 440px;
  margin-bottom: .9rem;
  line-height: 1.5 !important;
}

.login-form {
  gap: .85rem;
  max-width: 430px;
}

.login-form label {
  margin-bottom: 0;
}

.login-form input {
  margin-top: .12rem;
}

.login-form .field-help {
  margin-top: .28rem;
}

.login-error-message {
  display: grid;
  gap: .12rem;
  margin-bottom: .8rem;
}

.local-fallback {
  max-width: 430px;
}

.module-card {
  position: relative;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto auto;
  border-color: #d9cbb7;
  background: linear-gradient(180deg, rgba(255,253,247,.98), rgba(255,250,240,.72));
}

.module-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #d6ad62;
  opacity: .42;
}

.module-card--done::after {
  background: var(--good);
  opacity: .62;
}

.module-card--idle::after {
  background: var(--line-dark);
  opacity: .34;
}

.module-card-main {
  min-width: 0;
}

.module-card-status {
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e3d6c4;
  padding-top: .62rem;
}

.module-card-caption {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 760;
}

.module-card-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .72rem;
  align-items: end;
}

.module-card-progress > div {
  min-width: 0;
}

.module-card-progress > div > span {
  display: block;
  margin-bottom: .18rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.module-card-actions {
  justify-content: flex-end;
}

.lesson-top--progress {
  box-shadow: 0 12px 28px rgba(43, 34, 22, .06);
}

.lesson-progress-main {
  display: grid;
  gap: .45rem;
}

.lesson-metrics {
  display: grid;
  grid-template-columns: minmax(90px, .48fr) minmax(96px, .52fr) minmax(200px, 1.3fr) minmax(150px, 1fr);
  gap: .4rem;
  align-items: stretch;
}

.lesson-metrics > div {
  min-width: 0;
  border: 1px solid #e2d6c5;
  border-radius: 6px;
  background: rgba(255,253,247,.68);
  padding: .42rem .52rem;
}

.lesson-metrics span {
  display: block;
  margin-bottom: .1rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.lesson-metrics strong {
  display: block;
  min-width: 0;
  overflow: visible;
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.18;
  text-overflow: clip;
  white-space: normal;
}

.lesson-current-step strong {
  white-space: normal;
}

.lesson-save-status {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 760;
}

.teacher-stat-card {
  border-color: #d9cbb7;
  box-shadow: 0 10px 24px rgba(43, 34, 22, .045);
}

.teacher-stat-action {
  min-height: 5.4rem;
}

.teacher-stat-card span,
.teacher-stat-card p,
.next-step-list small,
.compact-list span {
  color: var(--muted);
}

.teacher-overview-panels .teacher-card,
.student-control-grid .teacher-filters,
.student-control-grid .teacher-import-card,
.student-control-grid .password-export-card,
.planning-card,
.submission-card {
  border-color: #d9cbb7;
}

.next-step-list li {
  grid-template-columns: 1.75rem minmax(0, 1fr) auto;
  gap: .55rem;
}

.next-step-link {
  width: auto;
}

.teacher-import-card h2,
.password-export-card h2 {
  margin-bottom: .28rem;
}

.teacher-import-card .top-actions,
.password-export-card .top-actions,
.import-result .top-actions {
  justify-content: flex-start;
}

.import-preview,
.import-result {
  background: rgba(255,253,247,.78);
}

.import-preview-row,
.import-table-row,
.student-table-row {
  background: rgba(255,253,247,.88);
}

.student-table-head,
.student-table-row {
  align-items: center;
}

.student-password-cell {
  color: var(--muted);
  font-weight: 760;
}

.planning-form-row label {
  display: grid;
  align-content: start;
}

.planning-date-hint {
  display: block;
  margin-top: .22rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 760;
}

.planning-form input[type='date'] {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .92rem;
}

.planning-preview-head {
  border-top: 1px solid #e2d6c5;
  padding-top: .55rem;
}

.planning-roster-head,
.planning-roster-row {
  border-color: #e2d6c5;
  background: rgba(255,253,247,.78);
}

.submission-card {
  gap: .75rem;
}

.submission-main {
  align-items: center;
  border-bottom: 1px solid #e2d6c5;
  padding-bottom: .55rem;
}

.submission-brief-grid,
body.screenshot-mode .submission-brief-grid {
  grid-template-columns: minmax(190px, 1.25fr) minmax(170px, 1fr) minmax(150px, .8fr) minmax(180px, 1fr);
}

.review-section {
  border-color: #e2d6c5;
  background: rgba(255,253,247,.72);
}

.review-section h3 {
  border-bottom: 1px solid #eadfcd;
  padding-bottom: .35rem;
}

.review-decision-card {
  background: rgba(255,250,240,.62);
}

.review-panel-compact .review-actions {
  align-items: end;
}

.teacher-proof-table {
  border: 0;
  background: transparent;
}

.teacher-proof-row {
  background: rgba(255,253,247,.9);
}

.builder-grid {
  grid-template-columns: minmax(220px, 250px) minmax(0, 1.52fr) minmax(330px, .86fr);
}

.builder-grid > .panel,
.builder-side-section {
  border-color: #d9cbb7;
}

.builder-side-panel {
  gap: .75rem;
}

.builder-side-section {
  background: rgba(255,253,247,.76);
}

.builder-side-section summary {
  list-style-position: outside;
}

.term-tools {
  margin-top: 0;
}

.term-edit-panel--active {
  border: 1px solid #e2d6c5;
  border-radius: 6px;
  background: rgba(255,253,247,.78);
  padding: .65rem;
}

.term-editor-head {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: center;
  margin-bottom: .5rem;
}

.term-editor-head h3 {
  margin: 0;
  font-size: 1rem;
}

.term-fields-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}

.term-edit-panel--active label {
  margin-bottom: .55rem;
}

.term-edit-panel--active label:last-child {
  margin-bottom: 0;
}

.term-import-panel {
  border: 1px solid #e2d6c5;
  border-radius: 6px;
  background: rgba(255,250,240,.56);
  padding: .5rem .6rem;
}

.term-import-panel summary {
  cursor: pointer;
  color: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
  font-weight: 850;
}

.term-import-panel[open] summary {
  margin-bottom: .55rem;
}

.term-list-panel {
  margin-top: .8rem;
  padding-top: .75rem;
}

.term-row {
  gap: .35rem;
  padding: .34rem 0;
}

.yaml-editor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: calc(100vh - 14rem);
  overflow: hidden;
}

.yaml-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: start;
  margin-bottom: .65rem;
}

.yaml-editor-head h2 {
  margin: 0 0 .25rem;
}

.yaml-editor-head .muted {
  margin: 0;
}

.yaml-area {
  min-height: 0;
  height: auto;
  border-color: #d9cbb7;
  border-radius: 6px;
  background: #fffaf0;
  font-size: 13.5px;
  line-height: 1.58;
}

.yaml-action-bar {
  z-index: 2;
  justify-content: flex-end;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

body.screenshot-mode .yaml-editor-panel {
  min-height: 100%;
}

body.screenshot-mode .yaml-action-bar {
  margin: 0;
}

@media (max-width: 900px) {
  .yaml-editor-head {
    grid-template-columns: 1fr;
  }

  .entry-role-grid,
  .lesson-metrics,
  .submission-brief-grid,
  body.screenshot-mode .submission-brief-grid,
  .builder-grid {
    grid-template-columns: 1fr;
  }

  .entry-role-card {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .entry-role-action {
    display: none;
  }

  .module-card-actions,
  .yaml-action-bar {
    justify-content: flex-start;
  }
}

/* Targeted quality round */
.entry-flow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .75rem;
}

.entry-flow-strip span {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  border: 1px solid #d9cbb7;
  border-radius: 999px;
  background: rgba(255,250,240,.82);
  color: var(--soft);
  padding: .36rem .58rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .82rem;
  font-weight: 760;
}

.entry-flow-strip strong {
  display: grid;
  width: 1.32rem;
  height: 1.32rem;
  place-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font-size: .72rem;
  line-height: 1;
}

.student-home-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin: 0 0 .9rem;
}

.student-home-overview > div {
  min-width: 0;
  border: 1px solid #d9cbb7;
  border-radius: 6px;
  background: rgba(255,253,247,.74);
  padding: .62rem .72rem;
}

.student-home-overview span {
  display: block;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.student-home-overview strong {
  display: block;
  margin-top: .08rem;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.05;
}

.login-support {
  max-width: 430px;
  margin: .75rem 0 0;
  border-top: 1px solid #e2d6c5;
  padding-top: .62rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem !important;
  line-height: 1.4 !important;
}

.lesson-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
}

.lesson-progress-row .progress-track {
  margin: 0;
}

.lesson-progress-row .progress-text {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
  font-weight: 850;
  white-space: nowrap;
}

.review-summary-compact {
  padding: .52rem .6rem;
}

.review-summary-compact .submission-grid {
  grid-template-columns: minmax(150px, .95fr) minmax(220px, 1.35fr) minmax(130px, .72fr) minmax(160px, .9fr);
  gap: .45rem;
}

.review-summary-compact .submission-grid > div {
  min-height: 0;
  padding: .48rem .55rem;
}

.review-summary-compact strong {
  font-size: .88rem;
  line-height: 1.22;
}

.review-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: .65rem;
  align-items: start;
}

.review-proof-section {
  min-width: 0;
}

.review-workspace-grid .review-decision-card {
  min-width: 0;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
}

.review-workspace-grid .review-decision-card .review-section {
  align-content: start;
  padding: .58rem;
}

.review-workspace-grid .review-decision-card > .review-section {
  min-width: 0;
}

.review-workspace-grid .teacher-review-levels {
  grid-template-columns: 1fr;
  gap: .38rem;
}

.review-workspace-grid .teacher-level-row {
  gap: .22rem;
  padding: .5rem .55rem;
}

.review-workspace-grid .teacher-level-row p {
  margin: .12rem 0 0;
}

.review-workspace-grid .review-feedback-field textarea {
  min-height: 74px;
}

.se1-assessment-card {
  grid-column: 1 / -1;
  gap: .55rem;
}

.se1-assessment-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, .22fr);
  gap: .55rem;
  align-items: start;
}

.se1-assessment-head p {
  margin: .18rem 0 0;
}

.se1-score-box {
  display: grid;
  justify-items: end;
  gap: .12rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-warm);
  padding: .45rem .55rem;
  text-align: right;
}

.se1-score-box span,
.se1-score-box small,
.se1-criterion-main span,
.se1-actions .muted {
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .76rem;
  line-height: 1.25;
}

.se1-score-box strong {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1;
}

.se1-field-grid,
.se1-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .42rem;
}

.se1-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.se1-field-grid label,
.se1-summary-grid label,
.se1-points-field,
.se1-note-field {
  display: grid;
  gap: .18rem;
  margin: 0;
  min-width: 0;
}

.se1-field-grid input,
.se1-summary-grid textarea,
.se1-note-field textarea,
.se1-points-field input {
  min-width: 0;
}

.se1-criteria-list {
  display: grid;
  gap: .36rem;
}

.se1-criterion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px minmax(150px, .58fr);
  gap: .42rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 250, 240, .56);
  padding: .45rem .5rem;
}

.se1-criterion-main {
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.se1-criterion-main strong {
  color: var(--ink);
  font-size: .88rem;
  line-height: 1.18;
}

.se1-rubric {
  margin-top: .1rem;
}

.se1-rubric summary,
.se1-question-bank summary {
  cursor: pointer;
  color: var(--accent);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .76rem;
  font-weight: 800;
}

.se1-rubric ul,
.se1-question-bank ul {
  margin: .28rem 0 0 1rem;
  padding: 0;
}

.se1-rubric li,
.se1-question-bank li {
  font-size: .76rem;
  line-height: 1.3;
}

.se1-points-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.se1-points-field span {
  grid-column: 1 / -1;
}

.se1-points-field em {
  align-self: center;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.se1-note-field textarea,
.se1-summary-grid textarea {
  min-height: 2.18rem;
  resize: vertical;
}

.se1-question-bank {
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .55);
  padding: .4rem .48rem;
}

.se1-question-bank[open] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.se1-question-bank summary {
  grid-column: 1 / -1;
}

.se1-question-bank strong {
  font-size: .82rem;
}

.se1-actions {
  align-items: center;
  gap: .45rem;
}

.se1-actions .muted {
  flex: 1 1 180px;
}

.review-panel-compact .review-actions button {
  min-height: 2.25rem;
}

.builder-side-section .term-empty-state {
  border: 1px dashed #d9cbb7;
  border-radius: 6px;
  background: rgba(255,250,240,.68);
  padding: .6rem .65rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .84rem;
  line-height: 1.35;
}

.term-row button:first-child {
  display: grid;
  justify-items: start;
  gap: .12rem;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.term-row button:first-child span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .76rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .student-home-overview,
  .review-workspace-grid {
    grid-template-columns: 1fr;
  }

  .lesson-step-line {
    grid-template-columns: 1fr;
    gap: .18rem;
  }

  .lesson-step-line strong,
  .lesson-step-line em {
    white-space: normal;
  }
}

body.screenshot-mode .review-workspace-grid .teacher-review-levels {
  grid-template-columns: 1fr;
}

body.screenshot-mode .review-workspace-grid .teacher-review-panel.review-panel-compact {
  grid-template-columns: minmax(0, 1fr);
}

body.screenshot-mode .se1-assessment-card {
  gap: .34rem;
  padding: .44rem .5rem;
}

body.screenshot-mode .se1-assessment-head {
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: .38rem;
}

body.screenshot-mode .se1-assessment-head p,
body.screenshot-mode .se1-rubric,
body.screenshot-mode .se1-question-bank,
body.screenshot-mode .se1-actions .muted {
  display: none;
}

body.screenshot-mode .se1-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .28rem;
}

body.screenshot-mode .se1-criteria-list {
  gap: .24rem;
}

body.screenshot-mode .se1-criterion-row {
  grid-template-columns: minmax(0, 1fr) 76px minmax(112px, .48fr);
  gap: .28rem;
  padding: .3rem .36rem;
}

body.screenshot-mode .se1-criterion-main span {
  display: none;
}

body.screenshot-mode .se1-note-field textarea,
body.screenshot-mode .se1-summary-grid textarea {
  min-height: 1.78rem;
  max-height: 1.95rem;
}

@media (max-width: 1100px) {
  .review-workspace-grid .review-decision-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .se1-assessment-head,
  .se1-field-grid,
  .se1-summary-grid,
  .se1-criterion-row,
  .se1-question-bank[open] {
    grid-template-columns: 1fr;
  }

  .se1-score-box {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .student-home-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-flow-strip {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.teacher-shell--inzendingen {
  padding-top: .85rem;
}

.teacher-shell--inzendingen .teacher-tabs {
  margin-bottom: .45rem;
  padding-bottom: .32rem;
}

.teacher-shell--inzendingen .teacher-filters {
  grid-template-columns: minmax(180px, .78fr) minmax(150px, .58fr) minmax(260px, 1.45fr);
  gap: .55rem;
  margin-bottom: .55rem;
  padding: .55rem .65rem;
  box-shadow: none;
}

.teacher-shell--inzendingen .teacher-filters input,
.teacher-shell--inzendingen .teacher-filters select {
  min-height: 2.2rem;
  padding: .35rem .5rem;
}

.teacher-shell--inzendingen .submission-card {
  gap: .48rem;
  padding: .72rem .8rem;
}

.teacher-shell--inzendingen .submission-main {
  padding-bottom: .42rem;
}

.teacher-shell--inzendingen .submission-main .kicker {
  margin-bottom: .18rem;
}

.teacher-shell--inzendingen .submission-main h2 {
  font-size: 1.12rem;
  line-height: 1.15;
}

.teacher-shell--inzendingen .submission-main .muted {
  margin: .12rem 0 0;
}

.teacher-shell--inzendingen .review-summary-compact {
  padding: .42rem .48rem;
}

.teacher-shell--inzendingen .review-summary-compact .submission-grid {
  gap: .38rem;
}

.teacher-shell--inzendingen .review-summary-compact .submission-grid > div,
.teacher-shell--inzendingen .review-section,
.teacher-shell--inzendingen .teacher-note {
  padding: .5rem .55rem;
}

.teacher-shell--inzendingen .review-section h3 {
  padding-bottom: .28rem;
}

.teacher-shell--inzendingen .review-workspace-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .55rem;
}

.teacher-shell--inzendingen .review-detail-stack {
  gap: .45rem;
}

.teacher-shell--inzendingen .teacher-proof-head,
.teacher-shell--inzendingen .teacher-proof-row {
  grid-template-columns: minmax(106px, .78fr) minmax(135px, 1fr) minmax(112px, .76fr) 88px;
}

.teacher-shell--inzendingen .teacher-proof-row {
  padding: .34rem .42rem;
}

.teacher-shell--inzendingen .review-workspace-grid .review-feedback-field textarea {
  min-height: 66px;
}

body.screenshot-mode .teacher-shell--inzendingen .teacher-header h1 {
  font-size: 1.2rem;
}

body.screenshot-mode .teacher-shell--inzendingen .submission-list {
  max-height: calc(100vh - 142px);
}

body.screenshot-mode .teacher-shell--inzendingen .submission-card {
  max-height: calc(100vh - 146px);
}

@media (max-width: 900px) {
  .teacher-shell--inzendingen .teacher-filters,
  .teacher-shell--inzendingen .review-workspace-grid,
  .teacher-shell--inzendingen .review-workspace-grid .review-decision-card {
    grid-template-columns: 1fr;
  }
}

/* Regression quality round */
.module-flow-grid {
  grid-template-columns: minmax(320px, .8fr) minmax(0, 1.45fr);
}

.module-list-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.module-list-row strong {
  overflow-wrap: normal;
  word-break: normal;
}

.module-list-actions {
  justify-content: flex-start;
}

.proof-panel {
  gap: .55rem;
  margin-top: .65rem;
}

.proof-actions {
  justify-content: flex-start;
  margin: 0;
}

.proof-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem .7rem;
}

.proof-field-grid > label,
.proof-field-grid > .proof-combo-field,
.proof-field-grid > .proof-text-fallback {
  min-width: 0;
  margin: 0;
}

.proof-field-grid textarea,
.proof-text-fallback textarea {
  min-height: 86px;
}

.submission-status-panel {
  gap: .45rem;
  padding: .65rem;
}

.submission-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .4rem;
}

.submission-status-grid > div {
  min-width: 0;
  padding: .4rem .5rem;
}

.upload-current strong,
.upload-current span,
.upload-current small {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .app-shell {
    width: 100%;
    padding-right: .45rem;
    padding-left: .45rem;
  }

  .app-shell__top,
  .module-flow-grid,
  .proof-field-grid,
  .submission-status-grid {
    grid-template-columns: 1fr;
  }

  .app-identity {
    max-width: 100%;
    justify-self: start;
  }

  .app-nav {
    max-width: 100%;
  }

  .module-list-row,
  .module-list-main,
  .module-list-actions,
  .proof-actions,
  .proof-actions button {
    max-width: 100%;
  }

  .proof-actions button {
    flex: 1 1 10rem;
  }
}

.entry-tour-button {
  width: fit-content;
  margin-top: 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 850;
}

.flowie-tour {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.flowie-highlight {
  position: fixed;
  border: 2px solid #285a91;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(18, 15, 11, .18), 0 0 0 5px rgba(255, 253, 247, .76);
  background: rgba(255, 253, 247, .08);
  pointer-events: none;
}

.flowie-card {
  position: fixed;
  width: min(356px, calc(100vw - 2rem));
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 48px rgba(43, 34, 22, .18);
  padding: .95rem;
  pointer-events: auto;
}

.flowie-card__head {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: .62rem;
  align-items: center;
  margin-bottom: .62rem;
}

.flowie-avatar {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: var(--paper-warm);
  color: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 900;
}

.flowie-card__head strong,
.flowie-card__head span,
.flowie-card p,
.flowie-close,
.flowie-actions button {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.flowie-card__head strong {
  display: block;
  line-height: 1.1;
}

.flowie-card__head span {
  display: block;
  margin-top: .08rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.flowie-card p {
  margin-bottom: .75rem;
  color: var(--soft);
  font-size: .98rem;
  line-height: 1.42;
}

.flowie-close {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.flowie-close:hover {
  background: #f4e7d2;
  color: var(--ink);
}

.flowie-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .45rem;
  align-items: center;
}

.flowie-actions .flowie-next {
  justify-self: end;
}

.flowie-skip {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding-right: .35rem;
  padding-left: .35rem;
}

.flowie-skip:hover {
  background: #f4e7d2;
}

.flowie-tour-active {
  scroll-padding-bottom: 9rem;
}

@media (max-width: 700px) {
  .flowie-highlight {
    border-radius: 5px;
    box-shadow: 0 0 0 9999px rgba(18, 15, 11, .14), 0 0 0 4px rgba(255, 253, 247, .72);
  }

  .flowie-card {
    right: .5rem;
    bottom: .5rem;
    left: .5rem;
    width: auto;
    max-width: calc(100vw - 1rem);
    padding: .72rem;
  }

  .flowie-card__head {
    grid-template-columns: 1.9rem minmax(0, 1fr) auto;
    gap: .5rem;
    margin-bottom: .4rem;
  }

  .flowie-avatar {
    width: 1.9rem;
    height: 1.9rem;
    font-size: .9rem;
  }

  .flowie-card p {
    margin-bottom: .58rem;
    font-size: .88rem;
    line-height: 1.28;
  }

  .flowie-actions {
    grid-template-columns: auto minmax(0, 1fr);
    gap: .32rem;
  }

  .flowie-actions button {
    min-width: 0;
    padding: .42rem .48rem;
    font-size: .84rem;
    white-space: normal;
  }

  .flowie-actions .flowie-next {
    max-width: 9rem;
    justify-self: end;
  }
}

/* Unified calm responsive pass */
:root {
  --bg: #f4f7f8;
  --paper: #ffffff;
  --paper-soft: #f1f5f3;
  --paper-warm: #fbf8f1;
  --paper-2: #f1f5f3;
  --paper-3: #fbf8f1;
  --ink: #14191f;
  --muted: #5e6972;
  --soft: #3d4851;
  --line: #d8e0e3;
  --line-dark: #9faaaf;
  --link: #22638f;
  --navy: #17324a;
  --warn: #815314;
  --warn-bg: #fff4d8;
  --good: #2e7055;
  --good-bg: #e7f4ee;
  --bad: #9b3a31;
  --bad-bg: #fdebea;
  --shadow: 0 14px 34px rgba(20, 25, 31, .08);
}

body,
body.entry-body,
body.learner-body,
body.teacher-body {
  background: linear-gradient(180deg, #f8fafb 0, #eef4f2 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1,
h2,
h3,
p,
li {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

button,
select,
.entry-link,
.button-link,
.tool-button {
  min-height: 2.35rem;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 780;
}

button:hover,
select:hover,
.entry-link:hover,
.button-link:hover {
  border-color: #b7c6ca;
  background: #eef5f2;
}

button.primary,
.entry-link.primary,
.button-link.primary,
.tool-button {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

input,
textarea,
select {
  border-radius: 6px;
}

.app-shell {
  width: min(1220px, calc(100vw - 1.25rem));
}

.app-shell__top {
  min-height: 0;
  border-bottom: 1px solid rgba(216, 224, 227, .9);
  padding-bottom: .55rem;
}

.app-mark,
.app-avatar,
.section-avatar {
  background: linear-gradient(145deg, #17324a, #2e7055);
}

.app-nav {
  align-items: center;
}

.app-nav-item,
.teacher-tab,
.tab {
  border-radius: 6px;
  background: rgba(255, 255, 255, .86);
}

.app-nav-item.is-active,
.teacher-tab.active,
.tab.active {
  border-color: #b7c6ca;
  background: #e7f4ee;
  color: var(--navy);
  box-shadow: inset 0 -2px 0 #2e7055;
}

.entry-panel,
.module-card,
.teacher-card,
.teacher-stat-card,
.submission-card,
.goal-card,
.login-panel,
.panel,
.lesson-top,
.student-table-card,
.student-admin-head,
.module-create-panel,
.module-list-row,
.review-section,
.review-decision-card,
.proof-section,
.proof-extra-section {
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 28px rgba(20, 25, 31, .06);
}

.entry-panel--choice {
  gap: .85rem;
}

.entry-role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-role-card {
  border-color: var(--line);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(20, 25, 31, .06);
}

.entry-role-card.primary {
  background: var(--navy);
}

.entry-tour-button {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

.student-home-overview > div,
.submission-grid > div,
.review-decision-strip > div,
.planning-summary > div,
.submission-status-grid > div {
  border-color: var(--line);
  background: rgba(255, 255, 255, .72);
}

.module-card {
  border-color: var(--line);
}

.module-card::after {
  background: #22638f;
}

.module-card--done::after {
  background: var(--good);
}

.module-card-status,
.submission-main,
.planning-preview-head {
  border-color: var(--line);
}

.status-pill,
.student-chip,
.module-card-meta span,
.module-signal,
.class-chip-list span,
.import-result-summary span,
.type-badge,
.submission-state {
  border-radius: 999px;
}

.proof-section {
  display: grid;
  gap: .55rem;
  padding: .65rem;
}

.proof-section h2 {
  margin: 0;
  font-size: 1.05rem;
}

.proof-extra-section {
  padding: .55rem .65rem;
}

.proof-extra-section .proof-field-grid {
  margin: 0;
}

.proof-extra-section summary {
  cursor: pointer;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 850;
}

.proof-extra-section[open] summary {
  margin-bottom: .55rem;
}

.proof-field-grid--extra {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proof-actions {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: .55rem 0;
}

.teacher-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-stat-card {
  background: rgba(255, 255, 255, .9);
}

.teacher-stat-card strong {
  color: var(--navy);
}

.teacher-stat-card:nth-child(4) strong {
  color: var(--warn);
}

.teacher-overview-panels .teacher-card,
.student-control-grid .teacher-filters,
.student-control-grid .teacher-import-card,
.student-control-grid .password-export-card,
.module-flow-grid .teacher-card,
.planning-card,
.module-fit-card {
  box-shadow: 0 10px 28px rgba(20, 25, 31, .05);
}

.teacher-proof-row,
.student-table-row,
.import-preview-row,
.module-list-row {
  background: rgba(255, 255, 255, .86);
}

.builder-grid > .panel,
.builder-side-section,
.yaml-editor-panel {
  background: rgba(255, 255, 255, .88);
}

.flowie-card {
  border-color: #b7c6ca;
  background: #fff;
}

.flowie-highlight {
  border-color: #22638f;
  box-shadow: 0 0 0 9999px rgba(20, 25, 31, .16), 0 0 0 5px rgba(255, 255, 255, .82);
}

@media (max-width: 900px) {
  .entry-role-grid,
  .teacher-overview-grid,
  .proof-field-grid,
  .proof-field-grid--extra {
    grid-template-columns: 1fr;
  }

  .student-home-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: 100%;
    padding-right: .5rem;
    padding-left: .5rem;
  }

  .app-shell__top {
    grid-template-columns: 1fr;
  }

  .app-identity {
    justify-self: start;
  }

  .app-nav {
    max-width: 100%;
    overflow-x: visible;
    flex-wrap: wrap;
  }

  .app-nav-item {
    flex: 1 1 auto;
    white-space: normal;
  }

  .entry-role-card,
  .lesson-progress-line,
  .student-home-head,
  .teacher-header,
  .review-workspace-grid {
    grid-template-columns: 1fr;
  }

  .entry-role-card {
    align-items: start;
  }

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

  .proof-actions button {
    width: 100%;
  }
}

/* Flowie demo refinement */
.app-identity--plain {
  border-radius: 8px;
  padding: .38rem .5rem;
  background: rgba(255, 255, 255, .42);
  box-shadow: none;
}

body.entry-body .app-shell__top {
  align-items: center;
}

body.entry-body .app-identity--plain strong {
  max-width: none;
}

.entry-panel--choice {
  gap: 1.15rem;
  padding: 1.15rem;
}

.entry-panel--choice .entry-hero {
  max-width: 840px;
}

.entry-panel--choice h1 {
  margin-bottom: .42rem;
}

.entry-flow-strip {
  margin-top: .85rem;
}

.entry-tour-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .75rem;
  align-items: center;
  margin-top: .95rem;
}

.entry-tour-row span {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.entry-tour-button {
  margin-top: 0;
  padding-inline: .92rem;
}

.entry-role-grid {
  gap: .75rem;
}

.entry-role-card {
  min-height: 5.25rem;
  border-color: #cfd9dd;
  background: rgba(255, 255, 255, .92);
  padding: .78rem;
}

.entry-role-card.primary {
  background: linear-gradient(145deg, #17324a, #21435b);
}

.entry-role-icon {
  border-color: rgba(23, 50, 74, .25);
  background: #eef5f2;
  color: var(--navy);
}

.entry-role-card.primary .entry-role-icon {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.entry-role-copy small {
  max-width: 18rem;
}

.flowie-highlight {
  border: 1.5px solid #2f7894;
  border-radius: 7px;
  box-shadow: 0 0 0 9999px rgba(20, 25, 31, .12), 0 0 0 3px rgba(255, 255, 255, .78);
  background: rgba(255, 255, 255, .03);
}

.flowie-card {
  width: min(376px, calc(100vw - 2rem));
  border-color: #bdc9cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(20, 25, 31, .16);
  padding: .78rem .9rem .82rem;
}

.flowie-card__head {
  grid-template-columns: 2.2rem minmax(0, 1fr) 1.7rem;
  gap: .58rem;
  align-items: center;
  margin-bottom: .58rem;
  border-bottom: 1px solid #e2eaec;
  padding-bottom: .5rem;
}

.flowie-avatar {
  position: relative;
  width: 2.2rem;
  height: 2.2rem;
  overflow: hidden;
  border-color: #b9d0c8;
  background: #f8fbf9;
  color: var(--navy);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9);
}

.flowie-avatar::before {
  content: "";
  position: absolute;
  top: .58rem;
  left: .58rem;
  width: .27rem;
  height: .27rem;
  border-radius: 999px;
  background: #22638f;
  box-shadow: .72rem .08rem 0 #2e7055, .98rem -.22rem 0 .03rem #c8953d;
}

.flowie-avatar::after {
  content: "";
  position: absolute;
  left: .7rem;
  bottom: .5rem;
  width: .78rem;
  height: .34rem;
  border-bottom: 1.5px solid #17324a;
  border-radius: 0 0 999px 999px;
}

.flowie-name {
  margin: 0 0 .06rem !important;
  color: #2e7055 !important;
  font-size: .68rem !important;
  font-weight: 850 !important;
  letter-spacing: 0;
  line-height: 1.1 !important;
  text-transform: uppercase;
}

.flowie-card__head strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.14;
}

.flowie-card__head div > span:not(.flowie-name),
.flowie-meta {
  margin-top: .12rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 720;
  line-height: 1.18;
}

.flowie-card p {
  margin-bottom: .76rem;
  color: var(--soft);
  font-size: .98rem;
  line-height: 1.42;
}

.flowie-close {
  width: 1.7rem;
  height: 1.7rem;
  color: #74828a;
  font-size: 1.06rem;
}

.flowie-close:hover {
  background: #eef5f2;
}

.flowie-actions {
  grid-template-columns: auto auto;
  justify-content: space-between;
  gap: .5rem;
  border-top: 1px solid #e2eaec;
  padding-top: .58rem;
}

.flowie-actions button {
  min-height: 2.15rem;
  border-radius: 6px;
}

.flowie-prev {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding-inline: .35rem;
}

.flowie-prev:hover {
  background: #eef5f2;
  color: var(--ink);
}

.flowie-actions .flowie-next {
  min-width: 8.1rem;
  justify-self: end;
  padding-inline: .82rem;
  box-shadow: 0 6px 14px rgba(23, 50, 74, .16);
}

.student-home-head {
  margin-bottom: .85rem;
}

.student-home-helper {
  max-width: 620px;
}

.module-card {
  gap: .7rem;
  padding: .95rem;
}

.module-card-main .kicker {
  margin-bottom: .28rem;
}

.module-card h2 {
  margin-bottom: .28rem;
  font-size: 1.28rem;
  line-height: 1.15;
}

.module-card-status {
  border-top: 1px solid var(--line);
  padding-top: .62rem;
}

.module-card-actions {
  margin-top: .1rem;
}

.proof-panel {
  gap: .7rem;
}

.submission-status-panel {
  border-left: 4px solid #2b6f8f;
  padding: .78rem;
}

.submission-status-panel h2,
.proof-section h2 {
  font-size: 1.08rem;
}

.proof-section--evidence {
  border-left: 4px solid #2e7055;
}

.upload-field,
.proof-text-fallback {
  border-radius: 8px;
}

.teacher-stat-card--focus {
  border-color: #d2a14c;
  background: linear-gradient(180deg, #fff7e6 0, #ffffff 100%);
  box-shadow: inset 0 0 0 1px rgba(210, 161, 76, .22), 0 14px 30px rgba(20, 25, 31, .07);
}

.teacher-stat-card--focus strong {
  color: #9a650e;
}

.teacher-stat-card--focus p {
  color: var(--ink);
}

.next-steps-card {
  background: rgba(255, 253, 247, .62);
}

.next-steps-card .next-step-list li {
  border: 1px solid #e6ddd1;
  border-radius: 6px;
  background: rgba(255, 255, 255, .48);
  padding: .42rem .5rem;
}

.next-steps-card .next-step-number {
  border-color: #d8e2df;
  background: #f5faf7;
  color: #667782;
}

.next-step-link {
  box-shadow: none;
}

.teacher-overview-panels > .teacher-card:last-child {
  border-color: #d2a14c;
  background: rgba(255, 250, 240, .82);
}

.teacher-import-card {
  max-width: 100%;
}

.teacher-import-card label span,
.module-field-grid label span {
  color: var(--muted);
  font-size: .76rem;
}

.teacher-import-card input,
.teacher-import-card textarea,
.teacher-import-card select,
.module-field-grid input,
.module-status-field select {
  border-color: #d8e2df;
  background: #fbfcfb;
}

.teacher-import-card .import-example {
  max-height: 3.15rem;
  overflow: hidden;
  border-color: #e2eaec;
  background: #fbfcfb;
  color: #667782;
}

.module-list-panel .module-panel-head {
  align-items: center;
}

.module-list-panel .module-list {
  gap: .46rem;
}

.module-list-row {
  padding: .58rem;
}

.review-decision-card {
  border-color: #aebec4;
}

.review-assessment-section {
  border-left: 4px solid #2e7055;
}

.review-actions .primary[data-tour-id='teacher-approve-action'] {
  min-width: 8.5rem;
}

body.screenshot-mode .entry-panel--choice {
  padding: 1.2rem;
}

body.screenshot-mode .entry-tour-row {
  margin-top: .8rem;
}

body.screenshot-mode .flowie-card {
  max-height: calc(100vh - 2rem);
}

body.screenshot-mode .proof-panel {
  gap: .52rem;
}

body.screenshot-mode .submission-status-panel {
  padding: .62rem .7rem;
}

body.screenshot-mode .proof-section {
  padding: .62rem .7rem;
}

body.screenshot-mode .teacher-stat-card--focus {
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .flowie-card {
    padding: .72rem .76rem;
  }

  .flowie-card__head {
    grid-template-columns: 2rem minmax(0, 1fr) 1.65rem;
    gap: .52rem;
    margin-bottom: .48rem;
    padding-bottom: .48rem;
  }

  .flowie-avatar {
    width: 2rem;
    height: 2rem;
  }

  .flowie-card p {
    margin-bottom: .62rem;
    font-size: .92rem;
    line-height: 1.36;
  }

  .flowie-actions {
    gap: .42rem;
    padding-top: .5rem;
  }

  .flowie-actions .flowie-next {
    min-width: 0;
  }
}

/* Demo presentation refinement */
.app-panel,
.module-card,
.teacher-card,
.teacher-stat-card,
.submission-card,
.lesson-top,
.review-section,
.review-decision-card,
.proof-section,
.proof-extra-section,
.submission-status-panel {
  box-shadow: 0 8px 22px rgba(20, 25, 31, .045);
}

.app-identity--plain {
  border-color: rgba(216, 224, 227, .82);
  background: rgba(255, 255, 255, .34);
  padding: .3rem .45rem;
}

.app-identity--plain strong {
  color: var(--ink);
  font-size: .9rem;
}

.app-identity--plain span {
  font-size: .76rem;
}

.entry-panel--choice {
  gap: .82rem;
  padding: 1.02rem;
}

.entry-panel--choice .entry-hero {
  max-width: 780px;
}

.entry-panel--choice h1 {
  margin-bottom: .3rem;
}

.entry-panel--choice .entry-subtitle {
  margin-bottom: .16rem;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.3;
}

.entry-panel--choice .entry-lead {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.45;
}

.entry-flow-strip {
  gap: .36rem;
  margin-top: .58rem;
}

.entry-flow-strip span {
  border-color: #d5dee1;
  background: rgba(255, 255, 255, .72);
  padding: .28rem .5rem;
  font-size: .78rem;
  font-weight: 720;
}

.entry-flow-strip strong {
  width: 1.22rem;
  height: 1.22rem;
  font-size: .68rem;
}

.entry-tour-row {
  gap: .45rem .62rem;
  margin-top: .68rem;
}

.entry-tour-row span {
  color: #64717a;
  font-size: .82rem;
  font-weight: 680;
}

.entry-tour-button {
  min-height: 2.15rem;
  padding: .44rem .8rem;
}

.entry-role-grid {
  gap: .62rem;
  margin-top: .02rem;
}

.entry-role-card {
  min-height: 4.65rem;
  grid-template-columns: 1.9rem minmax(0, 1fr) auto;
  gap: .58rem;
  border-color: #cfdade;
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  padding: .68rem .72rem;
  box-shadow: 0 8px 20px rgba(20, 25, 31, .045);
}

.entry-role-card.primary {
  background: linear-gradient(145deg, #17324a, #1f4058);
}

.entry-role-icon {
  width: 1.9rem;
  height: 1.9rem;
  font-size: .74rem;
}

.entry-role-copy strong {
  font-size: .96rem;
}

.entry-role-copy small {
  max-width: 17rem;
  font-size: .78rem;
}

.student-home {
  padding: .78rem;
}

.student-home-head {
  margin-bottom: .72rem;
  padding: .56rem .64rem;
}

.student-home-head h1 {
  margin-bottom: .16rem;
}

.student-home-helper {
  max-width: 580px;
}

.student-home-overview {
  gap: .5rem;
  margin-bottom: .72rem;
}

.student-home-overview > div {
  padding: .5rem .62rem;
}

.student-home-overview strong {
  font-size: 1.2rem;
}

.module-card-grid {
  gap: .7rem;
}

.module-card {
  gap: .52rem;
  border-color: #ccd9dd;
  background: rgba(255, 255, 255, .86);
  padding: .78rem;
}

.module-card h2 {
  margin-bottom: .18rem;
  font-size: 1.2rem;
  line-height: 1.15;
}

.module-card-meta {
  margin-top: .45rem;
}

.module-card-status {
  margin-top: .48rem;
  padding-top: .48rem;
}

.module-card-progress {
  gap: .45rem;
}

.module-card-actions {
  justify-content: flex-end;
}

body.learner-body .lesson-top-inner {
  padding: .48rem .6rem;
}

body.learner-body .lesson-title strong {
  max-width: 44rem;
  white-space: normal;
}

body.learner-body .slide {
  border-radius: 8px;
}

.proof-panel {
  gap: .58rem;
}

.proof-section {
  border-color: #cbd9dd;
}

.proof-section--evidence {
  border-left-width: 3px;
}

.proof-extra-section {
  border-color: #dce5e8;
  background: rgba(255, 255, 255, .68);
}

.proof-extra-section summary {
  color: #53636d;
}

.proof-actions {
  padding: .48rem 0;
}

.submission-status-panel {
  border-color: #c6d7dc;
  border-left-width: 3px;
  background: rgba(255, 253, 247, .9);
}

.submission-status-grid {
  gap: .36rem;
}

.submission-status-grid > div {
  padding: .38rem .48rem;
}

.review-box {
  border-color: #c9d9de;
  background: #f7fbfa;
}

.teacher-tabs {
  gap: .34rem;
  margin-bottom: .52rem;
  padding-bottom: .34rem;
}

.teacher-tab {
  min-height: 2.05rem;
  padding: .38rem .6rem;
}

.teacher-overview-grid {
  gap: .6rem;
  margin-bottom: .62rem;
}

.teacher-stat-card {
  padding: .78rem .82rem;
}

.teacher-stat-card strong {
  margin: .14rem 0;
  font-size: 1.72rem;
}

.teacher-stat-card p {
  line-height: 1.32;
}

.teacher-stat-card--focus {
  border-color: #d4a24e;
  background: linear-gradient(180deg, #fff6e4 0, rgba(255, 255, 255, .94) 100%);
  box-shadow: inset 0 0 0 1px rgba(212, 162, 78, .18), 0 10px 22px rgba(20, 25, 31, .055);
}

.teacher-overview-panels {
  gap: .62rem;
}

.teacher-overview-panels .teacher-card {
  padding: .86rem;
}

.teacher-waiting-review-card {
  border-color: #d4a24e;
  background: rgba(255, 248, 236, .86);
}

.next-steps-card .next-step-list {
  gap: .42rem;
}

.next-steps-card .next-step-list li {
  grid-template-columns: 1.75rem minmax(0, 1fr) 8.9rem;
  gap: .5rem;
  padding: .36rem .42rem;
}

.next-step-number {
  width: 1.55rem;
  height: 1.55rem;
}

.next-step-link {
  min-height: 1.95rem;
}

.student-admin-head,
.module-admin-head {
  margin-bottom: .42rem;
  padding: .54rem .64rem;
}

.student-control-grid .teacher-filters,
.student-control-grid .teacher-import-card,
.student-control-grid .password-export-card {
  border-color: #d4dfe2;
  background: rgba(255, 255, 255, .78);
}

.teacher-import-card .import-example {
  color: #728089;
}

.student-table-card {
  border-color: #d4dfe2;
  box-shadow: none;
}

.student-table-head {
  background: #eef3f3;
}

.student-table-row {
  background: rgba(255, 255, 255, .78);
}

.module-flow-grid {
  grid-template-columns: minmax(330px, .86fr) minmax(0, 1.55fr);
  gap: .62rem;
}

.module-list-panel,
.module-editor-panel {
  padding: .72rem;
}

.module-list-panel .module-list {
  gap: .38rem;
}

.module-list-row {
  grid-template-columns: minmax(0, 1fr);
  gap: .38rem;
  border-color: #d3dee1;
  background: rgba(255, 255, 255, .74);
  padding: .5rem .54rem;
}

.module-list-row.active {
  border-color: #9fb7c0;
  background: #f8f4ea;
  box-shadow: inset 3px 0 0 #22638f;
}

.module-list-actions {
  justify-content: flex-start;
}

.module-editor-panel .module-panel-head {
  margin-bottom: .52rem;
}

.module-field-grid {
  gap: .54rem;
}

.module-field-grid input,
.module-status-field select {
  min-height: 2.15rem;
  padding: .42rem .55rem;
}

.module-editor-actions {
  margin-top: .42rem;
}

.teacher-shell--inzendingen .teacher-filters {
  border-color: #d4dfe2;
  background: rgba(255, 255, 255, .72);
  box-shadow: none;
}

.teacher-shell--inzendingen .submission-card {
  border-color: #cfdade;
  background: rgba(255, 255, 255, .84);
}

.review-decision-card {
  border-color: #c5d2d6;
  background: rgba(255, 255, 255, .74);
}

.review-assessment-section {
  border-left-width: 3px;
  background: #fbfefd;
}

.review-proof-section {
  background: rgba(255, 255, 255, .72);
}

.teacher-proof-table {
  box-shadow: none;
}

.review-actions .primary[data-tour-id='teacher-approve-action'] {
  min-width: 8.25rem;
  box-shadow: 0 0 0 2px rgba(34, 99, 143, .22);
}

.flowie-highlight {
  border: 1px solid #2f7894;
  border-radius: 7px;
  box-shadow: 0 0 0 9999px rgba(20, 25, 31, .1), 0 0 0 2px rgba(255, 255, 255, .72);
  background: transparent;
}

.flowie-card {
  width: min(352px, calc(100vw - 2rem));
  border-color: #c5d2d6;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(20, 25, 31, .13);
  padding: .64rem .72rem .68rem;
}

.flowie-card__head {
  grid-template-columns: 1.92rem minmax(0, 1fr) 1.45rem;
  gap: .48rem;
  margin-bottom: .42rem;
  border-bottom-color: #e4ecee;
  padding-bottom: .38rem;
}

.flowie-avatar {
  width: 1.92rem;
  height: 1.92rem;
}

.flowie-avatar::before {
  top: .5rem;
  left: .5rem;
  width: .24rem;
  height: .24rem;
  box-shadow: .62rem .06rem 0 #2e7055, .84rem -.18rem 0 .025rem #c8953d;
}

.flowie-avatar::after {
  left: .6rem;
  bottom: .43rem;
  width: .68rem;
  height: .3rem;
}

.flowie-name {
  margin-bottom: .03rem !important;
  font-size: .62rem !important;
}

.flowie-card__head strong {
  font-size: .96rem;
  line-height: 1.12;
}

.flowie-card__head div > span:not(.flowie-name),
.flowie-meta {
  margin-top: .08rem;
  color: #6f7d86;
  font-size: .68rem;
  font-weight: 680;
  line-height: 1.15;
}

.flowie-card p {
  margin-bottom: .56rem;
  color: #3f4b54;
  font-size: .95rem;
  line-height: 1.36;
}

.flowie-close {
  width: 1.45rem;
  height: 1.45rem;
  color: #7e8b92;
  font-size: .98rem;
}

.flowie-actions {
  gap: .4rem;
  border-top-color: #e4ecee;
  padding-top: .44rem;
}

.flowie-actions button {
  min-height: 1.94rem;
  padding: .34rem .58rem;
  font-size: .9rem;
}

.flowie-prev {
  padding-inline: .28rem;
}

.flowie-actions .flowie-next {
  min-width: 8rem;
  padding-inline: .72rem;
  box-shadow: 0 5px 12px rgba(23, 50, 74, .13);
}

body.screenshot-mode .entry-panel--choice {
  padding: .92rem;
}

body.screenshot-mode .entry-flow-strip {
  margin-top: .5rem;
}

body.screenshot-mode .entry-tour-row {
  margin-top: .6rem;
}

body.screenshot-mode .entry-role-card {
  min-height: 4.35rem;
}

body.screenshot-mode .flowie-card {
  max-height: calc(100vh - 1.4rem);
}

body.screenshot-mode .submission-status-panel {
  padding: .58rem .66rem;
}

@media (max-width: 900px) {
  .module-flow-grid,
  .module-list-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .flowie-card {
    width: auto;
    padding: .6rem .64rem;
  }

  .flowie-card__head {
    grid-template-columns: 1.8rem minmax(0, 1fr) 1.4rem;
    gap: .42rem;
  }

  .flowie-avatar {
    width: 1.8rem;
    height: 1.8rem;
  }

  .flowie-card p {
    font-size: .91rem;
  }
}

/* Final Flowie side-guide pass */
body.entry-body .app-shell__content {
  padding-top: .45rem;
}

.entry-panel--choice {
  gap: .72rem;
  padding: .74rem .82rem;
}

.entry-panel--choice .entry-hero {
  max-width: 720px;
}

.entry-panel--choice h1 {
  margin-bottom: .22rem;
  font-size: clamp(2.05rem, 3vw, 2.72rem);
  line-height: 1;
}

.entry-panel--choice .entry-subtitle {
  max-width: 700px;
  margin-bottom: .06rem;
  font-size: clamp(1.03rem, 1.55vw, 1.2rem);
  line-height: 1.22;
}

.entry-panel--choice .entry-lead {
  max-width: 680px;
  margin-bottom: 0;
  font-size: .95rem;
  line-height: 1.34;
}

.entry-flow-strip {
  gap: .32rem;
  margin-top: .42rem;
}

.entry-flow-strip span {
  padding: .22rem .46rem;
}

.entry-tour-row {
  flex-wrap: nowrap;
  gap: .52rem;
  margin-top: .46rem;
}

.entry-tour-row span {
  max-width: none;
  white-space: nowrap;
}

.entry-tour-button {
  min-height: 2.05rem;
  padding: .38rem .72rem;
}

body.entry-body .app-identity--plain {
  border-color: rgba(216, 224, 227, .32);
  background: transparent;
  padding: .16rem .28rem;
}

body.entry-body .app-identity--plain strong {
  color: #44535b;
  font-size: .78rem;
  line-height: 1.05;
}

body.entry-body .app-identity--plain span {
  color: #7b878e;
  font-size: .68rem;
  line-height: 1.08;
}

.entry-role-grid {
  gap: .54rem;
}

.entry-role-card {
  min-height: 3.95rem;
  grid-template-columns: 1.75rem minmax(0, 1fr) auto;
  gap: .52rem;
  border-color: #c3d0d4;
  background: rgba(255, 255, 255, .94);
  padding: .58rem .66rem;
  box-shadow: 0 10px 22px rgba(20, 25, 31, .06);
}

.entry-role-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.entry-role-copy strong {
  font-size: .92rem;
}

.entry-role-copy small {
  max-width: 18rem;
  font-size: .76rem;
  line-height: 1.18;
}

.entry-role-action {
  font-size: .76rem;
}

.entry-role-card:not(.primary):hover {
  border-color: #8facb6;
  background: #f8fbfa;
}

.flowie-highlight {
  border: 1px solid #4f8d9b;
  box-shadow: 0 0 0 9999px rgba(20, 25, 31, .055), 0 0 0 1px rgba(255, 255, 255, .58);
}

.flowie-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(340px, calc(100vw - 36px));
  border-color: #cedadd;
  box-shadow: 0 10px 22px rgba(20, 25, 31, .115);
  padding: .62rem .7rem .66rem;
}

.flowie-card__head {
  grid-template-columns: 1.9rem minmax(0, 1fr) 1.45rem;
  gap: .46rem;
  margin-bottom: .34rem;
  padding-bottom: .34rem;
}

.flowie-card__head strong {
  font-size: .94rem;
}

.flowie-card__head div > span:not(.flowie-name),
.flowie-meta {
  color: #707f88;
  font-size: .68rem;
  font-weight: 650;
}

.flowie-card p {
  margin-bottom: .48rem;
  font-size: .93rem;
  line-height: 1.34;
}

.flowie-actions {
  align-items: center;
  gap: .38rem;
  padding-top: .4rem;
}

.flowie-actions button {
  min-height: 1.92rem;
  padding: .31rem .56rem;
  font-size: .87rem;
}

.flowie-actions .flowie-next {
  min-width: 7.65rem;
}

@media (min-width: 1180px) {
  body.learner-body.flowie-tour-active .lesson-top-inner,
  body.learner-body.flowie-tour-active .stage,
  body.learner-body.flowie-tour-active .lesson-nav {
    margin-right: auto;
    margin-left: 0;
  }
}

body.screenshot-mode .entry-panel--choice {
  padding: .74rem .82rem;
}

body.screenshot-mode .entry-role-card {
  min-height: 3.95rem;
}

body.screenshot-mode .flowie-card {
  max-height: calc(100vh - 36px);
}

@media (max-width: 700px) {
  .entry-tour-row {
    flex-wrap: wrap;
  }

  .entry-tour-row span {
    white-space: normal;
  }
}

/* Flowie target-position polish */
.entry-panel--choice::after {
  content: "";
  display: block;
  height: .28rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 99, 143, .34), rgba(46, 112, 85, .26), rgba(200, 149, 61, .3));
  opacity: .58;
}

.flowie-highlight {
  border-color: #5f99a5;
  box-shadow: 0 0 0 9999px rgba(20, 25, 31, .045), 0 0 0 1px rgba(255, 255, 255, .54);
}

.flowie-card {
  width: min(340px, calc(100vw - 36px));
  box-shadow: 0 9px 18px rgba(20, 25, 31, .1);
}

.flowie-close {
  align-self: start;
  justify-self: end;
}

.flowie-actions {
  align-items: center;
}

body.screenshot-mode.flowie-step-19 .module-list-panel {
  max-height: calc(100vh - 360px);
  overflow: hidden;
}

/* Product navigation and calm first-run pass */
.app-shell__primary {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem .8rem;
  align-items: center;
}

.app-global-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem;
  align-items: center;
}

.app-global-nav__item {
  min-height: 2.05rem;
  display: inline-flex;
  gap: .38rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: .34rem .52rem;
  color: #40505a;
  font-size: .86rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}

.app-global-nav__item:hover {
  border-color: #d7e1e4;
  background: rgba(255, 255, 255, .72);
}

.app-global-nav__item.is-active {
  border-color: #bdd1d3;
  background: #eaf5f0;
  color: var(--navy);
  box-shadow: inset 0 -2px 0 #2e7055;
}

.app-global-nav__icon {
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.app-global-nav__icon svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.app-account-link {
  color: inherit;
  font-weight: 780;
  text-decoration: none;
}

.app-account-link:hover {
  text-decoration: underline;
}

body.entry-body .app-shell__top {
  gap: .75rem;
}

body.entry-body .app-shell__primary {
  display: flex;
  gap: 1rem;
  align-items: center;
  min-width: 0;
}

body.entry-body .app-brand {
  flex: 0 0 auto;
}

body.entry-body .app-global-nav {
  min-width: 0;
}

.entry-panel--choice {
  position: relative;
  gap: .68rem;
  min-height: 0;
  padding: .86rem .92rem;
}

.entry-panel--choice .entry-hero {
  max-width: 760px;
}

.entry-panel--choice .kicker {
  margin-bottom: .24rem;
  color: #2e7055;
}

.entry-panel--choice h1 {
  max-width: 760px;
  margin-bottom: .26rem;
  font-size: clamp(2rem, 2.7vw, 2.56rem);
}

.entry-panel--choice .entry-subtitle {
  max-width: 680px;
  margin-bottom: .08rem;
  color: var(--ink);
}

.entry-panel--choice .entry-lead {
  max-width: 680px;
  color: #52616a;
}

.entry-tour-row {
  flex-wrap: wrap;
  gap: .42rem;
}

.entry-tour-row .entry-tour-button {
  text-decoration: none;
}

.entry-tour-row .secondary-action {
  color: var(--navy);
}

.entry-role-grid {
  gap: .48rem;
}

.entry-role-card {
  min-height: 3.7rem;
  border-color: #d5e0e3;
  box-shadow: none;
}

.entry-role-card.primary {
  box-shadow: 0 8px 18px rgba(23, 50, 74, .12);
}

.entry-flowie-helper {
  width: min(340px, 100%);
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: .6rem;
  align-items: center;
  border: 1px solid #cfdddc;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  padding: .58rem .66rem;
  color: #394850;
}

.entry-flowie-helper strong,
.entry-flowie-helper small {
  display: block;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.entry-flowie-helper strong {
  color: var(--ink);
  font-size: .9rem;
}

.entry-flowie-helper small {
  margin-top: .08rem;
  color: #61707a;
  font-size: .78rem;
  line-height: 1.25;
}

.entry-flowie-face,
.flowie-avatar {
  position: relative;
}

.entry-flowie-face {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid #b9d0c8;
  border-radius: 50%;
  background: #f9fcfa;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95);
}

.entry-flowie-face::before {
  content: "";
  position: absolute;
  top: .66rem;
  left: .62rem;
  width: .27rem;
  height: .27rem;
  border-radius: 999px;
  background: #22638f;
  box-shadow: .74rem .06rem 0 #2e7055, 1.12rem -.22rem 0 .04rem #c8953d;
}

.entry-flowie-face::after {
  content: "";
  position: absolute;
  left: .72rem;
  bottom: .54rem;
  width: .78rem;
  height: .34rem;
  border-bottom: 1.5px solid #17324a;
  border-radius: 0 0 999px 999px;
}

.student-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  margin-bottom: .64rem;
  border: 1px solid #bdd5d5;
  border-left: 4px solid #2e7055;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 252, 250, .96), rgba(255, 255, 255, .88));
  padding: .68rem .76rem;
}

.student-next-step strong,
.student-next-step small {
  display: block;
}

.student-next-step strong {
  margin-top: .08rem;
  font-size: 1.02rem;
}

.student-next-step small {
  margin-top: .08rem;
  color: var(--muted);
  font-size: .8rem;
}

.student-home-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-home-overview > div,
.teacher-stat-card,
.teacher-card,
.module-list-row,
.submission-card,
.review-section,
.review-decision-card,
.teacher-filters {
  border-color: #d8e2e5;
  box-shadow: none;
}

.teacher-overview-grid {
  grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(0, .9fr));
}

.teacher-stat-card {
  min-height: 5rem;
  text-align: left;
}

.teacher-stat-card span {
  color: #586872;
}

.teacher-stat-card strong {
  font-size: 1.45rem;
}

.teacher-stat-card--focus {
  border-color: #cf9f4d;
  background: linear-gradient(180deg, #fff7e8 0, rgba(255, 255, 255, .94) 100%);
  box-shadow: inset 0 0 0 1px rgba(207, 159, 77, .18);
}

.teacher-card-headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: start;
  margin-bottom: .62rem;
}

.teacher-card-headline h2,
.teacher-card-headline p {
  margin-bottom: .1rem;
}

.next-steps-card .next-step-list li {
  border-color: #e4ecee;
  background: rgba(255, 255, 255, .58);
}

.next-step-link.secondary-action,
.module-list-actions .button-link,
.module-list-actions button,
.module-editor-actions button:not(.primary),
.module-editor-actions .button-link,
.review-actions button:not(.primary),
.student-admin-actions button:not(.primary),
.student-row-actions button {
  border-color: #dce6e8;
  background: rgba(255, 255, 255, .7);
  color: #31444f;
  box-shadow: none;
}

.module-admin-head {
  align-items: center;
}

.module-create-panel {
  border-color: #e0e9eb;
  background: rgba(255, 255, 255, .64);
  box-shadow: none;
}

.module-list-panel,
.module-editor-panel {
  background: rgba(255, 255, 255, .82);
}

.module-editor-panel .technical-id {
  color: #64747d;
  font-size: .86rem;
}

.review-actions .primary[data-tour-id='teacher-approve-action'] {
  box-shadow: 0 0 0 2px rgba(46, 112, 85, .2);
}

.flowie-card {
  overflow: visible;
}

.flowie-card::before {
  content: "";
  position: absolute;
  left: 1.22rem;
  top: -7px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #cedadd;
  border-left: 1px solid #cedadd;
  background: #fff;
  transform: rotate(45deg);
}

.flowie-avatar {
  overflow: visible;
}

.flowie-avatar::after {
  box-shadow: 1.08rem -.16rem 0 -.12rem #c8953d;
}

.flowie-close {
  border-color: transparent;
  opacity: .86;
}

.flowie-actions {
  grid-template-columns: auto auto;
}

@media (max-width: 900px) {
  .app-shell__primary,
  body.entry-body .app-shell__primary {
    align-items: flex-start;
    flex-direction: column;
    gap: .55rem;
  }

  .app-global-nav {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .05rem;
    scrollbar-width: none;
  }

  .app-global-nav::-webkit-scrollbar {
    display: none;
  }

  .app-global-nav__item {
    flex: 0 0 auto;
  }

  .teacher-overview-grid,
  .student-home-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-card-headline,
  .student-next-step {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .app-global-nav__item {
    padding: .32rem .42rem;
    font-size: .8rem;
  }

  .app-global-nav__item span:last-child {
    display: none;
  }

  .entry-panel--choice {
    padding: .72rem;
  }

  .entry-role-grid,
  .teacher-overview-grid,
  .student-home-overview {
    grid-template-columns: 1fr;
  }

  .entry-flowie-helper {
    grid-template-columns: 2.1rem minmax(0, 1fr);
  }
}

/* Product UI kit and role shells */
:root {
  --bg: #f4f6f2;
  --paper: #ffffff;
  --paper-soft: #eef4ef;
  --paper-warm: #fff8ea;
  --ink: #17202a;
  --muted: #59666d;
  --soft: #3c4850;
  --line: #d8e0dc;
  --line-dark: #9aa9a3;
  --link: #1d5c76;
  --navy: #203448;
  --good: #2f6f4e;
  --good-bg: #e8f4ec;
  --warn: #8a641f;
  --warn-bg: #fff2cf;
  --bad: #9b3a31;
  --bad-bg: #fde9e4;
  --shadow: 0 16px 36px rgba(31, 45, 54, .08);
}

body,
body.entry-body,
body.learner-body,
body.teacher-body {
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,0) 18rem),
    var(--bg);
}

.app-shell {
  width: min(1180px, calc(100vw - 1.5rem));
  padding: .75rem 0 1.25rem;
}

.app-shell--builder {
  width: min(1480px, calc(100vw - 1.5rem));
}

.app-shell__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  padding: .62rem .7rem;
  box-shadow: 0 8px 22px rgba(31, 45, 54, .05);
}

.app-shell__primary,
body.entry-body .app-shell__primary {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .85rem;
  align-items: center;
  min-width: 0;
}

.app-brand {
  flex: 0 0 auto;
}

.app-mark {
  border-radius: 7px;
  background: var(--navy);
}

.app-global-nav,
.app-role-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
  min-width: 0;
}

.app-global-nav__item,
.app-role-nav .app-nav-item {
  min-height: 2.05rem;
  display: inline-flex;
  gap: .38rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #3f5159;
  padding: .34rem .54rem;
  box-shadow: none;
  font: 760 .84rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-decoration: none;
}

.app-global-nav__item:hover,
.app-role-nav .app-nav-item:hover {
  border-color: #cbd8d3;
  background: #f8fbf8;
}

.app-global-nav__item.is-active,
.app-role-nav .app-nav-item.is-active {
  border-color: #b8c9c2;
  background: #e9f3ee;
  color: var(--navy);
  box-shadow: inset 0 -2px 0 var(--good);
}

.app-role-nav .app-nav-icon,
.app-global-nav__icon {
  width: 1rem;
  height: 1rem;
}

.app-role-nav .app-nav-icon svg,
.app-global-nav__icon svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.app-identity {
  border-color: #d5dfda;
  background: #fff;
  box-shadow: none;
}

.app-panel,
.ui-panel,
.ui-hero-card,
.ui-action-card,
.module-card,
.teacher-card,
.submission-card,
.goal-card,
.login-panel,
.student-table-card,
.teacher-filters,
.password-export-card,
.planning-card,
.module-fit-card,
.demo-data-card,
.review-decision-card,
.teacher-note,
.submission-status-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 24px rgba(31, 45, 54, .055);
}

.ui-page,
.student-home,
.teacher-shell,
.entry-panel {
  padding: .95rem;
}

.ui-page-header,
.student-home-head,
.teacher-header,
.student-admin-head,
.module-admin-head {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: .72rem .82rem;
  box-shadow: none;
}

.ui-page-header h1,
.student-home-head h1,
.teacher-header h1,
.entry-panel--choice h1 {
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.08;
}

.ui-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: center;
  margin-bottom: .72rem;
  padding: .82rem .9rem;
  border-color: #bfd3ca;
  background: linear-gradient(180deg, #fbfffc 0, #f2f8f4 100%);
}

.ui-hero-card h2,
.ui-hero-card h1 {
  margin: .08rem 0 .16rem;
}

.ui-hero-card p {
  margin-bottom: 0;
}

.ui-stat-strip,
.student-home-overview,
.teacher-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin: 0 0 .8rem;
}

.ui-stat-strip > div,
.student-home-overview > div,
.teacher-stat-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: .58rem .65rem;
  box-shadow: none;
  text-align: left;
}

.ui-stat-strip span,
.student-home-overview span,
.teacher-stat-card span,
.meta-label {
  color: var(--muted);
  font: 850 .7rem/1.15 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-transform: uppercase;
}

.ui-stat-strip strong,
.student-home-overview strong,
.teacher-stat-card strong {
  display: block;
  margin-top: .12rem;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.05;
}

.teacher-stat-card p {
  margin: .14rem 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.25;
}

button.primary,
.entry-tour-button.primary,
.ui-primary-action {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.secondary-action,
.entry-tour-button.secondary-action {
  border-color: #b8c9c2;
  background: #eef6f1;
  color: var(--navy);
}

.quiet-button,
a.quiet-button,
button.quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  border: 1px solid #d7e2de;
  border-radius: 7px;
  background: rgba(255,255,255,.72);
  color: #344850;
  padding: .42rem .62rem;
  font: 760 .86rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-decoration: none;
}

.quiet-button:hover,
button.quiet-button:hover {
  border-color: #bdcdc7;
  background: #f7fbf8;
}

.entry-panel--choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
  gap: .8rem;
  align-items: start;
  min-height: 0;
  padding: 1rem;
}

.entry-panel--choice .entry-hero {
  max-width: 700px;
}

.entry-panel--choice .entry-subtitle {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--soft);
  font-size: 1.04rem;
  line-height: 1.42;
}

.entry-primary-actions,
.login-choice-actions,
.role-switch-row,
.card-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-top: .75rem;
}

.entry-tour-button {
  margin-top: 0;
  min-height: 2.35rem;
  border-radius: 7px;
  padding: .55rem .76rem;
  text-decoration: none;
}

.entry-flowie-helper,
.ui-flowie-card {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: .6rem;
  align-items: center;
  border: 1px solid #c8d8d1;
  border-radius: 8px;
  background: #fff;
  padding: .64rem .7rem;
  color: var(--soft);
  box-shadow: none;
}

.entry-flowie-helper {
  width: 100%;
  grid-column: 2;
}

.entry-flowie-helper strong,
.entry-flowie-helper small,
.ui-flowie-card strong,
.ui-flowie-card p {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.entry-flowie-helper strong,
.ui-flowie-card strong {
  color: var(--ink);
  font-size: .9rem;
}

.entry-flowie-helper small,
.ui-flowie-card p {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.3;
}

.entry-secondary-routes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  padding-top: .2rem;
}

.entry-role-card {
  min-height: 0;
  border-color: #d8e0dc;
  background: rgba(255,255,255,.74);
  box-shadow: none;
}

.entry-role-card:hover {
  border-color: #b8c9c2;
  background: #fff;
}

.entry-role-icon {
  border-color: #b4c5be;
  background: #eef6f1;
  color: var(--good);
}

.login-choice-page {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 0;
}

.login-choice-page .ui-hero-card,
.login-choice-page .ui-panel {
  display: block;
}

.login-panel,
.goal-card {
  padding: 1rem;
}

.login-form {
  display: grid;
}

.ui-form-field input,
.ui-form-field textarea,
.ui-form-field select {
  border-radius: 7px;
  border-color: #b8c7c2;
  background: #fff;
}

.local-fallback {
  max-width: 100%;
  margin-top: .85rem;
}

.local-fallback .secondary-action {
  width: fit-content;
  margin-top: .35rem;
}

.module-section-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: end;
  margin: .2rem 0 .55rem;
}

.module-section-head h2 {
  margin-bottom: .12rem;
  font-size: 1.22rem;
}

.module-section-head p {
  margin-bottom: 0;
  font-size: .92rem;
  line-height: 1.35;
}

.student-next-step {
  border-left: 4px solid var(--good);
}

.student-next-step strong {
  font-size: 1.08rem;
}

.student-next-step button {
  min-width: 9rem;
}

.module-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.module-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: .58rem;
  min-height: 15.5rem;
  padding: .78rem;
  border-color: #d8e0dc;
  background: #fff;
  box-shadow: none;
}

.module-card::after {
  width: 3px;
  background: #c7d5d0;
}

.module-card--active::after,
.module-card--submitted::after {
  background: #2e7894;
}

.module-card--feedback::after {
  background: #c8953d;
}

.module-card--done::after {
  background: var(--good);
}

.module-card h2 {
  margin-bottom: .22rem;
  font-size: 1.2rem;
  line-height: 1.18;
}

.module-card p {
  color: var(--soft);
  font-size: .94rem;
  line-height: 1.36;
}

.module-card-status {
  gap: .45rem;
}

.module-card-actions {
  display: flex;
  justify-content: flex-end;
}

.module-card-actions button {
  min-width: 7.25rem;
}

.teacher-review-hero {
  border-left: 4px solid #c8953d;
}

.teacher-review-hero h2 {
  font-size: clamp(1.45rem, 2.5vw, 2.05rem);
}

.teacher-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.ui-action-card {
  display: grid;
  align-content: start;
  gap: .55rem;
  min-height: 13rem;
  padding: .78rem;
}

.teacher-card-headline {
  margin-bottom: 0;
}

.teacher-card-headline h2 {
  margin-bottom: .12rem;
  font-size: 1.18rem;
}

.teacher-card-headline p {
  margin-bottom: 0;
  font-size: .9rem;
  line-height: 1.34;
}

.teacher-tabs {
  border-bottom: 1px solid var(--line);
  margin-bottom: .65rem;
  padding-bottom: .42rem;
}

.teacher-tab {
  border-color: #d7e2de;
  background: rgba(255,255,255,.72);
  color: #344850;
}

.teacher-tab.active {
  border-color: #b8c9c2;
  background: #e9f3ee;
  color: var(--navy);
  box-shadow: inset 0 -2px 0 var(--good);
}

.teacher-shell--overzicht .teacher-tabs {
  margin-bottom: .55rem;
}

.compact-list {
  display: grid;
  gap: .35rem;
}

.compact-list > div {
  border: 1px solid #e1e8e5;
  border-radius: 7px;
  background: #fbfdfb;
  padding: .45rem .52rem;
}

.compact-list strong,
.compact-list span {
  display: block;
}

.compact-list span {
  margin-top: .1rem;
  color: var(--muted);
  font: 730 .8rem/1.28 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.class-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.class-chip-list span,
.status-pill,
.module-card-meta span,
.module-signal {
  border-radius: 7px;
}

.flowie-highlight {
  border: 1.5px solid #2e7894;
  border-radius: 7px;
  box-shadow: 0 0 0 9999px rgba(23, 32, 42, .11), 0 0 0 3px rgba(255,255,255,.82);
}

.flowie-card {
  width: min(320px, calc(100vw - 1.5rem));
  border-color: #cbd8d3;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(23, 32, 42, .14);
  padding: .7rem .78rem .74rem;
}

.flowie-card::before {
  display: none;
}

.flowie-card__head {
  grid-template-columns: 2rem minmax(0, 1fr) 1.55rem;
  gap: .5rem;
  margin-bottom: .5rem;
  padding-bottom: .42rem;
}

.flowie-avatar {
  width: 2rem;
  height: 2rem;
}

.flowie-card__head strong {
  font-size: .96rem;
}

.flowie-card p {
  margin-bottom: .6rem;
  font-size: .9rem;
  line-height: 1.36;
}

.flowie-actions {
  padding-top: .5rem;
}

.flowie-actions button {
  min-height: 2rem;
}

.flowie-actions .flowie-next {
  min-width: 7.2rem;
}

@media (max-width: 900px) {
  .app-shell__top,
  .app-shell__primary,
  body.entry-body .app-shell__primary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app-identity {
    justify-self: start;
  }

  .app-global-nav,
  .app-role-nav {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .05rem;
    scrollbar-width: none;
  }

  .app-global-nav::-webkit-scrollbar,
  .app-role-nav::-webkit-scrollbar {
    display: none;
  }

  .app-global-nav__item,
  .app-role-nav .app-nav-item {
    flex: 0 0 auto;
  }

  .entry-panel--choice,
  .entry-secondary-routes,
  .teacher-home-grid,
  .module-card-grid {
    grid-template-columns: 1fr;
  }

  .entry-flowie-helper {
    grid-column: auto;
  }

  .ui-hero-card,
  .student-next-step,
  .teacher-review-hero,
  .teacher-card-headline {
    grid-template-columns: 1fr;
  }

  .ui-stat-strip,
  .student-home-overview,
  .teacher-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100%, calc(100vw - .7rem));
    padding-top: .35rem;
  }

  .app-shell__top,
  .ui-page,
  .student-home,
  .teacher-shell,
  .entry-panel {
    padding: .65rem;
  }

  .app-global-nav__item,
  .app-role-nav .app-nav-item {
    padding: .34rem .42rem;
  }

  .app-global-nav__item span:last-child,
  .app-role-nav .app-nav-item span:last-child {
    display: inline;
  }

  .entry-primary-actions,
  .login-choice-actions,
  .role-switch-row,
  .card-action-row,
  .module-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .entry-primary-actions > *,
  .login-choice-actions > *,
  .role-switch-row > *,
  .card-action-row > *,
  .module-card-actions > * {
    width: 100%;
  }

  .ui-stat-strip,
  .student-home-overview,
  .teacher-overview-grid {
    grid-template-columns: 1fr;
  }

  .flowie-card {
    right: .5rem;
    bottom: .5rem;
    left: .5rem;
    width: auto;
  }
}

/* Role-aware planning polish */
.page-hero {
  margin-bottom: .72rem;
}

.primary-focus-card {
  min-height: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  align-items: stretch;
}

.work-card {
  min-width: 0;
}

.student-home-work {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(240px, .82fr);
  margin: 0 0 .85rem;
}

.flowie-helper-card {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-content: start;
  gap: .6rem;
}

.flowie-helper-card p {
  margin-bottom: .45rem;
}

.action-row,
.quiet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-top: .65rem;
}

.secondary-action,
a.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  border: 1px solid #b8c9c2;
  border-radius: 7px;
  padding: .45rem .68rem;
  text-decoration: none;
  font: 760 .86rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.student-planning-grid,
.student-feedback-grid,
.teacher-planning-work {
  margin-top: .75rem;
}

.planning-card--student {
  display: grid;
  gap: .65rem;
  min-height: 12rem;
  padding: .78rem;
}

.planning-card--student h2,
.student-feedback-grid h2,
.teacher-planning-work h2 {
  margin-bottom: .18rem;
  font-size: 1.16rem;
}

.planning-card-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
}

.planning-card-facts > div,
.planning-row-card {
  min-width: 0;
  border: 1px solid #e1e8e5;
  border-radius: 7px;
  background: #fbfdfb;
  padding: .48rem .55rem;
}

.planning-card-facts strong,
.planning-row-card strong,
.planning-row-card span,
.planning-row-card small {
  display: block;
  min-width: 0;
}

.planning-card-facts strong {
  margin-top: .1rem;
  font-size: .92rem;
  line-height: 1.2;
}

.planning-row-list {
  display: grid;
  gap: .42rem;
}

.planning-row-card span,
.planning-row-card small {
  margin-top: .12rem;
  color: var(--muted);
  font: 730 .8rem/1.28 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.teacher-planning-page {
  padding: 0;
}

.teacher-planning-page .planning-layout {
  margin-top: .75rem;
}

.teacher-planning-page .planning-focus-card {
  margin-bottom: .72rem;
}

@media (max-width: 900px) {
  .student-home-work,
  .work-grid,
  .teacher-planning-work {
    grid-template-columns: 1fr;
  }

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

/* Media-app layout retrofit */
:root {
  --bg: #f4f7f8;
  --paper: #ffffff;
  --paper-soft: #eef6f1;
  --paper-warm: #f8fbf8;
  --paper-2: #eef6f1;
  --paper-3: #f8fbf8;
  --ink: #172027;
  --muted: #5d6d73;
  --soft: #33464d;
  --line: #d7e1de;
  --line-dark: #aebfba;
  --link: #245f9f;
  --navy: #172027;
  --warn: #8a5a11;
  --warn-bg: #fff3cf;
  --good: #2f6f4e;
  --good-bg: #e8f4ec;
  --bad: #9b3434;
  --bad-bg: #fbe8e5;
  --shadow: 0 12px 28px rgba(23, 32, 39, .08);
  --dock-height: 4.25rem;
}

body.entry-body,
body.learner-body,
body.teacher-body {
  min-height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbfb 0%, #edf3f5 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.entry-body h1,
body.entry-body h2,
body.entry-body h3,
body.entry-body p,
body.entry-body li,
body.learner-body h1,
body.learner-body h2,
body.learner-body h3,
body.learner-body p,
body.learner-body li,
body.teacher-body h1,
body.teacher-body h2,
body.teacher-body h3,
body.teacher-body p,
body.teacher-body li {
  font-family: inherit;
}

body.entry-body p,
body.entry-body li,
body.learner-body p,
body.learner-body li,
body.teacher-body p,
body.teacher-body li {
  font-size: .95rem;
  line-height: 1.42;
}

.app-shell:not(.app-shell--builder) {
  width: min(1180px, calc(100vw - 1.25rem));
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: .42rem;
  padding: .55rem 0 calc(var(--dock-height) + 1.1rem + env(safe-area-inset-bottom));
}

.app-shell--entry {
  width: min(1040px, calc(100vw - 1.25rem));
}

.app-top,
.app-shell__top {
  min-height: 3.15rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .88);
  padding: .5rem .62rem;
  box-shadow: 0 10px 24px rgba(23, 32, 39, .06);
  backdrop-filter: blur(16px);
}

.app-shell__primary,
body.entry-body .app-shell__primary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .65rem;
}

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

.app-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  background: #172027;
}

.app-brand strong {
  overflow: hidden;
  font-size: .98rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-brand span,
.app-identity span,
.app-account-link {
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.15;
}

.app-identity {
  max-width: 13rem;
  border-color: var(--line);
  background: #fff;
  padding: .32rem .45rem;
  box-shadow: none;
}

.app-avatar,
.section-avatar {
  width: 1.9rem;
  height: 1.9rem;
  background: #172027;
  font-size: .75rem;
}

.app-global-nav:not(.bottom-dock) {
  display: none;
}

.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: calc(.6rem + env(safe-area-inset-bottom));
  z-index: 80;
  width: fit-content;
  max-width: min(980px, calc(100vw - 1rem));
  min-height: var(--dock-height);
  display: flex;
  gap: .28rem;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  border: 1px solid rgba(174, 191, 186, .9);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  padding: .42rem;
  box-shadow: 0 18px 48px rgba(23, 32, 39, .18);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
  scrollbar-width: none;
}

.bottom-dock::-webkit-scrollbar {
  display: none;
}

.bottom-dock .bottom-dock-item,
.bottom-dock.app-role-nav .app-nav-item,
.bottom-dock.app-global-nav .app-global-nav__item {
  flex: 0 0 auto;
  min-width: 4.45rem;
  min-height: 3.12rem;
  display: grid;
  grid-template-rows: 1.2rem auto;
  gap: .18rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #52666d;
  padding: .42rem .62rem;
  box-shadow: none;
  font: 780 .74rem/1.08 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-decoration: none;
}

.bottom-dock .bottom-dock-item:hover,
.bottom-dock.app-role-nav .app-nav-item:hover,
.bottom-dock.app-global-nav .app-global-nav__item:hover {
  background: #f0f6f3;
  color: var(--navy);
}

.bottom-dock .bottom-dock-item.is-active,
.bottom-dock.app-role-nav .app-nav-item.is-active,
.bottom-dock.app-global-nav .app-global-nav__item.is-active {
  background: #172027;
  color: #fff;
  box-shadow: none;
}

.bottom-dock-icon,
.bottom-dock .app-nav-icon,
.bottom-dock .app-global-nav__icon {
  width: 1.14rem;
  height: 1.14rem;
}

.bottom-dock svg {
  width: 1.14rem;
  height: 1.14rem;
}

.app-status-row {
  min-height: 0;
  gap: .3rem;
  margin: 0;
}

.status-chip,
.status-pill {
  min-height: 1.55rem;
  border-radius: 999px;
  padding: .24rem .52rem;
  font-size: .72rem;
  line-height: 1;
}

.app-shell__content {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.page-frame,
.ui-page,
.student-home,
.teacher-shell,
.entry-panel,
.learner-start {
  min-height: 0;
  border-radius: 12px;
}

.student-home,
.teacher-shell,
.entry-panel {
  height: 100%;
  overflow: hidden;
  padding: .7rem;
}

.page-hero,
.ui-page-header,
.student-home-head,
.teacher-header,
.student-admin-head,
.module-admin-head {
  min-height: 0;
  margin: 0 0 .55rem;
  border-color: var(--line);
  border-radius: 10px;
  background: #fff;
  padding: .54rem .65rem;
}

.page-hero h1,
.ui-page-header h1,
.student-home-head h1,
.teacher-header h1,
.entry-panel--choice h1 {
  margin-bottom: .12rem;
  font-size: clamp(1.42rem, 2.25vw, 2rem);
  line-height: 1.05;
}

.student-home-helper,
.teacher-header p,
.module-section-head p {
  margin-bottom: 0;
  font-size: .86rem;
  line-height: 1.28;
}

.metric-strip,
.ui-stat-strip,
.student-home-overview,
.teacher-overview-grid {
  gap: .38rem;
  margin-bottom: .55rem;
}

.metric-strip > div,
.ui-stat-strip > div,
.student-home-overview > div,
.teacher-stat-card {
  border-radius: 10px;
  padding: .42rem .5rem;
}

.metric-strip strong,
.ui-stat-strip strong,
.student-home-overview strong,
.teacher-stat-card strong {
  font-size: 1.08rem;
}

.action-panel,
.ui-hero-card,
.ui-action-card,
.module-card,
.review-card,
.planning-card,
.teacher-card,
.submission-card,
.goal-card,
.login-panel,
.student-table-card,
.teacher-filters,
.password-export-card,
.module-fit-card,
.review-decision-card,
.teacher-note,
.submission-status-panel,
.block-planning {
  border-color: var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(23, 32, 39, .055);
}

.ui-hero-card {
  gap: .65rem;
  margin-bottom: .5rem;
  padding: .58rem .68rem;
}

.ui-hero-card h2 {
  font-size: 1.26rem;
}

.student-next-step strong {
  font-size: .98rem;
}

.student-home {
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
  gap: 0;
}

.student-home-work {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(210px, .78fr);
  gap: .5rem;
  margin-bottom: .55rem;
}

.work-card,
.ui-action-card {
  min-height: 0;
  padding: .62rem;
}

.work-card h2,
.ui-action-card h2 {
  font-size: 1.04rem;
}

.module-section-head {
  margin: .05rem 0 .38rem;
}

.module-card-grid {
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  overflow: auto;
  padding-right: .12rem;
}

.module-card {
  min-height: 10.7rem;
  gap: .45rem;
  padding: .62rem;
}

.module-card h2 {
  font-size: 1.05rem;
}

.module-card p,
.module-card-caption,
.module-card-meta span,
.module-signal {
  font-size: .76rem;
  line-height: 1.26;
}

.module-card-progress {
  gap: .48rem;
}

.teacher-shell {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.teacher-header {
  flex: 0 0 auto;
}

.teacher-home-grid {
  min-height: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
}

.teacher-home-grid .ui-action-card {
  min-height: 9.25rem;
}

.teacher-card-headline h2 {
  font-size: 1.02rem;
}

.teacher-card-headline p,
.compact-list span,
.planning-row-card span,
.planning-row-card small {
  font-size: .74rem;
  line-height: 1.23;
}

.compact-list {
  gap: .28rem;
}

.compact-list > div {
  padding: .34rem .42rem;
}

.teacher-shell--leerlingen .student-admin-workspace,
.teacher-shell--modules .module-flow-grid,
.teacher-shell--inzendingen .submission-list,
.teacher-shell--planning .teacher-planning-page {
  min-height: 0;
  overflow: auto;
  padding-right: .12rem;
}

.teacher-shell--inzendingen .submission-card {
  min-height: 0;
}

.local-tabs,
.teacher-tabs {
  display: none;
}

.block-planning {
  min-width: 0;
  margin: .55rem 0;
  padding: .58rem;
}

.block-planning-head {
  display: flex;
  gap: .65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}

.block-planning-head h2 {
  margin-bottom: .1rem;
  font-size: 1.06rem;
}

.block-planning-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .78rem;
}

.block-planning-grid {
  min-width: 0;
}

.block-planning-grid--student {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.block-planning-item {
  min-width: 0;
  border: 1px solid #dce8e4;
  border-radius: 10px;
  background: #fbfdfd;
}

.block-planning-grid--student .block-planning-item {
  display: grid;
  grid-template-columns: minmax(7rem, .7fr) minmax(0, 1.35fr) minmax(6rem, .55fr) minmax(8rem, .75fr) auto;
  gap: .45rem;
  align-items: center;
  padding: .5rem;
}

.block-planning-item.is-next {
  border-color: #8db4a2;
  background: #f0f8f4;
}

.block-planning-time span,
.block-planning-deadline span,
.block-planning-class span,
.block-planning-module span,
.block-planning-status small,
.block-planning-cell span,
.block-planning-cell small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.22;
}

.block-planning-time strong,
.block-planning-main h3,
.block-planning-deadline strong,
.block-planning-module strong,
.block-planning-cell strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: .88rem;
  line-height: 1.16;
}

.block-planning-main p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.25;
}

.block-planning-status {
  display: grid;
  gap: .18rem;
}

.block-planning-grid--teacher {
  display: grid;
  grid-template-columns: minmax(11rem, .9fr) repeat(var(--planning-cols), minmax(8.5rem, 1fr));
  gap: .34rem;
  max-height: 13.2rem;
  overflow: auto;
  padding-right: .12rem;
}

.block-planning-axis,
.block-planning-class,
.block-planning-module,
.block-planning-cell {
  min-width: 0;
  border: 1px solid #dce8e4;
  border-radius: 10px;
  background: #fbfdfd;
  padding: .45rem .5rem;
}

.block-planning-axis,
.block-planning-class,
.block-planning-module {
  background: #f1f6f4;
}

.block-planning-axis,
.block-planning-class strong {
  color: var(--ink);
  font-size: .8rem;
  line-height: 1.1;
}

.block-planning-cell {
  display: grid;
  gap: .12rem;
}

.block-planning-item--feedback {
  border-color: #e1bd7a;
  background: #fff8e9;
}

.block-planning-item--submitted,
.block-planning-item--active {
  border-color: #a9cde0;
  background: #eef7fb;
}

.block-planning-item--done {
  border-color: #a8cfba;
  background: #eff8f3;
}

.block-planning--weeks {
  margin-top: .5rem;
}

.block-planning--weeks .planning-roster-scroll {
  max-height: 13.8rem;
  overflow: auto;
}

.planning-roster {
  min-width: 720px;
  gap: .28rem;
}

.planning-roster-head,
.planning-roster-row {
  grid-template-columns: 5.6rem repeat(5, minmax(6.8rem, 1fr));
  gap: .28rem;
}

.planning-roster-head span,
.planning-roster-row > strong,
.planning-cell {
  border-radius: 9px;
}

.planning-cell {
  min-height: 3rem;
  padding: .38rem .44rem;
}

.planning-cell strong {
  font-size: .76rem;
  line-height: 1.12;
}

.planning-cell small,
.planning-cell em {
  font-size: .68rem;
}

.teacher-planning-page {
  padding: 0;
}

.teacher-planning-page .planning-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .7fr);
  gap: .55rem;
  margin-top: .55rem;
}

body.learner-body .app-shell__content {
  display: flex;
  flex-direction: column;
  gap: .42rem;
}

body.learner-body .app-shell__content > .lesson-top {
  flex: 0 0 auto;
}

body.learner-body .app-shell__content > .stage {
  flex: 1 1 auto;
  min-height: 0;
}

body.learner-body .app-shell__content > .lesson-nav {
  flex: 0 0 auto;
}

body.learner-body .lesson-top {
  margin: 0;
  border-radius: 12px;
}

body.learner-body .lesson-top-inner {
  width: auto;
  padding: .5rem .58rem;
}

.lesson-progress-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
}

.lesson-step-line {
  grid-template-columns: auto minmax(0, 1fr);
  gap: .38rem;
}

.lesson-step-line span,
.lesson-step-line em {
  font-size: .72rem;
}

.lesson-step-line strong {
  font-size: .9rem;
}

.lesson-progress-row {
  gap: .42rem;
}

.lesson-progress-row .progress-track {
  height: .35rem;
}

body.learner-body .stage {
  width: auto;
  margin: 0;
  padding: 0;
}

body.learner-body .slide {
  height: 100%;
  min-height: 0;
  border-radius: 12px;
  overflow: auto;
  padding: clamp(.85rem, 2.2vw, 1.35rem);
}

body.learner-body .slide.center {
  align-content: start;
}

body.learner-body .slide h1 {
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
}

body.learner-body .slide-text {
  max-width: 820px;
}

body.learner-body .lesson-nav {
  width: auto;
  margin: 0;
  padding: 0;
}

body.learner-body .lesson-nav button {
  min-height: 2rem;
}

.flowie-card {
  max-height: min(440px, calc(100dvh - var(--dock-height) - 2.2rem));
  overflow: auto;
}

@media (max-width: 980px) {
  body.entry-body,
  body.learner-body,
  body.teacher-body {
    overflow: hidden;
  }

  .app-shell:not(.app-shell--builder) {
    width: min(100%, calc(100vw - .75rem));
    padding-top: .38rem;
  }

  .app-shell__top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-identity {
    max-width: 9rem;
  }

  .teacher-home-grid,
  .student-home-work,
  .block-planning-grid--student {
    grid-template-columns: 1fr;
  }

  .block-planning-grid--student .block-planning-item {
    grid-template-columns: 1fr;
  }

  .teacher-shell--overzicht {
    overflow: auto;
  }
}

@media (max-width: 700px) {
  :root {
    --dock-height: 4.05rem;
  }

  .bottom-dock {
    right: .38rem;
    left: .38rem;
    width: auto;
    max-width: none;
    justify-content: flex-start;
    padding: .34rem;
    transform: none;
  }

  .bottom-dock .bottom-dock-item,
  .bottom-dock.app-role-nav .app-nav-item,
  .bottom-dock.app-global-nav .app-global-nav__item {
    min-width: 3.75rem;
    min-height: 3rem;
    padding: .38rem .46rem;
    font-size: .66rem;
  }

  .app-shell__top {
    min-height: 2.8rem;
    padding: .42rem .5rem;
  }

  .app-brand span,
  .app-identity span {
    display: none;
  }

  .app-identity {
    padding: .22rem;
  }

  .ui-stat-strip,
  .student-home-overview,
  .teacher-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-card-grid {
    grid-template-columns: 1fr;
  }

  .lesson-progress-line,
  .lesson-step-line {
    grid-template-columns: 1fr;
  }

  .flowie-card {
    right: .5rem;
    bottom: calc(var(--dock-height) + 1rem + env(safe-area-inset-bottom));
    left: .5rem;
    width: auto;
  }
}

/* Fixed app-shell final override */
:root {
  --app-topbar-height: 56px;
  --dock-height: 4.12rem;
  --dock-reserve: calc(var(--dock-height) + .9rem + env(safe-area-inset-bottom));
  --panel-radius: 8px;
}

body.entry-body,
body.learner-body,
body.teacher-body {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.app-shell:not(.app-shell--builder) {
  width: min(1180px, calc(100vw - 1rem));
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: var(--app-topbar-height) auto minmax(0, 1fr) var(--dock-reserve);
  gap: .38rem;
  margin: 0 auto;
  padding: .45rem 0 0;
  overflow: hidden;
}

.app-topbar,
.app-shell__top {
  grid-row: 1;
  height: var(--app-topbar-height);
  min-height: 0;
  max-height: var(--app-topbar-height);
  margin: 0;
  border-radius: var(--panel-radius);
  padding: .42rem .58rem;
  overflow: hidden;
}

.app-status-row {
  grid-row: 2;
  min-height: 0;
  max-height: 2rem;
  margin: 0;
  overflow: hidden;
}

.app-main,
.app-stage,
.app-shell__content {
  grid-row: 3;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-bottom: .2rem;
}

.bottom-dock-spacer {
  grid-row: 4;
  display: block;
  height: var(--dock-reserve);
  min-height: var(--dock-reserve);
}

.bottom-dock {
  bottom: calc(.48rem + env(safe-area-inset-bottom));
  height: var(--dock-height);
  min-height: 0;
  max-height: var(--dock-height);
  padding: .34rem;
}

.bottom-dock .bottom-dock-item,
.bottom-dock.app-role-nav .app-nav-item,
.bottom-dock.app-global-nav .app-global-nav__item {
  min-width: 4.15rem;
  min-height: 3.18rem;
  padding: .34rem .56rem;
  white-space: nowrap;
}

.entry-panel,
.student-home,
.student-planning,
.student-feedback,
.teacher-shell,
.learner-start {
  height: 100%;
  min-height: 0;
  border-radius: var(--panel-radius);
  overflow: hidden;
  padding: .58rem;
}

.app-panel,
.teacher-card,
.module-card,
.work-card,
.login-panel,
.goal-card,
.submission-card,
.planning-board,
.block-planning,
.page-hero,
.ui-page-header,
.student-home-head,
.teacher-header,
.student-admin-head,
.module-admin-head {
  border-radius: var(--panel-radius);
}

.app-panel--scroll {
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.page-hero,
.ui-page-header,
.student-home-head,
.teacher-header,
.student-admin-head,
.module-admin-head {
  margin: 0;
  padding: .46rem .58rem;
}

.page-hero h1,
.ui-page-header h1,
.student-home-head h1,
.teacher-header h1,
.entry-panel--choice h1 {
  margin-bottom: .08rem;
  font-size: clamp(1.22rem, 1.9vw, 1.72rem);
  line-height: 1.04;
}

.student-home-helper,
.teacher-header p,
.entry-subtitle,
.module-section-head p,
.teacher-card-headline p,
.work-card p,
.module-card p {
  font-size: .78rem;
  line-height: 1.25;
}

.kicker,
.meta-label,
.ui-stat-strip span,
.student-home-overview span,
.teacher-stat-card span {
  font-size: .66rem;
}

.entry-panel--choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  grid-template-areas: "hero flowie" "secondary flowie";
  grid-template-rows: auto minmax(0, 1fr);
  gap: .62rem;
  align-items: stretch;
}

.entry-panel--choice .entry-hero {
  grid-area: hero;
  align-self: center;
  max-width: 620px;
}

.entry-flowie-helper,
.flowie-companion {
  grid-area: flowie;
  align-self: start;
  position: relative;
  z-index: 1;
}

.entry-secondary-routes {
  grid-area: secondary;
  align-self: end;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.entry-role-card {
  min-height: 3.6rem;
  padding: .52rem .6rem;
}

.entry-primary-actions,
.login-choice-actions,
.role-switch-row,
.card-action-row {
  gap: .36rem;
  margin-top: .55rem;
}

.entry-tour-button,
.quiet-button,
a.quiet-button,
button.quiet-button,
.secondary-action,
.button-link,
button,
select {
  min-height: 2rem;
  border-radius: 7px;
  padding: .38rem .58rem;
  font-size: .82rem;
  line-height: 1.05;
}

.login-choice-page {
  width: min(540px, 100%);
  margin-inline: auto;
  display: grid;
  place-items: center;
}

.login-panel,
.goal-card {
  width: min(520px, 100%);
  padding: .86rem;
}

.login-panel h1,
.goal-card h1 {
  font-size: clamp(1.46rem, 2.3vw, 1.9rem);
}

.login-form,
.teacher-form {
  gap: .52rem;
  max-width: 390px;
}

.login-copy,
.login-support,
.field-help,
.help-text {
  font-size: .75rem;
  line-height: 1.24;
}

.local-fallback {
  margin-top: .52rem;
  padding: .48rem .56rem;
}

body.learner-body .app-main {
  display: flex;
  flex-direction: column;
  gap: .36rem;
}

body.learner-body .app-main > .learner-start,
body.learner-body .app-main > .student-home,
body.learner-body .app-main > .student-planning,
body.learner-body .app-main > .student-feedback {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.student-home,
.student-planning,
.student-feedback {
  display: flex;
  flex-direction: column;
  gap: .36rem;
}

.student-next-step,
.ui-hero-card,
.primary-focus-card {
  min-height: 0;
  margin: 0;
  padding: .5rem .58rem;
}

.student-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
}

.student-next-step strong {
  font-size: .98rem;
  line-height: 1.12;
}

.student-next-step small {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.16;
}

.ui-stat-strip,
.student-home-overview,
.teacher-overview-grid {
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .32rem;
  margin: 0;
}

.ui-stat-strip > div,
.student-home-overview > div,
.teacher-stat-card {
  padding: .36rem .44rem;
}

.ui-stat-strip strong,
.student-home-overview strong,
.teacher-stat-card strong {
  font-size: 1rem;
  line-height: 1;
}

.student-home-work {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(185px, .72fr);
  gap: .4rem;
  margin: 0;
}

.work-card,
.ui-action-card {
  min-height: 0;
  padding: .5rem;
}

.work-card h2,
.ui-action-card h2,
.teacher-card-headline h2 {
  margin-bottom: .12rem;
  font-size: .94rem;
  line-height: 1.1;
}

.flowie-helper-card p,
.module-card-main > p:not(.kicker) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.module-section-head {
  flex: 0 0 auto;
  margin: 0;
}

.module-section-head h2 {
  margin-bottom: .05rem;
  font-size: .96rem;
  line-height: 1.1;
}

.module-card-grid {
  flex: 1 1 auto;
  min-height: 8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
  margin: 0;
  padding-right: .12rem;
}

.module-card {
  min-height: 7.65rem;
  gap: .34rem;
  padding: .48rem;
}

.module-card h2 {
  margin-bottom: .12rem;
  font-size: .92rem;
  line-height: 1.1;
}

.module-card p,
.module-card-caption,
.module-card-meta span,
.module-signal {
  font-size: .7rem;
  line-height: 1.18;
}

.planning-board,
.block-planning {
  min-width: 0;
  margin: 0;
  padding: .48rem;
}

.planning-board {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.block-planning-head {
  gap: .45rem;
  margin-bottom: .36rem;
}

.block-planning-head h2 {
  margin-bottom: .04rem;
  font-size: .94rem;
}

.block-planning-head p {
  font-size: .72rem;
  line-height: 1.16;
}

.block-planning-grid--student {
  max-height: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .34rem;
  overflow: auto;
  padding-right: .08rem;
}

.block-planning-grid--student .planning-block {
  min-height: 4.35rem;
  grid-template-columns: minmax(5.4rem, .62fr) minmax(0, 1.2fr) minmax(5.7rem, .58fr) minmax(6.7rem, .65fr) auto;
  gap: .34rem;
  padding: .38rem;
}

.block-planning-time strong,
.block-planning-main h3,
.block-planning-deadline strong,
.block-planning-module strong,
.block-planning-cell strong {
  font-size: .78rem;
  line-height: 1.12;
}

.block-planning-main p,
.block-planning-time span,
.block-planning-deadline span,
.block-planning-class span,
.block-planning-module span,
.block-planning-status small,
.block-planning-cell span,
.block-planning-cell small {
  font-size: .67rem;
  line-height: 1.14;
}

body.learner-body .lesson-top {
  flex: 0 0 auto;
  margin: 0;
}

body.learner-body .lesson-top-inner {
  width: auto;
  padding: .42rem .5rem;
}

.lesson-step-line {
  grid-template-columns: auto minmax(0, 1fr);
  gap: .32rem;
}

.lesson-step-line span,
.lesson-step-line em {
  font-size: .66rem;
}

.lesson-step-line strong {
  font-size: .82rem;
}

body.learner-body .module-workspace {
  flex: 1 1 auto;
  min-height: 0;
  width: auto;
  margin: 0;
  padding: 0;
}

body.learner-body .module-step-card {
  height: 100%;
  min-height: 0;
  padding: .74rem;
}

body.learner-body .module-step-card h1 {
  margin-bottom: .28rem;
  font-size: clamp(1.28rem, 2.1vw, 1.82rem);
}

body.learner-body .slide-text p,
body.learner-body .slide-text li {
  font-size: .86rem;
  line-height: 1.34;
}

.code-panel textarea,
.dbml-textarea {
  max-height: 13rem;
}

body.learner-body .lesson-nav.step-actions {
  flex: 0 0 auto;
  width: auto;
  min-height: 2.55rem;
  margin: 0;
  padding: .34rem;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 24px rgba(23, 32, 39, .07);
  z-index: 4;
}

.step-actions,
.proof-actions.step-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
}

.proof-panel {
  display: grid;
  gap: .42rem;
  margin-top: .42rem;
}

.submission-status-panel {
  gap: .34rem;
  padding: .46rem;
}

.submission-status-panel h2,
.proof-section h2 {
  margin-bottom: .16rem;
  font-size: .94rem;
}

.submission-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .28rem;
}

.submission-status-grid > div {
  padding: .3rem .36rem;
}

.submission-status-grid strong,
.submitted-proof-list,
.review-box p {
  font-size: .72rem;
  line-height: 1.18;
}

.submission-state {
  padding: .26rem .46rem;
  font-size: .74rem;
}

.proof-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .38rem;
}

.proof-field-grid textarea,
.proof-text-fallback textarea {
  min-height: 64px;
}

.proof-actions.step-actions {
  justify-content: flex-start;
  margin: 0;
  border-top: 1px solid var(--line);
  background: rgba(255,253,247,.96);
  padding-top: .36rem;
}

.teacher-shell {
  display: flex;
  flex-direction: column;
  gap: .38rem;
}

.teacher-header {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
}

.teacher-header--overview p {
  display: none;
}

.teacher-review-hero {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
  align-items: center;
  padding: .5rem .58rem;
}

.teacher-review-hero h2 {
  margin-bottom: .1rem;
  font-size: 1rem;
  line-height: 1.1;
}

.teacher-home-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .4rem;
  overflow: hidden;
}

.teacher-home-grid .ui-action-card,
.teacher-home-grid .work-card {
  min-height: 0;
  overflow: hidden;
}

.compact-list {
  gap: .24rem;
  overflow: hidden;
}

.compact-list > div {
  padding: .28rem .34rem;
}

.compact-list strong,
.compact-list span,
.planning-row-card span,
.planning-row-card small {
  font-size: .68rem;
  line-height: 1.13;
}

.student-admin-head,
.module-admin-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
}

.student-admin-head h2,
.module-admin-head h2 {
  margin-bottom: .05rem;
  font-size: .98rem;
}

.student-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .34rem;
  justify-content: flex-end;
}

.student-admin-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: .4rem;
  overflow: hidden;
}

.student-control-grid {
  min-height: 0;
  max-height: 11.6rem;
  grid-template-columns: minmax(180px, .65fr) minmax(260px, 1.1fr) minmax(230px, .86fr);
  gap: .4rem;
  overflow: hidden;
}

.student-control-grid .teacher-filters,
.student-control-grid .teacher-import-card,
.student-control-grid .password-export-card {
  min-height: 0;
  margin: 0;
  padding: .48rem;
}

.teacher-filters label,
.teacher-card label,
.planning-form label,
.module-create-panel label {
  margin-bottom: .36rem;
}

.teacher-filters input,
.teacher-filters select,
.teacher-card input,
.teacher-card select,
.teacher-card textarea {
  border-radius: 7px;
  padding: .42rem .48rem;
  font-size: .8rem;
}

.teacher-import-card h2,
.password-export-card h2 {
  margin-bottom: .08rem;
  font-size: .94rem;
}

.teacher-import-card p,
.password-export-card p {
  margin-bottom: .28rem;
  font-size: .72rem;
  line-height: 1.18;
}

.import-example,
.teacher-import-card .advanced-import .debug-pre {
  display: none;
}

.import-textarea {
  min-height: 50px;
  max-height: 64px;
}

.student-table-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.student-table-head {
  flex: 0 0 auto;
}

.student-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.student-table-head,
.student-table-row {
  grid-template-columns: 22px 42px 80px minmax(100px, .8fr) minmax(120px, 1fr) 82px 14rem;
}

.student-table-row {
  min-height: 2.7rem;
  padding: .34rem .38rem;
}

.student-row-actions {
  gap: .28rem;
}

.student-row-actions button {
  min-height: 1.78rem;
  font-size: .7rem;
}

.module-admin-head {
  align-items: start;
}

.module-create-panel {
  display: grid;
  grid-template-columns: minmax(120px, .75fr) minmax(150px, 1fr) auto;
  gap: .34rem;
  align-items: end;
}

.module-create-panel label {
  margin: 0;
}

.module-flow-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(320px, .82fr) minmax(0, 1.45fr);
  gap: .45rem;
  overflow: hidden;
}

.module-list-panel,
.module-editor-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: .52rem;
}

.module-panel-head {
  flex: 0 0 auto;
  margin-bottom: .4rem;
}

.module-panel-head h2 {
  margin-bottom: .08rem;
  font-size: .96rem;
}

.module-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  gap: .32rem;
  padding-right: .08rem;
}

.module-list-row {
  grid-template-columns: minmax(0, 1fr);
  gap: .36rem;
  padding: .42rem;
}

.module-list-row strong {
  font-size: .8rem;
  line-height: 1.14;
}

.module-list-row span:not(.status-pill) {
  font-size: .68rem;
  line-height: 1.14;
}

.module-list-actions {
  gap: .26rem;
}

.module-list-actions .small,
.module-list-actions .button-link {
  min-height: 1.72rem;
  padding: .26rem .38rem;
  font-size: .68rem;
}

.module-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .38rem;
  overflow: auto;
}

.module-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: .38rem;
  border-top: 1px solid var(--line);
  background: rgba(255,253,247,.96);
  padding-top: .38rem;
}

.teacher-planning-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .36rem;
  padding: 0 .08rem 0 0;
}

.teacher-planning-page .planning-focus-card,
.teacher-planning-page .teacher-overview-grid,
.block-planning--teacher,
.block-planning--weeks {
  flex: 0 0 auto;
}

.block-planning-grid--teacher {
  grid-template-columns: minmax(9.6rem, .85fr) repeat(var(--planning-cols), minmax(7.6rem, 1fr));
  gap: .28rem;
  max-height: 9.2rem;
  overflow: auto;
}

.block-planning-axis,
.block-planning-class,
.block-planning-module,
.block-planning-cell {
  padding: .34rem .4rem;
}

.block-planning--weeks .planning-roster-scroll {
  max-height: 8rem;
  overflow: auto;
}

.planning-roster {
  min-width: 680px;
  gap: .22rem;
}

.planning-roster-head,
.planning-roster-row {
  grid-template-columns: 5rem repeat(5, minmax(6.2rem, 1fr));
  gap: .22rem;
}

.planning-cell {
  min-height: 2.55rem;
  padding: .28rem .34rem;
}

.planning-cell small,
.planning-cell em {
  font-size: .62rem;
}

.planning-cell strong {
  font-size: .7rem;
  line-height: 1.08;
}

.teacher-planning-page .planning-layout {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1.08fr) minmax(230px, .7fr);
  gap: .45rem;
  margin-top: 0;
}

.flowie-card,
.flowie-popover {
  z-index: 100;
  max-height: calc(100dvh - var(--dock-reserve) - .8rem);
  overflow: auto;
}

.flowie-card p {
  font-size: .84rem;
  line-height: 1.24;
}

.flowie-actions {
  position: sticky;
  bottom: 0;
  background: inherit;
}

body.screenshot-mode .teacher-planning-page,
body.screenshot-mode .student-planning,
body.screenshot-mode .student-home,
body.screenshot-mode .teacher-shell {
  overflow: hidden;
}

@media (max-width: 980px) {
  .app-shell:not(.app-shell--builder) {
    width: min(100%, calc(100vw - .6rem));
  }

  .student-home-work,
  .teacher-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-flow-grid,
  .student-control-grid,
  .teacher-planning-page .planning-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --app-topbar-height: 48px;
    --dock-height: 4.05rem;
    --dock-reserve: calc(var(--dock-height) + .7rem + env(safe-area-inset-bottom));
  }

  .app-shell:not(.app-shell--builder) {
    width: min(100%, calc(100vw - .45rem));
    padding-top: .28rem;
  }

  .app-topbar,
  .app-shell__top {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .34rem .42rem;
  }

  .bottom-dock {
    right: .3rem;
    left: .3rem;
    width: auto;
    max-width: none;
    justify-content: flex-start;
    padding: .3rem;
    transform: none;
  }

  .bottom-dock .bottom-dock-item,
  .bottom-dock.app-role-nav .app-nav-item,
  .bottom-dock.app-global-nav .app-global-nav__item {
    min-width: 3.48rem;
    min-height: 3rem;
    padding: .32rem .4rem;
    font-size: .62rem;
  }

  .entry-panel--choice {
    grid-template-columns: 1fr;
    grid-template-areas: "hero" "flowie" "secondary";
    overflow: auto;
  }

  .entry-secondary-routes,
  .student-home-work,
  .teacher-home-grid,
  .module-card-grid,
  .ui-stat-strip,
  .student-home-overview,
  .teacher-overview-grid,
  .block-planning-grid--student,
  .module-field-grid,
  .submission-status-grid,
  .proof-field-grid,
  .student-next-step,
  .teacher-review-hero,
  .student-admin-head,
  .module-admin-head,
  .module-create-panel {
    grid-template-columns: 1fr;
  }

  .student-home,
  .student-planning,
  .student-feedback,
  .teacher-shell {
    overflow: auto;
  }

  .block-planning-grid--student .planning-block,
  .lesson-step-line {
    grid-template-columns: 1fr;
  }

  .student-table-head,
  .student-table-row {
    min-width: 760px;
  }

  .flowie-card,
  .flowie-popover {
    top: auto !important;
    right: .5rem !important;
    bottom: calc(var(--dock-reserve) + .15rem) !important;
    left: .5rem !important;
    width: auto !important;
    max-width: none;
    max-height: min(46dvh, calc(100dvh - var(--dock-reserve) - var(--app-topbar-height) - .8rem));
  }
}

/* Central UI kit consolidation */
:root {
  --ui-space-1: .25rem;
  --ui-space-2: .38rem;
  --ui-space-3: .5rem;
  --ui-space-4: .65rem;
  --ui-space-5: .85rem;
  --ui-radius-sm: 6px;
  --ui-radius-md: 8px;
  --ui-radius-lg: 12px;
  --ui-radius-pill: 999px;
  --ui-border: 1px solid var(--line);
  --ui-border-strong: 1px solid var(--line-dark);
  --ui-panel-bg: rgba(255, 255, 255, .94);
  --ui-card-bg: #fff;
  --ui-card-soft-bg: rgba(255, 255, 255, .78);
  --ui-card-shadow: 0 10px 24px rgba(23, 32, 39, .055);
  --ui-button-bg: #fff;
  --ui-button-bg-hover: #eef6f1;
  --ui-button-primary-bg: var(--navy);
  --ui-dock-height: var(--dock-height);
  --ui-dock-bg: rgba(255, 255, 255, .94);
  --ui-hero-bg: linear-gradient(180deg, #fbfffc 0, #f2f8f4 100%);
  --ui-stat-bg: #fff;
  --ui-module-card-bg: #fff;
  --ui-planning-block-bg: #fbfdfd;
}

.app-panel,
.ui-panel,
.page-frame,
.ui-card,
.ui-action-card,
.ui-hero-card,
.ui-module-card,
.ui-planning-board,
.teacher-card,
.work-card,
.login-panel,
.goal-card,
.student-table-card,
.submission-card,
.planning-card,
.module-fit-card {
  border: var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-panel-bg);
  box-shadow: var(--ui-card-shadow);
}

.ui-action-card,
.work-card,
.teacher-card,
.login-panel,
.goal-card {
  padding: var(--ui-space-4);
}

.page-hero,
.ui-page-header,
.student-home-head,
.teacher-header,
.student-admin-head,
.module-admin-head {
  border: var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-card-bg);
  box-shadow: none;
}

.ui-hero-card,
.primary-focus-card,
.teacher-review-hero,
.student-next-step {
  border-color: #bfd3ca;
  background: var(--ui-hero-bg);
}

.ui-stat-strip > div,
.student-home-overview > div,
.teacher-stat-card {
  border: var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-stat-bg);
  box-shadow: none;
}

button,
.button-link,
.entry-tour-button,
.secondary-action,
.quiet-button,
a.quiet-button,
button.quiet-button {
  min-height: 2rem;
  border-radius: var(--ui-radius-sm);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

button.primary,
.entry-tour-button.primary,
.button-link.primary,
.ui-primary-action {
  border-color: var(--ui-button-primary-bg);
  background: var(--ui-button-primary-bg);
  color: #fff;
}

.secondary-action,
.entry-tour-button.secondary-action {
  border-color: #b8c9c2;
  background: #eef6f1;
  color: var(--navy);
}

.quiet-button,
a.quiet-button,
button.quiet-button {
  border-color: #d7e2de;
  background: rgba(255, 255, 255, .72);
  color: #344850;
}

.bottom-dock {
  height: var(--ui-dock-height);
  border-radius: var(--ui-radius-pill);
  background: var(--ui-dock-bg);
}

.bottom-dock .bottom-dock-item,
.bottom-dock.app-role-nav .app-nav-item,
.bottom-dock.app-global-nav .app-global-nav__item {
  border-radius: var(--ui-radius-pill);
}

.entry-panel--choice {
  border-color: var(--line);
  background: var(--ui-panel-bg);
}

.entry-primary-actions .entry-tour-button.primary {
  min-width: 11.5rem;
}

.entry-secondary-routes {
  align-content: end;
}

.entry-secondary-routes .entry-role-card {
  border-color: #dce5e2;
  background: rgba(255, 255, 255, .7);
}

.entry-secondary-routes .entry-role-card[href='/teacher'] {
  opacity: .9;
}

.login-panel .role-switch-row {
  border-top: var(--ui-border);
  padding-top: var(--ui-space-3);
}

.login-panel .role-switch-row .quiet-button[href='/teacher'] {
  opacity: .86;
}

.ui-flowie-card,
.entry-flowie-helper,
.flowie-helper-card {
  border: var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-card-bg);
  box-shadow: none;
}

.ui-module-card,
.module-card {
  border-color: #d8e0dc;
  background: var(--ui-module-card-bg);
  box-shadow: none;
}

.ui-planning-board,
.block-planning,
.planning-board {
  border: var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-panel-bg);
  box-shadow: var(--ui-card-shadow);
}

.ui-planning-block,
.planning-block,
.block-planning-item,
.planning-cell {
  border-radius: var(--ui-radius-md);
}

.ui-planning-block,
.block-planning-item {
  background: var(--ui-planning-block-bg);
}

.student-planning,
.teacher-planning-page {
  gap: var(--ui-space-2);
}

.teacher-planning-page .planning-focus-card,
.student-planning .planning-focus-card {
  border-left: 4px solid var(--good);
}

.teacher-planning-page .teacher-overview-grid,
.student-planning .student-home-overview {
  margin: 0;
}

.teacher-planning-page .planning-layout {
  padding-bottom: var(--ui-space-2);
}

@media (max-width: 700px) {
  .entry-primary-actions .entry-tour-button.primary {
    min-width: 0;
  }

  .bottom-dock {
    border-radius: 1.5rem;
  }
}

/* Product shell cohesion pass */
:root {
  --app-content-bottom-safe: calc(env(safe-area-inset-bottom) + .25rem);
  --app-readable-width: 1180px;
  --app-compact-gap: .38rem;
}

.app-card,
.app-hero,
.app-grid,
.app-metric,
.app-actionbar,
.app-progress,
.app-dock {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.app-card {
  border: var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-card-bg);
  box-shadow: var(--ui-card-shadow);
  padding: var(--ui-space-4);
}

.app-hero {
  border: var(--ui-border);
  border-left: 4px solid var(--good);
  border-radius: var(--ui-radius-md);
  background: var(--ui-hero-bg);
  padding: var(--ui-space-4);
}

.app-grid {
  display: grid;
  gap: var(--app-compact-gap);
}

.app-metric {
  border: var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-stat-bg);
  padding: .36rem .44rem;
}

.app-actionbar {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  align-items: center;
}

.app-progress .progress-track {
  height: .34rem;
}

.app-dock,
.bottom-dock {
  max-width: min(980px, calc(100vw - 1rem));
}

.app-topbar nav,
.app-topbar .app-global-nav,
.app-topbar .teacher-tabs,
.app-topbar .local-tabs,
.app-shell__top nav,
.app-shell__top .teacher-tabs,
.app-shell__top .local-tabs {
  display: none !important;
}

.role-public .bottom-dock .bottom-dock-item,
.role-student .bottom-dock .bottom-dock-item,
.role-teacher .bottom-dock .bottom-dock-item {
  letter-spacing: 0;
}

.app-shell:not(.app-shell--builder) {
  width: min(var(--app-readable-width), calc(100vw - 1rem));
}

.app-main,
.app-stage,
.app-shell__content {
  padding-bottom: var(--app-content-bottom-safe);
}

.student-home,
.student-planning,
.student-feedback,
.teacher-shell,
.entry-panel,
.learner-start {
  gap: var(--app-compact-gap);
}

.entry-panel--choice {
  min-height: 0;
  align-items: stretch;
}

.entry-hero {
  align-self: center;
}

.entry-secondary-routes {
  min-height: 0;
}

.login-choice-page {
  min-height: 0;
  align-content: center;
}

.login-panel,
.goal-card {
  max-height: 100%;
  overflow: auto;
}

.student-home-head,
.teacher-header,
.student-admin-head,
.module-admin-head {
  flex: 0 0 auto;
}

.student-home-overview,
.teacher-overview-grid,
.ui-stat-strip {
  flex: 0 0 auto;
}

.student-home-work {
  flex: 0 0 auto;
  min-height: 0;
}

.student-home .module-card-grid {
  flex: 0 0 auto;
  min-height: 8rem;
  overflow: visible;
}

.student-home .module-card {
  min-height: 7.1rem;
}

.student-home .module-card-actions {
  align-self: end;
  position: relative;
  z-index: 3;
}

.student-home .module-card-actions .primary {
  position: relative;
  z-index: 4;
}

.student-planning .block-planning--student,
.teacher-planning-page .block-planning--teacher {
  flex: 1 1 auto;
  min-height: 0;
}

.student-planning .block-planning-grid--student {
  max-height: 100%;
}

.teacher-planning-page .block-planning-grid--teacher {
  max-height: 10.4rem;
}

.teacher-planning-page .block-planning--weeks {
  flex: 0 1 auto;
  min-height: 0;
}

.teacher-planning-page .planning-layout {
  flex: 0 0 auto;
}

body.learner-body .lesson-top,
body.learner-body .lesson-nav.step-actions {
  border-radius: var(--ui-radius-md);
}

body.learner-body .module-step-card {
  overflow: auto;
}

.proof-panel {
  min-height: 0;
}

.proof-actions.step-actions {
  position: static;
  z-index: auto;
  border-top: var(--ui-border);
  background: transparent;
  padding: .38rem 0 0;
}

.proof-field-grid {
  min-height: 0;
}

.proof-section--evidence {
  min-height: 0;
}

.proof-extra-section {
  margin-top: 0;
}

.teacher-shell--overzicht .teacher-home-grid,
.teacher-shell--leerlingen .student-admin-workspace,
.teacher-shell--modules .module-flow-grid,
.teacher-shell--inzendingen .submission-list,
.teacher-shell--planning .teacher-planning-page {
  flex: 1 1 auto;
  min-height: 0;
}

.teacher-shell--leerlingen .student-control-grid {
  flex: 0 0 auto;
}

.teacher-shell--modules .module-create-panel {
  flex: 0 0 auto;
}

.teacher-shell--inzendingen .submission-list {
  overflow: auto;
}

.flowie-card,
.flowie-popover {
  max-height: calc(100dvh - var(--dock-reserve) - var(--app-topbar-height) - .9rem);
}

@media (max-width: 980px) {
  .student-home .module-card-grid,
  .student-planning .block-planning-grid--student,
  .teacher-shell--overzicht .teacher-home-grid,
  .teacher-planning-page {
    overflow: auto;
  }

  .student-home .module-card {
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .app-shell:not(.app-shell--builder) {
    width: min(100%, calc(100vw - .45rem));
  }

  .student-next-step {
    align-items: stretch;
  }

  .student-next-step button,
  .teacher-review-hero button {
    width: 100%;
  }

  .proof-actions.step-actions {
    display: grid;
  }
}

/* Python-focused happy-flow cleanup */
.flowie-card,
.flowie-popover {
  width: min(288px, calc(100vw - 1rem));
  padding: .52rem .58rem .56rem;
}

.flowie-card__head {
  grid-template-columns: 1.55rem minmax(0, 1fr) 1.35rem;
  gap: .38rem;
  margin-bottom: .34rem;
  padding-bottom: .3rem;
}

.flowie-avatar {
  width: 1.55rem;
  height: 1.55rem;
}

.flowie-card__head strong {
  font-size: .82rem;
}

.flowie-meta {
  display: none;
}

.flowie-card p {
  margin-bottom: .42rem;
  font-size: .78rem;
  line-height: 1.22;
}

.flowie-actions {
  gap: .3rem;
  padding-top: .34rem;
}

.flowie-actions button {
  min-height: 1.75rem;
  padding: .26rem .42rem;
  font-size: .76rem;
}

.flowie-actions .flowie-next {
  min-width: 5.8rem;
}

.student-home,
.student-planning,
.teacher-shell {
  gap: .28rem;
}

.student-home-work {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-home-work .flowie-helper-card {
  display: none;
}

.assignment-preview {
  gap: .55rem;
  margin-top: .65rem;
}

.assignment-step {
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: .42rem;
  padding: .24rem 0;
}

.assignment-step > span {
  width: 1.22rem;
  height: 1.22rem;
  font-size: .66rem;
}

.assignment-step p {
  font-size: .76rem;
  line-height: 1.2;
}

.assignment-code-preview pre {
  max-height: 8rem;
}

body.screenshot-mode .teacher-planning-page .planning-layout {
  display: none;
}

body.screenshot-mode .teacher-planning-page .block-planning--weeks {
  flex: 0 0 auto;
}

body.screenshot-mode .teacher-planning-page .block-planning-grid--teacher {
  max-height: 12rem;
}

body.screenshot-mode .teacher-import-card .advanced-import,
body.screenshot-mode .password-export-card {
  display: none;
}

body.screenshot-mode .student-control-grid {
  grid-template-columns: minmax(180px, .7fr) minmax(320px, 1.4fr);
  max-height: 9rem;
}

body.screenshot-mode .teacher-shell--leerlingen .student-admin-workspace {
  grid-template-rows: auto minmax(0, 1fr);
}

/* Compact Python-focused entry screen */
body.entry-body .app-shell--entry {
  width: min(1240px, calc(100vw - 1rem));
}

body.entry-body .app-shell__content {
  display: grid;
  align-items: start;
  padding-top: .34rem;
  padding-bottom: calc(.38rem + env(safe-area-inset-bottom));
}

body.entry-body .entry-panel {
  height: auto;
  min-height: 0;
}

body.entry-body .entry-panel--choice {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 400px);
  grid-template-areas:
    "hero preview"
    "flowie preview"
    "secondary preview";
  grid-template-rows: auto auto auto;
  align-content: center;
  max-width: 1200px;
  margin-inline: auto;
  gap: .68rem .95rem;
  border-color: #dce6e3;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(242, 248, 245, .92));
  padding: clamp(.92rem, 1.8vw, 1.2rem);
  box-shadow: 0 14px 32px rgba(23, 32, 39, .075);
}

body.entry-body .entry-panel--choice::before,
body.entry-body .entry-panel--choice::after {
  display: none;
}

body.entry-body .entry-panel--choice .entry-hero {
  grid-area: hero;
  align-self: end;
  max-width: 660px;
}

body.entry-body .entry-panel--choice .kicker {
  margin-bottom: .28rem;
  color: #2f6f4e;
  font-size: .82rem;
  letter-spacing: 0;
}

.entry-zone-label {
  margin: 0 0 .58rem;
  color: #2f6f4e;
  font-size: .78rem;
  font-weight: 850;
  line-height: 1.1;
}

body.entry-body .entry-panel--choice h1 {
  max-width: 660px;
  margin-bottom: .42rem;
  font-size: clamp(2.35rem, 4.5vw, 3.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

body.entry-body .entry-panel--choice .entry-subtitle {
  max-width: 470px;
  color: #344850;
  font-size: clamp(1.08rem, 1.75vw, 1.26rem);
  font-weight: 780;
  line-height: 1.34;
}

body.entry-body .entry-primary-actions {
  margin-top: .82rem;
}

body.entry-body .entry-primary-actions .entry-tour-button.primary {
  min-width: 13.2rem;
  min-height: 2.92rem;
  border-radius: 10px;
  padding-inline: 1.25rem;
  font-size: 1.08rem;
  font-weight: 850;
}

.flowie-companion {
  width: min(590px, 100%);
  position: relative;
  isolation: isolate;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(5.25rem, 6.8rem) minmax(0, 1fr);
  gap: .18rem;
  align-items: center;
  border: 1px solid #bdd9cf;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(238, 249, 243, .95) 58%, rgba(255, 249, 224, .78));
  padding: .78rem .82rem .78rem .28rem;
  box-shadow: 0 12px 28px rgba(33, 104, 73, .1), 0 0 0 4px rgba(55, 132, 92, .045);
}

.flowie-companion--home {
  margin-top: 0;
}

.flowie-companion::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #2f6f4e, #e6bf45);
}

.flowie-companion__buddy {
  width: 6.8rem;
  height: 6.2rem;
  position: relative;
  z-index: 2;
  margin: -.45rem 0 -.28rem -.78rem;
  transform-style: preserve-3d;
  perspective: 420px;
  animation: flowieCompanionFloat 5.4s ease-in-out infinite;
}

.flowie-companion__buddy::after {
  content: "";
  position: absolute;
  right: .78rem;
  bottom: .18rem;
  left: 1.15rem;
  height: .62rem;
  border-radius: 999px;
  background: rgba(34, 97, 73, .18);
  filter: blur(5px);
  transform: rotate(-3deg);
}

.flowie-companion__orb {
  width: 5.35rem;
  height: 5.35rem;
  position: absolute;
  top: .24rem;
  left: .82rem;
  border: 1px solid #89c4ad;
  border-radius: 50%;
  background:
    radial-gradient(circle at 29% 22%, #fff 0 11%, rgba(255, 255, 255, .84) 12% 22%, transparent 23%),
    radial-gradient(circle at 72% 76%, rgba(42, 127, 92, .28) 0 22%, transparent 36%),
    linear-gradient(145deg, #f1fff7 0%, #a9e4ca 48%, #52ac7b 100%);
  box-shadow:
    inset 10px 12px 15px rgba(255, 255, 255, .8),
    inset -14px -18px 24px rgba(34, 102, 76, .26),
    0 17px 28px rgba(34, 97, 73, .24);
  transform: rotateX(7deg) rotateY(-12deg) rotateZ(-4deg);
  transform-origin: 50% 62%;
}

.flowie-companion__orb::before {
  content: "";
  position: absolute;
  inset: .72rem auto auto .86rem;
  width: 1.62rem;
  height: .9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  transform: rotate(-24deg);
}

.flowie-companion__orb::after {
  content: "";
  position: absolute;
  right: .6rem;
  bottom: .74rem;
  width: 1.3rem;
  height: .62rem;
  border-radius: 999px;
  background: rgba(255, 239, 168, .42);
  transform: rotate(-8deg);
}

.flowie-companion__face {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.flowie-companion__face::before {
  content: "";
  position: absolute;
  top: 2.06rem;
  left: 1.62rem;
  width: .42rem;
  height: .5rem;
  border-radius: 999px;
  background: #12384d;
  box-shadow: 1.42rem .04rem 0 #12384d;
  animation: flowieCompanionBlink 7s ease-in-out infinite;
}

.flowie-companion__face::after {
  content: "";
  position: absolute;
  left: 2.08rem;
  top: 3rem;
  width: 1.04rem;
  height: .46rem;
  border-bottom: 2px solid #12384d;
  border-radius: 0 0 999px 999px;
}

.flowie-companion__spark {
  width: .82rem;
  height: .82rem;
  position: absolute;
  top: .28rem;
  right: .86rem;
  z-index: 3;
  color: #d7a923;
  animation: flowieCompanionSpark 3.2s ease-in-out infinite;
}

.flowie-companion__spark::before,
.flowie-companion__spark::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: .82rem;
  height: .16rem;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.flowie-companion__spark::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.flowie-companion__bubble {
  min-width: 0;
  position: relative;
  z-index: 1;
  border: 1px solid #cfe0db;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  padding: .72rem .78rem;
  box-shadow: 0 8px 18px rgba(23, 50, 44, .06);
}

.flowie-companion__bubble::before {
  content: "";
  position: absolute;
  top: 1.62rem;
  left: -.48rem;
  width: .86rem;
  height: .86rem;
  border: solid #cfe0db;
  border-width: 0 0 1px 1px;
  background: rgba(255, 255, 255, .82);
  transform: rotate(45deg);
}

.flowie-companion__eyebrow {
  margin: 0 0 .14rem;
  color: #2f6f4e;
  font-size: .7rem;
  font-weight: 850;
  line-height: 1;
}

.flowie-companion__bubble strong {
  display: block;
  margin-bottom: .14rem;
  color: var(--ink);
  font: 850 1rem/1.18 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.flowie-companion__bubble > p:not(.flowie-companion__eyebrow) {
  margin: 0;
  color: #40515a;
  font-size: .9rem;
  font-weight: 680;
  line-height: 1.34;
}

.flowie-companion__chips,
.game-chip-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .34rem;
  align-items: center;
  margin-top: .54rem;
}

.game-chip,
.mission-chip,
.badge-chip,
.xp-chip {
  min-width: 0;
  max-width: 100%;
  min-height: 1.54rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfe0db;
  border-radius: 999px;
  background: #f7fbf8;
  color: #344850;
  padding: .24rem .52rem;
  font: 820 .74rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center;
  white-space: nowrap;
}

.game-chip--mission,
.mission-chip {
  border-color: #b8d6ca;
  background: #eef8f3;
  color: #2f6f4e;
}

.game-chip--badge,
.badge-chip {
  border-color: #dfce8c;
  background: #fff7d7;
  color: #6f5511;
}

.game-chip--xp,
.xp-chip {
  border-color: #b9d4c6;
  background: #e9f6ef;
  color: #2f6f4e;
}

.game-chip--steps {
  border-color: #cfdbe4;
  background: #f4f8fb;
  color: #344850;
}

.entry-preview-card {
  grid-area: preview;
  align-self: center;
  position: relative;
  max-width: 380px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d6e2de;
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  padding: .9rem .95rem .98rem;
  box-shadow: 0 12px 24px rgba(23, 32, 39, .065);
}

.entry-preview-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: .22rem;
  background: #2f6f4e;
}

.entry-preview-top {
  display: flex;
  gap: .45rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .62rem;
}

.entry-preview-icon {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid #c5d6d0;
  border-radius: 8px;
  background: #edf6f1;
  color: #2f6f4e;
  font: 800 1rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.entry-preview-card .status-pill {
  min-height: 1.42rem;
  border-color: #cadad4;
  background: #edf6f1;
  color: #2f6f4e;
  padding-inline: .46rem;
  font-size: .64rem;
  opacity: .86;
}

.entry-preview-card h2 {
  margin: 0 0 .36rem;
  color: var(--ink);
  font-size: 1.38rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.entry-preview-card p {
  margin: 0 0 .66rem;
  color: #40515a;
  font-size: .98rem;
  line-height: 1.36;
}

@keyframes flowieCompanionFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

@keyframes flowieCompanionBlink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }

  95% {
    transform: scaleY(.12);
  }
}

@keyframes flowieCompanionSpark {
  0%,
  100% {
    opacity: .68;
    transform: scale(.86) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.08) rotate(12deg);
  }
}

body.entry-body:not(.flowie-tour-active) .flowie-tour,
body.entry-body:not(.flowie-tour-active) .flowie-popover {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .flowie-companion__buddy,
  .flowie-companion__face::before,
  .flowie-companion__spark {
    animation: none;
  }
}

.entry-preview-list {
  display: grid;
  gap: .48rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-preview-list li {
  display: grid;
  grid-template-columns: 1.62rem minmax(0, 1fr);
  gap: .46rem;
  align-items: center;
  color: #26363d;
  font-size: .95rem;
  font-weight: 760;
  line-height: 1.2;
}

.entry-preview-list span {
  width: 1.48rem;
  height: 1.48rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid #2f6f4e;
  border-radius: 999px;
  background: #2f6f4e;
  color: #fff;
  font-size: .76rem;
  font-weight: 800;
  box-shadow: 0 0 0 4px #e8f4ec;
}

body.entry-body .entry-secondary-routes {
  grid-area: secondary;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: .46rem;
  padding-top: 0;
}

.entry-role-chip {
  min-height: 2.42rem;
  display: inline-flex;
  gap: .36rem;
  align-items: center;
  border: 1px solid #d5e1dd;
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  color: #344850;
  padding: .52rem .78rem;
  font: 760 .9rem/1 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.entry-role-chip:hover {
  border-color: #b8c9c2;
  background: #fff;
  color: var(--navy);
}

.entry-role-chip .entry-role-icon {
  width: 1.08rem;
  height: 1.08rem;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #2f6f4e;
}

.entry-role-chip .entry-role-icon svg {
  width: 1.08rem;
  height: 1.08rem;
  display: block;
}

.entry-role-chip .entry-role-copy,
.entry-role-chip .entry-role-copy strong {
  display: inline;
  min-width: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.entry-role-chip--help {
  background: #f2f8f5;
}

body.entry-body .flowie-card,
body.entry-body .flowie-popover {
  width: min(250px, calc(100vw - 1rem));
  padding: .5rem .56rem .56rem;
}

body.entry-body .flowie-card p {
  font-size: .8rem;
  line-height: 1.26;
}

@media (min-width: 901px) {
  body.entry-body .app-shell--entry {
    --dock-reserve: 0rem;
    padding-bottom: .55rem;
  }

  body.entry-body .bottom-dock-spacer,
  body.entry-body .bottom-dock.app-global-nav {
    display: none;
  }
}

@media (max-width: 900px) {
  body.entry-body .app-shell--entry {
    width: min(100%, calc(100vw - .75rem));
  }

  body.entry-body .entry-panel--choice {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "flowie"
      "preview"
      "secondary";
    align-content: start;
    width: 100%;
    max-width: 580px;
    max-height: 100%;
    gap: .62rem;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-padding-bottom: calc(var(--dock-reserve) + env(safe-area-inset-bottom));
  }

  body.entry-body .entry-panel--choice .entry-hero,
  body.entry-body .entry-preview-card {
    max-width: none;
    align-self: stretch;
  }

  .flowie-companion {
    width: 100%;
  }
}

@media (max-width: 560px) {
  body.entry-body .app-shell--entry {
    --app-topbar-height: 44px;
    --dock-height: 3.58rem;
    --dock-reserve: calc(var(--dock-height) + .78rem + env(safe-area-inset-bottom));
    gap: .28rem;
    padding-top: .22rem;
  }

  body.entry-body .app-topbar,
  body.entry-body .app-shell__top {
    padding: .28rem .36rem;
  }

  body.entry-body .app-mark {
    width: 1.84rem;
    height: 1.84rem;
    border-radius: 8px;
  }

  body.entry-body .app-brand strong {
    font-size: .9rem;
  }

  body.entry-body .app-brand span,
  body.entry-body .app-identity span,
  body.entry-body .app-account-link {
    font-size: .68rem;
  }

  body.entry-body .app-identity {
    max-width: 8rem;
    padding: .24rem .36rem;
  }

  body.entry-body .app-shell__content {
    padding-top: .24rem;
    padding-bottom: calc(.28rem + env(safe-area-inset-bottom));
  }

  body.entry-body .entry-panel--choice {
    gap: .5rem;
    padding: .64rem;
  }

  body.entry-body .entry-panel--choice .kicker {
    margin-bottom: .18rem;
    font-size: .72rem;
  }

  body.entry-body .entry-panel--choice h1 {
    margin-bottom: .26rem;
    font-size: clamp(2.12rem, 9vw, 2.38rem);
    line-height: 1.03;
  }

  body.entry-body .entry-panel--choice .entry-subtitle {
    font-size: .96rem;
    line-height: 1.28;
  }

  body.entry-body .entry-primary-actions {
    margin-top: .58rem;
  }

  body.entry-body .entry-primary-actions .entry-tour-button.primary {
    width: 100%;
    min-width: 0;
    min-height: 2.72rem;
    font-size: .98rem;
  }

  .flowie-companion {
    grid-template-columns: 3.72rem minmax(0, 1fr);
    gap: .22rem;
    overflow: hidden;
    padding: .42rem .44rem .42rem .3rem;
  }

  .flowie-companion__buddy {
    width: 3.72rem;
    height: 3.48rem;
    margin: -.1rem 0 -.08rem -.22rem;
  }

  .flowie-companion__orb {
    width: 3.08rem;
    height: 3.08rem;
    top: .18rem;
    left: .34rem;
  }

  .flowie-companion__orb::before {
    inset: .44rem auto auto .52rem;
    width: .92rem;
    height: .52rem;
  }

  .flowie-companion__orb::after {
    right: .36rem;
    bottom: .46rem;
    width: .76rem;
    height: .38rem;
  }

  .flowie-companion__face::before {
    top: 1.18rem;
    left: .92rem;
    width: .24rem;
    height: .3rem;
    box-shadow: .84rem .03rem 0 #12384d;
  }

  .flowie-companion__face::after {
    left: 1.16rem;
    top: 1.7rem;
    width: .62rem;
    height: .34rem;
    border-bottom-width: 1.5px;
  }

  .flowie-companion__spark {
    width: .68rem;
    height: .68rem;
    top: .08rem;
    right: .46rem;
  }

  .flowie-companion__spark::before,
  .flowie-companion__spark::after {
    width: .68rem;
    height: .13rem;
  }

  .flowie-companion__bubble {
    padding: .46rem .5rem;
  }

  .flowie-companion__bubble::before {
    display: block;
    top: .92rem;
    left: -.3rem;
    width: .58rem;
    height: .58rem;
  }

  .flowie-companion__eyebrow {
    margin-bottom: .1rem;
    font-size: .62rem;
  }

  .flowie-companion__bubble strong {
    margin-bottom: .1rem;
    font-size: .84rem;
  }

  .flowie-companion__bubble > p:not(.flowie-companion__eyebrow) {
    font-size: .76rem;
    line-height: 1.22;
  }

  .flowie-companion__chips {
    gap: .22rem;
    margin-top: .34rem;
  }

  .game-chip,
  .mission-chip,
  .badge-chip,
  .xp-chip {
    min-height: 1.14rem;
    padding: .16rem .32rem;
    font-size: .61rem;
  }

  .entry-zone-label {
    margin-bottom: .34rem;
    font-size: .7rem;
  }

  .entry-preview-card {
    padding: .72rem .74rem .78rem;
  }

  .entry-preview-top,
  .entry-preview-card > p:not(.entry-zone-label) {
    display: none;
  }

  .entry-preview-card h2 {
    margin-bottom: .42rem;
    font-size: 1.2rem;
  }

  .entry-preview-list li {
    font-size: .87rem;
  }

  .entry-preview-list {
    gap: .38rem;
  }

  .entry-preview-list li {
    grid-template-columns: 1.44rem minmax(0, 1fr);
    gap: .4rem;
  }

  .entry-preview-list span {
    width: 1.32rem;
    height: 1.32rem;
    font-size: .68rem;
    box-shadow: 0 0 0 3px #e8f4ec;
  }

  body.entry-body .entry-secondary-routes {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .32rem;
  }

  .entry-role-chip {
    width: auto;
    min-width: 0;
    min-height: 2.18rem;
    justify-content: center;
    padding: .4rem .32rem;
    font-size: .78rem;
  }

  body.entry-body .bottom-dock {
    right: auto;
    left: 50%;
    width: min(24rem, calc(100vw - .75rem));
    max-width: min(24rem, calc(100vw - .75rem));
    justify-content: center;
    gap: .22rem;
    border-radius: 1.35rem;
    padding: .28rem;
    transform: translateX(-50%);
  }

  body.entry-body .bottom-dock .bottom-dock-item,
  body.entry-body .bottom-dock.app-global-nav .app-global-nav__item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.78rem;
    padding: .3rem .2rem;
    font-size: .6rem;
  }
}

/* Public home UI-kit foundation */
:root {
  --ui-bg: #f4f7f2;
  --ui-surface: #ffffff;
  --ui-surface-soft: #eef6f1;
  --ui-ink: #172027;
  --ui-muted: #52666d;
  --ui-accent: #2f6f4e;
  --ui-accent-soft: #e7f4ed;
  --ui-warning: #d7a923;

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 2.75rem;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  --shadow-soft: 0 8px 20px rgba(23, 32, 39, .06);
  --shadow-card: 0 14px 32px rgba(23, 32, 39, .08);
  --shadow-float: 0 20px 52px rgba(23, 32, 39, .16);

  --text-sm: .78rem;
  --text-md: .95rem;
  --text-lg: 1.12rem;
  --text-xl: 1.38rem;
  --text-hero-mobile: clamp(2.125rem, 9.4vw, 2.5rem);
  --text-hero-desktop: clamp(3.2rem, 5vw, 4.15rem);
}

.ui-shell,
.ui-topbar,
.ui-card,
.ui-button,
.ui-chip {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ui-shell {
  min-width: 0;
}

.ui-topbar {
  border: 1px solid rgba(184, 201, 194, .9);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.ui-card {
  min-width: 0;
  border: 1px solid #d6e2de;
  border-radius: var(--radius-md);
  background: var(--ui-surface);
  box-shadow: var(--shadow-card);
}

.ui-card--hero {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ui-card--lesson {
  background: linear-gradient(180deg, var(--ui-surface) 0, #f9fcfa 100%);
}

.ui-button {
  min-width: 0;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbdad4;
  border-radius: var(--radius-md);
  background: var(--ui-surface);
  color: var(--ui-ink);
  padding: .65rem .9rem;
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.ui-button:hover {
  border-color: #adc5ba;
  background: #f8fbf9;
  color: var(--ui-ink);
}

.ui-button--primary,
.ui-button--primary:visited {
  border-color: var(--ui-ink);
  background: var(--ui-ink);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.ui-button--primary:hover {
  border-color: #22303a;
  background: #22303a;
  color: #fff;
}

.ui-chip {
  min-width: 0;
  min-height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbdad4;
  border-radius: var(--radius-pill);
  background: #f7fbf8;
  color: var(--ui-muted);
  padding: .25rem .55rem;
  font-size: .74rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.ui-chip--accent {
  border-color: #b8d6ca;
  background: var(--ui-accent-soft);
  color: var(--ui-accent);
}

.ui-chip--xp {
  border-color: #accdbc;
  background: #e9f6ef;
  color: var(--ui-accent);
}

.ui-chip--badge {
  border-color: #dfce8c;
  background: #fff7d7;
  color: #6f5511;
}

body.entry-body {
  height: auto;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .86) 0, rgba(255, 255, 255, .4) 42%, transparent 100%),
    var(--ui-bg);
  color: var(--ui-ink);
}

body.entry-body .ui-shell.app-shell--entry {
  --app-topbar-height: 48px;
  --dock-height: 3.58rem;
  --dock-reserve: calc(var(--dock-height) + var(--space-4) + env(safe-area-inset-bottom));
  width: min(100%, 430px);
  max-width: 430px;
  height: auto;
  max-height: none;
  min-height: 100dvh;
  grid-template-rows: auto auto auto;
  gap: var(--space-3);
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) 0;
  overflow: visible;
}

body.entry-body .ui-topbar {
  grid-row: auto;
  min-height: 44px;
  height: auto;
  max-height: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  padding: .42rem .5rem;
  overflow: hidden;
}

body.entry-body .app-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}

body.entry-body .app-mark {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  background: var(--ui-ink);
}

body.entry-body .app-brand strong {
  color: var(--ui-ink);
  font-size: .92rem;
  line-height: 1.05;
}

body.entry-body .app-brand span,
body.entry-body .app-identity span,
body.entry-body .app-account-link {
  color: var(--ui-muted);
  font-size: .68rem;
  line-height: 1.1;
}

body.entry-body .app-identity {
  max-width: 7.6rem;
  border-color: #d6e2de;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .78);
  padding: .25rem .38rem;
  box-shadow: none;
}

body.entry-body .app-identity strong {
  color: var(--ui-ink);
  font-size: .66rem;
  line-height: 1;
}

body.entry-body .app-shell__content {
  grid-row: auto;
  height: auto;
  min-height: 0;
  display: block;
  overflow: visible;
  padding: 0 0 calc(var(--space-4) + env(safe-area-inset-bottom));
}

body.entry-body .entry-panel.ui-card--hero {
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "hero"
    "flowie"
    "lesson"
    "secondary";
  gap: var(--space-3);
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

body.entry-body .entry-panel.ui-card--hero::before,
body.entry-body .entry-panel.ui-card--hero::after {
  display: none;
}

body.entry-body .entry-hero {
  grid-area: hero;
  max-width: none;
  align-self: start;
}

body.entry-body .entry-hero .kicker {
  margin: 0 0 var(--space-1);
  color: var(--ui-accent);
  font-size: var(--text-sm);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

body.entry-body .entry-hero h1 {
  max-width: 11ch;
  margin: 0 0 var(--space-2);
  color: var(--ui-ink);
  font-size: var(--text-hero-mobile);
  line-height: 1.02;
  letter-spacing: 0;
}

body.entry-body .entry-subtitle {
  max-width: 24rem;
  margin: 0;
  color: var(--ui-muted);
  font-size: var(--text-lg);
  font-weight: 760;
  line-height: 1.28;
}

body.entry-body .entry-primary-actions {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

body.entry-body .entry-primary-actions .ui-button--primary {
  width: 100%;
  min-height: 2.9rem;
  border-color: var(--ui-ink);
  border-radius: var(--radius-md);
  background: var(--ui-ink);
  color: #fff;
  padding-inline: var(--space-4);
  font-size: 1rem;
}

body.entry-body .flowie-companion.flowie-companion--home {
  grid-area: flowie;
  width: 100%;
  max-width: none;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  overflow: visible;
  border-color: #bdd9cf;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(238, 249, 243, .96) 62%, rgba(255, 247, 215, .78));
  padding: .62rem .66rem .62rem .45rem;
  box-shadow: var(--shadow-soft);
}

body.entry-body .flowie-companion.flowie-companion--home::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: linear-gradient(180deg, var(--ui-accent), var(--ui-warning));
}

body.entry-body .flowie-companion__buddy {
  width: 4rem;
  height: 3.9rem;
  margin: -.08rem 0 -.08rem -.18rem;
}

body.entry-body .flowie-companion__buddy::after {
  right: .42rem;
  bottom: .16rem;
  left: .56rem;
  height: .44rem;
}

body.entry-body .flowie-companion__orb {
  width: 3.3rem;
  height: 3.3rem;
  top: .18rem;
  left: .38rem;
}

body.entry-body .flowie-companion__orb::before {
  inset: .48rem auto auto .54rem;
  width: .98rem;
  height: .54rem;
}

body.entry-body .flowie-companion__orb::after {
  right: .36rem;
  bottom: .48rem;
  width: .8rem;
  height: .4rem;
}

body.entry-body .flowie-companion__face::before {
  top: 1.25rem;
  left: .98rem;
  width: .26rem;
  height: .32rem;
  box-shadow: .9rem .03rem 0 #12384d;
}

body.entry-body .flowie-companion__face::after {
  left: 1.24rem;
  top: 1.82rem;
  width: .66rem;
  height: .34rem;
  border-bottom-width: 1.5px;
}

body.entry-body .flowie-companion__spark {
  width: .62rem;
  height: .62rem;
  top: .04rem;
  right: .42rem;
  color: var(--ui-warning);
}

body.entry-body .flowie-companion__spark::before,
body.entry-body .flowie-companion__spark::after {
  width: .62rem;
  height: .13rem;
}

body.entry-body .flowie-companion__bubble {
  min-width: 0;
  border-color: #cfe0db;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .84);
  padding: .58rem .62rem;
  box-shadow: none;
}

body.entry-body .flowie-companion__bubble::before {
  top: .9rem;
  left: -.31rem;
  width: .58rem;
  height: .58rem;
  background: rgba(255, 255, 255, .84);
}

body.entry-body .flowie-companion__eyebrow {
  margin: 0 0 .1rem;
  color: var(--ui-accent);
  font-size: .64rem;
  font-weight: 900;
  line-height: 1;
}

body.entry-body .flowie-companion__bubble strong {
  margin-bottom: .1rem;
  color: var(--ui-ink);
  font-size: .86rem;
  line-height: 1.14;
}

body.entry-body .flowie-companion__bubble > p:not(.flowie-companion__eyebrow) {
  margin: 0;
  color: var(--ui-muted);
  font-size: .78rem;
  line-height: 1.24;
}

body.entry-body .flowie-companion__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .24rem;
  align-items: center;
  margin-top: .42rem;
}

body.entry-body .flowie-companion__chips .ui-chip {
  min-height: 1.18rem;
  padding: .16rem .36rem;
  font-size: .62rem;
}

body.entry-body .entry-preview-card.ui-card--lesson {
  grid-area: lesson;
  width: 100%;
  max-width: none;
  align-self: start;
  position: relative;
  overflow: hidden;
  border-color: #d6e2de;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--ui-surface) 0, #f9fcfa 100%);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}

body.entry-body .entry-preview-card.ui-card--lesson::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--ui-accent);
}

body.entry-body .entry-zone-label {
  margin: 0 0 var(--space-3);
  color: var(--ui-accent);
  font-size: var(--text-sm);
  font-weight: 900;
  line-height: 1.05;
}

body.entry-body .entry-preview-card h2 {
  margin: 0 0 var(--space-3);
  color: var(--ui-ink);
  font-size: var(--text-xl);
  line-height: 1.12;
  letter-spacing: 0;
}

body.entry-body .entry-preview-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.entry-body .entry-preview-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 1.52rem minmax(0, 1fr);
  gap: .48rem;
  align-items: center;
  color: #26363d;
  font-size: var(--text-md);
  font-weight: 780;
  line-height: 1.22;
}

body.entry-body .entry-preview-list span {
  width: 1.4rem;
  height: 1.4rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ui-accent);
  border-radius: var(--radius-pill);
  background: var(--ui-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 850;
  box-shadow: 0 0 0 3px var(--ui-accent-soft);
}

body.entry-body .entry-secondary-routes {
  grid-area: secondary;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  padding: 0;
}

body.entry-body .entry-role-chip {
  width: 100%;
  min-height: 2.28rem;
  gap: .32rem;
  border-color: #cbdad4;
  border-radius: var(--radius-pill);
  background: var(--ui-surface);
  color: var(--ui-muted);
  padding: .44rem .32rem;
  font-size: .78rem;
  white-space: nowrap;
}

body.entry-body .entry-role-chip .entry-role-icon,
body.entry-body .entry-role-chip .entry-role-icon svg {
  width: 1.02rem;
  height: 1.02rem;
}

body.entry-body .entry-role-chip .entry-role-icon {
  color: var(--ui-accent);
}

body.entry-body .entry-role-chip--help {
  background: var(--ui-surface-soft);
}

body.entry-body .bottom-dock-spacer {
  grid-row: auto;
  display: block;
  height: var(--dock-reserve);
  min-height: var(--dock-reserve);
}

body.entry-body .bottom-dock.app-global-nav {
  right: auto;
  bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  left: 50%;
  width: min(24rem, calc(100vw - var(--space-4)));
  max-width: min(24rem, calc(100vw - var(--space-4)));
  height: var(--dock-height);
  min-height: 0;
  max-height: var(--dock-height);
  display: flex;
  justify-content: center;
  gap: .22rem;
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, .94);
  padding: .28rem;
  box-shadow: var(--shadow-float);
  transform: translateX(-50%);
}

body.entry-body .bottom-dock.app-global-nav .app-global-nav__item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.78rem;
  border-radius: 1rem;
  padding: .3rem .2rem;
  font-size: .6rem;
}

body.entry-body .flowie-card,
body.entry-body .flowie-popover {
  width: min(250px, calc(100vw - var(--space-4)));
  padding: .5rem .56rem .56rem;
}

body.entry-body .flowie-card p {
  font-size: .8rem;
  line-height: 1.26;
}

body.entry-body:not(.flowie-tour-active) .flowie-tour,
body.entry-body:not(.flowie-tour-active) .flowie-popover {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  body.entry-body .flowie-companion__buddy,
  body.entry-body .flowie-companion__face::before,
  body.entry-body .flowie-companion__spark {
    animation: none;
  }
}

@media (min-width: 901px) {
  body.entry-body .ui-shell.app-shell--entry {
    --dock-reserve: 0rem;
    width: min(100%, 1260px);
    max-width: 1260px;
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--space-5);
    padding: var(--space-5);
  }

  body.entry-body .app-shell__content {
    display: grid;
    align-items: center;
    padding-bottom: 0;
  }

  body.entry-body .entry-panel.ui-card--hero {
    max-width: 1210px;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
    grid-template-areas:
      "hero lesson"
      "flowie lesson"
      "secondary lesson";
    grid-template-rows: auto auto auto;
    gap: var(--space-5) var(--space-6);
    align-content: center;
    margin-inline: auto;
  }

  body.entry-body .entry-hero {
    align-self: end;
  }

  body.entry-body .entry-hero h1 {
    max-width: 13ch;
    font-size: var(--text-hero-desktop);
  }

  body.entry-body .entry-subtitle {
    max-width: 31rem;
    font-size: 1.22rem;
  }

  body.entry-body .entry-primary-actions {
    max-width: 18rem;
  }

  body.entry-body .flowie-companion.flowie-companion--home {
    max-width: 620px;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: var(--space-3);
    padding: .78rem .82rem .78rem .42rem;
  }

  body.entry-body .flowie-companion__buddy {
    width: 6rem;
    height: 5.6rem;
    margin: -.28rem 0 -.18rem -.42rem;
  }

  body.entry-body .flowie-companion__buddy::after {
    right: .7rem;
    bottom: .18rem;
    left: .95rem;
    height: .58rem;
  }

  body.entry-body .flowie-companion__orb {
    width: 4.82rem;
    height: 4.82rem;
    top: .24rem;
    left: .72rem;
  }

  body.entry-body .flowie-companion__orb::before {
    inset: .66rem auto auto .78rem;
    width: 1.42rem;
    height: .78rem;
  }

  body.entry-body .flowie-companion__orb::after {
    right: .55rem;
    bottom: .68rem;
    width: 1.15rem;
    height: .56rem;
  }

  body.entry-body .flowie-companion__face::before {
    top: 1.84rem;
    left: 1.46rem;
    width: .38rem;
    height: .46rem;
    box-shadow: 1.28rem .04rem 0 #12384d;
  }

  body.entry-body .flowie-companion__face::after {
    left: 1.88rem;
    top: 2.72rem;
    width: .94rem;
    height: .42rem;
    border-bottom-width: 2px;
  }

  body.entry-body .flowie-companion__spark {
    width: .78rem;
    height: .78rem;
    top: .18rem;
    right: .8rem;
  }

  body.entry-body .flowie-companion__spark::before,
  body.entry-body .flowie-companion__spark::after {
    width: .78rem;
    height: .15rem;
  }

  body.entry-body .flowie-companion__bubble {
    padding: .72rem .78rem;
  }

  body.entry-body .flowie-companion__bubble::before {
    top: 1.48rem;
    left: -.45rem;
    width: .82rem;
    height: .82rem;
  }

  body.entry-body .flowie-companion__eyebrow {
    font-size: .7rem;
  }

  body.entry-body .flowie-companion__bubble strong {
    font-size: 1rem;
  }

  body.entry-body .flowie-companion__bubble > p:not(.flowie-companion__eyebrow) {
    font-size: .9rem;
    line-height: 1.32;
  }

  body.entry-body .flowie-companion__chips .ui-chip {
    min-height: 1.5rem;
    padding: .24rem .52rem;
    font-size: .74rem;
  }

  body.entry-body .entry-preview-card.ui-card--lesson {
    align-self: center;
    padding: var(--space-5);
  }

  body.entry-body .entry-secondary-routes {
    max-width: 24rem;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  body.entry-body .entry-role-chip {
    width: auto;
    padding-inline: .78rem;
  }

  body.entry-body .bottom-dock-spacer,
  body.entry-body .bottom-dock.app-global-nav {
    display: none;
  }
}

/* Public home NPC companion */
body.entry-body .entry-panel.ui-card--hero {
  position: relative;
}

body.entry-body .flowie-companion.flowie-companion--home {
  width: 100%;
  max-width: 19rem;
  display: block;
  align-self: start;
  justify-self: start;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

body.entry-body .flowie-companion.flowie-companion--home::before {
  display: none;
}

.flowie-companion__trigger {
  appearance: none;
  width: auto;
  max-width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: .54rem;
  border: 1px solid #cbdad4;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .9);
  color: var(--ui-ink);
  padding: .32rem .68rem .32rem .34rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.flowie-companion__trigger:hover,
.flowie-companion__trigger:focus-visible {
  border-color: #9fbcaf;
  background: #fff;
}

.flowie-companion__trigger:focus-visible {
  outline: 3px solid rgba(47, 111, 78, .2);
  outline-offset: 2px;
}

body.entry-body .flowie-companion__orb {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: 2.38rem;
  height: 2.38rem;
  display: inline-block;
  border: 1px solid rgba(18, 56, 77, .14);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 56%, #8ee7bb 0, #42b77f 62%, #24855f 100%);
  box-shadow:
    inset -.22rem -.26rem .48rem rgba(18, 56, 77, .18),
    0 .34rem .78rem rgba(47, 111, 78, .22);
  transform: translateY(0);
  transform-origin: 50% 55%;
  animation: flowieNpcBob 4.8s ease-in-out infinite;
}

body.entry-body .flowie-companion__orb::before {
  inset: .38rem auto auto .48rem;
  width: .76rem;
  height: .42rem;
}

body.entry-body .flowie-companion__orb::after {
  right: .3rem;
  bottom: .36rem;
  width: .62rem;
  height: .3rem;
}

body.entry-body .flowie-companion__face::before {
  top: .9rem;
  left: .72rem;
  width: .2rem;
  height: .25rem;
  box-shadow: .66rem .02rem 0 #12384d;
}

body.entry-body .flowie-companion__face::after {
  top: 1.3rem;
  left: .9rem;
  width: .52rem;
  height: .28rem;
  border-bottom-width: 1.5px;
}

body.entry-body .flowie-companion__spark {
  position: absolute;
  top: -.08rem;
  right: -.04rem;
  width: .5rem;
  height: .5rem;
  color: var(--ui-warning);
}

body.entry-body .flowie-companion__spark::before,
body.entry-body .flowie-companion__spark::after {
  width: .5rem;
  height: .11rem;
}

body.entry-body .flowie-companion__callout {
  min-width: 0;
  max-width: 12.8rem;
  color: #24343b;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.18;
}

.npc-dialog {
  min-width: 0;
}

body.entry-body .npc-dialog {
  grid-area: npc;
  position: fixed;
  z-index: 90;
  right: var(--space-3);
  bottom: calc(var(--dock-height) + var(--space-4) + env(safe-area-inset-bottom));
  left: var(--space-3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(.7rem) scale(.98);
  transition:
    opacity .18s ease,
    transform .18s ease,
    visibility .18s ease;
}

body.entry-body .npc-dialog.npc-dialog--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.npc-dialog__panel {
  min-width: 0;
  border: 2px solid #1c2c35;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0, #f8fbf9 100%);
  color: var(--ui-ink);
  box-shadow: var(--shadow-float);
}

body.entry-body .npc-dialog__panel {
  width: min(100%, 27rem);
  margin-inline: auto;
  padding: .78rem;
}

.npc-dialog__panel:focus {
  outline: none;
}

.npc-dialog__header {
  min-width: 0;
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr);
  gap: .68rem;
  align-items: start;
}

body.entry-body .npc-dialog__avatar.flowie-companion__orb {
  width: 2.55rem;
  height: 2.55rem;
  animation: none;
}

body.entry-body .npc-dialog__avatar .flowie-companion__face::before {
  top: .98rem;
  left: .78rem;
  box-shadow: .72rem .02rem 0 #12384d;
}

body.entry-body .npc-dialog__avatar .flowie-companion__face::after {
  top: 1.42rem;
  left: .98rem;
}

.npc-dialog__speaker,
.npc-dialog__text {
  min-width: 0;
  margin: 0;
}

.npc-dialog__speaker {
  color: var(--ui-accent);
  font-size: .76rem;
  font-weight: 900;
  line-height: 1;
}

.npc-dialog__text {
  margin-top: .26rem;
  color: #26363d;
  font-size: .94rem;
  font-weight: 760;
  line-height: 1.34;
}

.npc-dialog__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .32rem;
  margin-top: .7rem;
}

.npc-dialog__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .48rem;
  align-items: center;
  margin-top: .78rem;
}

.npc-dialog__actions .ui-button {
  min-height: 2.35rem;
  padding: .55rem .78rem;
  font-size: .84rem;
}

.npc-dialog__actions .ui-button:not(.ui-button--primary) {
  background: #fff;
}

@keyframes flowieNpcBob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.entry-body .flowie-companion__orb {
    animation: none;
  }

  body.entry-body .npc-dialog {
    transition: none;
    transform: none;
  }
}

@media (min-width: 901px) {
  body.entry-body .entry-panel.ui-card--hero {
    grid-template-areas:
      "hero lesson"
      "flowie lesson"
      "npc lesson"
      "secondary lesson";
    grid-template-rows: auto auto auto auto;
    gap: var(--space-4) var(--space-6);
  }

  body.entry-body .flowie-companion.flowie-companion--home {
    max-width: 22rem;
  }

  body.entry-body .flowie-companion__trigger {
    padding: .4rem .78rem .4rem .4rem;
  }

  body.entry-body .flowie-companion__orb {
    width: 2.68rem;
    height: 2.68rem;
  }

  body.entry-body .flowie-companion__face::before {
    top: 1rem;
    left: .8rem;
    box-shadow: .74rem .02rem 0 #12384d;
  }

  body.entry-body .flowie-companion__face::after {
    top: 1.48rem;
    left: 1rem;
  }

  body.entry-body .flowie-companion__callout {
    max-width: 15rem;
    font-size: .9rem;
  }

  body.entry-body .npc-dialog {
    position: relative;
    inset: auto;
    width: min(100%, 27rem);
    max-height: 0;
    overflow: visible;
    transform: translateY(-.25rem) scale(.98);
  }

  body.entry-body .npc-dialog.npc-dialog--active {
    max-height: 22rem;
    transform: translateY(0) scale(1);
  }

  body.entry-body .npc-dialog__panel {
    margin: 0;
  }
}

/* Flowie happy-flow NPC polish */
.flowie-card,
.flowie-popover {
  border: 2px solid #1c2c35;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0, #f6fbf8 100%);
  color: var(--ui-ink);
  box-shadow:
    0 14px 28px rgba(18, 44, 53, .18),
    0 0 0 4px rgba(47, 111, 78, .08);
}

.flowie-card__head {
  border-bottom: 1px solid rgba(28, 44, 53, .14);
}

.flowie-avatar {
  position: relative;
  border: 1px solid rgba(18, 56, 77, .18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #fff 0 17%, transparent 18%),
    radial-gradient(circle at 50% 58%, #96ecc0 0, #44b87f 62%, #278963 100%);
  box-shadow:
    inset -.16rem -.2rem .36rem rgba(18, 56, 77, .2),
    0 .28rem .68rem rgba(47, 111, 78, .2);
}

.flowie-avatar::before {
  content: "";
  position: absolute;
  top: 43%;
  left: 32%;
  width: .18rem;
  height: .22rem;
  border-radius: 999px;
  background: #12384d;
  box-shadow: .48rem 0 0 #12384d;
}

.flowie-avatar::after {
  content: "";
  position: absolute;
  left: 39%;
  top: 64%;
  width: .42rem;
  height: .18rem;
  border-bottom: 1.5px solid #12384d;
  border-radius: 0 0 999px 999px;
}

.flowie-name {
  color: var(--ui-accent);
  font-weight: 900;
  letter-spacing: 0;
}

.flowie-actions .flowie-next {
  border-color: #1f6b4f;
  background: #2f6f4e;
}

body.screenshot-mode.flowie-step-1 .entry-secondary-routes,
body.screenshot-mode.flowie-step-1 .bottom-dock {
  opacity: .42;
}

body.screenshot-mode.flowie-step-1 .entry-panel.ui-card--hero {
  gap: var(--space-4);
}

body.screenshot-mode.flowie-step-1 .flowie-companion__trigger {
  background: rgba(255, 255, 255, .72);
  box-shadow: none;
}

body.screenshot-mode .npc-dialog.npc-dialog--active .npc-dialog__panel {
  box-shadow:
    0 18px 32px rgba(18, 44, 53, .2),
    0 0 0 4px rgba(230, 191, 69, .16);
}

body.learner-body .module-step-card:has(.proof-panel) {
  scroll-padding-bottom: 120px;
}

body.learner-body .proof-panel {
  margin-bottom: 120px;
}

.se1-score-box.is-pending {
  background: rgba(255, 255, 255, .72);
}

.se1-score-box.is-pending strong {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.15;
}

@media (max-width: 700px) {
  .flowie-card,
  .flowie-popover {
    width: min(100%, calc(100vw - 1rem));
    border-width: 2px;
  }

  body.screenshot-mode .bottom-dock {
    right: .25rem;
    left: .25rem;
    width: auto;
    max-width: none;
    gap: .14rem;
    justify-content: space-between;
    overflow: hidden;
    padding: .25rem;
    transform: none;
  }

  body.screenshot-mode .bottom-dock .bottom-dock-item,
  body.screenshot-mode .bottom-dock.app-role-nav .app-nav-item,
  body.screenshot-mode .bottom-dock.app-global-nav .app-global-nav__item {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    padding: .24rem .1rem;
    font-size: .56rem;
    overflow: hidden;
  }

  body.screenshot-mode .bottom-dock .bottom-dock-item span:last-child,
  body.screenshot-mode .bottom-dock.app-role-nav .app-nav-item span:last-child,
  body.screenshot-mode .bottom-dock.app-global-nav .app-global-nav__item span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Python pilotfixes */
.drawer,
body.learner-body .drawer {
  z-index: 120;
}

.drawer-card,
body.learner-body .drawer-card {
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-card-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: .75rem;
  align-items: start;
  justify-content: space-between;
  margin: -1.3rem -1.3rem .9rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem 1.3rem .8rem;
}

.drawer-card-head .kicker,
.drawer-card-head h2 {
  margin-bottom: .1rem;
}

body.learner-body .module-step-card {
  padding-bottom: 160px;
  scroll-padding-bottom: 160px;
}

body.learner-body .module-step-card:has(.proof-panel) {
  scroll-padding-bottom: 160px;
}

body.learner-body .proof-panel {
  margin-bottom: 0;
}

.proof-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: .18rem .5rem;
  align-items: baseline;
  margin-top: .28rem;
  font-size: .82rem;
  line-height: 1.2;
}

.proof-link-list strong {
  color: var(--ink);
}

.proof-link-list a,
.proof-text-note a {
  overflow-wrap: anywhere;
}

.teacher-proof-row strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

body.screenshot-mode .teacher-proof-table {
  max-height: 132px;
}

body.screenshot-mode .teacher-proof-row strong {
  line-height: 1.12;
}

body.screenshot-mode .proof-panel {
  gap: .34rem;
  margin-top: .38rem;
}

body.screenshot-mode .proof-section,
body.screenshot-mode .proof-extra-section {
  padding: .42rem .5rem;
}

body.screenshot-mode .proof-section h2 {
  font-size: .9rem;
}

body.screenshot-mode .proof-section--evidence {
  min-height: 0;
}

body.screenshot-mode .proof-field-grid,
body.screenshot-mode .proof-field-grid--extra {
  gap: .34rem .5rem;
}

body.screenshot-mode .proof-field-grid textarea,
body.screenshot-mode .proof-text-fallback textarea {
  min-height: 48px;
  max-height: 60px;
}

body.screenshot-mode .upload-field input[type="file"] {
  padding: .35rem;
}

body.screenshot-mode .upload-current {
  margin-top: .28rem;
  padding: .36rem .45rem;
}

body.screenshot-mode .field-help {
  margin-bottom: .2rem;
  font-size: .72rem;
  line-height: 1.18;
}

body.screenshot-mode .proof-actions {
  padding: .32rem 0;
}

.proof-actions.step-actions,
body.screenshot-mode .proof-actions.step-actions {
  position: static !important;
  bottom: auto !important;
  z-index: auto;
}

/* Python module readability pass */
body.learner-body[data-active-module='python_start_1'] .app-shell:not(.app-shell--builder) {
  width: min(1080px, calc(100vw - 1rem));
}

body.learner-body[data-active-module='python_start_1'] .app-main {
  gap: .5rem;
}

body.learner-body[data-active-module='python_start_1'] .lesson-top,
body.learner-body[data-active-module='python_start_1'] .module-workspace,
body.learner-body[data-active-module='python_start_1'] .lesson-nav.step-actions {
  width: min(940px, 100%);
  margin-inline: auto;
}

body.learner-body[data-active-module='python_start_1'] .lesson-top-inner {
  padding: .58rem .68rem;
}

body.learner-body[data-active-module='python_start_1'] .lesson-step-line strong {
  font-size: .95rem;
}

body.learner-body[data-active-module='python_start_1'] .lesson-step-line span,
body.learner-body[data-active-module='python_start_1'] .lesson-step-line em,
body.learner-body[data-active-module='python_start_1'] .progress-text {
  font-size: .74rem;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card {
  padding: 1.35rem 1.5rem 180px;
  scroll-padding-bottom: 180px;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card h1 {
  max-width: 760px;
  margin-bottom: .42rem;
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
  line-height: 1.08;
}

body.learner-body[data-active-module='python_start_1'] .proof-panel {
  display: block;
}

body.learner-body[data-active-module='python_start_1'] .proof-panel > * + * {
  margin-top: .42rem;
}

body.learner-body[data-active-module='python_start_1'] .proof-section--evidence {
  display: block;
}

body.learner-body[data-active-module='python_start_1'] .proof-section--evidence h2 {
  margin-bottom: .45rem;
}

body.learner-body[data-active-module='python_start_1'] .slide-text {
  max-width: 760px;
}

body.learner-body[data-active-module='python_start_1'] .slide-text p,
body.learner-body[data-active-module='python_start_1'] .slide-text li {
  font-size: 1.02rem;
  line-height: 1.48;
}

body.learner-body[data-active-module='python_start_1'] .assignment-preview {
  max-width: 820px;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin-top: 1rem;
}

body.learner-body[data-active-module='python_start_1'] .assignment-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  padding: .75rem;
}

body.learner-body[data-active-module='python_start_1'] .assignment-step {
  min-width: 0;
  grid-template-columns: 1fr;
  gap: .45rem;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: #fffdf7;
  padding: .72rem;
}

body.learner-body[data-active-module='python_start_1'] .assignment-step:last-child {
  border-bottom: 1px solid var(--line);
}

body.learner-body[data-active-module='python_start_1'] .assignment-step > span {
  width: 1.72rem;
  height: 1.72rem;
  font-size: .82rem;
}

body.learner-body[data-active-module='python_start_1'] .assignment-step strong {
  font-size: 1rem;
  line-height: 1.14;
}

body.learner-body[data-active-module='python_start_1'] .assignment-step p {
  margin-top: .18rem;
  font-size: .9rem;
  line-height: 1.34;
}

body.learner-body[data-active-module='python_start_1'] .code-panel {
  max-width: 820px;
  margin-top: 1rem;
  border-color: #c8b9a6;
}

body.learner-body .python-code-panel,
body.learner-body[data-active-module='python_start_1'] .python-code-panel {
  min-height: 13.25rem;
}

body.learner-body[data-active-module='python_start_1'] .code-panel-header {
  min-height: 3rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  background: #f6ecdc;
  padding: .65rem .85rem;
}

body.learner-body[data-active-module='python_start_1'] .code-panel-header strong {
  font-size: .98rem;
}

body.learner-body[data-active-module='python_start_1'] .code-copy-button {
  flex: 0 0 auto;
}

body.learner-body[data-active-module='python_start_1'] .python-code-textarea {
  min-height: 260px !important;
  max-height: 360px !important;
  padding: 1rem 1.05rem !important;
  font: 15.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

body.learner-body[data-active-module='python_start_1'] pre.python-code-textarea {
  height: auto !important;
  min-height: 9rem !important;
  max-height: none !important;
  overflow: visible !important;
}

body.learner-body[data-active-module='python_start_1'] .code-panel pre.python-code-textarea code {
  display: block;
  border: 0 !important;
  background: transparent !important;
  color: inherit;
  padding: 0 !important;
  font: inherit;
}

body.learner-body .code-panel pre.python-code-textarea {
  height: auto !important;
  min-height: 9rem !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: pre !important;
}

body.learner-body .code-panel pre.python-code-textarea code {
  display: block;
  border: 0 !important;
  background: transparent !important;
  color: inherit;
  padding: 0 !important;
  font: inherit;
}

body.learner-body[data-active-module='python_start_1'] .focus-list {
  max-width: 820px;
  gap: .65rem;
  margin-top: 1rem;
}

body.learner-body[data-active-module='python_start_1'] .focus-item {
  grid-template-columns: 1.55rem minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: #fffdf7;
  padding: .78rem .9rem;
}

body.learner-body[data-active-module='python_start_1'] .focus-item input {
  width: 1.18rem;
  height: 1.18rem;
  margin-top: .12rem;
}

body.learner-body[data-active-module='python_start_1'] .focus-label {
  font-size: 1rem;
  line-height: 1.42;
}

body.learner-body[data-active-module='python_start_1'] .lesson-nav.step-actions {
  min-height: 3rem;
  padding: .42rem .5rem;
}

body.learner-body[data-active-module='python_start_1'] .lesson-nav.step-actions button {
  min-height: 2.25rem;
  font-size: .9rem;
}

body.learner-body[data-active-module='python_start_1'] .drawer-card {
  width: min(880px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - var(--dock-reserve) - 1rem);
  padding: 1.25rem;
}

body.learner-body[data-active-module='python_start_1'] .drawer {
  padding: 1rem 1rem calc(var(--dock-reserve) + 1rem);
}

body.learner-body[data-active-module='python_start_1'] .drawer-card-head {
  margin: -1.25rem -1.25rem 1rem;
  padding: 1rem 1.25rem .85rem;
}

body.learner-body[data-active-module='python_start_1'] .term-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  padding-bottom: .5rem;
}

body.learner-body[data-active-module='python_start_1'] .term-card {
  padding: .9rem;
}

body.learner-body[data-active-module='python_start_1'] .term-card h3 {
  font-size: 1.08rem;
}

body.learner-body[data-active-module='python_start_1'] .term-card p {
  font-size: .92rem;
  line-height: 1.36;
}

@media (max-width: 760px) {
  body.learner-body[data-active-module='python_start_1'] .lesson-progress-line,
  body.learner-body[data-active-module='python_start_1'] .lesson-step-line,
  body.learner-body[data-active-module='python_start_1'] .assignment-steps,
  body.learner-body[data-active-module='python_start_1'] .term-grid {
    grid-template-columns: 1fr;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card {
    padding: 1rem 1rem 180px;
  }
}

@media (min-width: 761px) {
  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) {
    padding: .78rem 1rem 180px;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .kicker {
    margin-bottom: .22rem;
    font-size: .7rem;
    line-height: 1.05;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) h1 {
    max-width: 900px;
    margin-bottom: .3rem;
    font-size: clamp(1.48rem, 2.1vw, 2rem);
    line-height: 1.04;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .slide-text {
    max-width: 900px;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .slide-text p {
    margin-bottom: 0;
    font-size: .92rem;
    line-height: 1.32;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-panel {
    max-width: 100%;
    margin-top: .44rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-panel > * + * {
    margin-top: .3rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-section {
    gap: .32rem;
    padding: .38rem .46rem .48rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-section--evidence h2 {
    margin-bottom: 0;
    font-size: .82rem;
    line-height: 1.05;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .34rem .5rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-field-grid > label {
    margin: 0;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) label > span {
    margin-bottom: .08rem;
    font-size: .75rem;
    line-height: 1.08;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .field-help {
    margin: 0 0 .16rem;
    font-size: .66rem;
    line-height: 1.08;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) input:not([type="checkbox"]),
  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) textarea {
    padding: .34rem .44rem;
    font-size: .88rem;
    line-height: 1.22;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .upload-field input[type="file"] {
    padding: .28rem .34rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-field-grid textarea {
    min-height: 56px;
    max-height: 68px;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-actions.step-actions {
    min-height: 0;
    gap: .42rem;
    align-items: center;
    padding: .28rem 0 0;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-actions.step-actions button {
    min-height: 2rem;
    padding: .36rem .62rem;
    font-size: .82rem;
    line-height: 1.05;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .submission-status-compact {
    margin-top: .18rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .submission-status-compact .status-pill {
    padding: .22rem .48rem;
    font-size: .72rem;
    line-height: 1.1;
  }
}

/* Python proof UX pass */
body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) {
  padding: 1.2rem 1.35rem 180px;
  scroll-padding-bottom: 180px;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .kicker {
  margin-bottom: .35rem;
  font-size: .78rem;
  line-height: 1.15;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) h1 {
  max-width: 820px;
  margin-bottom: .45rem;
  font-size: clamp(1.8rem, 2.4vw, 2.25rem);
  line-height: 1.1;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .slide-text {
  max-width: 820px;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .slide-text p {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.42;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-panel {
  display: block;
  max-width: 920px;
  margin-top: 1.05rem;
  margin-bottom: 0;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-panel > * + * {
  margin-top: 1.05rem;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-section {
  display: block;
  border-color: #cbd9dd;
  border-left-width: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, .86);
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-section h2 {
  margin: 0 0 .85rem;
  color: var(--navy);
  font-size: 1.12rem;
  line-height: 1.2;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-section--evidence {
  min-height: 0;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-field-grid--extra {
  grid-template-columns: 1fr;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-field-grid > label,
body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-text-fallback {
  min-width: 0;
  margin: 0;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .upload-field {
  display: grid;
  align-content: start;
  gap: .45rem;
  min-height: 9rem;
  border: 1px solid #d3dde0;
  border-radius: 8px;
  background: #fffdf7;
  padding: .95rem;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) label > span {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.22;
  font-weight: 850;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .field-help {
  margin: 0;
  color: #53636d;
  font-size: .92rem;
  line-height: 1.35;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) input:not([type="checkbox"]),
body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) textarea {
  min-height: 2.75rem;
  padding: .72rem .78rem;
  font-size: 1rem;
  line-height: 1.35;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .upload-field input[type="file"] {
  padding: .68rem;
  background: #fffaf0;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-field-grid textarea {
  min-height: 8rem;
  max-height: none;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-actions.step-actions {
  position: static !important;
  display: flex;
  gap: .6rem;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  margin: 0;
  border: 0;
  background: transparent;
  padding: .2rem 0 0;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-actions.step-actions button {
  min-height: 2.55rem;
  padding: .62rem .86rem;
  font-size: 1rem;
  line-height: 1.15;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .submission-status-compact {
  margin-top: -.6rem;
}

body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .submission-status-compact .status-pill {
  padding: .42rem .68rem;
  font-size: .9rem;
  line-height: 1.15;
}

@media (max-width: 760px) {
  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) {
    padding: 1rem 1rem 180px;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-panel {
    margin-top: .75rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-section {
    padding: .78rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-section h2 {
    margin-bottom: .65rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-field-grid {
    grid-template-columns: 1fr;
    gap: .65rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .upload-field {
    min-height: 0;
    gap: .3rem;
    padding: .6rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .upload-field input[type="file"] {
    min-height: 2.4rem;
    padding: .52rem;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-actions.step-actions {
    display: grid;
  }

  body.learner-body[data-active-module='python_start_1'] .module-step-card:has(.proof-panel) .proof-actions.step-actions button {
    width: 100%;
  }
}

/* Focused teacher review mode */
.teacher-shell--inzendingen .review-filter-details {
  margin-bottom: .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  padding: .45rem .55rem;
}

.teacher-shell--inzendingen .review-filter-details summary,
.teacher-shell--inzendingen .review-metadata-details summary,
.teacher-shell--inzendingen .review-oral-details summary {
  cursor: pointer;
  color: var(--navy);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
  font-weight: 850;
}

.teacher-shell--inzendingen .review-filter-details .teacher-filters {
  margin: .55rem 0 0;
}

.teacher-shell--inzendingen .review-mode-card {
  display: grid;
  gap: .7rem;
  padding: .85rem;
}

.teacher-shell--inzendingen .review-identity-card {
  display: grid;
  grid-template-columns: minmax(250px, 1.05fr) minmax(420px, 1.2fr) auto;
  gap: .75rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: .72rem;
}

.teacher-shell--inzendingen .review-identity-card h2 {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.12;
}

.teacher-shell--inzendingen .review-identity-card p {
  margin: .16rem 0 0;
  font-size: .92rem;
  line-height: 1.25;
}

.teacher-shell--inzendingen .review-identity-meta {
  display: grid;
  grid-template-columns: minmax(105px, .72fr) minmax(155px, 1fr) minmax(150px, 1fr);
  gap: .45rem;
}

.teacher-shell--inzendingen .review-identity-meta > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-warm);
  padding: .48rem .55rem;
}

.teacher-shell--inzendingen .review-identity-meta strong,
.teacher-shell--inzendingen .review-identity-meta small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.2;
}

.teacher-shell--inzendingen .review-identity-meta strong {
  font-size: .88rem;
}

.teacher-shell--inzendingen .review-identity-meta small {
  margin-top: .12rem;
  color: var(--muted);
  font-size: .74rem;
}

.teacher-shell--inzendingen .review-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}

.teacher-shell--inzendingen .review-nav-actions button {
  min-height: 2.1rem;
  padding: .38rem .55rem;
  font-size: .82rem;
}

.teacher-shell--inzendingen .review-workspace-grid {
  grid-template-columns: minmax(0, 1.16fr) minmax(340px, .84fr);
  gap: .7rem;
}

.teacher-shell--inzendingen .review-proof-section,
.teacher-shell--inzendingen .review-decision-card {
  min-width: 0;
  align-content: start;
}

.teacher-shell--inzendingen .review-workspace-grid .review-decision-card {
  grid-template-columns: 1fr;
}

.teacher-shell--inzendingen .review-section-head {
  display: flex;
  gap: .7rem;
  align-items: start;
  justify-content: space-between;
}

.teacher-shell--inzendingen .review-section-head h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
}

.teacher-shell--inzendingen .review-section-head > strong {
  color: var(--soft);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .86rem;
  line-height: 1.25;
  text-align: right;
}

.teacher-shell--inzendingen .review-proof-section .teacher-proof-list {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.teacher-shell--inzendingen .teacher-proof-items {
  display: grid;
  gap: .5rem;
}

.teacher-shell--inzendingen .teacher-proof-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  padding: .68rem .72rem;
}

.teacher-shell--inzendingen .teacher-proof-main {
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.teacher-shell--inzendingen .teacher-proof-main strong,
.teacher-shell--inzendingen .teacher-proof-main span,
.teacher-shell--inzendingen .teacher-proof-main small {
  min-width: 0;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.teacher-shell--inzendingen .teacher-proof-main strong {
  color: var(--ink);
  font-size: .96rem;
}

.teacher-shell--inzendingen .teacher-proof-main span {
  white-space: nowrap;
}

.teacher-shell--inzendingen .teacher-proof-main small {
  color: var(--muted);
  font-size: .78rem;
}

.teacher-shell--inzendingen .teacher-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}

.teacher-shell--inzendingen .proof-link-list,
.teacher-shell--inzendingen .proof-text-note {
  margin-top: .55rem;
}

.teacher-shell--inzendingen .assessment-control-grid {
  display: grid;
  gap: .55rem;
}

.teacher-shell--inzendingen .assessment-control-grid label,
.teacher-shell--inzendingen .review-feedback-field {
  margin: 0;
}

.teacher-shell--inzendingen .assessment-control-grid textarea {
  min-height: 3.6rem;
}

.teacher-shell--inzendingen .review-feedback-field textarea {
  min-height: 5.2rem;
}

.teacher-shell--inzendingen .review-actions-primary {
  gap: .38rem;
  margin: 0;
}

.teacher-shell--inzendingen .review-actions-primary button {
  min-height: 2.25rem;
}

.teacher-shell--inzendingen .review-oral-details {
  display: block;
  padding: .5rem .58rem;
}

.teacher-shell--inzendingen .review-oral-details[open] {
  display: grid;
}

.teacher-shell--inzendingen .review-oral-details summary {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  align-items: baseline;
}

.teacher-shell--inzendingen .review-oral-details summary span {
  color: var(--muted);
}

.teacher-shell--inzendingen .review-metadata-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  padding: .5rem .58rem;
}

.teacher-shell--inzendingen .review-metadata-details[open] {
  display: grid;
  gap: .6rem;
}

.teacher-shell--inzendingen .review-metadata-details summary {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  align-items: baseline;
}

.teacher-shell--inzendingen .review-metadata-details summary span {
  color: var(--muted);
}

.teacher-shell--inzendingen .review-metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
}

.teacher-shell--inzendingen .review-metadata-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-warm);
  padding: .48rem .55rem;
}

.teacher-shell--inzendingen .review-metadata-grid strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: .9rem;
  line-height: 1.25;
}

.teacher-shell--inzendingen .review-metadata-stack {
  display: grid;
  gap: .55rem;
}

.teacher-shell--inzendingen .review-technical-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-warm);
  padding: .55rem;
}

.teacher-shell--inzendingen .submission-queue-list {
  gap: .55rem;
}

.teacher-shell--inzendingen .submission-queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto) auto;
  gap: .75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  padding: .65rem .75rem;
}

.teacher-shell--inzendingen .submission-queue-item strong,
.teacher-shell--inzendingen .submission-queue-item span,
.teacher-shell--inzendingen .submission-queue-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.25;
}

.teacher-shell--inzendingen .submission-queue-item > div:nth-child(2) {
  display: grid;
  gap: .18rem;
  justify-items: end;
  text-align: right;
}

.teacher-shell--inzendingen .submission-queue-item small {
  color: var(--muted);
  font-size: .78rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-filter-details {
  display: none;
}

body.screenshot-mode .teacher-shell--inzendingen .review-mode-card {
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding: .58rem .62rem 4.9rem;
  scroll-padding-bottom: 4.9rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-identity-card {
  grid-template-columns: minmax(220px, .9fr) minmax(420px, 1.25fr) auto;
  gap: .52rem;
  padding-bottom: .48rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-identity-card h2 {
  font-size: 1.16rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-identity-card p {
  font-size: .78rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-identity-meta {
  grid-template-columns: minmax(88px, .68fr) minmax(132px, .95fr) minmax(150px, 1fr);
  gap: .32rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-identity-meta > div,
body.screenshot-mode .teacher-shell--inzendingen .review-metadata-grid > div {
  padding: .34rem .42rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-nav-actions button {
  min-height: 1.82rem;
  padding: .28rem .44rem;
  font-size: .74rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-workspace-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  gap: .48rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-section,
body.screenshot-mode .teacher-shell--inzendingen .review-decision-card {
  padding: .48rem .52rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-section-head h3 {
  font-size: .94rem;
}

body.screenshot-mode .teacher-shell--inzendingen .teacher-proof-items {
  gap: .34rem;
}

body.screenshot-mode .teacher-shell--inzendingen .teacher-proof-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .42rem;
  padding: .42rem .48rem;
}

body.screenshot-mode .teacher-shell--inzendingen .teacher-proof-main strong {
  font-size: .84rem;
}

body.screenshot-mode .teacher-shell--inzendingen .teacher-proof-main span,
body.screenshot-mode .teacher-shell--inzendingen .teacher-proof-main small {
  font-size: .72rem;
}

body.screenshot-mode .teacher-shell--inzendingen .teacher-proof-actions button,
body.screenshot-mode .teacher-shell--inzendingen .review-actions-primary button {
  min-height: 1.85rem;
  padding: .26rem .42rem;
  font-size: .74rem;
}

body.screenshot-mode .teacher-shell--inzendingen .proof-link-list,
body.screenshot-mode .teacher-shell--inzendingen .proof-text-note {
  margin-top: .34rem;
  font-size: .76rem !important;
}

body.screenshot-mode .teacher-shell--inzendingen .assessment-control-grid {
  gap: .38rem;
}

body.screenshot-mode .teacher-shell--inzendingen .assessment-control-grid textarea {
  min-height: 2.45rem;
  max-height: 2.7rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-feedback-field textarea {
  min-height: 3.1rem;
  max-height: 3.4rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-actions {
  position: static;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

body.screenshot-mode .teacher-shell--inzendingen .review-oral-details {
  padding: .34rem .42rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-oral-details:not([open]) p,
body.screenshot-mode .teacher-shell--inzendingen .review-oral-details:not([open]) .se1-field-grid,
body.screenshot-mode .teacher-shell--inzendingen .review-oral-details:not([open]) .se1-criteria-list,
body.screenshot-mode .teacher-shell--inzendingen .review-oral-details:not([open]) .se1-question-bank,
body.screenshot-mode .teacher-shell--inzendingen .review-oral-details:not([open]) .se1-actions {
  display: none;
}

body.screenshot-mode .teacher-shell--inzendingen .review-metadata-details {
  padding: .34rem .42rem;
}

body.screenshot-mode .teacher-shell--inzendingen .review-metadata-details:not([open]) .review-metadata-grid,
body.screenshot-mode .teacher-shell--inzendingen .review-metadata-details:not([open]) .review-metadata-stack {
  display: none;
}

@media (max-width: 1080px) {
  .teacher-shell--inzendingen .review-identity-card,
  body.screenshot-mode .teacher-shell--inzendingen .review-identity-card,
  .teacher-shell--inzendingen .review-workspace-grid,
  body.screenshot-mode .teacher-shell--inzendingen .review-workspace-grid {
    grid-template-columns: 1fr;
  }

  .teacher-shell--inzendingen .review-nav-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .teacher-shell--inzendingen .review-identity-meta,
  .teacher-shell--inzendingen .review-metadata-grid,
  .teacher-shell--inzendingen .submission-queue-item {
    grid-template-columns: 1fr;
  }

  .teacher-shell--inzendingen .teacher-proof-row {
    grid-template-columns: 1fr;
  }

  .teacher-shell--inzendingen .teacher-proof-actions,
  .teacher-shell--inzendingen .submission-queue-item > div:nth-child(2) {
    justify-items: start;
    justify-content: flex-start;
    text-align: left;
  }
}

/* Feedback pilot */
body.screenshot-mode .teacher-shell--productlab > .message {
  display: block;
}

.help-feedback-page,
.productlab-page,
.productlab-detail {
  display: grid;
  gap: .65rem;
  min-height: 0;
  align-content: start;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.help-feedback-page {
  padding-bottom: max(7rem, calc(var(--app-content-bottom-safe, 0px) + 1rem));
  scroll-padding-bottom: max(7rem, calc(var(--app-content-bottom-safe, 0px) + 1rem));
}

.help-feedback-page > .page-hero {
  display: block;
  min-height: auto;
  overflow: visible;
}

.help-feedback-page > .page-hero h1 {
  margin: .05rem 0 .16rem;
  font-size: 1.28rem;
  line-height: 1.12;
}

.feedback-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.feedback-route,
.productlab-card {
  display: grid;
  gap: .18rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  padding: .62rem .68rem;
  text-align: left;
}

.feedback-route.is-active {
  border-color: #245f9f;
  background: #eef6ff;
}

.feedback-route strong,
.productlab-card strong {
  font-size: .95rem;
  line-height: 1.16;
}

.feedback-route span,
.productlab-card span,
.productlab-card small,
.productlab-card em {
  min-width: 0;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.help-direct-block,
.feedback-form-panel,
.productlab-manual-form,
.productlab-column,
.productlab-context-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  padding: .65rem;
}

.help-direct-block h2 {
  margin: 0 0 .42rem;
  font-size: 1rem;
}

body .help-feedback-page .help-direct-block h2 {
  font-size: 1rem;
  line-height: 1.2;
}

.help-direct-block > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem .65rem;
}

.help-direct-block p {
  margin: 0;
}

.feedback-context-box {
  display: grid;
  gap: .12rem;
  margin-bottom: .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-warm);
  padding: .5rem .58rem;
}

.feedback-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid #8fb6de;
  border-radius: 8px;
  background: #eef6ff;
  padding: .55rem .65rem;
}

.feedback-focus-head > div {
  display: grid;
  gap: .08rem;
}

.feedback-focus-head span,
.feedback-reference span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.feedback-focus-head .button-link {
  min-height: auto;
  padding: .3rem .45rem;
  background: transparent;
}

.feedback-context-box span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.feedback-context-box strong {
  overflow-wrap: anywhere;
}

.feedback-form,
.productlab-manual-form {
  display: grid;
  gap: .35rem;
}

.feedback-field {
  display: grid;
  min-width: 0;
  gap: .22rem;
}

.feedback-form .feedback-field > label {
  display: block;
}

.required-label {
  display: inline;
  color: var(--muted);
  font-weight: 700;
}

.field-error {
  margin: 0;
  color: var(--bad);
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.3;
}

.field-error[hidden] {
  display: none;
}

.feedback-form textarea {
  min-height: 4.6rem;
}

.feedback-actions {
  margin-top: .05rem;
  padding-bottom: .25rem;
}

.feedback-form label,
.productlab-manual-form label,
.productlab-status-control {
  display: grid;
  gap: .22rem;
  margin: 0;
}

.feedback-upload-field small {
  color: var(--muted);
  font-size: .75rem;
}

.feedback-confirmation {
  display: grid;
  gap: .8rem;
  justify-items: start;
  align-content: start;
  max-width: 650px;
  margin-top: .3rem;
  border: 1px solid #a8ccb6;
  border-radius: 12px;
  background: #f3faf5;
  padding: 1.35rem;
}

.feedback-confirmation-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 50%;
  background: #28734b;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.feedback-confirmation h2 {
  margin: 0 0 .32rem;
  font-size: 1.5rem;
}

.feedback-confirmation p {
  margin: 0;
}

.feedback-reference {
  display: grid;
  gap: .15rem;
  min-width: min(100%, 19rem);
  border: 1px solid #b9d4c3;
  border-radius: 8px;
  background: #fff;
  padding: .65rem .75rem;
}

.feedback-reference strong {
  font-size: 1.15rem;
  letter-spacing: .035em;
}

.productlab-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  justify-content: space-between;
}

.productlab-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  min-width: 0;
}

.productlab-column {
  display: grid;
  gap: .5rem;
  align-content: start;
  min-width: 0;
}

.productlab-column header {
  display: flex;
  gap: .45rem;
  align-items: center;
  justify-content: space-between;
}

.productlab-page .productlab-column header h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.12;
}

.productlab-card-list {
  display: grid;
  gap: .45rem;
}

.productlab-card {
  width: 100%;
  cursor: pointer;
}

.productlab-card em {
  color: var(--ink);
  font-style: normal;
  font-weight: 850;
}

.productlab-manual-form {
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr) minmax(130px, .45fr) minmax(130px, .45fr) auto;
  align-items: end;
}

.productlab-detail-card {
  display: grid;
  gap: .45rem;
}

.productlab-detail-card h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.productlab-detail-card p {
  overflow-wrap: anywhere;
}

.productlab-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}

.productlab-context-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .86rem;
  line-height: 1.25;
}

.productlab-technical {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
}

.productlab-technical summary {
  cursor: pointer;
  padding: .7rem .8rem;
  font-weight: 850;
}

.productlab-technical-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  padding: 0 .8rem .8rem;
}

.productlab-technical-grid > div {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: .5rem;
}

.productlab-technical-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .84rem;
}

body.screenshot-mode .help-feedback-page,
body.screenshot-mode .productlab-page {
  gap: .45rem;
}

body.screenshot-mode .productlab-board {
  gap: .42rem;
}

body.screenshot-mode .productlab-column,
body.screenshot-mode .feedback-form-panel,
body.screenshot-mode .help-direct-block {
  padding: .48rem;
}

body.screenshot-mode .productlab-card {
  padding: .46rem .5rem;
}

body.screenshot-mode .productlab-card strong {
  font-size: .82rem;
}

body.screenshot-mode .productlab-card span,
body.screenshot-mode .productlab-card small,
body.screenshot-mode .productlab-card em {
  font-size: .68rem;
}

@media (max-width: 980px) {
  .feedback-route-grid,
  .productlab-board,
  .productlab-context-grid {
    grid-template-columns: 1fr;
  }

  .productlab-technical-grid {
    grid-template-columns: 1fr;
  }

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

  .help-direct-block > div {
    grid-template-columns: 1fr;
  }
}

.validation-summary {
  display: grid;
  gap: .16rem;
  margin: 0 0 .55rem;
  border: 1px solid #d98b47;
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff7ed;
  color: #5f2f00;
  padding: .6rem .72rem;
  scroll-margin-top: 6.5rem;
  outline: none;
}

.validation-summary:focus {
  box-shadow: 0 0 0 3px rgba(179, 82, 20, .22);
}

.validation-summary strong {
  color: #4f2600;
  font-size: .92rem;
  line-height: 1.16;
}

.validation-summary span,
.validation-summary li {
  font-size: .86rem;
  line-height: 1.28;
}

.validation-summary ul {
  display: grid;
  gap: .18rem;
  margin: .1rem 0 0 1.1rem;
  padding: 0;
}

.focus-item.has-error {
  border-color: var(--bad);
  background: rgba(179, 47, 47, .06);
}

.task-inline-error {
  margin-top: .45rem;
}

[aria-invalid='true'] {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(179, 47, 47, .13);
}

.login-choice-actions,
.role-switch-row,
.proof-actions.step-actions,
.feedback-actions {
  align-items: center;
}

.login-choice-actions {
  display: flex;
  flex-wrap: wrap;
}

.login-form .primary,
.feedback-actions .primary,
.proof-actions.step-actions .primary {
  justify-self: start;
}

@media (max-width: 640px) {
  .login-choice-actions,
  .role-switch-row,
  .proof-actions.step-actions,
  .feedback-actions {
    align-items: stretch;
  }

  .login-choice-actions > *,
  .role-switch-row > *,
  .proof-actions.step-actions > *,
  .feedback-actions > * {
    width: 100%;
  }
}

/* Publieke landing: één productboodschap met rustige onderwijscontext. */
body.entry-body .entry-panel--landing {
  grid-template-areas:
    "hero"
    "lesson"
    "secondary";
}

body.entry-body .entry-context-line {
  margin: -.35rem 0 1rem;
  color: var(--ui-muted);
  font-size: .82rem;
  font-weight: 750;
}

body.entry-body .entry-panel--landing .entry-secondary-routes {
  grid-template-columns: repeat(2, minmax(0, auto));
  justify-content: start;
}

body.entry-body .entry-panel--landing .entry-primary-actions .ui-button {
  min-height: 2.9rem !important;
}

@media (min-width: 901px) {
  body.entry-body .entry-panel--landing {
    grid-template-areas:
      "hero lesson"
      "secondary lesson";
    grid-template-rows: auto auto;
  }

  body.entry-body .entry-panel--landing .entry-primary-actions {
    max-width: 25rem;
    display: flex;
    flex-wrap: wrap;
  }

  body.entry-body .entry-panel--landing .entry-primary-actions .ui-button {
    width: auto;
    min-width: 11rem;
  }
}

/* Canoniek UI-kitcontract voor acties: links en native buttons delen één maat. */
:where(.ui-button, .button, button.primary, a.primary, .secondary-action, .quiet-button, .tool-button, .button-link, .danger-button, .start-button) {
  display: inline-flex;
  min-height: 2.75rem !important;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: var(--ui-radius-sm, 8px);
  padding: .62rem .9rem;
  font: inherit;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
}

:where(.ui-button, .button, button, a.primary, .secondary-action, .quiet-button, .tool-button, .button-link, .danger-button):focus-visible {
  outline: 3px solid #2f6f9f;
  outline-offset: 2px;
}

:where(button, .ui-button, .button)[disabled],
:where(.ui-button, .button, a)[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: .56;
  filter: saturate(.65);
}

:where(.ui-button, .button, button, a)[aria-busy='true'],
:where(.ui-button, .button, button, a).is-loading {
  cursor: progress;
  opacity: .78;
}

:where(.action-row, .login-choice-actions, .role-switch-row, .feedback-actions, .proof-actions, .module-card-actions, .entry-primary-actions, .npc-dialog__actions, .review-actions, .teacher-action-row, .top-actions) {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
}

.lesson-nav.step-actions {
  display: flex;
  gap: .55rem;
  align-items: center;
  justify-content: space-between;
}

.lesson-nav.step-actions .right {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.login-choice-actions .start-button {
  margin-top: 0;
}

.lesson-nav.step-actions button,
.proof-actions.step-actions button,
.feedback-actions :is(button, a),
.login-choice-actions :is(button, a),
.role-switch-row :is(button, a),
.module-card-actions :is(button, a),
.entry-primary-actions :is(button, a),
.npc-dialog__actions :is(button, a) {
  display: inline-flex;
  min-height: 2.75rem !important;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .lesson-nav.step-actions,
  .lesson-nav.step-actions .right {
    align-items: stretch;
  }

  .lesson-nav.step-actions .right {
    flex: 1 1 100%;
  }

.lesson-nav.step-actions .right > * {
    flex: 1 1 10rem;
  }
}

body.entry-body .entry-panel--landing .entry-primary-actions > .ui-button,
.login-choice-actions > :is(button, a) {
  display: inline-flex;
}
