:root {
  --ink: #183b32;
  --muted: #62706a;
  --paper: #fafaf5;
  --surface: #fff;
  --line: #dfe5dc;
  --gold: #b88a27;
  --soft: #f6edcf;
  --green: #245e48;
  --success: #e4f2e7;
  --error: #8b3934;
  --radius: 12px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
.button {
  border: 1px solid #c9d3c7;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
button:hover,
.button:hover {
  background: #eef2ea;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #194635;
}
.quiet {
  border-color: transparent;
  background: transparent;
  font-weight: 400;
}
.danger {
  color: var(--error);
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
a {
  color: #1c6751;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 12px;
}
h3 {
  font-size: 17px;
  margin-bottom: 10px;
}
h4 {
  font-size: 15px;
  margin-bottom: 8px;
}
small,
.small {
  font-size: 13px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 11px;
  font-weight: 700;
  color: #866318;
  margin-bottom: 8px;
}
.topbar {
  height: 82px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  gap: 20px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  margin-top: 3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-family: Georgia, serif;
  font-size: 21px;
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}
.topbar nav a {
  text-decoration: none;
}
.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  background: white;
  z-index: 100;
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.notice {
  padding: 12px 28px;
  background: var(--soft);
  border-bottom: 1px solid #e8d7a5;
  font-size: 14px;
}
.notice.error {
  background: #fceae8;
  color: var(--error);
}
.app-footer {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
main {
  min-height: calc(100vh - 160px);
}
.welcome {
  max-width: 1050px;
  margin: 56px auto;
  padding: 0 30px;
}
.welcome-top {
  max-width: 650px;
}
.welcome-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  margin-top: 30px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.panel.soft {
  background: #f1f5ed;
}
.lead {
  font-size: 18px;
  color: #506058;
  max-width: 680px;
}
.badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--soft);
  color: #725515;
  white-space: nowrap;
}
.badge.approved {
  color: #245e48;
  background: #e5f2e6;
}
.badge.pending {
  background: #f1f1ed;
  color: #656960;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.studio-layout {
  display: grid;
  grid-template-columns: 266px minmax(0, 1fr);
  align-items: start;
}
.sidebar {
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #f1f4ed;
  min-height: calc(100vh - 150px);
}
.sidebar h2 {
  font-size: 18px;
}
.sidebar label {
  font-size: 12px;
  font-weight: 600;
  margin: 14px 0 4px;
  display: block;
}
.sidebar select {
  width: 100%;
}
.set-list {
  margin-top: 22px;
  display: grid;
  gap: 6px;
}
.set-list button {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  padding: 12px;
  background: transparent;
  border-color: transparent;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}
.set-list button.active {
  background: white;
  border-color: #b9c9b4;
  border-left: 3px solid var(--green);
  font-weight: 700;
}
.set-list .set-number {
  font-size: 11px;
  color: var(--muted);
  min-width: 38px;
  margin-top: 2px;
}
.workarea {
  padding: 28px 32px;
  min-width: 0;
  max-width: 1450px;
}
.set-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin: 26px 0;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 10px 2px 12px;
  font-size: 14px;
  color: var(--muted);
}
.tabs button.active {
  color: var(--ink);
  border-bottom: 3px solid var(--green);
  font-weight: 700;
}
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.field {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
}
.field input,
.field textarea,
.field select {
  display: block;
  margin-top: 6px;
  width: 100%;
  font-size: 14px;
  font-weight: 400;
}
input,
select,
textarea {
  border: 1px solid #c8d2c5;
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: white;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}
textarea.long {
  min-height: 180px;
}
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 8px 0;
  font-size: 14px;
}
.checkline input {
  margin-top: 5px;
}
.target-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  background: white;
}
.target-card summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.target-card .details-body {
  padding: 4px 18px 18px;
}
.flow-context {
  padding: 15px 20px;
  border: 1px solid #d7dfd2;
  background: #f0f5eb;
  border-radius: 10px;
  font-size: 13px;
}
.flow-context h3 {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 7px;
  color: #526d4c;
}
.flow-connector {
  height: 20px;
  margin-left: 28px;
  border-left: 2px solid #bdcbb5;
}
.page-editor {
  padding: 22px;
  border: 1px solid #bbcbb4;
  border-radius: 10px;
  background: white;
}
.page-editor > h2 {
  font-size: 19px;
}
.build-grid {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
}
.page-nav {
  max-height: 740px;
  overflow: auto;
}
.page-nav button {
  display: block;
  width: 100%;
  text-align: left;
  white-space: normal;
  font-size: 12px;
  margin-bottom: 5px;
  font-weight: 400;
  padding: 10px;
}
.page-nav button.active {
  background: var(--green);
  color: white;
}
.page-nav .field {
  font-size: 12px;
}
.page-nav select {
  font-size: 12px;
}
.card-editor {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 38px;
  gap: 8px;
  margin-bottom: 8px;
  align-items: start;
}
.card-editor textarea {
  min-height: 60px;
}
.card-editor .id-pill {
  font-size: 12px;
  background: #edf2e8;
  padding: 8px;
  border-radius: 4px;
}
.answer-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 8px;
  background: #f1f5ed;
  border-radius: 7px;
}
.answer-row label {
  flex: 1;
  min-width: 120px;
  font-size: 12px;
}
.answer-row select {
  width: 100%;
  margin-top: 4px;
  font-size: 13px;
}
.metrics {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.metric {
  padding-right: 20px;
  border-right: 1px solid var(--line);
}
.metric b {
  display: block;
  font-size: 24px;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.issue-list {
  padding-left: 20px;
  font-size: 14px;
}
.issue-list li {
  margin: 5px 0;
}
.review-list {
  max-height: 400px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.review-list button {
  display: flex;
  justify-content: space-between;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 12px;
  font-weight: 400;
}
.review-list button:last-child {
  border-bottom: 0;
}
.preview-shell {
  background: #eff3e9;
  padding: 22px;
  border: 1px solid #c8d4bc;
  border-radius: 12px;
}
.preview-label {
  background: #e5d093;
  color: #574214;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
}
.dashboard {
  max-width: 1160px;
  margin: 34px auto;
  padding: 0 28px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 24px;
}
.lesson-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.lesson-row:last-child {
  border-bottom: 0;
}
.lesson-row h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.lesson-row p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.lesson-row .toolbar {
  justify-content: flex-end;
}
.learning {
  max-width: 1050px;
  margin: 30px auto;
  padding: 0 28px;
}
.learning .page-heading {
  margin-bottom: 20px;
}
.learning-content {
  max-width: 840px;
}
.model-text {
  white-space: pre-line;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.7;
  background: #fff;
  border-left: 3px solid #c9ab58;
  padding: 18px 24px;
}
.prompt {
  background: #f4f1e4;
  border: 1px solid #e3dac0;
  border-radius: 8px;
  margin: 16px 0;
}
.prompt summary {
  cursor: pointer;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
}
.prompt .prompt-text {
  white-space: pre-line;
  padding: 0 18px 18px;
  font-size: 15px;
  line-height: 1.6;
}
.teaching {
  white-space: pre-line;
  background: #eef4e8;
  border-left: 3px solid #69955b;
  padding: 18px;
  font-size: 15px;
  line-height: 1.65;
  margin: 16px 0;
}
.prepared-content .teaching {
  overflow-wrap: anywhere;
}
.task {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-top: 18px;
}
.task h2 {
  font-size: 20px;
}
.task .choice {
  display: flex;
  width: 100%;
  align-items: flex-start;
  text-align: left;
  border: 1px solid #cbd5c7;
  border-radius: 8px;
  padding: 14px;
  margin: 10px 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-line;
  background: white;
}
.task .choice[aria-pressed="true"] {
  border: 2px solid var(--green);
  background: #eef6e9;
  padding: 13px;
}
.choice-letter {
  border: 1px solid #bac8b4;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  font-size: 11px;
  margin-right: 12px;
  font-weight: 700;
}
.slot {
  padding: 14px;
  border: 1px solid #dce4d7;
  border-radius: 8px;
  background: #f7f9f2;
  margin: 12px 0;
}
.slot label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.slot select {
  width: 100%;
  font-size: 14px;
}
.card-bank {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.piece {
  white-space: pre-line;
  padding: 12px 15px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  font-size: 14px;
}
.piece b {
  font-size: 11px;
  margin-right: 10px;
  color: #767359;
}
.answer-feedback {
  margin: 20px 0;
  padding: 18px;
  border: 2px solid;
  border-left-width: 6px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.5;
}
.answer-feedback.correct {
  color: #14532d;
  background: #e8f6ec;
  border-color: #238343;
}
.answer-feedback.incorrect {
  color: #861b1b;
  background: #fff0ef;
  border-color: #c32f2f;
}
.answer-feedback-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}
.answer-feedback-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: #238343;
  color: white;
  font-size: 24px;
  font-weight: 800;
}
.answer-feedback.incorrect .answer-feedback-icon {
  background: #c32f2f;
}
.answer-feedback p {
  margin: 10px 0 0;
}
.feedback {
  padding: 15px 18px;
  margin: 18px 0;
  background: #f6ecd6;
  border-left: 4px solid #ba912d;
  border-radius: 6px;
  font-size: 15px;
}
.feedback.correct {
  background: var(--success);
  border-color: #3a8051;
}
.feedback strong {
  display: block;
  margin-bottom: 4px;
}
.progress-track {
  height: 6px;
  background: #e1e8dc;
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0;
}
.progress-track span {
  display: block;
  height: 100%;
  background: var(--green);
}
.optional {
  margin: 20px 0;
  border: 1px solid #d7dfd0;
  border-radius: 10px;
  background: white;
}
.optional > summary {
  padding: 16px;
  cursor: pointer;
  font-weight: 700;
}
.optional-body {
  padding: 0 18px 18px;
}
.optional-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.optional-grid button {
  text-align: left;
  justify-content: flex-start;
  font-size: 13px;
}
.study-card {
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  border: 1px solid #c8d5be;
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
}
.study-card h2 {
  font-size: 28px;
}
.study-card p {
  white-space: pre-line;
}
.ordered-piece {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ordered-piece span {
  flex: 1;
  white-space: pre-line;
}
.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cad4c3;
  border-radius: 8px;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  font-size: 11px;
  border: 1px solid #d5ddce;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f7f9f4;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 800px;
  width: calc(100% - 40px);
  padding: 28px;
}
dialog::backdrop {
  background: #19392e77;
}
.modal-notice {
  position: sticky;
  top: 0;
  z-index: 1;
  overflow-wrap: anywhere;
}
.mono-note {
  white-space: pre-wrap;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 1050px) {
  .build-grid {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  .workarea {
    padding: 24px 20px;
  }
  .studio-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 12px 20px;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: auto;
    align-items: flex-start;
    padding: 14px;
    gap: 10px;
  }
  .topbar nav {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 12px;
  }
  .topbar nav button {
    font-size: 12px;
    padding: 8px;
  }
  .brand {
    font-size: 13px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .studio-layout {
    display: block;
  }
  .sidebar {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }
  .sidebar .set-list {
    display: flex;
    overflow: auto;
    gap: 6px;
    margin-top: 14px;
    padding-bottom: 5px;
  }
  .set-list button {
    min-width: 165px;
    max-width: 200px;
  }
  .sidebar .filter-row {
    display: flex;
    gap: 10px;
  }
  .sidebar .filter-row > label {
    flex: 1;
  }
  .workarea {
    padding: 22px 16px;
  }
  .build-grid {
    display: block;
  }
  .page-nav {
    max-height: none;
    display: flex;
    gap: 8px;
    overflow: auto;
    margin-bottom: 15px;
  }
  .page-nav > button {
    min-width: 150px;
    max-width: 180px;
  }
  .page-nav .field {
    min-width: 150px;
  }
  .page-nav.parts-page-nav {
    display: block;
    overflow: visible;
  }
  .parts-page-nav .parts-item-navigation {
    display: flex;
    gap: 8px;
    overflow: auto;
  }
  .parts-page-nav .parts-item-navigation > button {
    flex: 0 0 150px;
  }
  .tabs {
    gap: 16px;
    overflow: auto;
  }
  .page-heading {
    display: block;
  }
  .page-heading > .toolbar {
    margin-top: 14px;
  }
  h1 {
    font-size: 26px;
  }
  .welcome {
    margin: 32px auto;
    padding: 0 20px;
  }
  .welcome-grid {
    grid-template-columns: 1fr;
  }
  .dashboard,
  .learning {
    padding: 0 16px;
  }
  .task {
    padding: 18px;
  }
  .optional-grid {
    grid-template-columns: 1fr;
  }
  .lesson-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .model-text {
    padding: 15px;
    font-size: 16px;
  }
  .app-footer {
    padding: 20px 16px;
    flex-wrap: wrap;
  }
  .answer-row {
    display: block;
  }
  .answer-row label {
    display: block;
    margin: 7px 0;
  }
  .metrics {
    gap: 12px;
  }
  .metric b {
    font-size: 21px;
  }
}

.slot.correct {
  background: #dff0e1;
  border-color: #4e8c59;
}
.slot.correct label:after {
  content: " ✓";
  color: #245e48;
  font-weight: 700;
}

/* Saved author standards and ordered review keep the same plain form rhythm. */
.standards-list {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.standards-list .panel {
  min-width: 0;
}
.standards-list .panel p {
  overflow-wrap: anywhere;
}
.reader-simple-language-example {
  position: relative;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 18px 16px 14px;
  margin: 8px 0 12px;
}
.reader-simple-language-label {
  position: absolute;
  top: 0;
  left: 14px;
  transform: translateY(-50%);
  padding: 0 7px;
  background: var(--surface);
  color: #866318;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}
.reader-simple-language-example .reader-text > :last-child {
  margin-bottom: 0;
}
