:root {
  --ink: #26303a;
  --paper: #f6f6f4;
  --white: #fff;
  --muted: #67707a;
  --line: #dfe2e2;
  --amber: #ab6b27;
  --amber-light: #fbf1df;
  --amber-line: #e3bd81;
  --dark: #222b35;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 25px;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font:
    14px/1.7 ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
textarea,
input {
  font: inherit;
}
button,
a,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
header,
main,
footer {
  max-width: 1400px;
  margin: 0 auto;
}
header {
  padding: 22px 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 28px;
}
.brand {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.brand svg {
  width: 29px;
  height: 29px;
  color: var(--amber);
}
.brand > span {
  font-size: 7px;
  letter-spacing: 1.3px;
  font-weight: 500;
  margin-left: 15px;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 25px;
  align-items: center;
  font-size: 11px;
}
nav button {
  border: 0;
  padding: 0;
  background: none;
  font-size: 11px;
  color: var(--ink);
}
nav a:hover,
nav button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.mode-badge {
  background: #e8ede8;
  border: 1px solid #d6dfd6;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 9px;
  color: #4c6251;
  white-space: nowrap;
}
.mode-badge > span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #718a73;
  margin-right: 4px;
}
.mode-badge small {
  display: block;
  font-size: 8px;
  color: #667769;
  padding-left: 10px;
}
main {
  padding: 0 46px;
}
.intro {
  padding: 53px 0 39px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 70px;
  align-items: center;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  font-weight: 650;
  color: var(--amber);
  margin: 0 0 20px;
}
h1,
h2,
h3 {
  letter-spacing: -1.2px;
  line-height: 1.18;
  font-weight: 550;
}
h1 {
  font-size: 47px;
  margin: 0 0 20px;
}
.intro > div > p:not(.eyebrow) {
  font-size: 14px;
  color: var(--muted);
  max-width: 490px;
}
.intro-actions {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 27px;
}
.primary {
  display: inline-flex;
  align-items: center;
  gap: 27px;
  background: var(--dark);
  color: white;
  border: 1px solid var(--dark);
  border-radius: 4px;
  padding: 11px 18px;
  font-size: 11px;
  font-weight: 600;
}
.primary:hover {
  background: #39444f;
}
.quiet {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
  background: none;
  border: 0;
  font-size: 11px;
  color: var(--ink);
}
.case-card {
  display: flex;
  align-items: flex-start;
  gap: 23px;
  padding: 27px;
  background: #eeefeb;
  border: 1px solid #dcdfd8;
  border-radius: 7px;
}
.case-icon {
  color: var(--amber);
  display: block;
  padding-top: 6px;
}
.case-icon svg {
  width: 66px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.case-card .eyebrow {
  font-size: 8px;
  margin-bottom: 10px;
}
.case-card h2 {
  font-size: 22px;
  margin: 0 0 12px;
  letter-spacing: -0.6px;
}
.case-card p:not(.eyebrow) {
  font-size: 12px;
  color: #626c67;
  margin: 0 0 17px;
}
.original-label {
  font-size: 7px;
  letter-spacing: 1px;
  color: #767d70;
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 0 0 13px;
  font-size: 11px;
}
.workspace-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.workspace-dot {
  width: 5px;
  height: 5px;
  background: var(--amber);
  border-radius: 50%;
}
.workspace-heading strong {
  font-weight: 550;
}
.course-version {
  font:
    8px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  color: var(--muted);
  padding: 3px 6px;
  background: #e9ebea;
  border-radius: 2px;
  margin-left: 5px;
}
#new-session {
  font-size: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 5px 0;
}
#new-session span {
  margin-left: 8px;
}
.workspace {
  display: grid;
  grid-template-columns: 1.22fr 1fr;
  align-items: start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.tutor-column {
  border-right: 1px solid var(--line);
  min-width: 0;
}
.tutor-heading {
  padding: 21px 25px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.tutor-heading > div {
  display: flex;
  gap: 12px;
  align-items: center;
}
.tutor-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: #f4e4c8;
  border: 1px solid #e8d0a4;
  border-radius: 50%;
  font-size: 20px;
  font-family: Georgia, serif;
  color: #8b602a;
  font-style: italic;
}
.tutor-heading h2 {
  font-size: 15px;
  letter-spacing: -0.3px;
  margin: 0 0 4px;
}
.tutor-heading p {
  font-size: 10px;
  margin: 0;
  color: var(--muted);
}
#session-status {
  font-size: 8px;
  color: var(--muted);
  white-space: nowrap;
}
.conversation {
  padding: 24px 25px 12px;
  min-height: 255px;
  max-height: 580px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #d1d6d2 transparent;
}
.welcome {
  border: 1px solid #e9e6df;
  background: #faf9f6;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 12px;
}
.message-label {
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 1px;
  color: var(--amber);
  margin: 0 0 13px;
}
.welcome h3 {
  font-size: 17px;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
}
.welcome > p:not(.message-label) {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 15px;
}
.welcome .mode-disclosure {
  font-size: 9px !important;
  color: #7a796f !important;
  line-height: 1.8;
  margin: 0 !important;
  padding-top: 13px;
  border-top: 1px solid #e9e4da;
}
.suggestions {
  padding: 3px 25px 22px;
  display: grid;
  gap: 8px;
}
.suggestions button {
  display: grid;
  grid-template-columns: 1fr 14px;
  text-align: left;
  gap: 3px 10px;
  padding: 10px 13px;
  border: 1px solid #e4e5e2;
  border-radius: 4px;
  background: white;
  color: #49535d;
  font-size: 11px;
}
.suggestions button > span {
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--amber);
}
.suggestions button > b {
  font-weight: 400;
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
  color: var(--muted);
}
.suggestions button:hover {
  background: #fcf8f0;
  border-color: #ddc79e;
}
.message {
  margin: 0 0 23px;
}
.message.user {
  margin-left: 55px;
  border: 1px solid #e5e7e7;
  border-radius: 6px;
  background: #f2f4f3;
  padding: 13px 17px;
}
.message.user .message-label {
  color: var(--muted);
  margin-bottom: 7px;
  font-size: 7px;
}
.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.9;
  margin: 0;
}
.message.assistant {
  padding: 17px;
  border: 1px solid #e5e5df;
  border-radius: 6px;
  background: white;
}
.message.assistant.hint {
  border-left: 3px solid #c89b58;
}
.message.assistant.insufficient_evidence {
  background: #faf7f0;
  border-color: #e5d5b5;
}
.message.assistant .message-label {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.message.assistant .message-label > span:last-child {
  color: var(--muted);
  font-weight: 400;
  font-size: 7px;
  letter-spacing: 0.2px;
}
.citations {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}
.citations button {
  background: #fcf6ea;
  border: 1px solid #e7d1aa;
  color: #895f2d;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 9px;
}
.citations button:hover {
  background: #f8e9cb;
}
.response-meta {
  font-size: 8px;
  color: #81868a;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid #eef0ed;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.thinking {
  font-size: 11px;
  color: var(--muted);
  padding: 10px 0;
}
.composer-area {
  padding: 18px 25px 20px;
  border-top: 1px solid var(--line);
  background: #fafbf9;
}
.guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 9px;
  color: var(--muted);
}
#guidance-level {
  display: flex;
  gap: 4px;
}
#guidance-level i {
  width: 13px;
  height: 4px;
  background: #e1e3df;
  border-radius: 2px;
}
#guidance-level i.active {
  background: #c18c3f;
}
#question-form {
  position: relative;
  border: 1px solid #d8dcd9;
  background: white;
  border-radius: 5px;
}
#question {
  display: block;
  resize: vertical;
  min-height: 80px;
  max-height: 170px;
  width: 100%;
  padding: 14px 55px 14px 14px;
  font-size: 12px;
  line-height: 1.8;
  border: 0;
  background: none;
  color: var(--ink);
  border-radius: 5px;
}
#question::placeholder {
  color: #92989d;
}
#send {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 4px;
  background: var(--dark);
  color: white;
}
#send svg {
  width: 18px;
}
.teaching-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.teaching-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dbdfdc;
  background: white;
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 9px;
  color: #626965;
}
.teaching-actions button:hover {
  border-color: var(--amber-line);
  color: var(--amber);
}
.teaching-actions button > span {
  color: #a48b64;
  font-size: 12px;
}
.composer-note {
  font-size: 8px;
  color: #858c88;
  margin: 11px 0 0;
  line-height: 1.8;
}
.error-notice {
  padding: 12px;
  margin-top: 13px;
  background: #fff2e1;
  border-left: 3px solid #c49a62;
  font-size: 11px;
  color: #815c2f;
}
.retry {
  font-size: 10px;
  padding: 7px 10px;
  background: #f1e3cc;
  border: 1px solid #d7bc93;
  border-radius: 4px;
  color: #795b34;
  margin-top: 8px;
}
.source-column {
  background: #fcfcfa;
  min-width: 0;
  position: relative;
}
.source-top {
  padding: 23px 25px 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.source-top .eyebrow {
  font-size: 7px;
  letter-spacing: 1px;
  margin-bottom: 11px;
}
.source-top h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
  margin: 0;
}
.source-book {
  font-family: Georgia, serif;
  color: #c9b68e;
  font-size: 30px;
}
.lesson-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 25px;
  gap: 7px;
}
.lesson-tabs button {
  padding: 9px 3px;
  border: 0;
  border-bottom: 2px solid #e3e5df;
  background: none;
  text-align: left;
  font-size: 8px;
  color: var(--muted);
  line-height: 1.7;
}
.lesson-tabs button > small {
  display: block;
  font-size: 7px;
  margin-bottom: 2px;
  color: #999b90;
}
.lesson-tabs button[aria-selected="true"] {
  border-bottom-color: var(--amber);
  color: #825b29;
  font-weight: 600;
}
.source-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 15px 25px 0;
  font-size: 7px;
  color: #8c8f83;
  letter-spacing: 0.5px;
}
.source-meta span:first-child {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.source-passages {
  padding: 17px 25px 22px;
  max-height: 670px;
  min-height: 500px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #d5d8cb transparent;
}
.source-passage {
  padding: 15px 0;
  border-bottom: 1px solid #e7e8e1;
}
.source-passage:first-child {
  padding-top: 7px;
}
.source-passage h3 {
  font-size: 13px;
  letter-spacing: -0.2px;
  margin: 0 0 10px;
}
.source-passage p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.95;
  color: #697068;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.source-anchor {
  font:
    7px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  color: #909280;
  display: block;
  margin-top: 11px;
}
.source-passage.selected {
  background: #fff3d9;
  border: 1px solid #dfbd7e;
  border-left: 3px solid #b47a2e;
  border-radius: 4px;
  padding: 16px;
  margin: 2px -8px 10px;
}
.source-passage.selected h3 {
  color: #80571f;
}
.source-passage.selected p {
  color: #615439;
}
.source-passage.selected .source-anchor {
  color: #9a7a44;
}
.source-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 15px 25px;
  font-size: 8px;
  color: var(--muted);
  min-height: 51px;
}
.verified-icon {
  font-size: 12px;
  color: #839174;
}
.source-bottom button {
  margin-left: auto;
  font-size: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: #92622c;
  white-space: nowrap;
}
.practice-panel {
  padding: 20px 25px 25px;
  background: #fcf8ef;
  border-top: 1px solid #e8d7b7;
  border-bottom: 1px solid #e8d7b7;
}
.practice-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.practice-panel .eyebrow {
  font-size: 8px;
  margin-bottom: 14px;
}
.practice-panel h3 {
  font-size: 19px;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
}
.practice-panel > p {
  font-size: 11px;
  color: var(--muted);
}
#close-practice {
  background: none;
  border: 0;
  padding: 0;
  font-size: 22px;
  color: #8d7d63;
  align-self: flex-start;
}
.practice-panel fieldset {
  border: 0;
  margin: 15px 0 18px;
  padding: 0;
}
.practice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e1d8c6;
  border-radius: 4px;
  background: white;
  font-size: 11px;
  margin-bottom: 7px;
  cursor: pointer;
}
.practice-option input {
  accent-color: var(--amber);
}
.practice-panel .primary {
  background: #8a602c;
  border-color: #8a602c;
  font-size: 10px;
}
.how-it-works {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f1f2ef;
}
.how-it-works summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 23px;
  cursor: pointer;
}
.how-it-works summary b {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
.how-it-works summary small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.how-it-works summary > span:last-child {
  font-size: 17px;
  color: var(--muted);
}
.how-content {
  padding: 0 23px 24px;
}
.how-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-block: 1px solid #dce0d8;
  padding: 22px 0;
}
.how-flow > span {
  font-size: 11px;
  font-weight: 550;
}
.how-flow small {
  display: block;
  font-size: 8px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
}
.how-flow > b {
  color: var(--amber);
  font-weight: 400;
}
.how-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-top: 22px;
}
.how-notes h3 {
  font-size: 13px;
  letter-spacing: -0.2px;
  margin: 0 0 10px;
}
.how-notes p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.provenance-note {
  font-size: 9px;
  color: #7c8175;
  line-height: 1.9;
  margin: 22px 0 0;
  border-top: 1px solid #dce0d8;
  padding-top: 17px;
}
.handover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 65px 0;
}
.handover .eyebrow {
  font-size: 8px;
}
.handover h2 {
  font-size: 30px;
  margin: 0 0 20px;
}
.handover p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
  max-width: 480px;
}
.portfolio-link {
  display: flex;
  align-items: center;
  gap: 35px;
  padding: 13px 18px;
  border: 1px solid #cfd4cd;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}
.portfolio-link:hover {
  background: #e9ede5;
}
footer {
  padding: 24px 46px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 9px;
  color: var(--muted);
}
footer > span:first-child {
  font-weight: 600;
  color: var(--ink);
}
footer .muted {
  font-weight: 400;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: absolute;
  left: 15px;
  top: -100px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.skip-link:focus {
  top: 10px;
}
.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;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible,
summary:focus-visible,
input:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid #bb8d42;
  outline-offset: 4px;
}
@media (max-width: 1100px) {
  .brand > span {
    display: none;
  }
  .intro {
    gap: 35px;
  }
  .case-card {
    padding: 23px;
    gap: 17px;
  }
  h1 {
    font-size: 42px;
  }
  .case-icon svg {
    width: 52px;
  }
  .case-card h2 {
    font-size: 20px;
  }
  .workspace {
    grid-template-columns: 1.15fr 1fr;
  }
  .tutor-heading {
    padding: 20px;
  }
  .tutor-heading p {
    font-size: 9px;
  }
  .conversation {
    padding: 20px 20px 10px;
  }
  .suggestions {
    padding: 3px 20px 20px;
  }
  .composer-area {
    padding: 17px 20px 20px;
  }
  .source-top {
    padding: 23px 20px 17px;
  }
  .lesson-tabs {
    padding: 0 20px;
    gap: 5px;
  }
  .source-meta {
    padding: 15px 20px 0;
  }
  .source-passages {
    padding: 17px 20px 20px;
  }
  .source-bottom {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  .source-bottom button {
    margin-left: 20px;
  }
  .mode-badge {
    font-size: 8px;
  }
  .mode-badge small {
    font-size: 7px;
  }
  nav {
    gap: 20px;
  }
  .source-top h2 {
    font-size: 21px;
  }
  .source-book {
    font-size: 26px;
  }
  .practice-panel {
    padding: 20px;
  }
  .how-flow {
    gap: 12px;
  }
  .how-flow > span {
    font-size: 10px;
  }
  .how-flow small {
    font-size: 7px;
  }
}
@media (max-width: 850px) {
  header,
  footer {
    padding: 20px 24px;
  }
  main {
    padding: 0 24px;
  }
  .intro {
    gap: 25px;
  }
  .intro .eyebrow {
    font-size: 8px;
  }
  .intro > div > p:not(.eyebrow) {
    font-size: 12px;
  }
  .case-card {
    padding: 22px;
    display: block;
  }
  .case-icon svg {
    width: 55px;
    margin-bottom: 10px;
  }
  .case-card p:not(.eyebrow) {
    font-size: 11px;
  }
  .original-label {
    font-size: 6px;
  }
  .mode-badge {
    font-size: 7px;
    padding: 6px;
  }
  .mode-badge small {
    font-size: 6px;
  }
  .brand {
    font-size: 24px;
  }
  .brand svg {
    width: 26px;
  }
  nav {
    gap: 15px;
    font-size: 10px;
  }
  nav button {
    font-size: 10px;
  }
  .workspace {
    grid-template-columns: 1fr 1fr;
  }
  .tutor-heading {
    align-items: flex-start;
    gap: 10px;
    padding: 18px;
  }
  .tutor-heading h2 {
    font-size: 13px;
  }
  .tutor-heading p {
    font-size: 8px;
  }
  .tutor-avatar {
    width: 28px;
    height: 28px;
    font-size: 18px;
    flex-shrink: 0;
  }
  .tutor-heading > div {
    gap: 9px;
  }
  #session-status {
    font-size: 7px;
  }
  .conversation {
    padding: 18px 17px 10px;
  }
  .welcome {
    padding: 16px;
  }
  .welcome h3 {
    font-size: 15px;
  }
  .welcome > p:not(.message-label) {
    font-size: 11px;
  }
  .suggestions {
    padding: 3px 17px 20px;
  }
  .suggestions button {
    font-size: 10px;
  }
  .composer-area {
    padding: 17px;
  }
  .teaching-actions {
    gap: 5px;
  }
  .teaching-actions button {
    font-size: 8px;
    padding: 5px 7px;
  }
  .source-top {
    padding: 20px 17px 16px;
    gap: 10px;
  }
  .source-top h2 {
    font-size: 20px;
  }
  .source-top .eyebrow {
    font-size: 6px;
    letter-spacing: 0.7px;
  }
  .source-book {
    font-size: 23px;
  }
  .lesson-tabs {
    padding: 0 17px;
  }
  .lesson-tabs button {
    font-size: 7px;
  }
  .source-meta {
    padding: 14px 17px 0;
    font-size: 6px;
  }
  .source-passages {
    padding: 14px 17px 20px;
  }
  .source-passage p {
    font-size: 12px;
  }
  .source-passage h3 {
    font-size: 12px;
  }
  .source-bottom {
    padding: 14px 17px;
    font-size: 7px;
  }
  .message.user {
    margin-left: 30px;
  }
  .message.assistant {
    padding: 14px;
  }
  .message-text {
    font-size: 11px;
  }
  .message-label {
    font-size: 7px;
  }
  .citations button {
    font-size: 8px;
  }
  .candidate-meta {
    font-size: 7px;
  }
  .how-flow {
    flex-wrap: wrap;
  }
  .how-flow > span {
    flex-basis: 40%;
    font-size: 10px;
  }
  .how-flow > b:nth-child(4) {
    display: none;
  }
  .how-notes {
    gap: 20px;
  }
  .handover h2 {
    font-size: 27px;
  }
  .handover p:not(.eyebrow) {
    font-size: 11px;
  }
  .portfolio-link {
    gap: 20px;
    font-size: 10px;
  }
  footer {
    font-size: 8px;
    gap: 15px;
  }
}
@media (max-width: 650px) {
  header {
    flex-wrap: wrap;
    gap: 13px;
    padding: 19px 20px;
  }
  .brand {
    font-size: 24px;
  }
  .brand svg {
    width: 26px;
  }
  nav {
    font-size: 10px;
    gap: 15px;
  }
  nav button {
    font-size: 10px;
  }
  .mode-badge {
    flex-basis: 100%;
    font-size: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #e9eee7;
  }
  .mode-badge > span {
    margin-right: 0;
  }
  .mode-badge small {
    font-size: 8px;
    margin-left: auto;
    padding: 0;
  }
  main {
    padding: 0 20px;
  }
  .intro {
    grid-template-columns: 1fr;
    padding: 32px 0 26px;
    gap: 26px;
  }
  h1 {
    font-size: 39px;
    letter-spacing: -1.2px;
  }
  .intro > div > p:not(.eyebrow) {
    font-size: 13px;
    max-width: 440px;
  }
  .intro .eyebrow {
    font-size: 8px;
    margin-bottom: 17px;
  }
  .intro-actions {
    gap: 22px;
    margin-top: 23px;
  }
  .primary {
    font-size: 11px;
  }
  .quiet {
    font-size: 11px;
  }
  .case-card {
    display: flex;
    padding: 22px;
    gap: 21px;
  }
  .case-icon svg {
    width: 56px;
  }
  .case-card h2 {
    font-size: 20px;
  }
  .case-card p:not(.eyebrow) {
    font-size: 11px;
  }
  .original-label {
    font-size: 6px;
  }
  .workspace-heading {
    font-size: 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .workspace-heading > div {
    gap: 6px;
  }
  .course-version {
    font-size: 7px;
    margin-left: 3px;
  }
  #new-session {
    font-size: 9px;
  }
  .workspace {
    grid-template-columns: 1fr;
    border-radius: 7px;
  }
  .tutor-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .tutor-heading {
    padding: 20px;
    align-items: center;
  }
  .tutor-heading h2 {
    font-size: 15px;
  }
  .tutor-heading p {
    font-size: 9px;
  }
  .tutor-avatar {
    width: 33px;
    height: 33px;
    font-size: 20px;
  }
  #session-status {
    font-size: 8px;
  }
  .conversation {
    padding: 21px 19px 10px;
    max-height: 530px;
  }
  .welcome {
    padding: 18px;
  }
  .welcome h3 {
    font-size: 17px;
  }
  .welcome > p:not(.message-label) {
    font-size: 12px;
  }
  .welcome .mode-disclosure {
    font-size: 9px !important;
  }
  .suggestions {
    padding: 3px 19px 21px;
  }
  .suggestions button {
    padding: 11px 12px;
    font-size: 11px;
  }
  .composer-area {
    padding: 18px 19px 20px;
  }
  .teaching-actions {
    gap: 6px;
  }
  .teaching-actions button {
    font-size: 9px;
    padding: 6px 8px;
  }
  .guidance {
    font-size: 8px;
  }
  .composer-note {
    font-size: 7px;
  }
  .message.user {
    margin-left: 25px;
  }
  .message.assistant {
    padding: 16px;
  }
  .message-text {
    font-size: 12px;
  }
  .message-label {
    font-size: 7px;
  }
  .citations button {
    font-size: 9px;
  }
  .response-meta {
    font-size: 7px;
  }
  .source-top {
    padding: 24px 20px 16px;
  }
  .source-top .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .source-top h2 {
    font-size: 24px;
  }
  .source-book {
    font-size: 28px;
  }
  .lesson-tabs {
    padding: 0 20px;
    gap: 8px;
  }
  .lesson-tabs button {
    font-size: 8px;
  }
  .lesson-tabs button > small {
    font-size: 7px;
  }
  .source-meta {
    padding: 15px 20px 0;
    font-size: 7px;
  }
  .source-passages {
    padding: 17px 20px 20px;
    min-height: 220px;
    max-height: 440px;
  }
  .source-passage p {
    font-size: 13px;
  }
  .source-passage h3 {
    font-size: 13px;
  }
  .source-bottom {
    padding: 16px 20px;
    font-size: 8px;
  }
  .source-bottom button {
    margin-left: auto;
    font-size: 8px;
  }
  .source-passage.selected {
    margin: 2px -7px 10px;
  }
  .practice-panel {
    padding: 20px;
  }
  .how-it-works {
    margin-top: 25px;
  }
  .how-it-works summary {
    padding: 17px 18px;
  }
  .how-it-works summary b {
    font-size: 11px;
  }
  .how-it-works summary small {
    font-size: 9px;
  }
  .how-content {
    padding: 0 18px 21px;
  }
  .how-flow {
    display: grid;
    grid-template-columns: 1fr 15px 1fr;
    gap: 22px 13px;
  }
  .how-flow > span {
    font-size: 10px;
  }
  .how-flow > b:nth-child(4) {
    display: none;
  }
  .how-flow > b:nth-child(6) {
    grid-column: 2;
  }
  .how-flow small {
    font-size: 7px;
  }
  .how-notes {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .how-notes h3 {
    font-size: 13px;
  }
  .how-notes p {
    font-size: 10px;
  }
  .provenance-note {
    font-size: 8px;
  }
  .handover {
    flex-direction: column;
    align-items: flex-start;
    padding: 43px 0;
    gap: 20px;
  }
  .handover h2 {
    font-size: 29px;
  }
  .handover .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .handover p:not(.eyebrow) {
    font-size: 11px;
  }
  .portfolio-link {
    font-size: 11px;
    padding: 12px 15px;
    gap: 40px;
  }
  footer {
    padding: 21px 20px;
    flex-wrap: wrap;
    font-size: 8px;
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
