:root {
  color-scheme: light;
  --sidebar-width: 19rem;
  --reading-width: 54rem;
  --page-gutter: clamp(1rem, 4vw, 3rem);
  --paper: #ffffff;
  --canvas: #f2f4f8;
  --ink: #172033;
  --muted: #5e6879;
  --line: #d9dee8;
  --navy: #14233c;
  --navy-soft: #243958;
  --accent: #d94c4c;
  --accent-soft: #fff0ec;
  --gold: #f3bd4f;
  --mint: #dff4ea;
  --blue-soft: #e7f1ff;
  --code-bg: #111a2c;
  --code-ink: #f6f8ff;
  --focus: #1768d4;
  --shadow: 0 18px 48px rgb(20 35 60 / 10%);
  --radius-lg: 1.25rem;
  --radius-md: 0.85rem;
  --body-size: 1.04rem;
  --body-leading: 1.86;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 20rem;
  background: var(--canvas);
  color: var(--ink);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

body[data-font-scale="large"] {
  --body-size: 1.13rem;
}

body[data-font-scale="xlarge"] {
  --body-size: 1.22rem;
}

body.nav-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: #185fae;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: #0b447f;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  background: #fff;
  color: #111;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sidebar {
  position: fixed;
  z-index: 60;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--navy);
  color: #f7f9ff;
  box-shadow: 8px 0 24px rgb(15 26 46 / 13%);
}

.sidebar__head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.25rem 1.15rem 1rem;
  background: linear-gradient(180deg, var(--navy) 78%, rgb(20 35 60 / 0%));
}

.brand {
  display: block;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand__week {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding: 0.12rem 0.52rem;
  border-radius: 999px;
  background: var(--gold);
  color: #152033;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand__title {
  display: block;
  max-width: 14rem;
  font-size: 1.04rem;
  font-weight: 850;
  line-height: 1.4;
}

.icon-button {
  display: inline-grid;
  width: 2.55rem;
  height: 2.55rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 26%);
  border-radius: 0.65rem;
  background: rgb(255 255 255 / 9%);
  color: inherit;
  cursor: pointer;
}

.sidebar__close {
  display: none;
}

.page-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0 1.1rem 1.1rem;
}

.page-switch a {
  display: grid;
  min-height: 2.6rem;
  place-items: center;
  padding: 0.45rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 0.65rem;
  color: #dfe8f8;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.page-switch a[aria-current="page"] {
  border-color: var(--gold);
  background: var(--gold);
  color: #162034;
}

.toc-label {
  margin: 0;
  padding: 0.85rem 1.2rem 0.45rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
  color: #aebbd0;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc {
  margin: 0;
  padding: 0.1rem 0.72rem 2rem;
  list-style: none;
}

.toc li {
  margin: 0.12rem 0;
}

.toc a {
  display: block;
  padding: 0.46rem 0.62rem;
  border-left: 3px solid transparent;
  border-radius: 0.35rem;
  color: #dce5f3;
  font-size: 0.83rem;
  line-height: 1.5;
  text-decoration: none;
}

.toc li[data-level="3"] a {
  padding-left: 1.35rem;
  color: #bfcadc;
  font-size: 0.79rem;
}

.toc a:hover {
  background: rgb(255 255 255 / 8%);
  color: #fff;
}

.toc a[aria-current="location"] {
  border-left-color: var(--gold);
  background: rgb(255 255 255 / 11%);
  color: #fff;
  font-weight: 800;
}

.nav-scrim {
  display: none;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-left: var(--sidebar-width);
  padding: 0.6rem var(--page-gutter);
  border-bottom: 1px solid rgb(217 222 232 / 80%);
  background: rgb(242 244 248 / 92%);
  backdrop-filter: blur(12px);
}

.topbar__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
}

.nav-toggle {
  display: none;
  border-color: #c8cfdb;
  background: #fff;
  color: var(--navy);
}

.topbar__title {
  overflow: hidden;
  color: #334058;
  font-size: 0.87rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.42rem;
}

.tool-button {
  min-height: 2.45rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid #cbd2de;
  border-radius: 0.62rem;
  background: #fff;
  color: #27344b;
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.2;
  cursor: pointer;
}

.tool-button:hover {
  border-color: #9da8ba;
  background: #f8faff;
}

.reading-pane {
  margin-left: var(--sidebar-width);
  padding: clamp(1.25rem, 3vw, 2.5rem) var(--page-gutter) 5rem;
}

.lesson {
  width: min(100%, var(--reading-width));
  margin: 0 auto;
  padding: clamp(1.35rem, 4vw, 4rem);
  border: 1px solid #e1e5ed;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.lesson-hero {
  margin: calc(-1 * clamp(1.35rem, 4vw, 4rem)) calc(-1 * clamp(1.35rem, 4vw, 4rem)) 3rem;
  padding: clamp(2.2rem, 7vw, 5.5rem) clamp(1.35rem, 4vw, 4rem) clamp(2rem, 5vw, 3.7rem);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background:
    radial-gradient(circle at 86% 18%, rgb(243 189 79 / 52%) 0 8%, transparent 8.5%),
    radial-gradient(circle at 96% 44%, rgb(217 76 76 / 24%) 0 12%, transparent 12.5%),
    linear-gradient(135deg, #12213a, #263e64);
  color: #fff;
}

.lesson-hero__eyebrow {
  display: inline-flex;
  margin: 0 0 1.1rem;
  padding: 0.26rem 0.62rem;
  border: 1px solid rgb(255 255 255 / 33%);
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  color: #ffe6a8;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.lesson-hero h1 {
  max-width: 15ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.18;
  text-wrap: balance;
}

.lesson-hero__summary {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  color: #e3ebf7;
  font-size: clamp(0.98rem, 2vw, 1.13rem);
  line-height: 1.75;
}

.lesson-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 1.45rem 0 0;
  color: #c5d2e5;
  font-size: 0.82rem;
}

.lesson > :first-child:not(.lesson-hero) {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: #15233a;
  font-weight: 880;
  letter-spacing: -0.025em;
  line-height: 1.38;
  text-wrap: balance;
}

h2 {
  margin: 3.8rem 0 1.25rem;
  padding: 0 0 0.72rem;
  border-bottom: 2px solid #dfe5ee;
  font-size: clamp(1.48rem, 3vw, 2rem);
  scroll-margin-top: 5.5rem;
}

h2::before {
  display: block;
  width: 3rem;
  height: 0.32rem;
  margin-bottom: 0.82rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  content: "";
}

h3 {
  margin: 2.8rem 0 1rem;
  font-size: clamp(1.22rem, 2.4vw, 1.55rem);
  scroll-margin-top: 5.5rem;
}

h4 {
  margin: 2rem 0 0.8rem;
  font-size: 1.08rem;
}

p,
ul,
ol,
dl,
blockquote {
  max-width: 74ch;
}

p {
  margin: 0.9rem 0;
}

li + li {
  margin-top: 0.38rem;
}

strong {
  color: #111d30;
  font-weight: 850;
}

hr {
  height: 1px;
  margin: 3rem 0;
  border: 0;
  background: var(--line);
}

.lead {
  color: #344058;
  font-size: 1.11em;
  line-height: 1.82;
}

.story-text p {
  max-width: 68ch;
  line-height: 1.95;
}

.story-text > p:first-of-type::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.2em;
  font-weight: 800;
  line-height: 0.82;
}

blockquote {
  margin: 1.3rem 0;
  padding: 0.9rem 1.15rem;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: #fff8e5;
  color: #3d4657;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid #bcd3ef;
  border-left: 5px solid #3781c9;
  border-radius: var(--radius-md);
  background: var(--blue-soft);
}

.callout--warning {
  border-color: #f0c4bc;
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.callout__title {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 900;
}

.callout > :last-child {
  margin-bottom: 0;
}

.visual-figure {
  width: min(100%, 43rem);
  margin: 2rem auto;
  padding: 0.65rem;
  border: 1px solid #d8dee8;
  border-radius: var(--radius-lg);
  background: #faf7ef;
  box-shadow: 0 10px 28px rgb(30 45 70 / 8%);
}

.visual-figure--concept {
  width: min(100%, 35rem);
}

.visual-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.78rem;
  object-fit: contain;
}

.visual-figure figcaption {
  padding: 0.75rem 0.55rem 0.25rem;
  color: #525d70;
  font-size: 0.84rem;
  line-height: 1.65;
}

.visual-figure figcaption strong {
  color: #225c4a;
}

.dialogue {
  --speaker: #9ca3af;
  display: grid;
  grid-template-columns: 3.65rem minmax(0, 1fr);
  gap: 0.85rem;
  margin: 1.15rem 0;
  padding: 0.92rem 1rem;
  border: 1px solid #dce1e9;
  border-left: 5px solid var(--speaker);
  border-radius: var(--radius-md);
  background: #fbfcfe;
  box-shadow: 0 5px 16px rgb(28 42 66 / 5%);
}

.dialogue[data-speaker="히토리"] {
  --speaker: #ec78a5;
  background: #fff7fb;
}

.dialogue[data-speaker="니지카"] {
  --speaker: #e9a82d;
  background: #fffbef;
}

.dialogue[data-speaker="료"] {
  --speaker: #3a83c7;
  background: #f4f9ff;
}

.dialogue[data-speaker="키타"] {
  --speaker: #d65b54;
  background: #fff7f5;
}

.dialogue__portrait,
.dialogue__avatar {
  width: 3.65rem;
  height: 3.65rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--speaker);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--speaker) 40%, #d7dce5);
}

.dialogue__portrait {
  object-fit: cover;
  object-position: 50% 15%;
}

.dialogue__avatar {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
}

.dialogue__body {
  min-width: 0;
}

.dialogue__speaker {
  display: block;
  margin-bottom: 0.14rem;
  color: color-mix(in srgb, var(--speaker) 72%, #111827);
  font-size: 0.79rem;
  font-weight: 900;
}

.dialogue__body > :first-child {
  margin-top: 0;
}

.dialogue__body > :last-child {
  margin-bottom: 0;
}

.contract-card,
.practice-card {
  margin: 1.35rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid #cfd7e4;
  border-radius: var(--radius-md);
  background: #f8fafc;
}

.contract-card {
  border-top: 5px solid #263e64;
}

.practice-card {
  border-top: 5px solid #47a27d;
  background: #f3fbf7;
}

.contract-card > :first-child,
.practice-card > :first-child {
  margin-top: 0;
}

.contract-card > :last-child,
.practice-card > :last-child {
  margin-bottom: 0;
}

.table-wrap {
  max-width: 100%;
  margin: 1.3rem 0;
  overflow-x: auto;
  border: 1px solid #d6dce6;
  border-radius: 0.72rem;
  background: #fff;
  box-shadow: 0 4px 14px rgb(25 39 62 / 5%);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: #263249;
  font-size: 0.88rem;
  line-height: 1.65;
}

th,
td {
  padding: 0.72rem 0.82rem;
  border-bottom: 1px solid #e1e5ec;
  text-align: left;
  vertical-align: top;
}

th {
  background: #18263e;
  color: #fff;
  font-weight: 800;
}

tbody tr:nth-child(even) {
  background: #f7f9fc;
}

tbody tr:last-child > * {
  border-bottom: 0;
}

code,
kbd,
samp {
  font-family: "Cascadia Code", "D2Coding", "NanumGothicCoding", Consolas, monospace;
}

:not(pre) > code {
  padding: 0.11em 0.34em;
  border: 1px solid #dbe1ea;
  border-radius: 0.34em;
  background: #f1f4f8;
  color: #a12f3e;
  font-size: 0.9em;
  word-break: break-word;
}

.code-shell {
  position: relative;
  margin: 1.35rem 0;
  overflow: hidden;
  border: 1px solid #263650;
  border-radius: 0.82rem;
  background: var(--code-bg);
  box-shadow: 0 8px 22px rgb(17 26 44 / 16%);
}

.code-shell__bar {
  display: flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.38rem 0.48rem 0.38rem 0.85rem;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  background: #1a2740;
}

.code-shell__label {
  overflow: hidden;
  color: #aebbd0;
  font-family: "Cascadia Code", "D2Coding", Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  min-width: 4.2rem;
  min-height: 1.82rem;
  padding: 0.25rem 0.56rem;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 0.45rem;
  background: rgb(255 255 255 / 8%);
  color: #eef3fb;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-button:hover {
  background: rgb(255 255 255 / 15%);
}

.copy-button[data-state="copied"] {
  border-color: #72d5a7;
  background: #1f654b;
}

pre {
  margin: 1.35rem 0;
  padding: 1.05rem 1.1rem;
  overflow: auto;
  border-radius: 0.72rem;
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: "Cascadia Code", "D2Coding", "NanumGothicCoding", Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.68;
  tab-size: 4;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

.code-shell pre {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

pre code {
  font: inherit;
}

body.code-wrap pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.answer-block {
  margin: 1.5rem 0;
  overflow: hidden;
  border: 1px solid #b9d6c8;
  border-radius: var(--radius-md);
  background: #f7fcf9;
}

.answer-block > summary {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 1rem;
  background: #e5f5ed;
  color: #174f3b;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.answer-block > summary::-webkit-details-marker {
  display: none;
}

.answer-block > summary::before {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #2f8c68;
  color: #fff;
  content: "+";
  font-size: 1.05rem;
  line-height: 1;
}

.answer-block[open] > summary::before {
  content: "−";
}

.answer-block__content {
  padding: 0.25rem 1rem 1rem;
}

.answer-block__content > :last-child {
  margin-bottom: 0;
}

.path {
  display: block;
  margin: 0.6rem 0;
  padding: 0.62rem 0.72rem;
  border: 1px solid #d7dce6;
  border-radius: 0.55rem;
  background: #f5f7fa;
  color: #303c52;
  font-family: "Cascadia Code", "D2Coding", Consolas, monospace;
  font-size: 0.79rem;
  line-height: 1.55;
  word-break: break-all;
}

.checklist {
  padding-left: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.8rem;
}

.checklist li::before {
  position: absolute;
  top: 0.12rem;
  left: 0;
  color: #25845e;
  content: "✓";
  font-weight: 900;
}

.back-to-top {
  position: fixed;
  z-index: 35;
  right: 1rem;
  bottom: 1rem;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid #bfc7d4;
  border-radius: 50%;
  background: #fff;
  color: #24324a;
  box-shadow: 0 8px 22px rgb(20 35 60 / 16%);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.7rem);
  transition: opacity 150ms ease, transform 150ms ease;
}

.back-to-top[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.visually-hidden,
.ui-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 72rem) {
  :root {
    --sidebar-width: 17rem;
  }

  .topbar__actions .tool-button[data-action="toggle-answers"] {
    display: none;
  }
}

@media (max-width: 56rem) {
  html {
    scroll-padding-top: 4.8rem;
  }

  .sidebar {
    width: min(88vw, 20rem);
    visibility: hidden;
    transform: translateX(-105%);
    transition: transform 190ms ease;
  }

  body.nav-open .sidebar {
    visibility: visible;
    transform: translateX(0);
    transition: transform 190ms ease;
  }

  .sidebar__close,
  .nav-toggle {
    display: inline-grid;
  }

  .nav-scrim {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: block;
    background: rgb(7 15 28 / 56%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 190ms ease;
  }

  body.nav-open .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar,
  .reading-pane {
    margin-left: 0;
  }

  .topbar {
    min-height: 4rem;
  }

  .reading-pane {
    padding-top: 1rem;
  }

  h2,
  h3 {
    scroll-margin-top: 5rem;
  }
}

@media (max-width: 40rem) {
  :root {
    --page-gutter: 0.75rem;
  }

  .topbar__actions .tool-button[data-action="toggle-wrap"] {
    display: none;
  }

  .tool-button {
    min-height: 2.3rem;
    padding-inline: 0.52rem;
    font-size: 0.71rem;
  }

  .lesson {
    padding: 1.15rem;
    border-radius: 0.9rem;
  }

  .lesson-hero {
    margin: -1.15rem -1.15rem 2.3rem;
    padding: 2.2rem 1.15rem 2rem;
    border-radius: 0.9rem 0.9rem 0 0;
  }

  .lesson-hero h1 {
    max-width: 18ch;
  }

  h2 {
    margin-top: 3.1rem;
  }

  .dialogue {
    grid-template-columns: 2.8rem minmax(0, 1fr);
    gap: 0.68rem;
    padding: 0.82rem;
  }

  .dialogue__portrait,
  .dialogue__avatar {
    width: 2.8rem;
    height: 2.8rem;
  }

  th,
  td {
    min-width: 8rem;
    padding: 0.62rem 0.7rem;
  }

  pre {
    font-size: 0.79rem;
  }

  .answer-block__content {
    padding-inline: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  @page {
    size: A4;
    margin: 15mm 14mm 17mm;
  }

  :root {
    --body-size: 10.5pt;
    --body-leading: 1.68;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  .sidebar,
  .topbar,
  .nav-scrim,
  .back-to-top,
  .skip-link,
  .copy-button,
  .ui-status {
    display: none !important;
  }

  .reading-pane {
    margin: 0;
    padding: 0;
  }

  .lesson {
    width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .lesson-hero {
    margin: 0 0 12mm;
    padding: 16mm 12mm;
    border: 1px solid #8f98a8;
    border-radius: 0;
    background: #eef1f6 !important;
    color: #111 !important;
    break-after: avoid-page;
  }

  .lesson-hero h1,
  .lesson-hero__summary,
  .lesson-hero__meta,
  .lesson-hero__eyebrow {
    color: #111 !important;
  }

  h2,
  h3,
  h4 {
    break-after: avoid-page;
  }

  h2 {
    margin-top: 11mm;
  }

  h2::before {
    background: #444;
  }

  a {
    color: #111;
    text-decoration: underline;
  }

  .dialogue,
  .visual-figure,
  .callout,
  .contract-card,
  .practice-card,
  .table-wrap,
  .answer-block {
    break-inside: avoid-page;
    box-shadow: none;
  }

  .visual-figure {
    max-width: 150mm;
  }

  .visual-figure img {
    max-height: 205mm;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    font-size: 8.8pt;
  }

  thead {
    display: table-header-group;
  }

  pre,
  .code-shell {
    border: 1px solid #aaa;
    background: #f3f4f6 !important;
    color: #111 !important;
    box-shadow: none;
  }

  .code-shell__bar {
    border-bottom-color: #bbb;
    background: #e5e7eb !important;
  }

  .code-shell__label {
    color: #333 !important;
  }

  pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  details.answer-block:not([open]) > :not(summary) {
    display: block !important;
  }

  .answer-block > summary::before {
    display: none;
  }
}
