/* Functori site mockup v2. One accent colour, ultramarine (decision 08/10), light and dark themes, self-hosted fonts, WCAG AA contrasts. */
/* Red Hat Display (headings) and Red Hat Text (body), Latin and Latin Extended subsets; Ioskeley Mono
   (labels, code), Latin subset. All SIL Open Font License 1.1; sources in README. */
@font-face { font-family: "Red Hat Display"; src: url("fonts/red-hat-display-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Red Hat Display"; src: url("fonts/red-hat-display-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Red Hat Text"; src: url("fonts/red-hat-text-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Red Hat Text"; src: url("fonts/red-hat-text-latin-ext.woff2") format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Ioskeley Mono"; src: url("fonts/ioskeley-mono-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ioskeley Mono"; src: url("fonts/ioskeley-mono-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ioskeley Mono"; src: url("fonts/ioskeley-mono-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #0b1220;
  --text: #273142;
  --muted: #5d6778;
  --line: #e4e7ec;
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f5f7fa;
  --accent: #2633ff;          /* Ultramarine (decision 08/10, replaces sapphire #0131b4): 7.0:1 with white text */
  --accent-soft: #eceeff;
  --btn: #2633ff;             /* button background (white text, 7.0:1) */
  --btn-hover: #1c26d6;
  --on-btn: #ffffff;
  --header-bg: rgba(255, 255, 255, .92);
  --dashed: #c3c9d6;
  --thumb-bg: #e9edf4;
  --graph-edge: #cdd1fb;
  --pill-prod-bg: #e7f3ea; --pill-prod: #1e6b3a; --pill-lab-bg: #efede8; --pill-lab: #57525e;
  color-scheme: light;
  --dark: #0b1220;
  --dark-text: #c9d2e3;
  --dark-accent: #9aa2ff;
  --dark-card: #121b2e;
  --dark-line: #24304a;
  --note: #fff6d6;
  --note-line: #e8c547;
  --radius: 8px;               /* cards */
  --radius-sm: 6px;            /* controls, thumbnails */
  --pad: 28px;                 /* card padding, 22px on mobile */
  --head-gap: 48px;          /* section heading to its content, everywhere */
  --wrap: 1160px;
  --display: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Red Hat Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Ioskeley Mono", ui-monospace, "SF Mono", Menlo, monospace;
}


/* Dark theme: follows the system setting unless the visitor picked one with the toggle (data-theme on
   <html>, set before first paint by a script in <head>). Same variables, dark values. */
:root[data-theme="dark"] {
  --ink: #eef1f8; --text: #c4ccdb; --muted: #8f9ab0; --line: #233049;
  --bg: #0a0f1c; --surface: #111a2c; --soft: #0d1424;
  --accent: #8f98ff; --accent-soft: #161e44; --btn: #2633ff; --btn-hover: #3b47ff;
  --dark: #020409; --dark-card: #0a101d; --dark-line: #1f2a42;
  --header-bg: rgba(10, 15, 28, .88); --dashed: #3a4763; --thumb-bg: #141d31; --graph-edge: #4a5890;
  --pill-prod-bg: #0f2a1b; --pill-prod: #5ee08f; --pill-lab-bg: #1d2333; --pill-lab: #a9b2c4;
  color-scheme: dark;
}
/* Dark bands stay distinct from the dark page: near black, with a hairline above and below */
:root[data-theme="dark"] section.dark { border-block: 1px solid var(--line); }
/* Logo silhouettes are drawn in ink: light on dark */
:root[data-theme="dark"] :is(.marquee, .logo-strip, .xcard .logos, .case .side, .sw2-logos, .card-logos .row) > img, :root[data-theme="dark"] :is(.marquee, .logo-strip, .xcard .logos, .case .side, .sw2-logos) img { filter: invert(1); }
:root[data-theme="dark"] .post .thumb::after { background: #1a2340; }

/* Inline diagrams (hero graph, Expertise visuals) take the theme colours: CSS overrides the SVG attributes */
svg [stroke="#0b1220"] { stroke: var(--ink); }   svg [fill="#0b1220"] { fill: var(--ink); }
svg [fill="#5d6778"] { fill: var(--muted); }     svg [fill="#ffffff"] { fill: var(--surface); }
svg [stroke="#cdd1fb"] { stroke: var(--graph-edge); }
svg [stroke="#2633ff"] { stroke: var(--accent); } svg [fill="#2633ff"] { fill: var(--accent); }

/* Theme menu: the button shows the current choice (monitor, sun or moon; icons turn and fade into each
   other), the menu lists System, Light, Dark with a check on the current one */
.header-tools { display: flex; align-items: center; gap: 10px; }
.theme-menu { position: relative; }
.theme-toggle { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: none; color: var(--ink); cursor: pointer; }
.theme-toggle:hover, .theme-toggle[aria-expanded="true"] { border-color: var(--ink); }
.theme-menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.theme-toggle svg { position: absolute; inset: 0; margin: auto; opacity: 0; transform: rotate(-90deg) scale(.5);
  transition: opacity .25s, transform .35s cubic-bezier(.2, .8, .2, 1.2); }
:root[data-theme-pref="system"] .theme-toggle .ic-system, :root[data-theme-pref="light"] .theme-toggle .ic-light,
:root[data-theme-pref="dark"] .theme-toggle .ic-dark { opacity: 1; transform: none; }
.theme-options { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; min-width: 168px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(11, 18, 32, .14);
  animation: theme-pop .16s ease-out; }
.theme-options[hidden] { display: none; }
@keyframes theme-pop { from { opacity: 0; transform: translateY(-4px); } }
.theme-options button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--text); font: 500 .92rem var(--sans); text-align: left; cursor: pointer; }
.theme-options button:hover, .theme-options button:focus-visible { background: var(--soft); color: var(--ink); outline: none; }
.theme-options button span { flex: 1; }
.theme-options .ic-check { visibility: hidden; color: var(--accent); }
.theme-options [aria-checked="true"] { color: var(--ink); }
.theme-options [aria-checked="true"] .ic-check { visibility: visible; }
/* Colours cross-fade while the theme changes */
:root.theme-switching, :root.theme-switching * { transition: background-color .3s, color .3s, border-color .3s, fill .3s, stroke .3s !important; }
@media (prefers-reduced-motion: reduce) { .theme-toggle svg, .theme-options { transition: none; animation: none; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--text); background: var(--bg);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
main p:not(.sw2-links):not(.links):not(.more-repos) a:not(.btn):not(.more) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
main p:not(.sw2-links):not(.links):not(.more-repos) a:not(.btn):not(.more):hover { text-decoration-color: currentColor; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Typography */
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.03em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
h4 { letter-spacing: -0.005em; }
p { margin: 0 0 1em; text-wrap: pretty; }
h3, figcaption, summary { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
.nw { white-space: nowrap; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
/* Two small-text styles only: the kicker (uppercase mono label) and the meta line (mixed-case mono:
   dates, captions, roles). Both muted; set in one place. */
.strip-label, .sw2-kicker, .hw3-meta, .hw3-label, .offer .for b {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meta, .case .when, .venture .when, .post .meta, .fig figcaption, .photos figcaption, .person .role {
  font-family: var(--mono); font-size: .78rem; letter-spacing: 0; color: var(--muted); }
.card > .meta { display: block; margin-bottom: 8px; }

/* Arrow links: one style everywhere; the arrow nudges on hover */
.more, .sw2-more, .sw2-links a, .case .side a, .section-head-row > a, .way .go {
  font-size: .95rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.arr { display: inline-block; transition: transform .2s; }
a:hover .arr, .way:hover .arr, a.card:hover .arr { transform: translateX(3px); }
a.card .more { color: var(--accent); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.dot { color: var(--accent); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; height: 68px; }
.site-header .nav { margin-left: auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo .glyph { height: 22px; width: auto; }
.logo .wm { font-weight: 680; font-size: 1.28rem; letter-spacing: -0.035em; line-height: 1; }
footer .logo .glyph { height: 18px; }
footer .logo .wm { font-size: 1.1rem; }
.logo .lt { height: 26px; width: auto; display: block; }
footer .logo .lt { height: 22px; }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--text); font-size: .95rem; }
/* Current page: an accent underline; other links get a lighter one on hover */
.nav a.active { color: var(--ink); text-decoration: underline 2px var(--accent); text-underline-offset: 8px; }
.nav a:not(.btn):not(.active):hover { text-decoration: underline 2px color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 8px; }
.nav .btn { color: var(--on-btn); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 12px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; height: 2px; border-radius: 1px; background: currentColor; transition: transform .2s, opacity .2s; }
/* Burger to cross */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-block; white-space: nowrap; padding: 12px 20px; border-radius: var(--radius-sm); background: var(--btn); color: var(--on-btn); font-weight: 600; font-size: .95rem; border: 1px solid var(--btn); }
.btn:hover { text-decoration: none; background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* External link: arrow out of a box after the label */
.btn.ext { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.ext svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.more-repos { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 28px 0 0; }
.more-repos span { color: var(--muted); font-size: .92rem; }
/* Research: key figures and points of a funded project */
/* Project logo in the top-right corner, in the accent colour (the file only gives the shape) */
.card.project { position: relative; }
.card.project > .meta, .card.project > h3 { padding-right: 84px; }
.card > .project-logo { position: absolute; top: var(--pad); right: var(--pad); height: 56px; background: var(--accent);
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.card-logos { display: grid; gap: 14px; margin: 0 0 22px; padding-top: 18px; border-top: 1px solid var(--line); --lh: 22px; }
.card-logos > div { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; }
.card-logos .row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.card-logos .eu { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; color: var(--ink); }
.card-logos .eu img { height: 22px; width: auto; border-radius: 2px; }
.card-figs { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 36px; margin: 16px 0 16px; }
.card-figs > div { display: flex; flex-direction: column; }
.card-figs dd { margin: 0; color: var(--accent); font-family: var(--display, inherit); font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card-figs dt { margin-top: 2px; font-size: .8rem; color: var(--muted); }
.card .points { margin: 4px 0 20px; padding-left: 1.1em; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.card .points li + li { margin-top: 4px; }
.btn-row .more { align-self: center; margin-left: 12px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Sections */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
section.soft { background: var(--soft); }
section.dark { background: var(--dark); color: var(--dark-text); }
section.dark h2, section.dark h3 { color: #fff; }
section.dark a { color: var(--dark-accent); }
section.dark .lead { color: var(--dark-text); }
.section-head { max-width: 980px; margin-bottom: var(--head-gap); }
.section-head h2 { margin-bottom: 0; }
.section-head h2 + .lead { margin: 14px 0 0; }
.section-head .lead { max-width: 62ch; }
.wrap.narrow { max-width: 860px; }
.worked-with { margin-top: 48px; }
.people { gap: 0 56px; }
.xcards { gap: 24px; }
.card > .status + h3 { margin-top: 12px; }
.card > .meta + h3 { margin-top: 0; }
.posts-more { margin: 40px 0 0; }
/* Heading on the left, a link on the right (blog) */
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; max-width: none; }

/* Clients: one section, groups with the same heading level, ventures included */
.group-title { font-size: clamp(1.45rem, 2.2vw, 1.8rem); margin: 0 0 20px; scroll-margin-top: 96px; }
.section-head .group-title { margin: 0; }
.case-group + .case-group { margin-top: 72px; }
.investors { margin-top: 40px; }

/* Hero */
.hero { padding: 104px 0 56px; position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 900px; margin-bottom: .25em; }
/* From 1180px the graph sits in the right of the content grid, beside a 640px text column; hidden below */
@media (min-width: 1181px) { .hero h1, .hero .lead { max-width: 640px; } }
/* The graph starts 48px after the 640px text column and runs 60px past the window edge (the hero clips
   it), at a fixed height; on wide screens the area gets wider than 4:3 and hero-graph.js spreads the
   nodes to fill it. --gutter is the distance from the window edge to the content edge. */
.hero { --gutter: max(28px, (100vw - var(--wrap)) / 2 + 28px); --bleed: 60px; }
.hero-graph { position: absolute; top: -64px; left: calc(28px + 640px + 48px); width: min(940px, 100vw + var(--bleed) - var(--gutter) - 640px - 48px);
  height: 470px; opacity: .9; z-index: -1; pointer-events: none; }
@media (max-width: 1180px) { .hero-graph { display: none; } }
.page-hero { padding: 88px 0 48px; border-bottom: 1px solid var(--line); }

/* Logo strip */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 44px; margin-top: 28px; }
/* Logos: one-colour set made by scripts/mono_logos.py (assets/img/logos/mono). One treatment everywhere;
   each context only sets the base height --lh, each logo its optical factor --f (assets/logos.css). */
.marquee img, .logo-strip img, .xcard .logos img, .case .side img, .sw2-logos img, .card-logos .row > img {
  width: auto; max-width: none; height: calc(var(--lh, 28px) * var(--f, 1)); object-fit: contain; opacity: .58; transition: opacity .2s; }
.marquee img:hover, .logo-strip img:hover { opacity: .9; }
.logo-strip { --lh: 30px; } .logo-strip.small { --lh: 26px; } .marquee { --lh: 30px; } .xcard .logos { --lh: 22px; }
.case .side { --lh: 26px; } .sw2-logos { --lh: 24px; }

/* Grids and cards */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); background: var(--surface); display: flex; flex-direction: column; }
.card p { color: var(--muted); }
.card .more { margin-top: auto; padding-top: 14px; }
/* Venture cards: name, then a mono meta line */
.venture h3 { margin-bottom: 6px; }
.venture .when { margin-bottom: 12px; }
a.card { color: inherit; transition: border-color .2s, transform .2s; }
a.card:hover { text-decoration: none; border-color: var(--ink); transform: translateY(-2px); }
.tag { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); margin: 0 6px 6px 0; background: var(--bg); }
.card > .status, .card > .tag { align-self: flex-start; }
.status { font-family: var(--mono); font-size: .72rem; padding: 3px 9px; border-radius: 999px; display: inline-block; white-space: nowrap; }
.status.prod { background: var(--pill-prod-bg); color: var(--pill-prod); }
.status.pilot { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.status.new { background: var(--accent-soft); color: var(--accent); }
.status.lab { background: var(--pill-lab-bg); color: var(--pill-lab); }

/* Doors */
.door { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); background: var(--surface); display: flex; flex-direction: column; }
.door h3 { font-size: 1.12rem; }
.door p { color: var(--muted); font-size: .95rem; }
.door ul { margin: 0 0 14px; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.door .more { margin-top: auto; }

/* Case rows */
.case { display: grid; grid-template-columns: 200px 1fr 200px; gap: 40px; padding: 30px 0; border-top: 1px solid var(--line); }
.case:last-child { border-bottom: 1px solid var(--line); }
.case .who { font-weight: 650; color: var(--ink); }
.case h3 { margin-bottom: .35em; }
.case p { color: var(--muted); margin: 0; }
.case .side img { margin-bottom: 8px; }

/* Expertise cards with technical visual */
.xcard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 90px; }
.xcard .visual { background: var(--soft); border-bottom: 1px solid var(--line); aspect-ratio: 16 / 7; display: grid; place-items: center; color: var(--ink); }
.xcard .visual svg { width: 88%; height: 82%; }
.xcard .body { padding: var(--pad); display: flex; flex-direction: column; flex: 1; }
.xcard .body p { color: var(--muted); }
.xcard .logos { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }
.formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.formats > div { padding: 20px 22px; }
.formats > div + div { border-left: 1px solid var(--line); }
.formats h4 { margin: 0 0 4px; font-size: .98rem; color: var(--ink); }
.formats p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Feature list */
.feature { padding: 20px 0; border-top: 1px solid var(--line); }
.feature h4 { margin: 0 0 4px; font-size: 1.02rem; color: var(--ink); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Offer rows (Argos) */
.offer { display: grid; grid-template-columns: 240px 1fr 220px; gap: 32px; padding: 26px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.offer:last-child { border-bottom: 1px solid var(--line); }
.offer h3 { margin: 0 0 6px; }
.offer p { margin: 0; color: var(--muted); }
.offer .for { font-size: .9rem; color: var(--muted); }
.offer .for b { display: block; margin-bottom: 4px; }
.anchors { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 32px; }
.anchors .strip-label { margin-right: 6px; }
.anchors a { font-family: var(--mono); font-size: .78rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); }
.anchors a:hover { border-color: var(--ink); text-decoration: none; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
/* Short heading on the left of a long list: it stays in view while the list scrolls */
@media (min-width: 981px) { section:not(.page-hero) .split > :first-child { position: sticky; top: 108px; } }

/* Figure placeholder */
.fig { margin: 0; }
.fig .shot { border: 1px dashed var(--dashed); border-radius: var(--radius); background: var(--soft); aspect-ratio: 16 / 10; display: grid; place-items: center; color: var(--muted); font-size: .88rem; text-align: center; padding: 28px; }
.fig .shot b { display: block; color: var(--ink); margin-bottom: 6px; }
.fig figcaption { margin-top: 10px; }

/* Photos */
/* Company gallery: the group photo as a 2x2 block, eight photos around it */
/* Ventures: one row per venture, picture and text side by side */
.venture-row { align-items: center; }
.venture-pic { position: relative; margin: 0; height: 340px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.venture-pic > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.venture-pic.goat { background: #0d0d12; }
.venture-pic.goat img.mark { position: absolute; left: 14%; top: 50%; height: 120px; width: auto; transform: translateY(-50%); }
.venture-pic.goat img.phone { position: absolute; right: 14%; top: 34px; width: 190px; height: auto; }
.venture-logo { display: block; height: 40px; width: auto; margin-bottom: 10px; }
:root[data-theme="dark"] .venture-logo { filter: invert(1); }
.venture-name { margin: 0 0 6px; }
.venture-row .meta { margin: 0 0 18px; }
@media (max-width: 980px) { .venture-pic { height: 260px; } }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; }
.gallery figure { margin: 0; }
.gallery .big { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.gallery-caption { margin: 12px 0 0; }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; } }

/* Product screenshots */
.fig .shot-img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
/* Side by side screenshots share one frame, cropped from the top left */
/* Second row of figures: each grows by its image aspect ratio (width / height), so both have the same height uncropped */
.figs.pair { display: flex; gap: 24px; margin-top: 48px; }
.figs.pair .fig { min-width: 0; }
.figs.pair .shot-img { aspect-ratio: auto; }
@media (max-width: 980px) { .figs.pair { flex-direction: column; } }
.fig.solo { margin: 48px 0 0; }
.fig video.shot-img { aspect-ratio: 16 / 9; object-fit: cover; }
/* Theme variants of an image: the hidden one is display:none, so a lazy image is not even loaded */
.dark-only, :root[data-theme="dark"] .light-only { display: none !important; }
:root[data-theme="dark"] .dark-only { display: block !important; }
:root[data-theme="dark"] .fig .shot-img { background: var(--surface); }
/* Argos hero: decorative case graph, themed */
/* Enlarge button: bottom right of the visible part of the video (the hero may clip the video on the right) */
.hero-case { position: relative; }
.video-expand { position: absolute; bottom: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); color: var(--ink); font: 600 .82rem var(--sans); cursor: pointer; box-shadow: 0 4px 14px rgba(11, 18, 32, .12); }
.video-expand:hover { border-color: var(--ink); }
.video-expand svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* The larger video: a modal dialog, full screen on phones */
.video-modal { width: min(92vw, 1600px); max-width: none; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.video-modal::backdrop { background: rgba(5, 8, 16, .78); }
.video-modal video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.video-close { position: absolute; top: 10px; right: 10px; z-index: 1; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
@media (max-width: 720px) { .video-modal { width: 100vw; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; display: none; place-items: center; background: #000; }
  .video-modal[open] { display: grid; } }
.hero-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
:root[data-theme="dark"] .hero-video { background: var(--surface); }
.case-band { margin: 48px 0 0; }
.case-graph { display: block; width: 100%; height: auto; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--radius); }
.case-graph .cg-tick { stroke: var(--ink); stroke-opacity: .07; }
.case-graph .cg-dot { fill: var(--ink); opacity: .1; }
.case-graph .cg-boundary { stroke: #8b95ad; stroke-opacity: .6; stroke-dasharray: 3 4; }
.case-graph .cg-t { font: 10px var(--mono); fill: var(--muted); letter-spacing: .04em; }
.case-graph .cg-vert { font-size: 9px; letter-spacing: .14em; }
.case-graph .cg-e { stroke-opacity: .8; stroke-linecap: round; }
.case-graph .cg-flow { stroke-dasharray: 4 6; animation: cg-flow 1.6s linear infinite; }
.case-graph .cg-sweep { stroke-opacity: .55; }
.case-graph .cg-card rect:first-child { fill: var(--surface); stroke-width: 1.6; }
.case-graph .cg-hot rect:first-child { filter: drop-shadow(0 0 10px rgba(60, 207, 110, .4)); }
.case-graph .cg-kind { font: 600 7.5px var(--mono); fill: var(--muted); letter-spacing: .08em; }
.case-graph .cg-name { font: 600 11.5px var(--sans); fill: var(--ink); }
.case-graph .cg-bar { fill: var(--ink); opacity: .12; }
@keyframes cg-flow { to { stroke-dashoffset: -20; } }
@media (prefers-reduced-motion: reduce) { .case-graph .cg-flow { animation: none; } }
.figs .shot-img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top left; }
/* Page hero with a screenshot (Argos): from two columns, the screenshot runs past the content edge and
   off the window (the section clips it); its caption stays in the column */
.page-hero.bleed { overflow: hidden; --gutter: max(28px, (100vw - var(--wrap)) / 2 + 28px); }
@media (min-width: 981px) {
  /* The text column sets the row height; the screenshot fills exactly that height */
  .page-hero.bleed .split { align-items: stretch; }
  /* A size container takes its height from the grid row (the text). The graph (2:1) is that tall,
     unless it would then pass the screen edge: it may run past the column, never off screen */
  .page-hero.bleed .fig { container-type: size; min-height: 280px; display: flex; align-items: center; }
  .page-hero.bleed .hero-case .case-graph { flex: none; height: min(100cqh, (100cqw + var(--gutter) - 28px) / 2); width: auto; max-width: none; }
  /* The video is as tall as the text and runs off the right edge if it has to (the hero clips it) */
  .page-hero.bleed .hero-case .hero-video { flex: none; height: 100cqh; width: auto; aspect-ratio: 16 / 9; max-width: none; }
  /* right edge of what is visible: the video's end, or the window edge if the video runs past it */
  .page-hero.bleed .hero-case .video-expand { top: calc(100cqh - 46px); bottom: auto; right: calc(100cqw - min(100cqh * 16 / 9, 100cqw + var(--gutter)) + 12px); }
}
@media (max-width: 720px) { .figs { grid-template-columns: 1fr; } }
/* Screenshot on top of a card, flush with its edges */
.card > .card-shot { width: calc(100% + 2 * var(--pad)); max-width: none; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 20px;
  aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
/* Venture cards: a visual band on top */
.venture > .visual { position: relative; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 20px; height: 190px; overflow: hidden;
  background: var(--soft); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.venture > .visual img { position: absolute; inset: 0; }
.venture > .visual img.fill { width: 100%; height: 100%; object-fit: contain; padding: 28px 40px; background: #fff; }
/* GOAT Stadium: logo on the app's own dark background, the phone rising from the bottom edge */
.venture > .visual.goat { background: #0d0d12; }
.venture > .visual.goat img.mark { inset: auto; left: 13%; top: 50%; height: 96px; width: auto; transform: translateY(-50%); }
.venture > .visual.goat img.phone { inset: auto; right: 13%; top: 22px; width: 150px; height: auto; }
:root[data-theme="dark"] .venture > .visual img.invert-dark { filter: invert(1); background: #fff; }

/* Team */
.person { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0; border-top: 1px solid var(--line); }
/* Portrait: a photo (img), or an empty dashed slot until it arrives */
.person .portrait { flex: none; width: 72px; height: 72px; border-radius: 50%; border: 1px dashed var(--dashed); background: var(--surface); }
.person img.portrait { border: 0; object-fit: cover; filter: grayscale(1); }
.person h4 { margin: 0; color: var(--ink); font-size: 1.02rem; }
.person p { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }
/* Profile links under each bio: GitHub, GitLab, publications */
.person .skills { display: flex; flex-wrap: wrap; column-gap: 1.1em; overflow: hidden; margin: 8px 0 0; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.person .skills span { position: relative; white-space: nowrap; }
.person .skills span::before { content: "·"; position: absolute; left: -.85em; color: var(--muted); }
.person .links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: .85rem; font-weight: 600; }
.person .links a { text-decoration: none; }
.person .links a:hover { text-decoration: underline; }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 18px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; position: relative; padding-left: 26px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; position: absolute; left: 3px; top: .5em; width: 7px; height: 7px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; }
details[open] summary::before { transform: rotate(45deg); top: .4em; }
details p { padding-left: 26px; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Blog list: uniform blue-grey tint on thumbnails, original colours on hover */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
.post { color: inherit; display: flex; flex-direction: column; }
.post:hover { text-decoration: none; }
.post .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--thumb-bg); border: 1px solid var(--line); }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(1.04); transition: filter .3s; }
.post .thumb::after { content: ""; position: absolute; inset: 0; background: #3d4a63; mix-blend-mode: color; opacity: .55; transition: opacity .3s; }
.post:hover .thumb img { filter: none; }
.post:hover .thumb::after { opacity: 0; }
.post .meta { margin: 14px 0 6px; }
.post h3 { font-size: 1.08rem; margin: 0 0 6px; }
.post:hover h3 { color: var(--accent); }
.post p { color: var(--muted); font-size: .92rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Review notes (mockup only) */
.note { background: var(--note); border-left: 3px solid var(--note-line); font-size: .85rem; color: #5a4600; padding: 8px 12px; border-radius: 6px; margin: 10px 0; }
.note::before { content: "Review note: "; font-weight: 700; }
body.hide-notes .note { display: none; }
.notes-toggle { position: fixed; bottom: 18px; left: 18px; z-index: 30; background: var(--note); border: 1px solid var(--note-line); color: #5a4600; border-radius: 999px; padding: 8px 14px; font: 600 .82rem var(--sans); cursor: pointer; }

/* Cookie consent */
.consent { position: fixed; bottom: 18px; right: 18px; z-index: 40; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15,13,20,.12); padding: 20px; font-size: .9rem; }
.consent p { margin: 0 0 14px; color: var(--text); }
.consent .row { display: flex; gap: 10px; }
.consent button { flex: 1; font: 600 .88rem var(--sans); padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.consent button.accept { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }

/* CTA band: a light blue band, so it never merges with the grey footer below */
section.cta-band { background: var(--accent-soft); }
.cta-band h2 { max-width: 760px; }

/* Footer */
footer { background: var(--soft); border-top: 1px solid var(--line); padding: 60px 0 36px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
footer h4 { font-size: .74rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin: 6px 0; }
footer a { color: var(--text); }
.legal { margin-top: 44px; color: var(--muted); font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.legal a { color: var(--muted); text-decoration: underline; }

/* Legal pages */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose > :first-child { margin-top: 0; }

/* Logo comparison page (mockup only) */
.logo-row { display: grid; grid-template-columns: 240px 1fr 1.6fr; gap: 32px; align-items: center; padding: 26px 24px; border-top: 1px solid var(--line); color: var(--ink); }
.logo-row.dark { background: var(--dark); color: #fff; --accent: #9aa2ff; }
.logo-row.dark img { filter: invert(1); }
.logo-row .s26 .glyph, .logo-row .s26 img, .logo-row .s26 > svg { height: 24px; width: auto; }
.logo-row .s64 .glyph, .logo-row .s64 img, .logo-row .s64 > svg { height: 60px; width: auto; }
.logo-row .s26 .wm { font-size: 1.35rem; } .logo-row .s64 .wm { font-size: 3.4rem; }
.logo-row .logo { color: inherit; }
.logo-row .s64 .logo { gap: 22px; }

/* Responsive */
@media (max-width: 980px) {
  .g3, .g4, .posts { grid-template-columns: repeat(2, 1fr); }
  .case, .offer { grid-template-columns: 1fr; gap: 8px; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .formats { grid-template-columns: 1fr 1fr; }
  .formats > div + div { border-left: 0; }
  .formats > div:nth-child(even) { border-left: 1px solid var(--line); }
  .formats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .logo-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  /* Full-height menu panel under the header; the page behind does not scroll */
  .nav { display: none; position: fixed; top: 68px; left: 0; right: 0; height: calc(100dvh - 68px); overflow-y: auto;
    background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 28px 28px; }
  .nav.open { display: flex; }
  .nav a { font-size: 1.15rem; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
  .nav a.active { text-decoration: none; box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
  .nav a:not(.btn):hover { text-decoration: none; color: var(--accent); }
  .nav .btn { margin-top: 24px; padding: 14px 20px; text-align: center; border-bottom: 0; color: var(--on-btn); }
  .nav-toggle { display: inline-flex; }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 720px) {
  :root { --pad: 22px; }
  body { font-size: 16px; }
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 2.15rem; }
  .page-hero { padding: 56px 0 36px; }
  /* Stacked buttons share one width */
  .btn-row .btn { flex: 1 1 auto; text-align: center; }
  .way .desc { max-width: none; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  /* Tap targets of at least 40px */
  .sw2-links a, .sw2-more, .section-head-row > a, .case .side a { display: inline-block; padding-block: 10px; }
  .anchors a { padding: 10px 14px; }
  .sw2-links { row-gap: 0; margin-top: 8px; }
  section { padding: 64px 0; }
  .g2, .g3, .g4, .posts, .photos, .formats { grid-template-columns: 1fr; }
  .consent { left: 12px; right: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.page-hero .split h1 { font-size: clamp(2.3rem, 4.2vw, 3.4rem); }

section.dark .card, section.dark .door { background: var(--dark-card); border-color: var(--dark-line); }
section.dark .card p, section.dark .door p { color: var(--dark-text); }

/* Scrolling logo band (two identical groups, translated by half) */
.marquee { overflow: hidden; margin-top: 22px; -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); }
.marquee .track { display: flex; width: max-content; animation: logo-scroll 45s linear infinite; }
.marquee .group { display: flex; align-items: center; gap: 56px; padding-right: 56px; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes logo-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; flex-wrap: wrap; width: auto; } .marquee .group[aria-hidden] { display: none; } .marquee .group { flex-wrap: wrap; } }

/* What we do: four cards */
.ways{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.way{position:relative;display:flex;flex-direction:column;padding:var(--pad);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);color:inherit;overflow:hidden;min-height:260px;transition:border-color .2s,box-shadow .2s,transform .2s}
.way:hover{text-decoration:none;border-color:var(--ink);box-shadow:0 14px 34px rgba(11,18,32,.08);transform:translateY(-2px)}
.way h3{font-size:1.45rem;margin:0 0 18px}
.way .go{margin-top:auto}
/* Door pictograms: the hero graph's grammar (ink outlines, white nodes, one accent element) */
.way .ico { width: 52px; height: 52px; margin: 0 0 20px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.way .ico .n { fill: var(--surface); }
.way .ico .a { fill: var(--accent); stroke: none; }
.way .ico .p { stroke: var(--accent); stroke-width: 2.4; }
.way .ico .l { stroke: var(--graph-edge); }
.way .ico .d { fill: var(--ink); stroke: none; }
.way .ico .w { stroke: var(--surface); stroke-width: 2; }
/* Each tag carries its separator in the gap to its left; overflow clips the one starting a line */
.way-tags { display: flex; flex-wrap: wrap; column-gap: 1.1em; overflow: hidden; margin: 0 0 22px; font-family: var(--mono); font-size: .8rem; line-height: 1.7; color: var(--muted); }
.way-tags span { position: relative; white-space: nowrap; }
.way-tags span::before { content: "·"; position: absolute; left: -.85em; }
@media (max-width: 980px) { .ways { grid-template-columns: 1fr; } }
.way .desc { color: var(--muted); font-size: 1rem; line-height: 1.55; margin: 0 0 18px; max-width: 92%; }
/* Selected work, designer version (07/10, rev. 2 after panel): three numbered rows read top to bottom.
   Each row has three aligned lanes: what (number, category, title, proof link), how (one sentence),
   facts (partner logos, two figures). Scoped under .sw2. */

.sw2-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap;
  margin-bottom: var(--head-gap);
}
.sw2-head h2 { margin: 0; text-wrap: balance; }
.sw2-more { padding-bottom: 6px; }
.sw2-more span { display: inline-block; transition: transform .2s; }
.sw2-more:hover { text-decoration: none; }
.sw2-more:hover span { transform: translateX(4px); }

.sw2-list { border-bottom: 1px solid var(--line); }
.sw2-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 23rem) minmax(0, 1fr) minmax(0, 13rem);
  grid-template-areas: "kick . logos" "what text figs";
  grid-template-rows: 36px auto;
  column-gap: clamp(32px, 4vw, 56px); row-gap: 14px;
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
  transition: border-color .2s;
}
.sw2-what { grid-area: what; }
.sw2-text { grid-area: text; }
.sw2-figs { grid-area: figs; }

.sw2-kicker { grid-area: kick; align-self: center; }

.sw2-logos { grid-area: logos; display: flex; align-items: center; gap: 18px; }

.sw2-row h3 {
  font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.02em; font-weight: 650;
  margin: 0; max-width: 22em; text-wrap: balance;
}
.sw2-row h3 a { color: var(--ink); transition: color .2s; }
.sw2-row h3 a:hover { text-decoration: none; }
/* The whole row is clickable through its title link; proof links stay on top */
.sw2-row h3 a::after { content: ""; position: absolute; inset: 0; }
.sw2-row h3 a:focus-visible { outline: none; }
.sw2-row h3 a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

.sw2-text { color: var(--muted); margin: 0; text-wrap: pretty; }
.sw2-nw { white-space: nowrap; }

.sw2-links { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 18px 0 0; }

/* Facts lane: two figures, values in ink, labels always on two lines */
.sw2-figs { margin: 0; display: grid; row-gap: 18px; align-content: start; }
.sw2-figs > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.sw2-figs dd {
  margin: 0; color: var(--accent); font-size: 1.2rem; font-weight: 600; line-height: 1.15;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.sw2-figs dt { margin-top: 3px; font-size: .8rem; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.sw2-of { font-weight: 450; color: var(--muted); font-size: .8em; }
.sw2-total { color: var(--ink); }

/* Hover: the row's rule and title take the accent */
.sw2-row:hover { border-top-color: var(--accent); }
.sw2-row:hover h3 a { color: var(--accent); }
.sw2-row:hover .sw2-logos img { opacity: .85; }

/* 721 to 1100px: two lanes (title, sentence, link | logos, figures) */
@media (max-width: 1100px) {
  .sw2-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 13rem);
    grid-template-areas: "kick logos" "what figs" "text figs" "links figs";
    grid-template-rows: 36px auto auto 1fr;
    row-gap: 14px;
  }
  .sw2-what { display: contents; }
  .sw2-row h3 { grid-area: what; }
  .sw2-links { grid-area: links; margin-top: 4px; align-self: start; }
  .sw2-text { max-width: 36em; }
}
/* Up to 720px: one lane, in reading order */
@media (max-width: 720px) {
  .sw2-head { margin-bottom: 36px; }
  :root { --head-gap: 36px; }
  .sw2-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "kick logos" "what what" "text text" "links links" "figs figs";
    grid-template-rows: 36px auto;
    column-gap: 16px; padding: 24px 0 40px;
  }
  .sw2-row h3 { font-size: 1.3rem; }
  .sw2-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sw2-row, .sw2-row h3 a, .sw2-logos img, .sw2-more span { transition: none; }
}


/* How we work: four boxes in a staircase on a dark band (07/10).
   From 961px: two columns, the head top left, boxes 01 to 04 alternating right and left,
   each one starting a row lower than the previous. Below: one lane in reading order. */
.hw3 {
  --hw3-ink: #ffffff;
  --hw3-text: var(--dark-text);
  --hw3-muted: #8e9ab0;
  --hw3-line: var(--dark-line);
  --hw3-accent: var(--dark-accent);
  --hw3-card: rgba(255, 255, 255, .025);
  --hw3-gap: clamp(28px, 3.5vw, 48px);
  padding: 120px 0 128px;
}
.hw3 .dot { color: var(--dark-accent); }
.hw3 h2 { color: var(--hw3-ink); margin: 0; text-wrap: balance; }

.hw4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.hw4-head { margin-bottom: 24px; }
.hw4-box {
  display: flex; flex-direction: column; padding: var(--pad);
  border: 1px solid var(--hw3-line); border-radius: var(--radius); background: var(--hw3-card);
}
.hw3-n { display: block; margin-bottom: 20px; font-size: 2.4rem; font-weight: 650; line-height: 1; letter-spacing: -0.045em; color: var(--hw3-accent); opacity: var(--hw3-o, 1); }
/* Numbers brighten from 01 to 04: the rigour builds up */
.hw4-b1 { --hw3-o: .32; } .hw4-b2 { --hw3-o: .48; } .hw4-b3 { --hw3-o: .66; }
.hw4-b4 { border-color: rgba(154, 162, 255, .32); background: linear-gradient(140deg, rgba(38, 51, 255, .24), rgba(38, 51, 255, .04) 70%); }
.hw3 .hw4-box h3 { margin: 0 0 8px; font-size: 1.2rem; color: var(--hw3-ink); }
.hw4-desc { margin: 0; max-width: 32em; color: var(--hw3-text); text-wrap: pretty; }
.hw4-tools { margin: 12px 0 0; font-family: var(--mono); font-size: .8rem; line-height: 1.7; color: var(--hw3-muted); }
.hw4-tools span, .hw4-desc .nw { white-space: nowrap; }
.hw4-tools { display: flex; flex-wrap: wrap; column-gap: 1.1em; overflow: hidden; }   /* separators as in .way-tags: none at a line start */
.hw4-tools span { position: relative; }
.hw4-tools span::before { content: "·"; position: absolute; left: -.85em; }
.hw4-desc + .hw4-desc, .hw4-tools + .hw4-desc { margin-top: 12px; }

/* Audit counters in box 02 */
.hw4-stats { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hw3-line); }
.hw4-stats ul { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 14px clamp(20px, 5vw, 40px); margin: 12px 0 0; padding: 0; list-style: none; }
.hw4-stats li { display: flex; flex-direction: column; gap: 4px; }
.hw4-stats strong { font-size: 1.9rem; font-weight: 650; line-height: 1; letter-spacing: -0.03em; color: var(--hw3-accent); }
.hw4-stats li span { font-size: .85rem; color: var(--hw3-muted); }

/* Proofs: plain rows at the bottom of the box, each row is the link */
.hw4-proofs { margin-top: auto; padding-top: 26px; }
.hw3 .hw4-ev { position: relative; display: block; padding: 14px 36px 14px 0; border-top: 1px solid var(--hw3-line); }
.hw3 .hw4-ev:hover { text-decoration: none; }
.hw3-meta { display: block; margin-bottom: 3px; }
.hw3 .hw3-meta, .hw3 .hw3-label { color: var(--hw3-muted); }
.hw3-type { color: var(--hw3-accent); }
.hw3-t { display: block; font-size: .97rem; font-weight: 600; line-height: 1.4; color: var(--hw3-ink); text-wrap: pretty; }
.hw3 .hw4-ev:hover .hw3-t { color: var(--hw3-accent); }
.hw3-go { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); color: var(--hw3-accent); transition: transform .2s; }
.hw3 .hw4-ev:hover .hw3-go { transform: translate(3px, -50%); }
.hw3 .hw4-ev:focus-visible { outline: 2px solid var(--hw3-accent); outline-offset: 4px; border-radius: 6px; }

@media (min-width: 961px) {
  /* Bento: head on top; 01 and 03 stacked on the left, 02 (the longest) on the right
     across both rows; 04 as a full-width band to close the method */
  .hw4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 24px;
    grid-template-areas: "head head" "b1 b2" "b3 b2" "b4 b4";
  }
  .hw4-head { grid-area: head; margin-bottom: calc(var(--head-gap) - 24px); }
  .hw4-b1 { grid-area: b1; } .hw4-b2 { grid-area: b2; } .hw4-b3 { grid-area: b3; }
  .hw4-b4 {
    grid-area: b4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr; column-gap: 48px; align-items: start;
  }
  .hw4-b4 > * { grid-column: 1; }
  .hw4-b4 > .hw4-proofs { grid-column: 2; grid-row: 1 / -1; align-self: center; margin: 0; padding: 0; }
  .hw4-b4 .hw4-ev:first-child { border-top: 0; padding-top: 0; }
}
@media (max-width: 720px) {
  .hw3 { padding: 80px 0 88px; }
  .hw3-n { font-size: 2rem; margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { .hw3-go { transition: none; } }

/* Blog articles (blog/<output>, generated by blog.py from ../src/articles) */
.post-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 10px 0 18px; }
.post-hero .meta a { color: inherit; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; }
.post-tags a { text-decoration: none; }
.post-tags a:hover { border-color: var(--ink); color: var(--ink); }
.post-tags a { font-family: var(--mono); font-size: .74rem; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.post-body { padding-top: 48px; }
.post-cover { margin: 0 0 36px; }
.post-cover img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.prose { font-size: 1.04rem; line-height: 1.72; color: var(--text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); line-height: 1.25; margin: 2em 0 .2em; scroll-margin-top: 90px; }
.prose h2 { font-size: 1.6rem; } .prose h3 { font-size: 1.25rem; } .prose h4 { font-size: 1.05rem; }
.prose .header-anchor { margin-left: .35em; color: var(--muted); opacity: 0; text-decoration: none; font-weight: 400; }
.prose :is(h2, h3):hover .header-anchor, .prose .header-anchor:focus { opacity: 1; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose img, .prose video { max-width: 100%; max-height: 640px; width: auto; height: auto; border-radius: var(--radius-sm); }
.prose figure { margin: 1.8em 0; text-align: center; }
.prose figure img { display: block; margin: 0 auto; background: #fff; border: 1px solid var(--line); }
.prose figcaption { margin-top: 10px; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--soft); color: var(--ink); }
.prose details { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.prose :not(pre) > code { font-family: var(--mono); font-size: .86em; padding: .12em .36em; border-radius: 4px; background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
.prose pre.code { margin: 1.4em 0; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft);
  font-family: var(--mono); font-size: .84rem; line-height: 1.6; color: var(--ink); tab-size: 2; }
.prose .footnotes { margin-top: 3em; font-size: .9rem; color: var(--muted); }
.prose .footnotes-sep { display: none; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 64px; padding-top: 28px; padding-bottom: 72px; border-top: 1px solid var(--line); }
.post-link { display: flex; flex-direction: column; gap: 4px; color: var(--ink); font-weight: 600; text-decoration: none; }
.post-link.older { text-align: right; }
.post-link:hover span:last-child { color: var(--accent); }
@media (max-width: 720px) { .post-nav { grid-template-columns: 1fr; } .post-link.older { text-align: left; } }

/* Code colours (Pygments token classes), from the site palette, light then dark */
.prose pre.code { --c-kw: #2633ff; --c-str: #0b7a52; --c-num: #b4500c; --c-type: #7a3ce0; --c-fn: #0b1220; --c-com: #6b7488; --c-tag: #b3245c; }
:root[data-theme="dark"] .prose pre.code { --c-kw: #8f98ff; --c-str: #5ed39a; --c-num: #f2a25c; --c-type: #c3a2ff; --c-fn: #eef1f8; --c-com: #7d889e; --c-tag: #ff7ab0; }
.code :is(.k, .kd, .kn, .kr, .kc, .kp, .ow) { color: var(--c-kw); font-weight: 600; }
.code :is(.kt, .nc, .nn, .bp) { color: var(--c-type); }
.code :is(.s, .s1, .s2, .sb, .sc, .sd, .se, .sh, .si, .sx, .sr, .ss, .dl) { color: var(--c-str); }
.code :is(.m, .mi, .mf, .mh, .mo, .mb, .il) { color: var(--c-num); }
.code :is(.nf, .fm) { color: var(--c-fn); font-weight: 600; }
.code :is(.c, .c1, .cm, .cs, .ch, .cp, .cpf) { color: var(--c-com); font-style: italic; }
.code :is(.nt, .na, .nb, .nd) { color: var(--c-tag); }
.code :is(.gp, .go) { color: var(--c-com); }
.code .err { color: inherit; background: none; }

/* Blog: tag filter above the grid */
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.tag-filter button { font: .78rem var(--mono); padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.tag-filter button span { opacity: .6; margin-left: 2px; }
.tag-filter button:hover { border-color: var(--ink); color: var(--ink); }
.tag-filter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .tag-filter button[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); }
.tag-empty { color: var(--muted); }
.posts .post[hidden] { display: none; }
