/*
Theme Name: Kousentape Kenniscentrum
Theme URI: https://www.kousentape.nl/
Author: FRAMO sport B.V.
Author URI: https://www.framo.nl/
Description: Mobile-first kennisthema voor kousentape.nl, gericht op cut socks, Premier ProWrap 75 mm en KNVB/IFAB-spelregels.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2.0 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kousentape-kenniscentrum
*/

:root {
  --paper: #f2eee5;
  --paper-2: #fffdf8;
  --ink: #151515;
  --muted: #665f56;
  --red: #dc3b31;
  --wine: #671528;
  --yellow: #f1d447;
  --blue: #234dba;
  --line: rgba(21, 21, 21, .2);
  --shadow: 10px 10px 0 #151515;
  --wrap: min(1180px, calc(100% - 40px));
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: repeating-linear-gradient(0deg, transparent 0 4px, rgba(0,0,0,.025) 4px 5px);
  z-index: 10;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }

.wrap { width: var(--wrap); margin-inline: auto; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.prototype-bar {
  background: var(--ink);
  color: #fff;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.prototype-bar__inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.prototype-bar__inner span:last-child { color: var(--yellow); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 238, 229, .94);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(12px);
}

.header-grid {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}

.logo__mark {
  width: 37px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--ink);
  font-weight: 900;
  transform: rotate(-3deg);
}

.logo strong { font-size: 1.25rem; letter-spacing: -.05em; }
.logo small { font-size: 1rem; font-weight: 400; }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

.main-nav a {
  position: relative;
  font-size: .84rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 3px;
  background: var(--red);
  transition: right .2s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after { right: 0; }

.header-source {
  padding: 10px 13px;
  border: 1px solid var(--ink);
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.header-source:hover { background: var(--ink); color: #fff; }

.menu-button {
  display: none;
  width: 46px;
  height: 42px;
  border: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
}

.menu-button > span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}

.hero::after {
  content: "75";
  position: absolute;
  right: -45px;
  top: -120px;
  color: transparent;
  -webkit-text-stroke: 2px rgba(21, 21, 21, .08);
  font-size: clamp(260px, 34vw, 520px);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: 6vw;
  align-items: center;
  min-height: 675px;
  padding-block: 78px 88px;
}

.index-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--wine);
  font-family: "Courier New", monospace;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.index-label::before {
  content: "";
  width: 34px;
  height: 3px;
  background: currentColor;
}

.index-label--light { color: var(--yellow); }

.hero h1,
.section h2,
.quiet-cta h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero h1 { max-width: 760px; font-size: clamp(3.2rem, 6.3vw, 6.3rem); }
.hero h1 em { color: var(--wine); font-family: Georgia, serif; font-weight: 400; }

.lead {
  max-width: 680px;
  margin: 28px 0 34px;
  color: #413c36;
  font-size: 1.12rem;
  line-height: 1.7;
}

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--ink);
  background: var(--paper-2);
  box-shadow: 7px 7px 0 rgba(21,21,21,.12);
}

.fact-row div { padding: 19px; border-right: 1px solid var(--line); }
.fact-row div:last-child { border-right: 0; }
.fact-row strong { display: block; font-size: 2rem; line-height: 1; }
.fact-row span { display: block; margin-top: 7px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }

.system-check {
  position: relative;
  padding: 28px;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.system-check::before {
  content: "";
  position: absolute;
  width: 74px;
  height: 18px;
  left: 50%;
  top: -11px;
  background: rgba(241, 212, 71, .82);
  transform: translateX(-50%) rotate(-2deg);
}

.system-check__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-family: "Courier New", monospace;
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.system-check__head b {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
}

.system-check h2 { margin: 0 0 20px; font-size: 1.55rem; line-height: 1.08; }

.check-options { display: grid; gap: 10px; }

.check-option {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  align-items: center;
  width: 100%;
  padding: 13px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.check-option:hover,
.check-option:focus-visible { border-color: var(--ink); }
.check-option.is-active { background: var(--yellow); border: 2px solid var(--ink); }

.option-glyph {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.check-option strong,
.check-option small { display: block; }
.check-option strong { font-size: .95rem; line-height: 1.25; }
.check-option small { margin-top: 3px; color: #514b44; font-size: .75rem; }

.check-result {
  margin-top: 18px;
  padding: 18px;
  background: var(--wine);
  color: #fff;
}

.check-result p { margin: 0 0 8px; }
.check-result > p:first-child { color: #f2c4cb; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.check-result h3 { margin: 0 0 8px; font-size: 1.16rem; line-height: 1.25; }
.check-result a { display: inline-block; margin-top: 6px; color: var(--yellow); font-size: .82rem; font-weight: 800; }

.definition-strip { background: var(--ink); color: #fff; }
.definition-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.definition-grid p { margin: 0; padding: 24px; border-right: 1px solid rgba(255,255,255,.16); }
.definition-grid p:last-child { border-right: 0; }
.definition-grid span,
.definition-grid strong { display: block; }
.definition-grid span { color: #aaa49a; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; }
.definition-grid strong { margin-top: 3px; font-size: .95rem; }

.section { padding-block: 105px; }
.section-heading { max-width: 790px; margin-bottom: 55px; }
.section-heading--wide { max-width: 930px; }
.section-heading h2 { font-size: clamp(2.7rem, 5vw, 5.4rem); }
.section-heading > p:last-child { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 1.05rem; }

.system-section { background: var(--paper-2); }
.system-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: stretch; }

.layer-board {
  position: relative;
  min-height: 560px;
  padding: 60px 55px;
  display: grid;
  grid-template-rows: repeat(4, minmax(86px, 1fr));
  align-content: center;
  gap: 14px;
  overflow: hidden;
  background: #d7e04b;
  border: 3px solid var(--ink);
}

.layer-board::after {
  content: "CUT / SOCK / SYSTEM";
  position: absolute;
  right: -105px;
  bottom: 45px;
  color: rgba(21,21,21,.13);
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: -.05em;
  transform: rotate(-90deg);
}

.leg-line { position: absolute; left: 29px; top: 54px; bottom: 54px; width: 3px; background: var(--ink); }
.leg-line::before,
.leg-line::after { content: ""; position: absolute; left: -7px; width: 17px; height: 17px; background: var(--ink); border-radius: 50%; }
.leg-line::before { top: 0; }
.leg-line::after { bottom: 0; }

.layer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 86px;
  padding: 15px 19px;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(21,21,21,.22);
}

.layer > span { font-family: "Courier New", monospace; font-size: .8rem; font-weight: 900; }
.layer strong { font-size: 1.08rem; }
.layer small { color: var(--muted); font-size: .76rem; text-align: right; }
.layer--guard,
.layer--sleeve { width: 100%; margin-left: 0; }
.layer--wrap { color: #fff; background: var(--red); transition: background-color .2s ease; }
.layer--wrap small { color: #fff; }

.product-panel {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--ink);
  color: #fff;
  border: 3px solid var(--ink);
}

.product-panel__tag { font-family: "Courier New", monospace; color: var(--yellow); font-size: .76rem; font-weight: 900; }
.product-panel figure { margin: 24px 0 20px; }
.product-panel figure img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }
.product-panel figcaption { margin-top: 9px; color: #aaa49a; font-size: .7rem; line-height: 1.5; }
.product-panel dl { margin: auto 0 0; border-top: 1px solid rgba(255,255,255,.25); }
.product-panel dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.product-panel dt { color: #aaa49a; font-size: .78rem; }
.product-panel dd { margin: 0; font-size: .78rem; font-weight: 800; text-align: right; }

.color-section { padding-block: 0; color: #fff; background: var(--wine); border-block: 3px solid var(--ink); }
.color-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.color-copy { padding: 80px 8vw 80px 0; border-right: 1px solid rgba(255,255,255,.2); }
.color-copy h2 { max-width: 570px; font-size: clamp(3rem, 5vw, 5.4rem); }
.color-copy p:not(.index-label) { max-width: 570px; margin: 26px 0; color: #e6d4d8; }
.color-copy a { color: var(--yellow); font-weight: 800; }
.color-tool { padding: 80px 0 80px 8vw; align-self: center; }
.color-tool > p { margin-top: 0; font-weight: 800; }
.swatches { display: flex; gap: 12px; margin: 20px 0 32px; }
.swatch { width: 48px; height: 48px; border: 3px solid transparent; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px rgba(255,255,255,.4); }
.swatch.is-active { outline: 3px solid var(--yellow); outline-offset: 4px; }
.swatch--red { background: #e43b35; }
.swatch--blue { background: #1e55b8; }
.swatch--yellow { background: #f4c928; }
.swatch--black { background: #161616; }
.swatch--white { background: #f7f5ee; }

.match-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
  padding: 26px;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--yellow);
}

.match-card div { display: grid; gap: 6px; }
.match-card div span { height: 65px; background: var(--red); border: 2px solid var(--ink); transition: background-color .2s ease; }
.match-card div small { font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.match-card > b { align-self: center; font-size: 1.5rem; }
.match-card > strong { grid-column: 1 / -1; padding-top: 12px; color: #19643a; border-top: 1px solid var(--line); }
.color-tool > small { display: block; margin-top: 22px; color: #dac1c6; line-height: 1.55; }

.referee-section { background: var(--paper-2); }
.rule-context {
  display: grid;
  gap: 8px;
  margin-bottom: 34px;
  padding: 22px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(21,21,21,.18);
}
.rule-context strong { font-size: 1.08rem; }
.rule-context p { margin: 0; }
.rule-context small { color: #55490f; font-family: "Courier New", monospace; font-weight: 800; }
.referee-layout { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start; }
.referee-checklist { border-top: 3px solid var(--ink); }
.referee-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 2px solid var(--ink);
}
.referee-card > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--ink);
  font-family: "Courier New", monospace;
  font-weight: 900;
}
.referee-card h3 { margin: 0 0 8px; font-size: 1.12rem; line-height: 1.25; }
.referee-card p { margin: 0; color: var(--muted); }
.referee-note {
  padding: 28px 24px;
  color: #fff;
  background: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--red);
}
.referee-note h3 { margin: 0; font-size: 1.75rem; line-height: 1.12; }
.referee-note > p:not(.index-label) { color: #d2cdc5; }
.referee-note ul { margin: 22px 0; padding-left: 20px; }
.referee-note li { margin-block: 8px; }
.referee-note__links { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.25); }
.referee-note__links a { color: var(--yellow); font-weight: 900; }

.comparison-section { background: var(--paper); }
.comparison-table { border: 3px solid var(--ink); box-shadow: var(--shadow); }
.comparison-row { display: grid; grid-template-columns: .8fr .65fr 1.55fr; background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.comparison-row:last-child { border-bottom: 0; }
.comparison-row > * { padding: 20px 22px; border-right: 1px solid var(--line); }
.comparison-row > *:last-child { border-right: 0; }
.comparison-row--head { color: #fff; background: var(--ink); font-family: "Courier New", monospace; font-size: .76rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.comparison-row.is-highlighted { background: var(--yellow); }
.comparison-note { max-width: 830px; margin: 32px 0 0 auto; padding-left: 22px; border-left: 5px solid var(--red); color: var(--muted); }

.albert-section { padding-top: 0; background: var(--paper); }
.albert-card { display: grid; grid-template-columns: 170px 1fr; gap: 40px; align-items: center; padding: 45px; color: #fff; background: var(--blue); border: 3px solid var(--ink); }
.albert-number { width: 145px; aspect-ratio: 1; display: grid; place-items: center; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); font-size: 3.5rem; font-weight: 900; transform: rotate(-4deg); }
.albert-card .index-label { color: var(--yellow); }
.albert-card h2 { max-width: 800px; font-size: clamp(2.2rem, 4vw, 4.4rem); }
.albert-card p:not(.index-label) { max-width: 820px; color: #e2e9ff; }
.albert-card small { color: #aebef2; }

.source-section { background: var(--paper-2); border-block: 2px solid var(--ink); }
.source-grid { display: grid; grid-template-columns: 1fr .85fr; gap: 80px; align-items: center; }
.source-grid h2 { font-size: clamp(2.6rem, 4.5vw, 4.8rem); }
.source-grid p:not(.index-label) { max-width: 650px; color: var(--muted); }
.source-links { border-top: 2px solid var(--ink); }
.source-links a { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 21px 0; border-bottom: 2px solid var(--ink); font-weight: 800; text-decoration: none; }
.source-links a:hover { color: var(--wine); }
.source-links span { font-family: "Courier New", monospace; color: var(--red); }

.faq-section { background: var(--paper); }
.faq-grid { display: grid; grid-template-columns: .62fr 1fr; gap: 90px; }
.faq-intro { position: sticky; top: 120px; align-self: start; }
.faq-intro h2 { font-size: clamp(2.7rem, 4.5vw, 4.8rem); }
.faq-intro > p:last-child { color: var(--muted); }
.faq-list { border-top: 3px solid var(--ink); }
.faq-list details { border-bottom: 2px solid var(--ink); }
.faq-list summary { position: relative; padding: 22px 55px 22px 0; font-size: 1.05rem; font-weight: 900; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 5px; top: 15px; font-size: 1.7rem; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 55px 24px 0; color: var(--muted); }

.quiet-cta { padding-block: 72px; color: #fff; background: var(--ink); }
.quiet-cta__inner { display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: center; }
.quiet-cta span { color: var(--yellow); font-family: "Courier New", monospace; font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.quiet-cta h2 { max-width: 750px; margin-top: 9px; font-size: clamp(2rem, 3.5vw, 3.7rem); }
.quiet-cta p { max-width: 680px; color: #b7b2aa; }
.cta-button { padding: 17px 22px; background: var(--yellow); color: var(--ink); border: 2px solid var(--yellow); font-weight: 900; text-decoration: none; text-align: center; }
.cta-button:hover { background: transparent; color: var(--yellow); }

.site-footer { padding-block: 45px; background: var(--paper-2); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 55px; }
.footer-grid strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-grid p { margin: 8px 0 0; color: var(--muted); font-size: .83rem; }

/* Mobile-first: the phone layout is the default; larger screens only add space and columns. */
:root { --wrap: min(100% - 28px, 680px); }
.prototype-bar__inner span:last-child { display: none; }
.site-header { position: relative; }
.header-grid { min-height: 68px; grid-template-columns: auto 1fr auto; gap: 14px; }
.header-source { display: none; }
.menu-button { display: block; width: 46px; height: 44px; }
.main-nav {
  display: none;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-bottom: 18px;
}
.main-nav.is-open { display: flex; }
.main-nav a { min-height: 44px; padding: 12px 0; border-top: 1px solid var(--line); }
.main-nav a::after { display: none; }
.hero-grid { grid-template-columns: 1fr; gap: 55px; min-height: 0; padding-block: 56px 64px; }
.hero h1 { font-size: 3.05rem; }
.system-check { width: calc(100% - 8px); margin-right: 8px; padding: 21px; justify-self: end; }
.check-option { grid-template-columns: 38px 1fr; min-height: 56px; }
.check-option strong { font-size: 1rem; }
.check-option small { font-size: .875rem; }
.fact-row { grid-template-columns: 1fr; }
.fact-row div { border-right: 0; border-bottom: 1px solid var(--line); }
.fact-row div:last-child { border-bottom: 0; }
.definition-grid { grid-template-columns: 1fr; }
.definition-grid p { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.definition-grid p:last-child { border-bottom: 0; }
.section { padding-block: 75px; }
.system-layout,
.color-layout,
.source-grid,
.faq-grid { grid-template-columns: 1fr; }
.layer-board { min-height: 500px; padding: 38px 17px 38px 35px; }
.layer { grid-template-columns: 34px 1fr; }
.layer small { grid-column: 2; text-align: left; }
.layer--guard,
.layer--sleeve { width: 100%; margin-left: 0; }
.color-copy { padding: 70px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
.color-tool { padding: 70px 0; }
.swatches { flex-wrap: wrap; }
.swatch { width: 48px; height: 48px; }
.match-card { grid-template-columns: 1fr; gap: 10px; padding: 18px; }
.match-card > b { display: none; }
.match-card > strong { grid-column: 1; }
.comparison-row { grid-template-columns: 1fr; }
.comparison-row--head { display: none; }
.comparison-row > * { padding: 12px 18px; border-right: 0; }
.comparison-row strong { padding-top: 20px; font-size: 1.15rem; }
.comparison-row span:last-child { padding-bottom: 20px; color: var(--muted); }
.albert-card { grid-template-columns: 1fr; padding: 30px 22px; }
.albert-number { width: 105px; }
.faq-intro { position: static; }
.quiet-cta__inner { grid-template-columns: 1fr; }
.cta-button { min-height: 52px; justify-self: stretch; }
.footer-grid { grid-template-columns: 1fr; gap: 25px; }

@media (min-width: 501px) {
  .hero h1 { font-size: clamp(3rem, 13vw, 5rem); }
  .system-check { width: 95%; padding: 28px; }
  .check-option { grid-template-columns: 42px 1fr; }
  .definition-grid { grid-template-columns: 1fr 1fr; }
  .definition-grid p { border-right: 1px solid rgba(255,255,255,.16); }
  .definition-grid p:nth-child(2) { border-right: 0; }
  .definition-grid p:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.16); }
  .definition-grid p:nth-child(n+3) { border-bottom: 0; }
  .layer-board { padding: 38px 30px 38px 44px; }
  .match-card { grid-template-columns: 1fr auto 1fr; gap: 16px; padding: 26px; }
  .match-card > b { display: block; }
  .match-card > strong { grid-column: 1 / -1; }
  .albert-card { padding: 45px; }
  .cta-button { justify-self: start; }
}

@media (min-width: 801px) {
  :root { --wrap: min(1180px, calc(100% - 40px)); }
  .prototype-bar__inner span:last-child { display: inline; }
  .site-header { position: sticky; }
  .header-grid { min-height: 78px; grid-template-columns: auto auto; gap: 34px; justify-content: space-between; }
  .menu-button { display: none; }
  .main-nav {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding-bottom: 16px;
  }
  .main-nav a { min-height: 0; padding: 0; border-top: 0; }
  .main-nav a::after { display: block; }
  .hero-grid { min-height: 675px; padding-block: 78px 88px; }
  .hero h1 { font-size: clamp(3.2rem, 6.3vw, 6.3rem); }
  .system-check { width: min(620px, 96%); margin-right: 0; }
  .fact-row { grid-template-columns: repeat(3, 1fr); }
  .fact-row div { border-right: 1px solid var(--line); border-bottom: 0; }
  .fact-row div:last-child { border-right: 0; }
  .section { padding-block: 105px; }
  .system-layout { grid-template-columns: 1.25fr .75fr; }
  .color-layout { grid-template-columns: 1fr 1fr; }
  .source-grid { grid-template-columns: 1fr .85fr; gap: 50px; }
  .faq-grid { grid-template-columns: .62fr 1fr; gap: 50px; }
  .layer-board { min-height: 560px; padding: 60px 55px; }
  .layer { grid-template-columns: 44px 1fr auto; }
  .layer small { grid-column: auto; text-align: right; }
  .color-copy { padding: 80px 8vw 80px 0; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 0; }
  .color-tool { padding: 80px 0 80px 8vw; }
  .referee-layout { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 42px; }
  .referee-note { position: sticky; top: 120px; padding: 34px; }
  .comparison-row { grid-template-columns: .8fr .65fr 1.55fr; }
  .comparison-row--head { display: grid; }
  .comparison-row > * { padding: 20px 22px; border-right: 1px solid var(--line); }
  .comparison-row > *:last-child { border-right: 0; }
  .comparison-row strong { padding: 20px 22px; font-size: inherit; }
  .comparison-row span:last-child { padding: 20px 22px; color: inherit; }
  .albert-card { grid-template-columns: 170px 1fr; }
  .albert-number { width: 145px; }
  .faq-intro { position: sticky; }
  .quiet-cta__inner { grid-template-columns: 1fr auto; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 55px; }
}

@media (min-width: 1041px) {
  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 6vw; }
  .system-check { width: auto; justify-self: auto; }
  .definition-grid { grid-template-columns: repeat(4, 1fr); }
  .definition-grid p { border-right: 1px solid rgba(255,255,255,.16); border-bottom: 0; }
  .definition-grid p:last-child { border-right: 0; }
  .source-grid { gap: 80px; }
  .faq-grid { gap: 90px; }
}

@media (min-width: 1201px) {
  .header-grid { grid-template-columns: auto 1fr auto; justify-content: normal; }
  .main-nav { grid-column: auto; grid-row: auto; padding-bottom: 0; }
  .header-source { display: block; }
}

/* Text containment: labels and explanations remain inside their own panels. */
main *,
.site-footer * {
  min-inline-size: 0;
}

main :where(h1, h2, h3, p, dt, dd, strong, small, a, span),
.site-footer :where(p, strong, small, a, span) {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.index-label,
.system-check__head {
  flex-wrap: wrap;
}

.system-check,
.check-option,
.definition-grid p,
.layer,
.product-panel,
.match-card,
.rule-context,
.referee-card,
.referee-note,
.comparison-row,
.albert-card,
.source-links a,
.faq-list details {
  block-size: auto;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}


/* WordPress integration */
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { width: auto; max-width: 190px; max-height: 54px; }
.admin-bar .site-header { top: 32px; }

.generic-content {
  min-height: 65vh;
  padding-block: clamp(48px, 8vw, 100px);
}

.generic-content__card {
  max-width: 860px;
  padding: clamp(24px, 5vw, 56px);
  border: 2px solid var(--ink);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.generic-content__card h1 {
  margin-top: 0;
  font-size: clamp(2.3rem, 7vw, 4.7rem);
  line-height: 1;
  letter-spacing: -.05em;
}

.generic-content__card h2,
.generic-content__card h3 { line-height: 1.15; }
.generic-content__card p,
.generic-content__card li { overflow-wrap: anywhere; }
.generic-content__card a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
