/*
  Havihi Digital: the one stylesheet for havihi.digital.

  There are no inline styles anywhere on the site, so the Content-Security-Policy
  can stay at style-src 'self'. Keep it that way: add classes here instead.

  Colour rules
  - --brand (#D46613) is for the logo, large display type (24px and up) and
    decoration only. It is 3.68:1 on white, so it must never carry small text.
  - --accent carries links and accent text: #A84F0E on the light theme
    (5.54:1 on white) and #E8843A on the dark theme (6.91:1 on #16120F).
  - --tint is the warm panel used by the foundation figure and the example
    boxes. Ink, muted and accent text all pass on it in both themes.
  - --line-graphic is for strokes that carry meaning (3:1 or better).
  - The two coloured bands (.band-ink and .cta-band) don't use colours of their
    own in their children. Each band redefines --bg, --ink, --muted, --accent and
    --focus from its --band-* or --cta-* tokens, so every component inside it
    just works. contrast.py checks those band pairs by name.
  - Run `python3 ~/Havihi/presence/site-tools/contrast.py` after changing any colour token.

  Themes follow the device setting (prefers-color-scheme). There's no toggle,
  because a toggle would need JavaScript and the site runs none.

  Icons live in /assets/icons.svg (a sprite of <symbol>s, drawn in currentColor).
  Every icon sits beside a text label and is aria-hidden.

  When you change this file, bump the ?v= number in every page's stylesheet link
  (python3 ~/Havihi/presence/site-tools/stamp.py does it) and in
  ~/Havihi/presence/site-tools/article-template.html, then rebuild the articles,
  because site.css is cached for a year.
*/

:root {
  color-scheme: light dark;

  --bg: #FCFAF7;
  --surface: #F4EEE6;
  --tint: #F7E6D6;
  --ink: #1D1814;
  --muted: #574E47;
  --line: #DDD1C3;
  --line-strong: #C9B8A5;
  --line-graphic: #8C7B6B;
  --accent: #A84F0E;
  --accent-strong: #8A400B;
  --brand: #D46613;
  --on-accent: #FFFFFF;
  --focus: #A84F0E;

  --band-bg: #1D1814;
  --band-fg: #F3EDE6;
  --band-muted: #C0B5AA;
  --band-accent: #E8843A;
  --band-line: #3D332B;

  --cta-bg: #D46613;
  --cta-fg: #1D1814;
  --cta-btn-bg: #1D1814;
  --cta-btn-fg: #F3EDE6;
  --cta-focus: #1D1814;

  --glow: #F7E6D6;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wide: 76rem;
  --measure: 40rem;
  --gutter: 1rem;
  --space-section: clamp(3.25rem, 2rem + 4vw, 5.25rem);
  --radius: 6px;
  --radius-lg: 12px;
  --shadow-1: 0 1px 2px rgb(29 24 20 / 0.06), 0 10px 28px -14px rgb(29 24 20 / 0.28);
  --display-xl: clamp(2.375rem, 1.3rem + 3.9vw, 4.5rem);
  --display-l: clamp(1.875rem, 1.3rem + 2.2vw, 3.25rem);
  --hatch: repeating-linear-gradient(-45deg, var(--line-strong) 0 1px, transparent 1px 7px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16120F;
    --surface: #211A15;
    --tint: #33241A;
    --ink: #F3EDE6;
    --muted: #C0B5AA;
    --line: #3D332B;
    --line-strong: #5A4A3D;
    --line-graphic: #85725F;
    --accent: #E8843A;
    --accent-strong: #F29A55;
    --brand: #D46613;
    --on-accent: #16120F;
    --focus: #E8843A;

    --band-bg: #2B1D13;
    --band-fg: #F3EDE6;
    --band-muted: #C0B5AA;
    --band-accent: #E8843A;
    --band-line: #4A3828;

    --cta-bg: #33241A;
    --cta-fg: #F3EDE6;
    --cta-btn-bg: #E8843A;
    --cta-btn-fg: #16120F;
    --cta-focus: #E8843A;

    --glow: #2A1D14;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px -14px rgb(0 0 0 / 0.6);
  }
}

@media (min-width: 40em) {
  :root { --gutter: 1.5rem; }
}

@media (min-width: 64em) {
  :root { --gutter: 2rem; }
}

/* Base */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

@media (min-width: 48em) {
  body { font-size: 1.125rem; }
}

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

h1,
h2,
h3 { line-height: 1.15; text-wrap: balance; }

h1,
h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }

h3 { font-size: 1.1875rem; font-weight: 650; line-height: 1.3; }

p,
li,
dd { text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }

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

main:focus { outline: none; }

/* Leave room for the focus outline when the browser scrolls a focused link into view */
a,
button,
summary,
[tabindex] { scroll-margin-block: 1.5rem; }

[id] { scroll-margin-top: 1.5rem; }

strong { font-weight: 650; }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface);
  border-radius: 3px;
  padding: 0.1em 0.3em;
}

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

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

/* Icons from the sprite, and the arrow on links that open a new tab */

.icon {
  display: inline-block;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
}

.icon-sm { width: 1.125rem; height: 1.125rem; }

.ext-tail { white-space: nowrap; }

.ext-icon {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-inline-start: 0.3em;
  vertical-align: 0.05em;
}

/* Skip link */

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background-color: var(--ink);
  color: var(--bg);
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible { transform: none; color: var(--bg); }

/* Header
   From 64em the six main links and the Contact us button sit in a row. Below
   that, a Menu button built from <details> opens the same links in two groups.
   It needs no JavaScript and pushes the page down, so it never covers content
   and keyboard focus is never hidden behind it. */

.site-header { border-top: 3px solid var(--brand); border-bottom: 1px solid var(--line); }

.header-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding-block: 0.75rem;
}

.brand { display: inline-flex; align-items: center; min-height: 48px; }

.brand img { display: block; width: auto; height: 2.25rem; }

@media (min-width: 48em) {
  .header-inner { padding-block: 1.125rem; }
  .brand img { height: 2.625rem; }
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.125rem;
  margin: 0 -0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

.nav-list a[aria-current] {
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--brand);
  text-underline-offset: 0.35em;
}

.nav-list .nav-cta {
  margin-left: 0.75rem;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 650;
}

.nav-list .nav-cta:hover,
.nav-list .nav-cta[aria-current] {
  background-color: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
}

.nav-wide { display: none; }

.nav-menu-wrap { flex-basis: 100%; }

.nav-menu > summary {
  position: absolute;
  top: calc(0.75rem + 2px);
  right: var(--gutter);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-graphic);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.nav-menu > summary::-webkit-details-marker { display: none; }

.nav-menu > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }

.nav-menu > summary:hover { border-color: var(--accent); }

.nav-menu[open] { padding-bottom: 0.75rem; }

.menu-label { margin: 1.25rem 0 0.25rem; color: var(--muted); font-size: 0.8125rem; }

.nav-menu .nav-list { display: block; margin: 0; border-top: 1px solid var(--line); }

.nav-menu .nav-list li { border-bottom: 1px solid var(--line); }

.nav-menu .nav-list a {
  display: flex;
  min-height: 48px;
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

@media (min-width: 30em) {
  .nav-menu .nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
}

.menu-cta { margin: 1.25rem 0 0; }

.menu-cta .button { display: block; width: 100%; text-align: center; }

@media (min-width: 48em) {
  .nav-menu > summary { top: calc(1.125rem + 4px); }
}

@media (min-width: 64em) {
  .nav-wide { display: block; }
  .nav-menu-wrap { display: none; }
}

/* Shared type pieces */

.eyebrow,
.kicker {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

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

/* Small uppercase labels share one look */
.menu-label,
.head-card-title,
.rung-step,
.rail-step,
.boundary-label,
.product-card dt,
.next-steps-title,
.example figcaption,
.first-step-label,
.note-item .note-kind,
.footer-label,
.ll-years { font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }

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

.lead {
  max-width: 40rem;
  margin: 0 0 1rem;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.3125rem);
  line-height: 1.55;
}

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

/* Page heads and sections */

.hero,
.page-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image: radial-gradient(56rem 32rem at 92% -12%, var(--glow), transparent 70%);
}

/* A faint survey grid, faded out towards the text */
.hero::before,
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(100deg, transparent 40%, #000 80%);
  mask-image: linear-gradient(100deg, transparent 40%, #000 80%);
  opacity: 0.75;
}

.hero { padding-block: clamp(2.5rem, 1.75rem + 4vw, 4.75rem) clamp(2.5rem, 2rem + 3vw, 4rem); }

.hero-grid { display: grid; gap: 2.5rem 4rem; align-items: center; }

@media (min-width: 60em) {
  .hero-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}

.hero h1 {
  max-width: 16ch;
  margin: 0 0 1.5rem;
  font-size: var(--display-xl);
  line-height: 1.02;
  letter-spacing: -0.022em;
}

.hero h1 .year { color: var(--brand); }

.hero .lead { max-width: 34rem; font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); }

.page-head {
  padding-block: clamp(2.5rem, 2rem + 4vw, 5rem) clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 22ch;
  margin: 0 0 1.5rem;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.875rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
}

.page-head .actions { margin-top: 1.5rem; }

.section { padding-block: var(--space-section); }

.section + .section { border-top: 1px solid var(--line); }

.section.section-tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3rem); }

.section h2,
.prose h2 { margin: 0 0 1rem; font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.625rem); }

/* Small uppercase labels that are headings (kept as h2 for the outline) */
.section h2.kicker,
.prose h2.kicker,
.toc h2.kicker {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* Section heads that use the width: eyebrow and h2 on the left, intro on the right */
.section-head { display: grid; gap: 0.75rem 4rem; margin-bottom: 2.5rem; }

.section-head h2 { margin-bottom: 0; }

.section-head > p,
.section-head > div > p:not(.eyebrow) { max-width: var(--measure); margin: 0; }

.section-head > div > p:not(.eyebrow) + p { margin-top: 1rem; }

@media (min-width: 60em) {
  .section-head {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: end;
    margin-bottom: 2.75rem;
  }
  .section-head > p,
  .section-head > div:last-child > p:not(.eyebrow) { font-size: 1.1875rem; }
}

.split { display: grid; gap: 2rem 4rem; }

@media (min-width: 60em) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
}

/* Page heads with a short card beside the lead on wide screens */

.head-grid { display: grid; gap: 2rem 4rem; }

@media (min-width: 60em) {
  .head-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
}

.head-card {
  margin: 0;
  padding: 1.25rem 1.5rem 1.1rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.head-card-title {
  font-family: var(--font-body);
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.head-card dl { display: grid; margin: 0; }

.head-card dl > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.head-card dt { color: var(--muted); }

.head-card dt a { display: inline-block; padding-block: 0.2rem; }

.head-card dd { margin: 0; font-weight: 650; }

.head-card p { margin: 0.5rem 0 0; font-size: 0.9375rem; }

/* Key terms under an offer's summary */

.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
}

.terms > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
}

.terms dt { color: var(--muted); }

.terms dd { margin: 0; font-weight: 650; }

/* Background bands give the page its chapters, so fewer hairlines are needed */

.surface-band { background-color: var(--surface); }
.tint-band { background-color: var(--tint); }

.section.surface-band,
.section.tint-band,
.section.band-ink,
.surface-band + .section,
.tint-band + .section,
.band-ink + .section,
.facts-strip + .section,
.page-head + .section { border-top: 0; }

@media (prefers-color-scheme: dark) {
  .tint-band { background-color: var(--surface); }
}

/* The ink band: one per page at most, for the long view */
.band-ink {
  --bg: var(--band-bg);
  --surface: var(--band-bg);
  --ink: var(--band-fg);
  --muted: var(--band-muted);
  --accent: var(--band-accent);
  --accent-strong: var(--band-fg);
  --line: var(--band-line);
  --line-strong: var(--band-line);
  --focus: var(--band-accent);
  background-color: var(--bg);
  color: var(--ink);
}

/* Buttons and link rows */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin: 2rem 0 0;
}

.button {
  display: inline-block;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  line-height: 1.5;
  background-color: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  text-decoration: none;
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}

.button:hover { background-color: var(--accent-strong); color: var(--on-accent); }

.text-link {
  display: inline-block;
  min-height: 44px;
  padding-block: 0.55rem;
  line-height: 1.6;
  font-weight: 650;
}

.text-link > .icon,
.button > .icon,
.chooser-link > .icon { margin-inline-start: 0.35rem; vertical-align: -0.2em; }

.link-list {
  display: grid;
  gap: 0;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.link-list a { display: inline-block; padding-block: 0.625rem; font-weight: 650; }

.link-cols { column-gap: 3rem; }

@media (min-width: 40em) {
  .link-cols { display: block; columns: 2; }
  .link-cols li { break-inside: avoid; }
}

.after-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

/* Home: the Groundline figure.
   The list is written from the ground up (rules first, agents last), which is
   the order a screen reader hears. column-reverse draws it the other way up. */

.groundline {
  margin: 0;
  padding: 1.25rem 1.25rem 1rem;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

@media (min-width: 40em) {
  .groundline { padding: 1.5rem 1.75rem 1.25rem; }
}

.gl-sky {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 132;
  margin-bottom: -0.25rem;
  overflow: hidden;
}

.gl-wave { fill: none; stroke-linecap: round; }

.gl-wave-far { stroke: var(--line-strong); stroke-width: 1.25; }
.gl-wave-mid { stroke: var(--line-graphic); stroke-width: 1.5; stroke-dasharray: 2 6; }
.gl-wave-now { stroke: var(--brand); stroke-width: 3; }
.gl-rider { fill: var(--surface); stroke: var(--brand); stroke-width: 3; }

.gl-horizon {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px dashed var(--line-graphic);
  color: var(--muted);
  font-size: 0.9375rem;
}

.gl-year {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.gl-strata {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gl-strata li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0 0.75rem;
  padding: 0.6rem 0.85rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.gl-strata .icon { grid-row: span 2; color: var(--accent); }

.gl-name { font-weight: 650; line-height: 1.3; }
.gl-note { color: var(--muted); font-size: 0.9375rem; line-height: 1.35; }

/* A stepped footing: each course sits wider than the one above it */
.gl-strata li:nth-child(2) { margin-inline: 3%; }
.gl-strata li:nth-child(3) { margin-inline: 6%; }
.gl-strata li:nth-child(4) { margin-inline: 9%; }
.gl-strata li:nth-child(5) { margin-inline: 12%; }

@media (max-width: 23em) {
  .gl-strata li:nth-child(n) { margin-inline: 0; }
}

.gl-strata li.gl-base {
  background-color: var(--tint);
  border-color: var(--line-strong);
  border-top: 3px solid var(--brand);
}

/* Section-drawing hatch for the ground under the footing */
.gl-ground {
  height: 0.9rem;
  margin-top: 0.35rem;
  border-top: 2px solid var(--line-graphic);
  background-image: var(--hatch);
}

.groundline figcaption { margin-top: 0.75rem; color: var(--muted); font-size: 0.9375rem; }

/* Facts strip: the company's commitments and checkable facts, never results */

.facts-strip { padding-block: 1.5rem; background-color: var(--surface); border-block: 1px solid var(--line); }

.facts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40em) { .facts-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64em) { .facts-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.facts-row li {
  display: grid;
  align-content: start;
  gap: 0.15rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--line-strong);
}

.fact-value {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1.1;
  font-variant-numeric: lining-nums;
}

.fact-label { color: var(--muted); font-size: 0.875rem; line-height: 1.35; }

/* Capability cards: one stretched link per card */

.cap-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40em) { .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .cap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }

.cap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem 1.5rem 1.25rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.cap-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.5rem;
  background-color: var(--tint);
  border-radius: 10px;
  color: var(--accent);
}

.cap-icon .icon { width: 1.75rem; height: 1.75rem; }

.cap-card h3,
.offer-card h3,
.rungs h3,
.note-item h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
}

.cap-card h3 a,
.offer-card h3 a,
.rungs h3 a,
.note-item h2 a { color: var(--ink); text-decoration: none; }

.cap-card h3 a::after,
.offer-card h3 a::after,
.rungs h3 a::after,
.note-item h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.cap-card p { margin: 0; color: var(--muted); }

.cap-arrow {
  margin-top: auto;
  padding-top: 0.25rem;
  color: var(--accent);
  box-sizing: content-box;
}

/* Phones: a compact row (icon beside the title, no arrow) keeps six cards short */
@media (max-width: 39.99em) {
  .cap-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.25rem 1rem;
    padding: 1.1rem 1.1rem 1.2rem;
  }
  .cap-icon { grid-row: span 2; width: 2.5rem; height: 2.5rem; margin: 0.1rem 0 0; }
  .cap-icon .icon { width: 1.5rem; height: 1.5rem; }
  .cap-card h3 { font-size: 1.3125rem; }
  .cap-arrow { display: none; }
}

.cap-card:hover,
.offer-card:hover,
.note-item:hover { border-color: var(--line-graphic); box-shadow: var(--shadow-1); }

.cap-card:hover h3 a,
.offer-card:hover h3 a,
.rungs > li:hover h3 a,
.note-item:hover h2 a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* The title link keeps its own focus ring, and the whole card lights up with it */
.cap-card:focus-within,
.offer-card:focus-within,
.rungs > li:focus-within,
.note-item:focus-within { border-color: var(--focus); box-shadow: var(--shadow-1); }

/* Short statements with a brand rule on top (home "the long view", about) */

.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 36em) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64em) {
  .pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pillars.pillars-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 3rem; }
}

.pillars > li { padding-top: 1rem; border-top: 2px solid var(--brand); }

.pillars .icon { margin-bottom: 0.75rem; color: var(--accent); }

.pillars h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
}

.pillars p { margin: 0; color: var(--muted); }

/* The long line in the ink band */

.longline { margin: -1rem 0 2.5rem; }

.ll-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 250;
  overflow: visible;
}

.ll-wave {
  fill: none;
  stroke: var(--band-muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.ll-now { stroke: var(--brand); stroke-width: 3; }
.ll-later { stroke-dasharray: 3 7; }
.ll-found { fill: var(--brand); }
.ll-tick { stroke: var(--band-muted); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.ll-years {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.ll-years span:last-child {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.longline-end { margin-bottom: 0; }

.ll-legend { max-width: 48rem; margin: 1.5rem 0 0; color: var(--muted); }

/* Ways to start on the home page: a rising staircase of four steps */

.rungs {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0 0 1rem;
  list-style: none;
  border-bottom: 2px solid var(--line-graphic);
  background-image: var(--hatch);
  background-repeat: no-repeat;
  background-size: 100% 0.75rem;
  background-position: bottom;
}

@media (min-width: 48em) { .rungs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (min-width: 64em) {
  .rungs { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; padding-bottom: 1.25rem; }
  .rungs > li:nth-child(1) { margin-top: 4.5rem; }
  .rungs > li:nth-child(2) { margin-top: 3rem; }
  .rungs > li:nth-child(3) { margin-top: 1.5rem; }
}

.rungs > li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.25rem 1rem;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 0 0 var(--radius) var(--radius);
}

.rung-step { margin: 0; color: var(--muted); font-size: 0.8125rem; }

.rungs p { margin: 0; color: var(--muted); }

.rungs dl,
.offer-card dl {
  display: grid;
  gap: 0.4rem;
  margin: auto 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.rungs dl > div,
.offer-card dl > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem; }

.rungs dt,
.offer-card dt { color: var(--muted); }

.rungs dd,
.offer-card dd { margin: 0; font-weight: 650; }

.rungs-after { display: grid; gap: 0.5rem 2rem; margin-top: 1.5rem; }

@media (min-width: 60em) {
  .rungs-after { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
  .rungs-after > :last-child { justify-self: end; }
}

.rungs-after p { margin: 0; }

.rungs-after > div { display: grid; gap: 0.35rem; }

/* One line under the How we work steps that turns the method into an invitation */

.how-ask { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* Numbered steps (how we work, first week, contact) */

.steps {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  position: relative;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0 1rem;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  content: counter(step) / "";
  grid-row: span 2;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
}

.steps h3 { margin: 0.2rem 0 0.4rem; }

.steps p { margin: 0; color: var(--muted); }

/* The same steps joined by a line */
.steps-v2 > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 2.6rem;
  bottom: -1.6rem;
  left: 0.55rem;
  width: 2px;
  background-color: var(--line-strong);
}

/* Rail: the four stages of a forward deployed engagement */

.rail {
  display: grid;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail > li { position: relative; padding-left: 2.25rem; }

.rail > li::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: 0;
  width: 0.9rem;
  height: 0.9rem;
  background-color: var(--brand);
  border-radius: 50%;
}

.rail > li::after {
  content: "";
  position: absolute;
  top: 1.5rem;
  bottom: -1.5rem;
  left: calc(0.45rem - 1px);
  width: 2px;
  background-color: var(--line-strong);
}

.rail > li:last-child::after { display: none; }

.rail-step {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.rail h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
}

.rail p { margin: 0; color: var(--muted); }

@media (min-width: 52em) {
  .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
  .rail > li { padding-top: 2rem; padding-left: 0; }
  .rail > li::before { top: 0; }
  .rail > li::after {
    top: calc(0.45rem - 1px);
    bottom: auto;
    left: 1.5rem;
    right: -1.5rem;
    width: auto;
    height: 2px;
  }
}

/* The handover bar under the rail: decorative, the stage text says it */
.handover { display: none; }

@media (min-width: 40em) {
  .handover {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.25rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 650;
  }
}

.handover-bar {
  height: 0.5rem;
  border-radius: 999px;
  background-image: linear-gradient(90deg, var(--brand), var(--line-graphic) 55%, var(--ink));
}

/* Proof you can check */

.proof-grid {
  display: grid;
  gap: 2rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40em) { .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .proof-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.proof-grid > li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
}

.proof-icon { width: 2rem; height: 2rem; color: var(--accent); }

.proof-grid h3 {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
}

.proof-grid p { margin: 0; color: var(--muted); }

.proof-grid .proof-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin-top: auto;
}

/* Phones: the icon sits beside the title */
@media (max-width: 39.99em) {
  .proof-grid > li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.9rem; }
  .proof-grid > li > :not(.proof-icon) { grid-column: 2; }
  .proof-icon { grid-row: span 1; width: 1.75rem; height: 1.75rem; margin-top: 0.3rem; }
}

.routing {
  max-width: 52rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.125rem;
}

/* Chips and the product boundary diagram (HTML, so it stays readable at 320px) */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.875rem;
}

.boundary {
  position: relative;
  margin: 0.75rem 0 0;
  padding: 2rem 1.25rem 1.25rem;
  background-color: var(--bg);
  border: 2px dashed var(--line-graphic);
  border-radius: var(--radius-lg);
}

.boundary-label {
  position: absolute;
  top: 0;
  left: 1rem;
  margin: 0;
  padding: 0 0.5rem;
  background-color: var(--bg);
  color: var(--accent);
  font-size: 0.8125rem;
  transform: translateY(-50%);
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.flow li {
  position: relative;
  padding: 0.5rem 0.9rem;
  background-color: var(--tint);
  border-radius: 999px;
  font-weight: 650;
}

.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1.25rem;
  width: 0.55rem;
  height: 0.55rem;
  border-top: 2px solid var(--line-graphic);
  border-right: 2px solid var(--line-graphic);
  transform: translateY(-50%) rotate(45deg);
}

.boundary-link { display: grid; gap: 0.5rem; align-items: center; }

@media (min-width: 30em) {
  .boundary-link { grid-template-columns: minmax(0, 1fr) 2rem minmax(0, 1fr); }
}

.node {
  display: grid;
  gap: 0.1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-weight: 650;
  line-height: 1.3;
}

.node small { color: var(--muted); font-size: 0.875rem; font-weight: 400; }

.node-join {
  justify-self: center;
  width: 2px;
  height: 1.25rem;
  background-image: linear-gradient(var(--line-graphic), var(--line-graphic));
}

@media (min-width: 30em) {
  .node-join { width: 100%; height: 2px; }
}

.boundary figcaption { margin-top: 1rem; color: var(--muted); font-size: 0.9375rem; }

/* Product fact card */

.product-card {
  margin: 0;
  padding: 1.5rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
}

.product-card-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.1;
}

.product-card-sub { margin: 0 0 1rem; color: var(--muted); }

.product-card dl { display: grid; gap: 0.9rem; margin: 0; }

.product-card dl > div {
  display: grid;
  gap: 0.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.product-card dt { color: var(--muted); font-size: 0.8125rem; }

.product-card dd { margin: 0; }

.package { font-family: var(--font-mono); font-size: 0.95em; }

.facts.product-facts { margin-top: 2rem; }

.statement {
  max-width: 34ch;
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.3;
}

/* The closing call band */

.cta-band {
  --bg: var(--cta-bg);
  --surface: var(--cta-bg);
  --ink: var(--cta-fg);
  --muted: var(--cta-fg);
  --accent: var(--cta-fg);
  --accent-strong: var(--cta-fg);
  --focus: var(--cta-focus);
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 5.25rem);
  background-color: var(--bg);
  color: var(--ink);
}

.cta-grid { display: grid; gap: 2.5rem 5rem; }

@media (min-width: 60em) {
  .cta-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
}

.cta-band h2 {
  max-width: 18ch;
  margin: 0 0 1rem;
  font-size: var(--display-l);
  line-height: 1.08;
}

.cta-band p { max-width: 36rem; margin: 0 0 1rem; }

.cta-band .button { background-color: var(--cta-btn-bg); color: var(--cta-btn-fg); }

.cta-band .button:hover {
  background-color: var(--cta-btn-bg);
  color: var(--cta-btn-fg);
  text-decoration: underline;
}

.next-steps {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: next;
}

.next-steps-title { margin: 0 0 1rem; font-size: 0.875rem; }

.next-steps li { position: relative; padding: 0 0 0 3rem; counter-increment: next; }

.next-steps li::before {
  content: counter(next);
  content: counter(next) / "";
  position: absolute;
  top: -0.15rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.125rem;
}

@media (prefers-color-scheme: dark) {
  .cta-band { border-top: 4px solid var(--brand); }
  .cta-band h2 { color: var(--brand); }
}

/* Big email address (contact) */

.email-big {
  display: inline-block;
  margin-top: 0.5rem;
  padding-block: 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.1rem + 2.4vw, 2.75rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* Long-form pages */

.prose { max-width: var(--measure); }

.prose > :first-child { margin-top: 0; }

.prose h2 { margin-top: 3rem; }

.prose h3 { margin: 2rem 0 0.5rem; }

.prose p,
.prose ul,
.prose ol { margin: 0 0 1.1rem; }

.prose ul,
.prose ol { padding-left: 1.25rem; }

.prose li { margin-bottom: 0.45rem; }

.prose li::marker { color: var(--muted); }

.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--brand);
  font-family: var(--font-display);
  font-size: 1.1875rem;
}

.prose figure { margin: 2rem 0; }

.updated { color: var(--muted); font-size: 0.9375rem; }

/* A numbered chapter label above an h2 in long pages (approach) */

.chapter-num,
.prose .chapter-num {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 3.5rem 0 0.6rem;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.chapter-num .icon { color: var(--accent); }

.prose .chapter-num + h2 { margin-top: 0; }

.prose > .chapter-num:first-child { margin-top: 0; }

/* Worked example: a rule and the test it becomes; also the contact note template */

.example {
  max-width: var(--measure);
  padding: 1.25rem 1.5rem;
  background-color: var(--tint);
  border-top: 3px solid var(--brand);
  border-radius: 0 0 var(--radius) var(--radius);
}

.prose .example { margin: 2rem 0; }

.example figcaption { margin: 0 0 1rem; color: var(--accent); font-size: 0.875rem; }

.example dl { display: grid; gap: 1rem; margin: 0; }

.example dl > div { display: grid; gap: 0.2rem; }

@media (min-width: 40em) {
  .example dl > div { grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; }
}

.example dt { font-weight: 650; }

.example dd { margin: 0; }

.example p { margin: 0 0 0.75rem; }

.example p:last-child { margin: 0; }

.example .subject {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

/* A small flow of chips joined by chevrons (approach) */

.flow-figure { margin: 2rem 0; }

.flow-figure .flow { margin: 0 0 0.75rem; }

.flow-figure figcaption { color: var(--muted); font-size: 0.9375rem; }

/* On-this-page navigation */

.toc {
  margin: 0 0 1rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--surface);
  border-radius: var(--radius);
}

.toc ol { margin: 0; padding-left: 1.25rem; }

.toc li { padding-block: 0; }

.toc a {
  display: block;
  padding-block: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover { color: var(--accent-strong); text-decoration: underline; }

@media (min-width: 48em) {
  .toc ol { columns: 2; column-gap: 3rem; }
  .toc li { break-inside: avoid; }
}

/* Jump chips in a page head (services) */

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.jump a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  background-color: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.jump .icon { color: var(--accent); }

.jump a:hover { border-color: var(--accent); color: var(--ink); }

/* Services and Ways to start: one block per offer */

.offer { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); border-top: 1px solid var(--line); }

.offer:first-of-type { border-top: 0; padding-top: 0; }

.offer h2 { max-width: 28ch; margin: 0 0 0.75rem; font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.375rem); }

.offer-summary { max-width: var(--measure); margin: 0 0 1.5rem; font-size: 1.1875rem; }

.offer-tile {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.25rem;
  background-color: var(--tint);
  border-radius: 10px;
  color: var(--accent);
}

.offer-tile .icon { width: 1.75rem; height: 1.75rem; }

.first-step {
  max-width: var(--measure);
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  background-color: var(--surface);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.first-step p { margin: 0 0 0.5rem; }

.first-step p:last-child { margin: 0; }

.first-step-label { color: var(--accent); font-size: 0.8125rem; }

@media (min-width: 64em) {
  .offer-2col {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 0 4rem;
    align-items: start;
  }
}

/* The side column only sticks when the window is tall enough to show all of it, so keyboard focus
   inside it can never sit below the fold on a short laptop screen. */
@media (min-width: 64em) and (min-height: 56em) {
  .offer-2col > .offer-side { position: sticky; top: 1.5rem; }
}

.offer-mail { margin: 2rem 0 0; }

.plain-words { max-width: var(--measure); margin: 0 0 1.25rem; color: var(--muted); }

.plain-words p { margin: 0 0 0.75rem; }

.facts .ticks { padding: 0; }

.facts .ticks > li { margin: 0; }

@media (min-width: 64em) {
  .offer-2col .facts > div { grid-template-columns: 8.5rem minmax(0, 1fr); }
  .offer-2col .facts { padding-top: 0.5rem; }
}

.facts {
  display: grid;
  gap: 1.5rem;
  max-width: 52rem;
  margin: 0;
}

.facts > div { display: grid; gap: 0.35rem; }

@media (min-width: 48em) {
  .facts > div { grid-template-columns: 10rem minmax(0, 1fr); gap: 1.5rem; }
}

.facts dt {
  padding-top: 0.2rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.facts dd { margin: 0; }

.facts dd p { margin: 0 0 0.75rem; }

.facts dd p:last-child,
.facts dd ul:last-child { margin-bottom: 0; }

.facts ul { margin: 0; padding-left: 1.25rem; }

.facts li { margin-bottom: 0.4rem; }

.note {
  max-width: var(--measure);
  padding: 1.25rem 1.5rem;
  background-color: var(--surface);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.note p { margin: 0 0 0.75rem; }

.note p:last-child { margin: 0; }

.note h2 { margin: 0 0 0.5rem; font-size: 1.375rem; }

.prose .note { margin-top: 3rem; }

/* Contact: the email and how to start side by side, then short notes */

.contact-grid { display: grid; gap: 2.5rem 4rem; }

@media (min-width: 60em) {
  .contact-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: start; }
}

.reply-note { margin: 0.25rem 0 0; color: var(--muted); }

.budget-note { max-width: var(--measure); margin: 1.25rem 0 0; }

.contact-card {
  padding: 1.5rem 1.5rem 1.25rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-1);
}

.contact-card h2 { margin: 0 0 1.25rem; font-size: 1.625rem; }

.contact-card .steps { gap: 1.25rem; }

.contact-card .steps > li::before { font-size: 1.875rem; }

.after-steps { margin: 1.25rem 0 0; }

.ticks + .after-steps { margin-top: 1.5rem; }

.template { margin: 0; }

.template figcaption { letter-spacing: 0.04em; }

.notes-grid { display: grid; gap: 2rem 3rem; }

@media (min-width: 48em) {
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.notes-grid h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
}

.notes-grid p { margin: 0; color: var(--muted); }

/* Tick lists: a check drawn in CSS beside each item */

.ticks {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks > li { position: relative; padding-left: 2.25rem; }

.ticks > li::before {
  content: "";
  position: absolute;
  top: 0.25em;
  left: 0;
  width: 1.3rem;
  height: 1.3rem;
  border: 1.5px solid var(--line-graphic);
  border-radius: 5px;
}

.ticks > li::after {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0.45rem;
  width: 0.4rem;
  height: 0.7rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(40deg);
}

@media (min-width: 60em) {
  .ticks.ticks-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 3rem; }
}

/* Ways to start: offer cards at a glance */

.offer-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40em) { .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .offer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }

.offer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.25rem 1rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.offer-card p { margin: 0; color: var(--muted); }

/* Ways to start: the chooser, one situation per block */

.chooser {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48em) {
  .chooser { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.chooser > li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.25rem 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.chooser p { margin: 0; }

.chooser-link {
  display: inline-block;
  margin-top: auto;
  padding-block: 0.625rem;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.chooser-link .icon { color: var(--accent); }

.chooser-link:hover { color: var(--accent-strong); text-decoration: underline; }

/* Long page with its on-this-page list beside the text on wide screens.
   The list stays first in the source, so it's also first for keyboard and screen-reader users. */

.with-aside > .toc { margin-bottom: 2.5rem; }

@media (min-width: 64em) {
  .with-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 16rem);
    justify-content: space-between;
    align-items: start;
    gap: 0 4rem;
  }
  .with-aside > .toc {
    grid-column: 2;
    grid-row: 1;
  }
  .with-aside > .toc ol { columns: 1; }
  .with-aside > :not(.toc) { grid-column: 1; grid-row: 1; }
}

/* Same rule as the Services side column: the list only sticks on windows tall enough to show all of it. */
@media (min-width: 64em) and (min-height: 42em) {
  .with-aside > .toc { position: sticky; top: 1.5rem; }
}

.with-aside > .prose { max-width: var(--measure); }

/* Supplier facts (trust) and the company card (about): a registry-style card */

.registry {
  position: relative;
  max-width: 56rem;
  padding: 1.75rem 1.5rem 1.5rem;
  background-color: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.registry::before {
  content: "";
  position: absolute;
  top: -0.75rem;
  left: -1px;
  right: -1px;
  height: 0.75rem;
  border-top: 2px solid var(--line-graphic);
  background-image: var(--hatch);
}

@media (min-width: 48em) {
  .registry { padding: 2rem 2.25rem 1.75rem; }
}

.registry .facts > div { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }

.registry .facts > div:last-child { padding-bottom: 0; border-bottom: 0; }

/* Trust: one short block per commitment */

.commit-grid { display: grid; gap: 0 3rem; }

@media (min-width: 48em) {
  .commit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.commit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 1rem;
  align-content: start;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

.commit .icon { grid-row: span 2; margin-top: 0.15rem; color: var(--accent); }

.commit h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.25;
}

.commit p { margin: 0; color: var(--muted); }

/* Questions page: questions as h3 under group h2s, answers always visible */

.qa h2 { padding-top: 2rem; border-top: 2px solid var(--brand); }

.qa > h2:first-child { margin-top: 0; }

.qa h3 {
  margin: 2rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.25;
}

/* Industries: one ruled block per pattern */

.patterns {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.pattern {
  display: grid;
  gap: 1rem 3rem;
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 56em) {
  .pattern { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

.pattern-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 1rem;
  align-items: start;
}

.monogram {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  background-color: var(--tint);
  border-radius: 10px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.pattern h2 { margin: 0.35rem 0 0; font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }

.pattern-intro { grid-column: 2; margin: 0.5rem 0 0; color: var(--muted); }

.pattern .facts > div { gap: 0.25rem 1.5rem; }

@media (min-width: 48em) {
  .pattern .facts > div { grid-template-columns: 9rem minmax(0, 1fr); }
}

/* Insights index: large cards with drawn covers */

.note-list {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48em) {
  .note-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}

.note-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 0 1.5rem;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.note-item > :not(.cover) { margin-inline: 1.5rem; }

.note-item p { margin-block: 0; color: var(--muted); }

.note-item .note-kind { color: var(--accent); font-size: 0.8125rem; }

.cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 200;
  margin-bottom: 0.75rem;
  background-color: var(--tint);
  border-bottom: 1px solid var(--line);
}

.cv-line { fill: none; stroke: var(--line-graphic); stroke-width: 1.5; stroke-linecap: round; }
.cv-strong { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cv-box { fill: var(--bg); stroke: var(--line-graphic); stroke-width: 1.5; }
.cv-course { fill: var(--bg); stroke: var(--line-graphic); stroke-width: 1.5; }
.cv-base { fill: var(--surface); stroke: var(--brand); stroke-width: 1.5; }

/* Articles (see ~/Havihi/presence/site-tools/article-template.html) */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.breadcrumb li + li::before {
  content: "/";
  content: "/" / "";
  margin-right: 0.5rem;
  color: var(--muted);
}

.breadcrumb a { display: inline-block; padding-block: 0.2rem; }

.article-meta { margin: 0; color: var(--muted); font-size: 0.9375rem; }

.summary {
  max-width: var(--measure);
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--surface);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.summary h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 650;
}

.summary ol { padding-left: 1.25rem; }

.summary li { margin-bottom: 0.35rem; }

/* Links that fill a list item get enough height to be an easy target (WCAG 2.5.8) */
.summary li > a:only-child,
.prose li > a:only-child { display: block; padding-block: 0.2rem; }

.summary p:last-child,
.summary ul:last-child,
.summary ol:last-child { margin-bottom: 0; }

.checklist { padding-left: 0; list-style: none; }

.checklist > li { position: relative; padding-left: 2rem; }

.checklist > li::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--muted);
  border-radius: 3px;
}

.table-wrap { max-width: 100%; margin: 1.5rem 0; overflow-x: auto; }

.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }

.prose th,
.prose td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose th { font-weight: 650; }

.prose pre {
  margin: 1.5rem 0;
  padding: 1rem;
  overflow-x: auto;
  background-color: var(--surface);
  border-radius: var(--radius);
}

.prose pre code { padding: 0; background: none; }

/* Footer */

.site-footer {
  padding-block: 3rem 2rem;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.footer-horizon { margin-bottom: 2.25rem; }

.products-actions { margin-top: 1.5rem; }

.footer-statement {
  max-width: 22ch;
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.5rem);
  line-height: 1.15;
}

.footer-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
}

.footer-line span:first-child {
  flex: 1;
  height: 2px;
  background-image: linear-gradient(90deg, var(--line-strong), var(--brand));
}

.footer-year {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
}

.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }

.footer-brand { grid-column: 1 / -1; }

@media (min-width: 36em) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 60em) {
  .footer-grid { grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}

.footer-brand p { max-width: 26rem; margin: 0 0 0.75rem; }

.footer-label { margin: 0 0 0.25rem; color: var(--muted); font-size: 0.8125rem; }

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

/* 15px text at 1.6 line height is 24px; 0.625rem top and bottom makes a 44px target */
.footer-list a,
.footer-email {
  display: inline-block;
  padding-block: 0.625rem;
  color: var(--ink);
  text-decoration: none;
}

.footer-list a:hover,
.footer-email:hover { color: var(--accent-strong); text-decoration: underline; }

.footer-list a[aria-current] {
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--brand);
}

.footer-email { font-weight: 650; }

.legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.legal p { margin: 0 0 0.35rem; }

.legal-proof { display: flex; align-items: center; gap: 0.5rem; }

.legal-proof .icon { color: var(--accent); }

/* Phones: tighter rhythm, so the home page stays within about twelve screens */

@media (max-width: 39.99em) {
  :root { --space-section: 2.75rem; }
  body { font-size: 1rem; }
  .cap-card p,
  .rungs p,
  .proof-grid p,
  .pillars p,
  .rail p,
  .steps p { font-size: 0.9375rem; line-height: 1.55; }
  .hero { padding-block: 1.75rem 2.25rem; }
  .hero h1 { margin-bottom: 1.1rem; }
  .hero .actions { margin-top: 1.5rem; gap: 0.25rem 1.5rem; }
  .hero-grid { gap: 2rem; }
  .gl-sky { display: none; }
  .groundline { padding: 1rem 1rem 0.9rem; }
  .gl-strata li { padding: 0.5rem 0.75rem; }
  .groundline figcaption { font-size: 0.875rem; }
  .facts-strip { padding-block: 1.25rem; }
  .section-head { margin-bottom: 1.75rem; }
  .cap-grid { gap: 0.75rem; }
  .cap-card { padding: 1rem 1rem 1.1rem; }
  .rungs > li { padding: 1rem 1rem 0.9rem; }
  .rungs dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .rungs dl > div { grid-template-columns: 1fr; gap: 0; }
  .longline { margin-bottom: 2rem; }
  .pillars { gap: 1.5rem; }
  .steps { gap: 1.5rem; }
  .rail { gap: 1.25rem; }
  .proof-grid { gap: 1.5rem; }
  .proof-grid > li { gap: 0.35rem; padding-top: 1rem; }
  .flow { gap: 0.5rem 1.4rem; }
  .flow li { padding: 0.35rem 0.75rem; font-size: 0.9375rem; }
  .flow li:not(:last-child)::after { right: -1rem; }
  .boundary { padding: 1.75rem 1rem 1rem; }
  .routing { margin-top: 2rem; font-size: 1.0625rem; }
  .cta-band { padding-block: 3rem; }
  .cta-grid { gap: 2rem; }
  .site-footer { padding-top: 2.5rem; }
  .footer-statement { font-size: 1.5rem; margin-bottom: 1rem; }
  .after-list,
  .rungs-after { margin-top: 1.25rem; }
  .chips { margin-top: 1rem; gap: 0.4rem; }
  .chip { font-size: 0.8125rem; padding: 0.2rem 0.6rem; }
  .products-actions { margin-top: 1.25rem; }
  .next-steps { gap: 0.75rem; }
  .gl-strata { gap: 0.3rem; }
  .section h2 { font-size: 1.625rem; }
  .rungs > li { gap: 0.35rem; }
  .rungs h3,
  .rail h3,
  .pillars h3 { font-size: 1.3125rem; }
  .proof-grid h3 { font-size: 1.25rem; }
  .steps h3 { margin: 0.1rem 0 0.25rem; font-size: 1.0625rem; }
  .steps > li::before { font-size: 1.875rem; }
  .steps-v2 > li:not(:last-child)::after { top: 2.25rem; bottom: -1.25rem; }
  .proof-grid .proof-links { column-gap: 1rem; }
  .footer-horizon { margin-bottom: 2rem; }
  .footer-grid { row-gap: 1.25rem; }
  .legal { margin-top: 1.75rem; }
}

/* Motion: the site has almost none, and only when people haven't asked for less */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  a,
  .button,
  .nav-menu > summary {
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, text-decoration-color 0.15s ease;
  }

  .cap-card,
  .offer-card,
  .note-item,
  .rungs > li { transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }

  .cap-card:hover,
  .offer-card:hover,
  .note-item:hover,
  .rungs > li:hover { transform: translateY(-2px); }

  .cap-arrow,
  .text-link .icon,
  .chooser-link .icon { transition: transform 0.2s ease; }

  .cap-card:hover .cap-arrow,
  .text-link:hover .icon,
  .chooser-link:hover .icon { transform: translateX(4px); }
}

/* Windows High Contrast and other forced-colour modes */

@media (forced-colors: active) {
  .button,
  .nav-menu > summary,
  .nav-list .nav-cta { border: 2px solid ButtonText; }
  .cap-card,
  .offer-card,
  .note-item,
  .rungs > li,
  .groundline,
  .gl-strata li,
  .node,
  .chip,
  .boundary,
  .chooser > li,
  .registry,
  .product-card,
  .pillars > li { border-color: CanvasText; }
  .gl-ground,
  .rungs,
  .registry::before,
  .hero,
  .page-head,
  .hero::before,
  .page-head::before { background-image: none; }
  .handover-bar,
  .rail > li::before,
  .rail > li::after,
  .steps-v2 > li::after { background: CanvasText; }
  .ticks > li::after { border-color: CanvasText; }
}

/* Print: plain white pages with ink text, links show where they go, no decoration.
   Trust and Questions are printed by reviewers, so they must read cleanly on paper. */

@media print {
  .skip-link,
  .site-header nav,
  .nav-menu,
  .ext-icon,
  .gl-sky,
  .ll-svg,
  .cover,
  .handover,
  .footer-line,
  .hero::before,
  .page-head::before,
  svg.icon { display: none; }

  body { background: #FFFFFF; color: #000000; }

  .band-ink,
  .cta-band,
  .surface-band,
  .tint-band,
  .facts-strip,
  .hero,
  .page-head,
  .site-footer,
  .toc,
  .note,
  .summary,
  .groundline,
  .example,
  .first-step,
  .chooser > li,
  .registry { background: none; color: #000000; box-shadow: none; }

  .cta-band { border-top: 2px solid #000000; }

  .with-aside > .toc { position: static; }

  h2,
  h3 { break-after: avoid; }

  li,
  .facts > div { break-inside: avoid; }

  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }

  a[href^="mailto:"]::after { content: " (hello@havihi.digital)"; font-size: 0.85em; }

  .footer-email::after,
  .email-big::after { content: none; }
}
