:root {
  --ink: #27382d;
  --muted: #687367;
  --paper: #f7f7f0;
  --line: #dce1d4;
  --green: #dbeaaf;
  --forest: #304831;
  --white: #fffef9;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
.village-lesson-link { display: flex; flex-direction: column; grid-column: 1 / -1; gap: 5px; position: relative; padding: 14px 20px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: #edf2df; }
.village-lesson-link strong { font-size: 16px; }
.village-lesson-link > span { font-size: 12px; }
.village-lesson-link b { position: absolute; right: 15px; top: 15px; }
.site-credit { margin: 12px auto 22px; padding: 0 16px; text-align: center; font-size: 10px; line-height: 1.5; color: var(--muted); }
.site-credit a { color: inherit; }
header.masthead nav a.village-nav-link { display: inline; }
.lesson-picker .village-lesson-link strong { max-width: none; font-size: 19px; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 550;
}
button:hover {
  background: #e9eedf;
  border-color: #a9b397;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #7b974f;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
.masthead {
  height: 77px;
  margin: 0 4%;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 30px;
}
.wordmark {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 1.1px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.mark {
  font-size: 34px;
  color: #586d3d;
}
.edition {
  font-size: 10px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pill {
  font-size: 8px;
  border: 1px solid #b5bf9f;
  border-radius: 3px;
  padding: 4px 6px;
}
.masthead nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-size: 11px;
}
.masthead nav a {
  text-decoration: none;
}
main {
  margin: 0 4%;
}
.intro {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 60px;
  padding: 46px 0 38px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  margin: 0 0 12px;
}
.intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 51px;
  line-height: 1.04;
  letter-spacing: -1.8px;
  margin: 0;
  font-weight: normal;
}
.intro h1 em {
  font-weight: normal;
  color: #677e47;
}
.intro-copy {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 18px 0 0;
}
.lesson-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lesson-picker button {
  position: relative;
  text-align: left;
  min-height: 166px;
  padding: 22px;
  border-radius: 9px;
  background: #efeee5;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lesson-picker button[aria-pressed="true"] {
  background: var(--green);
  border-color: #a8bb77;
}
.lesson-number {
  font-size: 9px;
  letter-spacing: 1.6px;
}
.lesson-picker strong {
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.15;
  font-weight: normal;
  max-width: 190px;
}
.lesson-picker button > span:last-of-type {
  font-size: 11px;
  line-height: 1.5;
  color: #647052;
  max-width: 160px;
}
.lesson-picker b {
  position: absolute;
  right: 18px;
  bottom: 18px;
  font-size: 22px;
  font-weight: normal;
}
.workspace {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 8px 28px #33402006;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.workspace-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}
.workspace-heading h2 {
  font-size: 13px;
  margin: 0;
  font-weight: 600;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: #78964c;
}
.file-actions {
  display: flex;
  gap: 7px;
}
.file-actions button {
  font-size: 10px;
  padding: 7px 9px;
}
.work-grid {
  display: grid;
  grid-template-columns: 195px minmax(300px, 1fr) 292px;
  min-height: 520px;
}
.palette {
  padding: 21px 15px;
  border-right: 1px solid var(--line);
}
h3 {
  font-size: 14px;
  margin: 0 0 9px;
}
.muted {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}
.asset-card {
  width: 100%;
  display: grid;
  grid-template-columns: 43px 1fr;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px 9px;
  margin-top: 9px;
  background: #f8f8f1;
  border-radius: 7px;
}
.asset-card[aria-pressed="true"] {
  background: #eaf0d8;
  border-color: #8ba061;
}
.asset-card svg {
  width: 39px;
  height: 39px;
}
.asset-card strong {
  font-size: 11px;
  font-weight: 600;
  display: block;
  line-height: 1.35;
}
.asset-card small {
  font-size: 9px;
  color: #6e7966;
  display: block;
  line-height: 1.5;
  margin-top: 4px;
}
.draft-tag {
  background: #dbeee7;
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 8px;
}
.palette-note {
  display: flex;
  gap: 8px;
  margin-top: 25px;
  color: #808b76;
}
.palette-note > span {
  font-size: 22px;
}
.palette-note p {
  font-size: 10px;
  line-height: 1.7;
}
.design-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f3f5ec;
}
.view-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 15px;
  background: #fcfcf7;
  border-bottom: 1px solid var(--line);
}
.view-tabs button {
  border: none;
  font-size: 11px;
  padding: 7px 11px;
}
.view-tabs button[aria-selected="true"] {
  background: #e8eddf;
}
.view-tabs span {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
}
#viewport {
  height: 371px;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 340px;
}
#viewport canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#render-status {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 12px;
  z-index: 2;
}
.view-caption {
  position: absolute;
  bottom: 14px;
  left: 17px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
  font-size: 9px;
  color: #7b8674;
}
.view-caption span:first-child {
  max-width: 50%;
}
.fit-button {
  position: absolute;
  top: 14px;
  right: 15px;
  background: #ffffffb5;
  z-index: 1;
  font-size: 10px;
}
#plan-panel {
  flex: 1;
  min-height: 340px;
  position: relative;
  background-image: radial-gradient(#b5c1a2 0.65px, transparent 0.65px);
  background-size: 16px 16px;
}
#plan {
  height: 340px;
  width: 100%;
  touch-action: none;
}
#plan svg {
  width: 100%;
  height: 100%;
  touch-action: none;
}
#plan g {
  cursor: grab;
}
#plan g:focus {
  outline: none;
}
#plan g:focus polygon {
  stroke: #304831;
  stroke-width: 12;
}
.plan-help {
  font-size: 9px;
  color: var(--muted);
  padding: 0 13px;
  text-align: center;
}
.design-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  flex-wrap: wrap;
  padding: 9px 12px;
  background: #fcfcf7;
  border-top: 1px solid var(--line);
}
.design-toolbar > div {
  display: flex;
  gap: 3px;
}
.design-toolbar button {
  font-size: 10px;
  border-color: transparent;
  padding: 6px;
}
.design-note {
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fcfcf7;
}
.design-note > span {
  font-size: 9px;
  line-height: 1.5;
  max-width: 65%;
  color: var(--muted);
}
.design-note button {
  font-size: 10px;
  white-space: nowrap;
  background: #eaf0dd;
}
.tutor {
  border-left: 1px solid var(--line);
  padding: 19px 17px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tutor-heading {
  display: flex;
  gap: 10px;
  align-items: center;
}
.tutor-avatar {
  font-size: 29px;
  background: #e8efdc;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #658140;
}
.tutor-heading h3 {
  font-size: 13px;
  margin: 0 0 3px;
}
.tutor-heading span {
  font-size: 9px;
  color: var(--muted);
}
.steps {
  display: flex;
  list-style: none;
  gap: 4px;
  padding: 0;
  margin: 18px 0;
}
.steps li {
  flex: 1;
  border-top: 3px solid #e8eadf;
  padding-top: 6px;
  font-size: 8px;
  color: var(--muted);
}
.steps li.done {
  border-color: #709245;
}
.steps li.current {
  border-color: #b1c56e;
  color: #304831;
  font-weight: 700;
}
.lesson-card {
  padding: 15px;
  background: #f0f3e7;
  border-radius: 7px;
}
.lesson-card .eyebrow {
  font-size: 8px;
  margin-bottom: 8px;
}
.lesson-card h3 {
  font-size: 15px;
  line-height: 1.3;
}
.lesson-card p:not(.eyebrow) {
  font-size: 11px;
  line-height: 1.65;
  color: #66735e;
  margin: 9px 0 13px;
}
.primary {
  background: var(--forest);
  color: white;
  border-color: var(--forest);
  font-size: 11px;
}
.primary:hover {
  background: #435c37;
  color: white;
}
.lesson-card button {
  width: 100%;
  font-size: 10px;
}
.chat-log {
  max-height: 165px;
  overflow: auto;
  margin: 9px 0;
  font-size: 11px;
  line-height: 1.6;
  scrollbar-width: thin;
}
.chat-message {
  padding: 9px 0;
  border-bottom: 1px solid #e8eadf;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-message.user {
  color: #7b826f;
}
.chat-message strong {
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  margin-bottom: 3px;
  color: #4a663d;
}
.suggestions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: auto 0 10px;
  padding-top: 8px;
}
.suggestions button {
  font-size: 9px;
  border-radius: 20px;
  padding: 6px 9px;
}
#chat-form {
  position: relative;
  margin-top: 0;
}
textarea {
  width: 100%;
  resize: vertical;
  max-height: 150px;
  background: #fafbf6;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 36px 11px 11px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink);
}
#send-chat {
  position: absolute;
  right: 7px;
  bottom: 10px;
  width: 25px;
  height: 25px;
  border: none;
  background: #e2ebcb;
  border-radius: 5px;
  padding: 0;
  font-size: 16px;
}
.tutor-footnote {
  font-size: 8px;
  color: #909a83;
  margin: 7px 0 0;
  line-height: 1.5;
}
.inspector {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 230px 1fr 292px;
  gap: 25px;
  padding: 23px 20px;
}
.component-info h3 {
  font-size: 19px;
  font-family: Georgia, serif;
  font-weight: normal;
}
.component-info p:not(.eyebrow) {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.component-info a {
  font-size: 10px;
}
.source-revision {
  font-size: 8px !important;
  overflow-wrap: anywhere;
}
.parameter-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.parameter-heading h3 {
  font-size: 12px;
}
.parameter-heading span {
  font-size: 9px;
  color: var(--muted);
}
#parameter-fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.field {
  flex: 1;
  min-width: 87px;
}
.field label {
  font-size: 9px;
  display: block;
  color: var(--muted);
  margin-bottom: 7px;
}
input {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
  width: 100%;
  background: #fcfcf7;
  font-size: 12px;
  color: var(--ink);
}
.generate-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 13px;
}
.generate-row span {
  font-size: 10px;
  color: var(--muted);
}
.review-panel {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.review-panel .eyebrow {
  font-size: 8px;
}
.review-panel p {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.review-panel label {
  font-size: 9px;
  display: block;
  margin-bottom: 5px;
}
.review-panel input {
  font-size: 11px;
  padding: 7px;
}
.review-actions {
  display: flex;
  gap: 7px;
  margin: 9px 0;
}
.review-actions button {
  font-size: 9px;
  padding: 7px;
}
#export-contribution {
  font-size: 9px;
}
.learning-note {
  padding: 35px 0 30px;
  display: grid;
  grid-template-columns: 230px 1fr auto;
  gap: 25px;
  align-items: center;
}
.learning-note .eyebrow {
  font-size: 8px;
  line-height: 1.6;
}
.learning-note p {
  font-family: Georgia, serif;
  font-size: 20px;
  margin: 0;
  line-height: 1.4;
}
.learning-note p span {
  font:
    11px/1.6 -apple-system,
    sans-serif;
  color: var(--muted);
}
.learning-note > div {
  font-size: 9px;
  color: var(--muted);
}
footer {
  margin: 0 4%;
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 8px;
  letter-spacing: 0.6px;
  color: #7e8875;
}
#notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  z-index: 20;
  background: #304831;
  color: white;
  box-shadow: 0 4px 25px #0002;
  border-radius: 8px;
  font-size: 12px;
  padding: 13px 20px;
}
#notice:empty {
  display: none;
}
#notice.error {
  background: #894c3c;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  max-width: 590px;
  width: 90%;
  padding: 28px;
  background: var(--white);
  color: var(--ink);
}
dialog::backdrop {
  background: #263c2a55;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.dialog-heading h2 {
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: normal;
  margin: 0 0 20px;
}
.dialog-heading button {
  align-self: flex-start;
  font-size: 24px;
  border: none;
  padding: 0 5px;
}
#review-content {
  font-size: 12px;
  line-height: 1.7;
}
#review-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 13px 0;
}
#review-content td,
#review-content th {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11px;
}
#review-content .check {
  background: #eaf0df;
  padding: 12px;
  border-radius: 5px;
}
#ack-review {
  margin-top: 15px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1600px) {
  main,
  .masthead,
  footer {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
  }
  .work-grid {
    grid-template-columns: 215px minmax(300px, 1fr) 320px;
  }
  #viewport {
    min-height: 420px;
  }
}
@media (max-width: 1100px) {
  .masthead {
    gap: 15px;
  }
  .edition {
    display: none;
  }
  .intro {
    gap: 25px;
  }
  .intro h1 {
    font-size: 43px;
  }
  .lesson-picker button {
    padding: 17px;
  }
  .lesson-picker strong {
    font-size: 20px;
  }
  .work-grid {
    grid-template-columns: 160px minmax(250px, 1fr) 260px;
  }
  .palette {
    padding: 18px 10px;
  }
  .inspector {
    grid-template-columns: 180px 1fr 240px;
    gap: 15px;
    padding: 18px 15px;
  }
  .view-caption {
    font-size: 8px;
  }
  .learning-note {
    grid-template-columns: 180px 1fr;
  }
  .learning-note > div {
    display: none;
  }
  .file-actions button {
    font-size: 9px;
  }
}
@media (max-width: 850px) {
  .intro {
    grid-template-columns: 1fr 1.4fr;
    gap: 20px;
    padding-top: 30px;
  }
  .intro h1 {
    font-size: 35px;
  }
  .intro-copy {
    font-size: 11px;
  }
  .lesson-picker {
    gap: 8px;
  }
  .lesson-picker strong {
    font-size: 19px;
  }
  .lesson-picker button {
    min-height: 155px;
    padding: 14px;
  }
  .lesson-number {
    font-size: 8px;
  }
  .work-grid {
    grid-template-columns: 155px 1fr;
  }
  .tutor {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
  }
  .tutor-heading {
    grid-column: 1;
  }
  .steps {
    grid-column: 1;
    grid-row: 2;
  }
  .lesson-card {
    grid-column: 1;
    grid-row: 3/6;
  }
  .chat-log {
    grid-column: 2;
    grid-row: 1/4;
    max-height: 150px;
  }
  .suggestions {
    grid-column: 2;
    grid-row: 4;
  }
  .tutor form {
    grid-column: 2;
    grid-row: 5;
  }
  .tutor-footnote {
    grid-column: 2;
  }
  .inspector {
    grid-template-columns: 1fr 1.5fr;
  }
  .review-panel {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 17px 0 0;
  }
  .review-panel input {
    max-width: 320px;
  }
  .workspace-heading {
    padding: 12px;
  }
  .workspace-heading h2 {
    font-size: 11px;
  }
  .file-actions {
    gap: 3px;
  }
}
@media (max-width: 590px) {
  main,
  .masthead,
  footer {
    margin-left: 16px;
    margin-right: 16px;
  }
  .masthead {
    height: 62px;
    gap: 10px;
  }
  .wordmark {
    font-size: 9px;
    letter-spacing: 0.6px;
  }
  .mark {
    font-size: 27px;
  }
  .masthead nav {
    gap: 9px;
    font-size: 8px;
  }
  .masthead nav a:first-child {
    display: none;
  }
  .intro {
    display: block;
    padding: 27px 0;
  }
  .intro h1 {
    font-size: 39px;
  }
  .intro-copy {
    font-size: 12px;
    margin: 12px 0 20px;
  }
  .intro h1 br {
    display: none;
  }
  .lesson-picker button {
    min-height: 154px;
  }
  .lesson-picker strong {
    font-size: 21px;
  }
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .workspace-heading h2 {
    font-size: 12px;
  }
  .work-grid {
    display: flex;
    flex-direction: column;
  }
  .palette {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }
  .palette > .eyebrow {
    font-size: 8px;
  }
  .palette h3 {
    font-size: 13px;
  }
  .palette > .muted {
    margin: 5px 0 10px;
  }
  .palette-note {
    display: none;
  }
  #asset-palette {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
  }
  .asset-card {
    min-width: 133px;
    max-width: 150px;
    grid-template-columns: 30px 1fr;
    margin: 0;
    padding: 9px;
    gap: 7px;
  }
  .asset-card svg {
    width: 30px;
    height: 30px;
  }
  .asset-card strong {
    font-size: 10px;
  }
  .asset-card small {
    font-size: 8px;
  }
  #viewport {
    height: 330px;
    min-height: 330px;
    flex: none;
  }
  .view-tabs {
    padding: 8px;
  }
  .view-caption span:last-child {
    font-size: 8px;
  }
  .tutor {
    display: flex;
    gap: 0;
    padding: 20px;
  }
  .tutor .steps {
    margin: 15px 0;
  }
  .chat-log {
    max-height: 180px;
  }
  .suggestions {
    margin-top: 8px;
  }
  .inspector {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 22px;
  }
  .component-info .source-revision {
    margin-bottom: 0;
  }
  .review-panel {
    padding-top: 18px;
  }
  .learning-note {
    display: block;
    padding: 26px 0;
  }
  .learning-note > .eyebrow {
    display: block;
  }
  .learning-note p {
    font-size: 18px;
  }
  footer {
    flex-direction: column;
    gap: 10px;
    font-size: 7px;
  }
  .design-note > span {
    max-width: 60%;
  }
  .design-toolbar button {
    font-size: 9px;
  }
  .view-tabs span {
    font-size: 8px;
  }
  .file-actions {
    flex-wrap: wrap;
  }
  .field {
    min-width: 80px;
  }
  .intro .eyebrow {
    font-size: 8px;
  }
  #notice {
    font-size: 11px;
    width: 90%;
  }
}

#candidate-summary {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.annotation-bar {
  display: flex;
  gap: 6px;
  padding: 9px 12px;
  background: #fcfcf7;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.annotation-bar input {
  flex: 1;
  min-width: 120px;
  font-size: 10px;
  padding: 6px;
}
.annotation-bar button {
  font-size: 9px;
  padding: 6px;
}

/* Stable pointer composition: only the dragged SVG group moves each frame. */
#plan {
  touch-action: none;
  user-select: none;
  cursor: grab;
}
#plan.dragging,
#plan.dragging [data-instance] {
  cursor: grabbing;
}
.plan-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  font-size: 12px;
}
.plan-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.plan-controls input {
  width: auto;
}

#comparison-panel,
#machine-interface {
  border-top: 1px solid var(--line, #d5dccb);
  padding: 18px;
}
#comparison-panel h3 {
  margin: 0;
}
#comparison-viewport {
  height: 260px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
#comparison-viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}
#comparison-details,
#machine-interface {
  font-size: 13px;
  line-height: 1.6;
}
#comparison-details table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
#comparison-details td,
#comparison-details th {
  padding: 7px 4px;
  border-bottom: 1px solid #d5dccb;
}
#machine-interface summary {
  cursor: pointer;
  font-weight: 650;
}
#try-source-spacer {
  display: block;
  margin-top: 12px;
}

.goal-label {
  display: block;
  font-size: 12px;
  margin: 14px 0 6px;
  font-weight: 650;
}
#project-goal {
  width: 100%;
  resize: vertical;
  font: inherit;
  font-size: 12px;
  border: 1px solid #cbd4bf;
  border-radius: 8px;
  padding: 9px;
  box-sizing: border-box;
}
.chat-source {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  color: #45662c;
}

.working .intro {
  padding-top: 20px;
  padding-bottom: 20px;
  gap: 24px;
}
.working .intro h1 {
  font-size: 28px;
  line-height: 1.1;
  margin: 4px 0;
}
.working .intro h1 br {
  display: none;
}
.working .intro-copy {
  display: none;
}
.working .lesson-picker button {
  min-height: 90px;
  padding: 14px 18px;
}
.working .lesson-picker strong {
  font-size: 19px;
}
.working .lesson-picker button > span:not(.lesson-number) {
  display: none;
}
.tutor {
  align-self: start;
}
@media (min-width: 1100px) {
  .tutor {
    position: sticky;
    top: 12px;
  }
}

#machine-task {
  padding: 18px 22px;
  border-bottom: 1px solid #d5dccb;
  background: #f4f6ec;
}
#machine-task h3 {
  margin: 4px 0 8px;
}
#machine-task p {
  font-size: 13px;
  line-height: 1.5;
}
#machine-task svg {
  width: 100%;
  max-height: 175px;
  display: block;
}
.placement-modes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
}
.placement-modes [aria-pressed="true"] {
  background: #3f5931;
  color: white;
}
#placement-panel {
  padding: 12px 18px;
  border-top: 1px solid #d5dccb;
  font-size: 12px;
}
#placement-panel summary {
  cursor: pointer;
  font-weight: 650;
}
#placement-title {
  font-weight: 400;
}
#placement-fields {
  border: 0;
  margin: 12px 0;
  padding: 0;
}
#placement-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}
#placement-panel label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#placement-panel input,
#placement-panel select {
  min-width: 0;
  width: 100%;
  padding: 6px;
  box-sizing: border-box;
  font: inherit;
  border: 1px solid #bac6ae;
  border-radius: 4px;
}
#stack-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px auto;
  gap: 8px;
  align-items: end;
}

.motor-lesson #mount-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  background: #f1f4e9;
}
.motor-lesson #viewport {
  min-height: 440px;
  height: 440px;
}
#mount-tools {
  padding: 16px 12px;
  background: #fffef7;
  border-left: 1px solid #d5dccb;
}
#mount-tools h3 {
  margin: 0 0 14px;
}
#mount-tools #parameter-fields {
  display: block;
}
#mount-tools .field {
  margin: 12px 0;
}
#mount-tools input[type="range"] {
  width: 100%;
  padding: 0;
  accent-color: #ad771c;
}
#mount-tools input[type="number"] {
  width: 100%;
  box-sizing: border-box;
}
#mount-tools .parameter-heading {
  display: none;
}
#mount-tools .generate-row {
  display: block;
}
#mount-tools #generation-status {
  display: block;
  margin-top: 6px;
}
#mount-tools #parameter-note {
  display: none;
}
#mount-tools #generate,
#mount-fit {
  width: 100%;
  margin: 8px 0;
}
#mount-tools p {
  font-size: 12px;
  line-height: 1.45;
}
#mount-feedback {
  padding: 9px;
  background: #f7e6c8;
  border-radius: 6px;
  font-weight: 600;
}
#mount-feedback.aligned {
  background: #dcebbf;
  color: #304c23;
}
.mount-view-buttons {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.mount-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.mount-legend span:first-child {
  color: #93601a;
}
.mount-legend span:nth-child(2) {
  color: #486e96;
}
.motor-lesson .intro {
  padding-top: 18px;
  padding-bottom: 18px;
}
.motor-lesson .intro h1 {
  font-size: 28px;
}
.motor-lesson .intro-copy {
  display: none;
}
@media (max-width: 700px) {
  .motor-lesson #mount-stage {
    grid-template-columns: 1fr;
  }
  .motor-lesson #viewport {
    height: 350px;
    min-height: 350px;
  }
  #mount-tools {
    border-left: 0;
    border-top: 1px solid #d5dccb;
  }
  #mount-tools #parameter-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

.motor-lesson .lesson-picker button {
  min-height: 92px;
  padding: 14px 18px;
}
.motor-lesson .lesson-picker strong {
  font-size: 20px;
}
.motor-lesson .lesson-picker button > span:not(.lesson-number) {
  display: none;
}
#mount-tools #parameter-fields .field {
  margin: 7px 0;
}
#mount-tools #parameter-fields label {
  font-size: 11px;
  margin: 0 0 3px;
}
#mount-tools #parameter-fields input[type="number"] {
  padding: 5px 7px;
  font-size: 13px;
  min-height: 0;
  height: 30px;
}
#mount-tools #parameter-fields input[type="range"] {
  margin: 2px 0;
  height: 18px;
}
#mount-tools #mount-preview-label {
  color: #76531b;
}

#hosting-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 14px 18px;
  margin-top: 16px;
  background: #edf1df;
  border: 1px solid #cfdbbb;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
#hosting-note span {
  flex: 1;
  min-width: 240px;
}
#hosting-note a {
  color: #3e602b;
  font-weight: 600;
}
