:root {
  color-scheme: light;
  --ink: #232a25;
  --muted: #5b645e;
  --green: #244738;
  --green-dark: #17352a;
  --line: #dce3dc;
  --paper: #fff;
  --fog: #f7f8f5;
  --width: 1120px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--fog);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
a[href] { cursor: pointer; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid #bf7f31;
  outline-offset: 4px;
}
h1, h2, h3, p { margin: 0; }
section[id], aside[id] { scroll-margin-top: 24px; }
.container { width: min(var(--width), calc(100% - 64px)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 2;
  inset: 12px auto auto 12px;
  background: var(--paper);
  padding: 8px 12px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 74px;
  gap: 24px;
}
.wordmark { display: inline-flex; width: fit-content; align-items: center; gap: 10px; font-size: 20px; font-weight: 730; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: var(--green);
  color: white;
  font: 700 18px/1 Georgia, "Songti SC", serif;
}
nav { display: flex; min-width: 0; gap: 30px; font-size: 15px; color: var(--muted); }
nav a:hover, .footer-inner a:hover { color: var(--green); text-decoration: underline; }
.header-action {
  justify-self: end;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--green);
  font-size: 14px;
  font-weight: 650;
}
.header-action:hover { background-color: #edf3ed; }

.hero { padding: 48px 0 42px; background: #f0f4ee; border-bottom: 1px solid var(--line); }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); align-items: stretch; gap: 64px; }
.hero-copy { align-self: center; padding: 14px 0; }
.preview-note { color: var(--green); font-size: 14px; font-weight: 650; margin-bottom: 12px; }
h1 { font-size: clamp(2.35rem, 5vw, 4.1rem); line-height: 1.15; font-weight: 780; letter-spacing: -.05em; }
.hero-description { font-size: 18px; line-height: 1.8; color: var(--muted); max-width: 40ch; margin-top: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 9px;
  border: 1px solid transparent;
  padding: 9px 16px;
  font-size: 15px;
  font-weight: 680;
  text-align: center;
}
.button-primary { color: white; background: var(--green); }
.button-primary[href]:hover { background: var(--green-dark); }
.button-secondary { color: var(--green); background: var(--paper); border-color: #cbd9ce; }
.button-secondary[href]:hover { background: #eef4ed; }
.button[aria-disabled="true"] { color: #525c56; background: #ecf0eb; border-color: #dfe5df; cursor: default; }

.outcome-card {
  isolation: isolate;
  display: flex;
  align-items: end;
  min-height: 266px;
  position: relative;
  overflow: hidden;
  padding: 27px 30px;
  border-radius: 21px;
  background: radial-gradient(ellipse at 100% 0%, #41634e, transparent 58%), var(--green-dark);
  color: #fff;
}
.outcome-card::before, .outcome-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -26px;
  top: -128px;
  width: 280px;
  height: 280px;
  border: 1px solid #e2f4dc48;
  border-radius: 46%;
  transform: rotate(-21deg);
}
.outcome-card::after {
  right: -64px;
  top: -101px;
  box-shadow: 0 0 0 23px #e2f4dc15, 0 0 0 44px #e2f4dc12;
}
.outcome-content { width: 100%; }
.course-label, .duration { color: #d3e5d3; font-size: 14px; font-weight: 570; }
#course-outcome { max-width: 27ch; font-size: clamp(1.2rem, 2.3vw, 1.75rem); font-weight: 660; line-height: 1.6; margin-top: 10px; }
.outcome-rule { height: 1px; background: #d6e8d454; margin: 22px 0 12px; }

.learning-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(245px, 310px); gap: 26px; padding-top: 36px; }
.section-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 13px; margin-bottom: 14px; }
h2 { font-size: 23px; line-height: 1.35; }
.section-detail, .module-count { color: var(--muted); font-size: 14px; }
.modules { display: grid; gap: 10px; }
.module { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.module summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  list-style: none;
  cursor: pointer;
  border-radius: 13px;
}
.module summary::-webkit-details-marker { display: none; }
.module summary:hover { background: #f7faf7; }
.module[open] summary { background: #f0f5f0; border-radius: 13px 13px 0 0; }
.module summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border: solid var(--green);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin: -4px 2px 0 3px;
}
.module[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.module-number {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: #e5eee5;
  color: var(--green);
  font: 650 14px/1 var(--font);
}
.module-heading { display: grid; gap: 1px; }
.module-title { font-weight: 680; }
.module-description { font-size: 14px; color: var(--muted); }
.lessons { margin: 0; padding: 2px 16px 2px 63px; }
.lesson { padding: 10px 0 10px 4px; }
.lesson + .lesson { border-top: 1px solid #e9eee8; }
.lesson::marker { color: var(--green); font-size: 14px; }

.access-card { padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.access-card h2 { font-size: 20px; }
.access-card > p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.access-actions { display: grid; gap: 8px; margin-top: 14px; }
.link-status { color: var(--muted); font-size: 14px; }
.course-facts { margin: 16px 0 0; padding-top: 13px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.course-facts dt { font-size: 14px; color: var(--muted); }
.course-facts dd { margin: 0; font-size: 14px; }

.replay-section { padding-block: 35px 36px; }
.replay-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 17px 19px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.replay-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #e5eee5; }
.replay-icon span { width: 0; height: 0; border-block: 8px solid transparent; border-left: 12px solid var(--green); margin-left: 3px; }
.replay-copy h3 { font-size: 17px; }
.replay-copy p { color: var(--muted); font-size: 15px; }
.replay-action { text-align: center; }
.replay-action .link-status { margin-top: 4px; }
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner { min-height: 58px; display: flex; gap: 14px; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }

@media (max-width: 800px) {
  .container { width: calc(100% - 36px); }
  .hero-layout { gap: 26px; }
  .hero { padding: 32px 0; }
  .outcome-card { padding: 20px; }
  .learning-layout { gap: 18px; }
}

@media (max-width: 640px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 0 12px; padding: 10px 0; }
  nav { grid-column: 1 / -1; grid-row: 2; gap: 21px; margin-top: 9px; }
  .header-action { grid-column: 2; grid-row: 1; }
  .hero-layout, .learning-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-layout { gap: 18px; }
  .hero-copy { padding: 0; }
  .hero-description { font-size: 16px; }
  .hero-actions { margin-top: 16px; }
  .outcome-card { min-height: 200px; }
  .learning-layout { padding-top: 25px; }
  .replay-section { padding-block: 25px; }
  .replay-action { grid-column: 1 / -1; text-align: left; }
}

.portal {
  background: #f7f8f4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.portal main { flex: 1; }
.portal nav a { padding: 8px 0; }
.portal [aria-current="page"] { color: var(--green); font-weight: 730; }
.portal nav [aria-current="page"] { box-shadow: 0 2px 0 var(--green); }
.home-intro {
  background: linear-gradient(146deg, #f2f5eb 12%, #e6eee3 100%);
  border-bottom: 1px solid #d6e0d3;
}
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .88fr);
  align-items: center;
  gap: clamp(25px, 6vw, 80px);
  padding-block: clamp(36px, 6vw, 78px);
}
.home-copy h1 {
  max-width: 10em;
  color: #1c3e2c;
  font: 780 clamp(2.4rem, 5.8vw, 4.75rem)/1.17 "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  letter-spacing: -.055em;
}
.home-copy p {
  max-width: 34em;
  margin-top: 20px;
  color: #4d6253;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}
.featured-syllabus {
  padding: clamp(20px, 3.5vw, 38px);
  border-radius: 18px;
  background: #214332;
  color: #f8fbf5;
}
.featured-syllabus h2 { margin: 6px 0 10px; font-size: clamp(1.4rem, 3.2vw, 2.15rem); }
.featured-facts, .featured-count { font-size: .875rem; color: #d7e8d6; }
.featured-outcome { color: #e5efe4; }
.featured-stages { margin: 20px 0; padding: 0; list-style: none; }
.featured-stages li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px solid #54705e;
}
.featured-stages li:last-child { border-bottom: 1px solid #54705e; }
.featured-count { flex: none; }
.home-library, .panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.home-library { gap: clamp(18px, 4vw, 48px); padding-block: clamp(26px, 5vw, 54px); }
.home-library-item { padding-top: 17px; border-top: 2px solid #b8c9b9; }
.home-library-item h2 { font-size: clamp(1.4rem, 2.7vw, 2rem); }
.home-library-item p { max-width: 34em; margin-block: 8px 13px; color: var(--muted); }

.site-section { padding-block: clamp(28px, 5vw, 54px); }
.site-section h1 { font-size: clamp(2rem, 5vw, 3.75rem); }
.lede, .small-note { color: var(--muted); }
.lede { line-height: 1.7; }
.page-lede { margin: 13px 0 21px; max-width: 64ch; }
.small-note { font-size: .875rem; }
.site-section > .small-note { margin-top: 12px; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--green); font-weight: 660; }
.text-link { color: var(--green); text-decoration: underline; text-underline-offset: 3px; width: fit-content; }
.text-link:hover, .back-link:hover { color: #102d1f; }
.portal-panel {
  min-width: 0;
  padding: clamp(16px, 2.8vw, 27px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.site-section > .portal-panel, .site-section > .panel-grid { margin-top: 21px; }
.portal-panel > :not(:first-child) { margin-top: 12px; }
.portal-panel h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); }
.portal-panel > .text-link { display: inline-block; }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
button.button { font-family: inherit; cursor: pointer; }
button.button:disabled { cursor: default; color: #405447; background: #e2ebe2; }
button.button:not(:disabled):hover { background: var(--green-dark); }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid #bf7f31; outline-offset: 4px; }
.reading-days, .periods, .study-lessons { list-style: none; padding: 0; margin-bottom: 0; }
.reading-step { padding: 13px 0; border-top: 1px solid var(--line); }
.reading-step .lede { margin-top: 4px; }
.reading-step .text-link { display: inline-block; margin-top: 6px; }
.reading-prompt { max-width: 100%; }
.reading-prompt summary { color: var(--green); font-weight: 690; cursor: pointer; }
.reading-prompt > :not(:first-child) { margin-top: 8px; }
.reading-prompt button.button:not(:disabled):hover { background: #eef4ed; }

.resume-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #eaf1e9;
  border-radius: 12px;
  padding: 14px 19px;
  margin-block: 21px 16px;
}
.study-layout, .briefing-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  align-items: start;
}
.briefing-layout { grid-template-columns: clamp(245px, 28vw, 312px) minmax(0, 1fr); }
.briefing-calendar { position: sticky; top: 16px; }
.briefing-calendar summary { cursor: pointer; color: var(--green); font-weight: 750; }
.calendar-controls { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.calendar-controls p { font-weight: 680; font-size: .875rem; }
.calendar-controls button {
  background: #f2f5f0;
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 9px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
  font-size: .875rem;
}
.calendar-controls button:disabled { opacity: .5; cursor: default; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-weekdays { font-size: .8125rem; text-align: center; color: var(--muted); }
.calendar-dates { margin-top: 5px; }
.calendar-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 8px;
  font-size: .875rem;
  position: relative;
}
.calendar-empty { color: #68756a; }
.calendar-available { background: #e6efe5; color: var(--green); font-weight: 690; }
.calendar-available:hover { background: #d3e6d4; }
.calendar-available[aria-current="date"] { background: var(--green); color: white; }
.calendar-available.date-read { text-decoration: underline; text-underline-offset: 2px; }
.calendar-available.date-saved::after {
  content: "";
  position: absolute;
  inset: auto 4px 4px auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.briefing-article { max-height: 72vh; overflow: auto; }
.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
}
.formatted-briefing-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 9px;
}
.formatted-briefing-tools .briefing-actions .local-status { flex-basis: auto; }
.formatted-briefing-frame {
  display: block;
  width: 100%;
  height: max(460px, calc(100dvh - 124px));
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.study-stage { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.study-stage summary, .import-panel summary { color: var(--green); font-weight: 690; cursor: pointer; }
.study-stage summary { padding: 12px; background: #f3f6f0; }
.study-stage summary span { float: right; margin-left: 10px; }
.handout-stages > .study-stage + .study-stage { margin-top: 10px; }
.handout-layout {
  display: grid;
  grid-template-columns: clamp(260px, 33vw, 328px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 24px;
}
.handout-directory { position: sticky; top: 16px; }
.handout-directory > summary { cursor: pointer; color: var(--green); font-weight: 750; }
.handout-directory .study-lessons a[aria-current="page"] {
  border-left: 3px solid var(--green);
  padding-left: 7px;
}
.study-lessons { margin: 0; padding-inline: 12px; }
.study-lessons li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-block: 11px; }
.study-lessons li + li { border-top: 1px solid var(--line); }
.study-lessons .small-note { white-space: nowrap; }
.progress-value { font-weight: 680; }
.portal progress { width: 100%; height: 13px; accent-color: var(--green); }
.reading-body { max-width: 68ch; line-height: 1.85; }
.lesson-video { display: block; width: 100%; max-height: 65vh; background: #171c22; border-radius: 10px; }
.lesson-cues { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lesson-cues button { padding: 4px 0; border: 0; background: none; font: inherit; cursor: pointer; }
.form-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.form-stack label { font-weight: 680; }
.form-stack textarea, .form-stack input { max-width: 100%; font: inherit; }
.form-stack textarea { width: 100%; border: 1px solid #a7b9aa; border-radius: 9px; padding: 11px; }
.form-stack input[type="file"] { width: 100%; }
.local-status { color: var(--green); font-size: .875rem; }
.local-status:empty { display: none; }
.submission { border-left: 3px solid #8fb29b; background: #edf3eb; padding: 12px; }
.submission-text { white-space: pre-wrap; margin-block: 4px; }
.submission time { color: var(--muted); font-size: .875rem; }
.periods li + li { margin-top: 6px; }
.periods a { display: block; padding: 5px 7px; }
.periods [aria-current="page"] { background: #edf3eb; border-radius: 6px; }
.import-panel { margin-top: 16px; }
.briefing-prose > * + * { margin-top: 12px; }
.briefing-prose h3 { font-size: 1.2rem; margin-top: 20px; }
.briefing-prose h4, .briefing-prose h5, .briefing-prose h6 { font-size: 1rem; }
.briefing-contents { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.briefing-contents .button { padding: 6px 10px; font-size: .875rem; }
.briefing-prose :is(h3, h4, h5, h6) { scroll-margin-top: 14px; }
.briefing-prose blockquote { margin-inline: 0; padding-inline-start: 14px; border-inline-start: 3px solid var(--line); }
.briefing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.briefing-actions button.button:not(:disabled):hover { background: #eef4ed; }
.briefing-actions button[aria-pressed="true"] { background: #e2ebe2; }
.briefing-actions .local-status { flex-basis: 100%; }

.brand-intro {
  color: #f6fbf4;
  background: #214332;
  padding-block: clamp(48px, 8vw, 112px) clamp(56px, 9vw, 124px);
}
.brand-intro h1 {
  font: 780 clamp(2.55rem, 7vw, 5.6rem)/1.14 "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  letter-spacing: -.055em;
}
.brand-intro p { max-width: 35ch; margin-top: 18px; color: #e1eee0; font-size: clamp(1rem, 2vw, 1.2rem); }
.brand-actions .button-primary { color: #214332; background: #edf6e8; }
.brand-actions .button-primary:hover { background: #d9ead4; }
.brand-actions .button-secondary { color: #f6fbf4; background: transparent; border-color: #9bb1a0; }
.brand-actions .button-secondary:hover { background: #315742; }
.brand-entrances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  position: relative;
  margin-block: -28px clamp(30px, 6vw, 70px);
}
.brand-entrances .portal-panel { padding: clamp(22px, 3.5vw, 40px); }
.brand-entrances p { max-width: 34em; color: var(--muted); }
.brand-entrances .brand-learning { border-color: #b5cbb6; }

@media (max-width: 640px) {
  .home-hero, .home-library, .panel-grid, .study-layout, .briefing-layout, .handout-layout, .brand-entrances { grid-template-columns: minmax(0, 1fr); }
  .study-layout > :last-child { grid-row: 1; }
  .briefing-calendar, .handout-directory { position: static; }
  .briefing-article { max-height: none; overflow: visible; }
  .periods { display: flex; flex-wrap: wrap; gap: 6px; }
  .periods li + li { margin-top: 0; }
}
