:root {
  color-scheme: dark;
  --ink-950: oklch(0.115 0.012 16);
  --ink-925: oklch(0.135 0.013 18);
  --ink-900: oklch(0.155 0.014 20);
  --ink-850: oklch(0.19 0.016 24);
  --ink-800: oklch(0.235 0.018 25);
  --paper-100: oklch(0.93 0.018 83);
  --paper-200: oklch(0.85 0.019 79);
  --paper-300: oklch(0.76 0.02 75);
  --paper-500: oklch(0.58 0.02 65);
  --crimson-500: oklch(0.54 0.2 24);
  --crimson-400: oklch(0.64 0.18 24);
  --crimson-300: oklch(0.72 0.14 27);
  --gold-400: oklch(0.72 0.09 78);
  --confirmed: oklch(0.7 0.105 145);
  --pending: oklch(0.75 0.12 82);
  --line: oklch(0.32 0.025 25 / 0.72);
  --line-soft: oklch(0.3 0.02 25 / 0.45);
  --shadow: 0 22px 65px oklch(0.04 0.01 20 / 0.4);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --content: min(1180px, calc(100% - 40px));
  --reading: 720px;
  --ease: 160ms ease-out;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink-950);
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink-950);
  color: var(--paper-100);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

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

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in oklch, var(--crimson-400), transparent 36%);
  text-underline-offset: 0.2em;
}

button,
input {
  font: inherit;
}

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

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

::selection {
  background: var(--crimson-500);
  color: white;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--paper-100);
  color: var(--ink-950);
  transform: translateY(-150%);
  transition: transform var(--ease);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  border-bottom: 1px solid var(--line-soft);
  background: oklch(0.105 0.012 16 / 0.94);
  backdrop-filter: blur(12px);
}

.nav-shell {
  width: var(--content);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: var(--paper-500);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 24px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--paper-300);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  transition: color var(--ease);
}

.nav-link::after {
  position: absolute;
  right: 50%;
  bottom: -1px;
  left: 50%;
  height: 2px;
  background: var(--crimson-400);
  content: "";
  transition: right var(--ease), left var(--ease);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--paper-100);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  right: 0;
  left: 0;
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--ink-900);
  color: var(--paper-100);
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}

.icon-button:hover {
  border-color: var(--crimson-400);
  background: var(--ink-850);
  color: var(--crimson-300);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.menu-toggle {
  display: none;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--crimson-500);
  border-radius: 2px;
  background: var(--crimson-500);
  color: white;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), border-color var(--ease);
}

.button:hover {
  background: var(--crimson-400);
  border-color: var(--crimson-400);
  transform: translateY(-2px);
}

.button-secondary {
  border-color: var(--line);
  background: oklch(0.15 0.012 18 / 0.82);
  color: var(--paper-100);
}

.button-secondary:hover {
  border-color: var(--paper-300);
  background: var(--ink-850);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--paper-300);
}

.button svg {
  width: 18px;
  height: 18px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--gold-400);
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 30px;
  height: 2px;
  background: var(--crimson-500);
  content: "";
}

.home-hero {
  position: relative;
  min-height: calc(82svh - 72px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink-950) url("/assets/images/crimson-moon-hero.webp") center / cover no-repeat;
  isolation: isolate;
}

.home-hero::before {
  position: absolute;
  inset: 0 38% 0 0;
  z-index: -1;
  background: oklch(0.09 0.015 18 / 0.9);
  clip-path: polygon(0 0, 82% 0, 100% 100%, 0 100%);
  content: "";
}

.home-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 28%;
  background: oklch(0.1 0.015 18 / 0.62);
  content: "";
}

.hero-inner {
  width: var(--content);
  margin: 0 auto;
  padding: 56px 0 52px;
}

.home-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.25rem, 6.8vw, 5.8rem);
  font-weight: 650;
  line-height: 0.88;
  letter-spacing: 0;
  text-wrap: balance;
}

.home-title-line {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.hero-copy {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--paper-200);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.stat-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-925);
}

.stat-grid {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-item {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 28px;
  border-left: 1px solid var(--line-soft);
}

.stat-item:last-child {
  border-right: 1px solid var(--line-soft);
}

.stat-value {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
}

.stat-label {
  margin-top: 4px;
  color: var(--paper-500);
  font-size: 0.77rem;
  font-weight: 750;
  text-transform: uppercase;
}

.section {
  padding: 88px 0;
}

.section-compact {
  padding: 64px 0;
}

.section-alt {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--ink-925);
}

.section-inner {
  width: var(--content);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(280px, 0.3fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 42px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 650;
  line-height: 1.05;
}

.section-heading p {
  margin: 0;
  color: var(--paper-300);
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.start-card {
  position: relative;
  min-height: 218px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}

.start-card:nth-child(odd) {
  border-left: 1px solid var(--line);
}

.start-card:hover {
  background: var(--ink-850);
  transform: translateX(3px);
}

.start-number {
  color: var(--crimson-400);
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
}

.start-card h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.15;
}

.start-card p {
  margin: 0;
  color: var(--paper-300);
}

.start-arrow {
  position: absolute;
  right: 24px;
  bottom: 24px;
  color: var(--paper-500);
}

.start-arrow svg {
  width: 20px;
  height: 20px;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 44px;
}

.category-block h3 {
  margin: 0 0 12px;
  color: var(--gold-400);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-row {
  position: relative;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 10px 16px 18px;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}

.guide-row::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 2px;
  background: var(--crimson-500);
  content: "";
  transform: scaleY(0.35);
  transition: transform var(--ease);
}

.guide-row:hover {
  background: var(--ink-850);
  transform: translateX(3px);
}

.guide-row:hover::before {
  transform: scaleY(1);
}

.guide-row strong {
  display: block;
  font-size: 0.98rem;
}

.guide-row span {
  display: block;
  margin-top: 2px;
  color: var(--paper-500);
  font-size: 0.82rem;
}

.guide-row svg {
  width: 19px;
  color: var(--paper-500);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 64px;
  align-items: start;
}

.about-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--ink-950);
  outline: 1px solid oklch(0.93 0.018 83 / 0.08);
  outline-offset: -1px;
}

.about-media iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.about-copy h2,
.final-cta h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 650;
  line-height: 1.05;
}

.about-copy > p,
.final-cta > p {
  color: var(--paper-300);
  font-size: 1.02rem;
  line-height: 1.78;
}

.fact-grid {
  margin: 30px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.fact {
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}

.fact:nth-child(odd) {
  padding-right: 20px;
}

.fact-label {
  display: block;
  color: var(--paper-500);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact-value {
  display: block;
  margin-top: 2px;
  font-weight: 700;
}

.home-overview {
  border-bottom: 1px solid var(--line-soft);
  background: var(--ink-925);
}

.final-band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--ink-900);
}

.final-band::after {
  position: absolute;
  top: 0;
  right: 6%;
  width: 2px;
  height: 100%;
  background: var(--crimson-500);
  content: "";
  transform: rotate(14deg);
}

.final-cta {
  position: relative;
  z-index: 1;
  width: var(--content);
  margin: 0 auto;
  padding: 72px 0;
}

.final-cta > p {
  max-width: 720px;
}

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: oklch(0.09 0.012 16);
}

.footer-grid {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(130px, 0.5fr));
  gap: 48px;
  padding: 60px 0 48px;
}

.footer-about {
  max-width: 440px;
}

.footer-about h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 1.5rem;
}

.footer-about p {
  margin: 0;
  color: var(--paper-500);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-column h3 {
  margin: 0 0 14px;
  color: var(--paper-300);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.footer-column a {
  display: block;
  margin: 9px 0;
  color: var(--paper-500);
  font-size: 0.86rem;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--paper-100);
}

.footer-bottom {
  width: var(--content);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line-soft);
  color: var(--paper-500);
  font-size: 0.76rem;
}

.article-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--ink-925);
}

.article-hero::after {
  position: absolute;
  top: 0;
  right: 0;
  width: min(38vw, 560px);
  height: 100%;
  background: url("/assets/images/crimson-moon-portrait.webp") center / cover no-repeat;
  content: "";
  opacity: 0.24;
  filter: saturate(0.8) contrast(1.1);
}

.article-hero-inner {
  position: relative;
  z-index: 1;
  width: var(--content);
  margin: 0 auto;
  padding: 60px 0 54px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 30px;
  color: var(--paper-500);
  font-size: 0.8rem;
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--paper-100);
}

.breadcrumbs svg {
  width: 14px;
  height: 14px;
}

.article-hero h1 {
  max-width: 840px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.55rem, 5vw, 4.5rem);
  font-weight: 650;
  line-height: 1;
  text-wrap: balance;
}

.article-deck {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--paper-200);
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  line-height: 1.72;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 24px;
  color: var(--paper-500);
  font-size: 0.78rem;
  font-weight: 700;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.article-meta svg {
  width: 15px;
  height: 15px;
}

.article-layout {
  width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, var(--reading));
  justify-content: center;
  gap: 64px;
  padding: 56px 0 96px;
}

.toc {
  align-self: start;
  position: sticky;
  top: 104px;
}

.toc h2,
.toc summary {
  margin: 0 0 14px;
  color: var(--paper-300);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.toc summary {
  display: none;
  cursor: pointer;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  position: relative;
  display: block;
  padding: 8px 8px 8px 16px;
  color: var(--paper-500);
  font-size: 0.82rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--ease), transform var(--ease);
}

.toc a::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  background: var(--line);
  content: "";
}

.toc a:hover,
.toc a.is-active {
  color: var(--paper-100);
  transform: translateX(2px);
}

.toc a.is-active::before {
  background: var(--crimson-400);
}

.article-body {
  min-width: 0;
}

.article-body > p:first-child {
  margin-top: 0;
  color: var(--paper-200);
  font-size: 1.08rem;
}

.article-body h2 {
  margin: 58px 0 18px;
  padding-top: 10px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 650;
  line-height: 1.15;
}

.article-body h2::before {
  display: block;
  width: 46px;
  height: 2px;
  margin-bottom: 16px;
  background: var(--crimson-500);
  content: "";
}

.article-body h3 {
  margin: 32px 0 12px;
  font-size: 1.12rem;
  line-height: 1.3;
}

.article-body p,
.article-body li {
  color: var(--paper-300);
  line-height: 1.78;
}

.article-body strong {
  color: var(--paper-100);
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
}

.article-body li + li {
  margin-top: 8px;
}

.article-body a {
  color: var(--crimson-300);
}

.answer-box,
.evidence-note {
  margin: 24px 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--crimson-400);
  border-radius: 3px;
  background: var(--ink-900);
}

.answer-box strong,
.evidence-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--paper-100);
}

.evidence-note.confirmed {
  border-left-color: var(--confirmed);
}

.evidence-note.pending {
  border-left-color: var(--pending);
}

.evidence-note p,
.answer-box p {
  margin: 0;
}

.data-table-wrap {
  max-width: 100%;
  margin: 26px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--ink-850);
  color: var(--paper-100);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.data-table td {
  color: var(--paper-300);
}

.faq-list {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--paper-100);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  color: var(--crimson-400);
  content: "+";
  font-size: 1.25rem;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-answer {
  padding: 0 44px 22px 0;
}

.faq-answer p {
  max-width: 760px;
  margin: 0;
  color: var(--paper-300);
  line-height: 1.72;
}

.faq-answer a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--crimson-300);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.faq-answer a:hover {
  color: var(--paper-100);
}

.faq-answer svg {
  width: 15px;
  height: 15px;
}

.faq-panel {
  max-width: 960px;
  margin: 0 auto;
}

.faq-panel .section-heading {
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 0.28fr);
}

.faq-more {
  margin-top: 28px;
}

.faq-page-panel {
  max-width: 900px;
}

.faq-page-cta {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.faq-page-cta p {
  margin: 0;
  color: var(--paper-300);
}

.related-section {
  border-top: 1px solid var(--line);
  padding-top: 40px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.related-card {
  min-height: 150px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}

.related-card:nth-child(odd) {
  border-left: 1px solid var(--line);
}

.related-card:hover {
  background: var(--ink-850);
  transform: translateY(-2px);
}

.related-card small {
  color: var(--gold-400);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.related-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 1.2rem;
}

.related-card span {
  display: block;
  margin-top: 7px;
  color: var(--paper-500);
  font-size: 0.82rem;
}

.index-hero {
  padding: 74px 0 54px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-925);
}

.index-hero-inner {
  width: var(--content);
  margin: 0 auto;
}

.index-hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1;
}

.index-hero p {
  max-width: 700px;
  color: var(--paper-300);
  font-size: 1.08rem;
}

.legal-page,
.not-found {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0 110px;
}

.legal-page h1,
.not-found h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1;
}

.legal-page h2 {
  margin-top: 44px;
  font-family: var(--serif);
  font-size: 1.7rem;
}

.legal-page p,
.legal-page li,
.not-found p {
  color: var(--paper-300);
  line-height: 1.8;
}

.error-code {
  color: var(--crimson-400);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(720px, calc(100svh - 40px));
  margin: 20px auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--ink-900);
  color: var(--paper-100);
  box-shadow: var(--shadow);
}

.search-dialog::backdrop {
  background: oklch(0.04 0.01 20 / 0.78);
}

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

.search-head > svg {
  width: 20px;
  color: var(--paper-500);
}

.search-input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--paper-100);
  font-size: 1rem;
  outline: 0;
}

.search-input::placeholder {
  color: var(--paper-500);
}

.search-results {
  max-height: calc(100svh - 150px);
  padding: 8px;
  overflow-y: auto;
}

.search-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 3px;
  text-decoration: none;
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--ink-850);
}

.search-result small {
  display: block;
  color: var(--gold-400);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-result strong {
  display: block;
  margin-top: 3px;
}

.search-result p {
  margin: 4px 0 0;
  color: var(--paper-500);
  font-size: 0.8rem;
}

.search-empty {
  padding: 28px 16px;
  color: var(--paper-500);
  text-align: center;
}

.mobile-panel {
  display: none;
}

@media (max-width: 980px) {
  .primary-nav {
    gap: 16px;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  .article-layout {
    grid-template-columns: minmax(0, var(--reading));
    gap: 28px;
  }

  .toc {
    position: static;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--ink-900);
  }

  .toc h2 {
    display: none;
  }

  .toc summary {
    min-height: 50px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0 16px;
    list-style: none;
  }

  .toc summary::-webkit-details-marker {
    display: none;
  }

  .toc ol {
    padding: 0 8px 12px;
  }

  .footer-grid {
    grid-template-columns: 1.2fr repeat(2, 0.6fr);
  }

  .footer-column:last-child {
    grid-column: 2 / 4;
  }
}

@media (max-width: 760px) {
  :root {
    --content: min(100% - 32px, 1180px);
  }

  .site-header {
    height: 64px;
  }

  .nav-shell {
    gap: 10px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .primary-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .mobile-panel {
    position: fixed;
    inset: 64px 0 0;
    z-index: 90;
    display: block;
    padding: 20px 16px;
    background: var(--ink-950);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--ease), visibility var(--ease);
  }

  .menu-open .mobile-panel {
    transform: translateX(0);
    visibility: visible;
  }

  .mobile-panel a {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 1.25rem;
    text-decoration: none;
  }

  .home-hero {
    min-height: calc(76svh - 64px);
    background-position: 64% center;
  }

  .home-hero::before {
    inset: 0;
    clip-path: none;
    background: oklch(0.08 0.014 18 / 0.74);
  }

  .home-hero::after {
    display: none;
  }

  .hero-inner {
    padding: 48px 0 40px;
  }

  .home-hero h1 {
    font-size: clamp(2.8rem, 13vw, 3.4rem);
  }

  .hero-copy {
    max-width: 100%;
    font-size: 0.98rem;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

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

  .stat-item {
    min-height: 92px;
    padding: 16px;
  }

  .stat-item:nth-child(3) {
    border-top: 1px solid var(--line-soft);
  }

  .stat-item:nth-child(4) {
    border-top: 1px solid var(--line-soft);
    border-right: 1px solid var(--line-soft);
  }

  .stat-value {
    font-size: 1.18rem;
  }

  .section {
    padding: 64px 0;
  }

  .section-compact {
    padding: 48px 0;
  }

  .section-heading,
  .about-grid,
  .faq-panel .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .start-grid,
  .category-list,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .start-card {
    min-height: 188px;
    grid-template-columns: 52px 1fr;
    padding: 24px 20px;
    border-left: 1px solid var(--line);
  }

  .start-card h3 {
    font-size: 1.3rem;
  }

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

  .fact:nth-child(odd) {
    padding-right: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
    padding-top: 46px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-column:last-child {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .article-hero::after {
    width: 100%;
    opacity: 0.1;
  }

  .article-hero-inner {
    padding: 38px 0 42px;
  }

  .breadcrumbs {
    margin-bottom: 22px;
  }

  .article-hero h1 {
    font-size: clamp(2.5rem, 13vw, 3.5rem);
  }

  .article-layout {
    width: var(--content);
    padding: 36px 0 72px;
  }

  .article-body h2 {
    margin-top: 48px;
    font-size: 1.72rem;
  }

  .related-card {
    border-left: 1px solid var(--line);
  }

  .index-hero {
    padding: 54px 0 40px;
  }

  .faq-page-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .faq-page-cta .button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand-text small {
    display: none;
  }

  .article-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .footer-about,
  .footer-column:last-child {
    grid-column: auto;
  }
}

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

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

@media print {
  .site-header,
  .site-footer,
  .toc,
  .related-section,
  .search-dialog {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .article-layout {
    display: block;
    width: 100%;
  }

  .article-body p,
  .article-body li {
    color: black;
  }
}
