:root {
  --ink-950: #04080d;
  --ink-900: #07101b;
  --ink-850: #0b1624;
  --ink-800: #102033;
  --brass-500: #c6a460;
  --brass-400: #ddc384;
  --brass-300: #ead8a6;
  --ivory-50: #faf7ef;
  --ivory-100: #f1ebdf;
  --ivory-200: #ded5c5;
  --slate-300: #b6b3ac;
  --slate-400: #93938f;
  --slate-600: #5d6165;
  --line-dark: rgba(224, 199, 138, 0.18);
  --line-light: rgba(21, 31, 42, 0.13);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  --serif: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ivory-100);
  background: var(--ink-950);
  font-family: var(--sans);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

body.reading-page,
body.utility-page {
  color: #1c2530;
  background: #eae4d9;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--brass-400);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--ink-950);
  background: var(--brass-300);
  transform: translateY(-160%);
}

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

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(4, 8, 13, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--brass-300);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(221, 195, 132, 0.5);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  background: var(--brass-400);
}

.brand-mark::before {
  top: 11px;
  left: -5px;
  width: 33px;
  height: 1px;
}

.brand-mark::after {
  top: 8px;
  left: 10px;
  width: 5px;
  height: 7px;
  border-radius: 999px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  color: #b8b5ae;
  font-size: 13px;
}

.site-nav a {
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brass-300);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 3px;
}

.site-nav .language-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(221, 195, 132, 0.48);
  border-radius: 5px;
  padding: 8px 13px;
  color: var(--brass-300);
  background: rgba(221, 195, 132, 0.06);
  font-weight: 700;
  white-space: nowrap;
}

.site-nav .language-button.zh {
  color: var(--ink-950);
  background: var(--brass-300);
}

.site-nav .language-button:hover {
  border-color: var(--brass-300);
  color: var(--ink-950);
  background: #f0dca4;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  padding: 8px 11px;
  color: var(--ivory-100);
  background: transparent;
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 45%, rgba(43, 71, 103, 0.42), transparent 34%),
    radial-gradient(circle at 18% 10%, rgba(198, 164, 96, 0.08), transparent 28%),
    linear-gradient(145deg, #07111d 0%, #07101b 47%, #04080d 100%);
}

.hero-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
}

.hero-lines::before,
.hero-lines::after {
  position: absolute;
  content: "";
}

.hero-lines::before {
  right: 13%;
  bottom: 2%;
  width: 42vw;
  height: 42vw;
  max-width: 610px;
  max-height: 610px;
  border: 1px solid rgba(221, 195, 132, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 84px rgba(221, 195, 132, 0.035),
    0 0 0 168px rgba(221, 195, 132, 0.022);
}

.hero-lines::after {
  right: 31%;
  bottom: -15%;
  width: 1px;
  height: 96%;
  background: linear-gradient(transparent, rgba(221, 195, 132, 0.85), transparent);
  box-shadow: 0 0 28px rgba(221, 195, 132, 0.42);
  transform: rotate(28deg);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 720px;
  grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  align-items: center;
  gap: 74px;
  padding-block: 92px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--brass-400);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  color: var(--brass-300);
  font-family: var(--serif);
  font-size: clamp(48px, 6.7vw, 86px);
  font-weight: 500;
  letter-spacing: 0.025em;
  line-height: 1.08;
}

.hero-title-en {
  margin: 20px 0 0;
  color: #d3cec3;
  font-family: var(--serif);
  font-size: clamp(21px, 2.6vw, 32px);
  letter-spacing: 0.055em;
}

.hero-lead {
  max-width: 720px;
  margin: 34px 0 0;
  color: #aaa9a4;
  font-size: 17px;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.edition-actions {
  display: grid;
  width: min(100%, 680px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.edition-entry {
  display: grid;
  min-height: 78px;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid rgba(221, 195, 132, 0.46);
  border-radius: 7px;
  padding: 14px 18px;
  color: var(--brass-300);
  background: rgba(221, 195, 132, 0.055);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
  transition: 160ms ease;
}

.edition-entry span,
.edition-entry strong {
  grid-column: 1;
}

.edition-entry span {
  color: #999b98;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.edition-entry strong {
  margin-top: 2px;
  font-size: 16px;
}

.edition-entry b {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--brass-400);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

.edition-entry.zh-entry {
  color: var(--ink-950);
  background: var(--brass-300);
}

.edition-entry.zh-entry span,
.edition-entry.zh-entry b {
  color: #6c5328;
}

.edition-entry:hover {
  border-color: var(--brass-300);
  background: #f0dca4;
  color: var(--ink-950);
  transform: translateY(-2px);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(221, 195, 132, 0.42);
  border-radius: 4px;
  padding: 11px 18px;
  color: var(--brass-300);
  background: rgba(221, 195, 132, 0.05);
  font-size: 13px;
  font-weight: 650;
  transition: 160ms ease;
}

.button:hover {
  border-color: var(--brass-300);
  background: rgba(221, 195, 132, 0.11);
  transform: translateY(-1px);
}

.button.primary {
  color: var(--ink-950);
  background: var(--brass-300);
}

.button.primary:hover {
  background: #f2dfaa;
}

.version-panel {
  position: relative;
  border: 1px solid rgba(221, 195, 132, 0.22);
  border-radius: 10px;
  padding: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016));
  box-shadow: var(--shadow);
}

.version-panel::before {
  position: absolute;
  top: -5px;
  left: 30px;
  width: 54px;
  height: 9px;
  border-radius: 999px;
  background: var(--brass-500);
  box-shadow: 0 0 18px rgba(198, 164, 96, 0.5);
  content: "";
}

.version-label {
  color: #8f918f;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.version-number {
  margin: 8px 0 18px;
  color: var(--brass-300);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
}

.version-panel dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  margin: 0;
  color: #a6a6a2;
  font-size: 13px;
}

.version-panel dt {
  color: #73777a;
}

.version-panel dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.version-panel a {
  color: var(--brass-300);
}

.version-panel a:hover {
  color: var(--ivory-50);
}

.home-section {
  padding-block: 100px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  background: var(--ink-900);
}

.home-section.alt {
  background: #09131f;
}

.section-heading {
  max-width: 840px;
  margin: 0;
  color: var(--ivory-50);
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 500;
  line-height: 1.2;
}

.section-lead {
  max-width: 800px;
  margin: 24px 0 0;
  color: #a8a7a2;
  font-size: 17px;
}

.question-grid,
.concept-grid,
.edition-grid,
.resource-grid {
  display: grid;
  gap: 16px;
  margin-top: 46px;
}

.question-grid {
  grid-template-columns: repeat(3, 1fr);
}

.concept-grid {
  grid-template-columns: repeat(4, 1fr);
}

.edition-grid,
.resource-grid {
  grid-template-columns: repeat(2, 1fr);
}

.dark-card {
  border: 1px solid rgba(221, 195, 132, 0.13);
  border-radius: 8px;
  padding: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.dark-card .number {
  display: block;
  margin-bottom: 25px;
  color: var(--brass-500);
  font-family: var(--serif);
}

.dark-card h3 {
  margin: 0 0 12px;
  color: var(--ivory-100);
  font-size: 19px;
  font-weight: 600;
}

.dark-card p {
  margin: 0;
  color: #92938f;
  font-size: 14px;
}

.concept-card {
  border-top: 1px solid var(--brass-500);
  padding: 20px 12px 0 0;
}

.concept-card strong {
  display: block;
  color: var(--brass-300);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.concept-card span {
  color: #858784;
  font-size: 13px;
}

.equation-band {
  padding-block: 72px;
  border-block: 1px solid rgba(221, 195, 132, 0.13);
  background: #050a11;
  text-align: center;
}

.equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.34em;
  color: var(--brass-300);
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 44px);
  letter-spacing: 0.02em;
}

.summation {
  position: relative;
  display: inline-grid;
  min-width: 1.35em;
  padding-block: 0.52em;
  line-height: 1;
}

.sum-mark {
  font-size: 1.36em;
}

.sum-upper,
.sum-lower {
  position: absolute;
  left: 50%;
  font-family: var(--sans);
  font-size: 0.28em;
  letter-spacing: 0;
  white-space: nowrap;
  transform: translateX(-50%);
}

.sum-upper {
  top: 0;
}

.sum-lower {
  bottom: 0;
}

.equation-fraction {
  display: inline-grid;
  min-width: 4.25em;
  line-height: 1.18;
  vertical-align: middle;
}

.fraction-top,
.fraction-bottom {
  padding-inline: 0.2em;
}

.fraction-top {
  padding-bottom: 0.12em;
  border-bottom: 1.5px solid currentColor;
}

.fraction-bottom {
  padding-top: 0.12em;
}

.equation-note {
  margin: 16px 0 0;
  color: #797d7f;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-hero {
  padding: 86px 0 68px;
  color: var(--ivory-100);
  background:
    radial-gradient(circle at 80% 20%, rgba(42, 72, 108, 0.32), transparent 34%),
    var(--ink-900);
}

.breadcrumbs {
  margin-bottom: 25px;
  color: #8e918f;
  font-size: 12px;
}

.breadcrumbs a:hover {
  color: var(--brass-300);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--ivory-50);
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.18;
}

.page-hero .subtitle {
  max-width: 820px;
  margin: 20px 0 0;
  color: #abaeaa;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.meta-chip {
  border: 1px solid rgba(221, 195, 132, 0.25);
  border-radius: 999px;
  padding: 6px 11px;
  color: #c7b98f;
  font-size: 11px;
}

.toc-wrap,
.utility-wrap {
  padding-block: 58px 88px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toc-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line-light);
  border-radius: 7px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.55);
  transition: 160ms ease;
}

.toc-card:hover {
  border-color: rgba(124, 91, 35, 0.38);
  background: rgba(255, 255, 255, 0.84);
  transform: translateY(-1px);
}

.toc-number {
  color: #9d7b42;
  font-family: var(--serif);
  font-size: 17px;
}

.toc-title {
  color: #1b2630;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.35;
}

.toc-arrow {
  color: #9c8b6b;
}

.reader {
  display: grid;
  width: min(1280px, calc(100% - 36px));
  grid-template-columns: 250px minmax(0, 760px) 210px;
  align-items: start;
  justify-content: center;
  gap: 34px;
  margin: 42px auto 80px;
}

.reader-sidebar,
.reader-aside {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 125px);
  overflow: auto;
}

.reader-sidebar h2,
.reader-aside h2 {
  margin: 0 0 13px;
  color: #5d6165;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chapter-list,
.section-list {
  display: grid;
  gap: 4px;
}

.chapter-list a,
.section-list a {
  display: block;
  border-left: 1px solid rgba(39, 48, 56, 0.14);
  padding: 6px 0 6px 12px;
  color: #717579;
  font-size: 12px;
  line-height: 1.35;
}

.chapter-list a:hover,
.chapter-list a.current,
.section-list a:hover {
  border-left-color: #a47c39;
  color: #694c1d;
}

.section-list .level-3 {
  padding-left: 22px;
  font-size: 11px;
}

.article {
  border: 1px solid rgba(26, 36, 45, 0.09);
  border-radius: 8px;
  padding: clamp(34px, 6vw, 72px);
  background: var(--ivory-50);
  box-shadow: 0 20px 70px rgba(56, 43, 25, 0.09);
}

.article-header {
  margin-bottom: 44px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(36, 46, 56, 0.14);
}

.article-header .chapter-label {
  color: #9b7434;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-header h1 {
  margin: 12px 0 0;
  color: #17222d;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.22;
}

.article-meta {
  margin-top: 18px;
  color: #7b7d7d;
  font-size: 12px;
}

.article-body {
  color: #26313b;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.92;
}

.article-body h2,
.article-body h3 {
  scroll-margin-top: 100px;
  color: #18232d;
  line-height: 1.35;
}

.article-body h2 {
  margin: 52px 0 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(29, 41, 52, 0.1);
  font-size: 27px;
  font-weight: 600;
}

.article-body h3 {
  margin: 38px 0 15px;
  font-size: 21px;
  font-weight: 600;
}

.article-body p {
  margin: 0 0 18px;
}

.article-body ul {
  margin: 0 0 24px;
  padding-left: 1.4em;
}

.article-body li {
  margin: 8px 0;
  padding-left: 0.35em;
}

.formula {
  margin: 28px 0;
  overflow-x: auto;
  border-left: 3px solid #b28a47;
  padding: 18px 22px;
  color: #17222d;
  background: #eee7d9;
  font-family: var(--mono);
  font-size: 15px;
  white-space: normal;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(36, 46, 56, 0.14);
}

.article-nav a {
  border: 1px solid rgba(36, 46, 56, 0.14);
  border-radius: 6px;
  padding: 16px;
  color: #4d5358;
  font-size: 12px;
}

.article-nav a:last-child {
  text-align: right;
}

.article-nav strong {
  display: block;
  margin-top: 4px;
  color: #1d2933;
  font-family: var(--serif);
  font-size: 14px;
}

.aside-card {
  margin-bottom: 20px;
  border: 1px solid rgba(39, 48, 56, 0.13);
  border-radius: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.42);
}

.aside-card p {
  margin: 0 0 12px;
  color: #686d71;
  font-size: 11px;
}

.aside-card a,
.aside-card button {
  display: block;
  width: 100%;
  border: 0;
  padding: 7px 0;
  color: #75551f;
  background: transparent;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}

.progress-track {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: var(--brass-400);
}

.utility-card {
  margin-bottom: 18px;
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.65);
}

.utility-card h2,
.utility-card h3 {
  margin: 0 0 14px;
  color: #1a2630;
  font-family: var(--serif);
  font-weight: 600;
}

.utility-card p {
  color: #5f656a;
}

.glossary-search {
  position: sticky;
  z-index: 10;
  top: 72px;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-light);
  padding-block: 15px;
  background: #eae4d9;
}

.glossary-search input {
  width: 100%;
  border: 1px solid rgba(36, 46, 56, 0.2);
  border-radius: 6px;
  padding: 12px 14px;
  color: #1c2731;
  background: rgba(255, 255, 255, 0.75);
}

.glossary-count {
  flex: 0 0 auto;
  align-self: center;
  color: #6a6e71;
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-light);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
}

.glossary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.glossary-table th,
.glossary-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(36, 46, 56, 0.1);
  text-align: left;
  vertical-align: top;
}

.glossary-table th {
  color: #5f4a28;
  background: rgba(198, 164, 96, 0.13);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.glossary-table td:first-child,
.glossary-table td:nth-child(2) {
  color: #17232d;
  font-weight: 650;
}

.status-pill {
  display: inline-block;
  border: 1px solid rgba(129, 97, 44, 0.24);
  border-radius: 999px;
  padding: 2px 8px;
  color: #745925;
  font-size: 10px;
  white-space: nowrap;
}

.citation-box {
  border-left: 3px solid #a9813f;
  padding: 18px 22px;
  color: #414b53;
  background: rgba(255, 255, 255, 0.62);
  font-family: var(--serif);
}

.download-list {
  display: grid;
  gap: 12px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--line-light);
  border-radius: 7px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.62);
}

.download-item strong {
  display: block;
  color: #1a2630;
  font-family: var(--serif);
}

.download-item span {
  color: #74787a;
  font-size: 12px;
}

.site-footer {
  padding-block: 54px;
  border-top: 1px solid var(--line-dark);
  color: #737674;
  background: var(--ink-950);
  font-size: 12px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 34px;
}

.footer-title {
  margin-bottom: 8px;
  color: #b6a47a;
  font-family: var(--serif);
  font-size: 16px;
}

.footer-links {
  display: grid;
  gap: 6px;
}

.footer-links a:hover {
  color: var(--brass-300);
}

.no-results {
  display: none;
  padding: 30px;
  color: #696e72;
  text-align: center;
}

@media (max-width: 1050px) {
  .reader {
    grid-template-columns: 200px minmax(0, 760px);
  }

  .reader-aside {
    display: none;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line-dark);
    border-radius: 7px;
    padding: 10px;
    background: #07101b;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 10px;
  }

  .language-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 0;
  }

  .site-nav .language-button {
    padding: 10px 12px;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 54px;
    padding-block: 84px 70px;
  }

  .version-panel {
    max-width: 470px;
  }

  .question-grid,
  .edition-grid,
  .resource-grid,
  .toc-grid {
    grid-template-columns: 1fr;
  }

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

  .reader {
    display: block;
    width: min(100% - 20px, 800px);
    margin-top: 20px;
  }

  .reader-sidebar {
    display: none;
  }

  .article {
    padding: 30px 22px;
  }

  .article-body {
    font-size: 16px;
  }

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

@media (max-width: 520px) {
  .brand span:last-child {
    max-width: 215px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero h1 {
    font-size: 46px;
  }

  .concept-grid {
    grid-template-columns: 1fr;
  }

  .edition-actions {
    grid-template-columns: 1fr;
  }

  .home-section {
    padding-block: 76px;
  }

  .toc-card {
    grid-template-columns: 38px 1fr;
  }

  .toc-arrow {
    display: none;
  }

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

  .article-nav a:last-child {
    text-align: left;
  }

  .download-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .glossary-search {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .site-header,
  .site-footer,
  .reader-sidebar,
  .reader-aside,
  .article-nav,
  .progress-track {
    display: none !important;
  }

  body.reading-page {
    background: white;
  }

  .reader {
    display: block;
    width: 100%;
    margin: 0;
  }

  .article {
    border: 0;
    padding: 0;
    box-shadow: none;
  }
}
