:root {
  --paper: #f2eee5;
  --paper-deep: #e8e0d2;
  --paper-light: #fbf8f1;
  --ink: #24201b;
  --ink-soft: #625a50;
  --ink-faint: #8d8377;
  --line: rgba(65, 52, 41, 0.15);
  --line-strong: rgba(65, 52, 41, 0.28);
  --cinnabar: #912f27;
  --cinnabar-deep: #6f221d;
  --gold: #a67938;
  --gold-soft: #d8bd87;
  --jade: #315f55;
  --shadow: 0 18px 56px rgba(60, 42, 27, 0.10);
  --sidebar-width: 276px;
  --toc-width: 228px;
  --reading-size: 18px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(198, 154, 75, 0.10), transparent 27rem),
    linear-gradient(90deg, rgba(63, 49, 38, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 24px 24px, auto;
  font-family: var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open,
body.search-open {
  overflow: hidden;
}

a {
  color: var(--cinnabar);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--cinnabar-deep);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--cinnabar);
  font-family: var(--sans);
}

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

.site-shell {
  min-height: 100vh;
}

.site-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(244, 240, 231, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 25px 24px 20px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff7e9;
  background: var(--cinnabar);
  box-shadow: 0 8px 20px rgba(111, 34, 29, 0.20);
  font-size: 20px;
  font-weight: 700;
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: 0.08em;
}

.brand-copy span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 36px);
  margin: 0 18px 20px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  text-align: left;
}

.nav-search:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
}

.nav-search svg {
  width: 16px;
  height: 16px;
}

.nav-search kbd {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-faint);
  background: var(--paper-light);
  font-size: 10px;
}

.nav-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.nav-group {
  margin-top: 20px;
}

.nav-group:first-child {
  margin-top: 0;
}

.nav-label {
  margin: 0 10px 8px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(145, 47, 39, 0.06);
}

.nav-link[aria-current="page"] {
  color: var(--cinnabar-deep);
  background: rgba(145, 47, 39, 0.10);
  font-weight: 600;
}

.nav-index {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-faint);
  font-size: 10px;
}

.nav-link[aria-current="page"] .nav-index {
  border-color: rgba(145, 47, 39, 0.28);
  color: var(--cinnabar);
}

.nav-meta {
  margin-top: auto;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.6;
}

.mobile-bar {
  display: none;
}

.nav-backdrop {
  display: none;
}

.page-stage {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.home-main,
.document-main {
  width: min(100%, 1460px);
  margin: 0 auto;
}

.home-main {
  padding: 54px clamp(28px, 5vw, 80px) 72px;
}

.home-hero {
  position: relative;
  min-height: 470px;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: clamp(44px, 7vw, 96px);
  border: 1px solid rgba(91, 63, 41, 0.18);
  border-radius: 4px 34px 4px 34px;
  background:
    linear-gradient(120deg, rgba(27, 24, 20, 0.94), rgba(49, 43, 34, 0.88)),
    var(--ink);
  box-shadow: var(--shadow);
  color: #f7f0e2;
}

.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.home-hero::before {
  width: min(54vw, 720px);
  aspect-ratio: 1;
  top: -42%;
  right: -10%;
  border: 1px solid rgba(214, 184, 128, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 58px rgba(214, 184, 128, 0.05),
    0 0 0 118px rgba(214, 184, 128, 0.035),
    0 0 0 178px rgba(214, 184, 128, 0.02);
}

.home-hero::after {
  inset: 18px;
  border: 1px solid rgba(231, 208, 166, 0.13);
  border-radius: 2px 24px 2px 24px;
}

.hero-seal {
  position: absolute;
  top: 56px;
  right: 64px;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(190, 65, 50, 0.92);
  color: #db6f5d;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.12em;
  text-align: center;
  transform: rotate(3deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold-soft);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.08;
}

.hero-deck {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(247, 240, 226, 0.76);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(232, 208, 162, 0.35);
  border-radius: 999px;
  color: #f7f0e2;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 14px;
}

.button-primary {
  border-color: var(--cinnabar);
  background: var(--cinnabar);
}

.button:hover {
  color: #fff;
  border-color: rgba(232, 208, 162, 0.62);
}

.button-primary:hover {
  border-color: #a83d32;
  background: #a83d32;
}

.home-section {
  margin-top: 72px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
  gap: 32px;
  align-items: end;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-strong);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(29px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.principle {
  min-height: 196px;
  padding: 26px;
  background: rgba(250, 247, 240, 0.82);
}

.principle-index {
  color: var(--cinnabar);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.principle h3 {
  margin: 35px 0 10px;
  font-size: 21px;
  font-weight: 600;
}

.principle p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.document-card {
  position: relative;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px 18px 3px 18px;
  color: var(--ink);
  background: rgba(250, 247, 240, 0.72);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.document-card::after {
  content: attr(data-glyph);
  position: absolute;
  right: -8px;
  bottom: -30px;
  color: rgba(145, 47, 39, 0.055);
  font-size: 124px;
  font-weight: 700;
  line-height: 1;
}

.document-card:hover {
  color: var(--ink);
  border-color: rgba(145, 47, 39, 0.35);
  box-shadow: 0 16px 34px rgba(60, 42, 27, 0.10);
  transform: translateY(-3px);
}

.card-type,
.card-meta {
  position: relative;
  z-index: 1;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.card-type {
  color: var(--cinnabar);
}

.document-card h3 {
  position: relative;
  z-index: 1;
  margin: 28px 0 10px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.35;
}

.document-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.card-meta {
  margin-top: auto;
}

.editorial-quote {
  position: relative;
  padding: clamp(34px, 6vw, 72px);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  text-align: center;
}

.editorial-quote::before {
  content: "“";
  display: block;
  height: 46px;
  color: var(--cinnabar);
  font-size: 72px;
  line-height: 1;
}

.editorial-quote p {
  max-width: 800px;
  margin: 0 auto;
  font-size: clamp(23px, 3vw, 37px);
  line-height: 1.65;
}

.editorial-quote cite {
  display: block;
  margin-top: 18px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.document-main {
  display: grid;
  grid-template-columns: minmax(0, 900px) var(--toc-width);
  justify-content: center;
  gap: clamp(42px, 5vw, 78px);
  padding: 58px clamp(32px, 5vw, 74px) 88px;
}

.document-column {
  min-width: 0;
}

.document-hero {
  position: relative;
  margin-bottom: 46px;
  padding: clamp(34px, 6vw, 68px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px 26px 3px 26px;
  background: rgba(250, 247, 240, 0.76);
  box-shadow: var(--shadow);
}

.document-hero::after {
  content: attr(data-glyph);
  position: absolute;
  right: -12px;
  bottom: -40px;
  z-index: 0;
  color: rgba(145, 47, 39, 0.055);
  font-size: clamp(150px, 22vw, 260px);
  font-weight: 700;
  line-height: 1;
}

.document-hero > * {
  position: relative;
  z-index: 1;
}

.document-hero h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.25;
}

.document-subtitle {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.75;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 28px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 12px;
}

.document-meta span {
  position: relative;
}

.document-meta span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -10px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--gold);
}

.reading-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -22px 0 28px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 12px;
}

.reading-tools span {
  margin-right: 4px;
}

.reading-tools button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.reading-tools button:hover,
.reading-tools button[aria-pressed="true"] {
  border-color: rgba(145, 47, 39, 0.36);
  color: var(--cinnabar);
  background: rgba(145, 47, 39, 0.07);
}

.prose {
  font-size: var(--reading-size);
  line-height: 1.95;
  overflow-wrap: anywhere;
}

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

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: #211d18;
  font-weight: 600;
  line-height: 1.45;
  scroll-margin-top: 28px;
}

.prose h1 {
  margin: 2.2em 0 0.8em;
  padding-top: 0.9em;
  border-top: 2px solid var(--ink);
  font-size: 2.05em;
}

.prose h2 {
  margin: 2.4em 0 0.85em;
  padding: 0 0 0.55em 18px;
  border-bottom: 1px solid var(--line-strong);
  border-left: 4px solid var(--cinnabar);
  font-size: 1.62em;
}

.prose h3 {
  margin: 2em 0 0.7em;
  color: var(--cinnabar-deep);
  font-size: 1.26em;
}

.prose h4 {
  margin: 1.7em 0 0.55em;
  font-size: 1.05em;
}

.heading-anchor {
  margin-left: 0.35em;
  color: transparent;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.66em;
}

.prose h1:hover .heading-anchor,
.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.prose h4:hover .heading-anchor,
.heading-anchor:focus {
  color: var(--ink-faint);
}

.prose p {
  margin: 0.85em 0;
}

.prose strong {
  color: #17130f;
  font-weight: 700;
}

.prose em {
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.55em;
}

.prose li {
  margin: 0.34em 0;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--cinnabar);
}

.prose blockquote {
  position: relative;
  margin: 1.7em 0;
  padding: 1.05em 1.35em 1.05em 1.55em;
  border: 1px solid rgba(145, 47, 39, 0.16);
  border-left: 4px solid var(--cinnabar);
  border-radius: 0 10px 10px 0;
  color: #423a32;
  background: rgba(145, 47, 39, 0.045);
}

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

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

.prose hr {
  width: 40%;
  height: 1px;
  margin: 3.2em auto;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--cinnabar-deep);
  background: rgba(145, 47, 39, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #ece5d9;
  background: #28241f;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.table-scroll {
  max-width: 100%;
  margin: 1.7em 0;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(251, 248, 241, 0.68);
  box-shadow: 0 8px 28px rgba(60, 42, 27, 0.045);
}

.prose table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.78em;
  line-height: 1.65;
}

.prose th,
.prose td {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.prose th:last-child,
.prose td:last-child {
  border-right: 0;
}

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

.prose th {
  color: #30271f;
  background: rgba(166, 121, 56, 0.12);
  font-weight: 650;
}

.prose tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.34);
}

.document-footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 62px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.pager-link {
  min-height: 94px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.34);
  text-decoration: none;
}

.pager-link:last-child {
  text-align: right;
}

.pager-link:hover {
  color: var(--cinnabar-deep);
  border-color: rgba(145, 47, 39, 0.34);
}

.pager-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.page-toc {
  position: sticky;
  top: 32px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding-left: 18px;
  border-left: 1px solid var(--line-strong);
}

.page-toc h2 {
  margin: 0 0 13px;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.15em;
}

.toc-link {
  display: block;
  margin: 7px 0;
  color: var(--ink-faint);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
}

.toc-link.depth-3 {
  padding-left: 12px;
  font-size: 11px;
}

.toc-link:hover,
.toc-link.active {
  color: var(--cinnabar);
}

.site-footer {
  margin-left: var(--sidebar-width);
  padding: 28px clamp(30px, 5vw, 74px) 38px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.search-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 40px));
  margin: 8vh auto 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper-light);
  box-shadow: 0 30px 100px rgba(35, 25, 18, 0.34);
}

.search-dialog::backdrop {
  background: rgba(28, 24, 20, 0.54);
  backdrop-filter: blur(5px);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.search-form svg {
  width: 20px;
  height: 20px;
  color: var(--ink-faint);
}

.search-input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--sans);
  font-size: 17px;
}

.search-close {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-faint);
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
}

.search-results {
  max-height: min(580px, calc(100vh - 150px));
  overflow-y: auto;
  padding: 10px;
}

.search-empty {
  padding: 52px 24px;
  color: var(--ink-faint);
  font-family: var(--sans);
  text-align: center;
}

.search-result {
  display: block;
  padding: 13px 14px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.search-result:hover,
.search-result:focus {
  color: var(--ink);
  background: rgba(145, 47, 39, 0.07);
  outline: 0;
}

.search-result small,
.search-result strong,
.search-result span {
  display: block;
}

.search-result small {
  color: var(--cinnabar);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.search-result strong {
  margin: 4px 0;
  font-size: 15px;
}

.search-result span {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.not-found {
  min-height: calc(100vh - 100px);
  display: grid;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.not-found strong {
  display: block;
  color: rgba(145, 47, 39, 0.15);
  font-family: var(--sans);
  font-size: clamp(100px, 20vw, 240px);
  line-height: 0.9;
}

.not-found h1 {
  margin: 20px 0 10px;
  font-size: 36px;
}

.not-found p {
  color: var(--ink-soft);
}

@media (max-width: 1180px) {
  .document-main {
    display: block;
    max-width: 900px;
  }

  .page-toc {
    display: none;
  }

  .principles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --reading-size: 17px;
  }

  .site-nav {
    width: min(86vw, 330px);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  body.nav-open .site-nav {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    visibility: hidden;
    opacity: 0;
    border: 0;
    background: rgba(28, 24, 20, 0.44);
    transition: opacity 200ms ease, visibility 200ms ease;
  }

  body.nav-open .nav-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 240, 231, 0.92);
    backdrop-filter: blur(16px);
  }

  .mobile-bar strong {
    font-size: 15px;
    letter-spacing: 0.06em;
  }

  .mobile-menu,
  .mobile-search {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .mobile-menu svg,
  .mobile-search svg {
    width: 20px;
    height: 20px;
  }

  .page-stage,
  .site-footer {
    margin-left: 0;
  }

  .home-main {
    padding: 22px 18px 56px;
  }

  .home-hero {
    min-height: 520px;
    padding: 42px 28px;
    border-radius: 3px 22px 3px 22px;
  }

  .hero-seal {
    top: 36px;
    right: 30px;
    width: 66px;
    height: 66px;
    font-size: 16px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-main {
    padding: 22px 18px 64px;
  }

  .document-hero {
    padding: 34px 28px;
  }
}

@media (max-width: 600px) {
  .home-hero {
    min-height: 490px;
  }

  .home-hero h1 {
    max-width: 280px;
    font-size: 49px;
  }

  .hero-deck {
    font-size: 17px;
    line-height: 1.75;
  }

  .principles-grid,
  .document-grid {
    grid-template-columns: 1fr;
  }

  .principle {
    min-height: 0;
  }

  .document-card {
    min-height: 214px;
  }

  .document-hero h1 {
    font-size: 38px;
  }

  .prose {
    font-size: 16.5px;
    line-height: 1.9;
  }

  .prose h2 {
    padding-left: 12px;
    font-size: 1.42em;
  }

  .document-footer-nav {
    grid-template-columns: 1fr;
  }

  .pager-link:last-child {
    text-align: left;
  }

}

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

  .site-nav,
  .mobile-bar,
  .page-toc,
  .reading-tools,
  .document-footer-nav,
  .site-footer {
    display: none !important;
  }

  .page-stage {
    margin: 0;
  }

  .document-main {
    display: block;
    max-width: none;
    padding: 0;
  }

  .document-hero {
    box-shadow: none;
  }

  .prose {
    font-size: 11pt;
  }

  a {
    color: inherit;
  }
}

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

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