:root {
  color-scheme: light;
  /* Shared semantic appearance contract. Surface-specific experiences may
     add aliases, but these names are the only page/card/input state tokens. */
  --surface-page: #f4f5f7;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-input: #ffffff;
  --surface-muted: #edf0f4;
  --text-primary: #182230;
  --text-secondary: #435166;
  --text-muted: #66758a;
  --text-on-accent: #ffffff;
  --border-default: #d6dde7;
  --border-subtle: #e5eaf0;
  --disabled-bg: #e7ebf0;
  --disabled-text: #8b97a8;
  --disabled-border: #c7d0dc;
  --accent: #4f46e5;
  --accent-hover: #3730a3;
  --accent-soft: #e9e7ff;
  --success: #16724f;
  --success-soft: #e2f4eb;
  --attention: #9a6700;
  --attention-soft: #fff1c7;
  --danger: #b43c50;
  --danger-soft: #fde8ec;
  --focus-surface: #182230;
  --focus-deep: #101722;
  --focus-text: #f8fafc;
  --focus-muted: #c8d2df;
  --bg: var(--surface-page);
  --surface: var(--surface-card);
  --surface-raised: var(--surface-elevated);
  --border: var(--border-default);
  --border-strong: var(--border-default);
  --accent-strong: var(--accent-hover);
  --on-accent: var(--text-on-accent);
  --code-surface: #172033;
  --code-text: #eaf0ff;

  /* Legacy aliases keep the Phase 2.6 surface selectors readable. */
  --canvas: var(--bg);
  --surface-soft: var(--surface-muted);
  --surface-blue: var(--accent-soft);
  --ink: var(--text-primary);
  --ink-deep: var(--text-primary);
  --muted: var(--text-muted);
  --muted-deep: var(--text-secondary);
  --line: var(--border);
  --line-strong: var(--border-strong);
  --navy: var(--focus-surface);
  --navy-deep: var(--focus-deep);
  --cobalt: var(--accent);
  --cobalt-dark: var(--accent-strong);
  --cobalt-soft: var(--accent-soft);
  --sun: var(--attention);
  --sun-soft: var(--attention-soft);
  --mint: var(--success);
  --mint-soft: var(--success-soft);
  --coral: var(--danger);
  --coral-soft: var(--danger-soft);
  --amber: var(--attention);
  --amber-soft: var(--attention-soft);
  --shadow: 0 10px 26px rgba(24, 34, 48, 0.07);
  --shadow-deep: 0 18px 40px rgba(24, 34, 48, 0.13);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --body: "Segoe UI", "Noto Sans TC", Arial, sans-serif;
  --display: "Trebuchet MS", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-page: #111827;
  --surface-card: #1b2433;
  --surface-elevated: #202b3d;
  --surface-input: #202b3d;
  --surface-muted: #263247;
  --text-primary: #f3f6fb;
  --text-secondary: #c5cfdd;
  --text-muted: #9aa9bd;
  --text-on-accent: #111827;
  --border-default: #3b4960;
  --border-subtle: #303c50;
  --disabled-bg: #2a3445;
  --disabled-text: #7f8da3;
  --disabled-border: #46556d;
  --accent: #a5b4fc;
  --accent-hover: #c7d2fe;
  --accent-soft: #30365d;
  --success: #6ee7b7;
  --success-soft: #173f35;
  --attention: #f5c15b;
  --attention-soft: #4e3d1b;
  --danger: #f38ba0;
  --danger-soft: #522b38;
  --focus-surface: #334155;
  --focus-deep: #263448;
  --focus-text: #f8fafc;
  --focus-muted: #d4deeb;
  --bg: var(--surface-page);
  --surface: var(--surface-card);
  --surface-raised: var(--surface-elevated);
  --border: var(--border-default);
  --border-strong: var(--border-default);
  --accent-strong: var(--accent-hover);
  --on-accent: var(--text-on-accent);
  --code-surface: #0b1220;
  --code-text: #eef2ff;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  --shadow-deep: 0 18px 42px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --surface-page: #111827;
    --surface-card: #1b2433;
    --surface-elevated: #202b3d;
    --surface-input: #202b3d;
    --surface-muted: #263247;
    --text-primary: #f3f6fb;
    --text-secondary: #c5cfdd;
    --text-muted: #9aa9bd;
    --text-on-accent: #111827;
    --border-default: #3b4960;
    --border-subtle: #303c50;
    --disabled-bg: #2a3445;
    --disabled-text: #7f8da3;
    --disabled-border: #46556d;
    --accent: #a5b4fc;
    --accent-hover: #c7d2fe;
    --accent-soft: #30365d;
    --success: #6ee7b7;
    --success-soft: #173f35;
    --attention: #f5c15b;
    --attention-soft: #4e3d1b;
    --danger: #f38ba0;
    --danger-soft: #522b38;
    --focus-surface: #334155;
    --focus-deep: #263448;
    --focus-text: #f8fafc;
    --focus-muted: #d4deeb;
    --bg: var(--surface-page);
    --surface: var(--surface-card);
    --surface-raised: var(--surface-elevated);
    --border: var(--border-default);
    --border-strong: var(--border-default);
    --accent-strong: var(--accent-hover);
    --on-accent: var(--text-on-accent);
    --code-surface: #0b1220;
    --code-text: #eef2ff;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    --shadow-deep: 0 18px 42px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--body);
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(36, 50, 57, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 50, 57, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  pointer-events: none;
}

button,
textarea,
input { font: inherit; }

button { border: 0; }

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(88, 120, 173, 0.5);
  outline-offset: 3px;
}

a { color: inherit; }

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

.site-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  display: none;
}

.atmosphere-grid {
  position: absolute;
  top: 9rem;
  right: -6rem;
  width: 20rem;
  height: 20rem;
  border: 1px solid rgba(44, 99, 230, 0.09);
  background-image:
    linear-gradient(rgba(44, 99, 230, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 99, 230, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(135deg, transparent 0%, black 38%, transparent 100%);
  transform: rotate(11deg);
}

.atmosphere-orbit {
  position: absolute;
  border: 1px solid rgba(236, 116, 98, 0.2);
  border-radius: 50%;
}

.atmosphere-orbit-one {
  top: 34rem;
  left: -16rem;
  width: 34rem;
  height: 15rem;
  transform: rotate(-24deg);
}

.atmosphere-orbit-two {
  right: -13rem;
  bottom: 4rem;
  width: 31rem;
  height: 11rem;
  border-color: rgba(30, 154, 120, 0.16);
  transform: rotate(-20deg);
}

.app-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(260px, 0.88fr) auto;
  align-items: center;
  gap: 30px;
  width: min(1380px, calc(100% - 56px));
  min-height: 76px;
  margin: 0 auto;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink-deep);
  text-decoration: none;
}

.brand-symbol {
  display: inline-flex;
  align-items: end;
  gap: 3px;
  width: 28px;
  height: 27px;
}

.brand-symbol i {
  display: block;
  width: 7px;
  border-radius: 5px 5px 2px 2px;
  background: var(--cobalt);
}

.brand-symbol i:nth-child(1) { height: 14px; background: var(--sun); }
.brand-symbol i:nth-child(2) { height: 24px; background: var(--cobalt); }
.brand-symbol i:nth-child(3) { height: 18px; background: var(--mint); }

.brand-word {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-divider {
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 16px;
}

.brand-context {
  color: var(--muted-deep);
  font-size: 12px;
  font-weight: 650;
}

.header-course {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.header-label,
.section-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.header-course strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-student {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: flex-end;
  min-width: 0;
}

.student-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--attention-soft);
  color: var(--attention);
  font-size: 13px;
  font-weight: 800;
}

.student-identity {
  display: grid;
  gap: 0;
  line-height: 1.15;
}

.student-identity strong { font-size: 12px; }
.student-identity span { color: var(--muted); font-size: 10px; }

.header-progress {
  margin-left: 12px;
  padding-left: 13px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.header-progress strong { color: var(--cobalt-dark); font-size: 13px; }

.appearance-control { position: relative; flex: 0 0 auto; }
.appearance-button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-secondary); cursor: pointer; font-size: 10px; }
.appearance-button:hover,
.appearance-button[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.appearance-icon { color: var(--accent); font-size: 15px; line-height: 1; }
.appearance-label { font-weight: 700; }
.appearance-value { color: var(--text-primary); font-size: 10px; font-weight: 700; }
.appearance-menu { position: absolute; top: calc(100% + 9px); right: 0; z-index: 10; width: 174px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow-deep); }
.appearance-menu-label { margin: 0 5px 7px; color: var(--text-muted); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; }
.theme-options { display: grid; gap: 3px; }
.theme-option { display: flex; align-items: center; width: 100%; min-height: 36px; padding: 8px 9px; border-radius: 8px; background: transparent; color: var(--text-secondary); cursor: pointer; font-size: 11px; text-align: left; }
.theme-option::before { width: 7px; height: 7px; margin-right: 8px; border: 1px solid var(--border-strong); border-radius: 50%; content: ""; }
.theme-option:hover { background: var(--surface-muted); color: var(--text-primary); }
.theme-option[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.theme-option[aria-checked="true"]::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--surface-raised), 0 0 0 4px var(--accent); }

.app-main {
  width: min(1380px, calc(100% - 56px));
  margin: 0 auto;
  padding: 44px 0 38px;
}

.intro-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 30px;
}

.intro-copy { max-width: 790px; }

.intro-copy .section-label { color: var(--cobalt-dark); }
.intro-copy .section-label span { color: var(--sun); }

.intro-copy h1 {
  max-width: 800px;
  margin: 8px 0 12px;
  color: var(--ink-deep);
  font-family: var(--display);
  font-size: clamp(32px, 4.25vw, 56px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.intro-description {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--muted-deep);
  font-size: 14px;
  line-height: 1.75;
}

.connection-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 22px;
  margin-bottom: 18px;
  padding: 18px 21px;
  border-color: var(--line);
  background:
    linear-gradient(100deg, rgba(88, 120, 173, 0.07), transparent 44%),
    var(--surface-raised);
}

.connection-copy { min-width: 0; }
.connection-copy .section-label { margin-bottom: 6px; color: var(--cobalt-dark); }
.connection-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; }
.connection-title-row h2 { margin: 0; color: var(--ink-deep); font-family: var(--display); font-size: 19px; letter-spacing: -0.035em; }
.connection-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.02em; }
.connection-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.connection-status-demo { background: var(--mint-soft); color: var(--success); }
.connection-status-teacher { background: var(--accent-soft); color: var(--accent-strong); }
.connection-status-offline { background: var(--attention-soft); color: var(--attention); }
.connection-message { max-width: 620px; margin: 7px 0 0; color: var(--muted-deep); font-size: 11px; line-height: 1.55; }
.connection-settings-toggle { align-self: center; min-width: 104px; white-space: nowrap; }
.connection-settings-panel { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid var(--line); }
.connection-controls { display: grid; gap: 8px; min-width: 0; }
.connection-key-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.connection-key-input { min-width: 0; min-height: 41px; flex: 1 1 auto; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 11px; outline: 0; background: var(--surface); color: var(--ink); font-size: 12px; }
.connection-key-input::placeholder { color: var(--text-muted); }
.connection-key-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.connection-key-input:disabled { cursor: wait; opacity: 0.62; }
.connection-help-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 13px; min-height: 19px; }
.connection-key-state { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.connection-guide-link { color: var(--cobalt-dark); font-size: 10px; font-weight: 700; text-underline-offset: 3px; }
.connection-guide-link:hover { color: var(--cobalt); }
.connection-demo-button { margin-left: auto; font-size: 10px; }
.connection-demo-button:disabled { cursor: default; opacity: 0.45; }
.credential-feedback { margin: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--muted-deep); font-size: 10px; line-height: 1.45; }
.credential-feedback[data-kind="success"] { border-color: var(--success); background: var(--mint-soft); color: var(--success); }
.credential-feedback[data-kind="error"] { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

.space-switcher { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr); align-items: center; gap: 22px 30px; margin-bottom: 18px; padding: 18px 21px; background: linear-gradient(100deg, rgba(176, 120, 39, 0.07), transparent 48%), var(--surface-raised); }
.space-switcher-copy { min-width: 0; }
.space-switcher-copy .section-label { margin-bottom: 6px; color: var(--attention); }
.space-switcher-copy h2 { margin: 0; color: var(--ink-deep); font-family: var(--display); font-size: 19px; letter-spacing: -0.035em; }
.space-switcher-copy p:not(.section-label) { margin: 7px 0 0; color: var(--muted-deep); font-size: 11px; line-height: 1.55; }
.space-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.space-option { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 63px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted-deep); cursor: pointer; text-align: left; transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease; }
.space-option:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); transform: translateY(-1px); }
.space-option.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 -2px var(--accent); }
.space-option-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-muted); color: var(--muted-deep); font-family: var(--mono); font-size: 10px; font-weight: 700; }
.space-option.is-active .space-option-icon { background: var(--accent); color: var(--on-accent); }
.space-option strong { display: block; color: var(--ink-deep); font-size: 12px; }
.space-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }

.showcase-view-switcher { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(390px, 1.14fr); align-items: center; gap: 18px 28px; margin-bottom: 18px; padding: 16px 21px; border-color: var(--line); background: linear-gradient(100deg, rgba(88, 120, 173, 0.08), transparent 55%), var(--surface-raised); }
.showcase-view-copy { min-width: 0; }
.showcase-view-copy .section-label { margin-bottom: 5px; color: var(--cobalt-dark); }
.showcase-view-copy h2 { margin: 0; color: var(--ink-deep); font-family: var(--display); font-size: 17px; letter-spacing: -0.035em; }
.showcase-view-copy p:not(.section-label) { margin: 6px 0 0; color: var(--muted-deep); font-size: 10px; line-height: 1.5; }
.showcase-view-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.showcase-view-option { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 56px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted-deep); cursor: pointer; text-align: left; transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease; }
.showcase-view-option:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); transform: translateY(-1px); }
.showcase-view-option.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 -2px var(--accent); }
.showcase-view-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-muted); color: var(--muted-deep); font-family: var(--mono); font-size: 9px; font-weight: 700; }
.showcase-view-option.is-active .showcase-view-icon { background: var(--accent); color: var(--on-accent); }
.showcase-view-option strong { display: block; color: var(--ink-deep); font-size: 11px; }
.showcase-view-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.3; }

.course-picker {
  margin-bottom: 18px;
  padding: 22px;
  border-color: var(--border-strong);
  background:
    radial-gradient(circle at 91% 12%, rgba(236, 116, 98, 0.13), transparent 12rem),
    linear-gradient(110deg, rgba(88, 120, 173, 0.08), transparent 58%),
    var(--surface-raised);
}

.course-picker-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.course-picker-heading > div { min-width: 0; }
.course-picker-heading .section-label { margin-bottom: 6px; color: var(--cobalt-dark); }
.course-picker-heading h2 { margin: 0; color: var(--ink-deep); font-family: var(--display); font-size: 24px; letter-spacing: -0.045em; }
.course-picker-heading p:not(.section-label) { max-width: 670px; margin: 7px 0 0; color: var(--muted-deep); font-size: 11px; line-height: 1.6; }
.course-picker-note { flex: 0 0 auto; margin-top: 2px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted-deep); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.04em; }

.showcase-template-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; min-width: 0; }
.template-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; gap: 9px 10px; min-width: 0; min-height: 137px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.template-card:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 8px 18px rgba(42, 58, 64, 0.08); transform: translateY(-2px); }
.template-card.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 -2px var(--accent), 0 8px 18px rgba(42, 58, 64, 0.08); }
.template-card-featured { border-color: rgba(236, 116, 98, 0.38); }
.template-card[data-template="truth-detective"] .template-card-marker { background: var(--attention-soft); color: var(--attention); }
.template-card[data-template="vibe-build"] .template-card-marker { background: var(--danger-soft); color: var(--danger); }
.template-card[data-template="website-security"] .template-card-marker { background: var(--surface-muted); color: var(--muted-deep); }
.template-card-marker { display: grid; grid-row: 1 / span 2; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-family: var(--mono); font-size: 9px; font-weight: 800; }
.template-card-copy { display: grid; align-content: start; gap: 3px; min-width: 0; }
.template-card-eyebrow { overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.template-card-copy strong { color: var(--ink-deep); font-family: var(--display); font-size: 16px; letter-spacing: -0.035em; line-height: 1.2; }
.template-card-subtitle { color: var(--muted-deep); font-size: 10px; line-height: 1.45; }
.template-card-meta { grid-column: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; color: var(--muted); font-family: var(--mono); font-size: 8px; line-height: 1.35; }
.template-card-duration { color: var(--ink-deep); font-weight: 700; }
.template-card-route { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-card-playground { grid-column: 1 / -1; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto; min-height: 58px; align-items: center; }
.template-card-playground .template-card-marker { grid-row: auto; background: var(--surface-muted); color: var(--muted-deep); }
.template-card-playground .template-card-meta { grid-column: auto; justify-self: end; }

.template-action-panel { display: grid; gap: 16px; margin-bottom: 18px; padding: 21px; border-color: var(--border-strong); background: linear-gradient(135deg, rgba(236, 116, 98, 0.08), transparent 44%), var(--surface-raised); }
.template-action-panel[data-template="truth-detective"] { background: linear-gradient(135deg, rgba(176, 120, 39, 0.1), transparent 48%), var(--surface-raised); }
.template-action-panel[data-template="vibe-build"] { background: linear-gradient(135deg, rgba(88, 120, 173, 0.09), transparent 48%), var(--surface-raised); }
.template-action-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.template-action-heading > div { min-width: 0; }
.template-action-heading .section-label { margin-bottom: 6px; color: var(--accent-strong); }
.template-action-heading h2 { margin: 0; color: var(--ink-deep); font-family: var(--display); font-size: 24px; letter-spacing: -0.045em; }
.template-action-heading p:not(.section-label) { max-width: 700px; margin: 7px 0 0; color: var(--muted-deep); font-size: 11px; line-height: 1.6; }
.template-action-state { flex: 0 0 auto; padding: 7px 9px; border-radius: 999px; background: var(--attention-soft); color: var(--attention); font-family: var(--mono); font-size: 9px; font-weight: 750; white-space: nowrap; }
.template-action-panel[data-template="truth-detective"] .template-action-state { background: var(--attention-soft); color: var(--attention); }
.template-action-panel[data-template="vibe-build"] .template-action-state { background: var(--accent-soft); color: var(--accent-strong); }
.template-action-body { display: grid; gap: 13px; min-width: 0; }
.template-action-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 0.82fr); gap: 18px; min-width: 0; }
.template-action-controls { display: grid; align-content: start; gap: 10px; min-width: 0; }
.template-action-lead { margin: 0; color: var(--muted-deep); font-size: 12px; line-height: 1.65; }
.template-field { display: grid; gap: 5px; min-width: 0; color: var(--muted-deep); font-size: 10px; font-weight: 750; }
.template-field-label { color: var(--ink-deep); }
.template-field input,
.template-field textarea,
.final-reason-card textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 500; line-height: 1.5; }
.template-field textarea,
.final-reason-card textarea { resize: vertical; }
.template-field input:focus,
.template-field textarea:focus,
.final-reason-card textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.template-field input:disabled,
.template-field textarea:disabled,
.final-reason-card textarea:disabled { cursor: wait; opacity: 0.62; }
.template-action-controls > .button { justify-self: start; min-height: 40px; }
.template-link-fields { display: grid; gap: 9px; }
.template-link-field { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.template-link-index { color: var(--muted); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.1em; }
.template-checklist { display: grid; gap: 7px; margin: 2px 0 0; padding: 0; list-style: none; }
.template-action-panel .hands-on-check { padding: 9px 10px; }
.template-action-panel .hands-on-check-copy strong { font-size: 11px; }
.template-action-panel .hands-on-check-copy small { font-size: 9px; }
.template-mini-preview { display: grid; align-content: start; gap: 9px; min-width: 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--surface); }
.template-mini-preview-heading { display: grid; gap: 3px; }
.template-mini-preview-heading strong { color: var(--ink-deep); font-size: 12px; }
.template-mini-preview iframe { display: block; width: 100%; height: 300px; min-height: 240px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.template-preview-caption { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.template-action-feedback { margin: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); color: var(--muted-deep); font-size: 11px; line-height: 1.5; }
.template-action-feedback[data-kind="success"] { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.template-action-feedback[data-kind="error"] { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

.template-theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.template-theme-option { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); cursor: pointer; }
.template-theme-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 -2px var(--accent); }
.template-theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.template-theme-swatch { display: block; width: 25px; height: 25px; border-radius: 8px; background: linear-gradient(145deg, #e97762 20%, #f7d5a2 100%); }
.template-theme-option:nth-child(2) .template-theme-swatch { background: linear-gradient(145deg, #263d67 20%, #89a9d7 100%); }
.template-theme-option:nth-child(3) .template-theme-swatch { background: linear-gradient(145deg, #5e8b70 20%, #d5e4b7 100%); }
.template-theme-copy { display: grid; gap: 1px; min-width: 0; }
.template-theme-copy strong { overflow: hidden; color: var(--ink-deep); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.template-theme-copy small { color: var(--muted); font-size: 8px; line-height: 1.3; }

.lesson-card,
.case-packet,
.quiz-card,
.final-reason-card,
.template-complete-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.lesson-card { border-color: rgba(176, 120, 39, 0.42); background: linear-gradient(135deg, rgba(245, 237, 220, 0.7), transparent 70%), var(--surface); }
.lesson-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lesson-kicker,
.case-packet-kicker,
.quiz-kicker { color: var(--muted); font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: 0.12em; }
.lesson-status { padding: 4px 6px; border-radius: 999px; background: var(--attention-soft); color: var(--attention); font-family: var(--mono); font-size: 8px; font-weight: 700; }
.lesson-card h3,
.case-packet h3,
.quiz-card h3,
.final-reason-card h3,
.template-complete-card strong { margin: 7px 0 6px; color: var(--ink-deep); font-family: var(--display); font-size: 18px; letter-spacing: -0.035em; line-height: 1.25; }
.lesson-body,
.lesson-takeaway,
.case-packet-row p,
.final-reason-card p,
.template-complete-card p { margin: 0; color: var(--muted-deep); font-size: 11px; line-height: 1.65; }
.lesson-example { margin: 12px 0 9px; padding: 10px 11px; border-left: 2px solid var(--attention); background: var(--attention-soft); }
.lesson-example-label { display: block; margin-bottom: 3px; color: var(--attention); font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: 0.1em; }
.lesson-example p { margin: 0; color: var(--ink); font-size: 11px; line-height: 1.6; }
.lesson-takeaway { margin-bottom: 12px; color: var(--ink-deep); font-weight: 700; }
.quiz-locked { display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 7px 9px; align-items: center; padding: 13px; border: 1px dashed var(--line-strong); border-radius: 13px; background: var(--surface-muted); }
.quiz-locked-mark { display: grid; grid-row: 1 / span 2; place-items: center; width: 27px; height: 27px; border-radius: 9px; background: var(--surface); color: var(--muted-deep); font-family: var(--mono); font-size: 8px; font-weight: 800; }
.quiz-locked strong { color: var(--ink-deep); font-size: 11px; }
.quiz-locked p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.case-packet { border-color: rgba(88, 120, 173, 0.42); background: linear-gradient(135deg, rgba(230, 237, 246, 0.72), transparent 70%), var(--surface); }
.case-packet h3 { font-size: 19px; }
.case-packet-row { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.case-packet-row + .case-packet-row { margin-top: 8px; }
.case-packet-label { color: var(--accent-strong); font-family: var(--mono); font-size: 9px; font-weight: 800; }
.quiz-card { border-color: var(--border-strong); }
.quiz-card h3 { max-width: 760px; margin-top: 8px; font-size: 17px; }
.quiz-options { display: grid; gap: 7px; margin-top: 13px; }
.quiz-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--ink); cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
.quiz-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); }
.quiz-option input { margin: 3px 0 0; accent-color: var(--accent); }
.quiz-option-text { color: var(--ink); font-size: 11px; line-height: 1.5; }
.quiz-feedback { margin: 11px 0 0; padding: 9px 10px; border-radius: 9px; font-size: 10px; line-height: 1.55; }
.quiz-feedback.is-correct { border: 1px solid var(--success); background: var(--success-soft); color: var(--success); }
.quiz-feedback.is-wrong { border: 1px solid var(--danger); background: var(--danger-soft); color: var(--danger); }
.quiz-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.quiz-attempts { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.final-reason-card { border-color: var(--success); background: linear-gradient(135deg, rgba(225, 240, 234, 0.72), transparent 72%), var(--surface); }
.final-reason-card h3 { font-size: 19px; }
.final-reason-card p { margin-bottom: 11px; }
.final-reason-card .button { margin-top: 10px; }
.template-complete-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 3px 10px; align-items: center; border-color: var(--success); background: linear-gradient(135deg, rgba(225, 240, 234, 0.78), transparent 72%), var(--surface); }
.template-complete-mark { display: grid; grid-row: 1 / span 2; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--success); color: var(--on-accent); font-weight: 800; }
.template-complete-card strong { margin: 0; font-size: 17px; }
.template-complete-card p { grid-column: 2; }

.website-build-panel { margin-bottom: 18px; padding: 21px; }
.build-heading, .playground-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.build-heading .section-label, .playground-heading .section-label { margin-bottom: 6px; color: var(--accent-strong); }
.build-heading h2, .playground-heading h2 { margin: 0; color: var(--ink-deep); font-family: var(--display); font-size: 22px; letter-spacing: -0.04em; }
.build-heading p:not(.section-label), .playground-heading p:not(.section-label) { max-width: 670px; margin: 7px 0 0; color: var(--muted-deep); font-size: 11px; line-height: 1.6; }
.build-save-state, .playground-boundary { flex: 0 0 auto; padding: 6px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--muted-deep); font-family: var(--mono); font-size: 9px; font-weight: 700; }
.companion-dock { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 18px; padding: 12px 13px; border: 1px solid var(--border-strong); border-radius: 16px; background: linear-gradient(100deg, rgba(88, 120, 173, 0.1), transparent 58%), var(--surface); box-shadow: inset 3px 0 var(--accent), 0 7px 18px rgba(42, 58, 64, 0.06); }
.companion-dock-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.companion-mark { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: 0.04em; box-shadow: 3px 3px 0 var(--accent-soft); }
.companion-kicker { display: block; margin-bottom: 2px; color: var(--muted); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.companion-dock-identity strong { display: block; overflow: hidden; color: var(--ink-deep); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.companion-dock-copy { min-width: 0; }
.companion-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-deep); font-family: var(--mono); font-size: 9px; font-weight: 700; }
.companion-state i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.companion-dock-copy p { overflow: hidden; margin: 3px 0 0; color: var(--ink); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.companion-dock-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.companion-dock-actions .button { min-height: 36px; padding: 7px 10px; white-space: nowrap; }
.companion-dock[data-kind="saved"] { border-color: var(--success); background: linear-gradient(100deg, rgba(47, 128, 103, 0.11), transparent 58%), var(--surface); }
.companion-dock[data-kind="pass"] { border-color: var(--success); background: linear-gradient(100deg, rgba(47, 128, 103, 0.11), transparent 58%), var(--surface); }
.companion-dock[data-kind="rework"] { border-color: var(--attention); background: linear-gradient(100deg, rgba(176, 120, 39, 0.1), transparent 58%), var(--surface); }
.companion-dock[data-kind="confused"] { border-color: var(--accent); }
.hands-on-action-panel { display: grid; gap: 13px; margin-top: 13px; padding: 16px; border: 1px solid var(--border-strong); border-radius: 16px; background: linear-gradient(135deg, rgba(176, 120, 39, 0.09), transparent 58%), var(--surface-raised); box-shadow: inset 3px 0 var(--attention); }
.hands-on-action-panel[data-status="complete"] { border-color: var(--success); background: linear-gradient(135deg, rgba(47, 128, 103, 0.1), transparent 58%), var(--surface-raised); box-shadow: inset 3px 0 var(--success); }
.hands-on-action-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.hands-on-action-header .section-label { margin-bottom: 5px; color: var(--attention); }
.hands-on-action-header h3 { margin: 0; color: var(--ink-deep); font-family: var(--display); font-size: 18px; letter-spacing: -0.035em; }
.hands-on-action-header p:not(.section-label) { max-width: 700px; margin: 5px 0 0; color: var(--muted-deep); font-size: 11px; line-height: 1.55; }
.hands-on-action-stage { flex: 0 0 auto; padding: 6px 8px; border-radius: 999px; background: var(--attention-soft); color: var(--attention); font-family: var(--mono); font-size: 9px; font-weight: 750; white-space: nowrap; }
.hands-on-action-panel[data-status="complete"] .hands-on-action-stage { background: var(--success-soft); color: var(--success); }
.hands-on-action-body { display: grid; gap: 11px; min-width: 0; }
.hands-on-action-steps { display: grid; gap: 11px; }
.hands-on-action-lead, .hands-on-action-note { margin: 0; color: var(--muted-deep); font-size: 11px; line-height: 1.6; }
.hands-on-action-note { padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--surface-muted); color: var(--muted); font-size: 10px; }
.hands-on-check-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.hands-on-check { display: grid; grid-template-columns: 21px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.hands-on-check-mark { display: grid; place-items: center; width: 19px; height: 19px; margin-top: 1px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 11px; font-weight: 800; }
.hands-on-check[data-complete="false"] .hands-on-check-mark { background: var(--surface-muted); color: var(--muted); }
.hands-on-check-copy { display: grid; gap: 2px; min-width: 0; }
.hands-on-check-copy strong { color: var(--ink); font-size: 11px; line-height: 1.35; }
.hands-on-check-copy small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.hands-on-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.hands-on-action-buttons .button { flex: 1 1 180px; }
.hands-on-policy-field { display: grid; gap: 5px; max-width: 360px; color: var(--muted-deep); font-size: 10px; font-weight: 750; }
.hands-on-field-label { color: var(--ink-deep); }
.hands-on-policy-field select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: 11px; font-weight: 600; }
.hands-on-policy-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hands-on-policy-field select:disabled { cursor: wait; opacity: 0.62; }
.hands-on-action-panel .button { justify-self: start; min-height: 39px; }
.hands-on-action-panel .button:disabled { cursor: default; opacity: 0.55; }
.hands-on-complete-banner { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--success); border-radius: 11px; background: var(--mint-soft); }
.hands-on-complete-mark { display: grid; flex: 0 0 auto; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--success); color: var(--on-accent); font-weight: 800; }
.hands-on-complete-copy { display: grid; gap: 2px; }
.hands-on-complete-copy strong { color: var(--success); font-size: 11px; }
.hands-on-complete-copy span { color: var(--muted-deep); font-size: 10px; line-height: 1.45; }
.hands-on-action-feedback { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); color: var(--muted-deep); font-size: 10px; line-height: 1.5; }
.hands-on-action-feedback[data-kind="success"] { border-color: var(--success); background: var(--mint-soft); color: var(--success); }
.hands-on-action-feedback[data-kind="error"] { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.build-workspace { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(310px, 1.08fr); gap: 18px; margin-top: 18px; }
.editor-stack { display: grid; align-content: start; gap: 10px; min-width: 0; }
.editor-field { display: grid; gap: 6px; min-width: 0; }
.editor-label { display: flex; align-items: baseline; gap: 8px; color: var(--ink-deep); font-size: 11px; font-weight: 750; }
.editor-label small { color: var(--muted); font-size: 9px; font-weight: 500; }
.editor-field textarea { width: 100%; min-height: 170px; resize: vertical; padding: 12px; border: 1px solid var(--line-strong); border-radius: 11px; outline: 0; background: var(--code-surface); color: var(--code-text); font-family: var(--mono); font-size: 11px; line-height: 1.55; tab-size: 2; }
.editor-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.editor-field textarea:disabled { cursor: wait; opacity: 0.62; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.editor-help, .preview-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.artifact-feedback, .playground-feedback { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--muted-deep); font-size: 10px; line-height: 1.5; }
.artifact-feedback[data-kind="success"], .playground-feedback[data-kind="success"] { border-color: var(--success); background: var(--mint-soft); color: var(--success); }
.artifact-feedback[data-kind="error"], .playground-feedback[data-kind="error"] { border-color: var(--danger); background: var(--coral-soft); color: var(--danger); }
.artifact-feedback[data-kind="neutral"] { border-color: var(--line-strong); background: var(--surface-muted); color: var(--muted-deep); }
.preview-column { display: grid; align-content: start; gap: 9px; min-width: 0; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.preview-heading > div { display: grid; gap: 3px; }
.preview-heading strong { color: var(--ink-deep); font-size: 12px; }
.preview-kicker { color: var(--muted); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.12em; }
.preview-frame-wrap { min-height: 285px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; }
.preview-frame-wrap iframe { display: block; width: 100%; height: 285px; border: 0; background: #fff; }
.open-site-button { width: 100%; }

.playground-panel { margin-bottom: 18px; padding: 21px; }
.playground-heading { align-items: center; }
.playground-heading .section-label { color: var(--attention); }
.playground-layout { display: grid; grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr); gap: 18px; margin-top: 18px; }
.playground-library, .playground-form { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.playground-library { align-self: start; }
.playground-library-heading, .task-editor-heading, .playground-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.playground-library-heading h3, .task-editor-heading h3 { margin: 4px 0 0; color: var(--ink-deep); font-family: var(--display); font-size: 15px; letter-spacing: -0.025em; }
.playground-create-actions { display: grid; gap: 7px; margin-top: 15px; }
.playground-create-actions .button { width: 100%; }
.playground-course-list { display: grid; gap: 6px; margin-top: 15px; }
.playground-course-item { display: grid; gap: 5px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--ink); cursor: pointer; text-align: left; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.playground-course-item:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.playground-course-item.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); }
.playground-course-item strong { overflow: hidden; color: var(--ink-deep); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.playground-course-meta { display: flex; justify-content: space-between; gap: 7px; color: var(--muted); font-family: var(--mono); font-size: 8px; }
.playground-form { display: grid; align-content: start; gap: 12px; }
.playground-form-heading { align-items: center; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.playground-form-heading > span:last-child { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.field-label { display: grid; gap: 5px; color: var(--muted-deep); font-size: 10px; font-weight: 700; }
.field-label small { color: var(--muted); font-weight: 500; }
.field-label > input, .field-label > textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; background: var(--surface-raised); color: var(--ink); font-size: 11px; font-weight: 500; line-height: 1.5; }
.field-label > textarea { resize: vertical; }
.field-label > input:focus, .field-label > textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-label > input:disabled, .field-label > textarea:disabled { cursor: wait; opacity: 0.62; }
.field-label-short { max-width: 180px; }
.task-editor-heading { align-items: center; margin-top: 2px; padding-top: 4px; border-top: 1px solid var(--line); }
.task-editor-card { display: grid; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-raised); }
.task-editor-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-editor-card-heading strong { color: var(--ink-deep); font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.task-field { font-weight: 650; }
.field-label-text { color: var(--muted-deep); font-size: 10px; }
.playground-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.playground-form-actions .danger-text-button { margin-left: auto; color: var(--danger); }
.playground-empty-state { display: grid; align-content: center; justify-items: center; min-height: 310px; padding: 20px; color: var(--muted-deep); text-align: center; }
.empty-state-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; border: 1px dashed var(--line-strong); border-radius: 50%; color: var(--accent); font-size: 22px; }
.playground-empty-state strong { color: var(--ink-deep); font-size: 14px; }
.playground-empty-state p { max-width: 270px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.playground-completion-card { margin: 0 21px 18px; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--surface-muted), var(--surface)); }
.completion-card-kicker { color: var(--attention); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.12em; }
.playground-completion-card h3 { margin: 5px 0 6px; color: var(--ink-deep); font-family: var(--display); font-size: 15px; letter-spacing: -0.025em; }
.playground-completion-card > p { margin: 0 0 11px; color: var(--muted-deep); font-size: 10px; line-height: 1.55; }
.playground-criteria-list { display: grid; gap: 6px; margin: 0 0 13px; padding: 0; list-style: none; }
.playground-criterion { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 7px; align-items: start; padding: 7px 0; border-top: 1px solid var(--line); }
.criterion-icon { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 800; }
.playground-criterion[data-status="SELF_REPORTED"] .criterion-icon, .playground-criterion[data-status="TEACHER_CONFIRMED"] .criterion-icon { background: var(--mint-soft); color: var(--success); }
.criterion-copy { display: grid; gap: 2px; min-width: 0; }
.criterion-copy strong { color: var(--ink); font-size: 10px; line-height: 1.4; }
.criterion-copy small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.criterion-status { color: var(--muted); font-family: var(--mono); font-size: 8px; white-space: nowrap; }
.playground-completion-card .field-label { margin-top: 10px; }
.playground-completion-card .button { width: 100%; }
.danger-text-button { color: var(--danger); }
.danger-text-button:hover { color: var(--danger); }

.intro-mark {
  display: grid;
  justify-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 4px 10px 0 26px;
  border-left: 1px solid var(--line);
}

.progress-ring {
  --progress: 0%;
  position: relative;
  display: grid;
  place-items: center;
  width: 83px;
  height: 83px;
  border-radius: 50%;
  background: conic-gradient(var(--cobalt) var(--progress), rgba(44, 99, 230, 0.12) 0);
}

.progress-ring::before {
  position: absolute;
  width: 67px;
  height: 67px;
  border-radius: 50%;
  background: var(--canvas);
  content: "";
}

.progress-ring span {
  position: relative;
  z-index: 1;
  color: var(--ink-deep);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.progress-caption {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.workspace-grid {
  display: grid;
  grid-template-areas: "journey focus proof";
  grid-template-columns: minmax(220px, 0.76fr) minmax(430px, 1.7fr) minmax(260px, 0.92fr);
  align-items: start;
  gap: 18px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2,
.ta-heading h2 {
  margin: 5px 0 0;
  color: var(--ink-deep);
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.035em;
}

.journey-panel {
  grid-area: journey;
  min-height: 638px;
  padding: 25px 20px 20px;
  background: var(--surface-muted);
  border-color: var(--border);
  box-shadow: none;
  color: var(--text-primary);
}

.journey-heading { padding: 0 4px 20px; }
.journey-heading .section-label { color: var(--text-muted); }
.journey-heading h2 { color: var(--text-primary); }
.quiet-count { color: var(--text-muted); font-family: var(--mono); font-size: 10px; }

.journey-list {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 5px 0 8px;
  margin: 0;
  list-style: none;
}

.journey-list::before {
  position: absolute;
  top: 26px;
  bottom: 31px;
  left: 14px;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-strong), transparent);
  content: "";
}

.journey-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  min-height: 126px;
  padding: 0 4px 13px;
}

.journey-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.journey-item[data-status="PASS"] .journey-node { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.journey-item[data-status="SELF_REPORTED"] .journey-node,
.journey-item[data-status="TEACHER_CONFIRMED"] .journey-node { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.journey-item[data-status="REMEDIATE"] .journey-node { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.journey-item[data-status="RETRY"] .journey-node { border-color: var(--attention); background: var(--attention-soft); color: var(--attention); }
.journey-item[data-current="true"] .journey-node { box-shadow: 0 0 0 4px var(--accent-soft); }
.journey-item[data-current="true"] { border-radius: 12px; box-shadow: inset 2px 0 var(--accent); }
.journey-item[data-status="LOCKED"] { opacity: 0.62; }

.journey-item-copy { min-width: 0; padding-top: 1px; }
.journey-item-kicker { margin: 0 0 3px; color: var(--text-muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.journey-item h3 { margin: 0 0 5px; color: var(--text-primary); font-size: 14px; font-weight: 700; line-height: 1.35; }
.journey-item p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.55; }
.journey-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--text-secondary); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }
.journey-status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.journey-item[data-status="PASS"] .journey-status { color: var(--mint); }
.journey-item[data-status="SELF_REPORTED"] .journey-status,
.journey-item[data-status="TEACHER_CONFIRMED"] .journey-status { color: var(--mint); }
.journey-item[data-status="REMEDIATE"] .journey-status { color: var(--coral); }
.journey-item[data-status="RETRY"] .journey-status { color: var(--sun); }
.journey-item[data-current="true"] .journey-status { color: var(--sun); }

.journey-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 9px 4px 0;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.note-mark { flex: 0 0 auto; margin-top: -2px; color: var(--accent); font-size: 20px; line-height: 1; }
.journey-note p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.6; }

.focus-column {
  display: grid;
  grid-area: focus;
  gap: 18px;
  min-width: 0;
}

.mission-card {
  position: relative;
  min-height: 228px;
  overflow: hidden;
  border: 0;
  background: var(--focus-surface);
  box-shadow: var(--shadow-deep);
  color: var(--surface);
}

.mission-card::after { position: absolute; top: 0; bottom: 0; left: 0; z-index: 2; width: 4px; background: var(--attention); content: ""; opacity: 0.84; }

.mission-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 89% 22%, rgba(224, 178, 92, 0.16), transparent 9rem),
    radial-gradient(circle at 17% 115%, rgba(145, 169, 214, 0.2), transparent 18rem),
    var(--focus-surface);
}

.mission-backdrop::before,
.mission-backdrop::after {
  position: absolute;
  border: 1px solid rgba(243, 244, 239, 0.1);
  border-radius: 50%;
  content: "";
}

.mission-backdrop::before { top: -7rem; right: -3rem; width: 22rem; height: 22rem; }
.mission-backdrop::after { top: -3rem; right: 1rem; width: 14rem; height: 14rem; border-color: rgba(224, 178, 92, 0.16); }

.mission-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 25px;
  min-height: 228px;
  padding: 27px 30px 25px;
}

.mission-index { display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; }
.mission-index .section-label { color: var(--focus-muted); }
.mission-index strong { margin-top: 3px; color: var(--sun); font-family: var(--display); font-size: clamp(77px, 8vw, 111px); font-weight: 700; letter-spacing: -0.1em; line-height: 0.9; }
.mission-total { margin: 6px 0 0 7px; color: var(--focus-muted); font-family: var(--mono); font-size: 10px; opacity: 0.78; }

.mission-copy { align-self: center; min-width: 0; }
.mission-status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mission-kicker { color: var(--focus-muted); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.mission-copy h2 { max-width: 550px; margin: 11px 0 8px; color: var(--focus-text); font-family: var(--display); font-size: clamp(24px, 3.25vw, 36px); font-weight: 700; letter-spacing: -0.055em; line-height: 1.1; }
.mission-copy > p { max-width: 550px; margin-bottom: 18px; color: var(--focus-muted); font-size: 13px; line-height: 1.65; }

.status-pill,
.proof-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-ready { background: var(--attention-soft); color: var(--attention); }
.status-pass { background: var(--mint-soft); color: var(--mint); }
.status-self_reported,
.status-teacher_confirmed { background: var(--mint-soft); color: var(--mint); }
.status-remediate { background: var(--coral-soft); color: var(--coral); }
.status-retry { background: var(--amber-soft); color: var(--amber); }
.status-locked { background: rgba(112, 128, 138, 0.13); color: var(--muted-deep); }

.mission-card .status-pass,
.mission-card .status-remediate,
.mission-card .status-retry,
.mission-card .status-locked { background: rgba(243, 244, 239, 0.12); color: var(--focus-text); }

.next-step {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 11px;
  border-left: 2px solid var(--attention);
  background: rgba(243, 244, 239, 0.08);
}

.next-step-label { color: var(--attention); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.next-step strong { overflow: hidden; color: var(--focus-text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.ta-panel {
  display: flex;
  /* Phase 2.6c baseline was height: clamp(420px, 46vh, 470px); this pass gives the timeline the reclaimed space. */
  height: clamp(520px, 56vh, 580px);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.ta-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 25px 13px;
  border-bottom: 1px solid var(--line);
}

.ta-title-group { display: flex; align-items: center; gap: 11px; }
.ta-heading-tools { display: flex; align-items: center; justify-content: flex-end; gap: 13px; }
.clear-chat-button { min-height: 40px; padding: 7px 8px; border-radius: 8px; color: var(--text-muted); text-decoration: none; }
.clear-chat-button:hover { background: var(--surface-muted); color: var(--text-primary); }
.ta-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 9px; font-weight: 700; box-shadow: 3px 3px 0 var(--accent-soft); }
.ta-heading .section-label { color: var(--cobalt-dark); }
.ta-profile-label { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.ta-presence { display: inline-flex; align-items: center; gap: 7px; max-width: 240px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.02em; }
.ta-presence i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px var(--mint-soft); }
.ta-presence[data-kind="pass"] i,
.ta-presence[data-kind="saved"] i { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.ta-presence[data-kind="rework"] i { background: var(--attention); box-shadow: 0 0 0 4px var(--attention-soft); }

.message-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 18px 25px 56px;
  overscroll-behavior: contain;
  scroll-padding-block: 14px 66px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

.message-region { position: relative; display: flex; flex: 1 1 auto; min-height: 0; max-height: none; overflow: hidden; }
.message-region .message-list { width: 100%; min-height: 0; max-height: none; }
.jump-latest { position: absolute; right: 21px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 11px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-raised); color: var(--text-secondary); box-shadow: 0 7px 18px rgba(42, 58, 64, 0.12); cursor: pointer; font-size: 10px; font-weight: 700; }
.jump-latest:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.jump-latest span { color: var(--accent); font-size: 14px; line-height: 0.8; }
.chat-empty-state { display: grid; align-content: center; justify-items: center; min-height: 100%; padding: 28px 24px; color: var(--text-secondary); text-align: center; }
.chat-empty-mark { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 11px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-muted); color: var(--accent); font-size: 18px; }
.chat-empty-state strong { color: var(--text-primary); font-size: 13px; }
.chat-empty-state p { max-width: 260px; margin: 5px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.55; }
.chat-empty-state .button { margin-top: 14px; }

.message {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 13px;
}

.message-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--focus-surface); color: var(--focus-text); font-family: var(--mono); font-size: 9px; font-weight: 700; }
.message-student { grid-template-columns: minmax(0, 1fr) 32px; }
.message-student .message-avatar { order: 2; background: var(--sun); color: var(--ink-deep); }
.message-body { min-width: 0; }
.message-student .message-body { display: flex; flex-direction: column; align-items: flex-end; }
.message-meta { display: flex; align-items: baseline; gap: 8px; margin: 0 0 5px; }
.message-student .message-meta { justify-content: flex-end; }
.message-role { color: var(--muted-deep); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.07em; }
.message-time { color: var(--text-muted); font-family: var(--mono); font-size: 9px; }
.message-bubble { width: fit-content; max-width: min(100%, 680px); padding: 10px 13px; border: 1px solid var(--line); border-radius: 4px 15px 15px 15px; background: var(--surface-soft); color: var(--ink); font-size: 13px; line-height: 1.68; }
.message-student .message-bubble { border-color: var(--accent-soft); border-radius: 15px 4px 15px 15px; background: var(--surface-blue); color: var(--ink-deep); }
.message[data-kind="error"] .message-bubble { border-color: var(--danger); background: var(--coral-soft); }
.message[data-kind="human-confirmed"] .message-bubble,
.message[data-kind="complete"] .message-bubble { border-color: var(--success); background: var(--mint-soft); }

.markdown p { margin: 0 0 0.7em; }
.markdown p:last-child { margin-bottom: 0; }
.markdown h1,
.markdown h2,
.markdown h3 { margin: 0.15em 0 0.45em; color: var(--ink-deep); font-family: var(--display); font-size: 1.08em; }
.markdown ul,
.markdown ol { margin: 0.4em 0 0.7em 1.2em; padding: 0; }
.markdown li { margin: 0.2em 0; }
.markdown blockquote { margin: 0.5em 0; padding-left: 0.85em; border-left: 2px solid var(--cobalt); color: var(--muted-deep); }
.markdown code { padding: 0.1em 0.35em; border-radius: 5px; background: var(--accent-soft); color: var(--cobalt-dark); font-family: var(--mono); font-size: 0.88em; }
.markdown pre { overflow: auto; margin: 0.65em 0; padding: 10px 12px; border-radius: 9px; background: var(--code-surface); color: var(--code-text); font-family: var(--mono); font-size: 0.84em; line-height: 1.55; }
.markdown pre code { padding: 0; background: transparent; color: inherit; }
.markdown a { color: var(--cobalt-dark); text-decoration: underline; text-underline-offset: 2px; }

.message-loading .message-bubble { display: inline-flex; align-items: center; gap: 5px; min-height: 39px; color: var(--muted-deep); }
.message-streaming .message-bubble { min-height: 39px; }
.message-streaming .message-bubble::after { display: inline-block; width: 5px; height: 1.1em; margin-left: 4px; vertical-align: -0.16em; background: var(--accent); content: ""; animation: stream-caret 0.9s steps(2, jump-none) infinite; }
.loading-dots { display: inline-flex; gap: 3px; }
.loading-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--cobalt); animation: dot-pulse 1.1s infinite ease-in-out; }
.loading-dots i:nth-child(2) { animation-delay: 0.15s; }
.loading-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes dot-pulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@keyframes stream-caret {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0.2; }
}

.prompt-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 8px 25px 7px;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
}

.prompt-label { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-weight: 650; }
.prompt-chip { flex: 0 0 auto; min-height: 29px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted-deep); cursor: pointer; font-size: 10px; transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease; }
.prompt-chip:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--cobalt-dark); transform: translateY(-1px); }

.chat-composer { display: flex; flex: 0 0 auto; align-items: flex-end; gap: 9px; padding: 7px 25px 13px; scroll-margin-bottom: 110px; }
.chat-composer textarea { display: block; min-width: 0; min-height: 42px; max-height: 120px; flex: 1; resize: none; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; outline: 0; background: var(--surface); color: var(--ink); font-size: 13px; line-height: 1.5; transition: border-color 160ms ease, box-shadow 160ms ease; }
.chat-composer textarea::placeholder { color: var(--text-muted); }
.chat-composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chat-composer textarea:disabled { cursor: wait; opacity: 0.6; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 9px 14px; border-radius: 11px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: wait; opacity: 0.52; }
.button-dark { background: var(--focus-deep); color: var(--focus-text); }
.button-dark:hover:not(:disabled) { background: var(--accent-strong); color: var(--on-accent); box-shadow: 0 6px 18px rgba(42, 58, 64, 0.16); }
.chat-send { min-width: 76px; }
.button-arrow { font-size: 15px; line-height: 1; }

.chat-error { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; margin: -3px 25px 10px; padding: 9px 11px; border: 1px solid var(--danger); border-radius: 10px; background: var(--coral-soft); color: var(--danger); font-size: 11px; line-height: 1.4; }
.text-button { flex: 0 0 auto; padding: 2px 0; background: transparent; color: var(--cobalt-dark); cursor: pointer; font-size: 11px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--cobalt); }

.ta-footer { display: flex; flex: 0 0 auto; justify-content: space-between; gap: 12px; padding: 9px 25px 12px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 9px; }
.ta-footer > span { display: inline-flex; align-items: center; gap: 6px; }
.footer-check { display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--mint-soft); color: var(--mint); font-family: var(--body); font-size: 9px; font-style: normal; font-weight: 800; }

.proof-panel {
  display: flex;
  grid-area: proof;
  min-height: 0;
  max-height: 638px;
  flex-direction: column;
  overflow: hidden;
}

.proof-heading { padding: 25px 21px 17px; }
.proof-heading .section-label { color: var(--mint); }
.proof-state { background: var(--surface-soft); color: var(--muted-deep); }

.assessment-summary { margin: 0 21px 14px; padding: 15px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.assessment-summary.summary-pass { border-color: var(--success); background: var(--mint-soft); }
.assessment-summary.summary-rework { border-color: var(--danger); background: var(--coral-soft); }
.assessment-summary.summary-retry { border-color: var(--attention); background: var(--amber-soft); }
.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.summary-heading strong { color: var(--ink-deep); font-size: 14px; }
.summary-copy { margin: 6px 0 0; color: var(--muted-deep); font-size: 11px; line-height: 1.6; }
.summary-count { display: inline-flex; align-items: baseline; gap: 4px; margin-top: 11px; color: var(--ink-deep); }
.summary-count strong { font-family: var(--display); font-size: 25px; line-height: 1; }
.summary-count span { color: var(--muted); font-size: 10px; }

.evidence-list { display: grid; flex: 1 1 auto; gap: 8px; min-height: 0; overflow: auto; padding: 0 21px 18px; }
.empty-state { padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); color: var(--muted-deep); font-size: 11px; line-height: 1.6; }
.proof-group { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.proof-group[open] { border-color: var(--line-strong); }
.proof-group summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; cursor: pointer; list-style: none; }
.proof-group summary::-webkit-details-marker { display: none; }
.proof-group summary::after { flex: 0 0 auto; color: var(--muted); content: "+"; font-family: var(--mono); font-size: 13px; }
.proof-group[open] summary::after { content: "–"; }
.proof-group-title { display: grid; gap: 2px; min-width: 0; }
.proof-group-kicker { color: var(--muted); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.proof-group-title strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.proof-status { flex: 0 0 auto; padding: 4px 6px; border-radius: 999px; font-family: var(--mono); font-size: 8px; font-weight: 700; }
.proof-status-pass { background: var(--mint-soft); color: var(--mint); }
.proof-status-self_reported,
.proof-status-teacher_confirmed { background: var(--mint-soft); color: var(--mint); }
.proof-status-remediate { background: var(--coral-soft); color: var(--danger); }
.proof-status-retry { background: var(--amber-soft); color: var(--attention); }
.proof-checks { display: grid; gap: 7px; padding: 0 12px 12px; }
.proof-check { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 7px; align-items: start; padding-top: 7px; border-top: 1px solid var(--line); }
.check-icon { display: grid; place-items: center; width: 17px; height: 17px; margin-top: 1px; border-radius: 50%; background: var(--mint-soft); color: var(--mint); font-size: 10px; font-weight: 800; }
.proof-check[data-passed="false"] .check-icon { background: var(--coral-soft); color: var(--coral); }
.proof-check-copy { min-width: 0; }
.proof-check-label { display: block; color: var(--ink); font-size: 11px; font-weight: 650; line-height: 1.4; }
.proof-check-detail { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }

.dev-details { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface-muted); }
.dev-details summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 21px; cursor: pointer; color: var(--muted-deep); font-size: 11px; font-weight: 700; list-style: none; }
.dev-details summary::-webkit-details-marker { display: none; }
.dev-details summary::after { color: var(--muted); content: "+"; font-family: var(--mono); font-size: 13px; }
.dev-details[open] summary::after { content: "–"; }
.dev-summary-hint { color: var(--muted); font-family: var(--mono); font-size: 8px; font-weight: 500; }
.dev-details > p { margin: 0; padding: 0 21px 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dev-details pre { max-height: 250px; overflow: auto; margin: 0 13px 14px; padding: 11px; border-radius: 9px; background: var(--code-surface); color: var(--code-text); font-family: var(--mono); font-size: 9px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.dev-flavor-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0 13px 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.dev-flavor-copy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.dev-flavor-kicker { color: var(--muted-deep); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }
.dev-flavor-copy strong { color: var(--danger); font-family: var(--mono); font-size: 9px; }
.dev-flavor-copy strong[data-enabled="true"] { color: var(--success); }
.dev-flavor-copy code { overflow: hidden; max-width: 145px; padding: 2px 5px; border-radius: 5px; background: var(--surface-muted); color: var(--muted-deep); font-family: var(--mono); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dev-flavor-options { display: flex; gap: 5px; }
.dev-flavor-option { min-height: 30px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface-raised); color: var(--muted-deep); cursor: pointer; font-family: var(--mono); font-size: 8px; font-weight: 700; }
.dev-flavor-option:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.dev-flavor-option[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 -2px var(--accent); }
.dev-flavor-option:disabled { cursor: wait; opacity: 0.55; }

.action-dock {
  position: sticky;
  bottom: 0;
  z-index: 5;
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
  box-shadow: 0 -10px 24px rgba(42, 58, 64, 0.05);
  backdrop-filter: blur(16px);
}

.action-dock-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 24px;
  width: min(1380px, calc(100% - 56px));
  min-height: 76px;
  margin: 0 auto;
  padding: 12px 0;
}

.action-context { display: flex; align-items: center; gap: 10px; min-width: 0; }
.action-dot { display: block; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 5px var(--sun-soft); }
.action-context > div { display: grid; gap: 1px; min-width: 0; }
.action-context strong { overflow: hidden; color: var(--ink-deep); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.action-context span:not(.action-dot) { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.action-group { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.assistance-action { grid-column: 2; justify-self: end; color: var(--muted-deep); font-size: 10px; }
.assistance-action summary { padding: 3px 0; cursor: pointer; color: var(--muted-deep); font-weight: 700; list-style: none; text-align: right; text-underline-offset: 3px; }
.assistance-action summary::-webkit-details-marker { display: none; }
.assistance-action summary::after { margin-left: 5px; color: var(--muted); content: "+"; font-family: var(--mono); }
.assistance-action[open] summary::after { content: "–"; }
.assistance-action-body { display: grid; justify-items: end; gap: 7px; max-width: 310px; margin-top: 5px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); }
.assistance-action-body p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; text-align: right; }
.assistance-action-body .button { min-height: 34px; padding: 7px 10px; font-size: 10px; }
.button-quiet { background: transparent; color: var(--muted-deep); }
.button-quiet:hover:not(:disabled) { background: var(--surface-soft); color: var(--ink); }
.button-outline { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.button-outline:hover:not(:disabled) { border-color: var(--cobalt); background: var(--cobalt-soft); color: var(--cobalt-dark); }
.button-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(88, 120, 173, 0.18); }
.button-primary:hover:not(:disabled) { background: var(--accent-strong); box-shadow: 0 8px 20px rgba(88, 120, 173, 0.24); }
.button-icon { font-size: 16px; line-height: 1; }

/* Disabled controls must read as a deliberate state in both appearances;
   individual button variants may not reintroduce an active-looking fill. */
body.phase-211c-pruned button:disabled,
body.phase-211c-pruned input:disabled,
body.phase-211c-pruned select:disabled,
body.phase-211c-pruned textarea:disabled {
  border-color: var(--disabled-border) !important;
  background: var(--disabled-bg) !important;
  color: var(--disabled-text) !important;
  box-shadow: none !important;
  cursor: not-allowed;
  opacity: 1;
}

.action-feedback { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--muted-deep); font-size: 11px; }
.action-feedback[data-kind="error"] { border-color: var(--danger); background: var(--coral-soft); color: var(--danger); }
.action-feedback[data-kind="success"] { border-color: var(--success); background: var(--mint-soft); color: var(--success); }

.toast { position: fixed; right: 22px; bottom: 94px; z-index: 20; max-width: min(360px, calc(100% - 44px)); padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--focus-deep); color: var(--focus-text); box-shadow: var(--shadow-deep); font-size: 11px; line-height: 1.5; }

.clear-chat-dialog { width: min(390px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-deep); }
.clear-chat-dialog::backdrop { background: rgba(25, 35, 40, 0.42); backdrop-filter: blur(2px); }
.clear-chat-dialog form { padding: 25px; }
.dialog-eyebrow { margin-bottom: 7px; color: var(--accent-strong); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; }
.clear-chat-dialog h2 { margin: 0 0 9px; color: var(--text-primary); font-family: var(--display); font-size: 22px; letter-spacing: -0.04em; line-height: 1.2; }
.clear-chat-dialog form > p:not(.dialog-eyebrow) { margin-bottom: 21px; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] body::before { opacity: 0.55; }
  :root[data-theme="system"] .site-atmosphere { opacity: 0.2; }
}

:root[data-theme="dark"] body::before { opacity: 0.55; }
:root[data-theme="dark"] .site-atmosphere { opacity: 0.2; }

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

@media (max-width: 1179px) {
  .header-inner,
  .app-main,
  .action-dock-inner { width: min(100% - 40px, 980px); }

  .header-inner { grid-template-columns: minmax(210px, 1fr) minmax(230px, 1fr) auto; gap: 18px; }
  .action-dock { position: relative; bottom: auto; }
  .action-dock-inner { min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
  .workspace-grid { grid-template-areas: "focus proof" "journey proof"; grid-template-columns: minmax(0, 1.34fr) minmax(270px, 0.76fr); }
  .journey-panel,
  .proof-panel { min-height: 0; }
  .journey-panel { padding-bottom: 18px; }
  .journey-list { grid-template-columns: repeat(4, minmax(145px, 1fr)); gap: 10px; overflow-x: auto; padding: 4px 0 8px; }
  .journey-list::before { top: 18px; right: 30px; bottom: auto; left: 30px; width: auto; height: 1px; background: linear-gradient(to right, var(--border-strong), transparent); }
  .journey-item { grid-template-columns: 30px minmax(0, 1fr); min-height: 109px; padding: 0; }
  .journey-note { margin-top: 8px; }
  .proof-panel { height: min(638px, 100%); max-height: 638px; }
  .evidence-list { max-height: 420px; }
  .space-switcher { grid-template-columns: minmax(200px, 0.8fr) minmax(360px, 1.2fr); }
  .showcase-view-switcher { grid-template-columns: minmax(200px, 0.8fr) minmax(360px, 1.2fr); }
  .build-workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .editor-field textarea { min-height: 150px; }
  .playground-layout { grid-template-columns: minmax(205px, 0.76fr) minmax(0, 1.24fr); }
}

@media (max-width: 767px) {
  .header-inner,
  .app-main,
  .action-dock-inner { width: min(calc(100% - 32px), 560px); }

  .header-inner { display: flex; flex-wrap: wrap; gap: 0; min-height: 68px; padding: 13px 0 11px; }
  .brand { flex: 1 1 auto; }
  .brand-context,
  .brand-divider { display: none; }
  .header-actions { flex: 0 0 auto; gap: 6px; }
  .header-student { flex: 0 0 auto; }
  .header-progress { margin-left: 8px; padding-left: 9px; }
  .appearance-button { padding-right: 8px; padding-left: 8px; }
  .header-course { order: 3; width: 100%; padding: 9px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .header-course strong { font-size: 12px; }

  .app-main { padding: 30px 0 26px; }
  .intro-row { align-items: flex-start; gap: 20px; margin-bottom: 22px; }
  .intro-copy h1 { margin-top: 8px; font-size: clamp(31px, 9vw, 44px); }
  .intro-description { font-size: 12px; line-height: 1.65; }
  .intro-mark { padding-left: 14px; }
  .progress-ring { width: 66px; height: 66px; }
  .progress-ring::before { width: 52px; height: 52px; }
  .progress-ring span { font-size: 10px; }
  .progress-caption { font-size: 9px; }

  .connection-panel { grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; padding: 17px; border-radius: 22px; }
  .connection-title-row h2 { font-size: 18px; }
  .connection-settings-toggle { justify-self: start; }
  .connection-settings-panel { padding-top: 12px; }
  .connection-key-row { display: grid; grid-template-columns: minmax(0, 1fr) 1fr; }
  .connection-key-input { grid-column: 1 / -1; width: 100%; }
  .connection-key-row .button { width: 100%; }
  .connection-demo-button { margin-left: 0; }

  .space-switcher { grid-template-columns: 1fr; gap: 13px; padding: 17px; border-radius: 22px; }
  .space-options { grid-template-columns: 1fr 1fr; }
  .space-option { min-height: 58px; padding: 9px; }
  .space-option strong { font-size: 11px; }
  .space-option small { font-size: 9px; }
  .showcase-view-switcher { grid-template-columns: 1fr; gap: 13px; padding: 17px; border-radius: 22px; }
  .showcase-view-options { gap: 7px; }
  .showcase-view-option { min-height: 54px; padding: 8px 9px; }
  .showcase-view-option strong { font-size: 10px; }
  .showcase-view-option small { font-size: 8px; }
  .website-build-panel, .playground-panel { padding: 17px; border-radius: 22px; }
  .build-heading, .playground-heading { display: block; }
  .build-save-state, .playground-boundary { display: inline-flex; margin-top: 11px; }
  .companion-dock { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  .companion-dock-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .companion-dock-actions .button { width: 100%; }
  .companion-dock-copy p { white-space: normal; }
  .hands-on-action-panel { padding: 13px; border-radius: 14px; }
  .hands-on-action-header { display: block; }
  .hands-on-action-stage { display: inline-flex; margin-top: 9px; }
  .hands-on-action-buttons { display: grid; grid-template-columns: 1fr; }
  .hands-on-action-buttons .button { width: 100%; }
  .hands-on-policy-field { max-width: none; }
  .build-workspace, .playground-layout { grid-template-columns: 1fr; gap: 14px; }
  .editor-field textarea { min-height: 145px; }
  .preview-frame-wrap, .preview-frame-wrap iframe { min-height: 235px; height: 235px; }
  .playground-completion-card { margin-right: 17px; margin-left: 17px; }
  .playground-form-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .playground-form-actions .button { width: 100%; }
  .playground-form-actions .danger-text-button { grid-column: 1 / -1; margin-left: 0; justify-self: start; }

  .workspace-grid { grid-template-areas: "focus" "journey" "proof"; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .focus-column { gap: 14px; }
  .mission-card { min-height: 224px; border-radius: 22px; }
  .mission-content { grid-template-columns: 73px minmax(0, 1fr); gap: 15px; min-height: 224px; padding: 22px 19px; }
  .mission-index strong { font-size: 68px; }
  .mission-copy h2 { margin-top: 9px; font-size: 26px; }
  .mission-copy > p { margin-bottom: 14px; font-size: 12px; }
  .next-step { display: block; width: 100%; padding: 8px 9px; }
  .next-step-label { display: block; margin-bottom: 2px; }
  .next-step strong { display: block; white-space: normal; }

  .ta-panel { height: clamp(500px, 64vh, 560px); min-height: 0; }
  .ta-heading { align-items: flex-start; padding: 15px 17px 11px; }
  .ta-heading-tools { gap: 8px; }
  .ta-presence { padding-top: 5px; font-size: 8px; }
  .message-region { min-height: 0; max-height: none; }
  .message-list { min-height: 0; max-height: none; padding: 16px 17px 52px; scroll-padding-block: 12px 52px; }
  .message { grid-template-columns: 29px minmax(0, 1fr); gap: 8px; }
  .message-student { grid-template-columns: minmax(0, 1fr) 29px; }
  .message-avatar { width: 27px; height: 27px; border-radius: 9px; font-size: 8px; }
  .message-bubble { padding: 9px 11px; font-size: 12px; line-height: 1.62; }
  .prompt-row { padding: 7px 17px 6px; }
  .chat-composer { padding: 6px 17px 11px; scroll-margin-bottom: 190px; }
  .chat-error { margin-right: 17px; margin-left: 17px; }
  .ta-footer { flex-wrap: wrap; padding: 8px 17px 11px; font-size: 8px; }

  .journey-panel { padding: 18px 15px 15px; border-radius: 22px; }
  .journey-heading { padding: 0 2px 13px; }
  .journey-list { display: flex; gap: 9px; margin: 0 -2px; padding: 4px 2px 10px; }
  .journey-list::before { right: 24px; left: 24px; }
  .journey-item { display: grid; grid-template-columns: 29px minmax(132px, 1fr); gap: 9px; min-width: 170px; min-height: 111px; padding: 0; }
  .journey-item h3 { font-size: 12px; }
  .journey-item p { font-size: 10px; }
  .journey-note { padding-top: 13px; }

  .proof-panel { max-height: none; border-radius: 22px; }
  .proof-heading { padding: 18px 17px 13px; }
  .assessment-summary { margin-right: 17px; margin-left: 17px; }
  .evidence-list { max-height: none; padding-right: 17px; padding-left: 17px; }
  .dev-details summary { padding-right: 17px; padding-left: 17px; }
  .dev-details > p { padding-right: 17px; padding-left: 17px; }
  .dev-flavor-control { grid-template-columns: 1fr; margin-right: 17px; margin-left: 17px; }
  .dev-flavor-options { display: grid; grid-template-columns: 1fr 1fr; }
  .dev-flavor-option { width: 100%; }

  .action-dock-inner { grid-template-columns: 1fr; gap: 10px; padding: 11px 0 13px; }
  .action-context { order: 1; }
  .action-group { order: 2; display: grid; grid-template-columns: 1fr 1fr; }
  .action-group .button { width: 100%; min-height: 42px; padding-right: 8px; padding-left: 8px; }
  .action-group .button-primary { grid-column: 1 / -1; grid-row: 1; }
  .action-group .button-outline { grid-column: 1; grid-row: 2; }
  .action-group .button-quiet { grid-column: 2; grid-row: 2; }
  .assistance-action { grid-column: 1; justify-self: stretch; order: 3; }
  .assistance-action summary { text-align: left; }
  .assistance-action-body { justify-items: start; max-width: none; }
  .assistance-action-body p { text-align: left; }
  .action-feedback { order: 4; }
  .toast { right: 16px; bottom: 150px; max-width: calc(100% - 32px); }
  .jump-latest { right: 14px; bottom: 10px; }
}

@media (max-width: 420px) {
  .intro-mark { display: none; }
  .header-actions { gap: 5px; }
  .header-student .student-identity,
  .header-student .header-progress { display: none; }
  .appearance-button { min-width: 34px; padding-right: 7px; padding-left: 7px; }
  .appearance-value { display: none; }
  .ta-heading { display: block; }
  .ta-presence { margin-top: 9px; }
  .ta-heading-tools { display: block; }
  .clear-chat-button { margin-top: 5px; margin-left: -8px; }
  .appearance-label { display: none; }
  .appearance-value { max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-send { min-width: 62px; padding-right: 10px; padding-left: 10px; }
  .chat-send .button-arrow { display: none; }
  .brand-word { font-size: 18px; }
  .header-progress { font-size: 9px; }
  .header-progress strong { font-size: 11px; }
  .space-options { gap: 6px; }
  .space-option { grid-template-columns: 27px minmax(0, 1fr); gap: 7px; min-height: 54px; padding: 7px; }
  .space-option-icon { width: 27px; height: 27px; font-size: 8px; }
  .space-option strong { font-size: 10px; }
  .space-option small { font-size: 8px; }
  .playground-library, .playground-form { padding: 12px; }
  .playground-criterion { grid-template-columns: 18px minmax(0, 1fr); }
  .criterion-status { grid-column: 2; }
}

@media (max-width: 1179px) {
  .course-picker-heading { gap: 12px; }
  .showcase-template-list { gap: 8px; }
  .template-card { padding: 11px; }
  .template-card-copy strong { font-size: 14px; }
  .template-action-layout { grid-template-columns: minmax(0, 1fr) minmax(250px, 0.82fr); gap: 13px; }
}

@media (max-width: 767px) {
  .course-picker,
  .template-action-panel { padding: 17px; border-radius: 22px; }
  .course-picker-heading,
  .template-action-heading { display: block; }
  .course-picker-heading h2,
  .template-action-heading h2 { font-size: 21px; }
  .course-picker-note,
  .template-action-state { display: inline-flex; margin-top: 12px; }
  .showcase-template-list { grid-template-columns: 1fr; margin-top: 15px; }
  .template-card { min-height: 0; }
  .template-card-playground { grid-column: auto; grid-template-columns: 34px minmax(0, 1fr); }
  .template-card-playground .template-card-meta { grid-column: 2; justify-self: start; }
  .template-action-layout { grid-template-columns: 1fr; gap: 14px; }
  .template-action-heading p:not(.section-label) { font-size: 11px; }
  .template-action-controls > .button,
  .template-action-panel .final-reason-card > .button { width: 100%; }
  .template-mini-preview iframe { height: 250px; min-height: 220px; }
  .template-theme-grid { grid-template-columns: 1fr; }
  .case-packet-row { grid-template-columns: 1fr; gap: 3px; }
  .quiz-card,
  .lesson-card,
  .case-packet,
  .final-reason-card,
  .template-complete-card { padding: 13px; }
  .quiz-option { grid-template-columns: 17px minmax(0, 1fr); padding: 9px; }
  .quiz-actions { align-items: stretch; }
  .quiz-actions .button { width: 100%; }
  .quiz-attempts { width: 100%; }
  .template-complete-card { grid-template-columns: 27px minmax(0, 1fr); }
  .template-complete-mark { width: 27px; height: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Phase 2.11a: bounded composition and progressive case clues. */
.builder-layout { align-items: start; }
.builder-controls { gap: 12px; }
.builder-mission-card,
.builder-editor,
.builder-variant-editor,
.truth-clue-card,
.truth-evidence-section,
.truth-case-board { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.builder-mission-card { border-color: rgba(88, 120, 173, .35); background: linear-gradient(135deg, rgba(88, 120, 173, .12), transparent 70%), var(--surface); }
.builder-mission-card h3 { margin: 7px 0 10px; color: var(--ink-deep); font-family: var(--display); font-size: 19px; letter-spacing: -.045em; }
.builder-label,
.truth-clue-kicker,
.truth-evidence-kind { color: var(--accent-strong); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.builder-goals { display: grid; gap: 5px; margin: 0; padding: 0 0 0 17px; color: var(--muted-deep); font-size: 11px; line-height: 1.5; }
.builder-subheading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.builder-count,
.builder-edit-note { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.builder-block-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; counter-reset: builder-block; }
.builder-block-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-muted); }
.builder-block-item.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.builder-block-select { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 8px; align-items: center; min-width: 0; padding: 2px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.builder-block-number { color: var(--accent-strong); font-family: var(--mono); font-size: 10px; font-weight: 800; }
.builder-block-copy { display: grid; gap: 2px; min-width: 0; }
.builder-block-copy strong { overflow: hidden; color: var(--ink-deep); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.builder-block-copy small { color: var(--muted); font-family: var(--mono); font-size: 8px; }
.builder-block-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.button-small { min-height: 27px !important; padding: 5px 7px !important; font-size: 9px !important; }
.button-quiet { border-color: var(--line); background: transparent; color: var(--muted-deep); }
.button-quiet:hover:not(:disabled) { border-color: var(--accent); background: var(--surface); color: var(--accent-strong); }
.button-danger-quiet:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.builder-tray { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 11px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-muted); }
.builder-tray > .builder-label { grid-column: 1 / -1; }
.builder-tray-button { min-height: 38px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-deep); font-size: 10px; font-weight: 750; cursor: pointer; }
.builder-tray-button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.builder-fields { display: grid; gap: 9px; }
.builder-editor { display: grid; gap: 9px; }
.builder-variant-editor { display: grid; gap: 9px; }
.builder-variant-row { display: flex; flex-wrap: wrap; gap: 7px; }
.builder-variant-option { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); color: var(--muted-deep); font-size: 10px; cursor: pointer; }
.builder-variant-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink-deep); }
.builder-variant-option input { accent-color: var(--accent); }
.builder-checklist { margin-top: 2px; }
.builder-preview { position: sticky; top: 12px; }
.builder-preview iframe { height: 540px; min-height: 360px; }
.builder-legacy-compat { display: none !important; }
.truth-clue-card { display: grid; gap: 8px; border-color: rgba(176, 120, 39, .38); background: linear-gradient(135deg, rgba(245, 237, 220, .7), transparent 72%), var(--surface); }
.truth-clue-card h3,
.truth-section-heading h3,
.truth-case-board h3 { margin: 0; color: var(--ink-deep); font-family: var(--display); font-size: 20px; letter-spacing: -.045em; }
.truth-clue-meta { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.truth-clue-text { margin: 4px 0 0; color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.7; }
.truth-clue-note { margin: 0; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--muted-deep); font-size: 11px; line-height: 1.6; }
.truth-new-clue { border-color: rgba(88, 120, 173, .4); background: linear-gradient(135deg, rgba(88, 120, 173, .11), transparent 72%), var(--surface); }
.truth-evidence-section { display: grid; gap: 11px; background: var(--surface-muted); }
.truth-section-heading { display: grid; gap: 5px; }
.truth-section-heading p { margin: 0; color: var(--muted-deep); font-size: 11px; line-height: 1.5; }
.truth-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.truth-evidence-card { display: grid; gap: 6px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.truth-evidence-card h4 { margin: 0; color: var(--ink-deep); font-size: 13px; }
.truth-evidence-card p { margin: 0; color: var(--muted-deep); font-size: 10px; line-height: 1.55; }
.truth-evidence-card .truth-evidence-source { color: var(--accent-strong); font-family: var(--mono); font-size: 9px; }
.truth-case-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: var(--surface-muted); }
.truth-case-board > .truth-clue-kicker,
.truth-case-board > h3 { grid-column: 1 / -1; }
.case-board-column { min-width: 0; padding: 11px; border-top: 3px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.case-board-column h4 { margin: 0 0 7px; color: var(--ink-deep); font-size: 11px; }
.case-board-column ul { display: grid; gap: 6px; margin: 0; padding-left: 16px; color: var(--muted-deep); font-size: 10px; line-height: 1.5; }
.case-board-column.is-verified { border-top-color: var(--success); }
.case-board-column.is-not-verified { border-top-color: var(--attention); }
.case-board-column.is-uncertain { border-top-color: var(--muted); }
.quiz-why { margin: 8px 0 0; padding: 9px 10px; border-left: 3px solid var(--attention); background: var(--attention-soft); color: var(--muted-deep); font-size: 10px; line-height: 1.55; }
.quiz-feedback-history { padding: 10px 11px; border: 1px solid var(--line); border-left: 3px solid var(--success); border-radius: 10px; background: var(--surface-muted); }
.quiz-feedback-history .quiz-feedback { margin-top: 7px; }
.quiz-feedback-history .quiz-why { margin-bottom: 0; }
@media (max-width: 1020px) and (min-width: 768px) {
  .builder-tray { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .builder-preview iframe { height: 460px; }
}
@media (max-width: 767px) {
  .builder-tray { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-preview { position: static; }
  .builder-preview iframe { height: 390px; min-height: 300px; }
  .builder-block-item { grid-template-columns: minmax(0, 1fr); }
  .builder-block-controls { justify-content: flex-start; }
  .truth-evidence-grid,
  .truth-case-board { grid-template-columns: 1fr; }
  .truth-case-board > .truth-clue-kicker,
  .truth-case-board > h3 { grid-column: auto; }
}
@media (max-width: 420px) {
  .builder-tray { grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px; }
  .builder-tray-button { min-height: 35px; padding: 6px 5px; font-size: 9px; }
  .builder-mission-card,
  .builder-editor,
  .builder-variant-editor,
  .truth-clue-card,
  .truth-evidence-section,
  .truth-case-board { padding: 12px; }
}

/* Phase 2.11b Hero routes: quiet canvas, one indigo action family, solid surfaces. */
.template-card-hero { border-color: var(--accent); background: var(--surface); box-shadow: inset 0 3px var(--accent); }
.template-card-hero .template-card-eyebrow { color: var(--accent-strong); }
.template-card-reference { background: var(--surface-muted); }
.template-picker-divider { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; margin: 2px 0 -2px; color: var(--text-muted); font: 800 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.template-picker-divider-line { flex: 1; height: 1px; background: var(--border); }
.template-picker-divider-label { white-space: nowrap; }

.hero-experience-intro { display: grid; gap: 5px; padding: 15px 17px; border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--surface-muted); }
.hero-experience-intro p { max-width: 70ch; margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.65; }
.hero-kicker,
.hero-label { color: var(--accent-strong); font: 800 9px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.hero-label { letter-spacing: .04em; }
.hero-muted { color: var(--text-muted); font-size: 10px; }
.hero-stage-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px 0; }
.hero-stage-banner .hero-label { color: var(--text-primary); font-family: var(--body); font-size: 12px; letter-spacing: 0; text-transform: none; }
.hero-button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hero-choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-room-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.hero-room-tab { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 9px; align-items: center; min-width: 0; min-height: 64px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-primary); text-align: left; cursor: pointer; }
.hero-room-tab:hover:not(:disabled),
.hero-room-tab:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.hero-room-tab.is-selected { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); background: var(--accent-soft); }
.hero-room-tab:disabled { cursor: not-allowed; opacity: .56; }
.hero-room-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--focus-surface); color: var(--focus-text); font: 800 10px/1 var(--mono); }
.hero-room-copy { display: grid; gap: 3px; min-width: 0; }
.hero-room-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.hero-room-copy small { color: var(--text-muted); font-size: 10px; }
.hero-room-tab.status-pass .hero-room-number { background: var(--success); }
.hero-room-tab.status-locked .hero-room-number { background: var(--border-strong); }
.hero-puzzle-lab,
.hero-creative-board { display: grid; gap: 14px; margin-top: 2px; }
.hero-puzzle-card { display: grid; gap: 13px; min-width: 0; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.hero-section-heading { display: grid; gap: 5px; }
.hero-section-heading h3 { margin: 0; color: var(--text-primary); font-family: var(--display); font-size: 20px; letter-spacing: -.045em; }
.hero-section-heading p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 1.6; }
.hero-rule-note { margin: 0; padding: 9px 11px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--text-secondary); font-size: 11px; line-height: 1.55; }
.hero-scale { display: grid; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.hero-pan { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 7px; min-height: 86px; padding: 11px; border: 1px solid var(--border-strong); border-radius: 14px 14px 22px 22px; background: var(--surface-muted); }
.hero-pan-left { border-bottom: 4px solid var(--accent); }
.hero-pan-right { border-bottom: 4px solid var(--attention); }
.hero-pan-label { flex-basis: 100%; color: var(--text-secondary); font-size: 10px; font-weight: 800; }
.hero-pan-empty { color: var(--text-muted); font-size: 10px; }
.hero-balance-mark { display: grid; place-items: center; min-height: 86px; color: var(--accent-strong); font: 800 24px/1 var(--display); }
.hero-coin-table { display: grid; gap: 8px; padding: 11px; border: 1px dashed var(--border-strong); border-radius: 13px; background: var(--surface-muted); }
.hero-subheading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-subheading strong { color: var(--text-primary); font-size: 11px; }
.hero-coin-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.hero-coin-token { min-height: 33px; padding: 6px 7px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text-primary); font: 800 11px/1 var(--mono); cursor: pointer; }
.hero-coin-token:hover:not(:disabled), .hero-coin-token.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.hero-coin-placement { display: grid; gap: 8px; }
.hero-coin-placement .hero-label { color: var(--text-secondary); font-family: var(--body); font-size: 11px; letter-spacing: 0; text-transform: none; }
.hero-result-row,
.hero-discovery-row,
.hero-ray-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.hero-result-row > .button,
.hero-ray-legend > .button { margin-left: auto; }
.hero-result-chip { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 9px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-muted); color: var(--text-primary); font-size: 10px; font-weight: 800; }
.hero-history { border-top: 1px solid var(--border); padding-top: 11px; }
.hero-history summary { color: var(--text-secondary); font-size: 11px; cursor: pointer; }
.hero-history-list,
.hero-ray-list,
.hero-simulation-list { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 18px; color: var(--text-secondary); font-size: 10px; line-height: 1.5; }
.hero-accusation { display: grid; gap: 10px; padding-top: 13px; border-top: 1px solid var(--border); }
.hero-inline-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.hero-inline-fields select { min-width: 92px; }
.hero-field { color: var(--text-muted); font-size: 10px; }
.hero-inline-error { margin: 0; padding: 9px 11px; border-left: 3px solid var(--danger); background: var(--danger-soft); color: var(--danger); font-size: 11px; }
.hero-success-note { margin: 0; padding: 9px 11px; border-left: 3px solid var(--success); background: var(--success-soft); color: var(--success); font-size: 11px; }
.hero-chat-button { justify-self: start; }

.hero-blackbox-shell { display: grid; grid-template-columns: 1fr; gap: 5px; max-width: 560px; margin: 0 auto; }
.hero-ray-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.hero-ray-button { min-height: 29px !important; padding: 4px 3px !important; border: 1px solid var(--border-strong) !important; border-radius: 7px !important; background: var(--surface-muted) !important; color: var(--text-secondary) !important; font: 800 9px/1 var(--mono) !important; }
.hero-ray-button:hover:not(:disabled) { border-color: var(--accent) !important; background: var(--accent-soft) !important; color: var(--accent-strong) !important; }
.hero-blackbox-middle { display: grid; grid-template-columns: 33px minmax(0, 1fr) 33px; gap: 5px; }
.hero-ray-column { display: grid; grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 5px; }
.hero-blackbox-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; aspect-ratio: 1; padding: 7px; border: 2px solid var(--focus-surface); border-radius: 10px; background: var(--focus-surface); }
.hero-blackbox-cell { min-width: 0; min-height: 0; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); color: var(--accent-strong); font: 800 16px/1 var(--mono); cursor: pointer; }
.hero-blackbox-cell:hover:not(:disabled), .hero-blackbox-cell.is-guessed { border-color: var(--accent); background: var(--accent-soft); }
.hero-blackbox-cell:disabled { cursor: not-allowed; opacity: .7; }
.hero-ray-history { display: grid; gap: 5px; padding-top: 5px; border-top: 1px solid var(--border); }
.hero-ray-history .hero-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.hero-ray-history .hero-section-heading h3 { font-family: var(--body); font-size: 13px; letter-spacing: 0; }
.hero-ray-history .hero-section-heading p { flex-basis: 100%; }

.hero-prisoners-card { gap: 14px; }
.hero-prisoner-picker,
.hero-strategy-picker,
.hero-boxes,
.hero-simulation { display: grid; gap: 8px; }
.hero-number-button { min-width: 35px; min-height: 35px; padding: 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-muted); color: var(--text-primary); font: 800 11px/1 var(--mono); cursor: pointer; }
.hero-number-button:hover:not(:disabled), .hero-number-button.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.hero-box-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.hero-box-button { min-height: 50px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); color: var(--text-primary); font-size: 11px; font-weight: 800; cursor: pointer; }
.hero-box-button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.hero-box-button.is-opened { border-color: var(--success); background: var(--success-soft); color: var(--success); cursor: default; }
.hero-box-button:disabled:not(.is-opened) { cursor: not-allowed; opacity: .56; }
.hero-simulation { padding-top: 12px; border-top: 1px solid var(--border); }
.hero-simulation .hero-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.hero-simulation .hero-section-heading h3 { font-family: var(--body); font-size: 13px; letter-spacing: 0; }
.hero-simulation .hero-section-heading p { flex-basis: 100%; }

.hero-creative-board { gap: 14px; }
.hero-board-layout { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.8fr) minmax(190px, .9fr); gap: 12px; align-items: start; }
.hero-board-toolbox,
.hero-board-workspace,
.hero-board-inspector,
.hero-board-validation { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.hero-board-toolbox { display: grid; gap: 12px; }
.hero-board-toolbox .hero-section-heading h3,
.hero-board-inspector .hero-section-heading h3,
.hero-board-validation .hero-section-heading h3 { font-family: var(--body); font-size: 15px; letter-spacing: -.02em; }
.hero-toolbox-grid { display: grid; gap: 7px; }
.hero-toolbox-button { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; min-height: 47px; padding: 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); color: var(--text-primary); text-align: left; font-size: 11px; font-weight: 800; cursor: pointer; }
.hero-toolbox-button small { color: var(--text-muted); font-size: 9px; font-weight: 500; line-height: 1.4; }
.hero-toolbox-button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.hero-board-workspace { display: grid; gap: 9px; }
.hero-board-header { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.hero-board-header-copy { display: grid; gap: 4px; min-width: 0; }
.hero-board-header-copy strong { color: var(--text-primary); font-family: var(--display); font-size: 17px; letter-spacing: -.04em; }
.hero-board-surface { position: relative; min-height: 520px; overflow: hidden; isolation: isolate; border: 1px solid var(--border-strong); border-radius: 15px; background: var(--surface-muted); }
.hero-board-surface::before { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 10% 10%; opacity: .5; content: ""; pointer-events: none; }
.hero-board-connectors { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hero-board-connectors line { stroke: var(--accent-strong); stroke-width: 1.25; stroke-dasharray: 2 1; vector-effect: non-scaling-stroke; }
.hero-board-object { position: absolute; display: grid; grid-template-rows: auto auto minmax(0, auto); gap: 4px; width: clamp(88px, 25%, 150px); min-height: 74px; padding: 10px; transform: translate(-50%, -50%); border: 2px solid var(--object-accent, var(--accent)); border-radius: 12px; background: var(--object-surface, var(--surface)); color: var(--text-primary); text-align: left; box-shadow: 0 6px 0 var(--object-accent, var(--accent)); cursor: grab; touch-action: none; }
.hero-board-object:active { cursor: grabbing; }
.hero-board-object:hover, .hero-board-object.is-selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.hero-board-object-type { color: var(--object-accent, var(--accent-strong)); font: 800 8px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.hero-board-object strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.hero-board-object small { display: -webkit-box; overflow: hidden; color: var(--text-secondary); font-size: 9px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.hero-board-object-poster { width: clamp(100px, 30%, 170px); min-height: 100px; }
.hero-board-object-note { border-radius: 5px; transform: translate(-50%, -50%) rotate(-1deg); }
.hero-board-object-compact { min-height: 58px; padding: 8px; }
.hero-board-object-wide { width: clamp(125px, 36%, 190px); }
.hero-board-object-outline { background: var(--surface); box-shadow: none; }
.hero-board-empty { position: absolute; inset: 20% 15%; display: grid; place-content: center; gap: 6px; padding: 25px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--text-secondary); text-align: center; }
.hero-board-empty strong { color: var(--text-primary); font-family: var(--display); font-size: 17px; }
.hero-board-empty span { font-size: 11px; }
.hero-board-hint { margin: 0; color: var(--text-muted); font-size: 10px; }
.hero-board-inspector { display: grid; gap: 12px; }
.hero-board-editor { display: grid; gap: 6px; }
.hero-editor-label { color: var(--text-muted); font-size: 10px; font-weight: 800; }
.hero-board-editor input,
.hero-board-editor textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-muted); color: var(--text-primary); font-size: 11px; }
.hero-board-editor input { min-height: 34px; padding: 7px 8px; }
.hero-board-editor textarea { min-height: 76px; padding: 8px; resize: vertical; }
.hero-inspector-group { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid var(--border); }
.hero-color-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-color-swatch { display: grid; place-items: center; width: 31px; height: 31px; overflow: hidden; border: 2px solid var(--border); border-radius: 50%; background: var(--swatch-color, var(--accent)); color: transparent; cursor: pointer; }
.hero-color-swatch:hover, .hero-color-swatch.is-selected { border-color: var(--text-primary); outline: 2px solid var(--accent); outline-offset: 1px; }
.hero-variant-row { display: flex; flex-wrap: wrap; gap: 5px; }
.hero-inspector-actions { padding-top: 3px; }
.hero-connect-panel { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-muted); }
.hero-board-validation { display: grid; gap: 10px; }
.hero-board-validation .hero-section-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 9px; }
.hero-board-validation .hero-section-heading p { grid-column: 1 / -1; }
.hero-validation-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.hero-validation-list li { padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-muted); color: var(--text-secondary); font-size: 10px; }
.hero-validation-list li.is-passed { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.hero-board-validation .hero-chat-button { margin-top: 2px; }
.hero-summary-card { display: grid; gap: 11px; }
.hero-summary-card .summary-heading { margin: 0; }
.hero-evidence-list { display: grid; gap: 8px; }
.hero-evidence-row { display: grid; gap: 6px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.hero-evidence-row.is-passed { border-color: var(--success); background: var(--success-soft); }
.hero-evidence-row-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hero-evidence-row-title strong { color: var(--text-primary); font-size: 11px; }
.hero-evidence-row p { margin: 0; color: var(--text-secondary); font-size: 10px; line-height: 1.45; }
.hero-evidence-check { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 11px; }
.hero-evidence-check.is-passed { color: var(--success); }

@media (max-width: 1179px) {
  .hero-board-layout { grid-template-columns: minmax(145px, .75fr) minmax(0, 1.55fr); }
  .hero-board-inspector { grid-column: 1 / -1; }
  .hero-board-inspector .hero-section-heading { display: flex; align-items: baseline; gap: 9px; }
  .hero-board-inspector .hero-section-heading p { flex: 1; }
  .hero-board-editor { grid-template-columns: 52px minmax(0, 1fr) 52px minmax(0, 1.5fr) auto; align-items: center; }
  .hero-board-editor .button { align-self: end; }
}

@media (max-width: 767px) {
  .hero-room-picker { grid-template-columns: 1fr; }
  .hero-room-tab { min-height: 54px; }
  .hero-stage-banner { align-items: flex-start; flex-direction: column; gap: 5px; }
  .hero-puzzle-card { padding: 13px; border-radius: 15px; }
  .hero-scale { grid-template-columns: 1fr; }
  .hero-balance-mark { min-height: 35px; }
  .hero-coin-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-result-row > .button, .hero-ray-legend > .button { width: 100%; margin-left: 0; }
  .hero-inline-fields { align-items: stretch; }
  .hero-inline-fields select, .hero-inline-fields .button { flex: 1 1 30%; min-width: 0; }
  .hero-blackbox-shell { width: 100%; }
  .hero-ray-button { font-size: 8px !important; }
  .hero-blackbox-middle { grid-template-columns: 26px minmax(0, 1fr) 26px; }
  .hero-blackbox-grid { gap: 3px; padding: 4px; }
  .hero-box-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-board-layout { grid-template-columns: 1fr; }
  .hero-board-toolbox, .hero-board-workspace, .hero-board-inspector, .hero-board-validation { padding: 12px; border-radius: 15px; }
  .hero-toolbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-board-header { align-items: flex-start; flex-direction: column; }
  .hero-board-surface { min-height: 440px; }
  .hero-board-inspector { grid-column: auto; }
  .hero-board-inspector .hero-section-heading { display: grid; }
  .hero-board-editor { display: grid; }
  .hero-validation-list { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .hero-toolbox-grid { grid-template-columns: 1fr; }
  .hero-board-surface { min-height: 390px; }
  .hero-board-object { width: 105px; min-height: 66px; padding: 8px; }
  .hero-board-object small { font-size: 8px; }
  .hero-number-button { min-width: 32px; }
}

/* Phase 2.11c: a restrained student surface for the single recommended route. */
body.phase-211c-pruned {
  /* Proofbench teal light palette, expressed through the shared semantic
     tokens so teacher and student routes resolve the same way. */
  --surface-page: #f4f5f1;
  --surface-card: #ffffff;
  --surface-elevated: #fffefb;
  --surface-input: #fffdf8;
  --surface-muted: #edf0ec;
  --text-primary: #1b2825;
  --text-secondary: #42524d;
  --text-muted: #687873;
  --text-on-accent: #ffffff;
  --border-default: #d4dfda;
  --border-subtle: #e4ebe7;
  --disabled-bg: #e6ece8;
  --disabled-text: #83928c;
  --disabled-border: #c3d0c9;
  --accent: #185f8d;
  --accent-hover: #084f4b;
  --accent-soft: #dcefeb;
  --success: #24714e;
  --success-soft: #e5f2ea;
  --attention: #8a651b;
  --attention-soft: #f6edd6;
  --danger: #a4474d;
  --danger-soft: #f7e5e4;
  --bg: var(--surface-page);
  --surface: var(--surface-card);
  --surface-raised: var(--surface-elevated);
  --border: var(--border-default);
  --border-strong: var(--border-default);
  --accent-strong: var(--accent-hover);
  --focus-surface: #ffffff;
  --focus-deep: #ffffff;
  --focus-text: #1b2825;
  --focus-muted: #52625d;
  --on-accent: var(--text-on-accent);
  --code-surface: #263532;
  --code-text: #f1f8f4;
  --surface-soft: var(--surface-muted);
  --surface-blue: var(--accent-soft);
  --ink: var(--text-primary);
  --ink-deep: var(--text-primary);
  --muted: var(--text-muted);
  --muted-deep: var(--text-secondary);
  --line: var(--border);
  --line-strong: var(--border-strong);
  --navy: var(--focus-surface);
  --navy-deep: var(--focus-deep);
  --cobalt: var(--accent);
  --cobalt-dark: var(--accent-strong);
  --cobalt-soft: var(--accent-soft);
  --sun: var(--attention);
  --sun-soft: var(--attention-soft);
  --mint: var(--success);
  --mint-soft: var(--success-soft);
  --coral: var(--danger);
  --coral-soft: var(--danger-soft);
  --amber: var(--attention);
  --amber-soft: var(--attention-soft);
  --shadow: 0 8px 24px rgba(31, 52, 47, 0.07);
  --shadow-deep: 0 14px 34px rgba(31, 52, 47, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] body.phase-211c-pruned {
    --surface-page: #202624;
    --surface-card: #2a312e;
    --surface-elevated: #303b37;
    --surface-input: #263532;
    --surface-muted: #353e3a;
    --text-primary: #f1f6f3;
    --text-secondary: #c4d0ca;
    --text-muted: #9eaea6;
    --text-on-accent: #16302d;
    --border-default: #52615b;
    --border-subtle: #414e49;
    --disabled-bg: #303a36;
    --disabled-text: #82908a;
    --disabled-border: #46534f;
    --accent: #76c8bd;
    --accent-hover: #a2e1d8;
    --accent-soft: #214a44;
    --success: #7dd2a6;
    --success-soft: #214936;
    --attention: #e7c477;
    --attention-soft: #514321;
    --danger: #ef9d9d;
    --danger-soft: #522e31;
    --focus-surface: #2a312e;
    --focus-deep: #252c29;
    --focus-text: #f1f6f3;
    --focus-muted: #c4d0ca;
    --bg: var(--surface-page);
    --surface: var(--surface-card);
    --surface-raised: var(--surface-elevated);
    --border: var(--border-default);
    --border-strong: var(--border-default);
    --accent-strong: var(--accent-hover);
    --on-accent: var(--text-on-accent);
    --code-surface: #17201d;
    --code-text: #f1f8f4;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    --shadow-deep: 0 16px 38px rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme="dark"] body.phase-211c-pruned {
  --surface-page: #202624;
  --surface-card: #2a312e;
  --surface-elevated: #303b37;
  --surface-input: #263532;
  --surface-muted: #353e3a;
  --text-primary: #f1f6f3;
  --text-secondary: #c4d0ca;
  --text-muted: #9eaea6;
  --text-on-accent: #16302d;
  --border-default: #52615b;
  --border-subtle: #414e49;
  --disabled-bg: #303a36;
  --disabled-text: #82908a;
  --disabled-border: #46534f;
  --accent: #76c8bd;
  --accent-hover: #a2e1d8;
  --accent-soft: #214a44;
  --success: #7dd2a6;
  --success-soft: #214936;
  --attention: #e7c477;
  --attention-soft: #514321;
  --danger: #ef9d9d;
  --danger-soft: #522e31;
  --focus-surface: #2a312e;
  --focus-deep: #252c29;
  --focus-text: #f1f6f3;
  --focus-muted: #c4d0ca;
  --bg: var(--surface-page);
  --surface: var(--surface-card);
  --surface-raised: var(--surface-elevated);
  --border: var(--border-default);
  --border-strong: var(--border-default);
  --accent-strong: var(--accent-hover);
  --on-accent: var(--text-on-accent);
  --code-surface: #17201d;
  --code-text: #f1f8f4;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  --shadow-deep: 0 16px 38px rgba(0, 0, 0, 0.3);
}

body.phase-211c-pruned::before,
body.phase-211c-pruned .site-atmosphere { display: none; }
body.phase-211c-pruned .app-header { background: var(--surface); backdrop-filter: none; }
body.phase-211c-pruned .panel,
body.phase-211c-pruned .website-build-panel,
body.phase-211c-pruned .playground-panel { background: var(--surface); }
body.phase-211c-pruned .section-label,
body.phase-211c-pruned .header-label,
body.phase-211c-pruned .hero-kicker,
body.phase-211c-pruned .hero-label,
body.phase-211c-pruned .template-card-eyebrow,
body.phase-211c-pruned .journey-item-kicker { letter-spacing: .03em; text-transform: none; }
body.phase-211c-pruned button:focus-visible,
body.phase-211c-pruned a:focus-visible,
body.phase-211c-pruned textarea:focus-visible,
body.phase-211c-pruned input:focus-visible,
body.phase-211c-pruned select:focus-visible,
body.phase-211c-pruned summary:focus-visible { outline-color: rgba(24, 95, 141, .55); }

body.phase-211c-pruned .brand-symbol i,
body.phase-211c-pruned .brand-symbol i:nth-child(1),
body.phase-211c-pruned .brand-symbol i:nth-child(2),
body.phase-211c-pruned .brand-symbol i:nth-child(3) { background: var(--accent); }
body.phase-211c-pruned .space-switcher,
body.phase-211c-pruned .showcase-view-switcher,
body.phase-211c-pruned .connection-panel,
body.phase-211c-pruned .course-picker,
body.phase-211c-pruned .template-action-panel { background: var(--surface); }
body.phase-211c-pruned .space-switcher-copy .section-label,
body.phase-211c-pruned .course-picker-heading .section-label,
body.phase-211c-pruned .connection-copy .section-label,
body.phase-211c-pruned .intro-copy .section-label,
body.phase-211c-pruned .ta-heading .section-label { color: var(--accent-strong); }
body.phase-211c-pruned .space-option.is-active,
body.phase-211c-pruned .showcase-view-option.is-active { background: var(--accent-soft); color: var(--accent-strong); }
body.phase-211c-pruned .space-option.is-active .space-option-icon,
body.phase-211c-pruned .showcase-view-option.is-active .showcase-view-icon { background: var(--accent); color: var(--on-accent); }

body.phase-211c-pruned .course-picker { border-color: var(--border); }
body.phase-211c-pruned .course-picker-heading { align-items: end; }
body.phase-211c-pruned .course-picker-heading h2 { color: var(--text-primary); }
body.phase-211c-pruned .course-picker-heading p:not(.section-label) { color: var(--text-secondary); }
body.phase-211c-pruned .course-picker-tools { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
body.phase-211c-pruned .course-picker-note { margin-top: 0; border-color: var(--border); background: var(--surface-muted); color: var(--text-secondary); font-family: var(--body); font-size: 10px; letter-spacing: 0; }
body.phase-211c-pruned .developer-reference-toggle { color: var(--accent-strong); font-size: 10px; }
body.phase-211c-pruned .showcase-template-list { grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr); margin-top: 17px; }
body.phase-211c-pruned .template-card { min-height: 116px; border-color: var(--border); background: var(--surface); box-shadow: none; }
body.phase-211c-pruned .template-card:hover,
body.phase-211c-pruned .template-card.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); transform: none; }
body.phase-211c-pruned .template-card-hero { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
body.phase-211c-pruned .template-card-featured { border-color: var(--accent); }
body.phase-211c-pruned .template-card-reference { background: var(--surface-muted); opacity: .88; }
body.phase-211c-pruned .template-card-playground { grid-column: auto; min-height: 116px; }
body.phase-211c-pruned .template-card-marker { background: var(--accent-soft); color: var(--accent-strong); font-family: var(--body); font-size: 18px; }
body.phase-211c-pruned .template-card-playground .template-card-marker { background: var(--surface-muted); color: var(--text-secondary); }
body.phase-211c-pruned .template-card-meta { font-family: var(--body); font-size: 10px; }
body.phase-211c-pruned .template-picker-divider { letter-spacing: .03em; text-transform: none; }

body.phase-211c-pruned .mission-card { min-height: 210px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); color: var(--text-primary); }
body.phase-211c-pruned .mission-card::after { width: 4px; background: var(--accent); opacity: 1; }
body.phase-211c-pruned .mission-backdrop { display: none; }
body.phase-211c-pruned .mission-content { min-height: 210px; padding: 25px 28px 23px; }
body.phase-211c-pruned .mission-index .section-label,
body.phase-211c-pruned .mission-kicker,
body.phase-211c-pruned .mission-total { color: var(--text-muted); }
body.phase-211c-pruned .mission-index strong { color: var(--accent); }
body.phase-211c-pruned .mission-copy h2 { color: var(--text-primary); }
body.phase-211c-pruned .mission-copy > p { color: var(--text-secondary); }
body.phase-211c-pruned .mission-card .status-pass,
body.phase-211c-pruned .mission-card .status-remediate,
body.phase-211c-pruned .mission-card .status-retry,
body.phase-211c-pruned .mission-card .status-locked { background: var(--surface-muted); color: var(--text-secondary); }
body.phase-211c-pruned .next-step { border-left-color: var(--accent); background: var(--accent-soft); }
body.phase-211c-pruned .next-step-label { color: var(--accent-strong); }
body.phase-211c-pruned .next-step strong { color: var(--text-primary); }
body.phase-211c-pruned .journey-item[data-current="true"] { box-shadow: inset 2px 0 var(--accent); }
body.phase-211c-pruned .journey-item[data-current="true"] .journey-status { color: var(--accent-strong); }
body.phase-211c-pruned .journey-item[data-current="true"] .journey-node { box-shadow: 0 0 0 4px var(--accent-soft); }
body.phase-211c-pruned .journey-node { background: var(--surface); }

body.phase-211c-pruned .ta-panel { border-color: var(--border); background: var(--surface); box-shadow: none; }
body.phase-211c-pruned .ta-avatar,
body.phase-211c-pruned .message-avatar { background: var(--accent); color: var(--on-accent); box-shadow: none; }
body.phase-211c-pruned .message-student .message-avatar { background: var(--accent-soft); color: var(--accent-strong); }
body.phase-211c-pruned .message-bubble { border-color: var(--border); background: var(--surface-muted); color: var(--text-primary); }
body.phase-211c-pruned .message-student .message-bubble { border-color: var(--accent); background: var(--accent-soft); color: var(--text-primary); }
body.phase-211c-pruned .markdown code { background: var(--accent-soft); color: var(--accent-strong); }
body.phase-211c-pruned .button-primary { background: var(--accent); box-shadow: none; }
body.phase-211c-pruned .button-primary:hover:not(:disabled) { background: var(--accent-strong); box-shadow: none; }
body.phase-211c-pruned .button-outline:hover:not(:disabled),
body.phase-211c-pruned .button-quiet:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }

body.phase-211c-pruned .hero-experience-intro { border-color: var(--border); border-left-color: var(--accent); background: var(--surface-muted); }
body.phase-211c-pruned .hero-experience-intro p,
body.phase-211c-pruned .hero-section-heading p { color: var(--text-secondary); }
body.phase-211c-pruned .hero-kicker,
body.phase-211c-pruned .hero-label { color: var(--accent-strong); }
body.phase-211c-pruned .hero-room-picker { margin-top: 11px; }
body.phase-211c-pruned .hero-room-tab { grid-template-columns: minmax(0, 1fr); min-height: 58px; padding: 11px 13px; }
body.phase-211c-pruned .hero-room-tab.is-selected { background: var(--accent-soft); }
body.phase-211c-pruned .hero-room-number { display: none; }
body.phase-211c-pruned .hero-room-copy strong { color: var(--text-primary); }
body.phase-211c-pruned .hero-room-copy small { color: var(--text-secondary); }
body.phase-211c-pruned .hero-stage-banner { padding-top: 4px; }
body.phase-211c-pruned .hero-puzzle-card { border-color: var(--border); background: var(--surface); box-shadow: none; }
body.phase-211c-pruned .hero-rule-note { background: var(--accent-soft); color: var(--text-primary); }
body.phase-211c-pruned .hero-pan { background: var(--surface-muted); }
body.phase-211c-pruned .hero-pan-left,
body.phase-211c-pruned .hero-pan-right { border-bottom-color: var(--accent); }
body.phase-211c-pruned .hero-coin-table { background: var(--surface-muted); }
body.phase-211c-pruned .hero-balance-mark { color: var(--accent-strong); }
body.phase-211c-pruned .hero-coin-token:hover:not(:disabled),
body.phase-211c-pruned .hero-coin-token.is-selected,
body.phase-211c-pruned .hero-number-button:hover:not(:disabled),
body.phase-211c-pruned .hero-number-button.is-selected,
body.phase-211c-pruned .hero-box-button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
body.phase-211c-pruned .hero-result-chip { border-color: var(--border-strong); background: var(--surface-muted); }
body.phase-211c-pruned .hero-history,
body.phase-211c-pruned .hero-accusation,
body.phase-211c-pruned .hero-simulation,
body.phase-211c-pruned .hero-ray-history { border-color: var(--border); }

body.phase-211c-pruned .hero-coach-surface { display: grid; gap: 9px; padding: 15px 17px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
body.phase-211c-pruned .hero-coach-header { display: flex; align-items: center; gap: 10px; }
body.phase-211c-pruned .hero-coach-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 800 9px/1 var(--mono); }
body.phase-211c-pruned .hero-coach-heading { display: grid; gap: 2px; }
body.phase-211c-pruned .hero-coach-heading .hero-kicker { font-size: 9px; }
body.phase-211c-pruned .hero-coach-heading h3 { margin: 0; color: var(--text-primary); font-size: 16px; }
body.phase-211c-pruned .hero-coach-observation,
body.phase-211c-pruned .hero-coach-question,
body.phase-211c-pruned .hero-coach-next { max-width: 74ch; margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
body.phase-211c-pruned .hero-coach-observation { color: var(--text-primary); font-weight: 700; }
body.phase-211c-pruned .hero-coach-question { padding-left: 10px; border-left: 2px solid var(--accent); color: var(--accent-strong); }
body.phase-211c-pruned .hero-coach-next { color: var(--text-muted); }
body.phase-211c-pruned .hero-coach-surface .hero-chat-button { margin-top: 1px; }

body.phase-211c-pruned .hero-ray-button.is-observed { border-color: var(--accent) !important; background: var(--accent-soft) !important; color: var(--accent-strong) !important; }
body.phase-211c-pruned .hero-blackbox-grid { border-color: var(--border-strong); background: var(--surface-muted); }
body.phase-211c-pruned .hero-blackbox-cell { background: var(--surface); color: var(--accent-strong); }
body.phase-211c-pruned .hero-blackbox-cell.is-ray-path { border-color: var(--accent); background: var(--accent-soft); }
body.phase-211c-pruned .hero-blackbox-cell.is-guessed { border-color: var(--accent-strong); background: var(--accent); color: var(--on-accent); }
body.phase-211c-pruned .hero-grid-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
body.phase-211c-pruned .hero-ray-list,
body.phase-211c-pruned .hero-history-list,
body.phase-211c-pruned .hero-simulation-list { color: var(--text-secondary); }
body.phase-211c-pruned .hero-box-button { background: var(--surface-muted); }
body.phase-211c-pruned .hero-box-button.is-opened { border-color: var(--success); background: var(--success-soft); color: var(--success); }

body.phase-211c-pruned .hero-creative-board .hero-experience-intro { background: var(--surface-muted); }
body.phase-211c-pruned .toast { background: var(--text-primary); color: var(--surface); }

@media (max-width: 767px) {
  body.phase-211c-pruned .course-picker-heading { display: grid; gap: 12px; }
  body.phase-211c-pruned .course-picker-tools { justify-content: flex-start; }
  body.phase-211c-pruned .showcase-template-list { grid-template-columns: 1fr; }
  body.phase-211c-pruned .template-card-playground { grid-column: auto; }
  body.phase-211c-pruned .mission-content { grid-template-columns: 70px minmax(0, 1fr); gap: 15px; padding: 20px 21px; }
  body.phase-211c-pruned .mission-index strong { font-size: 63px; }
  body.phase-211c-pruned .hero-coach-surface { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  body.phase-211c-pruned *,
  body.phase-211c-pruned *::before,
  body.phase-211c-pruned *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Phase 2.12 companion-first learning surface.  This is deliberately scoped
   to the new normal student route; legacy/reference surfaces keep their
   previous selectors for regression and developer inspection. */
body[data-experience="companion"] {
  --companion-paper: var(--surface-page);
  --companion-surface: var(--surface-card);
  --companion-ink: var(--text-primary);
  --companion-muted: var(--text-secondary);
  --companion-line: var(--border-default);
  --companion-teal: var(--accent);
  --companion-teal-soft: var(--accent-soft);
  --companion-coral: var(--danger);
  --companion-coral-soft: var(--danger-soft);
  --companion-shadow: var(--shadow);
  background: var(--companion-paper);
  color: var(--companion-ink);
}

body[data-experience="companion"] .app-main > .intro-row,
body[data-experience="companion"] .app-main > .connection-panel,
body[data-experience="companion"] .app-main > .space-switcher,
body[data-experience="companion"] .app-main > .showcase-view-switcher,
body[data-experience="companion"] #course-picker,
body[data-experience="companion"] #website-build-panel,
body[data-experience="companion"] #template-action-panel,
body[data-experience="companion"] #playground-panel,
body[data-experience="companion"] #learning-workspace,
body[data-experience="companion"] .action-dock { display: none !important; }

body[data-experience="companion"] .app-main { max-width: 1240px; padding-top: 34px; }
body[data-experience="companion"] .app-header { background: var(--surface-elevated); border-bottom-color: var(--companion-line); }
body[data-experience="companion"] .header-course strong,
body[data-experience="companion"] .header-label,
body[data-experience="companion"] .header-progress { color: var(--companion-muted); }

.companion-session { display: grid; gap: 24px; width: 100%; }
.companion-lesson-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 3px 4px 0; }
.companion-lesson-heading { max-width: 760px; }
.companion-lesson-heading .section-label { margin-bottom: 11px; color: var(--companion-teal); }
.companion-lesson-heading h1 { margin: 0; color: var(--companion-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(31px, 4.2vw, 56px); font-weight: 700; letter-spacing: -.045em; line-height: 1.12; }
.companion-lesson-thesis { max-width: 60ch; margin: 14px 0 0; color: var(--companion-muted); font-size: 16px; line-height: 1.75; }
.companion-lesson-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.companion-lesson-tools .button-quiet { border-color: var(--companion-line); background: var(--companion-surface); color: var(--companion-ink); }
.companion-lesson-tools .button-quiet:hover:not(:disabled) { border-color: var(--companion-teal); background: var(--companion-teal-soft); color: var(--companion-teal); }
.companion-lesson-tools .text-button { color: var(--companion-teal); }

.companion-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 12px 0 2px; border-top: 1px solid var(--companion-line); border-bottom: 1px solid var(--companion-line); }
.companion-progress-step { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 8px 9px; color: var(--companion-muted); }
.companion-progress-marker { display: grid; flex: 0 0 auto; place-items: center; width: 27px; height: 27px; border: 1px solid var(--companion-line); border-radius: 50%; background: var(--companion-surface); color: var(--companion-muted); font: 700 10px/1 var(--mono); }
.companion-progress-copy { display: grid; min-width: 0; gap: 2px; }
.companion-progress-copy strong { overflow: hidden; color: var(--companion-ink); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.companion-progress-copy small { color: var(--companion-muted); font-size: 10px; }
.companion-progress-pass .companion-progress-marker { border-color: var(--companion-teal); background: var(--companion-teal); color: var(--text-on-accent); }
.companion-progress-ready { box-shadow: inset 0 -2px var(--companion-teal); }
.companion-progress-ready .companion-progress-marker { border-color: var(--companion-teal); color: var(--companion-teal); }
.companion-progress-locked { opacity: .63; }

.companion-learning-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .72fr); align-items: start; gap: 22px; }
.companion-learning-surface { min-width: 0; min-height: 650px; padding: clamp(22px, 3.3vw, 42px); border: 1px solid var(--companion-line); border-radius: 22px; background: var(--companion-surface); box-shadow: var(--companion-shadow); }
.companion-surface-topline { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.companion-stage-kicker,
.companion-activity-kicker,
.companion-subsection-heading,
.companion-presence-kicker,
.companion-speech-kicker,
.teacher-trace-label { color: var(--companion-teal); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.companion-stage-kicker { margin: 0 0 7px; }
.companion-surface-topline h2 { margin: 0; color: var(--companion-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(27px, 3vw, 39px); letter-spacing: -.035em; line-height: 1.2; }
.companion-stage-status { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--companion-line); border-radius: 999px; background: var(--companion-paper); color: var(--companion-muted); font-size: 11px; font-weight: 750; }
.companion-stage-goal { max-width: 60ch; margin: 0 0 28px; color: var(--companion-muted); font-size: 15px; line-height: 1.7; }
.companion-activity { display: grid; gap: 22px; }
.companion-activity-intro { max-width: 63ch; padding-left: 15px; border-left: 3px solid var(--companion-coral); }
.companion-activity-intro p { margin: 7px 0 0; color: var(--companion-ink); font-size: 15px; line-height: 1.75; }
.companion-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.companion-choice-card { display: flex; align-items: start; gap: 11px; min-height: 80px; padding: 14px; border: 1px solid var(--companion-line); border-radius: 13px; background: var(--surface-input); cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.companion-choice-card:hover { border-color: var(--companion-teal); background: var(--companion-teal-soft); transform: translateY(-1px); }
.companion-choice-card:has(input:checked) { border-color: var(--companion-teal); background: var(--companion-teal-soft); box-shadow: inset 3px 0 var(--companion-teal); }
.companion-choice-card input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--companion-teal); }
.companion-choice-copy { display: grid; gap: 5px; }
.companion-choice-copy strong { color: var(--companion-ink); font-size: 14px; line-height: 1.45; }
.companion-choice-copy small { color: var(--companion-muted); font-size: 12px; line-height: 1.55; }
.companion-field { display: grid; gap: 8px; }
.companion-field-label { color: var(--companion-ink); font-size: 13px; font-weight: 750; }
.companion-field textarea { width: 100%; min-height: 92px; resize: vertical; border: 1px solid var(--companion-line); border-radius: 12px; background: var(--surface-input); color: var(--companion-ink); font: inherit; line-height: 1.65; padding: 12px 13px; }
.companion-field textarea::placeholder { color: var(--text-muted); }
.companion-field textarea:focus { outline: 3px solid rgba(24, 95, 141, .14); border-color: var(--companion-teal); }
.companion-activity > .button { justify-self: start; min-width: 150px; }
.companion-activity .button-primary { background: var(--companion-teal); box-shadow: 0 7px 16px rgba(24, 95, 141, .16); }
.companion-activity .button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.companion-activity .button-outline { border-color: var(--companion-teal); color: var(--companion-teal); }
.companion-activity .button-outline:hover:not(:disabled),
.companion-activity .button-quiet:hover:not(:disabled) { border-color: var(--companion-teal); background: var(--companion-teal-soft); color: var(--companion-teal); }

.companion-material-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.companion-material-card { display: grid; gap: 11px; min-width: 0; padding: 15px; border: 1px solid var(--companion-line); border-radius: 15px; background: var(--surface-card); }
.companion-material-card.is-selected { border-color: var(--companion-teal); background: var(--companion-teal-soft); }
.companion-material-card.is-tested { background: var(--surface-muted); }
.companion-material-card-top { display: flex; align-items: center; gap: 9px; }
.companion-material-card-top strong { color: var(--companion-ink); font-size: 15px; }
.companion-material-shape { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: var(--companion-paper); color: var(--companion-teal); font-size: 10px; font-weight: 800; }
.companion-material-facts,
.companion-material-result,
.companion-observation-detail { margin: 0; color: var(--companion-muted); font-size: 12px; line-height: 1.6; }
.companion-material-result { color: var(--companion-teal); font-weight: 750; }
.companion-material-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.companion-material-actions .button { min-height: 38px; padding: 8px 10px; font-size: 11px; }
.companion-evidence-section { display: grid; gap: 10px; }
.companion-observation-list { display: grid; gap: 8px; }
.companion-observation { padding: 12px 14px; border-left: 3px solid var(--companion-teal); border-radius: 0 11px 11px 0; background: var(--companion-teal-soft); transition: box-shadow .18s ease, transform .18s ease; }
.companion-observation-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.companion-observation-head strong { color: var(--companion-ink); font-size: 13px; }
.companion-result-badge { color: var(--companion-teal); font-size: 11px; font-weight: 800; }
.companion-empty-note { margin: 0; color: var(--companion-muted); font-size: 13px; }
.companion-concept-card,
.companion-transfer-prompt,
.companion-reflection-prompt { display: grid; gap: 8px; padding: 17px 18px; border: 1px solid var(--companion-line); border-left: 4px solid var(--companion-teal); border-radius: 0 15px 15px 0; background: var(--companion-teal-soft); transition: box-shadow .18s ease, transform .18s ease; }
.companion-concept-card strong { color: var(--companion-ink); font-family: var(--mono); font-size: 17px; }
.companion-concept-card p,
.companion-transfer-prompt p,
.companion-reflection-prompt p { margin: 0; color: var(--companion-muted); font-size: 13px; line-height: 1.7; }
.companion-transfer-grid { grid-template-columns: 1fr; }
.companion-action-feedback { margin: 20px 0 0; padding: 11px 13px; border-radius: 10px; background: var(--companion-paper); color: var(--companion-ink); font-size: 13px; line-height: 1.6; }
.companion-action-feedback[data-kind="success"] { background: var(--companion-teal-soft); color: var(--companion-teal); }
.companion-action-feedback[data-kind="error"] { background: var(--companion-coral-soft); color: var(--companion-coral); }
.is-attention-target { box-shadow: 0 0 0 3px rgba(24, 95, 141, .18), 0 10px 24px rgba(24, 95, 141, .09); transform: translateY(-1px); }

.companion-rail { display: grid; align-content: start; gap: 13px; min-width: 0; }
.companion-presence { position: relative; display: grid; gap: 15px; min-height: 510px; padding: 20px; border: 1px solid var(--companion-line); border-radius: 22px; background: var(--surface-muted); overflow: hidden; }
.companion-presence::before { position: absolute; top: 0; right: 0; bottom: 0; width: 4px; background: var(--companion-teal); content: ""; opacity: .75; }
.companion-presence-heading { position: relative; display: flex; align-items: start; justify-content: space-between; gap: 12px; z-index: 1; }
.companion-presence-kicker { margin: 0 0 4px; color: var(--companion-muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.companion-presence-heading h2 { margin: 0; color: var(--companion-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 27px; letter-spacing: -.035em; }
.companion-state-label { max-width: 135px; padding-top: 4px; color: var(--companion-teal); font-size: 11px; font-weight: 750; line-height: 1.45; text-align: right; }
.companion-figure-wrap { display: grid; place-items: center; min-height: 190px; }
.companion-figure { width: min(100%, 205px); height: auto; overflow: visible; }
.companion-halo { fill: #d5e9df; opacity: .75; transition: fill .25s ease, transform .25s ease; }
.companion-face { fill: #f3c7a7; stroke: var(--companion-ink); stroke-width: 3; }
.companion-ear { fill: none; stroke: var(--companion-ink); stroke-width: 3; stroke-linecap: round; }
.companion-notebook { fill: var(--companion-teal); stroke: var(--companion-ink); stroke-width: 3; }
.companion-notebook-line { fill: none; stroke: #c7e4d9; stroke-width: 3; stroke-linecap: round; }
.companion-eyes { fill: var(--companion-ink); transition: transform .22s ease; }
.companion-mouth { fill: none; stroke: var(--companion-ink); stroke-width: 3; stroke-linecap: round; transition: d .22s ease; }
.companion-thought-dots { fill: var(--companion-teal); opacity: 0; }
.companion-celebrate { fill: none; stroke: var(--companion-coral); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.companion-speech { position: relative; display: grid; gap: 9px; padding: 15px 16px 15px 17px; border-left: 3px solid var(--companion-teal); border-radius: 0 13px 13px 0; background: var(--surface-elevated); z-index: 1; }
.companion-speech::before { position: absolute; top: 19px; left: -9px; width: 13px; height: 13px; border-left: 3px solid var(--companion-teal); border-bottom: 3px solid var(--companion-teal); background: var(--surface-elevated); content: ""; transform: rotate(45deg); }
.companion-speech-kicker { font-size: 9px; }
.companion-speech p { min-height: 92px; margin: 0; color: var(--companion-ink); font-size: 13px; line-height: 1.75; white-space: pre-line; }
.companion-presence-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; z-index: 1; }
.companion-presence-actions .button { min-height: 42px; padding: 9px 10px; font-size: 11px; }
.companion-presence-actions .button-quiet { border-color: var(--companion-line); background: var(--companion-surface); color: var(--companion-ink); }
.companion-presence-actions .button-outline { border-color: var(--companion-teal); color: var(--companion-teal); }
.companion-utility-row { display: flex; flex-wrap: wrap; gap: 10px; z-index: 1; }
.companion-utility-row .text-button { color: var(--companion-teal); font-size: 11px; }
.companion-voice-note { margin: -6px 0 0; color: var(--companion-muted); font-size: 10px; line-height: 1.5; z-index: 1; }

.companion-presence[data-companion-state="THINKING"] .companion-thought-dots,
.companion-presence[data-companion-state="SPEAKING"] .companion-thought-dots { opacity: 1; animation: companion-thought 1.15s ease-in-out infinite alternate; }
.companion-presence[data-companion-state="SPEAKING"] .companion-mouth { d: path("M75 87c9 11 21 11 30 0"); }
.companion-presence[data-companion-state="SPEAKING"] .companion-eyes { transform: translateY(-1px); }
.companion-presence[data-companion-state="QUESTIONING"] .companion-halo { fill: #d7e7ec; transform: scale(1.025); }
.companion-presence[data-companion-state="ENCOURAGING"] .companion-halo { fill: #dff0df; }
.companion-presence[data-companion-state="CELEBRATING"] .companion-halo { fill: #f7dfcf; transform: scale(1.06); }
.companion-presence[data-companion-state="CELEBRATING"] .companion-celebrate { opacity: 1; }
.companion-presence[data-companion-state="IDLE"] { filter: saturate(.78); }
@keyframes companion-thought { from { transform: translateY(0); opacity: .45; } to { transform: translateY(-5px); opacity: 1; } }

.lesson-dialogue-panel,
.companion-teacher-lens { padding: 17px; border: 1px solid var(--companion-line); border-radius: 17px; background: var(--companion-surface); box-shadow: 0 8px 20px rgba(24, 49, 55, .04); }
.lesson-dialogue-heading,
.teacher-lens-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.lesson-dialogue-heading h2,
.teacher-lens-heading h2 { margin: 0; color: var(--companion-ink); font-size: 18px; letter-spacing: -.02em; }
.lesson-dialogue-heading .companion-presence-kicker,
.teacher-lens-heading .section-label { margin-bottom: 5px; }
.lesson-dialogue-list { display: grid; gap: 10px; max-height: 330px; margin: 15px 0; overflow-y: auto; }
.lesson-dialogue-message { display: grid; gap: 5px; max-width: 94%; padding: 10px 12px; border-radius: 12px; }
.lesson-dialogue-message.is-student { justify-self: end; background: var(--companion-teal-soft); }
.lesson-dialogue-message.is-companion { justify-self: start; border-left: 3px solid var(--companion-teal); background: var(--companion-paper); }
.lesson-dialogue-role { color: var(--companion-teal); font-size: 10px; font-weight: 800; }
.lesson-dialogue-body { color: var(--companion-ink); font-size: 12px; line-height: 1.65; }
.lesson-dialogue-body p { margin: 0; }
.lesson-dialogue-body p + p { margin-top: 7px; }
.lesson-dialogue-form { display: grid; gap: 8px; }
.lesson-dialogue-form textarea { width: 100%; min-height: 68px; resize: vertical; border: 1px solid var(--companion-line); border-radius: 10px; background: var(--surface-input); color: var(--companion-ink); font: inherit; padding: 10px; }
.lesson-dialogue-form textarea:focus { outline: 3px solid rgba(24, 95, 141, .14); border-color: var(--companion-teal); }
.lesson-dialogue-form .button { justify-self: end; min-height: 40px; background: var(--companion-teal); }
.lesson-dialogue-error { margin-top: 9px; color: var(--companion-coral); font-size: 12px; }
.companion-memory-strip { padding: 11px 13px; border: 1px dashed var(--border-default); border-radius: 12px; color: var(--companion-muted); font-size: 11px; line-height: 1.6; }
.teacher-lens-boundary { color: var(--companion-muted); font-size: 10px; }
.teacher-trace { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.teacher-trace-card { min-width: 0; min-height: 105px; padding: 12px; border: 1px solid var(--companion-line); border-radius: 12px; background: var(--companion-paper); }
.teacher-trace-card p { margin: 8px 0 0; color: var(--companion-ink); font-size: 11px; line-height: 1.65; }
.teacher-trace-card.is-complete { border-color: var(--companion-teal); background: var(--companion-teal-soft); }
.companion-developer-details { padding: 13px 15px; border: 1px dashed var(--companion-line); border-radius: 12px; color: var(--companion-muted); }
.companion-developer-details summary { cursor: pointer; color: var(--companion-teal); font-size: 12px; font-weight: 750; }
.companion-developer-details p { font-size: 11px; }
.companion-developer-details pre { max-height: 360px; overflow: auto; color: var(--companion-ink); font: 11px/1.55 var(--mono); white-space: pre-wrap; }

@media (max-width: 980px) {
  body[data-experience="companion"] .app-main { padding-top: 24px; }
  .companion-learning-layout { grid-template-columns: minmax(0, 1fr) minmax(270px, .68fr); gap: 15px; }
  .companion-learning-surface { padding: 25px; }
  .companion-presence { padding: 16px; }
  .teacher-trace { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  body[data-experience="companion"] .app-main { padding: 20px 15px 34px; }
  body[data-experience="companion"] .header-course { display: none; }
  .companion-lesson-header { display: grid; align-items: start; gap: 17px; }
  .companion-lesson-tools { justify-content: flex-start; }
  .companion-lesson-heading h1 { font-size: clamp(30px, 9vw, 42px); }
  .companion-progress { grid-template-columns: repeat(5, minmax(84px, 1fr)); margin-right: -15px; padding-right: 15px; overflow-x: auto; }
  .companion-progress-step { padding-left: 2px; padding-right: 2px; }
  .companion-progress-copy strong { font-size: 11px; }
  .companion-learning-layout { grid-template-columns: 1fr; }
  .companion-learning-surface { min-height: 0; padding: 21px 17px 25px; }
  .companion-surface-topline { gap: 10px; }
  .companion-surface-topline h2 { font-size: 29px; }
  .companion-choice-grid,
  .companion-material-grid { grid-template-columns: 1fr; }
  .companion-rail { grid-row: 1; }
  .companion-presence { min-height: 0; }
  .companion-figure-wrap { min-height: 145px; }
  .companion-figure { width: 155px; }
  .companion-speech p { min-height: 0; }
  .teacher-trace { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .companion-presence-actions { grid-template-columns: 1fr; }
  .teacher-trace { grid-template-columns: 1fr; }
  .companion-lesson-tools .button { width: 100%; }
  .companion-lesson-tools .text-button { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-experience="companion"] *,
  body[data-experience="companion"] *::before,
  body[data-experience="companion"] *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Phase 2.13: the real course is a reading surface with a small, causal TA presence. */
body[data-experience="real-course"] {
  --real-paper: var(--surface-card);
  --real-ink: var(--text-primary);
  --real-muted: var(--text-secondary);
  --real-line: var(--border-default);
  --real-accent: var(--accent);
  --real-accent-deep: var(--accent-hover);
  --real-accent-soft: var(--accent-soft);
  --real-question: var(--danger);
  --real-question-soft: var(--danger-soft);
  --real-shadow: var(--shadow);
  background: var(--surface-page);
}

body[data-experience="real-course"] .app-header {
  border-bottom-color: var(--real-line);
  background: var(--surface-elevated);
}

body[data-experience="real-course"] .app-main {
  width: min(1240px, calc(100% - 56px));
  padding-top: 39px;
}

body[data-experience="real-course"] .intro-row,
body[data-experience="real-course"] .connection-panel,
body[data-experience="real-course"] .space-switcher,
body[data-experience="real-course"] #showcase-view-switcher,
body[data-experience="real-course"] #course-picker,
body[data-experience="real-course"] #website-build-panel,
body[data-experience="real-course"] #template-action-panel,
body[data-experience="real-course"] #learning-workspace,
body[data-experience="real-course"] #playground-panel,
body[data-experience="real-course"] .action-dock { display: none !important; }

body[data-experience="real-course"] #real-course-session {
  display: grid;
  gap: 24px;
}

.real-course-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 5px 4px 0;
}

.real-course-heading { min-width: 0; max-width: 760px; }
.real-course-kicker,
.real-reading-kicker,
.real-ta-kicker,
.real-card-kicker {
  display: block;
  margin: 0 0 8px;
  color: var(--real-accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.real-course-heading h1 {
  margin: 0;
  color: var(--real-ink);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.1;
}

.real-course-thesis {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--real-muted);
  font-size: 16px;
  line-height: 1.75;
}

.real-course-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 11px;
}

.real-course-progress {
  padding: 8px 10px;
  border: 1px solid var(--real-line);
  border-radius: 999px;
  background: var(--real-paper);
  color: var(--real-muted);
  font-size: 11px;
  white-space: nowrap;
}

.real-course-header-actions .button-quiet {
  border-color: var(--real-line);
  background: var(--real-paper);
  color: var(--real-ink);
}

.real-course-header-actions .button-quiet:hover:not(:disabled) {
  border-color: var(--real-accent);
  background: var(--real-accent-soft);
  color: var(--real-accent-deep);
}

.real-course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(280px, .72fr);
  align-items: start;
  gap: 22px;
}

.real-reading-panel {
  min-width: 0;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--real-line);
  border-radius: 22px;
  background: var(--real-paper);
  box-shadow: var(--real-shadow);
}

.real-reading-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--real-line);
}

.real-reading-header h2 {
  margin: 0;
  color: var(--real-ink);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -.045em;
  line-height: 1.18;
}

.real-course-section-meta {
  margin: 9px 0 0;
  color: var(--real-muted);
  font-size: 11px;
  line-height: 1.5;
}

.real-source-link {
  flex: 0 0 auto;
  color: var(--real-accent-deep);
  font-size: 11px;
  font-weight: 750;
  text-underline-offset: 3px;
}

.real-source-link:hover { color: var(--real-question); }

.real-section-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 32px;
}

.real-section-tab {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid var(--real-line);
  border-radius: 12px;
  background: transparent;
  color: var(--real-muted);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.real-section-tab:hover,
.real-section-tab:focus-visible { border-color: var(--real-accent); background: var(--real-accent-soft); color: var(--real-accent-deep); }
.real-section-tab.is-current { border-color: var(--real-accent); background: var(--real-accent-soft); color: var(--real-accent-deep); box-shadow: inset 3px 0 var(--real-accent); }
.real-section-tab.is-read { border-color: #a9c9bf; }
.real-section-tab small { color: inherit; font-family: var(--mono); font-size: 9px; }
.real-section-tab strong { overflow: hidden; color: inherit; font-size: 12px; line-height: 1.45; text-overflow: ellipsis; }
.real-section-tab em { color: var(--real-muted); font-size: 10px; font-style: normal; }

.real-material-body {
  max-width: 70ch;
  min-height: 400px;
  color: var(--real-ink);
}

.real-material-label {
  margin: 0 0 13px;
  color: var(--real-question);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.real-material-teacher-context,
.real-material-capsule-note {
  margin: 0 0 13px;
  color: var(--real-muted);
  font-size: 12px;
  line-height: 1.7;
}

.real-material-capsule-note {
  padding: 10px 12px;
  border-left: 3px solid var(--real-accent);
  background: var(--surface-muted);
  color: var(--real-ink);
}

.real-material-body h3 {
  margin: 0 0 17px;
  color: var(--real-ink);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: 20px;
  letter-spacing: -.025em;
}

.real-material-paragraph {
  margin: 0 0 18px;
  color: var(--real-ink);
  font-size: 17px;
  line-height: 2;
}

.real-material-callout {
  margin: 27px 0;
  padding: 15px 17px;
  border-left: 3px solid var(--real-question);
  border-radius: 0 12px 12px 0;
  background: var(--real-question-soft);
  color: var(--real-question);
  font-size: 15px;
  line-height: 1.75;
}

.real-material-example {
  display: grid;
  gap: 12px;
  margin: 26px 0;
  padding: 18px;
  border: 1px solid var(--real-line);
  border-radius: 15px;
  background: var(--surface-muted);
}

.real-material-example-heading {
  margin: 0;
  color: var(--real-accent-deep);
  font-size: 13px;
  font-weight: 800;
}

.real-material-example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.real-material-example-item { padding: 12px; border-radius: 10px; background: var(--real-paper); }
.real-material-example-item strong { display: block; margin-bottom: 5px; color: var(--real-ink); font-size: 13px; }
.real-material-example-item span { display: block; color: var(--real-muted); font-size: 12px; line-height: 1.65; }

.real-material-activity {
  display: grid;
  gap: 10px;
  margin-top: 35px;
  padding-top: 22px;
  border-top: 1px solid var(--real-line);
}

.real-material-activity-label { margin: 0; color: var(--real-accent-deep); font-size: 13px; font-weight: 800; }
.real-material-activity p { margin: 0; color: var(--real-muted); font-size: 13px; line-height: 1.7; }
.real-material-activity textarea { width: 100%; min-height: 108px; resize: vertical; padding: 12px 13px; border: 1px solid var(--real-line); border-radius: 11px; background: var(--surface-input); color: var(--real-ink); font: inherit; line-height: 1.7; }
.real-material-activity textarea:focus { outline: 3px solid rgba(43, 115, 209, .14); border-color: var(--real-accent); }
.real-material-activity textarea::placeholder { color: var(--text-muted); }
.real-material-activity .button { justify-self: start; min-height: 42px; }

.real-transfer-note {
  margin: 0 0 3px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--real-accent-soft);
  color: var(--real-accent-deep) !important;
}

.real-course-feedback { margin-top: 20px; padding: 11px 13px; border-radius: 10px; background: var(--real-accent-soft); color: var(--real-accent-deep); font-size: 12px; line-height: 1.6; }
.real-course-feedback[data-kind="error"] { background: var(--real-question-soft); color: var(--real-question); }

.real-course-aside { display: grid; align-content: start; gap: 14px; min-width: 0; }

.real-ta-card,
.real-memory-card,
.real-skill-details,
.real-teacher-lens {
  border: 1px solid var(--real-line);
  border-radius: 18px;
  background: var(--real-paper);
  box-shadow: 0 7px 20px rgba(31, 68, 63, .045);
}

.real-ta-card { display: grid; gap: 15px; padding: 18px; }
.real-ta-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.real-ta-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.real-ta-kicker { display: block; margin: 0 0 3px; color: var(--real-muted); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.real-ta-header h2 { margin: 0; color: var(--real-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 23px; letter-spacing: -.03em; }
.real-ta-orb { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #a9c4e6; border-radius: 50%; background: var(--real-accent-soft); box-shadow: 0 0 0 6px rgba(43, 115, 209, .07); }
.real-ta-orb::before { width: 8px; height: 8px; border-radius: 50%; background: var(--real-accent); content: ""; transition: transform .18s ease, box-shadow .18s ease; }
.real-ta-orb i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--real-question); transform: translate(9px, -8px); }
.real-ta-state { max-width: 105px; color: var(--real-accent); font-size: 10px; font-weight: 750; line-height: 1.4; text-align: right; }
.real-ta-copy { min-height: 48px; margin: 0; color: var(--real-ink); font-size: 13px; line-height: 1.7; }
.real-ta-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.real-ta-actions .button { min-height: 39px; padding: 8px 9px; font-size: 10px; }
.real-ta-actions .button-quiet { border-color: var(--real-line); background: var(--surface-input); color: var(--real-ink); }
.real-ta-actions .button-outline { border-color: var(--real-accent); color: var(--real-accent-deep); }
.real-ta-actions .button:hover:not(:disabled) { border-color: var(--real-accent); background: var(--real-accent-soft); color: var(--real-accent-deep); }

.real-ta-card[data-ta-state="THINKING"] .real-ta-orb::before { box-shadow: 0 0 0 6px rgba(43, 115, 209, .12); animation: real-ta-pulse 1.1s ease-in-out infinite alternate; }
.real-ta-card[data-ta-state="SPEAKING"] .real-ta-orb::before { transform: scale(1.25); box-shadow: 0 0 0 5px rgba(43, 115, 209, .11); }
.real-ta-card[data-ta-state="QUESTIONING"] .real-ta-orb { border-color: #e2aa9c; background: var(--real-question-soft); }
.real-ta-card[data-ta-state="QUESTIONING"] .real-ta-orb::before { background: var(--real-question); }
.real-ta-card[data-ta-state="ENCOURAGING"] .real-ta-orb::before,
.real-ta-card[data-ta-state="CELEBRATING"] .real-ta-orb::before { background: #2a9367; }
@keyframes real-ta-pulse { from { transform: scale(.82); opacity: .7; } to { transform: scale(1.2); opacity: 1; } }

.real-chat-history-wrap { padding-top: 2px; border-top: 1px solid var(--real-line); }
.real-chat-list { display: grid; gap: 9px; max-height: 280px; margin-top: 12px; overflow-y: auto; scroll-behavior: auto; }
.real-chat-empty { margin: 0; padding: 9px 0 2px; color: var(--real-muted); font-size: 11px; line-height: 1.6; }
.real-chat-message { display: grid; gap: 4px; max-width: 96%; padding: 9px 11px; border-radius: 11px; }
.real-chat-message.is-student { justify-self: end; background: var(--real-accent-soft); color: var(--real-ink); }
.real-chat-message.is-ta { justify-self: start; border-left: 3px solid var(--real-accent); background: var(--real-accent-soft); color: var(--real-ink); }
.real-chat-message.is-streaming { border-left-color: var(--real-question); }
.real-chat-role { color: var(--real-accent-deep); font-family: var(--mono); font-size: 9px; font-weight: 800; }
.real-chat-message.is-ta .real-chat-body { font-size: 12px; line-height: 1.65; }
.real-chat-message.is-student .real-chat-body { font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.real-chat-body p { margin: 0 0 .6em; }
.real-chat-body p:last-child { margin-bottom: 0; }
.real-chat-body ul, .real-chat-body ol { margin: .35em 0 .5em 1.1em; padding: 0; }
.real-chat-body code { padding: .1em .3em; border-radius: 4px; background: var(--surface-muted); color: var(--real-accent-deep); font-family: var(--mono); font-size: .9em; }
.real-chat-message.is-streaming .real-chat-body::after { display: inline-block; width: 4px; height: 1em; margin-left: 3px; vertical-align: -.15em; background: var(--real-question); content: ""; animation: real-chat-caret .75s steps(2, jump-none) infinite; }
@keyframes real-chat-caret { 50% { opacity: 0; } }

.real-quick-prompts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.real-quick-prompts > span { width: 100%; color: var(--real-muted); font-size: 10px; }
.real-quick-prompts button { padding: 6px 8px; border: 1px solid var(--real-line); border-radius: 999px; background: var(--surface-input); color: var(--real-accent-deep); cursor: pointer; font-size: 10px; }
.real-quick-prompts button:hover { border-color: var(--real-accent); background: var(--real-accent-soft); }
.real-chat-form { display: grid; gap: 8px; }
.real-chat-form textarea { width: 100%; min-height: 66px; resize: vertical; padding: 10px 11px; border: 1px solid var(--real-line); border-radius: 10px; background: var(--surface-input); color: var(--real-ink); font: inherit; font-size: 12px; line-height: 1.6; }
.real-chat-form textarea:focus { outline: 3px solid rgba(43, 115, 209, .14); border-color: var(--real-accent); }
.real-chat-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.real-chat-form-footer > span { color: var(--real-muted); font-size: 9px; line-height: 1.4; }
.real-chat-form-footer .button { min-height: 38px; padding: 8px 11px; font-size: 11px; }
.real-chat-error { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--real-question); font-size: 11px; line-height: 1.5; }
.real-chat-error .text-button { flex: 0 0 auto; color: var(--real-question); font-size: 10px; }
.real-chat-error .text-button:hover { color: var(--real-accent); }

.real-memory-card { padding: 15px 17px; }
.real-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.real-card-header .real-card-kicker { margin-bottom: 4px; }
.real-card-header h2 { margin: 0; color: var(--real-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 18px; letter-spacing: -.025em; }
.real-memory-count { color: var(--real-muted); font-size: 10px; white-space: nowrap; }
.real-course-memory { display: grid; gap: 7px; margin-top: 14px; }
.real-memory-line { margin: 0; color: var(--real-muted); font-size: 11px; line-height: 1.6; }
.real-memory-line strong { color: var(--real-ink); }

.real-skill-details { overflow: hidden; }
.real-skill-details summary { padding: 14px 16px; color: var(--real-accent-deep); cursor: pointer; font-size: 12px; font-weight: 800; }
.real-skill-details summary:hover { background: var(--real-accent-soft); }
.real-course-skill-view { display: grid; gap: 12px; padding: 0 16px 16px; }
.real-skill-group { display: grid; gap: 5px; }
.real-skill-group strong { color: var(--real-ink); font-size: 11px; }
.real-skill-group p, .real-skill-group ul { margin: 0; color: var(--real-muted); font-size: 11px; line-height: 1.6; }
.real-skill-group ul { padding-left: 17px; }

.real-teacher-lens { padding: 18px; }
.real-trace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.real-trace-header h2 { margin: 0; color: var(--real-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 24px; letter-spacing: -.035em; }
.real-trace-header > span { color: var(--real-muted); font-size: 10px; }
.real-course-trace { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.real-trace-card { min-width: 0; min-height: 110px; padding: 12px; border: 1px solid var(--real-line); border-radius: 12px; background: var(--surface-muted); }
.real-trace-card strong { display: block; color: var(--real-accent-deep); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.real-trace-card p { margin: 8px 0 0; color: var(--real-ink); font-size: 11px; line-height: 1.65; }
.real-trace-card.is-complete { border-color: #7ab59d; background: var(--real-accent-soft); }
.real-developer-details { padding: 12px 15px; border: 1px dashed var(--real-line); border-radius: 12px; color: var(--real-muted); }
.real-developer-details summary { color: var(--real-accent-deep); cursor: pointer; font-size: 11px; font-weight: 800; }
.real-developer-details p { font-size: 10px; }
.real-developer-details pre { max-height: 360px; overflow: auto; white-space: pre-wrap; font: 10px/1.5 var(--mono); }

.real-attention-target { box-shadow: 0 0 0 3px rgba(201, 105, 85, .18), 0 10px 24px rgba(201, 105, 85, .08); }

@media (max-width: 1040px) {
  body[data-experience="real-course"] .app-main { width: min(960px, calc(100% - 38px)); }
  .real-course-layout { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); gap: 16px; }
  .real-reading-panel { padding: 28px; }
  .real-course-trace { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body[data-experience="real-course"] .app-main { padding-top: 24px; }
  .real-course-header { align-items: flex-start; flex-direction: column; gap: 17px; }
  .real-course-header-actions { justify-content: flex-start; }
  .real-course-layout { grid-template-columns: minmax(0, 1fr); }
  .real-course-aside { grid-row: 2; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .real-ta-card { grid-row: span 2; }
  .real-teacher-lens { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body[data-experience="real-course"] .app-main { width: calc(100% - 28px); padding-bottom: 28px; }
  body[data-experience="real-course"] .header-course,
  body[data-experience="real-course"] .header-progress { display: none; }
  .real-course-heading h1 { font-size: clamp(31px, 10vw, 44px); }
  .real-course-thesis { font-size: 14px; }
  .real-course-header-actions { width: 100%; align-items: stretch; }
  .real-course-header-actions .button,
  .real-course-progress { flex: 1 1 auto; text-align: center; }
  .real-reading-panel { padding: 21px 17px 25px; border-radius: 17px; }
  .real-reading-header { flex-direction: column; gap: 12px; padding-bottom: 18px; }
  .real-reading-header h2 { font-size: 29px; }
  .real-section-nav { grid-template-columns: 1fr; margin: 17px 0 25px; }
  .real-section-tab { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 8px; padding: 10px 11px; }
  .real-section-tab small { grid-row: span 2; }
  .real-material-body { min-height: 0; }
  .real-material-paragraph { font-size: 15px; line-height: 1.9; }
  .real-material-example-grid { grid-template-columns: 1fr; }
  .real-material-activity .button { width: 100%; }
  .real-course-aside { display: grid; grid-template-columns: 1fr; }
  .real-ta-card { grid-row: auto; }
  .real-ta-actions { grid-template-columns: 1fr 1fr; }
  .real-course-trace { grid-template-columns: 1fr 1fr; }
  .real-trace-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 390px) {
  .real-ta-actions { grid-template-columns: 1fr; }
  .real-course-trace { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-experience="real-course"] *,
  body[data-experience="real-course"] *::before,
  body[data-experience="real-course"] *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Phase 2.14 teacher desk: material first, decisions beside it, no admin grid. */
.header-teacher-entry { flex: 0 0 auto; }
.teacher-entry-button,
.teacher-mode-exit-button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--accent-soft); color: var(--accent-hover); cursor: pointer; font-size: 11px; font-weight: 800; white-space: nowrap; }
.teacher-entry-button:hover,
.teacher-mode-exit-button:hover { border-color: var(--accent); background: var(--surface-muted); }

body[data-experience="teacher-planning"] .site-atmosphere,
body[data-experience="teacher-planning"] .app-main > .intro-row,
body[data-experience="teacher-planning"] .app-main > .connection-panel,
body[data-experience="teacher-planning"] .app-main > .space-switcher,
body[data-experience="teacher-planning"] .app-main > #showcase-view-switcher,
body[data-experience="teacher-planning"] .app-main > #course-picker,
body[data-experience="teacher-planning"] .app-main > #website-build-panel,
body[data-experience="teacher-planning"] .app-main > #template-action-panel,
body[data-experience="teacher-planning"] .app-main > #learning-workspace,
body[data-experience="teacher-planning"] .app-main > #playground-panel,
body[data-experience="teacher-planning"] .app-main > .action-dock { display: none !important; }
body[data-experience="teacher-planning"] > .action-dock { display: none !important; }

body[data-experience="teacher-planning"] { background: var(--surface-page); color: var(--text-primary); }
body[data-experience="teacher-planning"] .app-header { border-bottom-color: var(--border-default); background: var(--surface-elevated); }
body[data-experience="teacher-planning"] .header-course { border-left-color: var(--border-default); }
body[data-experience="teacher-planning"] .header-course strong { color: var(--text-primary); }
body[data-experience="teacher-planning"] .header-student { display: none; }
body[data-experience="teacher-planning"] .app-main { width: min(1280px, calc(100% - 56px)); padding-top: 34px; }

.teacher-planning-session {
  --teacher-ink: var(--text-primary);
  --teacher-muted: var(--text-secondary);
  --teacher-paper: var(--surface-card);
  --teacher-paper-deep: var(--surface-muted);
  --teacher-line: var(--border-default);
  --teacher-teal: var(--accent);
  --teacher-teal-soft: var(--accent-soft);
  --teacher-copper: #bf684f;
  --teacher-copper-soft: #fff0e8;
  --teacher-yellow: #e9be68;
  --teacher-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  color: var(--teacher-ink);
}

.teacher-planning-hero { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 8px 4px 4px; }
.teacher-planning-hero-copy { max-width: 790px; }
.teacher-planning-kicker,
.teacher-card-eyebrow { margin: 0 0 8px; color: var(--teacher-teal); font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
.teacher-planning-hero h1 { max-width: 780px; margin: 0; color: var(--teacher-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(33px, 4.6vw, 58px); letter-spacing: -.055em; line-height: 1.08; }
.companion-positioning { display: grid; gap: 5px; max-width: 720px; margin-top: 16px; padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--teacher-teal) 42%, var(--teacher-line)); border-left: 3px solid var(--teacher-teal); background: var(--teacher-teal-soft); }
.companion-positioning-label { color: var(--teacher-teal); font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
.companion-positioning strong { color: var(--teacher-ink); font-size: 13px; line-height: 1.45; }
.companion-positioning p { margin: 0; color: var(--teacher-muted); font-size: 12px; line-height: 1.65; }
.teacher-planning-hero-copy > p:last-child { max-width: 66ch; margin: 15px 0 0; color: var(--teacher-muted); font-size: 15px; line-height: 1.75; }
.teacher-planning-hero-note { display: grid; gap: 3px; min-width: 215px; max-width: 255px; padding: 16px 17px; border-left: 3px solid var(--teacher-yellow); background: var(--surface-muted); box-shadow: 8px 8px 0 color-mix(in srgb, var(--teacher-yellow) 16%, transparent); }
.teacher-planning-hero-note strong { color: var(--teacher-ink); font-size: 12px; }
.teacher-planning-hero-note span:last-child { color: var(--teacher-muted); font-size: 11px; line-height: 1.6; }
.teacher-note-mark { color: var(--teacher-copper); font-size: 17px; line-height: 1; }

.teacher-stage-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 0 3px; border-top: 1px solid var(--teacher-line); border-bottom: 1px solid var(--teacher-line); }
.teacher-stage-item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; min-width: 0; min-height: 68px; padding: 10px 12px; color: var(--text-muted); }
.teacher-stage-item + .teacher-stage-item::before { position: absolute; top: 16px; bottom: 16px; left: 0; border-left: 1px solid var(--teacher-line); content: ""; }
.teacher-stage-item > span { padding-top: 2px; color: var(--text-muted); font-family: var(--mono); font-size: 10px; font-weight: 800; }
.teacher-stage-item strong { font-size: 11px; line-height: 1.35; }
.teacher-stage-copy { display: grid; gap: 3px; min-width: 0; }
.teacher-stage-copy small { color: var(--teacher-muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.teacher-stage-item.is-active { color: var(--teacher-teal); background: var(--teacher-teal-soft); }
.teacher-stage-item.is-active::after { position: absolute; right: 12px; bottom: -2px; left: 12px; height: 3px; background: var(--teacher-copper); content: ""; }
.teacher-stage-item.is-done { color: var(--teacher-teal); }

.teacher-planning-layout { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(300px, .78fr); gap: 20px; align-items: start; }
.teacher-planning-main,
.teacher-planning-rail { display: grid; gap: 18px; min-width: 0; }
.teacher-desk-card,
.teacher-rail-card,
.teacher-alignment-card { border: 1px solid var(--teacher-line); background: var(--teacher-paper); box-shadow: var(--teacher-shadow); }
.teacher-desk-card { padding: 23px 25px; }
.teacher-desk-card,
.teacher-rail-card,
.teacher-alignment-card { min-width: 0; }
.teacher-rail-card { padding: 19px; box-shadow: 0 10px 26px rgba(37, 66, 61, .055); }
.teacher-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.teacher-card-heading.compact { margin-bottom: 16px; }
.teacher-card-heading h2,
.teacher-rail-card h2 { margin: 0; color: var(--teacher-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 25px; letter-spacing: -.035em; line-height: 1.2; }
.teacher-rail-card h2 { font-size: 20px; }
.teacher-card-intro { max-width: 70ch; margin: 0 0 18px; color: var(--teacher-muted); font-size: 13px; line-height: 1.7; }
.teacher-provenance { display: inline-flex; align-items: center; width: fit-content; min-height: 22px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.teacher-provenance-teacher { background: var(--attention-soft); color: var(--attention); }
.teacher-provenance-source { background: var(--teacher-teal-soft); color: var(--teacher-teal); }
.teacher-provenance-ai { background: var(--teacher-copper-soft); color: var(--teacher-copper); }
.teacher-material-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 17px; }
.teacher-workshop-download { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 17px; padding: 12px 13px; border: 1px solid var(--teacher-line); border-left: 3px solid var(--teacher-copper); border-radius: 10px; background: var(--teacher-paper-deep); }
.teacher-workshop-download > div { min-width: 0; }
.teacher-workshop-download strong { display: block; color: var(--teacher-ink); font-size: 12px; }
.teacher-workshop-download p { max-width: 68ch; margin: 4px 0 0; color: var(--teacher-muted); font-size: 10px; line-height: 1.55; }
.teacher-workshop-download p span { color: var(--teacher-teal); }
.teacher-workshop-download .button { flex: 0 0 auto; min-height: 36px; white-space: nowrap; }
.teacher-workshop-download-unavailable { flex: 0 0 auto; color: var(--teacher-muted); font-size: 10px; line-height: 1.45; }
.teacher-material-file-label { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 12px; border: 1px solid var(--teacher-teal); border-radius: 9px; background: var(--teacher-teal); color: var(--text-on-accent); cursor: pointer; font-size: 11px; font-weight: 800; }
.teacher-material-file-label:hover { background: var(--accent-hover); }
#teacher-material-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.teacher-field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 13px 0 6px; color: var(--teacher-ink); font-size: 11px; font-weight: 800; }
.teacher-field-label span { color: var(--teacher-muted); font-size: 10px; font-weight: 500; }
.teacher-text-input,
.teacher-material-textarea,
.teacher-small-textarea,
.teacher-cycle-grid input,
.teacher-cycle-grid select { width: 100%; border: 1px solid var(--border-default); border-radius: 9px; background: var(--surface-input); color: var(--teacher-ink); font: inherit; font-size: 12px; line-height: 1.55; }
.teacher-text-input,
.teacher-cycle-grid input,
.teacher-cycle-grid select { min-height: 39px; padding: 8px 10px; }
.teacher-material-textarea,
.teacher-small-textarea { min-height: 100px; padding: 11px 12px; resize: vertical; }
.teacher-text-input:focus,
.teacher-material-textarea:focus,
.teacher-small-textarea:focus,
.teacher-cycle-grid input:focus,
.teacher-cycle-grid select:focus { outline: 3px solid rgba(43, 115, 209, .14); border-color: var(--teacher-teal); }
.teacher-form-footer,
.teacher-chat-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.teacher-form-footer > span,
.teacher-chat-footer > span { color: var(--teacher-muted); font-size: 10px; }
.teacher-planning-session .button { min-height: 39px; padding: 8px 12px; border-radius: 9px; font-size: 11px; }
.teacher-planning-session .button-primary { border-color: var(--teacher-teal); background: var(--teacher-teal); color: var(--text-on-accent); }
.teacher-planning-session .button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.teacher-planning-session .button-outline,
.teacher-planning-session .button-quiet { border: 1px solid var(--border-default); background: transparent; color: var(--teacher-teal); }
.teacher-planning-session .button-outline:hover:not(:disabled),
.teacher-planning-session .button-quiet:hover:not(:disabled) { border-color: var(--teacher-teal); background: var(--teacher-teal-soft); }
.teacher-planning-session .button:disabled { cursor: not-allowed; opacity: .48; }
body.phase-211c-pruned .teacher-planning-session .button:disabled { opacity: 1; }
.button-full { width: 100%; }
.teacher-feedback { margin-top: 13px; padding: 10px 12px; border-left: 3px solid var(--teacher-teal); background: var(--teacher-teal-soft); color: var(--teacher-teal); font-size: 11px; line-height: 1.6; }
.teacher-feedback[data-kind="error"],
.teacher-feedback.is-error { border-left-color: var(--teacher-copper); background: var(--teacher-copper-soft); color: var(--teacher-copper); }
.teacher-material-list { display: grid; gap: 8px; margin-top: 16px; }
.teacher-corpus-summary { display: grid; gap: 3px; margin-top: 14px; padding: 11px 12px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--surface-muted); color: var(--teacher-ink); font-size: 11px; line-height: 1.55; }
.teacher-corpus-summary strong { font-size: 11px; }
.teacher-corpus-summary span { color: var(--teacher-muted); }
.teacher-corpus-summary small { color: var(--teacher-teal); font-size: 10px; }
.teacher-corpus-summary[data-review="NEEDS_REVIEW"] { border-color: var(--teacher-copper); background: var(--teacher-copper-soft); }
.teacher-source-item { padding: 11px 12px; border: 1px solid var(--teacher-line); border-radius: 10px; background: var(--surface-card); }
.teacher-source-item { min-width: 0; }
.teacher-source-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.teacher-source-heading strong { overflow: hidden; color: var(--teacher-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.teacher-source-status { flex: 0 0 auto; font-size: 10px; font-weight: 800; }
.teacher-source-status.is-ok { color: var(--success); }
.teacher-source-status.is-warning,
.teacher-source-status.is-error { color: var(--teacher-copper); }
.teacher-source-meta { margin: 4px 0 7px; color: var(--teacher-muted); font-size: 10px; }
.teacher-source-warning { margin: 5px 0; color: var(--teacher-copper); font-size: 10px; line-height: 1.55; }
.teacher-source-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; }
.teacher-source-item .teacher-provenance { margin-top: 0; }
.teacher-source-remove { color: var(--teacher-copper); font-size: 10px; }
.teacher-empty-copy { margin: 0; color: var(--teacher-muted); font-size: 12px; line-height: 1.7; }
.teacher-analysis-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: -2px 0 17px; color: var(--teacher-teal); font-size: 10px; font-weight: 800; }
.teacher-analysis-progress i { color: var(--teacher-yellow); font-style: normal; }
.teacher-analysis-body { display: grid; gap: 16px; }
.teacher-analysis-summary { padding: 14px; border-left: 3px solid var(--teacher-yellow); background: var(--attention-soft); }
.teacher-analysis-label { display: block; margin-bottom: 5px; color: var(--attention); font-size: 10px; font-weight: 800; }
.teacher-analysis-summary p { margin: 0 0 8px; color: var(--teacher-ink); font-size: 13px; line-height: 1.7; }
.teacher-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.teacher-analysis-group { min-width: 0; padding: 13px; border-top: 2px solid var(--teacher-teal-soft); background: var(--surface-card); }
.teacher-analysis-group h3 { margin: 0 0 8px; color: var(--teacher-ink); font-size: 12px; }
.teacher-analysis-group ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.teacher-analysis-group li { display: flex; align-items: start; justify-content: space-between; gap: 8px; color: var(--teacher-muted); font-size: 11px; line-height: 1.55; }
.teacher-analysis-item-text { min-width: 0; }
.teacher-analysis-group .teacher-provenance { flex: 0 0 auto; transform: translateY(-1px) scale(.9); transform-origin: right top; }
.teacher-ambiguity-note { padding: 12px 13px; border: 1px dashed var(--teacher-copper); background: var(--teacher-copper-soft); color: var(--teacher-copper); font-size: 11px; line-height: 1.6; }
.teacher-ambiguity-note strong { display: block; margin-bottom: 4px; }
.teacher-ambiguity-note p { margin: 2px 0; }

.teacher-conversation-card { background: var(--surface-muted); }
.teacher-planning-chat-list { display: grid; gap: 10px; max-height: 430px; overflow-y: auto; padding: 3px 3px 4px; }
.teacher-planning-message { max-width: 88%; padding: 12px 14px; border-radius: 11px; }
.teacher-planning-message.is-teacher { justify-self: end; background: var(--teacher-teal-soft); color: var(--teacher-ink); }
.teacher-planning-message.is-ai { justify-self: start; border-left: 3px solid var(--teacher-copper); background: var(--surface-card); color: var(--teacher-ink); }
.teacher-planning-message.is-streaming { box-shadow: 0 0 0 2px rgba(191, 104, 79, .14); }
.teacher-planning-message-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; color: var(--teacher-teal); font-size: 10px; font-weight: 800; }
.teacher-planning-message-meta time { color: var(--teacher-muted); font-size: 9px; font-weight: 500; }
.teacher-planning-message-body { font-size: 12px; line-height: 1.7; }
.teacher-planning-message-body p { margin: 0 0 .6em; }
.teacher-planning-message-body p:last-child { margin-bottom: 0; }
.teacher-planning-message-body ul,
.teacher-planning-message-body ol { margin: .35em 0 .55em 1.1em; padding: 0; }
.teacher-planning-message-body code { padding: .1em .3em; border-radius: 4px; background: var(--surface-muted); color: var(--teacher-ink); font-family: var(--mono); font-size: .9em; }
.teacher-planning-chat-form { display: grid; gap: 5px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--teacher-line); }
.teacher-planning-chat-form textarea { min-height: 76px; }
.teacher-chat-footer .button { flex: 0 0 auto; }
.teacher-plan-preview { display: grid; gap: 14px; }
.teacher-first-version-note { margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid var(--teacher-copper); background: var(--surface-muted); color: var(--teacher-muted); font-size: 11px; line-height: 1.6; }
.teacher-plan-intro { display: flex; align-items: start; gap: 10px; padding: 13px 14px; border-left: 3px solid var(--teacher-teal); background: var(--teacher-teal-soft); }
.teacher-plan-intro strong { flex: 1 1 auto; color: var(--teacher-ink); font-size: 12px; line-height: 1.65; }
.teacher-plan-rows { display: grid; grid-template-columns: minmax(100px, .32fr) minmax(0, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--teacher-line); }
.teacher-plan-rows dt,
.teacher-plan-rows dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--teacher-line); font-size: 11px; line-height: 1.6; }
.teacher-plan-rows dt { color: var(--teacher-teal); font-weight: 800; }
.teacher-plan-rows dd { color: var(--teacher-muted); }
.teacher-plan-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.teacher-cycle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.teacher-cycle-grid .teacher-cycle-wide { grid-column: 1 / -1; }
.teacher-cycle-grid label { display: grid; gap: 5px; color: var(--teacher-muted); font-size: 10px; font-weight: 800; }
.teacher-cycle-grid select { appearance: auto; }
.teacher-starter-preset { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 0 0 16px; padding: 12px 13px; border: 1px solid var(--teacher-line); border-left: 3px solid var(--teacher-copper); background: var(--surface-muted); }
.teacher-starter-preset > div { min-width: 0; }
.teacher-starter-preset .teacher-card-eyebrow { margin-bottom: 4px; }
.teacher-starter-preset strong { display: block; color: var(--teacher-ink); font-size: 12px; line-height: 1.45; }
.teacher-starter-preset p { margin: 4px 0 3px; color: var(--teacher-muted); font-size: 10px; line-height: 1.5; }
.teacher-starter-preset small { color: var(--teacher-teal); font-size: 10px; font-weight: 800; }
.teacher-starter-preset .button { flex: 0 0 auto; white-space: nowrap; }
.teacher-starter-preset .button.is-applied { border-color: var(--teacher-teal); background: var(--teacher-teal-soft); color: var(--teacher-teal); }
.teacher-small-feedback { min-height: 18px; margin: 9px 0 0; color: var(--teacher-muted); font-size: 10px; line-height: 1.5; }
.teacher-recommendation { padding: 12px 13px; border: 1px solid var(--teacher-copper); background: var(--teacher-copper-soft); }
.teacher-recommendation-label { display: block; margin-bottom: 5px; color: var(--teacher-copper); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.teacher-recommendation p { margin: 0; color: var(--teacher-ink); font-size: 12px; line-height: 1.65; }
.teacher-recommendation p.is-overridden { text-decoration: line-through; text-decoration-color: rgba(191, 104, 79, .5); }
.teacher-choice-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 10px 0 15px; }
.teacher-choice-buttons .button { min-height: 37px; padding: 7px 8px; font-size: 10px; }
.teacher-decision-list { display: grid; gap: 7px; margin-top: 12px; }
.teacher-decision-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; padding: 9px 10px; border-left: 2px solid var(--teacher-yellow); background: var(--surface-card); }
.teacher-decision-item strong { color: var(--teacher-teal); font-size: 10px; }
.teacher-decision-item span:not(.teacher-provenance) { grid-column: 1 / -1; color: var(--teacher-ink); font-size: 11px; line-height: 1.55; }
.teacher-decision-item .teacher-provenance { grid-column: 2; grid-row: 1; justify-self: end; transform: scale(.86); transform-origin: right top; }
.teacher-package-status { margin: 12px 0; padding: 10px 11px; border-radius: 9px; background: var(--teacher-paper-deep); color: var(--teacher-muted); font-size: 11px; line-height: 1.55; }
.teacher-package-status[data-status="ACTIVE"] { background: var(--teacher-teal-soft); color: var(--teacher-teal); font-weight: 800; }
.teacher-skill-inspection { display: grid; gap: 9px; margin-bottom: 13px; }
.teacher-skill-inspection > p { margin: 0; color: var(--teacher-muted); font-size: 11px; line-height: 1.6; }
.teacher-skill-row { padding-bottom: 8px; border-bottom: 1px solid var(--teacher-line); }
.teacher-skill-row strong { display: block; margin-bottom: 3px; color: var(--teacher-teal); font-size: 10px; }
.teacher-skill-row p { margin: 0; color: var(--teacher-ink); font-size: 11px; line-height: 1.6; }
.teacher-developer-details { padding: 12px; border: 1px dashed var(--teacher-line); color: var(--teacher-muted); font-size: 10px; }
.teacher-developer-details summary { color: var(--teacher-teal); cursor: pointer; font-weight: 800; }
.teacher-developer-details p { margin: 8px 0; }
.teacher-developer-details pre { max-height: 360px; overflow: auto; white-space: pre-wrap; font: 10px/1.5 var(--mono); }
.teacher-alignment-card { padding: 20px 22px; }
.teacher-alignment-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.teacher-alignment-item { min-width: 0; padding: 12px; border-top: 2px solid var(--teacher-copper); background: var(--surface-card); }
.teacher-alignment-item strong { display: block; margin-bottom: 6px; color: var(--teacher-teal); font-size: 10px; }
.teacher-alignment-item p { margin: 0; color: var(--teacher-ink); font-size: 11px; line-height: 1.65; }

:root[data-theme="dark"] .teacher-planning-session,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-planning-session { --teacher-ink: var(--text-primary); --teacher-muted: var(--text-secondary); --teacher-paper: var(--surface-card); --teacher-paper-deep: var(--surface-muted); --teacher-line: var(--border-default); --teacher-teal: var(--accent); --teacher-teal-soft: var(--accent-soft); --teacher-copper: #e6a18b; --teacher-copper-soft: #4b302b; --teacher-yellow: #e7c477; color: var(--teacher-ink); }
:root[data-theme="dark"] body[data-experience="teacher-planning"],
:root[data-theme="system"] body[data-experience="teacher-planning"] { background: var(--surface-page); }
:root[data-theme="dark"] body[data-experience="teacher-planning"] .app-header,
:root[data-theme="system"] body[data-experience="teacher-planning"] .app-header { background: var(--surface-elevated); border-bottom-color: var(--teacher-line); }

@media (max-width: 1040px) {
  body[data-experience="teacher-planning"] .app-main { width: min(960px, calc(100% - 38px)); }
  .teacher-planning-layout { grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr); gap: 15px; }
  .teacher-desk-card { padding: 20px; }
}

@media (max-width: 820px) {
  body[data-experience="teacher-planning"] .app-main { padding-top: 25px; }
  .teacher-planning-hero { align-items: start; flex-direction: column; gap: 18px; }
  .teacher-planning-hero-note { max-width: none; width: min(100%, 440px); }
  .teacher-stage-rail { grid-template-columns: repeat(5, minmax(116px, 1fr)); overflow-x: auto; }
  .teacher-stage-item { min-width: 150px; }
  .teacher-planning-layout { grid-template-columns: minmax(0, 1fr); }
  .teacher-planning-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .teacher-activation-card,
  .teacher-developer-details { grid-column: 1 / -1; }
  .teacher-alignment-body { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body[data-experience="teacher-planning"] .app-main { width: calc(100% - 28px); padding-bottom: 30px; }
  body[data-experience="teacher-planning"] .header-course { display: none; }
  .header-teacher-entry { margin-left: auto; }
  .teacher-entry-button,
  .teacher-mode-exit-button { min-height: 34px; padding: 7px 9px; font-size: 10px; }
  .teacher-planning-hero h1 { font-size: clamp(31px, 10vw, 44px); }
  .companion-positioning { margin-top: 13px; padding: 12px 13px; }
  .companion-positioning p { font-size: 11px; }
  .teacher-planning-hero-copy > p:last-child { font-size: 14px; }
  .teacher-stage-rail { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .teacher-desk-card,
  .teacher-rail-card,
  .teacher-alignment-card { padding: 17px; border-radius: 15px; }
  .teacher-card-heading { align-items: start; flex-direction: column; gap: 8px; }
  .teacher-card-heading h2 { font-size: 23px; }
  .teacher-analysis-grid { grid-template-columns: 1fr; }
  .teacher-cycle-grid { grid-template-columns: 1fr 1fr; }
  .teacher-workshop-download { align-items: stretch; flex-direction: column; }
  .teacher-workshop-download .button { width: 100%; }
  .teacher-starter-preset { grid-template-columns: 1fr; align-items: stretch; }
  .teacher-starter-preset .button { width: 100%; }
  .teacher-planning-rail { grid-template-columns: 1fr; }
  .teacher-activation-card,
  .teacher-developer-details { grid-column: auto; }
  .teacher-form-footer,
  .teacher-chat-footer,
  .teacher-plan-actions { align-items: stretch; flex-direction: column; }
  .teacher-form-footer .button,
  .teacher-chat-footer .button,
  .teacher-plan-actions .button { width: 100%; }
  .teacher-planning-message { max-width: 96%; }
  .teacher-alignment-body { grid-template-columns: 1fr; }
  .teacher-plan-rows { grid-template-columns: 1fr; }
  .teacher-plan-rows dt { padding-bottom: 2px; border-bottom: 0; }
  .teacher-plan-rows dd { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-experience="teacher-planning"] *,
  body[data-experience="teacher-planning"] *::before,
  body[data-experience="teacher-planning"] *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Golden Assessment Cycle: a compact teacher-first entry, not a second LMS. */
.teacher-demo-choice,
.teacher-golden-preview { padding: 20px 22px; border: 1px solid var(--teacher-line); background: var(--surface-elevated); box-shadow: var(--teacher-shadow); }
.teacher-choice-intro { max-width: 700px; }
.teacher-choice-intro h2 { margin: 0; color: var(--teacher-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.teacher-choice-intro p { margin: 8px 0 0; color: var(--teacher-muted); font-size: 12px; line-height: 1.7; }
.teacher-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.teacher-entry-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0; padding: 16px; border: 1px solid var(--teacher-line); background: var(--teacher-paper); }
.teacher-entry-choice-featured { border-color: rgba(43, 115, 209, .45); box-shadow: inset 0 3px 0 var(--teacher-teal); }
.teacher-entry-choice-mark { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--teacher-teal-soft); color: var(--teacher-teal); font: 800 12px/1 var(--mono); }
.teacher-entry-choice h3 { margin: 0; color: var(--teacher-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 19px; letter-spacing: -.025em; }
.teacher-entry-choice p { margin: 6px 0 0; color: var(--teacher-muted); font-size: 11px; line-height: 1.65; }
.teacher-entry-choice .button { grid-column: 2; justify-self: start; margin-top: 6px; }
.teacher-golden-preview { display: grid; gap: 16px; border-color: var(--teacher-copper); background: var(--surface-elevated); }
.teacher-golden-overview { display: grid; gap: 15px; }
.teacher-golden-title-block { display: grid; gap: 5px; max-width: 760px; }
.teacher-golden-title-block h3 { margin: 0; color: var(--teacher-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: clamp(23px, 3vw, 34px); letter-spacing: -.045em; line-height: 1.18; }
.teacher-golden-title-block p { margin: 0; color: var(--teacher-muted); font-size: 12px; line-height: 1.65; }
.teacher-golden-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.teacher-golden-summary-item { display: grid; gap: 5px; min-width: 0; padding: 12px; border-top: 2px solid var(--teacher-copper); background: var(--teacher-paper); }
.teacher-golden-summary-label { color: var(--teacher-muted); font: 800 9px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.teacher-golden-summary-item strong { color: var(--teacher-ink); font-size: 13px; line-height: 1.4; }
.teacher-golden-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.teacher-golden-detail-card { min-width: 0; padding: 15px; border: 1px solid var(--teacher-line); background: var(--teacher-paper); }
.teacher-golden-detail-card h3 { margin: 0 0 10px; color: var(--teacher-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 18px; letter-spacing: -.025em; }
.teacher-golden-list { display: grid; gap: 7px; margin: 0; padding-left: 17px; color: var(--teacher-ink); font-size: 11px; line-height: 1.55; }
.teacher-golden-list li::marker { color: var(--teacher-copper); }
.teacher-golden-list li.is-extension { color: var(--teacher-copper); }
.teacher-golden-material-list { padding-left: 0; list-style: none; }
.teacher-golden-material-list li { display: grid; gap: 2px; padding-bottom: 7px; border-bottom: 1px solid var(--teacher-line); }
.teacher-golden-material-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.teacher-golden-material-list strong { overflow-wrap: anywhere; color: var(--teacher-ink); font-size: 11px; }
.teacher-golden-material-list span { color: var(--teacher-muted); font-size: 10px; line-height: 1.45; }
.teacher-golden-muted,
.teacher-golden-boundary { margin: 12px 0 0; color: var(--teacher-muted); font-size: 10px; line-height: 1.6; }
.teacher-golden-boundary { color: var(--teacher-copper); }
.teacher-golden-build-note { display: grid; gap: 4px; padding: 12px 14px; border-left: 3px solid var(--teacher-yellow); background: var(--surface-muted); }
.teacher-golden-build-note strong { color: var(--teacher-ink); font-size: 11px; }
.teacher-golden-build-note p { margin: 0; color: var(--teacher-muted); font-size: 11px; line-height: 1.65; }
.teacher-golden-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.teacher-golden-lens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.teacher-golden-lens-item { min-width: 0; padding: 11px; border-top: 2px solid var(--teacher-teal); background: var(--teacher-paper); }
.teacher-golden-lens-item strong { display: block; margin-bottom: 5px; color: var(--teacher-teal); font-size: 10px; }
.teacher-golden-lens-item p { margin: 0; color: var(--teacher-ink); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.teacher-golden-provenance { border-top: 1px dashed var(--teacher-line); padding-top: 10px; color: var(--teacher-muted); font-size: 10px; }
.teacher-golden-provenance summary { cursor: pointer; color: var(--teacher-teal); font-weight: 800; }
.teacher-golden-provenance pre { max-height: 390px; overflow: auto; white-space: pre-wrap; font: 10px/1.5 var(--mono); }

:root[data-theme="dark"] .teacher-demo-choice,
:root[data-theme="dark"] .teacher-golden-preview,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-demo-choice,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-golden-preview { background: var(--surface-elevated); }
:root[data-theme="dark"] .teacher-entry-choice,
:root[data-theme="dark"] .teacher-golden-summary-item,
:root[data-theme="dark"] .teacher-golden-detail-card,
:root[data-theme="dark"] .teacher-golden-lens-item,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-entry-choice,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-golden-summary-item,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-golden-detail-card,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-golden-lens-item { background: var(--surface-card); }

@media (max-width: 820px) {
  .teacher-golden-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-golden-detail-grid { grid-template-columns: 1fr 1fr; }
  .teacher-golden-teaching-card { grid-column: 1 / -1; }
  .teacher-golden-lens { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .teacher-demo-choice,
  .teacher-golden-preview { padding: 17px; border-radius: 15px; }
  .teacher-choice-grid,
  .teacher-golden-detail-grid { grid-template-columns: 1fr; }
  .teacher-entry-choice .button { width: 100%; }
  .teacher-golden-summary-grid,
  .teacher-golden-lens { grid-template-columns: 1fr 1fr; }
  .teacher-golden-actions { display: grid; grid-template-columns: 1fr; }
  .teacher-golden-actions .button { width: 100%; }
}

/* Phase 2.15B: keep the cycle proposal and week switcher readable without
   turning either surface into an admin dashboard. */
.teacher-golden-cycle-proposal {
  display: grid;
  gap: 15px;
  padding: 17px 18px;
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--teacher-teal);
  background: var(--surface-muted);
}
.teacher-golden-cycle-heading { display: grid; gap: 5px; }
.teacher-golden-cycle-heading h3 {
  margin: 0;
  color: var(--teacher-ink);
  font-family: "Noto Serif TC", "Songti TC", Georgia, serif;
  font-size: clamp(21px, 2.6vw, 29px);
  letter-spacing: -.04em;
  line-height: 1.2;
}
.teacher-golden-cycle-heading p { max-width: 70ch; margin: 0; color: var(--teacher-muted); font-size: 12px; line-height: 1.65; }
.teacher-golden-cycle-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.teacher-golden-cycle-week {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--teacher-line);
  background: var(--teacher-paper);
}
.teacher-golden-cycle-week.is-extension { border-color: var(--teacher-copper); background: var(--teacher-copper-soft); }
.teacher-golden-cycle-week-label { color: var(--teacher-teal); font: 800 10px/1.2 var(--mono); letter-spacing: .06em; }
.teacher-golden-cycle-week strong { color: var(--teacher-ink); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.teacher-golden-cycle-week p { margin: 0; color: var(--teacher-muted); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.teacher-golden-cycle-note { color: var(--teacher-copper); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.teacher-golden-cycle-footer { display: flex; align-items: center; gap: 10px; min-width: 0; padding-top: 2px; }
.teacher-golden-cycle-footer p { min-width: 0; margin: 0; color: var(--teacher-muted); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.teacher-golden-cycle-proposal :focus-visible,
.real-course-week-button:focus-visible { outline: 3px solid rgba(43, 115, 209, .24); outline-offset: 2px; }

.real-course-week-rail {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid var(--real-line);
  border-radius: 15px;
  background: var(--surface-muted);
}
.real-course-week-copy { min-width: 0; }
.real-course-week-copy h2 { margin: 0; color: var(--real-ink); font-family: "Noto Serif TC", "Songti TC", Georgia, serif; font-size: 20px; letter-spacing: -.03em; line-height: 1.25; }
.real-course-week-copy p { margin: 5px 0 0; color: var(--real-muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.real-course-week-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; min-width: 0; }
.real-course-week-button {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 56px;
  padding: 9px 8px;
  border: 1px solid var(--real-line);
  border-radius: 10px;
  background: var(--real-paper);
  color: var(--real-muted);
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}
.real-course-week-button:hover:not(:disabled) { border-color: var(--real-accent); background: var(--real-accent-soft); color: var(--real-accent-deep); transform: translateY(-1px); }
.real-course-week-button.is-current { border-color: var(--real-accent); background: var(--real-accent-soft); color: var(--real-accent-deep); box-shadow: inset 0 3px var(--real-accent); }
.real-course-week-button:disabled { cursor: not-allowed; opacity: 1; }
.real-course-week-button strong { color: inherit; font: 800 10px/1.2 var(--mono); }
.real-course-week-button span { min-width: 0; color: inherit; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }

:root[data-theme="dark"] .teacher-golden-cycle-proposal,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-golden-cycle-proposal { background: var(--surface-muted); }
:root[data-theme="dark"] .teacher-golden-cycle-week,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-golden-cycle-week { background: var(--surface-card); }
:root[data-theme="dark"] .teacher-golden-cycle-week.is-extension,
:root[data-theme="system"] body[data-experience="teacher-planning"] .teacher-golden-cycle-week.is-extension { background: var(--teacher-copper-soft); }
:root[data-theme="dark"] .real-course-week-rail,
:root[data-theme="system"] body[data-experience="real-course"] .real-course-week-rail { background: var(--surface-muted); }

/* B_INTAKE_UI_BATCH_01: keep the existing teacher-desk language and make the
   first-course path read as one quiet, truthful intake sequence. */
.teacher-intake-region { scroll-margin-top: 20px; }
.teacher-intake-route-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 15px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--teacher-teal) 28%, var(--teacher-line));
  border-left: 3px solid var(--teacher-teal);
  background: var(--teacher-teal-soft);
}
.teacher-intake-route-number {
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
  border: 1px solid color-mix(in srgb, var(--teacher-teal) 45%, transparent);
  border-radius: 50%;
  color: var(--teacher-teal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}
.teacher-intake-route-note > div { display: grid; gap: 2px; min-width: 0; }
.teacher-intake-route-note strong { color: var(--teacher-ink); font-size: 12px; line-height: 1.45; }
.teacher-intake-route-note span:not(.teacher-intake-route-number) { color: var(--teacher-muted); font-size: 10px; line-height: 1.5; }
.teacher-material-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--teacher-line);
  background: var(--surface-muted);
}
.teacher-material-file-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  min-width: 0;
}
.teacher-material-file-action:focus-within {
  border-radius: 8px;
  outline: 3px solid rgba(43, 115, 209, .18);
  outline-offset: 3px;
}
.teacher-material-file-label { min-height: 44px; padding: 10px 14px; }
.teacher-upload-helper { color: var(--teacher-muted); font-size: 10px; line-height: 1.45; }
.teacher-material-file-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 9px;
  min-width: 0;
  margin: 0 0 15px;
  padding: 9px 11px;
  border: 1px solid var(--teacher-line);
  border-left: 3px solid var(--teacher-line);
  background: var(--surface-card);
}
.teacher-material-file-state strong { min-width: 0; overflow-wrap: anywhere; color: var(--teacher-ink); font-size: 11px; line-height: 1.45; }
.teacher-material-file-state span { min-width: 0; color: var(--teacher-muted); font-size: 10px; line-height: 1.5; }
.teacher-material-file-state[data-state="selected"] { border-left-color: var(--teacher-teal); background: var(--teacher-teal-soft); }
.teacher-material-file-state[data-state="selected"] strong { color: var(--teacher-teal); }
.teacher-material-file-state[data-state="uploaded"] { border-left-color: var(--success); background: var(--surface-muted); }
.teacher-material-file-state[data-state="uploaded"] strong { color: var(--success); }
.teacher-workshop-download { margin-top: 0; }
.teacher-intake-optional { display: inline-flex; width: fit-content; margin-bottom: 4px; color: var(--teacher-copper); font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.teacher-intake-preset { transition: border-color .16s ease, background-color .16s ease; }
.teacher-intake-preset[data-applied="true"] { border-color: color-mix(in srgb, var(--teacher-teal) 52%, var(--teacher-line)); background: var(--teacher-teal-soft); }
.teacher-intake-preset[data-applied="true"] small { color: var(--teacher-teal); }
.teacher-analysis-progress {
  display: grid;
  gap: 9px;
  margin: -2px 0 17px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--teacher-teal) 30%, var(--teacher-line));
  border-left: 3px solid var(--teacher-teal);
  background: var(--teacher-teal-soft);
  color: var(--teacher-teal);
}
.teacher-analysis-progress-label { color: var(--teacher-ink); font-size: 12px; font-weight: 800; line-height: 1.45; }
.teacher-analysis-progress-track { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.teacher-analysis-progress-track span {
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--teacher-teal) 24%, var(--teacher-line));
  border-radius: 999px;
  color: var(--teacher-muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
}
.teacher-analysis-progress-track i { color: var(--teacher-yellow); font-style: normal; font-size: 10px; }
.teacher-analysis-progress-track span.is-active { border-color: var(--teacher-teal); background: var(--surface-card); color: var(--teacher-teal); }
.teacher-analysis-progress-track span.is-complete { border-color: color-mix(in srgb, var(--success) 48%, var(--teacher-line)); background: var(--surface-card); color: var(--success); }
.teacher-analysis-progress-track span.is-error { border-color: var(--teacher-copper); background: var(--teacher-copper-soft); color: var(--teacher-copper); }
.teacher-intake-analysis[data-analysis-state="error"] .teacher-analysis-progress { border-color: var(--teacher-copper); border-left-color: var(--teacher-copper); background: var(--teacher-copper-soft); }
.teacher-intake-analysis[data-analysis-state="error"] .teacher-analysis-progress-label { color: var(--teacher-copper); }
.teacher-intake-region .button,
.teacher-intake-region .teacher-material-file-label,
.teacher-planning-session #teacher-compile-button { min-height: 44px; }

@media (max-width: 620px) {
  .teacher-intake-route-note { align-items: start; padding: 10px; }
  .teacher-material-actions { grid-template-columns: 1fr; align-items: stretch; }
  .teacher-material-file-action { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .teacher-material-file-label,
  .teacher-material-actions .button { width: 100%; justify-content: center; }
  .teacher-upload-helper { padding: 0 2px; }
  .teacher-material-file-state { grid-template-columns: 1fr; gap: 2px; }
  .teacher-analysis-progress-track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .teacher-analysis-progress-track i { display: none; }
  .teacher-analysis-progress-track span { display: flex; align-items: center; justify-content: center; min-height: 34px; text-align: center; }
}
:root[data-theme="dark"] .real-course-week-button,
:root[data-theme="system"] body[data-experience="real-course"] .real-course-week-button { background: var(--real-paper); }

@media (max-width: 1040px) {
  .teacher-golden-cycle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .real-course-week-rail { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 820px) {
  .teacher-golden-cycle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .real-course-week-nav { grid-template-columns: repeat(5, minmax(74px, 1fr)); overflow-x: auto; padding-bottom: 2px; }
}

@media (max-width: 620px) {
  .teacher-golden-cycle-proposal { padding: 15px; }
  .teacher-golden-cycle-grid { grid-template-columns: 1fr; }
  .teacher-golden-cycle-footer { align-items: flex-start; flex-direction: column; }
  .real-course-week-rail { padding: 13px; border-radius: 13px; }
  .real-course-week-nav { grid-template-columns: repeat(5, minmax(106px, 1fr)); margin-right: -2px; }
}

@media (prefers-reduced-motion: reduce) {
  .real-course-week-button { transition: none; }
}

/* STUDENT_SUPPORT_UI_BATCH_01: existing teal tokens, reading-first disclosure,
   and user-controlled chat scroll (Flowbite / assistant-ui pattern references). */
.real-mobile-switch { display: none; }
body[data-experience="real-course"] .real-course-heading h1 { font-size: clamp(25px, 3vw, 38px); line-height: 1.25; max-width: 30ch; }
body[data-experience="real-course"] .app-main { padding-top: 24px; }
.real-course-layout { grid-template-columns: minmax(0, 1.25fr) minmax(350px, .9fr); align-items: start; gap: 24px; }
.real-reading-panel { padding: 28px; }
.real-reading-header h2 { font-size: clamp(23px, 2.5vw, 32px); line-height: 1.35; }
.real-source-disclosure { margin: 14px 0; border-block: 1px solid var(--real-line); color: var(--real-muted); }
.real-source-disclosure summary { cursor: pointer; padding: 12px 2px; min-height: 44px; font-size: 13px; }
.real-source-disclosure .real-source-detail { margin: 0; padding: 0 0 14px; border: 0; font-size: 13px; }
.real-source-disclosure summary:focus-visible,
.real-mobile-switch button:focus-visible,
.real-jump-latest:focus-visible { outline: 3px solid var(--real-accent); outline-offset: 3px; }
.real-source-link { min-height: 44px; display: inline-flex; align-items: center; }
.real-material-paragraph { font-size: 16px; line-height: 1.85; max-width: 65ch; }
.real-section-nav { gap: 8px; }
.real-ta-card { padding: 20px; }
.real-ta-copy { font-size: 14px; line-height: 1.7; }
.real-chat-reference { margin: 0; padding: 10px 12px; border-left: 3px solid var(--real-accent); background: var(--real-accent-soft); color: var(--real-ink); font-size: 13px; line-height: 1.5; }
.real-chat-history-wrap { position: relative; min-height: 90px; }
.real-chat-list { max-height: 380px; padding: 4px 4px 12px; overscroll-behavior: contain; overflow-anchor: none; }
.real-chat-message { padding: 12px; }
.real-chat-message.is-student { margin-left: 24px; background: var(--real-accent-soft); }
.real-chat-message.is-ta { margin-right: 12px; }
.real-chat-role { font: 600 12px/1.4 var(--sans); }
.real-chat-body { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.real-chat-empty { font-size: 14px; line-height: 1.8; }
.real-jump-latest { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); min-height: 44px; padding: 9px 16px; border: 1px solid var(--real-line); border-radius: 24px; background: var(--surface-elevated); color: var(--real-accent-deep); box-shadow: var(--real-shadow); cursor: pointer; white-space: nowrap; z-index: 2; }
.real-quick-prompts { margin: 12px 0; gap: 8px; }
.real-quick-prompts > span { font-size: 12px; }
.real-quick-prompts button { min-height: 44px; padding: 9px 12px; font-size: 13px; }
.real-chat-form textarea { font-size: 16px; min-height: 76px; }
.real-chat-form-footer > span { font-size: 11px; }
.real-chat-form-footer .button, .real-ta-actions .button, .real-chat-error .text-button { min-height: 44px; font-size: 13px; }
.real-chat-error { font-size: 14px; flex-wrap: wrap; }
.real-course-week-button { min-height: 52px; }
@media (max-width: 1050px) and (min-width: 768px) {
  .real-course-layout { grid-template-columns: minmax(0, 1fr) minmax(310px, .95fr); gap: 16px; }
  .real-reading-panel, .real-ta-card { padding: 18px; }
}
@media (max-width: 767px) {
  body[data-experience="real-course"] #real-course-session { gap: 16px; }
  body[data-experience="real-course"] .real-course-heading h1 { font-size: 25px; }
  .real-course-header { gap: 12px; }
  .real-course-header-actions { gap: 8px; }
  .real-course-thesis { margin-top: 8px; }
  .real-course-week-copy { display: none; }
  .real-course-week-rail { padding: 10px; }
  .real-mobile-switch { display: flex; gap: 6px; position: sticky; top: 0; z-index: 5; padding: 8px; background: var(--surface-page); border-bottom: 1px solid var(--real-line); }
  .real-mobile-switch button { flex: 1; min-height: 44px; border: 1px solid var(--real-line); border-radius: 10px; background: var(--surface-input); color: var(--real-ink); font-size: 15px; cursor: pointer; }
  .real-mobile-switch button[aria-pressed="true"] { background: var(--real-accent-soft); border-color: var(--real-accent); font-weight: 700; }
  .real-course-layout { display: block; }
  #real-course-session:not([data-student-panel="chat"]) .real-course-aside { display: none; }
  #real-course-session[data-student-panel="chat"] .real-reading-panel { display: none; }
  .real-reading-panel, .real-ta-card { padding: 18px; }
  .real-chat-list { max-height: min(40dvh, 340px); }
  .real-ta-copy, .real-ta-actions { display: none; }
  .real-chat-form { padding: 10px 0 max(8px, env(safe-area-inset-bottom)); background: var(--surface-card); }
  .real-chat-form textarea { resize: none; }
  .real-course-aside { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  #real-course-session *, #real-course-session *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* === LUV skin r001 BEGIN (appearance tokens only; remove this block + restore 5 literal teal colours (see git diff) to revert) ===
   Palette/shape/type follow the 愛智理 LUVManager 店家後台 (measured 2026-10-10):
   paper #f4efe6, ink #12212a, blue #2b73d1, red #b8412f, Noto Sans/Serif TC,
   4-6px radii, hard offset shadow. No selectors, text or behavior changed. */
:root {
  --radius-xl: 8px;
  --radius-lg: 6px;
  --radius-md: 5px;
  --radius-sm: 4px;
  --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --display: "Noto Serif TC", "Songti TC", Georgia, serif;
}
body.phase-211c-pruned {
  --surface-page: #f4efe6;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-input: #ffffff;
  --surface-muted: #ebe5d8;
  --text-primary: #12212a;
  --text-secondary: #3a4a54;
  --text-muted: #52626a;
  --text-on-accent: #ffffff;
  --border-default: #c9c7bf;
  --border-subtle: #e1dccf;
  --disabled-bg: #e9e4d9;
  --disabled-text: #8a949a;
  --disabled-border: #d3cfc4;
  --accent: #2b73d1;
  --accent-hover: #185f8d;
  --accent-soft: #e1ecf9;
  --success: #1e7a52;
  --success-soft: #e3f1e9;
  --attention: #8a651b;
  --attention-soft: #f6edd6;
  --danger: #b8412f;
  --danger-soft: #f9e6e1;
  --focus-surface: #12212a;
  --focus-deep: #0d1b22;
  --focus-text: #f7fbfa;
  --focus-muted: #c3d0d6;
  --code-surface: #12212a;
  --code-text: #eaf2f6;
  --shadow: 6px 6px 0 rgba(18, 33, 42, 0.07);
  --shadow-deep: 8px 8px 0 rgba(18, 33, 42, 0.1);
}
:root[data-theme="dark"] body.phase-211c-pruned {
  --surface-page: #0d1b22;
  --surface-card: #12212a;
  --surface-elevated: #1a2a33;
  --surface-input: #14242d;
  --surface-muted: #1d2f39;
  --text-primary: #f1f5f6;
  --text-secondary: #c9d4d9;
  --text-muted: #9fb0b8;
  --text-on-accent: #0b1620;
  --border-default: #2b3f4a;
  --border-subtle: #22343e;
  --disabled-bg: #1b2a33;
  --disabled-text: #73848c;
  --disabled-border: #2a3b45;
  --accent: #5b9be6;
  --accent-hover: #84b4ee;
  --accent-soft: #1c3550;
  --success: #5cc79a;
  --success-soft: #173a2c;
  --attention: #e0b45c;
  --attention-soft: #3a3015;
  --danger: #f08a7b;
  --danger-soft: #3d1f1c;
  --focus-surface: #060f14;
  --focus-deep: #060f14;
  --focus-text: #f1f5f6;
  --focus-muted: #9fb0b8;
  --code-surface: #060f14;
  --code-text: #eaf2f6;
  --shadow: 6px 6px 0 rgba(0, 0, 0, 0.25);
  --shadow-deep: 8px 8px 0 rgba(0, 0, 0, 0.3);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] body.phase-211c-pruned {
    --surface-page: #0d1b22;
    --surface-card: #12212a;
    --surface-elevated: #1a2a33;
    --surface-input: #14242d;
    --surface-muted: #1d2f39;
    --text-primary: #f1f5f6;
    --text-secondary: #c9d4d9;
    --text-muted: #9fb0b8;
    --text-on-accent: #0b1620;
    --border-default: #2b3f4a;
    --border-subtle: #22343e;
    --disabled-bg: #1b2a33;
    --disabled-text: #73848c;
    --disabled-border: #2a3b45;
    --accent: #5b9be6;
    --accent-hover: #84b4ee;
    --accent-soft: #1c3550;
    --success: #5cc79a;
    --success-soft: #173a2c;
    --attention: #e0b45c;
    --attention-soft: #3a3015;
    --danger: #f08a7b;
    --danger-soft: #3d1f1c;
    --focus-surface: #060f14;
    --focus-deep: #060f14;
    --focus-text: #f1f5f6;
    --focus-muted: #9fb0b8;
    --code-surface: #060f14;
    --code-text: #eaf2f6;
    --shadow: 6px 6px 0 rgba(0, 0, 0, 0.25);
    --shadow-deep: 8px 8px 0 rgba(0, 0, 0, 0.3);
  }
}
/* === LUV skin r001 END === */
