html[data-study-view="preview"] {
  --ink: #172d3b;
  --navy: #173445;
  --gold: #ab8248;
  --line: #dce5e1;
  --ivory: #f3f6f3;
  --muted: #506168;
  --study-accent: #205847;
  --study-soft: #e7f0ea;
}

[data-study-view="preview"] .site-header {
  height: 66px;
  background: #fcfdfb;
}

[data-study-view="preview"] .back-row {
  align-items: center;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

[data-study-view="preview"] #draft-label { display: none; }
[data-study-view="preview"] .peony-topic-entry-learning { padding-block: 6px; background: var(--ivory); }
[data-study-view="preview"] .peony-topic-search-entry { border-color: #baccc2; border-radius: 10px; }
[data-study-view="preview"] .resume-learning { border-left-color: var(--study-accent); border-radius: 10px; }
[data-study-view="preview"] .resume-learning a { border-radius: 6px; }

[data-study-view="preview"] #subject-tabs {
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

[data-study-view="preview"] #subject-tabs a {
  flex: 1 1 auto;
  border: 0;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
}

[data-study-view="preview"] #unit-tabs { gap: 6px; }
[data-study-view="preview"] #unit-tabs a {
  border-radius: 6px;
  padding: 7px 11px;
  background: transparent;
  font-size: 13px;
}
[data-study-view="preview"] #unit-tabs a[aria-current="page"] {
  color: #214d40;
  background: var(--study-soft);
  border-color: #a8c2b1;
  font-weight: 700;
}

[data-study-view="preview"] .hero {
  display: grid;
  min-height: 168px;
  padding: 25px clamp(21px, 4vw, 43px);
  border-radius: 12px;
  background-color: #173445;
  background-image: linear-gradient(90deg, #173445 46%, #173445ed 65%, #17344552 100%),
    url("/assets/campus/campus-colonnade.jpg");
  background-position: center, right 48%;
  background-repeat: no-repeat;
  background-size: cover, 55% auto;
}

[data-study-view="preview"] .hero .eyebrow {
  margin: 0 0 8px;
  color: #f0d7a2;
  font-size: 12px;
  letter-spacing: .08em;
}

[data-study-view="preview"] .hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3.4vw, 45px);
  line-height: 1.2;
}

[data-study-view="preview"] .hero > p:not(.eyebrow) {
  max-width: min(100%, 580px);
  color: #f0f5f1;
  font-size: 14px;
  line-height: 1.65;
}

[data-study-view="preview"] .hero-pills {
  gap: 6px;
  margin-top: 13px;
}
[data-study-view="preview"] .hero-pills span { border-radius: 5px; color: #f1efe6; }

[data-study-view="preview"] .layout {
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 18px;
  margin-top: 18px;
}

[data-study-view="preview"] .layout:has(.lesson-panel:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
[data-study-view="preview"] :is(.path-panel, .lesson-panel, .guide-panel) {
  border-radius: 12px;
  box-shadow: 0 4px 18px #17344508;
}
[data-study-view="preview"] .path-panel { padding: clamp(16px, 2.4vw, 29px); }
[data-study-view="preview"] .panel-head h2 { font-size: 25px; }
[data-study-view="preview"] .panel-head > p:last-child { margin-bottom: 15px; line-height: 1.6; }
[data-study-view="preview"] .guide-panel { padding: 22px 19px; }
[data-study-view="preview"] .guide-panel ol { font-size: 14px; }
[data-study-view="preview"] .placement-link {
  border-color: #bed1c5;
  border-radius: 7px;
  background: #f0f6f2;
  color: #204e3f;
  font-size: 14px;
}

[data-study-view="preview"] .study-overview {
  display: grid;
  gap: 8px;
  margin-bottom: 13px;
  padding: 10px 13px;
  border-radius: 7px;
  background: #edf4ef;
  color: #245040;
  font-size: 13px;
  font-weight: 700;
}
[data-study-view="preview"] .study-overview progress {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  appearance: none;
  color: #256755;
  background: #d6e5dc;
}
[data-study-view="preview"] .study-overview progress::-webkit-progress-bar { background: #d6e5dc; }
[data-study-view="preview"] .study-overview progress::-webkit-progress-value { background: #256755; }
[data-study-view="preview"] .study-overview progress::-moz-progress-bar { background: #256755; }

[data-study-view="preview"] .course-row {
  --state-edge: #c0cdd1;
  --state-ink: #42565d;
  --state-bg: #edf2f3;
  grid-template-columns: 38px minmax(0, 1fr) minmax(79px, max-content);
  min-height: 76px;
  border-left: 3px solid var(--state-edge);
  border-radius: 8px;
  background: #fcfdfc;
  padding: 12px;
}
[data-study-view="preview"] .course-row[data-study-progress="done"] {
  --state-edge: #348267;
  --state-ink: #1f543b;
  --state-bg: #dceee3;
}
[data-study-view="preview"] .course-row[data-study-progress="started"] {
  --state-edge: #b58136;
  --state-ink: #714a1e;
  --state-bg: #faecd1;
  background: #fffaf0;
}
[data-study-view="preview"] .course-row:hover:not(:disabled) {
  border-color: #7cab97;
  border-left-color: var(--state-edge);
  background: #f1f7f2;
}
[data-study-view="preview"] .course-row:disabled { opacity: 1; }
[data-study-view="preview"] .course-number {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--state-bg);
  color: var(--state-ink);
  font-size: 15px;
  font-weight: 700;
}
[data-study-view="preview"] .course-copy strong { font-size: 16px; line-height: 1.45; }
[data-study-view="preview"] .course-row:is([data-study-progress="done"], [data-study-progress="started"]) .course-copy strong {
  color: var(--state-ink);
}
[data-study-view="preview"] .course-copy small { font-size: 13px; }
[data-study-view="preview"] .course-state {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
  max-width: 160px;
  color: var(--muted);
}
[data-study-view="preview"] .study-status {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--state-bg);
  color: var(--state-ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
[data-study-view="preview"] .study-status-detail { font-size: 12px; line-height: 1.4; }

[data-study-view="preview"] .lesson-panel {
  width: min(940px, 100%);
  margin-inline: auto;
  padding: clamp(16px, 3.5vw, 43px);
}
[data-study-view="preview"] .lesson-panel h2 { font-size: clamp(25px, 3vw, 38px); }
[data-study-view="preview"] .back-link { min-height: 36px; color: #27584a; font-size: 14px; font-weight: 600; }
[data-study-view="preview"] .lesson-tabs {
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f5f1;
}
[data-study-view="preview"] .lesson-tabs button {
  flex: 1;
  border: 0;
  border-radius: 6px;
  color: #465c60;
  font-size: 15px;
}
[data-study-view="preview"] .lesson-tabs button[aria-pressed="true"] {
  background: white;
  color: #205847;
  box-shadow: 0 1px 6px #1734451a;
}
[data-study-view="preview"] .textbook { max-width: 75ch; margin-inline: auto; }
[data-study-view="preview"] .textbook-section { padding-block: 21px; }
[data-study-view="preview"] .textbook-section h3 { font-weight: 700; }
[data-study-view="preview"] :is(.textbook-section > p, .textbook-section ul, .worked-example) {
  font-size: 16px;
}
[data-study-view="preview"] :is(.textbook-introduction, .textbook-goals, .topic-outline) {
  border-color: #bed1c5;
  border-radius: 7px;
  background: #edf4ef;
  font-size: 15px;
}
[data-study-view="preview"] .worked-example {
  border-left-color: #b5945e;
  border-radius: 7px;
  background: #faf6ed;
}
[data-study-view="preview"] .step {
  padding: clamp(16px, 2.8vw, 28px);
  border-radius: 10px;
  background: #fbfcfa;
}
[data-study-view="preview"] .step h3 { margin: 14px 0 18px; font-size: clamp(19px, 2.4vw, 24px); }
[data-study-view="preview"] :is(.choice, .button, .feedback) { border-radius: 7px; }
[data-study-view="preview"] .progress { color: #405e55; font-size: 14px; }
[data-study-view="preview"] .progress > div { border-radius: 8px; overflow: hidden; background: #dce8e0; }
[data-study-view="preview"] .progress > div > span { background: #377761; }
[data-study-view="preview"] :is(a, button):focus-visible { outline: 2px solid #8a6837; outline-offset: 2px; }

@media (max-width: 800px) {
  [data-study-view="preview"] .layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  [data-study-view="preview"] .shell { width: calc(100% - 24px); }
  [data-study-view="preview"] .site-header { padding-inline: 12px; }
  [data-study-view="preview"] #subject-tabs a { padding: 9px 4px; font-size: 13px; }
  [data-study-view="preview"] #unit-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 3px 8px;
    scrollbar-width: thin;
  }
  [data-study-view="preview"] #unit-tabs a { flex: none; min-height: 38px; }
  [data-study-view="preview"] .hero { background-size: cover, 100% auto; }
  [data-study-view="preview"] .course-row { grid-template-columns: 34px minmax(0, 1fr); padding: 10px; }
  [data-study-view="preview"] .course-state {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: none;
    text-align: left;
  }
}
