/* Dynamis Works · single stylesheet, mobile-first
   1 tokens · 2 base · 3 utilities · 4 buttons · 5 header · 6 sections · 7 footer · 8 motion */

/* 1. TOKENS ---------------------------------------------------------- */
:root {
  --cobalt: #2438F5;
  --ink: #0E1230;
  --ember: #FF5B2E;
  --sky: #E6EAFF;
  --paper: #FAFBFE;
  --surface: #EEF0F6;
  --slate: #565B7C;
  --line: #DDE0EC;
  --white: #FFFFFF;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", "Songti SC", serif;

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px; --s6: 64px; --s7: 104px; --s8: 168px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(72px, 11vw, 168px);
  --radius: 2px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* One treatment for every photo, calibrated on the hero shot (pexels 20044377):
     restrained colour, soft contrast, "washed" blacks and a slight warmth. */
  --photo-filter: saturate(.72) contrast(.93) brightness(1.03) sepia(.10);
  --photo-black: #1C222B;   /* how far the blacks lift (matte film effect) */
}

/* 2. BASE ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, fieldset, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--display); letter-spacing: -.025em; line-height: 1.05;
  text-wrap: balance; overflow-wrap: break-word; hyphens: manual;
}
/* German has long compound words: automatic hyphenation helps there */
:lang(de) :is(h1, h2, h3, h4) { hyphens: auto; }
p { max-width: 62ch; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: var(--radius); }
::selection { background: var(--cobalt); color: var(--white); }

/* 3. UTILITIES ------------------------------------------------------- */
.container { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--ink); color: var(--white); padding: 12px 16px; border-radius: var(--radius); }
.skip:focus { top: 12px; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); }
.section-head { display: grid; gap: var(--s4); max-width: 900px; margin-bottom: var(--s6); }
.section-head h2, .split-head h2, .contact h2 { font-size: clamp(34px, 5.4vw, 72px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.lede, .big { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.45; }
.lede { color: var(--slate); }
.photo { overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.photo:hover img { transform: scale(1.03); }

.split { display: grid; gap: var(--s5); }
.split-head { display: grid; gap: var(--s4); align-content: start; }
.split-body { display: grid; gap: var(--s4); }
@media (min-width: 1024px) {
  .split { grid-template-columns: 5fr 6fr; gap: var(--s7); }
  .split-head { position: sticky; top: calc(var(--header-h) + 40px); }
}

/* 4. BUTTONS --------------------------------------------------------- */
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 14px 22px;
  font: 600 16px/1.2 var(--body); text-decoration: none; text-align: left; cursor: pointer;
  border: 2px solid transparent; border-radius: var(--radius);
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--cobalt); color: var(--white); }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-ember { background: var(--ember); color: var(--ink); }
.btn-ember:hover { background: var(--white); color: var(--ink); }
.site-header .btn-ember:hover { background: var(--ink); color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-white:hover { background: var(--ink); color: var(--white); }
.btn-ghost-inv { border-color: var(--white); color: var(--white); }
.btn-ghost-inv:hover { background: var(--white); color: var(--cobalt); }
.link { color: var(--cobalt); font-weight: 600; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.link:hover { color: var(--ink); }

/* 5. HEADER ---------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-color: var(--line); }
.bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.logo svg { width: 34px; height: 34px; }
.logo-word { font: 400 22px/1 var(--display); letter-spacing: -.03em; white-space: nowrap; }
.logo-word b { font-weight: 800; }
.logo:hover svg circle { animation: pulse .6s var(--ease); transform-origin: 25px 24px; }

.menu-btn { width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--ink); margin-right: -12px; }
.menu-ico, .menu-ico::before, .menu-ico::after { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .25s var(--ease), background-color .2s; }
.menu-ico { position: relative; }
.menu-ico::before, .menu-ico::after { content: ""; position: absolute; left: 0; }
.menu-ico::before { top: -7px; } .menu-ico::after { top: 7px; }
.menu-btn[aria-expanded="true"] .menu-ico { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-ico::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-ico::after { transform: translateY(-7px) rotate(-45deg); }

.menu {
  /* absolute, not fixed: the header backdrop-filter becomes the containing block */
  position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); background: var(--paper);
  padding: var(--s5) var(--gutter) var(--s6); overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s5);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
}
.menu.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
html:not(.js) .menu { position: static; visibility: visible; opacity: 1; transform: none; display: none; }
.nav { display: grid; gap: var(--s2); }
.nav a { display: block; padding: 8px 0; font: 600 30px/1.15 var(--display); letter-spacing: -.03em; text-decoration: none; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--cobalt); }

.lang { position: relative; }
.lang-btn { display: none; }
.lang-list { display: flex; flex-wrap: wrap; gap: var(--s2); }
.lang-list a {
  display: inline-flex; align-items: center; font: 500 15px/1 var(--body); padding: 10px 14px; min-height: 40px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
}
.lang-list a[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.header-cta { align-self: flex-start; }

/* Perspectives in the menu: its own emphasis (another page, not an anchor) */
.nav-insights { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding-block: var(--s4); border-block: 1px solid var(--line); text-decoration: none; }
.ni-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ember); }
.ni-label { font: 600 30px/1.15 var(--display); letter-spacing: -.03em; color: var(--cobalt); }
.nav-insights small { grid-column: 2; font-size: 15px; color: var(--slate); }
.nav-insights:hover .ni-label { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .ni-dot { animation: ni-pulse 2.8s ease-out infinite; } }
@keyframes ni-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(255 91 46 / .5); } 50% { box-shadow: 0 0 0 7px rgb(255 91 46 / 0); } }

@media (min-width: 1280px) {
  :root { --header-h: 76px; }
  .menu-btn { display: none; }
  .menu, html:not(.js) .menu {
    position: static; height: auto; visibility: visible; opacity: 1; transform: none; padding: 0; overflow: visible; background: none;
    display: flex; flex-direction: row; align-items: center; gap: var(--s3); transition: none;
  }
  .nav { display: flex; gap: clamp(12px, 1.4vw, 26px); margin-right: var(--s2); }
  .nav a, .nav-insights, .header-cta { white-space: nowrap; }
  .nav a { font: 500 15px/1.2 var(--body); letter-spacing: 0; padding: 8px 0; position: relative; }
  .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--cobalt); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
  .nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
  .lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 10px; font: 600 14px/1 var(--body); background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); cursor: pointer; }
  .lang-btn svg { width: 12px; height: 12px; }
  .lang-btn:hover { border-color: var(--ink); }
  .lang-list {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; flex-direction: column; flex-wrap: nowrap; gap: 0;
    background: var(--white); border: 1px solid var(--ink); border-radius: var(--radius); padding: 6px;
    visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .lang.open .lang-list, html:not(.js) .lang:is(:hover, :focus-within) .lang-list { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .lang-list a { width: 100%; border: 0; display: flex; justify-content: space-between; align-items: center; text-align: left; }
  .lang-list a:hover:not([aria-current="true"]) { background: var(--surface); }
  .header-cta { align-self: auto; min-height: 44px; padding: 10px 18px; font-size: 15px; }
  .nav-insights { display: inline-flex; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); transition: border-color .2s, background-color .2s; }
  .ni-dot { width: 8px; height: 8px; }
  .ni-label { font: 600 15px/1.2 var(--body); letter-spacing: 0; }
  .nav-insights small { display: none; }
  .nav-insights:hover { border-color: var(--cobalt); }
  .nav-insights[aria-current="page"] { background: var(--sky); border-color: var(--cobalt); }
}

/* 6. SECTIONS -------------------------------------------------------- */

/* Hero */
.hero {
  position: relative; isolation: isolate; padding-top: calc(var(--header-h) + clamp(32px, 6vw, 88px));
  background:
    radial-gradient(55% 65% at 88% 28%, var(--sky) 0%, transparent 70%),
    radial-gradient(38% 45% at 6% 96%, #FFEFE9 0%, transparent 70%);
}
/* generative background (js/hero-canvas.js): paper darts and embers. Fades out at the bottom. */
.hero-canvas {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.hero-grid { display: grid; gap: var(--s6); align-items: center; }
.hero-copy { display: grid; gap: var(--s5); }
.hero h1 { font-size: clamp(42px, 7.6vw, 112px); font-weight: 800; letter-spacing: -.045em; line-height: .96; }
.hero h1 em, .pull { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.hero h1 em { color: var(--cobalt); }
.hero-sub { font-size: clamp(18px, 1.8vw, 23px); line-height: 1.5; color: var(--slate); max-width: 54ch; }

/* The hero artwork repeats the logo: stem + arc + dot */
.hero-visual { position: relative; display: grid; grid-template-columns: 17% 1fr; gap: 6%; width: min(100%, 520px); margin-inline: auto; aspect-ratio: 10 / 11; }
.hv-stem { background: var(--cobalt); clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
.hv-bow { overflow: hidden; border-radius: 0 999px 999px 0 / 0 50% 50% 0; background: var(--sky); }
.hv-bow img { width: 100%; height: 100%; object-fit: cover; }
.hv-dot { position: absolute; left: 23%; top: 50%; width: 11%; aspect-ratio: 1; border-radius: 50%; background: var(--ember); transform: translate(-50%, -50%); }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 7fr 5fr; gap: var(--s6); }
  .hero-visual { margin-inline: 0 0; justify-self: end; }
}

.proof {
  max-width: none; margin-top: clamp(48px, 7vw, 104px); padding-block: var(--s4); border-block: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); justify-content: space-between; align-items: center; font-size: 17px;
}
.proof a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--cobalt); text-underline-offset: 5px; white-space: nowrap; }
.proof a svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.proof a:hover svg { transform: translateY(3px); }

/* Manifesto */
.manifesto .split-body p { color: var(--slate); }
.manifesto .split-body .big { color: var(--ink); }
.pull { font-size: clamp(26px, 3.2vw, 44px); line-height: 1.2; color: var(--ink) !important; max-width: 24ch; margin-top: var(--s4); padding-top: var(--s5); border-top: 3px solid var(--ember); }

/* What we do */
.services { background: var(--surface); }
.rows { border-top: 1px solid var(--ink); }
.row { display: grid; gap: var(--s3); padding-block: var(--s5); border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); position: relative; transition: padding-left .4s var(--ease); }
.row h3 { font-size: clamp(26px, 3.4vw, 46px); font-weight: 600; letter-spacing: -.035em; transition: color .3s; }
.row p { color: var(--slate); }
/* Services: only the title is visible; the text opens on the arrow (native details, works without JS). */
.row details { grid-column: 1 / -1; }
.row summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); cursor: pointer; list-style: none; }
.row summary::-webkit-details-marker { display: none; }
.row summary:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 6px; }
.row-arrow { flex: none; width: 14px; height: 14px; margin-right: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-4px) rotate(45deg); transition: transform .3s var(--ease); }
.row details[open] .row-arrow { transform: translateY(3px) rotate(225deg); }
.row details p { margin-top: var(--s4); max-width: 62ch; }
.row::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--ember); transform: translateY(-50%) scale(0); transition: transform .4s var(--ease); }
@media (min-width: 860px) {
  .row { grid-template-columns: 6fr 5fr; gap: var(--s6); align-items: baseline; }
  .row:hover { padding-left: 36px; }
  .row:hover h3 { color: var(--cobalt); }
  .row:hover::before { transform: translateY(-50%) scale(1); }
}

/* Size in numbers */
.scale { background: var(--ink); color: var(--paper); padding-block: clamp(48px, 7vw, 96px); margin-top: clamp(48px, 7vw, 104px); }
.scale-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s4); }
.scale-grid > div { display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid #3A3F68; }
.scale dt { font: 800 clamp(40px, 5vw, 80px)/.95 var(--display); letter-spacing: -.05em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scale-grid > div { min-width: 0; }
.scale dt::after { content: ""; display: block; width: 36px; height: 4px; background: var(--ember); margin-top: var(--s3); }
.scale dd { font-size: 16px; line-height: 1.45; color: #C9CDE6; max-width: 26ch; }
@media (min-width: 900px) { .scale-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hero .proof { border-bottom: 0; }

/* How we roll out: closed block on its own background, three steps and a full-width closing line */
.deploy { background: var(--surface); }
.deploy .steps { margin-bottom: var(--s6); }
.deploy .steps li { border-top-color: var(--line); }
.deploy .pull { margin-top: 0; }
@media (min-width: 1024px) { .deploy .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Featured implementations: rotating, straight photo on one side, application on the other */
.case { background: var(--paper); }
.case .carousel-ui { border-top-color: var(--ink); }
.case .car-btn { color: var(--ink); border-color: var(--ink); }
.case .car-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.case-slide { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--s5); align-items: stretch; }
/* the photo fills the box instead of sizing it: on iPhone, a lazy image off to the side collapsed the box */
.case-photo { width: 100%; overflow: hidden; border-radius: var(--radius); background: var(--surface); aspect-ratio: 9 / 10; }
.case-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.case-body { display: grid; gap: var(--s3); align-content: center; }
.case-tag { font: 600 12px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); }
.case-body h3 { font-size: clamp(30px, 3.6vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; }
.case-text { color: var(--slate); font-size: clamp(17px, 1.4vw, 19px); }
.case-app-wrap { position: relative; isolation: isolate; overflow: hidden; margin-top: var(--s3); border-radius: var(--radius); border: 1px solid var(--line); }
.case-app { display: block; width: 100%; height: auto; filter: var(--photo-filter); }
.case-app-wrap::after { content: ""; position: absolute; inset: 0; background: var(--photo-black); mix-blend-mode: lighten; pointer-events: none; }
.case-client { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); max-width: none; padding-top: var(--s3); border-top: 1px solid var(--ink); }
.case-logo { height: 44px; width: auto; border-radius: 8px; }
.case-client { align-items: center !important; }
.case-client b { font: 600 20px/1.2 var(--display); letter-spacing: -.02em; }
.case-logo-link { display: block; line-height: 0; border-radius: 8px; transition: opacity .2s; }
.case-logo-link:hover { opacity: .85; }
.case-visit { display: inline-flex; align-items: center; gap: 6px; color: var(--cobalt); font-weight: 600; text-decoration: none; white-space: nowrap; }
.case-visit svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.case-visit:hover span { text-decoration: underline; text-underline-offset: 5px; }
.case-visit:hover svg { transform: translate(2px, -2px); }
/* Narrow screens: no carousel. Each case is taller than the screen, so a swipe left the reader
   at the bottom of the previous one. The three cases stack and read top to bottom. */
@media (max-width: 959px) {
  .case .track { flex-direction: column; overflow: visible; scroll-snap-type: none; gap: var(--s7); }
  .case .slide { flex: none; }
  .case .carousel-ui { display: none; }
  .case-photo { aspect-ratio: 4 / 3; }
}
/* Wide screens: the arrows sit above the slides. Below, they fell off the bottom of the screen, under the tall photo. */
@media (min-width: 960px) {
  .case .carousel { display: flex; flex-direction: column; }
  .case .carousel-ui { order: -1; margin: 0 0 var(--s5); padding: 0 0 var(--s4); border-top: 0; border-bottom: 1px solid var(--ink); }
}
@media (min-width: 960px) {
  .case-slide { grid-template-columns: 5fr 6fr; gap: var(--s7); }
  .case-photo { aspect-ratio: auto; min-height: 560px; }
}

/* How we work */
.steps { display: grid; gap: var(--s5); counter-reset: step; margin-bottom: var(--s7); }
.steps li { counter-increment: step; display: grid; gap: var(--s3); align-content: start; padding-top: var(--s4); border-top: 1px solid var(--ink); position: relative; }
.steps li::before { content: counter(step); font: 800 15px/1 var(--display); color: var(--cobalt); }
.steps li::after { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--ember); }
.steps h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; }
.steps p, .diffs p { color: var(--slate); font-size: 16px; }
.method-lower { display: grid; gap: var(--s6); align-items: center; }
.diffs { display: grid; gap: var(--s5); }
.diffs li { display: grid; gap: var(--s2); }
.diffs h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
  .method-lower { grid-template-columns: 6fr 5fr; gap: var(--s7); }
}

/* People */
.people { padding-top: var(--section); }
.mosaic { display: grid; gap: var(--s3); margin-block: var(--s6) var(--s7); }
/* Phone: the three photos become a swipe strip, edge to edge, with the next one peeking in */
@media (max-width: 719px) {
  .mosaic { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .mosaic::-webkit-scrollbar { display: none; }
  .mosaic .photo { flex: 0 0 86%; aspect-ratio: 4 / 3; scroll-snap-align: start; }
}
@media (min-width: 720px) {
  .mosaic { grid-template-columns: 5fr 3fr; grid-template-rows: 1fr 1fr; gap: var(--s4); }
  .m1 { grid-row: span 2; }
}
.sub-title { font: 600 13px/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); margin-bottom: var(--s4); }
.values { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.values li { display: grid; gap: var(--s2); padding-block: var(--s4); border-bottom: 1px solid var(--line); }
.values h4 { font-size: clamp(22px, 2.4vw, 32px); font-weight: 600; }
.values p { color: var(--slate); }
@media (min-width: 720px) { .values li { grid-template-columns: 2fr 3fr; gap: var(--s5); align-items: baseline; } }


/* Testimonials (scroll-snap carousel: works with touch, keyboard and without JS) */
.voices { background: var(--cobalt); color: var(--white); }
.voices .eyebrow { color: var(--white); opacity: .85; }
.voices-head { display: grid; gap: var(--s4); max-width: 820px; margin-bottom: var(--s6); }
.voices-head h2 { font-size: clamp(30px, 4.4vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: var(--s5); border-radius: var(--radius); }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.voice { display: grid; gap: var(--s5); align-items: center; }
.voice-photo { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; width: min(60%, 300px); background: var(--ink); }
.voice-photo img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filter); }
.voice-photo::after { content: ""; position: absolute; inset: 0; background: var(--photo-black); mix-blend-mode: lighten; pointer-events: none; }
.voice-body { display: grid; gap: var(--s4); }
.voice blockquote p { font: italic 400 clamp(23px, 3vw, 42px)/1.24 var(--serif); letter-spacing: -.01em; max-width: 26em; }
.voice figcaption { display: grid; line-height: 1.35; }
.voice figcaption b { font: 600 22px/1.2 var(--display); letter-spacing: -.02em; }
.voice figcaption span { font-size: 15px; opacity: .85; }
@media (min-width: 860px) { .voice { grid-template-columns: 300px minmax(0, 1fr); gap: var(--s7); } .voice-photo { width: 100%; } }
/* Phone: the arrows sit in the empty space beside the photo. At the bottom of the tallest slide they fell under Safari's toolbar and a tap opened the toolbar instead. */
@media (max-width: 859px) {
  .voices .carousel { position: relative; }
  .voice-photo { width: min(60%, 100% - 132px, 300px); }
  .voices .carousel-ui { position: absolute; top: 0; right: 0; margin: 0; padding: 0; border: 0; }
}
/* Testimonials (scroll-snap carousel: works with touch, keyboard and without JS) */
.voices { background: var(--cobalt); color: var(--white); }
.voices .eyebrow { color: var(--white); opacity: .85; }
.voices-head { display: grid; gap: var(--s4); max-width: 820px; margin-bottom: var(--s6); }
.voices-head h2 { font-size: clamp(30px, 4.4vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: var(--s5); border-radius: var(--radius); }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.slide figure { display: grid; gap: var(--s5); }
.slide blockquote p { font: italic 400 clamp(24px, 3.6vw, 50px)/1.22 var(--serif); letter-spacing: -.01em; max-width: 26ch; max-width: min(100%, 30em); }
.slide figcaption { display: flex; align-items: center; gap: var(--s3); }
.slide figcaption img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--white); }
.slide figcaption > span { display: grid; line-height: 1.35; }
.slide figcaption b { font: 600 20px/1.2 var(--display); letter-spacing: -.02em; }
.slide figcaption span span { font-size: 15px; opacity: .85; }
.carousel-ui { display: flex; align-items: center; justify-content: flex-end; gap: var(--s4); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid rgb(255 255 255 / .4); }
/* the counter is for screen readers only */
.count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.count b { font: 800 28px/1 var(--display); }
.carousel-nav { display: flex; gap: var(--s2); }
.car-btn { width: 52px; height: 52px; display: grid; place-items: center; background: transparent; color: var(--white); border: 2px solid var(--white); border-radius: 50%; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .2s, color .2s, opacity .2s; }
.car-btn svg { width: 22px; height: 22px; }
.car-prev svg { transform: rotate(180deg); }
.car-btn:hover:not(:disabled) { background: var(--white); color: var(--cobalt); }
.car-btn:disabled { opacity: .35; cursor: default; }
html:not(.js) .carousel-ui { display: none; }

/* Careers */
.careers { background: var(--sky); }
.careers .lede { color: var(--ink); }
.careers-top { display: grid; gap: var(--s5); align-items: end; margin-bottom: var(--s6); }
.careers-top .section-head { margin-bottom: 0; }
.reasons { display: grid; gap: var(--s5) var(--s4); margin-bottom: var(--s6); }
.reasons li { display: grid; gap: var(--s2); align-content: start; padding-top: var(--s4); border-top: 1px solid var(--ink); }
.reasons h3 { font-size: 22px; font-weight: 600; line-height: 1.15; }
.reasons p { font-size: 16px; color: #3B4063; }
@media (min-width: 720px) { .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .careers-top { grid-template-columns: 6fr 5fr; gap: var(--s7); }
  .reasons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* an invitation, without promising an open role */
.careers-note { font: italic 400 clamp(19px, 1.7vw, 23px)/1.3 var(--serif); color: var(--ink); max-width: 28ch; }

/* Contact */
.contact { background: var(--ink); color: var(--paper); }
.contact .eyebrow { color: var(--ember); }
.contact .lede { color: #C9CDE6; }
.contact-grid { display: grid; gap: var(--s6); }
.contact-copy { display: grid; gap: var(--s4); align-content: start; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 5fr 6fr; gap: var(--s7); } }

.form { display: grid; gap: var(--s4); }
.who { display: flex; flex-wrap: wrap; gap: var(--s2); }
.who legend, .field label { font-size: 14px; font-weight: 600; letter-spacing: .02em; margin-bottom: var(--s2); display: block; }
.field label small { font-weight: 400; color: #A4A9C8; }
/* Turnstile only shows up when it needs the person (interaction-only): no space reserved */
.captcha:empty { display: none; }
/* Sent: nothing disappears or turns into a coloured box. The fields recede, the thanks arrives in the site's typography. */
.form .field, .form .who, .form .btn { transition: opacity .6s var(--ease), background-color .4s, color .4s, border-color .4s; }
.form--sent .field, .form--sent .who { opacity: .38; pointer-events: none; }
.form--sent .btn, .form--sent .btn:hover { background: transparent; color: var(--paper); border-color: #4A4F78; box-shadow: none; cursor: default; opacity: 1; }
.form--sent .btn svg { display: none; }
.form--sent .btn span::after { content: ""; display: inline-block; width: .42em; height: .78em; margin-left: .7em; border: solid var(--ember); border-width: 0 2px 2px 0; transform: translateY(-.12em) rotate(45deg); }
.form-status[data-state="sent"] { padding: 0; background: none; color: var(--paper); font: 600 clamp(20px, 2.1vw, 26px)/1.25 var(--display); letter-spacing: -.02em; max-width: 24ch; outline: 0; animation: sent-in .7s var(--ease) both; }
.form-status[data-state="sent"]::before { content: ""; display: block; width: 36px; height: 4px; background: var(--ember); margin-bottom: var(--s3); }
@keyframes sent-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .form-status[data-state="sent"] { animation: none; } }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; appearance: none; -webkit-appearance: none; cursor: pointer; }
.chip span { display: block; white-space: nowrap; padding: 12px 16px; font-size: 15px; font-weight: 500; line-height: 1.2; border: 1px solid #4A4F78; border-radius: 999px; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover span { border-color: var(--paper); }
.chip input:checked + span { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--ember); outline-offset: 3px; }
/* Phone: the three subjects on one line (on very narrow screens it wraps as before). */
@media (max-width: 520px) {
  .who { gap: 6px; }
  .chip span { padding: 10px 11px; font-size: 13px; letter-spacing: -.01em; }
}
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: 400 17px/1.4 var(--body); color: var(--paper); background: transparent;
  border: 0; border-bottom: 1px solid #6A6F98; border-radius: 0; padding: 10px 0 12px; transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
/* Phone: country code + number on one line; the select matches the other fields. */
.tel { display: grid; grid-template-columns: minmax(0, 11.5em) minmax(0, 1fr); gap: var(--s4); align-items: end; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 22px; text-overflow: ellipsis;
  background: no-repeat right 2px center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23C9CDE6' stroke-width='2'/%3E%3C/svg%3E"); }
.field select option { color: var(--ink); background: var(--paper); }
@media (max-width: 520px) { .tel { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr); gap: var(--s3); } }
.field ::placeholder { color: #8E93B5; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--paper); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 0; border-color: var(--ember); box-shadow: 0 2px 0 var(--ember); }
.field [aria-invalid="true"] { border-color: #FF8A6B; }
.err { font-size: 14px; color: #FF9D83; min-height: 0; margin-top: 6px; }
.err:empty { display: none; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 0 12px; align-items: start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ember); }
.check label { margin: 0; font-weight: 400; font-size: 15px; }
.check .err { grid-column: 2; }
.form .btn { justify-self: start; }
/* Phone: the whole form fits on one screen, from the subjects to the button */
@media (max-width: 719px) {
  .form { gap: var(--s3); }
  .who legend, .field label { font-size: 13px; margin-bottom: 0; }
  .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea { font-size: 16px; padding: 6px 0 8px; }
  .field textarea { min-height: 0; height: 84px; }
  .check label { font-size: 14px; }
}
/* form honeypot: off screen for people, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-weight: 600; padding: 14px 16px; border-radius: var(--radius); }
.form-status:empty { display: none; }
.form-status[data-state="ok"] { background: #12382B; color: #9FF0CB; }
.form-status[data-state="demo"] { background: #3A2A12; color: #FFD79A; }
.form-status[data-state="fail"] { background: #3A1A12; color: #FFB49E; }

/* 7. FOOTER ---------------------------------------------------------- */
.site-footer { background: var(--ink); color: #C9CDE6; padding-block: var(--s6) var(--s5); border-top: 1px solid #2A2F55; font-size: 15px; }
.foot-grid { display: grid; gap: var(--s5); margin-bottom: var(--s6); }
.site-footer .logo { color: var(--paper); }
.foot-brand { display: grid; gap: var(--s3); align-content: start; justify-items: start; }
.foot-map { width: 100%; max-width: 420px; margin-top: var(--s3); }
.foot-cities { color: var(--paper); font: 600 20px/1.3 var(--display); letter-spacing: -.02em; }
.site-footer .foot-ig ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.foot-ig a { display: block; overflow: hidden; border-radius: var(--radius); padding: 0 !important; aspect-ratio: 4 / 5; background: #1A1F45; box-shadow: inset 0 0 0 1px #2A2F55; outline: 1px solid #2A2F55; outline-offset: -1px; }
.foot-ig img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.foot-ig a:hover img { transform: scale(1.05); opacity: .85; }
@media (min-width: 720px) { .site-footer .foot-ig ul { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.site-footer .foot-social { display: flex; gap: var(--s2); margin-top: var(--s2); }
@media (max-width: 719px) { .site-footer .foot-social { margin-top: var(--s4); } } /* on phones the lone icon sat too close to the tagline */
.site-footer .foot-social li a { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: var(--paper); border: 1px solid #3A3F68; border-radius: 50%; transition: background-color .2s, color .2s, border-color .2s; }
.site-footer .foot-social li a:hover { text-decoration: none; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.foot-social svg { width: 20px; height: 20px; }
.foot-tag { font: italic 400 22px/1.2 var(--serif); color: var(--paper); }
.site-footer h2 { font: 600 12px/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; color: #8E93B5; margin-bottom: var(--s3); hyphens: none; }
.site-footer ul { display: grid; gap: var(--s2); }
.site-footer a { text-decoration: none; }
.site-footer li a { display: inline-block; padding-block: 4px; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.copy { max-width: none; padding-top: var(--s4); border-top: 1px solid #2A2F55; font-size: 14px; color: #8E93B5; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 2fr 1fr; } .foot-ig { grid-column: 1 / -1; order: 3; } }
@media (min-width: 1024px) { .foot-ig { grid-column: auto; order: 0; } }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: 3fr 6fr 2fr; gap: var(--s6); } .foot-brand { grid-column: auto; } }

/* Legal popups (native <dialog>: focus trapped, Esc closes) */
.linklike { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 4px; }
.site-footer .linklike { text-decoration: none; padding-block: 4px; }
.site-footer .linklike:hover { color: var(--paper); text-decoration: underline; }
.legal { width: min(720px, calc(100vw - 32px)); max-height: min(84vh, 760px); padding: 0; border: 0; border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 0 40px 100px -20px rgb(14 18 48 / .5); overflow: hidden; }
.legal[open] { display: flex; flex-direction: column; }
.legal::backdrop { background: rgb(14 18 48 / .6); backdrop-filter: blur(4px); }
.legal header { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) clamp(20px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.legal header h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -.035em; }
.dlg-close { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: none; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); cursor: pointer; }
.dlg-close:hover { border-color: var(--ink); }
.dlg-close svg { width: 18px; height: 18px; }
.legal-body { overflow-y: auto; padding: var(--s4) clamp(20px, 4vw, 40px); display: grid; gap: var(--s3); font-size: 16px; }
.legal-body h3 { font-size: 19px; font-weight: 600; margin-top: var(--s3); }
.legal-body p { color: var(--slate); max-width: none; }
.legal-body a { color: var(--cobalt); }
.legal-body mark { background: #FFE9E2; color: #9A2C0E; padding: 0 4px; border-radius: 2px; }
.legal-date { max-width: none; padding: var(--s3) clamp(20px, 4vw, 40px); border-top: 1px solid var(--line); font-size: 13px; color: var(--slate); }
@media (prefers-reduced-motion: no-preference) {
  .legal[open] { animation: rise .35s var(--ease); }
}

/* Photographic standard: applies to every photo of people except the hero (which is the reference) */
.photo img, .case-photo img { filter: var(--photo-filter); }
.photo, .case-photo { position: relative; isolation: isolate; }
.photo::after, .case-photo::after { content: ""; position: absolute; inset: 0; background: var(--photo-black); mix-blend-mode: lighten; pointer-events: none; }

/* photos from the hero series already carry the reference look */
.photo[data-raw] img { filter: none; }
.photo[data-raw]::after { display: none; }

/* 8. MOTION ---------------------------------------------------------- */
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.7); } 100% { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes stem { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes bow { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fire {
  0% { transform: translate(-50%, -50%) scale(0); }
  45% { transform: translate(-50%, -50%) scale(1.5); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
@keyframes ember { 0%, 100% { box-shadow: 0 0 0 0 rgb(255 91 46 / .45); } 50% { box-shadow: 0 0 0 16px rgb(255 91 46 / 0); } }

@media (prefers-reduced-motion: no-preference) {
  /* One orchestrated moment: the stem rises, the arc opens, the dot fires. */
  .js .hero-copy > * { animation: rise .9s var(--ease) both; }
  .js .hero-copy > :nth-child(2) { animation-delay: .12s; }
  .js .hero-copy > :nth-child(3) { animation-delay: .24s; }
  .js .hv-stem { transform-origin: bottom; animation: stem .8s var(--ease) .2s both; }
  .js .hv-bow { animation: bow 1s var(--ease) .45s both; }
  .js .hv-dot { animation: fire .7s var(--ease) 1.2s both, ember 2.8s ease-out 2s infinite; }

  .js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js [data-reveal].in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Review mode (?revisao in the URL): outlines everything fictional or to be confirmed */
.review [data-ph] { outline: 2px dashed var(--ember); outline-offset: 4px; }

/* the reveal must not swallow the hover transition of the service rows */
@media (prefers-reduced-motion: no-preference) {
  .js .row[data-reveal] { transition: opacity .7s var(--ease), transform .7s var(--ease), padding-left .4s var(--ease); }
}

/* 9. PERSPECTIVES (content area) -------------------------------------- */

/* Cards: landing, "read also" */
.insights, .related { background: var(--surface); }
.cards { display: grid; gap: var(--s6) var(--s5); }
.card a { display: grid; gap: var(--s3); align-content: start; text-decoration: none; height: 100%; }
.card-photo .photo { aspect-ratio: 25 / 17; }
.card-photo { margin-bottom: var(--s2); }
.card h3 { font-size: clamp(23px, 2.1vw, 30px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; transition: color .3s; }
.card-dek { color: var(--slate); font-size: 16px; }
.card-more { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--slate); padding-top: var(--s3); border-top: 1px solid var(--ink); margin-top: auto; max-width: none; }
.card-more span { font-weight: 600; color: var(--cobalt); }
.card-more svg { width: 18px; height: 18px; margin-left: auto; color: var(--cobalt); transition: transform .25s var(--ease); }
.card a:hover h3 { color: var(--cobalt); }
.card a:hover .card-more svg { transform: translateX(4px); }
.card a:hover .photo img { transform: scale(1.03); }
.cards-all { max-width: none; margin-top: var(--s6); }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Phone, home page: the latest articles become a swipe strip, like the people photos */
@media (max-width: 719px) {
  .insights .cards { display: flex; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .insights .cards::-webkit-scrollbar { display: none; }
  .insights .card { flex: 0 0 86%; scroll-snap-align: start; }
}

/* Article head */
.art-head { padding-top: calc(var(--header-h) + clamp(32px, 5vw, 72px)); }
.art-head .container:first-child { display: grid; gap: var(--s4); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 10px; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--cobalt); }
.crumbs [aria-current] { color: var(--cobalt); }
.art-head h1 { font-size: clamp(36px, 5.4vw, 80px); font-weight: 800; letter-spacing: -.04em; line-height: 1; max-width: 20ch; }
.art-dek { font-size: clamp(19px, 1.9vw, 25px); line-height: 1.45; color: var(--slate); max-width: 58ch; }
.art-meta { font-size: 14px; color: var(--slate); max-width: none; }
.art-meta b { color: var(--ink); font-weight: 600; }
.art-cover { margin-top: var(--s6); }
.art-cover .photo { aspect-ratio: 3 / 2; }
@media (min-width: 720px) { .art-cover .photo { aspect-ratio: 2 / 1; } }

/* Body: sticky table of contents aside, text in a reading column */
.art-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding-block: var(--s6) var(--section); }
.art-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
.toc { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--radius); }
.toc h2, .summary h2 { font: 600 13px/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); margin-bottom: var(--s3); }
.toc ol { display: grid; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 26px 1fr; padding: 7px 0; font-size: 15px; line-height: 1.35; text-decoration: none; color: var(--slate); }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 600 12px/1.6 var(--display); color: var(--cobalt); }
.toc a:hover { color: var(--ink); }
@media (min-width: 1100px) {
  .art-grid { grid-template-columns: 280px minmax(0, 760px); gap: var(--s7); justify-content: center; }
  .toc { position: sticky; top: calc(var(--header-h) + 32px); padding: 0; border: 0; max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; }
}

/* "In short": the brief answer, before everything (the passage search engines and AIs quote) */
.summary { background: var(--sky); padding: var(--s5) clamp(20px, 4vw, 40px); border-left: 4px solid var(--cobalt); border-radius: var(--radius); }
.summary ul { display: grid; gap: var(--s3); }
.summary li { position: relative; padding-left: 26px; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.5; }
.summary li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--ember); }

/* Running text */
.prose { font-size: clamp(17px, 1.45vw, 19px); line-height: 1.7; }
.prose > * + * { margin-top: var(--s4); }
.prose p { max-width: none; }
.prose h2 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin-top: var(--s6); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: clamp(21px, 2vw, 26px); font-weight: 600; line-height: 1.2; margin-top: var(--s5); }
.prose h2 + *, .prose h3 + * { margin-top: var(--s3); }
.prose a { color: var(--cobalt); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--ink); }
.prose strong { font-weight: 600; }
.prose code { font-size: .9em; background: var(--surface); padding: 2px 6px; border-radius: var(--radius); }
.prose ul, .prose ol { display: grid; gap: var(--s2); padding-left: 0; }
.prose ul > li, .prose ol > li { position: relative; padding-left: 30px; }
.prose ul > li::before { content: ""; position: absolute; left: 6px; top: .68em; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); }
.prose ol { counter-reset: item; }
.prose ol > li { counter-increment: item; }
.prose ol > li::before { content: counter(item); position: absolute; left: 0; top: .2em; font: 800 15px/1.6 var(--display); color: var(--cobalt); }
.prose blockquote { margin-block: var(--s5); padding-top: var(--s4); border-top: 3px solid var(--ember); }
.prose blockquote p { font: italic 400 clamp(24px, 2.8vw, 36px)/1.25 var(--serif); letter-spacing: -.01em; }
.note { background: var(--surface); padding: var(--s4) clamp(20px, 3vw, 32px); border-radius: var(--radius); font-size: .94em; }
.note > * + * { margin-top: var(--s3); }
.art-figure { margin-block: var(--s5); }
.art-figure .photo { aspect-ratio: 5 / 3; }
.prose figcaption { margin-top: var(--s2); font-size: 14px; line-height: 1.45; color: var(--slate); }

.table-wrap { overflow-x: auto; margin-block: var(--s5); border-top: 1px solid var(--ink); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.prose thead th { font: 600 12px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); border-bottom-color: var(--ink); }
.prose tbody th { font: 600 17px/1.3 var(--display); letter-spacing: -.01em; width: 24%; }
.prose td { color: var(--slate); }

/* HTML diagrams (indexable, translatable text): step flow and 2×2 matrix */
.flow, .matrix { margin-block: var(--s5); }
.prose .flow { display: grid; gap: var(--s4) var(--s3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: flow; padding: 0; }
.prose .flow > li { counter-increment: flow; padding: var(--s3) 0 0; border-top: 1px solid var(--ink); display: grid; gap: 6px; align-content: start; font-size: 15px; line-height: 1.45; color: var(--slate); }
.prose .flow > li::before { content: counter(flow); position: static; font: 800 15px/1 var(--display); color: var(--cobalt); }
.prose .flow > li::after { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--ember); }
.prose .flow b { font: 600 18px/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); }
.matrix { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--ink); border-radius: var(--radius); }
.matrix > div { padding: var(--s4); display: grid; gap: 6px; align-content: start; font-size: 15px; line-height: 1.45; color: var(--slate); border-bottom: 1px solid var(--line); }
.matrix > div:last-child { border-bottom: 0; }
@media (min-width: 620px) {
  .matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .matrix > div:nth-last-child(-n+2) { border-bottom: 0; }
}
.matrix b { font: 600 18px/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); }
.matrix small { font: 600 11px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); }
.matrix .hit { background: var(--sky); }
.diagram-cap { margin-top: calc(var(--s3) - var(--s5)) !important; font-size: 14px; color: var(--slate); }

.faq h3 { padding-top: var(--s4); border-top: 1px solid var(--line); }
.faq h2 + h3 { border-top-color: var(--ink); }

/* Closing: always hands back to the conversation */
.art-close { background: var(--ink); color: var(--paper); padding-block: clamp(64px, 9vw, 128px); }
.art-close .eyebrow { color: var(--ember); margin-bottom: var(--s3); }
.art-close h2 { font-size: clamp(32px, 4.6vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.art-close .lede { color: #C9CDE6; }
.art-close .lede a { color: var(--paper); }
.art-close-grid { display: grid; gap: var(--s5); }
.art-close-body { display: grid; gap: var(--s5); justify-items: start; align-content: start; }
@media (min-width: 1024px) { .art-close-grid { grid-template-columns: 6fr 5fr; gap: var(--s7); align-items: end; } }
.related-title { font-size: clamp(28px, 3.6vw, 48px); font-weight: 800; letter-spacing: -.04em; margin-bottom: var(--s6); }
.page-article .site-footer { border-top-color: #2A2F55; }

/* Index: chronological list that scales to hundreds of articles */
.idx { padding-block: calc(var(--header-h) + clamp(32px, 5vw, 72px)) var(--section); }
.idx h1 { font-size: clamp(34px, 5.4vw, 72px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.idx-filter { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.idx-chip { font: 500 15px/1.2 var(--body); padding: 10px 16px; min-height: 40px; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.idx-chip:hover { border-color: var(--ink); }
.idx-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* Phone: the topics on a single line that slides sideways, edge to edge, instead of one per line */
@media (max-width: 719px) {
  .idx-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); margin-bottom: var(--s4); }
  .idx-filter::-webkit-scrollbar { display: none; }
  .idx-chip { flex: none; white-space: nowrap; font-size: 14px; padding: 8px 14px; min-height: 36px; }
}
.idx-list { border-top: 1px solid var(--ink); }
.idx-row a { display: grid; gap: var(--s2); padding-block: var(--s4); border-bottom: 1px solid var(--line); text-decoration: none; transition: padding-left .4s var(--ease); }
.idx-row p { font-size: 14px; color: var(--slate); }
.idx-row h2 { font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; transition: color .3s; }
.idx-row a:hover h2 { color: var(--cobalt); }
@media (min-width: 860px) {
  .idx-row a { grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s5); align-items: baseline; }
  .idx-row a:hover { padding-left: 24px; }
}
