/* ==========================================================================
   andreihasna.com — design refresh (ANH-00001)
   Same identity: Zwizz, Fragment Mono, the brand blue and the blueprint covers.
   What changes: Fragment Mono stops carrying long text and becomes the label
   face; Zwizz carries everything a person reads. Tighter grid, real hierarchy,
   restrained motion (see motion.js; everything here is static-safe).
   ========================================================================== */

@font-face { font-family: "Zwizz"; src: url("/assets/fonts/Zwizz-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Zwizz"; src: url("/assets/fonts/Zwizz-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "FragmentMono"; src: url("/assets/fonts/FragmentMono-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "FragmentMono"; src: url("/assets/fonts/FragmentMono-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --blue: #1e25c7;
  --blue-hi: #4542f4;
  --sky: #3c96e9;
  --ice: #cde4f9;
  --ink: #111318;
  --text: #1b1f1a;
  --muted: #5d626b;
  --faint: #8b9099;
  --line: rgba(17, 19, 24, 0.1);
  --line-strong: rgba(17, 19, 24, 0.18);
  --paper: #ffffff;
  --mist: #f6f6f7;
  --night: #101116;

  --display: "Zwizz", "Helvetica Neue", Arial, sans-serif;
  --ui: "Zwizz", "Helvetica Neue", Arial, sans-serif;
  --reading: "Zwizz", "Helvetica Neue", Arial, sans-serif;
  --mono: "FragmentMono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Theme-dependent roles. Light is the default; dark overrides them below. */
  --accent: var(--blue);        /* blue used as text or line */
  --accent-fill: var(--blue);   /* blue used as a small filled shape */
  --card: var(--paper);
  --header-bg: rgba(255, 255, 255, 0.82);
  --hero-bg: linear-gradient(180deg, var(--blue-hi) 0%, var(--blue-hi) 44%, var(--sky) 72%, var(--ice) 90%, #fff 100%);
  --mark-opacity: 1;
  color-scheme: light;

  --gutter: 40px;
  --max: 1360px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode: the same blue and the same layout on near-black. Set by the header switch
   (html[data-theme]); with no choice saved it follows the visitor's system setting. */
html[data-theme="dark"] {
  --ink: #f3f4f8;
  --text: #d9dbe3;
  --muted: #9a9fab;
  --faint: #737885;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --paper: #0c0d12;
  --mist: #121319;
  --card: #15161d;
  --accent: #9ea4ff;
  --accent-fill: #4b52f0;
  --header-bg: rgba(12, 13, 18, 0.82);
  --hero-bg: linear-gradient(180deg, var(--blue-hi) 0%, var(--blue-hi) 40%, #2a35cf 62%, #171c66 84%, #0c0d12 100%);
  --mark-opacity: 0.14;
  color-scheme: dark;
}
html[data-theme="dark"] .site-header:not(.site-header--on-dark) .logo .on-light,
html[data-theme="dark"] .site-header.is-stuck .logo .on-light { display: none; }
html[data-theme="dark"] .site-header:not(.site-header--on-dark) .logo .on-dark,
html[data-theme="dark"] .site-header.is-stuck .logo .on-dark { display: block; }
html[data-theme="dark"] .book, html[data-theme="dark"] .duo__card--night { box-shadow: inset 0 0 0 1px var(--line); }
html[data-theme="dark"] .btn--ghost:hover { border-color: #fff; }
html[data-theme="dark"] .theme-toggle .moon, html:not([data-theme="dark"]) .theme-toggle .sun { display: none; }


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--blue); color: #fff; }

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

/* ---------- Type roles ---------- */
.label {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.label--bar { padding-left: 12px; border-left: 2px solid currentColor; line-height: 1.25; }
.label--muted { color: var(--faint); }
.h-display { font-family: var(--display); font-weight: 400; letter-spacing: -0.028em; line-height: 0.98; }
.h-section { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.9vw, 56px); letter-spacing: -0.024em; line-height: 1.04; color: var(--ink); }
.lede { font-size: 19px; line-height: 1.5; color: var(--muted); }
.meta { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.meta .dot { width: 3px; height: 3px; background: currentColor; border-radius: 50%; opacity: 0.7; }
.meta .cat { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn svg { width: 13px; height: 13px; flex: none; }
.btn .arr {  transition: transform 0.35s var(--ease-out); }
.btn:hover .arr { transform: translate(2px, -2px); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: #151ba0; }
.btn--white { background: #fff; color: var(--blue); }
.btn--white:hover { background: #eef0ff; }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost-light { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.arr-box {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--blue); color: #fff;
  transition: background-color 0.25s var(--ease);
}
.arr-box svg { width: 14px; height: 14px; transition: transform 0.35s var(--ease-out); }

/* Text link with an underline that draws in from the left. */
.link { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.35s var(--ease-out); padding-bottom: 2px; }
.link:hover { background-size: 100% 1px; }

/* ---------- Header ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 50; color: var(--ink); transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; transition: height 0.3s var(--ease); }
.site-header .logo img { height: 26px; width: auto; }
.site-header .logo .on-dark { display: none; }
.site-header--on-dark { color: #fff; }
.site-header--on-dark .logo .on-dark { display: block; }
.site-header--on-dark .logo .on-light { display: none; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.78; position: relative; padding: 6px 0; transition: opacity 0.2s; }
.nav a:hover, .nav a.is-active { opacity: 1; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-out); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav .nav-cta { opacity: 1; height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid currentColor; }
.nav .nav-cta::after { display: none; }
.theme-toggle { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 1px solid currentColor; padding: 0; cursor: pointer; opacity: 0.9; margin-left: -22px; }
.theme-toggle svg { width: 15px; height: 15px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; }
.nav-toggle span + span { margin-top: 6px; }
/* After the first 40px of scroll the header pins, condenses and gains a frosted backing. */
.site-header.is-stuck { position: fixed; color: var(--ink); background: var(--header-bg); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
.site-header.is-stuck .wrap { height: 60px; }
.site-header.is-stuck .logo .on-dark { display: none; }
.site-header.is-stuck .logo .on-light { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--hero-bg); }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px);
  background-size: 68px 68px;
  background-position: calc(50% + 34px) 8px;
  -webkit-mask-image: radial-gradient(120% 78% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 78% at 50% 0%, #000 30%, transparent 78%);
}
.hero__rings { position: absolute; right: -180px; top: -260px; width: 980px; height: 980px; pointer-events: none; opacity: 0.5; }
.hero .wrap { position: relative; }
.hero__main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; padding: 168px 0 0; }
/* The name, small, above the headline. It is the first child of the <h1> (so the page's
   one heading reads "Andrei Hasna Founder, investor, author."), drawn as the line it always
   was: its box is the height of the paragraph it replaced (26.35px; 24.8px on phones) and the
   gap under it the headline's old top margin, so nothing below it moved. */
.hero__status { display: flex; align-items: center; gap: 10px; min-height: 26.35px; margin: 0 0 26px; font-family: var(--mono); font-size: 13px; font-weight: 400; line-height: 20.15px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.92); }
.hero__status i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #7dffb2; box-shadow: 0 0 0 4px rgba(125, 255, 178, 0.18); }
/* The headline is one line, "Founder, investor, author." (owner, 21.11.2026: one word per
   row "is very ugly"). The text column is a container and the headline is sized from its
   width (9.2% of it: the line measures 10.6 times its font size), so the line always fits
   and never wraps, between 26px and 84px. Browsers without container units get the nearest
   width of the window instead, capped at the size that fits the widest column (66px). */
.hero__main > div:first-child { container-type: inline-size; }
.hero h1 { font-size: clamp(26px, 4.4vw, 66px); font-size: clamp(26px, 9.2cqi, 84px); margin-top: 0; }
.hero h1 .line, .hero h1 .line > span { display: block; }
.hero h1 .line { white-space: nowrap; }
/* The hero's text column is taller since it carries the newsletter form (20.11.2026), and its
   label, field, consent line and links are white text where the two buttons used to be. With
   the stops in percent, the fade to white ran under that text and made it unreadable on wide
   screens. So there the fade starts below the text column: the same four colours, in the
   hero's last 176px. Phones keep the percent stops (the photo sits between the text and the
   fade); dark mode keeps its own gradient, which stays dark behind the text. */
@media (min-width: 901px) {
  html:not([data-theme="dark"]) { --hero-bg: linear-gradient(180deg, var(--blue-hi) 0, var(--blue-hi) calc(100% - 176px), var(--sky) calc(100% - 112px), var(--ice) calc(100% - 60px), #fff 100%); }
}
/* The hero's action is the newsletter (20.11.2026): a lede, then the form — a mono label, one
   row with the email field on a hairline and the white button, the consent line — and under
   it one quiet row of two text links. */
.hero__lede { margin-top: 22px; max-width: 30em; font-size: 20px; line-height: 1.45; color: rgba(255, 255, 255, 0.88); }
.hero__form { margin-top: 36px; max-width: 540px; }
.hero__form .label { display: block; color: rgba(255, 255, 255, 0.85); }
.hero__field { display: flex; align-items: flex-end; gap: 16px; margin-top: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.4); transition: border-color 0.3s var(--ease); }
.hero__field:focus-within { border-color: #fff; }
.hero__field input { flex: 1; min-width: 0; height: 48px; background: none; border: 0; outline: 0; padding: 0; font-family: var(--display); font-size: 22px; letter-spacing: -0.012em; color: #fff; }
.hero__field input::placeholder { color: rgba(255, 255, 255, 0.5); }
.hero__fine { margin-top: 16px; font-family: var(--mono); font-size: 12px; line-height: 1.6; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.72); }
.hero__fine a { text-decoration: underline; text-underline-offset: 3px; }
.hero__links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; }
.hero__links a { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; line-height: 1.25; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; text-underline-offset: 4px; }
.hero__links a:hover { text-decoration: underline; }
.hero__links svg { width: 12px; height: 12px; flex: none; transition: transform 0.35s var(--ease-out); }
.hero__links a:hover svg { transform: translate(2px, -2px); }
.hero__photo { position: relative; margin-top: 6px; }
/* The hero's photographs take turns in one frame (owner, 21.11.2026): they are stacked, the
   one that is on is opaque, and the change is a slow crossfade while the picture drifts
   closer by a few percent. Without script, or with reduced motion, the first one stays. */
.hero__frame { display: grid; overflow: hidden; aspect-ratio: 3 / 2; background: #0b0e3a; box-shadow: 0 40px 80px -30px rgba(10, 14, 90, 0.55); }
.hero__frame img { grid-area: 1 / 1; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; opacity: 0; transition: opacity 1.6s var(--ease); }
.hero__frame img.is-on { opacity: 1; }
.hero__photo.is-playing .hero__frame img.is-on, .hero__photo.is-playing .hero__frame img.was-on { animation: hero-drift 9s linear both; }
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.05); } }
.hero__photo figcaption span { display: none; }
.hero__photo figcaption span.is-on { display: inline; }
/* The marks sit in the frame's top right corner, clear of the caption at every width. They are
   one button: pressing it pauses the photographs (the mark that is on stays full). */
.hero__ticks { position: absolute; right: 4px; top: 4px; display: none; gap: 6px; padding: 12px 8px; background: rgba(16, 17, 22, 0.72); border: 0; cursor: pointer; backdrop-filter: blur(6px); }
.hero__photo.is-playing .hero__ticks { display: flex; }
.hero__ticks i { position: relative; width: 20px; height: 2px; background: rgba(255, 255, 255, 0.45); overflow: hidden; }
.hero__ticks i.is-on::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: hero-tick 6.5s linear both; }
.hero__photo.is-paused .hero__ticks i.is-on::after { animation: none; }
.hero__photo.is-paused .hero__frame img.is-on, .hero__photo.is-paused .hero__frame img.was-on { animation-play-state: paused; }
@keyframes hero-tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__photo figcaption { position: absolute; left: 0; bottom: 0; padding: 9px 12px; background: rgba(16, 17, 22, 0.72); color: #fff; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; backdrop-filter: blur(6px); }
.hero__latest {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 22px;
  margin-top: 88px; padding: 20px 0 26px;
  border-top: 1px solid var(--line-strong);
  color: var(--ink);
}
.hero__latest .label { color: var(--accent); }
.hero__latest .date { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--muted); }
.hero__latest .ttl { font-size: 18px; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__latest .go { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hero__latest .go svg { width: 12px; height: 12px; transition: transform 0.35s var(--ease-out); }
.hero__latest:hover .go svg { transform: translate(2px, -2px); }

.hero h1 em { font-style: normal; }
/* The hero fits the screen it is on (owner, 20.11.2026: the hero «nicely optimized» for a MacBook
   Air). On a laptop or desktop the first screen holds the name, the headline, the lede, the form, the
   two links and the latest-essay line: the hero is one screen tall (at least 640px, at most 1000px),
   the headline and the vertical spacing scale with the screen's height as well as its width, and the
   photo sits centred against the text column. Phones keep the stacked layout below. This block comes after the hero's base rules on purpose:
   it overrides them at the same specificity. */
@media (min-width: 901px) {
  .hero { display: flex; flex-direction: column; min-height: clamp(640px, 100vh, 1000px); min-height: clamp(640px, 100svh, 1000px); }
  .hero > .wrap { flex: 1; display: flex; flex-direction: column; width: 100%; }
  .hero__main { flex: 1; align-items: center; padding-top: clamp(96px, 13.5vh, 168px); padding-top: clamp(96px, 13.5svh, 168px); }
  .hero__status { margin-bottom: clamp(12px, 2.2vh, 26px); margin-bottom: clamp(12px, 2.2svh, 26px); }
  .hero__lede { margin-top: clamp(14px, 2.2vh, 22px); margin-top: clamp(14px, 2.2svh, 22px); }
  .hero__form { margin-top: clamp(18px, 3.2vh, 36px); margin-top: clamp(18px, 3.2svh, 36px); }
  .hero__field { margin-top: clamp(10px, 1.8vh, 18px); margin-top: clamp(10px, 1.8svh, 18px); }
  .hero__links { margin-top: clamp(16px, 2.6vh, 28px); margin-top: clamp(16px, 2.6svh, 28px); }
  .hero__latest { margin-top: clamp(24px, 4vh, 88px); margin-top: clamp(24px, 4svh, 88px); }
}

/* ---------- Sections ---------- */
.section { padding: 128px 0; }
.section--mist { background: var(--mist); }
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: end; margin-bottom: 56px; }
.section-head .h-section { margin-top: 22px; }
.section-head__side { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; padding-bottom: 6px; }
.section-head__side p { max-width: 440px; }

/* ---------- Cards ---------- */
.cover { position: relative; overflow: hidden; background: var(--mist); aspect-ratio: 3 / 2; }
/* Article images can be anything (photo, illustration, light or dark): a fixed 3:2 crop and an
   inner hairline keep every card the same shape and stop pale images bleeding into the page. */
.cover::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
a:hover > .cover img, .card:hover .cover img, .feature:hover .cover img { transform: scale(1.035); }

.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--card); border: 1px solid var(--line); }
.section--mist .feature { border-color: transparent; }
.feature__body { display: flex; flex-direction: column; justify-content: space-between; padding: 44px 44px 40px; }
.feature__title { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.1vw, 44px); letter-spacing: -0.022em; line-height: 1.06; color: var(--ink); margin-top: 22px; }
.feature__excerpt { font-size: 18.5px; line-height: 1.5; color: var(--muted); margin-top: 18px; max-width: 30em; }
.feature__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 40px; }
.feature__foot .read { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.feature:hover .arr-box svg, .card:hover .arr-box svg { transform: translate(2px, -2px); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); transition: border-color 0.3s var(--ease), box-shadow 0.4s var(--ease); }
.section--mist .card { border-color: transparent; }
.card:hover { box-shadow: 0 24px 50px -28px rgba(17, 19, 24, 0.28); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 26px; }
.card__title { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -0.014em; line-height: 1.14; color: var(--ink); margin-top: 14px; transition: color 0.25s var(--ease); }
.card:hover .card__title, .feature:hover .feature__title { color: var(--accent); }
.card__excerpt { font-size: 16px; line-height: 1.5; color: var(--muted); margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { margin-top: auto; padding-top: 22px; display: flex; justify-content: flex-end; }

/* ---------- Index rows ---------- */
.rows { border-top: 1px solid var(--line-strong); }
.row { display: grid; grid-template-columns: 148px minmax(0, 1fr) 150px 40px; gap: 24px; align-items: center; padding: 21px 0; border-bottom: 1px solid var(--line); position: relative; transition: padding 0.4s var(--ease-out); }
.row .date { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.row .ttl { font-family: var(--display); font-size: 22px; letter-spacing: -0.012em; line-height: 1.2; color: var(--ink); transition: color 0.25s var(--ease); }
.row .cat { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.row .go { justify-self: end; width: 14px; height: 14px; color: var(--faint); transition: transform 0.35s var(--ease-out), color 0.25s; }
.row:hover { padding-left: 12px; }
.row:hover .ttl, .row:hover .go { color: var(--accent); }
.row:hover .go { transform: translate(2px, -2px); }
.rows-head { display: flex; align-items: baseline; justify-content: space-between; margin: 88px 0 18px; }
.rows-head h2 { margin: 0; font-weight: 400; }
.rows-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }

/* ---------- Talks and press ---------- */
.talks { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.talks__photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 0 50%; }
.talks__photo figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.talks__photo figcaption span:first-child { color: var(--ink); }
.row--talk { grid-template-columns: 64px minmax(0, 1fr) auto 40px; align-items: start; padding: 20px 0; }
.row--talk .date { padding-top: 6px; }
.row--talk .cat { padding-top: 6px; }
.row--talk .go { margin-top: 6px; }
.row--talk .ttl small { display: block; margin-top: 6px; font-family: var(--ui); font-size: 15.5px; letter-spacing: 0; color: var(--muted); }

/* ---------- Open source + MCP ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.duo__card { background: var(--card); padding: 44px; display: flex; flex-direction: column; align-items: flex-start; min-height: 420px; }
.duo__card--night { background: var(--night); color: #fff; }
.duo__card--night .label { color: #a9adff; }
.duo__title { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 2.7vw, 38px); letter-spacing: -0.022em; line-height: 1.08; margin-top: 22px; color: inherit; }
.duo__text { margin-top: 16px; font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 27em; }
.duo__card--night .duo__text { color: rgba(255, 255, 255, 0.72); }
.codeline { margin: auto 0 20px; align-self: stretch; display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px; background: var(--mist); border: 1px solid var(--line); font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.02em; color: var(--ink); }
.codeline span { color: var(--faint); }
.codeline b { margin-left: auto; font-weight: 400; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.codeline--night { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); color: #fff; }
.codeline--night span, .codeline--night b { color: rgba(255, 255, 255, 0.55); }
.duo__card .codeline { margin-top: 40px; }
.duo__card--night .btn { margin-top: auto; }
.duo__card--night .codeline { margin: 16px 0 0; }
.duo__card--night .duo__text { margin-bottom: 40px; }
.duo__card .tag { border-color: var(--line-strong); color: var(--muted); }
.duo__card--night .tag { border-color: rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.8); }

/* ---------- Partnerships ---------- */
.partner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.partner .h-section { margin-top: 22px; }
.partner .row--talk .cat { text-transform: none; letter-spacing: 0.02em; color: var(--muted); }

/* ---------- Book ---------- */
.book { background: var(--night); color: #fff; position: relative; overflow: hidden; }
.book__grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 68px 68px; background-position: calc(50% + 34px) 0;
  -webkit-mask-image: radial-gradient(70% 90% at 28% 50%, #000 10%, transparent 75%); mask-image: radial-gradient(70% 90% at 28% 50%, #000 10%, transparent 75%); }
.book .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 56px; align-items: center; padding-top: 112px; padding-bottom: 112px; }
.book__art { position: relative; display: grid; place-items: center; min-height: 520px; }
.book__art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(69, 66, 244, 0.6), rgba(69, 66, 244, 0) 100%); }
.book__art img { position: relative; width: 320px; box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06); transition: transform 0.7s var(--ease-out); }
.book__art:hover img { transform: translateY(-8px) rotate(-1.2deg); }
.book .label { color: #9aa0ff; }
.book .h-section { color: #fff; margin-top: 22px; }
.book__copy { margin-top: 28px; display: grid; gap: 16px; max-width: 520px; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, 0.74); }
.book__cta { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.tag--ink { border-color: var(--line-strong) !important; color: var(--muted) !important; }
.tag--live i { width: 6px; height: 6px; border-radius: 50%; background: #7dffb2; }
.book__fine { margin-top: 20px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.55); }
.podcast__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.podcast__card .podcast__cta .btn { margin-top: 0; }
.tag { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, 0.22); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); margin-left: 14px; vertical-align: middle; }

/* ---------- Podcast ---------- */
.podcast { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.podcast .h-section { margin-top: 22px; max-width: 15em; }
.podcast__card { border: 1px solid var(--line); padding: 28px; background: var(--card); }
.wave { display: flex; align-items: center; gap: 5px; height: 84px; margin: 22px 0 26px; }
.wave i { flex: 1; background: var(--accent-fill); opacity: 0.9; border-radius: 1px; transform-origin: center; }
.podcast__card .desc { color: var(--muted); font-size: 16.5px; margin-top: 8px; }
.podcast__card .btn { margin-top: 24px; }

/* ---------- Newsletter ---------- */
.news { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); background: var(--blue); color: #fff; margin-top: 56px; }
.news__form { padding: 52px 52px 48px; display: flex; flex-direction: column; justify-content: space-between; min-height: 380px; }
.news__form .label { color: rgba(255, 255, 255, 0.85); }
.news__field { display: flex; align-items: flex-end; gap: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.4); padding-bottom: 18px; margin-top: 56px; transition: border-color 0.3s var(--ease); }
.news__field:focus-within { border-color: #fff; }
.news__field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-family: var(--display); font-size: clamp(26px, 3.3vw, 46px); letter-spacing: -0.02em; color: #fff; padding: 0; }
.news__field input::placeholder { color: rgba(255, 255, 255, 0.45); }
.news__fine { font-family: var(--mono); font-size: 12px; line-height: 1.6; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.72); max-width: 520px; margin-top: 22px; }
.news__fine a { text-decoration: underline; text-underline-offset: 3px; }
.news__list { background: var(--card); color: var(--ink); margin: 8px; padding: 40px 36px; }
.news__list h3 { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: -0.012em; }
.news__list ul { margin-top: 22px; display: grid; gap: 13px; }
.news__list li { position: relative; padding-left: 20px; font-size: 16.5px; line-height: 1.4; color: var(--text); }
.news__list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; background: var(--accent-fill); }

/* ---------- Footer ---------- */
.site-footer { background: var(--mist); padding: 96px 0 0; overflow: hidden; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2fr); gap: 40px; }
.footer-cols h4 { margin: 0 0 20px; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.footer-cols li + li { margin-top: 11px; }
.footer-cols a { font-size: 16px; color: var(--ink); }
.footer-cols .copy { text-align: right; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.footer-mark { margin-top: 96px; width: 100%; opacity: var(--mark-opacity); }

/* ---------- Articles index ---------- */
.page-head { padding: 176px 0 64px; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 5vw, 72px); letter-spacing: -0.028em; line-height: 1.02; color: var(--ink); margin-top: 28px; max-width: 16.5em; }
.page-head h1 span { color: var(--accent); }
.page-head__meta { margin-top: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink); transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.chip b { font-weight: 400; color: var(--faint); }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip.is-on b { color: inherit; opacity: 0.6; }
.year { display: grid; grid-template-columns: 148px 1fr; gap: 24px; align-items: baseline; margin: 72px 0 0; padding-bottom: 16px; }
.year h2 { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: -0.02em; color: var(--ink); }
.more { display: flex; justify-content: center; margin-top: 48px; }

/* ---------- Article ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--accent-fill); transform: scaleX(0); transform-origin: 0 50%; z-index: 60; }
.article-head { padding: 164px 0 0; }
.article-head .inner { max-width: 960px; }
.crumbs { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); display: flex; gap: 10px; align-items: center; }
.crumbs a { color: var(--ink); }
.crumbs .cat { color: var(--accent); }
.article-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 5.6vw, 80px); letter-spacing: -0.03em; line-height: 1; color: var(--ink); margin-top: 28px; }
.article-head .dek { font-size: clamp(20px, 1.9vw, 26px); line-height: 1.38; letter-spacing: -0.008em; color: var(--muted); margin-top: 26px; max-width: 30em; }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.byline .mark { width: 36px; height: 36px; display: grid; place-items: center; background: var(--blue); }
.byline .mark img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.byline .who { font-size: 16px; color: var(--ink); line-height: 1.2; }
.byline .meta { margin-top: 5px; }
.byline .spacer { flex: 1; }
.article-cover { margin-top: 56px; }
.article-cover .cover { aspect-ratio: 16 / 7; }

.article-grid { display: grid; grid-template-columns: 200px minmax(0, 680px) 200px; justify-content: space-between; gap: 40px; padding: 72px 0 96px; }
.rail { position: sticky; top: 96px; align-self: start; display: grid; gap: 28px; }
.rail dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.rail dd { margin: 6px 0 0; font-size: 15.5px; color: var(--ink); }
.rail dl { margin: 0; display: grid; gap: 20px; }
.rail dd a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.rail dd a:hover { color: var(--accent); text-decoration-color: currentColor; }
.byline .who a:hover { color: var(--accent); }
.rail .share { display: grid; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.rail .share a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); display: inline-flex; gap: 8px; align-items: center; }
.rail .share svg { width: 11px; height: 11px; color: var(--faint); }

.prose { font-family: var(--reading); font-size: 19.5px; line-height: 1.62; color: var(--text); letter-spacing: 0.001em; }
.prose p + p { margin-top: 1.22em; }
.prose p:first-child { font-size: 1.2em; line-height: 1.5; letter-spacing: -0.006em; color: var(--ink); }
/* The body format of an essay: paragraphs, headings, lists and one pull quote. */
.prose h2 { font-family: var(--display); font-weight: 400; font-size: 1.54em; letter-spacing: -0.02em; line-height: 1.14; color: var(--ink); margin: 2em 0 0.7em; }
.prose h2:first-child { margin-top: 0; }
.prose p + ul, .prose ul + p, .prose p + blockquote, .prose blockquote + p, .prose ul + blockquote, .prose blockquote + ul { margin-top: 1.22em; }
.prose ul { display: grid; gap: 0.5em; }
.prose li { position: relative; padding-left: 1.3em; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 6px; height: 6px; background: var(--accent-fill); }
.prose blockquote { margin: 1.9em 0; padding-left: 26px; border-left: 2px solid var(--accent); }
.prose blockquote p, .prose blockquote p:first-child { font-family: var(--display); font-size: 1.42em; line-height: 1.3; letter-spacing: -0.016em; color: var(--ink); }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--mist); padding: 0.12em 0.36em; border: 1px solid var(--line); }

.article-end { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line-strong); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.article-end .tags { display: flex; gap: 8px; flex-wrap: wrap; }
/* The subscribe card directly after the essay's body (20.11.2026): Field Notes in one sentence
   and the same one-row email form. On the card colour, hairline border, square corners. */
.subscribe-card { margin-top: 56px; padding: 36px; background: var(--card); border: 1px solid var(--line); }
.subscribe-card__title { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: -0.018em; line-height: 1.12; color: var(--ink); margin-top: 16px; }
.subscribe-card__text { margin-top: 10px; font-size: 17px; line-height: 1.5; color: var(--muted); }
.subscribe-card__field { display: flex; align-items: flex-end; gap: 16px; margin-top: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); transition: border-color 0.3s var(--ease); }
.subscribe-card__field:focus-within { border-color: var(--ink); }
.subscribe-card__field input { flex: 1; min-width: 0; height: 48px; background: none; border: 0; outline: 0; padding: 0; font-family: var(--display); font-size: 22px; letter-spacing: -0.012em; color: var(--ink); }
.subscribe-card__field input::placeholder { color: var(--faint); }
.subscribe-card__fine { margin-top: 16px; font-family: var(--mono); font-size: 12px; line-height: 1.6; letter-spacing: 0.02em; color: var(--faint); }
.subscribe-card__fine a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pager a { padding: 44px 0; display: grid; gap: 14px; transition: background-color 0.3s var(--ease); }
.pager a + a { border-left: 1px solid var(--line); padding-left: 48px; }
.pager a:first-child { padding-right: 48px; }
.pager .ttl { font-family: var(--display); font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); transition: color 0.25s var(--ease); }
.pager a:hover .ttl { color: var(--accent); }
.pager .dir { display: inline-flex; gap: 8px; align-items: center; }
.pager .dir svg { width: 12px; height: 12px; }
.pager .next { text-align: right; justify-items: end; }

/* ---------- Motion (only when motion.js sets html.motion) ---------- */
html.motion [data-reveal] { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
html.motion [data-reveal].in { opacity: 1; transform: none; }
html.motion .hero h1 .line { overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
html.motion .hero h1 .line > span { transform: translate3d(0, 105%, 0); transition: transform 1.1s var(--ease-out); transition-delay: calc(120ms + var(--i, 0) * 90ms); }
html.motion.ready .hero h1 .line > span { transform: none; }
html.motion .hero__status i { animation: pulse 2.4s ease-in-out infinite; }
html.motion .hero__grid { animation: drift 60s linear infinite; }
html.motion .wave i { animation: wave 1.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -70ms); animation-play-state: paused; }
html.motion .podcast__card:hover .wave i { animation-play-state: running; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(125, 255, 178, 0.18); } 50% { box-shadow: 0 0 0 8px rgba(125, 255, 178, 0); } }
@keyframes drift { to { background-position: calc(50% + 34px) 76px; } }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.55); } }
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .article-grid { grid-template-columns: minmax(0, 680px); justify-content: center; }
  .rail { position: static; grid-auto-flow: column; justify-content: space-between; align-items: start; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
  .rail dl { grid-auto-flow: column; gap: 32px; }
  .rail .share { border: 0; padding: 0; }
  .article-grid > .rail-right { display: none; }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .nav > a { display: none; }
  .nav { gap: 0; margin-left: auto; margin-right: 14px; }
  .theme-toggle { margin-left: 0; border: 0; }
  .nav-toggle { display: block; }
  .site-header .wrap { height: 64px; }
  .hero__main { grid-template-columns: 1fr; gap: 40px; padding-top: 116px; }
  .hero h1 { font-size: clamp(26px, 8vw, 66px); font-size: clamp(26px, 9.2cqi, 84px); }
  .hero__status { min-height: 24.8px; margin-bottom: 20px; }
  .hero__lede { margin-top: 18px; font-size: 18px; }
  .hero__form { margin-top: 28px; }
  .hero__field { flex-direction: column; align-items: stretch; border: 0; padding: 0; gap: 14px; }
  .hero__field input { border-bottom: 1px solid rgba(255, 255, 255, 0.4); padding-bottom: 6px; }
  .hero__field .btn { justify-content: center; }
  .hero__links { margin-top: 24px; }
  .hero__rings { width: 640px; height: 640px; right: -260px; top: -200px; }
  .hero__latest { grid-template-columns: auto 1fr; gap: 8px 14px; margin-top: 48px; padding: 18px 0 22px; }
  .hero__latest .ttl { grid-column: 1 / -1; white-space: normal; font-size: 19px; line-height: 1.25; }
  .hero__latest .go { grid-column: 1 / -1; margin-top: 4px; }
  .section { padding: 80px 0; }
  .section-head, .feature, .podcast, .news, .book .wrap, .talks, .duo, .partner { grid-template-columns: 1fr; }
  .talks, .partner { gap: 36px; }
  .duo { gap: 20px; }
  .duo__card { padding: 28px 22px; min-height: 0; }
  .codeline { font-size: 12px; padding: 0 12px; }
  .codeline b { display: none; }
  .row--talk { grid-template-columns: 44px minmax(0, 1fr) 20px; }
  .row--talk .date { grid-row: 1; grid-column: 1; }
  .row--talk .ttl { grid-row: 1; grid-column: 2; }
  .row--talk .go { grid-row: 1; grid-column: 3; }
  .talks__photo figcaption { flex-direction: column; gap: 4px; }
  .section-head { gap: 22px; margin-bottom: 36px; }
  .section-head .h-section { margin-top: 16px; }
  .feature__body { padding: 26px 22px 24px; }
  .feature__foot { margin-top: 28px; }
  .cards { grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
  .row { grid-template-columns: 1fr 20px; gap: 6px 16px; padding: 18px 0; }
  .row .date { grid-column: 1; grid-row: 1; }
  .row .ttl { grid-column: 1; grid-row: 2; font-size: 20px; }
  .row .cat { display: none; }
  .row .go { grid-column: 2; grid-row: 1 / span 2; }
  .row:hover { padding-left: 0; }
  .rows-head { margin-top: 56px; }
  .book .wrap { gap: 8px; padding-top: 56px; padding-bottom: 72px; }
  .book__art { min-height: 400px; }
  .book__art::before { width: 380px; height: 380px; }
  .book__art img { width: 220px; }
  .podcast { gap: 32px; }
  .news { margin-top: 36px; }
  .news__form { padding: 30px 22px 28px; min-height: 0; }
  .news__field { margin-top: 36px; flex-direction: column; align-items: stretch; border: 0; padding: 0; gap: 16px; }
  .news__field input { border-bottom: 1px solid rgba(255, 255, 255, 0.4); padding-bottom: 14px; font-size: 26px; }
  .news__field .btn { justify-content: center; }
  .news__list { padding: 28px 22px; }
  .site-footer { padding-top: 64px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .footer-cols .copy { grid-column: 1 / -1; text-align: left; }
  .footer-mark { margin-top: 56px; }
  .page-head { padding: 116px 0 40px; }
  .page-head h1 { margin-top: 20px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 36px; padding: 16px var(--gutter); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .year { grid-template-columns: 1fr; margin-top: 52px; }
  .article-head { padding-top: 112px; }
  .article-head h1 { margin-top: 20px; }
  .article-head .dek { margin-top: 18px; }
  .byline { margin-top: 28px; flex-wrap: wrap; }
  .article-cover { margin-top: 32px; }
  .article-cover .wrap { padding: 0; }
  .article-cover .cover { aspect-ratio: 3 / 2; }
  .article-grid { padding: 36px 0 64px; gap: 28px; }
  .rail { grid-auto-flow: row; gap: 18px; }
  .rail dl { grid-auto-flow: row; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .rail .share { grid-auto-flow: column; justify-content: start; gap: 20px; }
  .prose { font-size: 18px; line-height: 1.62; }
  .subscribe-card { margin-top: 40px; padding: 26px 22px; }
  .subscribe-card__title { font-size: 24px; }
  .subscribe-card__field { flex-direction: column; align-items: stretch; border: 0; padding: 0; gap: 14px; }
  .subscribe-card__field input { border-bottom: 1px solid var(--line-strong); padding-bottom: 6px; }
  .subscribe-card__field .btn { justify-content: center; }
  .pager { grid-template-columns: 1fr; }
  .pager a { padding: 28px 0; }
  .pager a + a { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .pager .next { text-align: left; justify-items: start; }
}

/* ==========================================================================
   App additions. Everything above is _design/refresh/refresh.css with the font
   URLs made absolute and the rejected serif variant dropped. Everything below
   exists only in the app: focus styles, the mobile menu panel, forms, the
   legal drawer, and the pages that had no mockup, composed from the same
   tokens and parts.
   ========================================================================== */

/* ---------- Contrast ---------- */
/* The design's faint grey (dates, form labels, fine print) is 3.2:1 on white. These two
   values replace it (decision of 20.11.2026): at least 4.5:1 on every surface it sits
   on, in both themes — AA for small text. Everything else of the design is unchanged. */
:root { --faint: #686d76; }
html[data-theme="dark"] { --faint: #858a96; }

/* ---------- Motion never hides what is already on screen ---------- */
/* The design hides [data-reveal] elements as soon as <html> has "motion" and shows each
   one when it scrolls into view. site.js can only start watching once React has taken
   over the page, and until then the hero photo and buttons would sit invisible. So the
   hiding waits for a second class, "observing", which site.js sets in the same tick in
   which it marks everything already in the viewport as shown. */
html.motion:not(.observing) [data-reveal] { opacity: 1; transform: none; }

/* ---------- Focus (keyboard) ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hero :focus-visible, .book :focus-visible, .news__form :focus-visible,
.duo__card--night :focus-visible, .site-header--on-dark:not(.is-stuck):not(.menu-open) :focus-visible { outline-color: #fff; }
.news__field input:focus-visible, .hero__field input:focus-visible, .subscribe-card__field input:focus-visible { outline: 0; }
.news__field:focus-within, .hero__field:focus-within { box-shadow: 0 2px 0 #fff; }
.subscribe-card__field:focus-within { box-shadow: 0 2px 0 var(--accent); }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.skip-link:focus { top: 16px; }
textarea, select { font: inherit; color: inherit; }
.nav-toggle, .theme-toggle { color: inherit; cursor: pointer; }

/* Images carry their real width and height (no layout shift while they load);
   the design sizes them by width, so the height follows. */
.hero__photo img, .talks__photo img, .book__art img, .product__art img, .photo img, .footer-mark { height: auto; }

/* ---------- Mobile menu panel (the prototype only draws the button) ---------- */
.menu { display: none; }
@media (max-width: 900px) {
  .site-header.menu-open { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
  .site-header.menu-open .logo .on-dark { display: none; }
  .site-header.menu-open .logo .on-light { display: block; }
  html[data-theme="dark"] .site-header.menu-open .logo .on-light { display: none; }
  html[data-theme="dark"] .site-header.menu-open .logo .on-dark { display: block; }
  .menu { display: grid; position: absolute; left: 0; right: 0; top: 100%; padding: 4px var(--gutter) 28px; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 30px 50px -30px rgba(17, 19, 24, 0.35); }
  .menu[hidden] { display: none; }
  .menu a { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
  .menu a.is-active { color: var(--accent); }
  .menu .btn { margin-top: 24px; justify-content: center; border-bottom: 0; }
  .nav-toggle span { transition: transform 0.3s var(--ease-out); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span + span { transform: translateY(-3.75px) rotate(-45deg); }
}

/* ---------- Rows that are not links ---------- */
.row--static:hover { padding-left: 0; }
.row--static:hover .ttl { color: var(--ink); }
.row--talk .cat a, .row .ttl small a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Facts: the "In brief" rows of /about (a definition list in the rows pattern) ---------- */
dl.rows { margin: 0; }
.row--fact { grid-template-columns: 148px minmax(0, 1fr); align-items: baseline; }
.row--fact dt, .row--fact dd { margin: 0; }
.row--fact .ttl a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- Open source alone (the MCP card is hidden until it has an address) ---------- */
.duo--single { grid-template-columns: 1fr; }
.duo--single .duo__card { min-height: 0; }
.codeline button { margin-left: auto; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.codeline button:hover { color: #fff; }
.btn[data-copied] .arr { transform: none; }

/* ---------- Page heads and plain sections for pages without a mockup ---------- */
.page-head .lede { margin-top: 26px; max-width: 34em; }
.page-head__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.section--flush { padding-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.split--even { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.split .h-section { margin-top: 22px; }
.split .lede + .lede { margin-top: 18px; }
.copy-block { display: grid; gap: 18px; max-width: 34em; font-size: 18px; line-height: 1.55; color: var(--muted); }
.copy-block strong, .lede strong { font-weight: 400; color: var(--ink); }
.copy-block a, .lede a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.photo img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.photo figcaption { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.empty { padding: 40px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 18px; }
.note { margin-bottom: 40px; padding: 18px 20px; border-left: 2px solid var(--accent); background: var(--mist); color: var(--ink); font-size: 16.5px; }
.note[data-state="error"] { border-left-color: #c5282f; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 9px; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.field input, .field textarea, .field select { width: 100%; padding: 14px 16px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 0; font-family: var(--ui); font-size: 17px; line-height: 1.4; color: var(--ink); transition: border-color 0.25s var(--ease); }
.field textarea { min-height: 168px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline-offset: 0; border-color: var(--accent); }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.form__fine { font-family: var(--mono); font-size: 12px; line-height: 1.6; letter-spacing: 0.02em; color: var(--faint); max-width: 30em; }
.form__fine a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.form-status { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; letter-spacing: 0.03em; color: var(--accent); }
.form-status:empty { display: none; }
.form-status[data-state="error"] { color: #c5282f; }
html[data-theme="dark"] .form-status[data-state="error"] { color: #ff9a9f; }
/* The contact form's honeypot: a person never sees the field; a script that
   fills every input does. Off-screen, not display:none, so it stays in the
   form's data and the browser's autofill cannot skip it. */
.form__trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.news__form .form-status, .hero__form .form-status { margin-top: 14px; color: #fff; }
.news__form .form-status[data-state="error"], html[data-theme="dark"] .news__form .form-status[data-state="error"],
.hero__form .form-status[data-state="error"], html[data-theme="dark"] .hero__form .form-status[data-state="error"] { color: #ffd0d2; }
.subscribe-card .form-status { margin-top: 14px; }

/* A sign-up that went through (FormEnhancer sets data-done on every newsletter
   form of the page): the label, the field, the button and the consent line fold
   away and only the status line stays, so the address is not shown again. */
form[data-newsletter-form][data-done] .label,
form[data-newsletter-form][data-done] .hero__field,
form[data-newsletter-form][data-done] .subscribe-card__field,
form[data-newsletter-form][data-done] .news__field,
form[data-newsletter-form][data-done] .hero__fine,
form[data-newsletter-form][data-done] .subscribe-card__fine,
form[data-newsletter-form][data-done] .news__fine { display: none; }
form[data-newsletter-form][data-done] .form-status { margin-top: 0; font-size: 14px; outline: none; }
.news__form[data-done] { justify-content: center; }
.book .form-status, .book .form-status[data-state="error"] { margin-top: 14px; color: #fff; }

/* ---------- Book page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; padding-bottom: 128px; }
.product__art { display: grid; place-items: center; padding: 56px; background: var(--night); }
.product__art img { width: min(320px, 100%); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.product__price { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.product__price .amount { font-family: var(--display); font-size: 34px; letter-spacing: -0.02em; line-height: 1; color: var(--ink); margin-right: auto; }
/* before the book can be bought there is no price: the tag leads the row and the button stays on the right */
.product__price > .tag:first-child { margin-right: auto; }
.product__copy { margin-top: 32px; }
.product h2 { margin: 44px 0 16px; }
.bullets { display: grid; gap: 13px; }
.bullets li { position: relative; padding-left: 20px; font-size: 17px; line-height: 1.45; color: var(--text); }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.58em; width: 6px; height: 6px; background: var(--accent-fill); }
.quote { padding: 22px 0; border-bottom: 1px solid var(--line); }
.quote p { font-size: 19px; line-height: 1.5; color: var(--ink); }
.quote cite { display: block; margin-top: 10px; font-family: var(--mono); font-style: normal; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.tag--page { margin-left: 0; border-color: var(--line-strong); color: var(--muted); }

/* ---------- Podcast page ---------- */
.episode { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.episode .date { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding-top: 6px; }
.episode h2 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -0.014em; line-height: 1.16; color: var(--ink); }
.episode p { margin-top: 8px; color: var(--muted); font-size: 16.5px; }
.episode audio { display: block; width: 100%; max-width: 560px; margin-top: 16px; }

/* ---------- Legal documents (page and drawer) ---------- */
.legal { max-width: 720px; padding-bottom: 128px; }
.legal-doc-updated { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.legal-doc h2, .legal-doc h3 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -0.014em; line-height: 1.2; color: var(--ink); margin: 40px 0 14px; }
.legal-doc p, .legal-doc li { font-size: 17.5px; line-height: 1.62; color: var(--text); }
.legal-doc p + p, .legal-doc ul + p, .legal-doc p + ul { margin-top: 16px; }
.legal-doc ul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; }
.legal-doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.legal-drawer-overlay { position: fixed; inset: 0; background: rgba(16, 17, 22, 0.55); opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s; z-index: 10000; }
.legal-drawer-root.is-open .legal-drawer-overlay { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease); }
/* The drawer is pure white with black text in BOTH themes (owner ruling, 2 July 2026):
   it resets the theme tokens for everything inside it, so dark mode never reaches it.
   Links are the brand blue. Do not add a dark override here. */
.legal-drawer { --paper: #fff; --card: #fff; --mist: #f6f6f7; --ink: #000; --text: #000; --muted: #000; --faint: rgba(0, 0, 0, 0.6); --line: rgba(17, 19, 24, 0.1); --line-strong: rgba(17, 19, 24, 0.18); --accent: var(--blue); color-scheme: light; }
.legal-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: #fff; color: #000; transform: translateX(100%); visibility: hidden; transition: transform 0.4s var(--ease-out), visibility 0s linear 0.4s; z-index: 10001; display: flex; flex-direction: column; box-shadow: -1px 0 0 var(--line); }
.legal-drawer-root.is-open .legal-drawer { transform: none; visibility: visible; transition: transform 0.4s var(--ease-out); }
.legal-drawer-head { flex: none; display: flex; justify-content: flex-end; padding: 18px 22px 0; }
.legal-drawer-close { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 1px solid var(--line-strong); padding: 0; color: var(--ink); cursor: pointer; }
.legal-drawer-close svg { width: 14px; height: 14px; }
.legal-drawer-body { flex: 1; overflow-y: auto; padding: 8px 40px 56px; -webkit-overflow-scrolling: touch; }
.legal-doc-title { font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: -0.022em; line-height: 1.08; color: var(--ink); margin-bottom: 14px; }
.legal-drawer .legal-doc-updated { margin-bottom: 28px; }
.legal-doc-permalink { margin-top: 36px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 900px) {
  .row--fact { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .row--fact .date, .row--fact .ttl { grid-column: 1; }
  .row--fact .date { grid-row: 1; }
  .row--fact .ttl { grid-row: 2; }
  .split, .split--even, .product { grid-template-columns: 1fr; gap: 36px; }
  .product { padding-bottom: 80px; }
  .product__art { padding: 40px 24px; }
  .product__art img { width: 220px; }
  .episode { grid-template-columns: 1fr; gap: 8px; }
  .legal { padding-bottom: 80px; }
  .legal-drawer-body { padding: 8px 22px 44px; }
  .codeline button { display: none; } /* as the prototype hides its copy label here; the address stays selectable text */
  /* Narrow screens: nothing may be wider than the page. The two cards' column takes the
     width it is given (not the width of its longest button), and inside the cards a long
     button label or address wraps instead of pushing the card out. */
  .duo { grid-template-columns: minmax(0, 1fr); }
  .duo__card .btn, .podcast__cta .btn { white-space: normal; height: auto; min-height: 48px; padding-top: 12px; padding-bottom: 12px; text-align: left; }
  .duo__card .codeline { height: auto; min-height: 50px; padding-top: 12px; padding-bottom: 12px; min-width: 0; overflow-wrap: anywhere; }
}

/* Phones: the logo and the Subscribe button do not both fit beside the menu button
   (they touch at 390 px and overlap below), so the header is the logo on the left and
   the menu button on the right; Subscribe is the last item of the menu. */
@media (max-width: 480px) {
  .nav .nav-cta { display: none; }
}

/* The narrowest phones (320 and 360 px): with the light/dark switch in the bar, the logo, the
   switch and the menu button no longer fit with a gap between them. The logo is drawn a little
   smaller and the switch a little narrower; from 381 px up the header is as designed. */
@media (max-width: 380px) {
  .site-header .logo img { height: 21px; }
  .theme-toggle { width: 32px; }
  .nav { margin-right: 8px; }
}

/* ---------- Cookie notice ---------- */
/* One small card in the bottom right corner: the page's card colour, almost opaque, over the
   same blur as the pinned header, inside a hairline. It says what the site stores and asks for
   nothing. The server
   renders it hidden; site.js shows it once the visitor has begun to use the page and never over
   a form (see section "Cookie notice" there). Without script it is never shown.
   Order of layers: page < notice (40) < header and its mobile menu (50) < reading line (60)
   < skip link (100) < legal drawer (10000). Square corners, the shadow of a hovered card (it
   floats over the page), one fade and a 12px rise. */
.notice {
  position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: 360px; max-width: calc(100% - 48px);
  padding: 22px 24px 24px;
  background: var(--card); background: color-mix(in srgb, var(--card) 94%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border: 1px solid var(--line-strong); box-shadow: 0 24px 50px -28px rgba(17, 19, 24, 0.28);
  color: var(--ink);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translate3d(0, 12px, 0);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out), visibility 0s linear 0.6s;
}
.notice[hidden] { display: none; }
.notice.is-in { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
/* Stepping aside for a form: gone at once for the pointer, faded for the eye. */
.notice.is-in.is-away { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s var(--ease), visibility 0s linear 0.25s; }
.notice:focus { outline: 0; }
.notice__text { margin-top: 14px; font-family: var(--display); font-size: 22px; line-height: 1.18; letter-spacing: -0.014em; color: var(--ink); }
.notice__fine { margin-top: 10px; font-family: var(--mono); font-size: 12px; line-height: 1.6; letter-spacing: 0.02em; color: var(--muted); }
.notice__fine a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.notice__actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.notice .btn { height: 40px; padding: 0 18px; font-size: 12.5px; background: none; }
.notice__link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.25; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.notice__link svg { width: 12px; height: 12px; flex: none; transition: transform 0.35s var(--ease-out); }
.notice__link:hover svg { transform: translate(2px, -2px); }
/* What a screen reader is told when the card arrives (it is not moved to). */
.notice-status { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Phones: the card lines up with the page's own 20px margins. */
@media (max-width: 900px) {
  .notice { right: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 2 * var(--gutter)); padding: 20px; }
  .notice__text { font-size: 20px; }
  .notice .btn { height: 44px; }
}
@media print { .notice { display: none; } }
