/* ==========================================================================
   Score World Goals — independent player guide
   Design seed: S04 Editorial Studio (matchday-programme edition)
   Light theme only. Plain CSS, no frameworks.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Palette taken from the Score! icon: turf green, Score! red, ball charcoal and silver, banner white */
  --mist: #F3F6F3;         /* page background: banner white */
  --paper: #FFFFFF;        /* raised surfaces */
  --pitch: #3D6A2B;        /* primary: turf green */
  --pitch-deep: #2A4C1D;   /* primary hover / headings on tint */
  --pitch-tint: #E9F0E3;   /* light turf surface */
  --pitch-line: #C5D6BA;   /* chalk-line borders on tint */
  --sky: #5E7551;          /* supporting: muted turf, labels only */
  --sky-tint: #EEF0EA;     /* ball-silver surface */
  --card: #C8232C;         /* accent: Score! red. CTAs, active states, focus */
  --card-deep: #A9161C;
  --card-edge: #7E1015;
  --red-tint: #FBECEC;
  --ink: #1B1C14;          /* body text: ball charcoal */
  --ink-2: #4E544B;        /* secondary text */
  --rule: #D6D8D1;         /* thin rules: ball silver */
  --warn-tint: #F6EFD8;

  --display: "Big Shoulders", "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --wrap: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --header-h: 80px;

  --r-s: 6px;
  --r-m: 14px;
  --r-l: 26px;

  --shadow-lift: 0 18px 40px -24px rgba(15, 74, 48, .35);
  --shadow-edge: 0 3px 0 var(--card-edge);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* Smooth scrolling is handled in script.js so arrival at #anchors can be instant and offset correctly. */
  scroll-padding-top: 78px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: var(--pitch); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pitch-deep); text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .005em;
  color: var(--ink);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7.6vw, 6.6rem); font-weight: 900; line-height: .9; }
h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
h3 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); line-height: 1.08; }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--card);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--card); color: #fff; padding: .6rem 1rem;
  font-family: var(--display); font-weight: 800; font-size: 1.1rem; border-radius: var(--r-s);
}
.skip-link:focus { top: 1rem; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--display); font-weight: 800; font-size: 1.22rem; letter-spacing: .02em;
  line-height: 1; padding: .85em 1.35em .8em;
  border-radius: var(--r-s); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn-accent { background: var(--card); color: #fff; box-shadow: var(--shadow-edge); }
.btn-accent:hover { color: #fff; background: var(--card-deep); transform: translateY(-2px); box-shadow: 0 5px 0 var(--card-edge); text-decoration: none; }
.btn-accent:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--card-edge); }
.btn-line { border-color: var(--pitch); color: var(--pitch); background: transparent; }
.btn-line:hover { background: var(--pitch); color: #fff; text-decoration: none; }
.btn-big { font-size: 1.45rem; padding: .95em 1.6em .9em; }

/* ---------- 4. Header ---------- */
#site-header { display: block; min-height: var(--header-h); }

.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(246, 249, 245, .94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-head.is-scrolled { border-bottom-color: var(--rule); box-shadow: 0 10px 30px -26px rgba(19, 34, 26, .5); }


.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 78px; transition: min-height .25s ease;
}
.site-head.is-scrolled .masthead { min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 2px 6px -2px rgba(27, 28, 20, .45); }
.brand-word { font-family: var(--display); font-weight: 900; font-size: 1.7rem; line-height: .9; letter-spacing: .01em; }
.brand-word small { display: block; font-family: var(--text); font-weight: 400; font-size: .72rem; letter-spacing: 0; color: var(--ink-2); margin-top: .25rem; }

.primary-nav { display: flex; align-items: center; gap: 1.6rem; }
.primary-nav ul { display: flex; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.primary-nav ul a {
  position: relative; display: inline-block; padding: .4rem 0;
  font-family: var(--display); font-weight: 700; font-size: 1.18rem; letter-spacing: .02em;
  color: var(--ink); text-decoration: none;
}
.primary-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--card); transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.primary-nav ul a:hover::after,
.primary-nav ul a.is-active::after,
.primary-nav ul a[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav ul a.is-active, .primary-nav ul a[aria-current="page"] { color: var(--pitch-deep); }

.menu-toggle {
  display: none; align-items: center; gap: .5rem;
  background: transparent; border: 2px solid var(--ink); border-radius: var(--r-s);
  padding: .5rem .75rem; font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--ink); cursor: pointer;
}
.menu-toggle .bars { width: 20px; height: 14px; position: relative; }
.menu-toggle .bars span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.menu-toggle .bars span:nth-child(1) { top: 0; }
.menu-toggle .bars span:nth-child(2) { top: 6px; }
.menu-toggle .bars span:nth-child(3) { top: 12px; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 5. Shared section scaffolding ---------- */
main { display: block; }
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head p { color: var(--ink-2); font-size: 1.12rem; max-width: 40rem; }
.section-head.is-right { margin-left: auto; text-align: right; }
.section-head.is-right p { margin-left: auto; }
.lede { font-size: clamp(1.18rem, 1.6vw, 1.38rem); line-height: 1.6; }
.muted { color: var(--ink-2); }

.surface-white { background: var(--paper); }
.surface-pitch { background: var(--pitch-tint); }
.surface-sky { background: var(--sky-tint); }

/* Scroll reveal (only active when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 6. Hero ---------- */
.hero { padding: clamp(2.2rem, 5vw, 4.2rem) 0 clamp(3rem, 6vw, 5rem); position: relative; }
.hero-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.4vw, 2.2rem); row-gap: 1.8rem;
}
.hero-title { grid-column: 1 / 10; margin: 0; }
.hero-title .line-2 { display: block; color: var(--pitch); }
.hero-title .line-3 { display: block; font-weight: 700; font-size: .5em; line-height: 1.05; margin-top: .25em; color: var(--ink-2); max-width: 22ch; }

.glance {
  grid-column: 10 / 13; grid-row: 1 / 2; align-self: end;
  border-top: 5px solid var(--ink); padding-top: .9rem; font-size: .95rem;
}
.glance h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.glance dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; }
.glance dt { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink-2); }
.glance dd { margin: 0; }

.hero-copy { grid-column: 1 / 6; padding-top: 1rem; }
.hero-copy .lede { margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.hero-note { font-size: .88rem; color: var(--ink-2); margin-top: 1.1rem; max-width: 34rem; }

.hero-figure {
  grid-column: 6 / 13; margin: 0;
  background: var(--paper); border-radius: var(--r-l); border: 1px solid var(--rule);
  padding: clamp(.8rem, 1.6vw, 1.3rem); box-shadow: var(--shadow-lift);
  transform: rotate(-1.2deg);
}
.hero-figure img { border-radius: calc(var(--r-l) - 10px); width: 100%; }
.hero-figure figcaption { font-size: .85rem; color: var(--ink-2); padding: .8rem .4rem .1rem; }

/* ---------- 7. About ---------- */
.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.about-article { grid-column: 1 / 8; }
.about-article h2 { max-width: 14ch; }
.about-article .lede { color: var(--ink); }
.about-article p { max-width: 64ch; }
.about-aside { grid-column: 9 / 13; position: relative; }
.about-aside figure { margin: 0 0 1.5rem; }
.about-aside figure img { border-radius: var(--r-m); border: 1px solid var(--rule); background: var(--paper); }
.pull {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.08;
  color: var(--pitch-deep); margin: 0; padding: 1.2rem 0 1.2rem 1.2rem; border-left: 6px solid var(--card);
}
.pull + p { font-size: .9rem; color: var(--ink-2); margin-top: .8rem; padding-left: 1.6rem; }

/* ---------- 8. Features: alternating editorial blocks ---------- */
.features-list { border-top: 2px solid var(--ink); }
.feature-row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 2fr);
  gap: clamp(1rem, 3vw, 3rem); padding-block: clamp(1.8rem, 3.5vw, 2.8rem);
  border-bottom: 1px solid var(--rule); align-items: start;
}
.feature-row h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0; }
.feature-row p { margin: 0; max-width: 58ch; }
.feature-row .glyph { justify-self: end; width: clamp(64px, 8vw, 104px); color: var(--pitch); }
.feature-row:nth-child(even) { grid-template-columns: minmax(0, 2fr) minmax(0, 6fr) minmax(0, 5fr); }
.feature-row:nth-child(even) .glyph { order: -1; justify-self: start; }
.feature-row:nth-child(even) h3 { order: 2; text-align: right; }
.feature-row:nth-child(even) p { order: 1; }

/* ---------- 9. How it works: large numbered columns ---------- */
.how-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: how; }
.how-col { padding: 0 clamp(1rem, 2vw, 1.8rem) 0; border-left: 1px solid var(--pitch-line); }
.how-col:first-child { border-left: 0; padding-left: 0; }
.how-num {
  display: block; font-family: var(--display); font-weight: 900; font-size: clamp(4.5rem, 9vw, 7.5rem); line-height: .85;
  color: transparent; -webkit-text-stroke: 2px var(--pitch); margin-bottom: .8rem;
}
.how-col:nth-child(2) { margin-top: 2.2rem; }
.how-col:nth-child(3) { margin-top: 4.4rem; }
.how-col:nth-child(4) { margin-top: 6.6rem; }
.how-col h3 { margin-bottom: .4rem; }
.how-col p { font-size: 1rem; color: var(--ink-2); }

/* ---------- 10. Guides preview: featured story + list ---------- */
.guides-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 3.5vw, 3.5rem); }
.story-feature { display: block; text-decoration: none; color: var(--ink); }
.story-feature:hover { color: var(--ink); text-decoration: none; }
.story-feature img { border-radius: var(--r-m); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .4s ease; }
.story-feature:hover img { transform: scale(1.015); }
.story-feature h3 { font-size: clamp(2rem, 3.4vw, 2.9rem); margin: 1.1rem 0 .5rem; }
.story-feature:hover h3 { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--card); text-underline-offset: .12em; }
.story-feature p { color: var(--ink-2); max-width: 56ch; }
.story-kind { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--sky); }

.story-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.story-list li { border-bottom: 1px solid var(--rule); }
.story-list a { display: block; padding: 1.2rem 0; text-decoration: none; color: var(--ink); }
.story-list a:hover h3 { color: var(--pitch); }
.story-list h3 { font-size: 1.55rem; margin: .1rem 0 .35rem; transition: color .2s ease; }
.story-list p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.all-guides { display: inline-block; margin-top: 1.4rem; font-family: var(--display); font-weight: 800; font-size: 1.2rem; }

/* ---------- 11. Use cases: typography only ---------- */
.uses { max-width: 1060px; }
.use-row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1rem, 3vw, 3rem);
  padding-block: 1.6rem; border-top: 1px solid var(--rule);
}
.use-row:last-child { border-bottom: 1px solid var(--rule); }
.use-row h3 { font-size: clamp(1.7rem, 2.8vw, 2.35rem); margin: 0; }
.use-row p { margin: 0; color: var(--ink-2); }

/* ---------- 12. Release information: programme colophon ---------- */
.release-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.release-intro p { color: var(--ink-2); }
.colophon { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-m); overflow: hidden; }
.colophon-head { background: var(--sky-tint); padding: 1rem 1.4rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
.colophon-head h3 { margin: 0; font-size: 1.6rem; }
.colophon-head span { font-size: .88rem; color: var(--ink-2); }
.colophon dl { margin: 0; display: grid; grid-template-columns: minmax(9rem, 2fr) minmax(0, 5fr); }
.colophon dt, .colophon dd { padding: .8rem 1.4rem; border-bottom: 1px solid var(--rule); margin: 0; }
.colophon dt { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink-2); }
.colophon dl > :nth-last-child(-n+2) { border-bottom: 0; }

/* ---------- 13. Download band ---------- */
.download-band { position: relative; overflow: hidden; }
.download-band::before {
  content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1;
  border: 2px solid var(--pitch-line); border-radius: 50%; pointer-events: none;
}
.download-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: center; }
.download-visual img { width: 100%; max-width: 440px; margin-inline: auto; }
.download-copy h2 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); color: var(--pitch-deep); }
.download-copy > p { max-width: 54ch; }
.dl-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 1.6rem 0 2rem; border-top: 2px solid var(--pitch); }
.dl-facts div { padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--pitch-line); }
.dl-facts dt { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--pitch-deep); }
.dl-facts dd { margin: 0; font-size: .95rem; }
.dl-note { font-size: .88rem; color: var(--ink-2); margin-top: 1.2rem; max-width: 56ch; }

/* ---------- 14. Compatibility table ---------- */
.compat-wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.compat-wrap .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 1rem); }
.table-scroll { overflow-x: auto; border-radius: var(--r-s); background: var(--paper); border: 1px solid var(--rule); }
.compat-table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: .97rem; }
.compat-table caption { text-align: left; padding: 1rem 1.2rem; font-size: .88rem; color: var(--ink-2); caption-side: bottom; border-top: 1px solid var(--rule); }
.compat-table th, .compat-table td { text-align: left; padding: 1rem 1.2rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.compat-table thead th { font-family: var(--display); font-weight: 800; font-size: 1.15rem; background: var(--mist); }
.compat-table th:first-child { width: 30%; }
.compat-table th:nth-child(2) { width: 22%; }
.compat-table tbody th { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.status { display: inline-block; font-family: var(--display); font-weight: 700; font-size: .98rem; padding: .2rem .6rem; border-radius: 4px; white-space: nowrap; }
.status-ok { background: var(--pitch-tint); color: var(--pitch-deep); }
.status-check { background: var(--warn-tint); color: #5C4A0E; }
.status-no { background: var(--red-tint); color: #7A1A1F; }

/* ---------- 15. Pros and cons: editorial comparison ---------- */
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.pc-grid::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--ink); }
.pc-col { padding: 0 clamp(1.2rem, 4vw, 3.5rem); }
.pc-col:first-child { padding-left: 0; }
.pc-col:last-child { padding-right: 0; }
.pc-col h3 { font-size: clamp(2rem, 3.6vw, 3rem); }
.pc-col ul { list-style: none; padding: 0; margin: 0; }
.pc-col li { padding: .9rem 0 .9rem 2rem; border-top: 1px solid var(--rule); position: relative; }
.pc-col li::before { position: absolute; left: 0; top: .85rem; font-family: var(--display); font-weight: 900; font-size: 1.4rem; line-height: 1; }
.pc-pros li::before { content: "+"; color: var(--pitch); }
.pc-cons li::before { content: "\2212"; color: var(--card); }
.pc-col li strong { font-weight: 600; }

/* ---------- 16. Safety notice: checklist callout ---------- */
.safety-box {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem);
  background: var(--red-tint); border: 2px solid var(--ink); border-radius: var(--r-s);
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: 10px 10px 0 var(--card);
}
.safety-box h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: .9rem; padding: .7rem 0; border-bottom: 1px dashed rgba(19, 34, 26, .25); }
.checklist li:last-child { border-bottom: 0; }
.checklist svg { width: 24px; height: 24px; color: var(--pitch); margin-top: .2rem; }

/* ---------- 17. Installation: vertical procedure ---------- */
.install-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.procedure { list-style: none; margin: 0; padding: 0; counter-reset: step; position: relative; }
.procedure::before { content: ""; position: absolute; left: 27px; top: 10px; bottom: 30px; width: 2px; background: var(--pitch-line); }
.procedure li { counter-increment: step; position: relative; padding: 0 0 2rem 84px; }
.procedure li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); border: 2px solid var(--pitch); color: var(--pitch);
  font-family: var(--display); font-weight: 900; font-size: 1.7rem;
}
.procedure h3 { margin: .45rem 0 .35rem; font-size: 1.55rem; }
.procedure p { margin: 0; }
.procedure .side-note { display: block; font-size: .9rem; font-style: italic; color: var(--ink-2); margin-top: .4rem; }
.install-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); background: var(--paper); border-radius: var(--r-l) var(--r-l) var(--r-l) 4px; padding: 1.8rem; border: 1px solid var(--rule); }
.install-aside h3 { font-size: 1.6rem; }
.install-aside code, .prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--sky-tint); padding: .15em .4em; border-radius: 4px; word-break: break-word; }

/* ---------- 18. Troubleshooting: reference rows ---------- */
.trouble-head, .trouble-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 5fr); gap: clamp(1rem, 2.5vw, 2.2rem); }
.trouble-head { font-family: var(--display); font-weight: 800; font-size: 1.15rem; padding-bottom: .7rem; border-bottom: 2px solid var(--ink); color: var(--ink-2); }
.trouble-row { padding: 1.3rem 0; border-bottom: 1px solid var(--rule); }
.trouble-row h3 { font-size: 1.4rem; margin: 0; }
.trouble-row p { margin: 0; font-size: .98rem; }
.trouble-row .cause { color: var(--ink-2); }
.trouble-label { display: none; }

/* ---------- 19. FAQ: editorial question index ---------- */
.faq-block { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 4rem); padding-block: 2.4rem; border-top: 2px solid var(--ink); }
.faq-block + .faq-block { margin-top: 1.5rem; }
.faq-cat h3 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: .6rem; }
.faq-cat p { color: var(--ink-2); font-size: .98rem; max-width: 30ch; }
.faq-cat { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
.faq-list { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item h4 { margin: 0; font-size: inherit; }
.faq-q {
  width: 100%; display: grid; grid-template-columns: 1fr 32px; gap: 1rem; align-items: center;
  text-align: left; background: none; border: 0; padding: 1.15rem 0; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.15; color: var(--ink);
}
.faq-q:hover { color: var(--pitch); }
.faq-icon { width: 32px; height: 32px; border-radius: 50%; border: 2px solid currentColor; position: relative; transition: background-color .2s ease, border-color .2s ease; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: currentColor; transform: translate(-50%, -50%); transition: transform .25s ease; }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-q[aria-expanded="true"] { color: var(--pitch-deep); }
.faq-q[aria-expanded="true"] .faq-icon { background: var(--card); border-color: var(--card); color: #fff; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-a { padding: 0 3rem 1.4rem 0; max-width: 66ch; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a.is-opening { animation: faqIn .3s ease; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 20. Footer ---------- */
#site-footer { display: block; }
.site-foot { background: var(--paper); border-top: 6px solid var(--pitch); margin-top: 0; }
.foot-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; align-items: end; padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; }
.foot-top, .foot-cols { background-repeat: no-repeat; background-position: center bottom; background-size: calc(100% - 2 * var(--gutter)) 1px; }
.foot-top { background-image: linear-gradient(var(--ink), var(--ink)); }
.foot-cols { background-image: linear-gradient(var(--rule), var(--rule)); }
.foot-word { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 8vw, 6.2rem); line-height: .85; margin: 0; color: var(--ink); }
.foot-word span { color: var(--pitch); }
.foot-desc { margin: 0; color: var(--ink-2); font-size: .98rem; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; padding-block: 2.2rem; }
.foot-cols h2 { font-size: 1.3rem; margin-bottom: .8rem; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { margin-bottom: .45rem; }
.foot-cols a { color: var(--ink); text-decoration: none; font-size: .97rem; }
.foot-cols a:hover { color: var(--pitch); text-decoration: underline; }
.plain-email { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--ink); user-select: all; word-break: break-all; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; padding-block: 1.3rem 1.8rem; font-size: .88rem; color: var(--ink-2); }
.foot-base p { margin: 0; }
.foot-base a { color: var(--ink); text-decoration: none; font-weight: 600; }
.foot-base a:hover { text-decoration: underline; }

.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90;
  width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--card-edge); background: var(--card); color: #fff;
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-edge);
  opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 22px; height: 22px; }

/* ---------- 21. Inner pages ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.crumbs { font-size: .9rem; margin-bottom: 1.4rem; color: var(--ink-2); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.crumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--rule); }
.crumbs a { color: var(--ink-2); }
.page-head h1 { font-size: clamp(2.8rem, 6.6vw, 5.4rem); max-width: 16ch; }
.page-head .lede { max-width: 44rem; color: var(--ink-2); }

.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.6rem 0; padding: .4rem 0 .4rem 1.3rem; border-left: 5px solid var(--card); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--display); font-weight: 800; font-size: 1.05rem; background: var(--sky-tint); }
.prose .table-scroll table { margin: 0; }
.prose .table-scroll { margin: 1.4rem 0; }

/* About page */
.about-page-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); }
.fact-panel { background: var(--pitch-tint); border-radius: var(--r-m); padding: 1.8rem; align-self: start; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.fact-panel h2 { font-size: 1.7rem; }
.fact-panel ul { list-style: none; padding: 0; margin: 0; }
.fact-panel li { padding: .6rem 0; border-top: 1px solid var(--pitch-line); font-size: .97rem; }

/* Contact page */
.contact-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.email-display { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-s); padding: 2rem; box-shadow: 10px 10px 0 var(--pitch-tint); }
.email-display .plain-email { font-size: clamp(1.5rem, 3.4vw, 2.3rem); display: block; margin: .4rem 0 1rem; }
.reason-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.reason-list li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.reason-list h3 { margin: 0; font-size: 1.45rem; }
.reason-list p { margin: 0; color: var(--ink-2); }

/* Legal pages */
.legal-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); }
.legal-toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; font-size: .95rem; border-top: 4px solid var(--pitch); padding-top: 1rem; }
.legal-toc h2 { font-size: 1.35rem; }
.legal-toc ol { margin: 0; padding-left: 1.2em; }
.legal-toc li { margin-bottom: .4rem; }
.legal-toc a { color: var(--ink); text-decoration: none; }
.legal-toc a:hover { color: var(--pitch); text-decoration: underline; }
.notice-strip { background: var(--red-tint); border-left: 6px solid var(--card); padding: 1.3rem 1.5rem; border-radius: 0 var(--r-s) var(--r-s) 0; margin-bottom: 2rem; }
.notice-strip p:last-child { margin: 0; }
.clauses { counter-reset: clause; }
.clauses > section { counter-increment: clause; }
.clauses > section > h2::before { content: counter(clause) ". "; color: var(--pitch); }
.updated { font-size: .9rem; color: var(--ink-2); }

/* ---------- 22. Blog index: magazine listing ---------- */
.mag-feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 2px solid var(--ink); }
.mag-feature img { border-radius: var(--r-l); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mag-feature h2 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); margin: .6rem 0 .8rem; }
.mag-feature h2 a { color: var(--ink); text-decoration: none; }
.mag-feature h2 a:hover { color: var(--pitch); }
.mag-feature p { color: var(--ink-2); }
.mag-section { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(1.5rem, 4vw, 4rem); padding-block: clamp(2.2rem, 4vw, 3.2rem); border-bottom: 1px solid var(--rule); }
.mag-section > header h2 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); }
.mag-section > header p { color: var(--ink-2); font-size: .95rem; }
.mag-rows { list-style: none; margin: 0; padding: 0; }
.mag-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; padding: 1.2rem 0; border-top: 1px solid var(--rule); align-items: start; }
.mag-row:first-child { border-top: 0; padding-top: 0; }
.mag-row img { border-radius: var(--r-s); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.mag-row h3 { font-size: 1.65rem; margin: 0 0 .4rem; }
.mag-row h3 a { color: var(--ink); text-decoration: none; }
.mag-row h3 a:hover { color: var(--pitch); text-decoration: underline; text-decoration-color: var(--card); text-decoration-thickness: 3px; }
.mag-row p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* ---------- 23. Blog article ---------- */
.article-head { padding-block: clamp(2.2rem, 5vw, 4rem) 2rem; }
.article-head h1 { font-size: clamp(2.6rem, 5.8vw, 4.9rem); max-width: 20ch; }
.article-dek { font-size: clamp(1.15rem, 1.6vw, 1.35rem); color: var(--ink-2); max-width: 46rem; }
.article-meta { font-size: .9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1rem; }
.article-figure { margin: 0 0 clamp(2rem, 4vw, 3rem); }
.article-figure img { border-radius: var(--r-l); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rule); }
.article-figure figcaption { font-size: .85rem; color: var(--ink-2); padding-top: .6rem; }
.article-grid { padding-bottom: clamp(3rem, 6vw, 5rem); display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3.6fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.article-body .prose > p:first-of-type { font-size: 1.2rem; line-height: 1.62; }
.article-side { position: sticky; top: calc(var(--header-h) + 1.2rem); font-size: .95rem; }
.side-block { padding: 1.2rem 0; border-top: 2px solid var(--ink); }
.side-block + .side-block { border-top-width: 1px; border-top-color: var(--rule); }
.side-block h2 { font-size: 1.35rem; margin-bottom: .7rem; }
.side-block ol, .side-block ul { margin: 0; padding-left: 1.1em; }
.side-block li { margin-bottom: .45rem; }
.side-block a { color: var(--ink); }
.side-block a:hover { color: var(--pitch); }
.side-block.is-cta { background: var(--pitch-tint); border: 0; border-radius: var(--r-m); padding: 1.3rem; margin-top: 1rem; }
.side-block.is-cta p { margin-bottom: .9rem; }
.side-block.is-cta .btn { font-size: 1.1rem; width: 100%; }
.side-facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: 0; }
.side-facts dt { font-family: var(--display); font-weight: 700; color: var(--ink-2); }
.side-facts dd { margin: 0; }
.related { border-top: 2px solid var(--ink); margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.8rem; }
.related h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; }
.related-grid a { display: block; color: var(--ink); text-decoration: none; }
.related-grid img { border-radius: var(--r-s); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; margin-bottom: .7rem; }
.related-grid h3 { font-size: 1.35rem; margin: 0; }
.related-grid a:hover h3 { color: var(--pitch); }
.callout { background: var(--sky-tint); border-radius: var(--r-m); padding: 1.2rem 1.4rem; margin: 1.6rem 0; }
.callout p:last-child { margin: 0; }

/* ---------- 24. Responsive ---------- */
@media (max-width: 1180px) {
  .primary-nav ul { gap: 1rem; }
  .primary-nav ul a { font-size: 1.08rem; }
}

@media (max-width: 1060px) {
  :root { --header-h: 76px; }
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; left: 0; right: 0; top: var(--nav-top, 76px); bottom: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1.5rem;
    background: var(--mist); padding: 1.5rem var(--gutter) 2.5rem; overflow-y: auto;
    border-top: 1px solid var(--rule);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav ul li { border-bottom: 1px solid var(--rule); }
  .primary-nav ul a { display: block; font-size: 1.8rem; padding: .7rem 0; }
  .primary-nav ul a::after { bottom: .5rem; width: 3rem; right: auto; }
  .nav-cta { align-self: flex-start; font-size: 1.4rem; }
  body.menu-open { overflow: hidden; }

  .hero-title { grid-column: 1 / -1; }
  .glance { grid-column: 1 / -1; grid-row: auto; order: 3; display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; }
  .hero-copy { grid-column: 1 / -1; order: 1; }
  .hero-figure { grid-column: 1 / -1; order: 2; transform: none; }
  .hero-title { order: 0; }

  .about-article, .about-aside { grid-column: 1 / -1; }
  .about-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: center; }
  .about-aside figure { margin: 0; }

  .how-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .how-col:nth-child(n) { margin-top: 0; }
  .how-col:nth-child(3) { border-left: 0; padding-left: 0; }

  .release-grid, .compat-wrap, .install-grid, .about-page-grid, .contact-hero, .legal-grid, .article-grid { grid-template-columns: minmax(0, 1fr); }
  .compat-wrap .section-head, .install-aside, .fact-panel, .legal-toc, .article-side, .faq-cat { position: static; }
  .faq-block { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .faq-cat p { max-width: 50ch; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mag-section { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .article-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
  .article-side .side-block.is-cta { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 1.02rem; }
  .brand-word { font-size: 1.45rem; }
  .brand-word small { display: none; }
  .glance { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .hero-actions .btn { width: 100%; }
  .about-aside { grid-template-columns: minmax(0, 1fr); }

  .feature-row, .feature-row:nth-child(even) { grid-template-columns: 64px 1fr; gap: .6rem 1.2rem; }
  .feature-row .glyph, .feature-row:nth-child(even) .glyph { order: 0; grid-row: 1 / 3; justify-self: start; width: 56px; }
  .feature-row h3, .feature-row:nth-child(even) h3 { order: 0; text-align: left; font-size: 1.85rem; }
  .feature-row p, .feature-row:nth-child(even) p { order: 0; }

  .how-cols { grid-template-columns: minmax(0, 1fr); }
  .how-col, .how-col:nth-child(3) { border-left: 0; padding: 0 0 0 0; border-top: 1px solid var(--pitch-line); padding-top: 1.2rem; display: grid; grid-template-columns: 84px 1fr; gap: 0 1rem; }
  .how-col:first-child { border-top: 0; padding-top: 0; }
  .how-num { font-size: 4.4rem; grid-row: 1 / 3; }

  .guides-grid, .download-grid, .safety-box, .mag-feature { grid-template-columns: minmax(0, 1fr); }
  .download-visual img { max-width: 300px; }
  .dl-facts { grid-template-columns: minmax(0, 1fr); }
  .download-copy .btn-big { width: 100%; }

  .use-row { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .compat-table { min-width: 0; }
  .compat-table thead { display: none; }
  .compat-table, .compat-table tbody, .compat-table tr, .compat-table th, .compat-table td { display: block; width: auto; }
  .compat-table th:first-child, .compat-table th:nth-child(2) { width: auto; }
  .compat-table tr { padding: 1rem 1.2rem; border-bottom: 1px solid var(--rule); }
  .compat-table tbody th, .compat-table td { padding: .25rem 0; border: 0; }
  .colophon dl { grid-template-columns: minmax(0, 1fr); }
  .colophon dt { border-bottom: 0; padding-bottom: 0; }
  .colophon dl > :nth-last-child(2) { border-bottom: 0; }

  .pc-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .pc-grid::before { display: none; }
  .pc-col, .pc-col:first-child, .pc-col:last-child { padding: 0; }

  .safety-box { box-shadow: 6px 6px 0 var(--card); }
  .procedure li { padding-left: 70px; }
  .procedure li::before { width: 48px; height: 48px; font-size: 1.45rem; }
  .procedure::before { left: 23px; }

  .trouble-head { display: none; }
  .trouble-row { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .trouble-label { display: block; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--sky); }

  .faq-a { padding-right: 0; }
  .foot-top { grid-template-columns: minmax(0, 1fr); }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .mag-row { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .article-side { grid-template-columns: minmax(0, 1fr); }
  .reason-list li { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .email-display { box-shadow: 6px 6px 0 var(--pitch-tint); }
}

@media (max-width: 420px) {
  h1 { font-size: 2.7rem; }
  .page-head h1, .article-head h1 { font-size: 2.45rem; }
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .btn-big { font-size: 1.25rem; }
  .masthead { gap: .6rem; }
  .menu-toggle .label { display: none; }
}

/* ---------- 25. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-figure { transform: none; }
}

/* ---------- 26. Print ---------- */
@media print {
  .site-head, .to-top, .nav-cta, .menu-toggle { display: none !important; }
  #site-header { min-height: 0; }
  body { background: #fff; }
}

/* Footer legal statement (the single place the site's status is stated) */
.foot-base .foot-legal { max-width: 64ch; }
