/* =========================================================================
   Evolve Global Solutions — brand design system
   Derived from: evolve_brand_kit.docx + the approved File Preview setup guide.

   House style: brutalist / minimalist. Ink on white, hard rules, no shadows,
   no gradients, no rounded corners. Teal is the ONLY accent — spend it on
   headings, rules, and interactive states, nothing decorative. Cyan is for
   highlight moments only. White space does part of the branding work.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Sansation — the brand typeface.

   ACTIVATED. The .woff2 files live in src/assets/fonts/ (note the exact
   PascalCase_Underscore filenames — they must match here). `font-display: swap`
   paints Segoe UI first, then swaps in Sansation, so text is never invisible.
   Sansation_Regular is preloaded in base.njk for the fastest first paint.

   ⚠️ Licence: Sansation (by Bernd Montag) is distributed free for personal AND
   commercial use, web embedding included. Keep a copy of the licence text with
   the font files. If Legal ever wants belt-and-braces, this block is the only
   thing to comment out to revert to the Segoe UI stack.
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "Sansation";
  src: url("/assets/fonts/Sansation_Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sansation";
  src: url("/assets/fonts/Sansation_Light_Italic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Sansation";
  src: url("/assets/fonts/Sansation_Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sansation";
  src: url("/assets/fonts/Sansation_Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Sansation";
  src: url("/assets/fonts/Sansation_Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sansation";
  src: url("/assets/fonts/Sansation_Bold_Italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* -------------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Brand colour — values straight from the brand kit, §3 */
  --teal: #007fa6; /* Primary Teal   — headings, rules, buttons, key moments */
  --cyan: #36c9e8; /* Bright Cyan    — highlights only, sparingly */
  --blue: #1e5da8; /* Deep Blue      — diagrams, data viz, dark backgrounds */
  --silver: #c8c8c8; /* Silver Gray    — separators, supporting elements */

  /* Ink: the kit specifies charcoal #222222. We deepen it very slightly for
     screen contrast against pure white. Imperceptible side by side, but it
     clears WCAG AAA comfortably at body sizes. */
  --ink: #1c1c1c;
  --ink-soft: #4a4a4a;
  --paper: #ffffff;
  --paper-alt: #f6f6f4;
  --warning: #8a4b00;

  /* Rules — the load-bearing structural device of this system */
  --rule: 2px solid var(--ink);
  --rule-heavy: 3px solid var(--ink);
  --rule-hair: 1px solid var(--ink);

  /* Type */
  --sans: Sansation, "Segoe UI", "Segoe UI Variable Text", system-ui, Arial,
    sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  /* Layout */
  --max: 1180px;
  --gutter: 40px;

  /* Height of the sticky .topbar: the taller of the logo (250x61, capped at
     52vw) and the 44px menu toggle, plus 28px padding and the 3px rule. Anchor
     jumps are offset by this. Update it if the logo or topbar padding change. */
  --topbar-h: calc(max(min(250px, 52vw) * 0.244, 44px) + 31px);
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Anchor targets stop below the sticky .topbar. The 3px overlap tucks a
     section's top rule under the topbar's, so the two don't double up. */
  scroll-padding-top: calc(var(--topbar-h) - 3px);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  /* Guards the 100vw overshoot from full-bleed section bands (.section--band)
     so they never introduce a horizontal scrollbar. This propagates to the
     viewport, so the sticky .topbar still works. Do NOT set overflow on <html>
     as well: body would then become its own scroll container and break it. */
  overflow-x: hidden;
}

::selection {
  background: var(--cyan);
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a:hover {
  color: var(--teal);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

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

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */
.shell {
  width: min(var(--max), 100% - var(--gutter));
  margin: 0 auto;
}

/* -------------------------------------------------------------------------
   Type scale
   ------------------------------------------------------------------------- */
h1,
h2,
h3 {
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 0;
  font-size: clamp(44px, 8vw, 104px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.015em;
}
h1 em {
  font-style: normal;
  color: var(--teal);
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1;
}

h3 {
  margin: 28px 0 8px;
  font-size: 17px;
}
h3::before {
  content: "/ ";
  color: var(--teal);
}

p {
  margin: 0 0 14px;
  max-width: 74ch;
}

.lead {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 20px);
}

ul,
ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
li {
  margin: 6px 0;
  max-width: 72ch;
}

strong {
  font-weight: 700;
}

code {
  border: var(--rule-hair);
  border-color: var(--silver);
  background: var(--paper-alt);
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 0.9em;
}

/* The utility label. Mono + caps = the "spec sheet" voice of this system.
   Use for eyebrows, kickers, table headers, and data labels. */
.tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag--teal {
  color: var(--teal);
}

/* -------------------------------------------------------------------------
   Header + nav
   ------------------------------------------------------------------------- */
.topbar {
  /* Stays pinned while the page scrolls. Sits below .skip-link (z-index 20). */
  position: sticky;
  top: 0;
  z-index: 15;
  border-bottom: var(--rule-heavy);
  background: var(--paper);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

.logo {
  display: block;
  width: 250px;
  max-width: 52vw;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item {
  position: relative;
  margin: 0;
}

.nav__link {
  display: block;
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  border: 2px solid transparent;
}
.nav__link:hover,
.nav__link[aria-expanded="true"] {
  border-color: var(--ink);
  color: var(--ink);
}
.nav__link[aria-current="page"] {
  border-bottom-color: var(--teal);
}

/* Dropdown: opens on hover AND on click (keyboard/touch), no JS framework */
.nav__panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 232px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: var(--rule);
  background: var(--paper);
  display: none;
}
.nav__item:hover > .nav__panel,
.nav__panel:focus-within,
.nav__link[aria-expanded="true"] + .nav__panel {
  display: block;
}
.nav__panel li {
  margin: 0;
}
.nav__panel li + li {
  border-top: var(--rule-hair);
}
.nav__panel a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-left: 6px solid transparent;
}
.nav__panel a:hover {
  border-left-color: var(--teal);
  background: var(--paper-alt);
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px; /* tap target floor — do not go below */
  border: var(--rule);
  background: var(--paper);
  padding: 9px 14px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
}

/* Nav CTA — the one nav link that reads as an action, not a destination.
   Mirrors .button--solid but sized for the nav row. */
.nav__link--cta {
  margin-left: 6px;
  background: var(--teal);
  border-color: var(--teal);
  color: var(--paper);
}
.nav__link--cta:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* -------------------------------------------------------------------------
   FAQ — native <details> accordion. Zero JS, keyboard-accessible, and the
   text is real DOM so answer engines can lift it. Mirrors the FAQPage schema.
   ------------------------------------------------------------------------- */
.faq {
  border-top: var(--rule-heavy);
  margin: 8px 0 0;
}
.faq details {
  border-bottom: var(--rule);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--teal);
  font-size: 22px;
  line-height: 1;
}
.faq details[open] summary::after {
  content: "\2212"; /* minus */
}
.faq summary:hover {
  color: var(--teal);
}
.faq__a {
  padding: 0 0 18px;
  color: var(--ink-soft);
  max-width: 74ch;
}
.faq__a :last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  border: var(--rule);
  padding: 8px 18px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--paper);
}
.button--solid {
  background: var(--ink);
  color: var(--paper);
}
.button--invert {
  border-color: var(--paper);
  background: transparent;
  color: var(--paper);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero-film { margin: 0; }
.hero-film__frame {
  position: relative;
  overflow: clip;
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
  background: var(--ink);
}
.hero-film__frame img,
.hero-film__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-film__toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 1rem;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  font: inherit;
  cursor: pointer;
}
.hero-film__toggle svg { display: block; margin: auto; }
.hero-film__toggle:focus-visible { outline: 3px solid var(--teal); outline-offset: -5px; }
.hero-film__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-film figcaption { padding-block: .5rem; font-size: .875rem; }
@media print { .hero-film { display: none; } }

.hero {
  border-bottom: var(--rule-heavy);
  padding: 56px 0 0;
}
.hero .actions {
  margin: 28px 0 44px;
}
/* Breathing room between the spec strip and the hero's bottom rule — otherwise
   the strip's own bottom border and the hero rule stack up and read as cramped. */
.hero .spec {
  margin-bottom: 40px;
}

/* -------------------------------------------------------------------------
   Spec strip — the signature element.
   Hard-ruled grid of real facts. Data as design. Use it where a template
   would reach for a stat card or a hero graphic. Keep entries factual:
   if it reads like marketing, it does not belong here.
   ------------------------------------------------------------------------- */
.spec {
  display: grid;
  /* --spec-cols is set inline by base.njk from the front-matter array length.
     NOTE: because it arrives as an INLINE style it outranks anything we write
     here, so the responsive overrides below must set grid-template-columns
     directly rather than trying to redefine --spec-cols. */
  grid-template-columns: repeat(var(--spec-cols, 4), minmax(0, 1fr));
  border: var(--rule-heavy);
  border-bottom: 0;
  margin: 0;
}
.spec > div {
  padding: 14px 16px 16px;
  border-bottom: var(--rule-heavy);
}
.spec > div + div {
  border-left: var(--rule);
}
.spec dt {
  margin: 0 0 6px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.spec dd {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
}
.spec dd small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 400;
}

/* -------------------------------------------------------------------------
   Sections — the numbered/lettered marker rail.
   Only use a marker where order or identity carries real meaning. If the
   content is not a sequence, use .section--plain and skip the number.
   ------------------------------------------------------------------------- */
.section {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  border-top: var(--rule-heavy);
}
.section + .section {
  margin-top: 40px;
}
.section--plain {
  grid-template-columns: 1fr;
}
.section--last {
  border-bottom: var(--rule-heavy);
}

.section__marker {
  padding: 26px 16px 0 0;
  border-right: var(--rule);
}
.section__marker b {
  display: block;
  font-size: 44px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.section__marker span {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section__body {
  padding: 24px 0 36px 28px;
}
.section--plain .section__body {
  padding-left: 0;
}
.section__body > p:first-of-type {
  font-size: 17.5px;
}

/* -------------------------------------------------------------------------
   Section rhythm — full-bleed colour bands.

   A long ink-on-white page reads as one undifferentiated column even with the
   hard rules. These modifiers give the eye anchor points WITHOUT spending the
   teal accent: a near-white "quiet" band (--alt) and a charcoal "punctuation"
   band (--dark, the brand kit's dark-background treatment). Use them sparingly
   — two or three anchors down the page, not every section.

   --band makes only the BACKGROUND reach the viewport edges; the content stays
   in the .shell column. body{overflow-x:hidden} absorbs the 100vw overshoot.
   ------------------------------------------------------------------------- */
.section--band {
  margin-inline: calc(50% - 50vw);
  padding-inline: max(calc(var(--gutter) / 2), calc(50vw - var(--max) / 2));
}
.section--band .section__body {
  padding-top: 40px;
  padding-bottom: 48px;
}

.section--alt {
  background: var(--paper-alt);
}

.section--dark {
  background: var(--ink);
  color: #ededed;
}
.section--dark h2,
.section--dark h3 {
  color: var(--paper);
}
.section--dark h3::before {
  color: var(--cyan);
}
.section--dark .section__body > p:first-of-type {
  color: #ededed;
}
.section--dark a {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
}
.section--dark a:hover {
  color: var(--paper);
}
.section--dark .cards,
.section--dark .card {
  border-color: var(--paper);
}
.section--dark .card h3 a {
  color: var(--paper);
}
.section--dark .card h3 a:hover {
  color: var(--cyan);
}
/* Keep every other component legible on a dark band. */
.section--dark p,
.section--dark li {
  color: #ededed;
}
.section--dark .section__marker,
.section--dark .split,
.section--dark .mini-panel + .mini-panel {
  border-color: var(--paper);
}
.section--dark .note {
  border-color: var(--paper);
}
.section--dark .note__label {
  border-color: var(--paper);
  color: var(--cyan);
}
.section--dark table {
  border-color: var(--paper);
}
.section--dark th {
  border-bottom-color: var(--paper);
}
.section--dark th,
.section--dark td {
  border-color: rgba(255, 255, 255, 0.28);
}
.section--dark code {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: var(--paper);
}
.section--dark .tag--teal {
  color: var(--cyan);
}
.section--dark .button {
  border-color: var(--paper);
  background: transparent;
  color: var(--paper);
}
.section--dark .button:hover {
  background: var(--paper);
  color: var(--ink);
}
.section--dark .button--solid {
  background: var(--paper);
  color: var(--ink);
}
.section--dark .button--solid:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
}

/* -------------------------------------------------------------------------
   Card grid
   ------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(var(--card-cols, 3), minmax(0, 1fr));
  gap: 0;
  border: var(--rule);
  margin: 22px 0;
}
.card {
  padding: 20px;
  border-right: var(--rule);
}
.card:last-child {
  border-right: 0;
}
.card h3 {
  margin-top: 0;
}
.card p:last-child {
  margin-bottom: 0;
}

/* Tag wall — hard-ruled chips for the Industries & expertise section. Static
   text (good for SEO/AEO and accessibility), on-brand mono-caps voice, and the
   hard border keeps it in the brutalist system rather than a soft "pill" look. */
.tagwall {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 0;
  list-style: none;
}
.tagwall li {
  margin: 0;
  max-width: none;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  border: var(--rule-hair);
  border-color: var(--ink);
  padding: 7px 12px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tagwall li:hover {
  color: var(--teal);
  border-color: var(--teal);
}
.section--dark .tagwall li {
  color: #ededed;
  border-color: rgba(255, 255, 255, 0.55);
}
.section--dark .tagwall li:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* Partner logo row — each mark sits in its own hard-ruled cell, which unifies
   logos of different shapes and weights and keeps the brutalist grid language.
   Logos are constrained to a common height, not a common width. */
.logos {
  display: grid;
  grid-template-columns: repeat(var(--logo-cols, 3), minmax(0, 1fr));
  border: var(--rule);
  margin: 22px 0;
}
.logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  padding: 22px 24px;
  border-right: var(--rule);
}
.logos a:last-child {
  border-right: 0;
}
.logos img {
  max-height: 46px;
  max-width: 100%;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.logos a:hover img {
  opacity: 1;
}

/* Two-up panel */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 20px 0;
  border: var(--rule);
}
.mini-panel {
  padding: 16px;
}
.mini-panel + .mini-panel {
  border-left: var(--rule);
}
.mini-panel h3 {
  margin-top: 0;
}
.mini-panel p:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Tables
   ------------------------------------------------------------------------- */
.table-scroll {
  margin: 20px 0 8px;
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  border: var(--rule);
  font-size: 15px;
}
th,
td {
  border: var(--rule-hair);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th {
  border-bottom: var(--rule-heavy);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
td:first-child {
  font-weight: 700;
}

/* -------------------------------------------------------------------------
   Notes
   ------------------------------------------------------------------------- */
.note {
  margin: 22px 0;
  max-width: 74ch;
  border: var(--rule);
  border-left: 10px solid var(--teal);
}
.note--warning {
  border-left-color: var(--warning);
}
.note__label {
  display: inline-block;
  margin: 0;
  padding: 4px 10px;
  border-right: var(--rule);
  border-bottom: var(--rule);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.note--warning .note__label {
  color: var(--warning);
}
.note p {
  margin: 10px 14px 14px;
}

/* -------------------------------------------------------------------------
   Blog list
   ------------------------------------------------------------------------- */
.posts {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-heavy);
}
.posts li {
  max-width: none;
  margin: 0;
  border-bottom: var(--rule);
}
.post-link {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  text-decoration: none;
}
.post-link:hover h3 {
  color: var(--teal);
}
.post-link time {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.post-link h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.post-link h3::before {
  content: none;
}
.post-link p {
  margin: 0;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------------------
   Booking embed
   ------------------------------------------------------------------------- */
.booking-frame {
  width: 100%;
  min-height: 780px;
  border: var(--rule);
  margin: 22px 0;
}

/* -------------------------------------------------------------------------
   Demo loop — silent autoplay/loop product clips (e.g. /file-preview/).
   Unused until a page actually embeds a <video class="demo-loop">; see
   docs/EvolveMarketing/extenview-demo-video-brief.md for the markup and the
   prefers-reduced-motion pause script that must ship alongside it.
   ------------------------------------------------------------------------- */
.demo-loop {
  display: block;
  width: 100%;
  border: var(--rule-heavy);
  margin: 22px 0;
  background: var(--paper-alt);
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer {
  border-top: var(--rule-heavy);
  background: var(--ink);
  color: var(--paper);
  padding: 30px 0;
  margin-top: 70px;
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: #e7e7e7;
}
.footer a {
  color: var(--paper);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 13px;
}
.footer__links li {
  margin: 0;
}

main {
  padding: 40px 0 0;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 960px) {
  /* Override the grid directly — the inline --spec-cols/--card-cols set by
     the template would otherwise win and pin these to their desktop counts. */
  .spec {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .spec > div:nth-child(odd) {
    border-left: 0;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    border-right: 0;
    border-bottom: var(--rule);
  }
  .card:last-child {
    border-bottom: 0;
  }
  .logos {
    grid-template-columns: 1fr 1fr;
  }
  .logos a {
    min-height: 96px;
  }
  .logos a:nth-child(odd) {
    border-right: var(--rule);
  }
  .logos a:nth-child(even) {
    border-right: 0;
  }
  .logos a:not(:last-child) {
    border-bottom: var(--rule);
  }
  .split {
    grid-template-columns: 1fr;
  }
  .mini-panel + .mini-panel {
    border-left: 0;
    border-top: var(--rule);
  }

  /* Nav collapses to a disclosure panel */
  .nav__toggle {
    display: inline-flex;
  }
  .nav__list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 15;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: var(--rule-heavy);
    background: var(--paper);
    /* The topbar is sticky, so an open menu taller than the screen must scroll
       on its own. 100% is the topbar's height (its containing block). */
    max-height: calc(100vh - 100% - 3px);
    max-height: calc(100dvh - 100% - 3px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav__list[data-open="true"] {
    display: flex;
  }
  .nav__item {
    border-bottom: var(--rule-hair);
  }
  .nav__link {
    padding: 14px 20px;
    border: 0;
  }
  .nav__panel {
    position: static;
    display: block;
    border: 0;
    border-top: var(--rule-hair);
    background: var(--paper-alt);
  }
  .nav__panel a {
    padding-left: 36px;
  }
}

@media (max-width: 620px) {
  :root {
    --gutter: 24px;
  }
  .section {
    grid-template-columns: 1fr;
  }
  .section__marker {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 18px 0 0;
    border-right: 0;
  }
  .section__marker b {
    font-size: 34px;
  }
  .section__marker span {
    margin-top: 0;
  }
  .section__body {
    padding: 16px 0 30px;
  }
  .spec {
    grid-template-columns: 1fr;
  }
  .spec > div {
    border-left: 0 !important;
  }
  .post-link {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  th,
  td {
    padding: 8px;
  }
}

/* -------------------------------------------------------------------------
   Print
   ------------------------------------------------------------------------- */
@media print {
  .topbar__meta,
  .actions,
  .nav,
  .footer .button,
  .skip-link {
    display: none;
  }
  .topbar {
    position: static;
  }
  .footer {
    background: none;
    color: var(--ink);
  }
  .footer p {
    color: var(--ink);
  }
  .section {
    break-inside: avoid-page;
  }
  a {
    text-decoration: none;
  }
}
