/* BoringBI shared stylesheet: design tokens, base, header/footer, Part C components, page sections.
   One file for every page. Homepage design reference: design/homepage-v11-reference.html */

/* ── Fonts (self-hosted, latin subset) ─────────────────────────── */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-italic.woff2") format("woff2-variations"), url("/fonts/inter-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"), url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Design tokens ─────────────────────────────────────────────── */
:root {
  --bg: #FAFAFA;
  --text: #0A0A0A;
  --grey: #555555;
  --line: #DEDEDE;
  --paper: #F6F2EA;
  --white: #FFFFFF;
  --accent: #E8401C;        /* large text and fills only */
  --accent-deep: #C73518;   /* small orange text, link hover, buttons */
  --accent-deep-hover: #A82C13;
  --on-dark-muted: #AAAAAA;
  --on-dark-accent: #EE5A36; /* small label on the black guide banner */
  --grid-line: rgba(10, 10, 10, .035);

  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --border: 2px solid var(--text);
  --hairline: 1px solid var(--line);
  --wrap: 1200px;
  --gutter: 32px;
  --section: 112px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: var(--text);
}

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

img {
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

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

.mono {
  font-family: var(--mono);
}

.lab {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.lab--grey {
  color: var(--grey);
}

.h2 {
  font-size: 40px;
  line-height: 44px;
  font-weight: 600;
  letter-spacing: -.03em;
}

.h3 {
  font-size: 24px;
  line-height: 30px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.muted {
  color: var(--grey);
}

.lead {
  font-size: 20px;
  line-height: 29px;
}

.small {
  font-size: 14px;
  line-height: 22px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section {
  padding: var(--section) 0;
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
}

.skip-link:focus {
  top: 12px;
  color: var(--bg);
}

.list-reset {
  margin: 0;
  padding: 0;
  list-style: none;
}

.measure {
  max-width: 640px;
}

.tiny {
  font-size: 12px;
}

.full {
  width: 100%;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn,
.btn2 {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.btn {
  background: var(--accent-deep);
  color: var(--white);
}

.btn:hover {
  background: var(--accent-deep-hover);
  color: var(--white);
}

.btn2 {
  border: var(--border);
  color: var(--text);
}

.btn2:hover {
  background: var(--text);
  color: var(--bg);
}

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

/* ── Shared blocks ─────────────────────────────────────────────── */
.box {
  background: var(--white);
  border: var(--border);
  padding: 14px 18px;
}

.cells {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cells > * {
  background: var(--bg);
  padding: 32px;
}

.section--paper .cells > * {
  background: var(--bg);
}

.sq {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: var(--border);
  background: var(--white);
}

.sq__num {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 10px;
  color: var(--grey);
}

.sq__sym {
  font-size: 18px;
  line-height: 20px;
  font-weight: 500;
}

.note {
  max-width: 560px;
  margin-top: 10px;
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--accent);
  color: var(--grey);
  font-size: 16px;
  line-height: 24px;
}

/* "Why?" style text buttons */
.why {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.why .q {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--accent-deep);
  white-space: nowrap;
}

del.x {
  color: var(--grey);
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--text);
}

/* ── Guide banner (off until the guide exists) ─────────────────── */
.announce {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 52px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.announce__link:not(:first-of-type) {
  display: none; /* no JS: first message only */
}

.announce-dismissed .announce,
.announce[hidden] {
  display: none;
}

.announce__link {
  padding: 12px 0;
  color: var(--bg);
  text-decoration: underline;
  text-decoration-color: rgba(250, 250, 250, .4);
  text-underline-offset: 3px;
}

.announce__link:hover {
  color: var(--bg);
  text-decoration-color: currentColor;
}

.announce__close {
  position: absolute;
  top: 50%;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.announce__close:focus-visible,
.announce__link:focus-visible {
  outline-color: var(--bg);
}

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.logo span {
  color: var(--accent-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}

.nav-links a:not(.btn) {
  text-decoration: none;
}

.nav-links .btn {
  min-height: 44px;
  font-size: 15px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 16px;
}

.menu-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform .25s ease, opacity .15s ease;
}

.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 7px; }
.menu-icon span:nth-child(3) { top: 14px; }

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

html.menu-open,
html.menu-open body {
  overflow: hidden;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  padding: 40px 0 72px;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero__head {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero h1 {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--grey);
}

.hero__sentence {
  max-width: 1180px;
  font-size: clamp(36px, min(5vw, 8.5vh), 72px);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: -.045em;
}

.hero__sentence em {
  color: var(--accent);
}

.hero__sentence img {
  width: auto;
  margin: 0 .06em;
}

.hero__img--factory { height: 1.15em; margin-top: -.18em; vertical-align: -.06em; } /* negative margin keeps its line the same height as the others */
.hero__img--ship { height: .92em; vertical-align: -.1em; }
.hero__img--lorry { height: .74em; vertical-align: -.06em; }

.tile {
  animation: settle .9s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes settle {
  0% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--r));
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.hero__img--factory { --dx: -50px; --dy: 30px; --r: -8deg; animation-delay: .2s; }
.hero__img--ship { --dx: -80px; --dy: 0px; --r: 0deg; animation-delay: .4s; }
.hero__img--lorry { --dx: -80px; --dy: 0px; --r: 0deg; animation-delay: .6s; }

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px 64px;
}

.hero__labels {
  display: flex;
  flex: 1 1 340px;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__pitch {
  display: flex;
  flex: 1 1 460px;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 560px;
}

/* ── Platforms band ────────────────────────────────────────────── */
.platforms {
  padding: 32px 0;
  background: var(--text);
  color: var(--bg);
  border-top: 2px solid var(--accent);
}

.platforms__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 48px;
}

.platforms__label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--on-dark-muted);
}

.platforms ul {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.01em;
}

/* ── "Data engineering for ~~everyone~~ the supply chain" (intro of Where I work) ── */
.where__intro {
  gap: 20px;
}

.specialise__line {
  max-width: 1000px;
  font-size: 48px;
  line-height: 54px;
  font-weight: 400;
  letter-spacing: -.035em;
}

/* The "Why?" beside the struck-through word: readable at this size, 44px hit area, centred on the line */
.specialise__line .why .q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: 8px;
  padding: 0 4px;
  font-size: 16px;
  line-height: 1;
  letter-spacing: .04em;
  vertical-align: middle;
}

.specialise__note {
  margin-top: 0;
}

.specialise__support {
  max-width: 720px;
}

/* ── Where I work ──────────────────────────────────────────────── */
.where__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}

.industry {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
}

.industry__tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--accent-deep);
}

.systems .cells {
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

.systems .cells > * {
  padding: 18px 20px;
  font-weight: 500;
}

/* ── Problems ──────────────────────────────────────────────────── */
.problems .cells {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.problems .cells > p {
  font-size: 20px;
  line-height: 29px;
}

.problems .cells > .problems__fix {
  background: var(--paper);
}

.problems__fix strong {
  font-weight: 600;
}

.section__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ── Solutions ─────────────────────────────────────────────────── */
.solutions .cells {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.solution {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.solution__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.solution__link {
  margin-top: auto;
  font-weight: 500;
}

.solution__meta,
.step__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

/* ── What I won't sell you (About) ─────────────────────────────── */
.wont__list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wont__list li {
  padding: 20px 0;
  border-top: var(--border);
}

.wont__btn {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  width: 100%;
}

.wont__btn del,
.wont__btn ins {
  font-size: 22px;
  line-height: 30px;
}

.wont__btn ins {
  font-weight: 600;
  text-decoration: none;
}

.wont__btn .q {
  margin-left: auto;
}

/* ── Show the engineering (tabs) ───────────────────────────────── */
.demo__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.tab {
  min-height: 44px;
  padding: 0 18px;
  border: var(--border);
  background: var(--white);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  background: var(--text);
  color: var(--bg);
}

.stage {
  min-height: 360px;
  padding: 28px;
  border: var(--border);
  background: var(--paper);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel[hidden] {
  display: none;
}

.panel__lead {
  max-width: 720px;
  font-size: 18px;
  line-height: 27px;
}

.panel__lead strong {
  font-weight: 600;
}

.panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
}

.panel__grid--tight {
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

.box__k {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

.box__v {
  font-size: 15px;
  line-height: 22px;
}

.box--accent {
  border-color: var(--accent);
}

.box--log {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 21px;
}

.report {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
}

.kpis {
  display: grid;
  flex: 1 1 480px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.kpis .box {
  padding: 20px;
}

.kpi__v {
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -.03em;
}

.chart {
  margin: 0;
  display: flex;
  flex: 1 1 360px;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px;
}

.chart__bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 140px;
  margin: 0;
  padding: 0;
  border-bottom: var(--border);
  list-style: none;
}

.chart__bars span {
  flex: 1;
  background: var(--text);
}

.chart__bars .is-low {
  background: var(--accent);
}

.chart__bars .bar-56 { height: 56px; }
.chart__bars .bar-98 { height: 98px; }
.chart__bars .bar-84 { height: 84px; }
.chart__bars .bar-112 { height: 112px; }
.chart__bars .bar-91 { height: 91px; }

.chart__days {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

.chart__days span {
  flex: 1;
  text-align: center;
}

/* ── The difference (switch) ───────────────────────────────────── */
.diff__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 64px;
}

.diff__left {
  display: flex;
  flex: 3 1 520px;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.diff__right {
  flex: 2 1 340px;
  min-width: 0;
}

.sw {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.sw__track {
  --travel: 88px;
  position: relative;
  width: 176px;
  height: 60px;
  border: var(--border);
  background: var(--white);
}

.sw__track::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 9px;
  border-bottom: 2px dashed var(--line);
}

.sw__track img {
  position: absolute;
  left: 6px;
  bottom: 8px;
  width: auto;
  height: 34px;
  transition: transform .7s cubic-bezier(.5, 0, .2, 1);
}

.sw[aria-checked="true"] .sw__track {
  background: var(--paper);
}

.sw[aria-checked="true"] .sw__track img {
  transform: translateX(var(--travel));
}

.sw__label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grey);
}

.sw[aria-checked="false"] .sw__label--off,
.sw[aria-checked="true"] .sw__label--on {
  color: var(--text);
  font-weight: 600;
}

.diff__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.diff__rows li {
  padding: 14px 0;
  border-bottom: var(--hairline);
  color: var(--grey);
  font-size: 20px;
  line-height: 28px;
}

.diff__rows.is-boring li {
  color: var(--text);
  font-weight: 600;
}

/* Text styles used inside the homepage mock windows */
.mock__body .grey {
  color: var(--grey);
}

.mock__body .warn {
  color: var(--accent-deep);
}

.mock__body .gap {
  margin-top: 10px;
}

/* ── Periodic table ────────────────────────────────────────────── */
.ptable {
  border-top: var(--hairline);
  border-bottom: var(--hairline);
}

.ptable__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ptable__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
}

.ptable__grid {
  display: flex;
  flex: 999 1 640px;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 400px;
}

.pt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pt-row__label {
  width: 130px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--accent-deep);
}

.el {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 72px;
  height: 72px;
  padding: 0;
  border: var(--border);
  background: var(--white);
  cursor: pointer;
}

.el.hl {
  border-color: var(--accent);
}

.el[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.el__num {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 12px;
}

.el__sym {
  font-size: 24px;
  line-height: 26px;
  font-weight: 500;
  letter-spacing: -.02em;
}

.ptable__side {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.pt-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  padding: 24px;
}

.pt-detail__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pt-detail__sym {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: var(--border);
  font-size: 30px;
  font-weight: 500;
}

.pt-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: var(--border);
  background: var(--accent);
}

.pt-trust__sym {
  font-size: 28px;
  font-weight: 500;
}

.pt-trust__text {
  font-size: 15px;
  line-height: 22px;
}

.ptable__combine {
  font-size: 18px;
  line-height: 27px;
}

.ptable__combine span {
  color: var(--accent-deep);
  font-weight: 600;
}

/* ── How I work ────────────────────────────────────────────────── */
.steps:not(.section) {
  padding: 0 0 var(--section); /* solution pages: follows the section above */
}

.steps .cells {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.step {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── FAQ ───────────────────────────────────────────────────────── */
.faq__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
}

.faq__intro {
  display: flex;
  flex: 1 1 300px;
  flex-direction: column;
  gap: 12px;
}

.faq__list {
  flex: 2 1 560px;
  min-width: 0;
}

.faq details {
  padding: 20px 0;
  border-top: var(--border);
}

.faq details:last-child {
  border-bottom: var(--border);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  list-style: none;
  font-size: 22px;
  line-height: 30px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-weight: 400;
  color: var(--accent-deep);
}

.faq details[open] summary::after {
  content: "\2013";
}

.faq details p {
  max-width: 760px;
  margin-top: 12px;
}

/* ── Closing CTA, led in by a short founder note ───────────────── */
.cta__founder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 720px;
  margin-bottom: 24px;
  padding-bottom: 40px;
  border-bottom: var(--hairline);
}

.cta__founder-text strong {
  font-weight: 600;
}

.cta__founder-link {
  font-weight: 600;
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.cta__title {
  max-width: 820px;
  font-size: 56px;
  line-height: 60px;
  font-weight: 400;
  letter-spacing: -.04em;
}

.cta__text {
  max-width: 620px;
}

/* ── House rules (About) ───────────────────────────────────────── */

.rules__intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rules__list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 184px;
  height: 168px;
  padding: 12px 14px;
  border: var(--border);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.rule[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.rule__face {
  display: contents;
}

.rule__face[hidden] {
  display: none;
}

.rule__hint {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

.rule__sym {
  font-size: 40px;
  line-height: 42px;
  font-weight: 500;
  letter-spacing: -.03em;
}

.rule__sym--accent {
  color: var(--accent);
}

.rule__name {
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
}

.rule__back-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--on-dark-muted);
}

.rule__back-text {
  font-size: 15px;
  line-height: 21px;
}

/* ── Illustration strip: the drawings stand on the footer's top edge ── */
.strip {
  overflow: hidden;
  background: var(--bg);
}

.strip__inner {
  --u: clamp(48px, 15vw, 110px); /* height of the tallest drawing; the others scale with it */
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 48px;
}

.strip__img {
  display: block;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  object-fit: contain;
  object-position: bottom;
}

.strip__img--factory { height: var(--u); }
.strip__img--ship { height: calc(var(--u) * .8); }
.strip__img--lorry { height: calc(var(--u) * .65); }
.strip__img--warehouse { height: calc(var(--u) * .76); }

/* The lorry drives in once when the strip scrolls into view (boringbi.js adds .is-driving) */
.strip.is-ready .strip__img--lorry {
  opacity: 0;
  transform: translateX(-160px);
}

.strip.is-driving .strip__img--lorry {
  opacity: 1;
  transform: none;
  transition: transform 2.4s cubic-bezier(.25, .8, .3, 1), opacity .6s ease;
}

@media (prefers-reduced-motion: reduce) {
  .strip.is-ready .strip__img--lorry,
  .strip.is-driving .strip__img--lorry {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Footer: orange fill, black text (4.9:1) ───────────────────── */
.site-footer {
  background: var(--accent);
  color: var(--text);
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer :focus-visible {
  outline-color: var(--text);
}

/* Row 2: status */
.foot-status {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 40px 0 24px;
  border-bottom: var(--border);
}

.foot-status__lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: .08em;
}

.foot-status__motto {
  font-size: 26px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -.02em;
}

/* Row 3: link grid; the 2px gaps on a black background are the rules */
.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  border-bottom: var(--border);
  background: var(--text);
}

.foot-cell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px 32px;
  background: var(--accent);
}

.foot-cell:first-child {
  padding-left: 0;
}

.foot-head {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: .12em;
}

.foot-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 17px;
  line-height: 24px;
}

.foot-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.foot-email__link {
  font-size: 17px;
  line-height: 24px;
  word-break: break-all;
}

.foot-copy {
  min-height: 32px;
  padding: 0 10px;
  border: var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
}

.foot-copy:hover,
.foot-copy.is-copied {
  background: var(--text);
  color: var(--accent);
}

.foot-book {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
}

/* Social buttons under "Book a free data scan" (same square style as the tiles and COPY) */
.foot-social {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: -4px; /* the cell's 14px gap minus 4px = 10px above the row */
}

.foot-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: var(--border);
  background: transparent;
  color: var(--text);
}

.foot-social__link svg {
  display: block;
  fill: currentColor;
}

.site-footer .foot-social__link:hover,
.site-footer .foot-social__link:focus-visible {
  background: var(--text);
  color: var(--accent);
  text-decoration: none;
}

.site-footer .foot-social__link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Row 4: legal */
.foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 20px 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
}

/* Row 5: wordmark, sized to the content width. JetBrains Mono letters are 0.6em wide, so 8 letters = 4.8em. */
.foot-mark-wrap {
  container-type: inline-size;
}

.foot-mark {
  font-family: var(--mono);
  font-size: calc((min(100vw, var(--wrap)) - 2 * var(--gutter) - 20px) / 4.8); /* fallback without container units */
  font-size: calc(100cqw / 4.8);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  padding: .04em 0 .26em; /* room for the descender of "g" */
}

.foot-mark span {
  color: var(--bg);
}

@media (max-width: 900px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-cell:nth-child(odd) {
    padding-left: 0;
  }
}

@media (max-width: 600px) {
  .strip__inner {
    padding-top: 32px;
  }

  .foot-status,
  .foot-legal {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .foot-cell {
    padding: 24px 0;
  }

  .foot-status__lines {
    letter-spacing: .02em;
  }
}

/* ════════════════════════════════════════════════════════════════
   PART C COMPONENTS (shown together on /styleguide.html)
   ════════════════════════════════════════════════════════════════ */

/* ── Element tile (same look as the periodic table) ────────────── */
.el-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: var(--border);
  background: var(--white);
  color: var(--text);
  letter-spacing: 0;
  line-height: 1;
}

.el-tile__num {
  font-family: var(--mono);
  font-weight: 400;
}

.el-tile__sym {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -.02em;
}

.el-tile--md { width: 72px; height: 72px; gap: 4px; }
.el-tile--md .el-tile__num { font-size: 10px; }
.el-tile--md .el-tile__sym { font-size: 24px; }

.el-tile--sm { width: 48px; height: 48px; gap: 2px; }
.el-tile--sm .el-tile__num { font-size: 9px; }
.el-tile--sm .el-tile__sym { font-size: 18px; }

/* Sized from the surrounding text, so it scales with the headline */
.el-tile--inline {
  width: 1.15em;
  height: 1.15em;
  gap: .06em;
  margin: 0 .02em;
  vertical-align: middle; /* centre on the line; the default baseline would follow the tiny number */
}

.el-tile--inline .el-tile__num { font-size: .2em; }
.el-tile--inline .el-tile__sym { font-size: .5em; }

/* ── C1 Equation headline ──────────────────────────────────────── */
.equation {
  max-width: 1100px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -.035em;
  color: var(--text);
}

.equation__op {
  color: var(--grey);
}

.equation__result {
  color: var(--text);
}

/* ── C2 Split section ──────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: var(--border);
  border-bottom: var(--border);
}

.split + .split {
  border-top: 0;
}

.split__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 56px clamp(24px, 4vw, 64px);
  background: var(--paper);
  border-right: 3px solid var(--text);
}

.split__panel > img {
  width: auto;
  height: auto; /* keep the drawing's proportions when it is narrowed */
  max-width: 100%;
  max-height: 260px;
}

.split__panel > .mock {
  width: 100%;
  max-width: 460px;
}

.split__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  max-width: 640px;
  padding: 72px clamp(24px, 5vw, 80px);
}

.split__lead {
  font-size: 20px;
  line-height: 29px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.split__body p:not(.lab):not(.split__lead) {
  color: var(--grey);
}

/* flip: panel on the right */
.split--flip .split__panel {
  order: 2;
  border-right: 0;
  border-left: 3px solid var(--text);
}

.split--flip .split__body {
  justify-self: end;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .split__panel,
  .split--flip .split__panel {
    order: 0;
    min-height: 0;
    padding: 40px var(--gutter);
    border-right: 0;
    border-left: 0;
    border-bottom: 3px solid var(--text);
  }

  .split__body {
    max-width: none;
    padding: 48px var(--gutter);
  }
}

/* ── C3 Arrow list ─────────────────────────────────────────────── */
.arrow-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--border);
}

.arrow-list > li {
  border-bottom: var(--border);
}

.arrow-list > li:not(:has(> a)),
.arrow-list > li > a {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 16px 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 500;
}

.arrow-list > li > a {
  text-decoration: none;
}

.arrow-list > li:not(:has(> a))::before,
.arrow-list > li > a::before {
  content: "→";
  content: "→" / "";
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: var(--border);
  background: var(--white);
  color: var(--text);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  transition: background .15s, color .15s;
}

.arrow-list > li > a:hover,
.arrow-list > li > a:focus-visible {
  color: var(--text);
}

.arrow-list > li > a:hover::before,
.arrow-list > li > a:focus-visible::before {
  background: var(--text);
  color: var(--white);
}

/* ── C4 Mock window ────────────────────────────────────────────── */
.mock {
  border: var(--border);
  background: var(--white);
}

.mock[hidden] {
  display: none;
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 28px;
  padding: 0 10px;
  background: var(--text);
}

.mock__dots {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
}

.mock__dots span {
  width: 10px;
  height: 10px;
}

.mock__dots span:nth-child(1) { background: var(--accent); }
.mock__dots span:nth-child(2) { background: var(--line); }
.mock__dots span:nth-child(3) { background: var(--white); }

.mock__title {
  overflow: hidden;
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mock__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 24px;
}

.mock__label {
  margin-top: 10px;
  color: var(--grey);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 20px;
}

/* ── C5 Statement band ─────────────────────────────────────────── */
.statement {
  background: var(--accent);
  color: var(--text);
  border-top: var(--border);
  border-bottom: var(--border);
}

.statement__inner {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 64px;
}

.statement__art {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 200px;
  height: 160px;
  border: var(--border);
  background: var(--paper);
}

.statement__art img {
  width: auto;
  height: auto;
  max-width: 160px;
  max-height: 120px;
}

.statement__text {
  max-width: 820px;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -.03em;
}

@media (max-width: 700px) {
  .statement__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .statement__art {
    width: 140px;
    height: 112px;
  }

  .statement__art img {
    max-width: 112px;
    max-height: 84px;
  }
}

/* ── C6 Split closing CTA ──────────────────────────────────────── */
.cta-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: var(--border);
}

.cta-split__half {
  display: flex;
  padding: 96px clamp(24px, 5vw, 80px);
  background: var(--bg);
}

.cta-split__half--dark {
  justify-content: flex-end;
  background: var(--text);
  color: var(--bg);
}

.cta-split__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 520px;
}

.cta-split__half--dark .cta-split__lab {
  color: var(--on-dark-muted);
}

.cta-split__title {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -.04em;
}

.cta-split__link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: var(--border);
  font-weight: 500;
  text-decoration: none;
}

.cta-split__link:hover {
  background: var(--text);
  color: var(--bg);
}

.cta-split__half--dark :focus-visible {
  outline-color: var(--bg);
}

@media (max-width: 760px) {
  .cta-split {
    grid-template-columns: 1fr;
  }

  .cta-split__half {
    padding: 64px var(--gutter);
  }

  .cta-split__half--dark {
    justify-content: flex-start;
  }
}

/* ── Solutions mega menu (header) ──────────────────────────────── */
.nav-mega__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
  cursor: pointer;
}

.nav-mega__toggle:hover,
.nav-mega__toggle[aria-expanded="true"] {
  color: var(--accent-deep);
}

.nav-mega__chevron {
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}

.nav-mega__toggle[aria-expanded="true"] .nav-mega__chevron {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 120;
  background: var(--white);
  border-top: var(--hairline);
  border-bottom: var(--border);
}

.mega[hidden] {
  display: none;
}

.mega__inner {
  padding-top: 32px;
  padding-bottom: 32px;
}

.mega__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.mega__item + .mega__item {
  border-left: var(--hairline);
}

.mega__link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 8px 24px 12px;
  text-decoration: none;
}

.mega__item:first-child .mega__link {
  padding-left: 0;
}

.mega__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega__index {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

.mega__name {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.mega__line {
  color: var(--grey);
  font-size: 14px;
  line-height: 21px;
}

a.mega__link:hover .mega__name,
a.mega__link:focus-visible .mega__name {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.mega__link:hover .el-tile,
a.mega__link:focus-visible .el-tile {
  background: var(--text);
  color: var(--bg);
}

a.mega__link[aria-current="page"] .mega__name {
  color: var(--accent-deep);
}

.mega__link--soon .mega__index::after {
  content: " · soon";
}

@media (min-width: 901px) {
  .site-header .nav {
    position: static;
  }
}

@media (max-width: 900px) {
  .nav-mega {
    border-bottom: var(--hairline);
  }

  .nav-mega__toggle {
    justify-content: space-between;
    width: 100%;
    min-height: 64px;
    font-size: 22px;
    font-weight: 500;
  }

  .mega {
    position: static;
    border: 0;
    background: none;
  }

  .mega__inner {
    padding: 0 0 16px;
  }

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

  .mega__item + .mega__item {
    border-left: 0;
  }

  .mega__link,
  .mega__item:first-child .mega__link {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
  }

  .nav-links .mega a.mega__link {
    min-height: 0;
    border-bottom: 0;
    font-weight: 400;
  }

  .mega__index,
  .mega__line {
    display: none;
  }

  .mega__link--soon .mega__name::after {
    content: " · soon";
    color: var(--grey);
    font-weight: 400;
  }

  .mega__name {
    font-size: 17px;
  }
}

/* ── Solution page hero ────────────────────────────────────────── */
.page-hero {
  padding: 72px 0 80px;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  border-bottom: var(--hairline);
}

.page-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.page-hero__label {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-hero__title {
  max-width: 1000px;
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -.045em;
}

.page-hero__promise {
  max-width: 640px;
  font-size: 22px;
  line-height: 31px;
}

.page-hero__humour {
  max-width: 640px;
  color: var(--grey);
  font-size: 18px;
  line-height: 27px;
  font-style: italic;
}

.page-hero .btn-row {
  margin-top: 8px;
}

/* ── Section spacing helpers ───────────────────────────────────── */
.section--tight {
  padding: 72px 0;
}

.section--flush-top {
  padding-top: 0;
}

/* ── Problem cells ("Sound familiar?") ─────────────────────────── */
.problem-cells {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.problem-cells > li {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.problem__title {
  font-size: 20px;
  line-height: 27px;
  font-weight: 600;
  letter-spacing: -.015em;
}

/* ── Arrow list with a bold lead-in per item ───────────────────── */
.arrow-list--detail > li:not(:has(> a)) {
  align-items: flex-start;
  font-size: 17px;
  line-height: 26px;
  font-weight: 400;
}

.arrow-list--detail > li:not(:has(> a))::before {
  margin-top: -6px;
}

.arrow-list--detail strong {
  font-weight: 600;
}

/* ── Page hero with an illustration beside it (Industries) ─────── */
.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.page-hero__art {
  display: flex;
  justify-content: center;
}

.page-hero--art .page-hero__title {
  font-size: clamp(40px, 4.8vw, 68px);
}

.page-hero__art img {
  width: 100%;
  max-width: 420px;
  height: auto;
}

.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

.jump-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: var(--border);
  background: var(--white);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.jump-links a:hover,
.jump-links a:focus-visible {
  background: var(--text);
  color: var(--bg);
}

.jump-links__tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}

@media (max-width: 760px) {
  .page-hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .page-hero__art {
    order: -1;
    justify-content: flex-start;
  }

  .page-hero__art img {
    max-width: 240px;
  }
}

/* ── Anchored sections clear the sticky header ─────────────────── */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ── Industry section contents ─────────────────────────────────── */
.ind-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.ind-block[hidden] {
  display: none;
}

/* Lines drawn per cell, so a part-filled last row leaves no dark gaps */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  border-top: var(--border);
  border-left: var(--border);
}

.kpi-grid li {
  padding: 12px 14px;
  border-right: var(--border);
  border-bottom: var(--border);
  background: var(--white);
  font-size: 15px;
  line-height: 21px;
  font-weight: 600;
}

.ind-sources {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 22px;
}

.split__body .ind-sources {
  color: var(--text);
}

.ind-problems li {
  padding: 10px 0 10px 16px;
  border-left: 2px solid var(--accent);
  font-size: 16px;
  line-height: 24px;
}

.ind-problems li + li {
  margin-top: 8px;
}

.ind-block .arrow-list > li > a {
  min-height: 60px;
  padding: 10px 0;
  font-size: 16px;
}

/* ── Homepage industry cards as links ──────────────────────────── */
.industry--link {
  text-decoration: none;
  transition: background .15s;
}

.industry--link:hover,
.industry--link:focus-visible {
  background: var(--paper);
  color: var(--text);
}

.industry__more {
  margin-top: auto;
  font-weight: 500;
}

.industry--link:hover .industry__more,
.industry--link:focus-visible .industry__more {
  color: var(--accent-deep);
}

/* ── About: narrow column on the faint grid ────────────────────── */
.about {
  padding: 24px 0 72px;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.about__block {
  padding: 72px 0;
}

.about__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: calc(900px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.about__opening {
  padding-top: 64px;
}

.about__statement {
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.06;
  font-weight: 400;
  letter-spacing: -.045em;
}

.about__lorry {
  width: auto;
  height: .74em;
  margin: 0 .06em;
  vertical-align: -.06em;
}

.about__manifesto {
  gap: 40px;
}

.about__manifesto p {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.22;
  font-weight: 400;
  letter-spacing: -.03em;
}

.about__aside {
  color: var(--grey);
}

/* Hand-drawn underline: used once, on one word */
.squiggle {
  position: relative;
  white-space: nowrap;
}

.squiggle__line {
  position: absolute;
  left: 0;
  bottom: -.2em;
  width: 100%;
  height: .3em;
  overflow: visible;
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* Identity list: large stacked lines */
.identity li {
  padding: 10px 0;
  border-bottom: var(--hairline);
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -.035em;
}

.identity li:first-child {
  border-top: var(--border);
}

.identity__last {
  color: var(--accent);
  font-style: italic;
}

/* Founder bio + Read more */
.about__bio {
  font-size: 20px;
  line-height: 31px;
}

.about__more {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 17px;
  line-height: 27px;
}

.about__more[hidden] {
  display: none;
}

.about__more strong {
  font-weight: 600;
}

.more-toggle {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 18px;
  border: var(--border);
  background: var(--white);
  font-family: var(--mono);
  font-size: 14px;
  cursor: pointer;
}

.more-toggle:hover,
.more-toggle:focus-visible {
  background: var(--text);
  color: var(--bg);
}

/* Decision loop: horizontal on desktop, vertical (left line, square markers) below 1024px */
.loop {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.loop::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  border-top: var(--border);
}

.loop__step {
  position: relative;
  min-width: 0;
  padding-top: 32px;
}

.loop__step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  border: var(--border);
  background: var(--white);
}

.loop__step:first-child::before,
.loop__step:last-child::before {
  background: var(--accent);
}

.loop__num {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.loop__title {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 23px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.loop__step p {
  color: var(--grey);
  font-size: 14px;
  line-height: 21px;
}

.loop__return {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 2px dashed var(--accent-deep);
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 1023px) {
  .loop {
    display: block;
    border-left: var(--border);
  }

  .loop::before {
    display: none;
  }

  .loop__step {
    padding: 0 0 28px 32px;
  }

  .loop__step::before {
    top: 4px;
    left: -9px;
  }

  .loop__step p {
    max-width: 560px;
    font-size: 16px;
    line-height: 25px;
  }

  .loop__return {
    margin-top: 0;
    padding: 14px 0 0;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .about__block {
    padding: 48px 0;
  }

  .about__manifesto {
    gap: 28px;
  }
}

/* ════════════════════════════════════════════════════════════════
   BLOG: index (B5) and post template (B6)
   ════════════════════════════════════════════════════════════════ */

/* Large tile for post visual panels */
.el-tile--lg { width: 112px; height: 112px; gap: 6px; }
.el-tile--lg .el-tile__num { font-size: 13px; }
.el-tile--lg .el-tile__sym { font-size: 44px; }

.post-visual__tiles {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ── Index hero and chips ──────────────────────────────────────── */
.blog {
  padding: 0 0 96px;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.blog__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 72px;
  padding-bottom: 40px;
}

.blog__title {
  max-width: 900px;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -.045em;
}

.chips {
  display: none; /* shown by html.js, which the layout sets before first paint */
}

.js .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  min-height: 44px;
  padding: 0 16px;
  border: var(--border);
  background: var(--white);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}

.chip:hover {
  background: var(--paper);
}

.chip[aria-pressed="true"] {
  background: var(--text);
  color: var(--white);
}

.blog__status {
  min-height: 20px;
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
}

/* ── Featured post (split card with a folder tab) ──────────────── */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 72px;
}

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

.featured__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 40px;
  border: var(--border);
  border-right: 0;
  background: var(--paper);
}

.featured__visual img {
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 240px;
}

.featured__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 40px 96px;
  border: var(--border);
  background: var(--white);
}

.featured__meta,
.post-card__meta {
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
}

.featured__title {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -.04em;
}

.featured__title a,
.post-card__title a {
  color: var(--text);
  text-decoration: none;
}

/* One link per card, but the whole card is the hit area */
.featured__title a::after,
.post-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.featured__dek,
.post-card__dek {
  color: var(--grey);
}

.featured__dek {
  max-width: 480px;
  font-size: 18px;
  line-height: 27px;
}

.featured__more,
.post-card__more {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: var(--border);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.featured__more {
  background: var(--text);
  color: var(--white);
}

.featured__tab {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: -2px;
  padding: 6px 14px;
  border: var(--border);
  border-top: 0;
  background: var(--white);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}

.featured:hover .featured__title a,
.featured:focus-within .featured__title a {
  color: var(--accent-deep);
}

.featured:focus-within,
.post-card:focus-within {
  outline: 3px solid var(--accent-deep);
  outline-offset: 3px;
}

.featured__title a:focus-visible,
.post-card__title a:focus-visible {
  outline: none;
}

/* ── Post cards ────────────────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: var(--border);
  background: var(--white);
}

.post-card__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  border-bottom: var(--border);
  background: var(--paper);
}

.post-card__visual img {
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 130px;
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 20px 72px;
}

.post-card__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.post-card__dek {
  font-size: 15px;
  line-height: 23px;
}

.post-card__more {
  margin: -2px;
  background: var(--white);
  color: var(--text);
}

.post-card:hover .post-card__more,
.post-card:focus-within .post-card__more {
  background: var(--text);
  color: var(--white);
}

@media (max-width: 900px) {
  .featured {
    grid-template-columns: 1fr;
  }

  .featured__visual {
    min-height: 220px;
    border-right: var(--border);
    border-bottom: 0;
  }

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

@media (max-width: 600px) {
  .featured__body {
    padding: 28px 20px 88px;
  }

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

/* ── Post: opening ─────────────────────────────────────────────── */
.post-head {
  padding: 56px 0 64px;
  border-bottom: var(--hairline);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.post-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 48px;
}

.post-head__text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.post-head__crumb:hover {
  text-decoration: underline;
}

.post-head__title {
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -.04em;
}

.post-head__dek {
  max-width: 640px;
  color: var(--grey);
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.45;
}

.post-head__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border: var(--border);
  background: var(--paper);
}

.post-head__visual img {
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 220px;
}

.post-author {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 14px 10px 10px;
  border: var(--border);
  background: var(--white);
}

.post-author__text {
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
}

.post-author__name {
  font-weight: 600;
}

.post-author__line {
  color: var(--grey);
}

.post-meta {
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
}

@media (max-width: 900px) {
  .post-head__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .post-head__visual {
    order: -1;
    min-height: 160px;
  }
}

/* ── Post: body with sticky chapters ───────────────────────────── */
.post-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 64px;
  padding-top: 64px;
  padding-bottom: 64px;
}

.chapters {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
}

.chapters__tab {
  display: inline-flex;
  padding: 6px 14px;
  border: var(--border);
  border-bottom: 0;
  background: var(--text);
  color: var(--white);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  list-style: none;
  cursor: default;
}

.chapters__tab::-webkit-details-marker {
  display: none;
}

.chapters__list li a {
  display: block;
  padding: 10px 12px;
  border: var(--border);
  border-top-width: 0;
  background: var(--white);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

.chapters__list li:first-child a {
  border-top-width: 2px;
}

.chapters__list a[aria-current="true"] {
  padding-left: 8px;
  border-left: 6px solid var(--accent);
  background: var(--paper);
  font-weight: 600;
}

@media (max-width: 900px) {
  .post-body {
    grid-template-columns: minmax(0, 1fr); /* lets wide tables scroll inside their box instead of widening the page */
    gap: 32px;
    padding-top: 40px;
  }

  .chapters {
    position: static;
    max-height: none;
  }

  .chapters__tab {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    align-items: center;
    border-bottom: var(--border);
    cursor: pointer;
  }

  .chapters__tab::after {
    content: "+";
  }

  .chapters__box[open] .chapters__tab::after {
    content: "–";
  }

  .chapters__box[open] .chapters__tab {
    border-bottom: 0;
  }
}

/* ── Post: article typography ──────────────────────────────────── */
.prose {
  min-width: 0;
  max-width: 68ch;
  font-size: 19px;
  line-height: 1.72;
}

.prose > * + *,
.prose .post-section > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2em;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.025em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.015em;
}

.prose .post-section > h2:first-child,
.prose .post-section > .section-label + h2 {
  margin-top: .3em;
}

.prose .post-section + .post-section,
.prose .post-section + .takeaway-box,
.prose .takeaway-box + .post-section {
  margin-top: 2.6em;
}

.prose a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.prose strong {
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: .4em;
}

.prose blockquote,
.prose .stat-callout {
  margin-left: 0;
  margin-right: 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
}

.prose blockquote p,
.prose .stat-callout p {
  font-size: 1.12em;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -.01em;
}

.prose .stat-callout span {
  display: block;
  margin-top: 6px;
  color: var(--grey);
  font-size: 16px;
  line-height: 1.6;
}

.prose .section-label {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.prose .takeaway-box {
  padding: 28px;
  border: var(--border);
  background: var(--white);
}

.prose .takeaway-box > * + * {
  margin-top: .9em;
}

.prose figure {
  margin-left: 0;
  margin-right: 0;
}

.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--border);
}

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

.prose .meme-block img,
.prose .illustration-block img {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.prose figcaption {
  margin-top: 10px;
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

.prose .meme-block figcaption,
.prose .illustration-block figcaption {
  text-align: center;
}

.prose .table-wrap {
  overflow-x: auto;
  border: var(--border);
}

.prose .table-wrap:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 2px;
}

.prose table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.55;
}

.prose th {
  padding: 12px 14px;
  border-bottom: var(--border);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  text-align: left;
}

.prose td {
  padding: 12px 14px;
  border-bottom: var(--hairline);
  vertical-align: top;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose td:first-child {
  font-weight: 600;
}

.prose code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--mono);
  font-size: .85em;
}

.prose pre {
  overflow-x: auto;
  padding: 18px 20px;
  border: var(--border);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}

.prose .source-note {
  margin-top: 2.4em;
  padding-top: 20px;
  border-top: var(--hairline);
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}

.prose .source-note a {
  color: var(--grey);
}

@media (max-width: 600px) {
  .prose {
    font-size: 18px;
  }

  .prose .takeaway-box {
    padding: 22px 18px;
  }
}

/* ── Post: after the article ───────────────────────────────────── */
.post-cta {
  padding-bottom: 64px;
}

.post-cta__box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px;
  border: var(--border);
  background: var(--paper);
}

.post-cta__box > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}

.post-cta__title {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -.035em;
}

.post-more {
  padding: 64px 0 96px;
  border-top: var(--hairline);
}

.post-more .lab {
  margin-bottom: 24px;
}

/* ── Styleguide page only ──────────────────────────────────────── */
.sg-section {
  padding: 64px 0;
  border-bottom: var(--hairline);
}

.sg-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.sg-note {
  max-width: 720px;
  color: var(--grey);
  font-size: 15px;
  line-height: 24px;
}

.sg-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.sg-swatch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 150px;
  height: 110px;
  padding: 10px;
  border: var(--border);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
}

.sg-swatch--dark {
  color: var(--bg);
}

.sg-swatch--bg { background: var(--bg); }
.sg-swatch--text { background: var(--text); }
.sg-swatch--grey { background: var(--grey); }
.sg-swatch--line { background: var(--line); }
.sg-swatch--paper { background: var(--paper); }
.sg-swatch--accent { background: var(--accent); }
.sg-swatch--accent-deep { background: var(--accent-deep); }

.sg-space { margin-top: 40px; }
.sg-gap { gap: 40px; }
.sg-narrow { max-width: 760px; }
.sg-row--top { align-items: flex-start; }
.sg-col { flex: 1 1 320px; max-width: 440px; }
.sg-section--lead-in { padding-bottom: 32px; border-bottom: 0; }
.sg-caption { padding-top: 24px; padding-bottom: 16px; }
.sg-sample-lg { font-size: 36px; line-height: 1.25; letter-spacing: -.03em; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --gutter: 24px;
    --section: 88px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: calc(100dvh - var(--header-h));
    padding: 8px var(--gutter) 32px;
    overflow-y: auto;
    background: var(--bg);
    font-size: 22px;
    visibility: hidden;
    transform: translateX(100%);
  }

  .nav-links.is-animated {
    transition: transform .28s ease, visibility 0s linear .28s;
  }

  .nav-links.is-open {
    visibility: visible;
    transform: none;
  }

  .nav-links.is-open.is-animated {
    transition: transform .28s ease, visibility 0s;
  }

  .nav-links a:not(.btn) {
    display: flex;
    align-items: center;
    min-height: 64px;
    border-bottom: var(--hairline);
    font-weight: 500;
  }

  .nav-links .btn {
    justify-content: center;
    min-height: 56px;
    margin-top: 28px;
    font-size: 17px;
  }

  html.menu-open .site-header {
    z-index: 160;
  }

}

@media (max-width: 600px) {
  :root {
    --gutter: 20px;
    --section: 72px;
  }

  .hero {
    padding: 40px 0 56px;
  }

  .hero__inner {
    gap: 40px;
  }

  .h2 {
    font-size: 32px;
    line-height: 38px;
  }

  .specialise__line {
    font-size: 34px;
    line-height: 40px;
  }

  .cells > * {
    padding: 24px 20px;
  }

  .stage {
    padding: 20px 16px;
  }

  .kpis {
    flex-basis: 100%;
  }

  .kpi__v {
    font-size: 30px;
    line-height: 38px;
  }

  .faq summary {
    font-size: 19px;
    line-height: 27px;
  }

  .cta__title {
    font-size: 40px;
    line-height: 44px;
  }

  .pt-row__label {
    width: 100%;
  }

  .sw {
    gap: 10px;
  }

  .sw__track {
    --travel: 52px;
    width: 132px;
  }

  .el {
    width: 64px;
    height: 64px;
  }

  .rules__list {
    width: 100%;
  }

  .rules__list li {
    width: calc(50% - 8px); /* two tiles per row; the button fills its list item */
  }

  .rule {
    width: 100%;
  }

}

/* ── Motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tile {
    animation: none;
  }

  .sw__track img,
  .menu-icon span,
  .nav-links.is-animated,
  .nav-links.is-open.is-animated {
    transition: none;
  }
}

/* ══ B7 Work page and case study ══════════════════════════════════ */

/* Mock window holding app-like content (sans text, more room) */
.mock--app .mock__body {
  gap: 16px;
  padding: 20px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

.mock--app .stage {
  min-height: 0;
}

/* Case study: stats, quote, facts, rows */
.case-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.case-stats > li {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-stats__k {
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}

.case-stats__v {
  font-size: 40px;
  line-height: 46px;
  letter-spacing: -.03em;
}

.case-stats__d {
  color: var(--grey);
  font-size: 15px;
  line-height: 23px;
}

.case-quote {
  margin: 0;
  padding-left: 24px;
  border-left: 6px solid var(--accent);
}

.case-quote blockquote {
  margin: 0;
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -.02em;
}

.case-quote figcaption {
  margin-top: 12px;
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
}

.case-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.case-meta {
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
}

.case-back {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 8px 0 0;
}

.case-facts dt {
  color: var(--grey);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}

.case-facts dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.case-rows {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px 64px;
  align-items: start;
}

.case-row__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 18px;
  line-height: 1.65;
}

.case-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  font-size: 16px;
}

.case-ba {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.case-ba > div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-ba__head {
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
}

.case-ba__head--after {
  color: var(--accent-deep);
}

.case-ba__list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: var(--hairline);
  color: var(--grey);
}

.case-ba__list li::before {
  content: "\2014";
  flex-shrink: 0;
}

/* Work: examples grid */
.examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 24px;
  align-items: start;
}

.example {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.example__head {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
}

/* 01 Reporting: request dashboard */
.rq {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rq__title {
  font-weight: 600;
}

.rq__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.rq__stats dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--grey);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rq__stats dd {
  margin: 0;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: -.02em;
}

.rq__key {
  width: 10px;
  height: 10px;
  background: var(--text);
}

.rq__key--err {
  background: var(--accent);
}

.rq__chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  border-bottom: var(--border);
}

.rq__chart span {
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--text);
}

.rq__chart i {
  display: block;
  background: var(--accent);
}

.rq__chart span:nth-child(1) { height: 38%; }
.rq__chart span:nth-child(2) { height: 52%; }
.rq__chart span:nth-child(3) { height: 44%; }
.rq__chart span:nth-child(4) { height: 66%; }
.rq__chart span:nth-child(5) { height: 58%; }
.rq__chart span:nth-child(6) { height: 74%; }
.rq__chart span:nth-child(7) { height: 62%; }
.rq__chart span:nth-child(8) { height: 86%; }
.rq__chart span:nth-child(9) { height: 70%; }
.rq__chart span:nth-child(10) { height: 92%; }
.rq__chart span:nth-child(11) { height: 78%; }
.rq__chart span:nth-child(12) { height: 100%; }
.rq__chart span:nth-child(13) { height: 84%; }
.rq__chart span:nth-child(14) { height: 72%; }
.rq__chart span:nth-child(1) i { height: 6%; }
.rq__chart span:nth-child(2) i { height: 10%; }
.rq__chart span:nth-child(3) i { height: 7%; }
.rq__chart span:nth-child(4) i { height: 14%; }
.rq__chart span:nth-child(5) i { height: 9%; }
.rq__chart span:nth-child(6) i { height: 16%; }
.rq__chart span:nth-child(7) i { height: 8%; }
.rq__chart span:nth-child(8) i { height: 20%; }
.rq__chart span:nth-child(9) i { height: 12%; }
.rq__chart span:nth-child(10) i { height: 18%; }
.rq__chart span:nth-child(11) i { height: 11%; }
.rq__chart span:nth-child(12) i { height: 24%; }
.rq__chart span:nth-child(13) i { height: 13%; }
.rq__chart span:nth-child(14) i { height: 9%; }

/* 02 Data engineering: notebook */
.nb {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nb__run {
  align-self: flex-start;
  min-height: 36px;
  padding: 0 14px;
  border: var(--border);
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.nb__run:hover {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
}

.nb__run:disabled {
  border-color: var(--grey);
  background: var(--white);
  color: var(--grey);
  cursor: default;
}

.nb__code {
  overflow-x: auto;
  margin: 0;
  padding: 12px 0;
  border: var(--hairline);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 21px;
  counter-reset: ln;
}

.nb__code code {
  display: block;
  white-space: normal; /* each line is its own block; the newlines between them are ignored */
}

.nb__code code > span {
  display: block;
  min-height: 21px;
  padding-right: 12px;
  white-space: pre;
}

.nb__code code > span::before {
  counter-increment: ln;
  content: counter(ln);
  display: inline-block;
  width: 32px;
  margin-right: 12px;
  color: var(--grey);
  text-align: right;
}

.nb__code b {
  color: var(--accent-deep);
  font-weight: 600;
}

.nb__code em {
  color: var(--grey);
  font-style: normal;
}

.nb__status,
.nb__out {
  font-size: 12.5px;
  line-height: 20px;
}

.nb__status.is-ok {
  font-weight: 600;
}

.nb__out {
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
}

/* 03 Troubleshooting: pipeline bot */
.bot {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bot__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--grey);
}

.bot__head strong {
  color: var(--text);
}

.bot__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
}

.bot__tag {
  padding: 0 6px;
  border: var(--hairline);
  font-size: 11px;
}

.bot__title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
}

.bot__path {
  color: var(--grey);
}

.bot__issues {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bot__issue {
  min-height: 44px;
  padding: 0 12px;
  border: var(--border);
  background: var(--white);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.bot__issue span {
  color: var(--accent-deep);
  font-weight: 700;
}

.bot__issue[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.bot__issue[aria-pressed="true"] span {
  color: var(--on-dark-accent);
}

.bot__detail {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: var(--paper);
}

.bot__detail strong {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bot__detail strong:first-child {
  margin-top: 0;
}

.bot__summary {
  color: var(--grey);
}

@media (max-width: 900px) {
  .case-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-rows {
    gap: 56px;
  }
}

@media (max-width: 600px) {
  .case-stats__v {
    font-size: 32px;
    line-height: 38px;
  }

  .case-quote blockquote {
    font-size: 22px;
    line-height: 30px;
  }

  .case-row__text {
    font-size: 17px;
  }

  .mock--app .mock__body {
    padding: 14px;
  }

  .mock--app .stage {
    padding: 16px;
  }
}

/* ══ B8 Contact ═══════════════════════════════════════════════════ */
.contact {
  padding: 72px 0 var(--section);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 80px;
  align-items: start;
}

.contact__intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__steps-title {
  margin-top: 16px;
}

.contact__steps {
  display: flex;
  flex-direction: column;
  border-top: var(--border);
}

.contact__steps li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: var(--hairline);
  font-size: 19px;
  line-height: 27px;
}

.contact__num {
  flex-shrink: 0;
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0 0;
}

.contact__details dt {
  color: var(--grey);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}

.contact__details dd {
  margin: 4px 0 0;
}

.contact__email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  word-break: break-all;
}

.contact__copy {
  min-height: 36px;
  padding: 0 12px;
  border: var(--border);
  background: var(--white);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.contact__copy:hover,
.contact__copy.is-copied {
  background: var(--text);
  color: var(--bg);
}

.contact__form-wrap {
  padding: 32px;
  border: var(--border);
  background: var(--white);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form[hidden],
.form-done[hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-weight: 600;
}

.field__opt {
  color: var(--grey);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: var(--border);
  border-radius: 0;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 0;
}

.field [aria-invalid="true"] {
  border-color: var(--accent-deep);
  border-left-width: 6px;
}

.field__hint {
  color: var(--grey);
  font-size: 14px;
}

.field__error,
.form-fail {
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 600;
}

.field__error::before {
  content: "! ";
}

.contact-form__submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.form-status {
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
}

.form-done {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-done:focus {
  outline: none;
}

@media (max-width: 900px) {
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .contact {
    padding-top: 40px;
  }

  .contact__form-wrap {
    padding: 20px;
  }
}

/* ══ B9 Legal pages (post layout, legal: true) ════════════════════ */
.post-head__grid--text {
  grid-template-columns: minmax(0, 1fr);
}

.post-head__grid--text .post-head__text {
  max-width: 820px;
}

.prose .legal-contact,
.prose .legal-note {
  padding: 16px 20px;
  border: var(--border);
  background: var(--white);
  font-size: 17px;
}

.prose .legal-contact {
  border-left: 6px solid var(--accent);
}

.prose .legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.prose .legal-grid > div {
  padding: 16px 18px;
  background: var(--bg);
}

.prose .legal-grid dt {
  font-weight: 600;
}

.prose .legal-grid dd {
  margin: 4px 0 0;
  color: var(--grey);
  font-size: 16px;
  line-height: 1.5;
}

.prose .legal-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prose .legal-card {
  padding: 18px 20px;
  border: var(--border);
  background: var(--white);
}

.prose .legal-card h3 {
  margin-top: 4px;
}

.prose .legal-card p {
  margin-top: 6px;
  font-size: 17px;
}

.prose .legal-card .legal-card__tag {
  margin: 0;
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}
