:root {
  color-scheme: light;
  --page-bg: #f6f7f3;
  --surface: #ffffff;
  --surface-soft: #f2f5ec;
  --ink: #18221c;
  --ink-muted: #5d685f;
  --line: #d9dfd7;
  --accent: #176b4b;
  --accent-strong: #0e5037;
  --accent-soft: #e3f2e9;
  --warn: #9b5b08;
  --danger: #a33636;
  --code-bg: #17231d;
  --code-ink: #e9f1eb;
  --focus: #e39a24;
  --shadow: 0 18px 50px rgb(21 45 31 / 9%);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 100% 0, rgb(221 239 226 / 75%), transparent 30rem),
    var(--page-bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  translate: 0 -180%;
  border-radius: 0.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.55rem 0.8rem;
}

.skip-link:focus {
  translate: 0;
}

[data-reading-progress],
#reading-progress {
  position: fixed;
  z-index: 90;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  border: 0;
  appearance: none;
  background: transparent;
  transform-origin: left center;
}

progress[data-reading-progress]::-webkit-progress-bar,
progress#reading-progress::-webkit-progress-bar {
  background: transparent;
}

progress[data-reading-progress]::-webkit-progress-value,
progress#reading-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent), #6ba33b);
}

progress[data-reading-progress]::-moz-progress-bar,
progress#reading-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent), #6ba33b);
}

span[data-reading-progress] {
  display: block;
  background: linear-gradient(90deg, var(--accent), #6ba33b);
  transform: scaleX(0);
}

.study-layout,
[data-study-page] {
  width: min(1440px, 100%);
  margin-inline: auto;
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 860px);
  justify-content: center;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.25rem, 3vw, 3rem);
}

.study-sidebar,
[data-study-nav] {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 10px 35px rgb(21 45 31 / 6%);
  padding: 1.1rem;
  backdrop-filter: blur(14px);
}

.study-sidebar h2,
[data-study-nav] h2 {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.study-sidebar ul,
.study-sidebar ol,
[data-study-nav] ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.study-sidebar li + li,
[data-study-nav] li + li {
  margin-top: 0.25rem;
}

.study-sidebar a,
[data-study-nav] a {
  display: block;
  border-left: 3px solid transparent;
  border-radius: 0.35rem;
  padding: 0.38rem 0.55rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
}

.study-sidebar a:hover,
.study-sidebar a[aria-current="location"],
[data-study-nav] a:hover,
[data-study-nav] a[aria-current="location"] {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.study-content,
[data-study-content] {
  min-width: 0;
}

.course-hero,
[data-course-hero],
.study-hero {
  overflow: hidden;
  position: relative;
  margin-bottom: 1.4rem;
  border: 1px solid #cdddcf;
  border-radius: calc(var(--radius) + 5px);
  background: linear-gradient(135deg, #173d2c, #176b4b 62%, #6f9e42);
  color: #f8fff9;
  box-shadow: var(--shadow);
  padding: clamp(1.6rem, 5vw, 3.6rem);
}

.course-hero::after,
[data-course-hero]::after,
.study-hero::after {
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 14rem;
  height: 14rem;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50%;
  content: "";
}

.course-hero h1,
[data-course-hero] h1,
.study-hero h1 {
  margin: 0 0 0.65rem;
  max-width: 18em;
  color: inherit;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.course-hero p,
[data-course-hero] p,
.study-hero p {
  margin: 0;
  max-width: 52rem;
  color: rgb(248 255 249 / 82%);
}

body > .study-hero {
  margin: clamp(0.85rem, 3vw, 3rem) clamp(0.85rem, 3vw, 3rem) 1.4rem;
}

.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.study-hero .eyebrow {
  color: rgb(248 255 249 / 78%);
}

.study-hero .service-hint {
  margin-top: 1rem;
  font-size: 0.88rem;
}

kbd {
  border: 1px solid #aeb9b0;
  border-bottom-width: 2px;
  border-radius: 0.35rem;
  background: #f7f9f6;
  color: #2b3d31;
  padding: 0.08em 0.35em;
  font-family: inherit;
  font-size: 0.86em;
}

.course-section,
[data-course-section],
.lesson-section,
.answer-workspace {
  margin-bottom: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 4vw, 2.5rem);
}

.course-section > :first-child,
[data-course-section] > :first-child,
.lesson-section > :first-child,
.answer-workspace > :first-child {
  margin-top: 0;
}

.course-section > :last-child,
[data-course-section] > :last-child,
.lesson-section > :last-child,
.answer-workspace > :last-child {
  margin-bottom: 0;
}

h1,
h2,
h3,
h4 {
  color: #16271d;
  line-height: 1.3;
  text-wrap: balance;
}

h2 {
  margin-top: 2.1rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}

h3 {
  margin-top: 1.7rem;
  font-size: 1.2rem;
}

p,
li {
  max-width: 76ch;
}

blockquote {
  margin: 1.4rem 0;
  border-left: 4px solid var(--accent);
  border-radius: 0 0.6rem 0.6rem 0;
  background: var(--accent-soft);
  padding: 0.8rem 1.1rem;
  color: #31453a;
}

blockquote > :first-child {
  margin-top: 0;
}

blockquote > :last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  font-size: 0.94rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-soft);
  color: #283a2f;
}

tr:last-child td {
  border-bottom: 0;
}

pre {
  position: relative;
  overflow: auto;
  margin: 1.25rem 0;
  border: 1px solid #2f4036;
  border-radius: 0.85rem;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1.1rem;
  tab-size: 4;
}

code {
  border-radius: 0.3rem;
  background: #edf1ec;
  padding: 0.08em 0.3em;
  color: #294433;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.88rem;
}

.copy-code-button {
  position: sticky;
  z-index: 2;
  float: right;
  top: 0.4rem;
  margin: -0.65rem -0.65rem 0.45rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 0.45rem;
  background: rgb(15 28 20 / 88%);
  color: #f1f7f2;
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.copy-code-button:hover {
  background: #315a43;
}

details {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fbfcfa;
  padding: 0.7rem 0.9rem;
}

summary {
  color: var(--accent-strong);
  font-weight: 650;
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

.review-question,
[data-review-question],
.answer-card {
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fbfcfa;
  padding: 1rem;
}

.review-question h2,
.review-question h3,
[data-review-question] h2,
[data-review-question] h3,
.answer-card h2,
.answer-card h3 {
  margin-top: 0;
}

label {
  color: #28372f;
  font-weight: 650;
}

textarea,
input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  border: 1px solid #b8c4bb;
  border-radius: 0.65rem;
  background: #fff;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

textarea[data-question-number],
textarea[data-question-id] {
  min-height: 7rem;
}

#code-answer,
[data-code-answer] {
  min-height: 18rem;
  background: #152019;
  color: #eaf3ec;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
  tab-size: 4;
}

.study-actions,
[data-study-actions],
.answer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  position: sticky;
  z-index: 30;
  bottom: 0.8rem;
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 10px 32px rgb(20 42 29 / 15%);
  padding: 0.75rem;
  backdrop-filter: blur(12px);
}

button,
.button {
  border: 1px solid #a9b9ad;
  border-radius: 0.6rem;
  background: #fff;
  color: #20372a;
  padding: 0.58rem 0.85rem;
  font: inherit;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
}

button:hover,
.button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

#save-answers,
[data-save] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

#save-answers:hover,
[data-save]:hover {
  background: var(--accent-strong);
}

button:disabled {
  opacity: 0.58;
  cursor: wait;
}

#save-status,
[data-save-status] {
  min-width: 10rem;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

#save-status[data-state="saved"],
[data-save-status][data-state="saved"] {
  color: var(--accent-strong);
}

#save-status[data-state="dirty"],
#save-status[data-state="saving"],
[data-save-status][data-state="dirty"],
[data-save-status][data-state="saving"] {
  color: var(--warn);
}

#save-status[data-state="error"],
#save-status[data-state="conflict"],
[data-save-status][data-state="error"],
[data-save-status][data-state="conflict"] {
  color: var(--danger);
}

.study-dialog {
  width: min(34rem, calc(100% - 2rem));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgb(12 27 18 / 32%);
  padding: 1.3rem;
}

.study-dialog::backdrop {
  background: rgb(9 21 14 / 60%);
  backdrop-filter: blur(2px);
}

.study-dialog h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.study-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 5.5rem;
  }

  .study-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 0.85rem;
  }

  .study-sidebar,
  [data-study-nav] {
    z-index: 40;
    top: 0.5rem;
    max-height: none;
    overflow: auto hidden;
    border-radius: 0.8rem;
    padding: 0.55rem;
  }

  .study-sidebar h2,
  [data-study-nav] h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .study-sidebar ul,
  .study-sidebar ol,
  [data-study-nav] ul {
    display: flex;
    width: max-content;
    gap: 0.2rem;
  }

  .study-sidebar li + li,
  [data-study-nav] li + li {
    margin-top: 0;
  }

  .study-sidebar a,
  [data-study-nav] a {
    border-bottom: 3px solid transparent;
    border-left: 0;
    white-space: nowrap;
  }

  .study-sidebar a:hover,
  .study-sidebar a[aria-current="location"],
  [data-study-nav] a:hover,
  [data-study-nav] a[aria-current="location"] {
    border-bottom-color: var(--accent);
  }

  .course-hero,
  [data-course-hero],
  .study-hero,
  .course-section,
  [data-course-section],
  .lesson-section,
  .answer-workspace {
    border-radius: 0.9rem;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .course-hero,
  [data-course-hero],
  .study-hero,
  .course-section,
  [data-course-section],
  .lesson-section,
  .answer-workspace {
    padding: 1.05rem;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .study-actions,
  [data-study-actions],
  .answer-actions {
    position: static;
  }

  .study-actions button,
  [data-study-actions] button,
  .answer-actions button {
    flex: 1 1 10rem;
  }

  #save-status,
  [data-save-status] {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .study-layout {
    display: block;
    width: 100%;
    padding: 0;
  }

  .study-sidebar,
  [data-study-nav],
  .study-actions,
  [data-study-actions],
  .answer-actions,
  .copy-code-button,
  [data-reading-progress],
  #reading-progress {
    display: none !important;
  }

  .course-hero,
  [data-course-hero],
  .study-hero,
  .course-section,
  [data-course-section],
  .lesson-section,
  .answer-workspace {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* Root learning portal. It intentionally shares the lesson design tokens. */
.portal-page {
  background:
    radial-gradient(circle at 85% 5%, rgb(219 238 223 / 80%), transparent 26rem),
    linear-gradient(180deg, #f8faf6 0, var(--page-bg) 45%);
}

.portal-header {
  display: flex;
  width: min(1180px, calc(100% - 2rem));
  min-height: 4.5rem;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.portal-brand-mark {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.portal-header nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.portal-header nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  border-radius: 0.6rem;
  padding: 0.4rem 0.75rem;
  color: var(--ink-muted);
  font-weight: 650;
  text-decoration: none;
}

.portal-header nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.portal-shell {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  padding: clamp(1rem, 3vw, 2.5rem) 0 4rem;
}

.portal-hero {
  display: grid;
  overflow: hidden;
  position: relative;
  grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  border: 1px solid #244d37;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #102f21, #175f43 72%, #21593f);
  color: #fff;
  box-shadow: 0 28px 80px rgb(18 52 35 / 18%);
  padding: clamp(1.5rem, 5vw, 4.5rem);
}

.portal-hero::after {
  position: absolute;
  right: -6rem;
  bottom: -8rem;
  width: 20rem;
  height: 20rem;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
  content: "";
}

.portal-hero-copy,
.portal-latest {
  position: relative;
  z-index: 1;
}

.portal-kicker {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-hero .portal-kicker {
  color: #b9e6cb;
}

.portal-hero h1 {
  margin: 0;
  max-width: 12em;
  color: #fff;
  font-size: clamp(2.25rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.portal-intro {
  margin: 1.25rem 0 0;
  color: #e2f1e7;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.portal-button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  padding: 0.65rem 1rem;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
}

.portal-button-primary {
  background: #f4fff6;
  color: #123f2b;
}

.portal-button-primary:hover {
  background: #dff3e5;
  color: #0d3322;
}

.portal-button-secondary {
  border-color: rgb(255 255 255 / 42%);
  background: rgb(255 255 255 / 7%);
  color: #fff;
}

.portal-button-secondary:hover {
  background: rgb(255 255 255 / 15%);
  color: #fff;
}

.portal-button-disabled {
  border-color: rgb(255 255 255 / 25%);
  color: #d9e7dd;
}

.portal-latest {
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 1.1rem;
  background: rgb(6 28 17 / 36%);
  padding: clamp(1.1rem, 3vw, 1.6rem);
  backdrop-filter: blur(10px);
}

.portal-latest h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
}

.portal-latest p {
  color: #e0eee5;
}

.portal-latest .portal-topic {
  margin-bottom: 1.3rem;
  font-weight: 650;
}

.portal-latest .portal-meta {
  margin-bottom: 0;
  color: #bed4c5;
  font-size: 0.9rem;
}

.portal-section {
  margin-top: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(1.15rem, 4vw, 2.4rem);
}

.portal-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.portal-section-heading h2,
.portal-section-heading p {
  margin: 0;
}

.portal-section-heading > p {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.portal-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.portal-feature-grid article {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface-soft);
  padding: 1.15rem;
}

.portal-feature-grid article > span {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.portal-feature-grid h3 {
  margin: 0.5rem 0 0.35rem;
}

.portal-feature-grid p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.portal-course-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0.55rem;
}

.portal-course-list a {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto;
  gap: 1rem;
  min-height: 3.8rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  background: #fbfcfa;
  padding: 0.6rem 0.8rem;
  color: inherit;
  text-decoration: none;
}

.portal-course-list a:hover {
  border-color: #b9cfbf;
  background: var(--accent-soft);
}

.portal-course-day {
  color: var(--accent-strong);
  font-weight: 780;
}

.portal-course-topic {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-course-list time {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.portal-empty {
  border-radius: 0.75rem;
  background: var(--surface-soft);
  padding: 1rem;
  color: var(--ink-muted);
}

.portal-footer {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.portal-footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .portal-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .portal-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.8rem 0;
  }

  .portal-header nav {
    width: 100%;
  }

  .portal-header nav a {
    flex: 1;
    justify-content: center;
  }

  .portal-shell,
  .portal-header,
  .portal-footer {
    width: min(100% - 1.2rem, 1180px);
  }

  .portal-hero,
  .portal-section {
    border-radius: 0.95rem;
  }

  .portal-actions,
  .portal-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-button {
    width: 100%;
  }

  .portal-course-list a {
    grid-template-columns: 4.7rem minmax(0, 1fr);
    gap: 0.25rem 0.7rem;
  }

  .portal-course-list time {
    grid-column: 2;
  }
}

@media (forced-colors: active) {
  .portal-brand-mark,
  .portal-hero,
  .portal-feature-grid article,
  .portal-course-list a {
    border: 1px solid CanvasText;
  }
}
