:root {
  --ink: #0b1f33;
  --ink-soft: #27313a;
  --accent: #d94a4a;
  --accent-dark: #b9383b;
  --paper: #f5f1e8;
  --white: #fffdf8;
  --muted: #63707c;
  --line: #d8d1c4;
  --surface-dark: #102b45;
  --surface-mid: #183a58;
  --focus: #ffcf66;
  --shell: min(1200px, calc(100% - 40px));
  --reading: 780px;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(11, 31, 51, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button,
input {
  font: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
  min-width: 0;
}

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
}

.site-header {
  position: relative;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid rgba(245, 241, 232, 0.16);
}

.header-main {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--white);
  text-decoration: none;
}

.brand:hover {
  color: var(--white);
}

.brand-mark {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  letter-spacing: 0.01em;
}

.brand-copy small {
  margin-top: 4px;
  color: #c8d1d9;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 241, 232, 0.3);
  border-radius: 12px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  width: 22px;
  height: 2px;
  display: block;
  background: currentColor;
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle-lines {
  position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-lines::before {
  top: -7px;
}

.menu-toggle-lines::after {
  top: 7px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
  transform: translateY(-7px) rotate(-45deg);
}

.primary-nav {
  background: #081a2b;
  border-top: 1px solid rgba(245, 241, 232, 0.09);
}

.primary-menu,
.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 52px;
}

.primary-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 15px;
  color: #dbe2e8;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
  color: var(--white);
  background: var(--surface-mid);
}

.site-main {
  min-height: 60vh;
}

.section {
  padding-block: 72px;
}

.section-tight {
  padding-block: 48px;
}

.section-dark {
  background: var(--ink);
  color: #dce3e9;
}

.section-dark h2,
.section-dark h3,
.section-dark strong {
  color: var(--white);
}

.section-white {
  background: var(--white);
}

.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  background: currentColor;
  border-radius: 3px;
}

.section-title {
  max-width: 760px;
  margin: 0 0 16px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.12;
  text-wrap: balance;
}

.section-intro {
  max-width: 760px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 18%, rgba(217, 74, 74, 0.18), transparent 34%),
    linear-gradient(135deg, #0b1f33 0%, #102b45 58%, #081a2b 100%);
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -45% 42%;
  aspect-ratio: 1;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(245, 241, 232, 0.025), 0 0 0 140px rgba(245, 241, 232, 0.018);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(40px, 6vw, 86px);
  align-items: center;
  min-height: 650px;
  padding-block: 80px;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.75rem, 5.5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 670px;
  margin: 28px 0 0;
  color: #e7ebef;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.6;
}

.hero-note {
  max-width: 640px;
  margin: 18px 0 0;
  color: #b9c4ce;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 26px;
  color: #d2dae1;
  font-size: 0.84rem;
}

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

.hero-meta span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

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

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 19px;
  border: 2px solid transparent;
  border-radius: 11px;
  background: var(--accent);
  color: var(--white);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover,
.wp-block-button__link:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
  color: var(--white);
}

.button-secondary {
  border-color: rgba(245, 241, 232, 0.5);
  background: transparent;
  color: var(--white);
}

.button-secondary:hover {
  border-color: var(--white);
  background: rgba(245, 241, 232, 0.08);
}

.hero-media {
  position: relative;
  min-width: 0;
}

.hero-image-frame {
  overflow: hidden;
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(1.2deg);
}

.hero-image-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  right: 20px;
  bottom: -18px;
  max-width: 260px;
  padding: 13px 16px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 11px;
  box-shadow: var(--shadow);
}

.topic-nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.topic-grid,
.card-grid,
.feature-grid,
.method-grid {
  display: grid;
  gap: 20px;
}

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

.topic-card {
  position: relative;
  min-width: 0;
  padding: 24px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.topic-card::before {
  content: attr(data-index);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 24px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 800;
}

.topic-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.topic-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: stretch;
}

.feature-lead,
.feature-side,
.info-panel {
  min-width: 0;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 20px;
}

.feature-lead {
  background: var(--ink);
  color: #dce4ea;
}

.feature-lead h3,
.feature-side h3 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.18;
}

.feature-lead h3 a {
  color: var(--white);
  text-decoration: none;
}

.feature-lead h3 a:hover {
  color: #ffb2ad;
}

.feature-side {
  border: 1px solid var(--line);
  background: var(--white);
}

.feature-side + .feature-side {
  margin-top: 20px;
}

.feature-side h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.feature-lead .post-meta {
  color: #bdc8d0;
}

.post-meta a {
  color: inherit;
  text-decoration: none;
}

.filter-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-button {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.filter-button:hover,
.filter-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

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

.post-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: #b9ad9e;
  box-shadow: var(--shadow);
}

.post-card[hidden] {
  display: none;
}

.post-card h2,
.post-card h3 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.25;
}

.post-card h2 a,
.post-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.94rem;
}

.post-card .read-link {
  margin-top: auto;
  font-weight: 800;
}

.filter-status {
  min-height: 1.4em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.context-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: start;
}

.context-copy {
  max-width: 720px;
}

.context-copy h2,
.content-panel h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.14;
}

.context-copy h3 {
  margin: 30px 0 8px;
  color: var(--ink);
  font-size: 1.18rem;
}

.context-copy p {
  margin: 0 0 18px;
}

.info-stack {
  display: grid;
  gap: 16px;
}

.info-panel {
  background: var(--ink);
  color: #dce4ea;
}

.info-panel:nth-child(even) {
  background: var(--surface-mid);
}

.info-panel span {
  display: block;
  margin-bottom: 18px;
  color: #ff9a94;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.info-panel h3 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: 1.3rem;
}

.info-panel p {
  margin: 0;
}

.method-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(36px, 6vw, 78px);
}

.method-image {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.method-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.method-list {
  counter-reset: method;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.method-list li {
  counter-increment: method;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.method-list li::before {
  content: counter(method, decimal-leading-zero);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
}

.method-list strong {
  display: block;
  color: var(--ink);
}

.method-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.glossary-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(30px, 5vw, 56px);
  border-radius: 22px;
  background: var(--accent);
  color: var(--white);
}

.glossary-callout h2 {
  margin: 0 0 10px;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
}

.glossary-callout p {
  max-width: 720px;
  margin: 0;
}

.glossary-callout .button {
  background: var(--ink);
}

.faq-list {
  max-width: 900px;
}

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

.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 16px 48px 16px 0;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  font-size: 1.6rem;
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details > div {
  max-width: 780px;
  padding: 0 40px 22px 0;
}

.faq-list p {
  margin: 0;
}

.page-hero,
.archive-hero {
  padding-block: 72px 60px;
  background: var(--ink);
  color: var(--white);
}

.page-hero .shell,
.archive-hero .shell {
  max-width: 960px;
}

.page-hero h1,
.archive-hero h1 {
  max-width: 880px;
  margin: 0;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.page-hero .post-meta {
  margin: 20px 0 0;
  color: #c4ced6;
}

.page-hero-lead,
.archive-description {
  max-width: 760px;
  margin: 22px 0 0;
  color: #d4dce3;
  font-size: 1.1rem;
}

.content-wrap {
  padding-block: 64px 84px;
}

.content-panel {
  width: min(var(--reading), calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(28px, 5vw, 56px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  scroll-margin-top: 32px;
  color: var(--ink);
  line-height: 1.2;
  text-wrap: balance;
}

.entry-content h2 {
  margin: 2.1em 0 0.65em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
}

.entry-content h3 {
  margin: 1.7em 0 0.55em;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table {
  margin-top: 0;
  margin-bottom: 1.25em;
}

.entry-content li + li {
  margin-top: 0.45em;
}

.entry-content blockquote,
.editorial-note,
.key-points,
.limits-box,
.source-note {
  margin: 28px 0;
  padding: 22px 24px;
  border-left: 5px solid var(--accent);
  background: #f1ede4;
  color: var(--ink-soft);
}

.key-points {
  border-color: var(--ink);
}

.limits-box {
  border-color: #bd7b2b;
  background: #fff4dc;
}

.source-note {
  border-color: #426e68;
  background: #eaf3f0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

.entry-content th {
  background: var(--ink);
  color: var(--white);
}

.entry-footer {
  width: min(var(--reading), calc(100% - 40px));
  margin: 28px auto 0;
}

.related-reading {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.related-reading h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1.2rem;
}

.related-reading ul {
  margin: 0;
  padding-left: 20px;
}

.archive-body {
  padding-block: 58px 84px;
}

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

.pagination {
  margin-top: 40px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--ink);
  color: var(--white);
}

.search-form {
  display: flex;
  gap: 10px;
  max-width: 650px;
  margin-top: 28px;
}

.search-form label {
  flex: 1;
}

.search-field {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}

.search-submit {
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.empty-state {
  max-width: 760px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.site-footer {
  padding-top: 62px;
  background: #081a2b;
  color: #c8d1d8;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.65fr) minmax(220px, 0.8fr);
  gap: clamp(32px, 6vw, 72px);
}

.brand-footer {
  margin-bottom: 20px;
}

.footer-about p,
.footer-contact p {
  margin: 0 0 14px;
}

.footer-heading {
  margin: 0 0 18px;
  color: var(--white);
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-menu li + li {
  margin-top: 8px;
}

.footer-menu a,
.footer-contact a {
  color: #e6ecf0;
}

.age-note {
  padding-top: 16px;
  border-top: 1px solid rgba(245, 241, 232, 0.16);
  font-size: 0.9rem;
}

.age-note strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
}

.footer-base {
  margin-top: 50px;
  padding-block: 22px;
  border-top: 1px solid rgba(245, 241, 232, 0.12);
  font-size: 0.8rem;
}

.footer-base p {
  margin: 0;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  }

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

@media (max-width: 899px) {
  .menu-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 82px;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.36);
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-menu {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-block: 16px 22px;
  }

  .primary-menu a {
    min-height: 48px;
    border: 1px solid rgba(245, 241, 232, 0.14);
    border-radius: 10px;
  }

  .hero-grid,
  .context-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: 0;
  }

  .hero-media {
    max-width: 680px;
  }

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

  .feature-side + .feature-side {
    margin-top: 0;
  }

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

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

@media (max-width: 640px) {
  :root {
    --shell: min(100% - 32px, 1200px);
  }

  body {
    font-size: 16px;
  }

  .header-main {
    min-height: 70px;
  }

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

  .brand-copy strong {
    font-size: 1.03rem;
  }

  .brand-copy small {
    display: none;
  }

  .primary-nav {
    top: 70px;
    max-height: calc(100vh - 70px);
  }

  .primary-menu {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: 50px;
  }

  .section-tight {
    padding-block: 38px;
  }

  .hero-grid {
    gap: 46px;
    padding-block: 58px 70px;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 12vw, 3.5rem);
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .hero-caption {
    position: static;
    max-width: none;
    margin-top: 12px;
  }

  .hero-image-frame {
    transform: none;
  }

  .hero-image-frame img {
    aspect-ratio: 4 / 5;
    object-position: 70% center;
  }

  .topic-grid,
  .card-grid,
  .archive-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    padding: 20px;
  }

  .filter-panel {
    padding: 20px;
  }

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

  .filter-button {
    width: 100%;
  }

  .glossary-callout {
    grid-template-columns: 1fr;
  }

  .glossary-callout .button {
    width: 100%;
  }

  .page-hero,
  .archive-hero {
    padding-block: 54px 46px;
  }

  .page-hero h1,
  .archive-hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.3rem);
  }

  .content-wrap {
    padding-block: 36px 58px;
  }

  .content-panel {
    width: calc(100% - 32px);
    padding: 24px 20px;
    border-radius: 14px;
  }

  .entry-footer {
    width: calc(100% - 32px);
  }

  .entry-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  .search-form {
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .filter-toolbar {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.42rem;
  }

  .feature-lead,
  .feature-side,
  .info-panel {
    padding: 24px 20px;
  }
}

@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;
  }
}
