:root {
  --page: #f7f3ec;
  --surface: #fffdf9;
  --surface-soft: #f2e8dd;
  --ink: #2c1a10;
  --ink-soft: #654b3b;
  --accent: #c25d32;
  --accent-app: #f26b2a;
  --accent-dark: #873b21;
  --mind: #6c5fc7;
  --green: #35614a;
  --border: #dfd2c5;
  --shadow: 0 18px 55px rgba(77, 42, 22, 0.1);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  max-width: 100%;
  background:
    radial-gradient(circle at 8% 8%, rgba(242, 107, 42, 0.12), transparent 28rem),
    radial-gradient(circle at 92% 20%, rgba(139, 127, 214, 0.12), transparent 30rem),
    var(--page);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(108, 95, 199, 0.45);
  outline-offset: 4px;
  border-radius: 6px;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid #e8ddd3;
  background: rgba(247, 243, 236, 0.8);
}
/* Blur on a ::before, not the header: backdrop-filter on the header clips
   absolutely-positioned descendants (language dropdown) to its bounds. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-shell {
  display: grid;
  width: 100%;
  min-height: 63px;
  margin: 0 auto;
  padding: 0 40px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 26px;
  height: 26px;
}

.brand em {
  color: var(--accent-app);
  font-style: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
  padding: 5px;
  border: 1px solid #e8ddd3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.site-nav a {
  color: #5c3d2a;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 17px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(44, 26, 16, 0.08);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
}

.nav-download {
  display: inline-flex;
  min-height: 0;
  padding: 9px 20px;
  align-items: center;
  justify-self: end;
  gap: 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--page);
  font-size: 13px;
  font-weight: 600;
  line-height: 17px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.nav-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(44, 26, 16, 0.22);
  color: var(--page);
}

.nav-download-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-app);
  animation: nav-dot-pulse 2s ease-in-out infinite;
}

@keyframes nav-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.7rem 1.05rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-dark);
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(135, 59, 33, 0.18);
  color: #fff;
}

.button.secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
}

.button.secondary:hover {
  background: #fff;
  color: var(--accent-dark);
}

.hero,
.page-shell,
.wide-shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5.5rem);
  text-align: center;
}

.hero.narrow {
  width: min(860px, calc(100% - 2rem));
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 920px;
  margin-right: auto;
  margin-bottom: 1.4rem;
  margin-left: auto;
  font-size: clamp(2.6rem, 7.5vw, 5.8rem);
  letter-spacing: -0.055em;
}

h2 {
  margin-top: 3.4rem;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.04em;
}

h3 {
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  letter-spacing: -0.025em;
}

.lede {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  margin-top: 1.8rem;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(210px, 280px);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-bottom: 5rem;
}

.page-shell.single {
  display: block;
  width: min(800px, calc(100% - 2rem));
}

.article-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body p,
.article-body li {
  color: #48372d;
  font-size: 1.04rem;
}

.article-body p {
  margin: 0 0 1.25rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.6rem;
  padding-left: 1.35rem;
}

.article-body li + li {
  margin-top: 0.6rem;
}

.article-body strong {
  color: var(--ink);
}

.direct-answer,
.callout {
  margin: 0 0 2rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(194, 93, 50, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 253, 249, 0.9), rgba(242, 232, 221, 0.75));
}

.direct-answer p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

.callout.mind {
  border-color: rgba(108, 95, 199, 0.25);
  background: rgba(108, 95, 199, 0.07);
}

.callout.safe {
  border-color: rgba(53, 97, 74, 0.3);
  background: rgba(53, 97, 74, 0.07);
}

.meta-line {
  margin: -0.3rem auto 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.toc,
.side-card {
  position: sticky;
  top: 96px;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.72);
  box-shadow: 0 10px 35px rgba(77, 42, 22, 0.06);
}

.toc h2,
.side-card h2 {
  margin: 0 0 0.8rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 0.36rem 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-dark);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid + .callout {
  margin-top: 1.5rem;
}

.card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 0 10px 35px rgba(77, 42, 22, 0.06);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card h2 {
  font-size: 1.6rem;
}

.card h3 {
  font-size: 1.32rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.card-link > .term-kind {
  margin-bottom: 0.55rem;
}

.card-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}

.data-downloads {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 1.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.72);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.data-downloads a {
  padding: 0.34rem 0.65rem;
  border: 1px solid rgba(201, 79, 36, 0.22);
  border-radius: 999px;
  background: rgba(201, 79, 36, 0.07);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.citation-band {
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: clamp(2.4rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--border);
  background: rgba(255, 253, 249, 0.46);
}

.citation-band .wide-shell {
  padding-top: 0;
  padding-bottom: 0;
}

.citation-band h2 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.citation-text {
  max-width: 900px;
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
}

.citation-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.citation-actions .button {
  cursor: pointer;
}

.copy-status {
  min-height: 1.4em;
  margin: 0.6rem 0 0;
  color: var(--safe);
  font-size: 0.82rem;
  font-weight: 700;
}

.tag-list {
  display: flex;
  margin: 1rem 0 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.tag-list li {
  margin: 0;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.fact-grid {
  display: grid;
  margin: 2rem 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.fact {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.fact dt {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact dd {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-weight: 700;
}

.table-wrap {
  max-width: 100%;
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.85);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(242, 232, 221, 0.7);
  color: var(--ink);
  font-size: 0.83rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.numbered-steps {
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.numbered-steps > li {
  position: relative;
  min-height: 3.2rem;
  padding-left: 3.7rem;
  counter-increment: steps;
}

.numbered-steps > li::before {
  position: absolute;
  top: -0.25rem;
  left: 0;
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  content: counter(steps, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.source-list {
  padding: 1.2rem 1.4rem 1.2rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.source-list li {
  font-size: 0.93rem;
}

.hero-image {
  width: min(900px, calc(100% - 2rem));
  max-height: 500px;
  margin: -1.5rem auto 4rem;
  object-fit: cover;
  object-position: center 28%;
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.section-band {
  margin: 4rem 0;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 253, 249, 0.7);
}

.section-band > h2:first-child {
  margin-top: 0;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 253, 249, 0.52);
}

.footer-shell {
  display: grid;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.footer-brand p {
  max-width: 310px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.85rem;
}

.footer-socials a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0.4rem 0.72rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.footer-socials a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.footer-socials a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 1.4rem;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-dark);
}

.fine-print {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* Authority library: evidence labels, glossary, questions, and pattern atlas. */
.evidence-key {
  margin: 2.5rem 0;
}

.evidence-key > h2 {
  margin-top: 0;
}

.evidence-badge,
.term-kind,
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.34rem 0.58rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.evidence-badge.external {
  border-color: rgba(38, 107, 89, 0.22);
  background: rgba(38, 107, 89, 0.09);
  color: #235f50;
}

.evidence-badge.method {
  border-color: rgba(44, 110, 143, 0.22);
  background: rgba(44, 110, 143, 0.08);
  color: #245d77;
}

.evidence-badge.product {
  border-color: rgba(165, 61, 27, 0.22);
  background: rgba(201, 79, 36, 0.08);
  color: #8e361b;
}

.glossary-tools {
  max-width: 720px;
  margin: 2rem 0 1rem;
}

.glossary-tools label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-weight: 700;
}

.glossary-tools input {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.88);
  color: var(--ink);
  font: 500 1rem/1.3 var(--sans);
}

.glossary-tools input:focus-visible {
  outline: 3px solid rgba(44, 110, 143, 0.36);
  outline-offset: 3px;
}

.glossary-nav {
  position: sticky;
  z-index: 4;
  top: 78px;
  margin: 0 0 2rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.94);
  box-shadow: 0 8px 26px rgba(77, 42, 22, 0.07);
  backdrop-filter: blur(14px);
}

.glossary-nav a {
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

.glossary-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.glossary-group {
  margin: 3.5rem 0;
}

.glossary-list,
.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.glossary-entry,
.question-entry,
.pattern-card {
  position: relative;
  padding: clamp(1.2rem, 3vw, 1.65rem);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.8);
  box-shadow: 0 10px 32px rgba(77, 42, 22, 0.05);
}

.glossary-entry[hidden],
.glossary-group[hidden] {
  display: none;
}

.glossary-heading,
.pattern-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.glossary-entry h3,
.question-entry h3,
.pattern-card h2 {
  margin-top: 0;
}

.glossary-entry p,
.question-entry p,
.pattern-card dd {
  color: #48372d;
}

.glossary-entry .boundary {
  margin-bottom: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.term-kind {
  flex: 0 0 auto;
  border-color: var(--border-strong);
  background: rgba(242, 232, 221, 0.72);
  color: var(--ink-soft);
}

.glossary-entry > .text-link {
  display: inline-block;
  margin-top: 1rem;
}

.term-kind.term-group-the-movement {
  border-color: rgba(194, 93, 50, 0.3);
  background: rgba(194, 93, 50, 0.12);
  color: #7d3219;
}

.term-kind.term-group-sleep-and-recovery {
  border-color: rgba(108, 95, 199, 0.3);
  background: rgba(108, 95, 199, 0.12);
  color: #4d438a;
}

.term-kind.term-group-food-and-gut {
  border-color: rgba(53, 97, 74, 0.3);
  background: rgba(53, 97, 74, 0.12);
  color: #29563f;
}

.term-kind.term-group-movement {
  border-color: rgba(38, 112, 145, 0.3);
  background: rgba(38, 112, 145, 0.12);
  color: #245d76;
}

.term-kind.term-group-mind-and-attention {
  border-color: rgba(123, 82, 157, 0.3);
  background: rgba(123, 82, 157, 0.12);
  color: #633f80;
}

.term-kind.term-group-cycle-and-hormones {
  border-color: rgba(170, 78, 117, 0.3);
  background: rgba(170, 78, 117, 0.12);
  color: #823b59;
}

.term-kind.term-group-appearance-and-care {
  border-color: rgba(194, 75, 99, 0.3);
  background: rgba(194, 75, 99, 0.12);
  color: #8e3749;
}

.term-kind.term-group-environment-and-longevity {
  border-color: rgba(36, 130, 118, 0.3);
  background: rgba(36, 130, 118, 0.12);
  color: #1d625a;
}

.permalink {
  position: absolute;
  right: 0.85rem;
  bottom: 0.65rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.question-group {
  margin: 3.5rem 0;
}

.question-entry a:not(.text-link) {
  color: inherit;
  text-decoration-color: rgba(201, 79, 36, 0.35);
  text-underline-offset: 0.16em;
}

.text-link {
  font-weight: 700;
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.pattern-card dl,
.pattern-card dd {
  margin: 0;
}

.pattern-card dl > div {
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}

.pattern-card dt {
  margin-bottom: 0.28rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.pattern-card dd {
  font-size: 0.95rem;
}

.claim-table table {
  min-width: 1040px;
}

.claim-table td:first-child {
  min-width: 260px;
  color: var(--ink);
  font-weight: 700;
}

/* Free tools (calculators). Everything computes client-side; these styles just
   keep the form legible and the results scannable. */
.calc {
  margin: 1.8rem 0 2.2rem;
  padding: 1.5rem 1.4rem 1.7rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.72);
}

.calc > h2:first-child {
  margin-top: 0;
}

.calc-units {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.calc-units legend {
  padding: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.calc-units label {
  margin-right: 1.1rem;
  font-size: 0.92rem;
}

.calc-grid {
  display: grid;
  gap: 0.9rem 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.calc-field {
  display: flex;
  margin: 0;
  flex-direction: column;
  gap: 0.35rem;
}

.calc-field[hidden] {
  display: none;
}

.calc-field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.calc-field input,
.calc-field select {
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(39, 31, 25, 0.25);
  border-radius: 12px;
  background: #fff;
  font: 15px/1.3 "DM Sans", system-ui, sans-serif;
  color: #271f19;
}

.calc-field input:focus-visible,
.calc-field select:focus-visible,
.calc button:focus-visible {
  outline: 3px solid #2c6e8f;
  outline-offset: 2px;
}

.calc-actions {
  margin: 1.2rem 0 0;
}

.calc-error:not(:empty) {
  margin: 0.8rem 0 0;
  color: #a53d1b;
  font-size: 0.9rem;
  font-weight: 600;
}

.calc-results {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.calc-note {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.6;
}

/* GLOBAL table text rule. .article-body sets overflow-wrap:anywhere — correct
   for long URLs in prose, wrong inside tables, where it splits ordinary labels
   mid-word ("On devic e", "DIME NSIO N"). Every table cell opts back down to
   break-word, and short label columns get a width floor so they cannot collapse
   when the neighbouring prose columns compete for space. Applies to all tables,
   not per-table classes — the failure mode is generic. */
.table-wrap th,
.table-wrap td {
  overflow-wrap: break-word;
  word-break: normal;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  min-width: 140px;
}

.comparison-table table {
  min-width: 860px;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  min-width: 150px;
  color: var(--ink);
  font-weight: 700;
}

.status-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 2.5rem;
}

.status-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.72);
}

.status-row p {
  margin: 0;
}

.status.not-established,
.status.not-published {
  border-color: rgba(165, 61, 27, 0.22);
  background: rgba(201, 79, 36, 0.08);
  color: #8e361b;
}

.status.not-claimed {
  border-color: rgba(44, 110, 143, 0.22);
  background: rgba(44, 110, 143, 0.08);
  color: #245d77;
}

@media (max-width: 900px) {
  .nav-shell {
    padding: 0 22px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .site-nav {
    display: none;
  }

  .page-shell {
    display: block;
  }

  .toc,
  .side-card {
    position: static;
    margin-top: 2.5rem;
  }

  .grid,
  .grid.two,
  .glossary-list,
  .question-list,
  .pattern-grid {
    grid-template-columns: 1fr;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }

  .nav-download {
    min-height: 44px;
  }

  .brand {
    min-height: 44px;
  }

  .table-wrap {
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 560px) {
  .nav-shell {
    min-height: 60px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
    gap: 8px;
  }

  .brand {
    gap: 7px;
    font-size: 14px;
  }

  .brand img {
    width: 24px;
    height: 24px;
  }

  .nav-download {
    min-height: 44px;
    padding: 0 13px;
    gap: 6px;
    position: relative;
    isolation: isolate;
    background: transparent;
    font-size: 12px;
  }

  .nav-download::before {
    content: "";
    position: absolute;
    inset: 7px 0;
    z-index: -1;
    border-radius: 999px;
    background: var(--ink);
  }

  .nav-download-dot,
  .nav-download-label {
    position: relative;
    z-index: 1;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .page-shell,
  .wide-shell,
  .page-shell.single {
    width: calc(100% - 32px);
  }

  .hero {
    padding: 3rem 0 2.75rem;
  }

  h1 {
    margin-bottom: 1.1rem;
    font-size: clamp(2.45rem, 11vw, 3.35rem);
    line-height: 1.02;
  }

  h2 {
    margin-top: 2.65rem;
    font-size: clamp(1.85rem, 8.5vw, 2.5rem);
  }

  h3 {
    margin-top: 1.8rem;
  }

  .lede {
    font-size: 1.02rem;
    line-height: 1.62;
  }

  .page-shell {
    padding-bottom: 3.5rem;
  }

  .article-body p,
  .article-body li {
    font-size: 1rem;
  }

  .direct-answer,
  .callout,
  .card,
  .section-band {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .grid {
    gap: 0.8rem;
  }

  .card-link:hover {
    transform: none;
  }

  .table-wrap {
    margin-right: 0;
    margin-left: 0;
    border-radius: 14px;
  }

  table {
    min-width: 560px;
  }

  th,
  td {
    padding: 0.78rem 0.82rem;
  }

  .numbered-steps > li {
    padding-left: 3.25rem;
  }

  .numbered-steps > li::before {
    width: 2.45rem;
    height: 2.45rem;
  }

  .hero-image {
    width: calc(100% - 32px);
    margin-bottom: 3rem;
    border-radius: 20px;
  }

  .citation-band {
    margin-top: 3.5rem;
  }

  .citation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .citation-actions .button {
    width: 100%;
  }

  .footer-shell {
    width: calc(100% - 32px);
    padding: 2rem 0 max(2.25rem, env(safe-area-inset-bottom));
    gap: 1.35rem;
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .footer-links a {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 5px 0;
    overflow-wrap: anywhere;
  }

  .footer-socials {
    gap: 0.4rem;
  }

  .footer-socials a {
    min-height: 44px;
    padding-inline: 0.8rem;
  }

  .glossary-nav {
    position: static;
  }

  .glossary-heading,
  .pattern-card-top,
  .status-row {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .brand {
    width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  .brand span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Pre-footer waitlist capture, rendered by footer() on every generated page.
   /download/ opts out (it carries the full-size form). Accent values match
   the /download/ form so the two capture surfaces read as one system. */
.footer-waitlist {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 250, 243, 0.72);
}

.footer-waitlist + .site-footer {
  margin-top: 0;
}

.footer-waitlist-shell {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 2.4rem;
  text-align: center;
}

.footer-waitlist-title {
  margin: 0 0 0.35rem;
  font: 700 1.2rem/1.3 "Playfair Display", serif;
}

.footer-waitlist-copy {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-waitlist-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 0.6rem;
}

.footer-waitlist-form input[type="email"] {
  min-width: min(300px, 78vw);
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid rgba(39, 31, 25, 0.25);
  border-radius: 999px;
  background: #fff;
  font: 15px/1.2 "DM Sans", system-ui, sans-serif;
  color: #271f19;
}

.footer-waitlist-form input[type="email"]:focus-visible,
.footer-waitlist-form button:focus-visible {
  outline: 3px solid #2c6e8f;
  outline-offset: 2px;
}

.footer-waitlist-form button {
  min-height: 46px;
  padding: 10px 24px;
  border: 1px solid #c94f24;
  border-radius: 999px;
  background: #c94f24;
  color: #fff;
  font: 700 14px/1 "DM Sans", system-ui, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.footer-waitlist-form button[disabled] {
  opacity: 0.6;
  cursor: wait;
}

/* Honeypot, hidden from sight but not from bots. `left:-9999px` was
   direction-hostile: harmless in LTR, but under a genuinely RTL document it
   extends the scrollable area and the page gains ~10,000px of horizontal
   scroll. The clip technique hides in place and creates no overflow either
   way. */
.footer-waitlist-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.footer-waitlist-status {
  min-height: 20px;
  margin: 0 0 0.4rem;
  font: 600 13.5px/1.5 "DM Sans", system-ui, sans-serif;
  color: #2c6e8f;
}

.footer-waitlist-fine {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

@media (max-width: 560px) {
  .footer-waitlist-shell {
    width: calc(100% - 32px);
    padding: 1.9rem 0 2.1rem;
  }

  .footer-waitlist-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-waitlist-form input[type="email"],
  .footer-waitlist-form button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .footer-waitlist-form input[type="email"] {
    font-size: 16px;
  }
}

@media (hover: none) {
  .button:hover,
  .nav-download:hover,
  .card-link:hover {
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .footer-waitlist,
  .toc,
  .hero-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero {
    padding: 1.5rem 0 2rem;
  }

  .page-shell,
  .page-shell.single {
    display: block;
    width: 100%;
    padding: 0;
  }

  .article-body p,
  .article-body li {
    color: #111;
  }
}

/* See homepage-waitlist.css — visually hidden without the RTL-breaking
   `left:-9999px` offset. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
