:root {
  --page: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --teal: #0e3946;
  --teal-soft: #2c6b6c;
  --gold: #c98a2b;
  --gold-soft: #f8eddb;
  --ink: #14262b;
  --muted: #5e6e73;
  --line: #dce5e3;
  --success: #287a58;
  --warning: #a45a28;
  --danger: #a4231c;
  --shadow: 0 18px 55px rgba(14, 57, 70, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(201, 138, 43, 0.35);
  outline-offset: 3px;
}

.site-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 70px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-weight: 800;
  font-size: 18px;
}

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
}

.header-context {
  padding-left: 24px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.header-spacer {
  flex: 1;
}

.header-link {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.header-link:hover {
  color: var(--gold);
}

.course-hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, 0.95fr);
  align-items: center;
  gap: 70px;
  padding: 68px 0 58px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.course-hero h1 {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--teal);
  font-size: clamp(48px, 5vw, 74px);
  line-height: 1.07;
  letter-spacing: 0;
}

.course-hero-copy {
  max-width: 650px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--teal);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  border-color: var(--gold);
  background: var(--gold);
  color: #ffffff;
}

.button-primary:hover {
  border-color: #ad731d;
  background: #ad731d;
  color: #ffffff;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 15px;
}

.hero-meta strong {
  margin-right: 5px;
  color: var(--teal);
  font-size: 19px;
}

.course-map {
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.course-map-header,
.course-map-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.course-map-header {
  align-items: flex-start;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.course-map-header h2 {
  margin: 0;
  color: var(--teal);
  font-size: 18px;
}

.course-map-footer {
  padding-top: 16px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.course-map-companions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.companion-link {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.companion-link:hover {
  background: #ffffff;
  border-color: var(--gold);
}

.companion-link strong {
  color: var(--teal);
  font-size: 15px;
}

.companion-link span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.module-map-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(116px, auto);
  column-gap: 26px;
  row-gap: 44px;
  margin-top: 30px;
}

.module-card {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px;
  background: #fbfcfc;
  border: 1px solid var(--line);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

a.module-card:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 28px rgba(14, 57, 70, 0.08);
  transform: translateY(-2px);
}

.module-card.is-current {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.module-card.flow-right::after,
.module-card.flow-left::after,
.module-card.flow-down::after {
  position: absolute;
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.module-card.flow-right::after,
.module-card.flow-left::after {
  top: 50%;
  transform: translateY(-50%);
}

.module-card.flow-right::after {
  content: "→";
  right: -23px;
}

.module-card.flow-left::after {
  content: "←";
  left: -23px;
}

.module-card.flow-down::after {
  content: "↓";
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
}

.module-card.pos-m5 {
  grid-column: 4;
  grid-row: 2;
}

.module-card.pos-m6 {
  grid-column: 3;
  grid-row: 2;
}

.module-card.pos-m7 {
  grid-column: 2;
  grid-row: 2;
}

.module-card.pos-m8 {
  grid-column: 1;
  grid-row: 2;
}

.module-card.pos-e1 {
  grid-column: 1;
  grid-row: 3;
}

.module-code {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

.module-title {
  margin: 5px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.module-time {
  color: var(--muted);
  font-size: 12px;
}

.quick-start {
  background: #e8f0ef;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-start-inner {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
}

.quick-start-label {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.quick-start p {
  margin: 0;
  color: var(--teal);
  font-size: 16px;
}

.quick-start a {
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
}

.course-section {
  padding: 78px 0;
}

.course-section-alt {
  padding-top: 0;
}

.subsection-title {
  margin: 40px 0 16px;
  color: var(--teal);
  font-size: 22px;
  line-height: 1.35;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.65;
}

.info-table th,
.info-table td {
  padding: 11px 13px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.info-table th {
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
}

.info-table tbody tr:nth-child(even) {
  background: #f8faf9;
}

.course-section a {
  color: #167563;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(22, 117, 99, 0.35);
  text-underline-offset: 3px;
}

.section-note {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.first-step-list {
  max-width: 760px;
  margin: 0;
  padding-left: 24px;
  color: #24393e;
  font-size: 16px;
  line-height: 1.8;
}

.first-step-list li + li {
  margin-top: 10px;
}

.section-title {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 34px;
  line-height: 1.25;
}

.section-copy {
  max-width: 760px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.reading-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.reading-path-item {
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.reading-path-item h3 {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 19px;
}

.reading-path-item p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.site-footer {
  padding: 28px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.site-footer a {
  color: var(--gold);
  font-weight: 600;
}

.reading-progress {
  position: fixed;
  top: 70px;
  left: 0;
  z-index: 60;
  width: 0;
  height: 3px;
  background: var(--gold);
}

.lesson-page {
  width: min(1440px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 250px minmax(0, 790px) 230px;
  justify-content: center;
  gap: 34px;
  margin: 0 auto;
  padding: 42px 0 80px;
}

.course-nav,
.lesson-toc {
  position: sticky;
  top: 98px;
  align-self: start;
  max-height: calc(100dvh - 120px);
  overflow: auto;
}

.side-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.course-nav-list,
.lesson-toc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.course-nav-item,
.lesson-toc a {
  display: block;
  padding: 9px 11px;
  color: var(--muted);
  border-left: 2px solid transparent;
  font-size: 15px;
  line-height: 1.45;
}

.lesson-toc a.toc-subitem {
  padding-left: 26px;
  color: #7b8a8e;
  font-size: 14px;
}

.lesson-toc-mobile {
  display: none;
}

.course-nav-item.is-active,
.lesson-toc a[aria-current="true"] {
  background: #ffffff;
  color: var(--teal);
  border-left-color: var(--gold);
  font-weight: 800;
}

a.course-nav-item:hover,
.lesson-toc a:hover {
  color: var(--teal);
  background: rgba(255, 255, 255, 0.72);
}

.lesson-card {
  min-width: 0;
  padding: 46px 54px 58px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.lesson-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lesson-heading {
  margin: 0;
  color: var(--teal);
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.lesson-summary {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 18px 0 22px;
  margin: 24px 0 34px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.lesson-content {
  color: #24393e;
  font-size: 17px;
  line-height: 1.85;
}

.lesson-content > :first-child {
  margin-top: 0;
}

.lesson-content h2,
.lesson-content h3,
.lesson-content h4 {
  color: var(--teal);
  line-height: 1.35;
}

.lesson-content h2 {
  padding-top: 26px;
  margin: 54px 0 22px;
  border-top: 1px solid var(--line);
  font-size: 29px;
}

.lesson-content h3 {
  margin: 36px 0 16px;
  font-size: 23px;
}

.lesson-content h4 {
  margin: 28px 0 13px;
  font-size: 19px;
}

.lesson-content p,
.lesson-content ul,
.lesson-content ol {
  margin: 0 0 20px;
}

.lesson-content li + li {
  margin-top: 8px;
}

.lesson-content strong {
  color: #0c2f38;
}

.lesson-content a {
  color: #167563;
  text-decoration: underline;
  text-decoration-color: rgba(22, 117, 99, 0.35);
  text-underline-offset: 3px;
}

.lesson-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 680px;
  margin: 28px auto;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(14, 57, 70, 0.08);
  cursor: zoom-in;
}

.lesson-content img:focus-visible {
  outline: 4px solid rgba(201, 138, 43, 0.42);
  outline-offset: 5px;
}

body.has-lightbox {
  overflow: hidden;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 20, 25, 0.94);
  backdrop-filter: blur(8px);
}

.image-lightbox-panel {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 14px;
}

.image-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 104px);
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.image-lightbox-caption {
  max-width: min(900px, calc(100vw - 120px));
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font-size: 31px;
  line-height: 1;
}

.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

.lesson-content blockquote {
  padding: 18px 20px;
  margin: 24px 0;
  background: #eef4f2;
  color: #315158;
  border-left: 4px solid var(--teal-soft);
}

.lesson-content blockquote p {
  margin: 6px 0;
}

.lesson-content blockquote p:first-child {
  margin-top: 0;
}

.lesson-content blockquote p:last-child {
  margin-bottom: 0;
}

.lesson-content blockquote.callout-warning {
  background: #fff4ec;
  color: #794321;
  border-left-color: var(--warning);
}

.lesson-content blockquote.callout-success {
  background: #eef8f2;
  color: #245d43;
  border-left-color: var(--success);
}

.lesson-content blockquote.callout-danger {
  background: #fff0ef;
  color: #7d2822;
  border-left-color: var(--danger);
}

.lesson-content pre {
  position: relative;
  overflow: auto;
  padding: 22px 76px 22px 22px;
  margin: 24px 0;
  background: #0e3946;
  color: #f7fbfa;
  border: 1px solid #0b303b;
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.lesson-content code {
  padding: 0.12em 0.36em;
  background: #edf2f1;
  color: #9d5e0c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

.lesson-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  cursor: pointer;
  font-size: 13px;
}

.lesson-content table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.65;
}

.table-scroll {
  width: 100%;
  margin: 24px 0 30px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.lesson-content th,
.lesson-content td {
  min-width: 110px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.lesson-content th {
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
}

.lesson-content tbody tr:nth-child(even) {
  background: #f8faf9;
}

.lesson-content input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--gold);
  vertical-align: -3px;
}

.module-completion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 28px;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

.chapter-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.chapter-link {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 88px;
  padding: 16px 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  transition: border-color 160ms ease, background-color 160ms ease;
}

a.chapter-link:hover {
  background: #ffffff;
  border-color: var(--gold);
}

.chapter-link span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.chapter-link strong {
  margin-top: 5px;
  color: var(--teal);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chapter-link-next {
  text-align: right;
}

.chapter-link-empty {
  visibility: hidden;
}

@media (max-width: 1180px) {
  .course-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .lesson-page {
    grid-template-columns: 220px minmax(0, 790px);
  }

  .lesson-toc {
    display: none;
  }

  .lesson-toc-mobile {
    display: block;
    margin: 0 0 30px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
  }

  .lesson-toc-mobile summary {
    padding: 13px 16px;
    color: var(--teal);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
  }

  .lesson-toc-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 320px;
    overflow: auto;
    padding: 8px 10px 12px;
    border-top: 1px solid var(--line);
  }

  .lesson-toc-mobile-list a {
    display: block;
    padding: 8px 10px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
  }

  .lesson-toc-mobile-list a:hover {
    color: var(--teal);
  }

  .lesson-toc-mobile-list a.toc-subitem {
    padding-left: 26px;
    color: #7b8a8e;
    font-size: 14px;
  }
}

@media (max-width: 820px) {
  .site-shell,
  .lesson-page {
    width: min(100% - 32px, 760px);
  }

  .header-context,
  .header-link.secondary {
    display: none;
  }

  .course-hero {
    min-height: 0;
    padding: 50px 0;
  }

  .course-hero h1 {
    font-size: 48px;
  }

  .course-map {
    padding: 18px;
  }

  .module-map-grid {
    display: block;
  }

  .module-card,
  .module-card.pos-m5,
  .module-card.pos-m6,
  .module-card.pos-m7,
  .module-card.pos-m8,
  .module-card.pos-e1 {
    width: 100%;
    min-height: 102px;
    margin-bottom: 32px;
  }

  .module-card.flow-right::after,
  .module-card.flow-left::after,
  .module-card.flow-down::after {
    content: none;
  }

  .course-map-companions {
    grid-template-columns: 1fr;
  }

  .module-card:not(:last-of-type)::after {
    content: "↓";
    position: absolute;
    top: auto;
    right: auto;
    bottom: -27px;
    left: 50%;
    color: var(--gold);
    font-size: 19px;
    font-weight: 800;
    transform: translateX(-50%);
  }

  .quick-start-inner {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 0;
  }

  .reading-path-grid {
    grid-template-columns: 1fr;
  }

  .lesson-page {
    display: block;
    padding-top: 24px;
  }

  .course-nav {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    margin-bottom: 18px;
    overflow: hidden;
  }

  .course-nav .side-label {
    display: none;
  }

  .course-nav-list {
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .course-nav-item {
    min-width: max-content;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .lesson-meta,
  .lesson-content {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .course-nav-item.is-active {
    border-bottom-color: var(--gold);
  }

  .lesson-card {
    padding: 32px 24px 46px;
  }
}

@media (max-width: 540px) {
  .site-shell,
  .lesson-page {
    width: min(100% - 24px, 760px);
  }

  .site-header-inner {
    min-height: 62px;
  }

  .header-spacer,
  .header-link {
    display: none;
  }

  .course-hero h1 {
    font-size: 42px;
  }

  .course-hero-copy {
    font-size: 17px;
  }

  .hero-actions .button {
    flex: 1;
    min-width: 145px;
  }

  .course-map-header,
  .course-map-footer,
  .site-footer-inner,
  .module-completion {
    align-items: flex-start;
    flex-direction: column;
  }

  .course-section {
    padding: 58px 0;
  }

  .section-title {
    font-size: 29px;
  }

  .lesson-heading {
    font-size: 34px;
  }

  .lesson-summary,
  .lesson-content {
    font-size: 16px;
  }

  .chapter-pagination {
    grid-template-columns: 1fr;
  }

  .chapter-link-empty {
    display: none;
  }

  .chapter-link-next {
    text-align: left;
  }

  .lesson-content h2 {
    font-size: 25px;
  }

  .lesson-content h3 {
    font-size: 21px;
  }

  .lesson-content table {
    width: max-content;
    min-width: 100%;
    font-size: 15px;
  }

  .image-lightbox {
    padding: 12px;
  }

  .image-lightbox-image {
    max-height: calc(100dvh - 88px);
  }

  .image-lightbox-caption {
    max-width: calc(100vw - 32px);
    font-size: 14px;
  }

  .image-lightbox-close {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .reading-progress,
  .course-nav,
  .lesson-toc,
  .lesson-toc-mobile,
  .copy-button,
  .module-completion,
  .chapter-pagination,
  .quick-start,
  .course-map-companions,
  .image-lightbox {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .lesson-page {
    display: block;
    width: 100%;
    padding: 0;
  }

  .lesson-card {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .lesson-content pre {
    padding: 14px;
    background: #f6f8f8;
    color: var(--ink);
    border: 1px solid #c9d3d2;
  }

  .lesson-content img {
    max-height: none;
    box-shadow: none;
  }

  .lesson-content h2,
  .lesson-content h3 {
    break-after: avoid;
  }

  .lesson-content table,
  .lesson-content blockquote,
  .lesson-content pre {
    break-inside: avoid;
  }
}

/* ===== 办公指令速查手册（office-manual）补充样式 ===== */
.category-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.module-card.is-advanced {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.lesson-content .prompt-copy-label {
  display: inline-block;
  margin: 0 0 4px;
  padding: 2px 10px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid #ecd9b4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lesson-content .prompt-copy-label + pre {
  margin-top: 8px;
}

.lesson-content .prompt-tip {
  margin: 16px 0 0;
  padding: 14px 16px;
  background: #eef4f2;
  color: #315158;
  border-left: 4px solid var(--teal-soft);
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 820px) {
  .category-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .category-map-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 版权水印（智教启航 + 办公指令速查手册 共用，2026-08-16）=====
   分布：左上 / 居中 / 右下，关于右上-左下对角线对称；浅色主题用深色浅透字。
   来源：build-workbuddy.mjs / build-office-manual.mjs 的 pageShell() 注入。 */
.zq-wm {
  position: fixed;
  z-index: 2147483000;
  pointer-events: none;
  font: 12px/1.6 Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 12px;
  color: rgba(20, 38, 43, 0.38);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(20, 38, 43, 0.08);
}

/* 左上：避让 70px 高的 sticky 页头，固定在其下方 */
.zq-wm--tl {
  top: 84px;
  left: 14px;
}

.zq-wm--center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(20, 38, 43, 0.14);
  background: rgba(255, 255, 255, 0.3);
  border: none;
}

.zq-wm--br {
  right: 14px;
  bottom: 14px;
  color: rgba(20, 38, 43, 0.5);
}

@media (max-width: 540px) {
  .zq-wm {
    font-size: 11px;
  }
  .zq-wm--center {
    display: none; /* 小屏内容密度高，居中水印避让阅读区 */
  }
}
