/*
 * ArbiStocks pages.css (owner: pages): the inner pages that copy typesafe's layouts 1:1.
 *   /manifesto          typesafe manifesto   (.mf-*)
 *   /desk               typesafe team        (.dk-*)
 *   /notes/*            typesafe blog post   (.nt-*)
 *   /legal/*            typesafe terms       (.lg-*)
 *   /404                typesafe language    (.nf-*)
 * Shared bits (hash strips, bottom ornaments, the compact footer bar) are .pg-*.
 * Sizes are read from reference/captures/ts-{manifesto,team,blog1,blog2,terms}-*.styles.json.
 * Load after css/base.css. No inline styles anywhere (strict CSP): everything lives here.
 */

/* ---------------------------------------------------------------- shared */

:root {
  --pg-pad: 30px;              /* typesafe inner pages keep 30px sides even on phones */
  --pg-col: 820px;             /* the text column with the left rule */
  --pg-rule: 1px solid var(--ink);
  --pg-hl-bg: #d63046;         /* highlight: typesafe's difference-blend red, deepened for 4.5:1 contrast */
  --pg-hl-ink: var(--paper);
}

/* ten-pixel strip with a pair of corner brackets at its ends (typesafe "hash-marks") */
.pg-hash { position: relative; width: 100%; height: 10px; flex: none; }

/* a section's bottom registration marks: the shared .ascii-sep, sized as typesafe's 32px "bottom" row */
.pg-marks { flex: none; }
.pg-marks--ink { background: var(--ink); }
.pg-marks--pink { background: var(--pink); }
.pg-marks--paper { background: var(--white); }
.pg-marks--magenta { background: var(--magenta); }

/* copy links inside page text */
.pg-link { text-decoration: underline; text-decoration-thickness: 1.2px; text-underline-offset: 4px; transition: color 0.5s var(--ease), text-decoration-thickness 0.5s var(--ease); }
.pg-link:hover { color: var(--magenta); text-decoration-thickness: 2px; }

/* the red highlight typesafe lays over key sentences */
.pg-hl {
  background-image: linear-gradient(var(--pg-hl-bg), var(--pg-hl-bg));
  background-repeat: no-repeat;
  background-size: 100% 1.04em;
  background-position: 0 58%;
  color: var(--pg-hl-ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* footnote references (unicode superscript digits, linked to the appendix) */
.pg-fn { color: inherit; text-decoration: none; }
.pg-fn:hover { color: var(--magenta); }
.pg-fn:target, li:target { outline: 2px solid var(--magenta); outline-offset: 2px; }

/* mono label over copy (typesafe 10px JetBrains 300, capitalized) */
.pg-label { font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }

/* ---------------------------------------------------------------- compact footer bar */
/* typesafe's manifesto, blog and legal pages end with a row of ink boxes on the page ground instead of the dark
   cube band. <body data-footer="bar"> switches the shell footer to that form; the markup stays the shell's. */

body[data-footer='bar'] .ts-footer { background: transparent; padding: 0; color: var(--paper); }
body[data-footer='bar'] .ts-footer__stage { display: none; }
body[data-footer='bar'] .ts-footer__bar { margin-top: 0; }
body[data-footer='bar'] .ts-footer__item { background: var(--ink); color: var(--paper); }
body[data-footer='bar'] a.ts-footer__item:hover { color: var(--magenta); }
@media (max-width: 809px) {
  body[data-footer='bar'] .ts-footer__bar { gap: 8px; padding: 10px 12px; margin-top: 0; }
}

/* ================================================================ /manifesto (teal) */

.mf { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 20px var(--pg-pad) 100px; }
.mf__spacer { width: 100%; flex: none; height: 70px; }
.mf__spacer--20 { height: 20px; }
.mf__spacer--80 { height: 80px; }
.mf__spacer--100 { height: 100px; }

.mf__hero { position: relative; width: 100%; max-width: 1440px; height: 400px; overflow: hidden; border: 1px solid var(--ink); flex: none; }
.mf__hero img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.mf__headline { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 1240px; }
.mf__title, .mf__closer { width: 100%; max-width: 1024px; color: var(--ink-86); text-align: center; }
.mf__closer { max-width: 1240px; }


/* a block of copy: mono label, then 50px, then text, with the ink rule on its left */
.mf-block {
  display: flex;
  flex-direction: column;
  gap: 50px;
  width: 100%;
  max-width: var(--pg-col);
  padding: 0 10px 50px;
  border-left: var(--pg-rule);
}
.mf-block__body { display: flex; flex-direction: column; gap: 20px; }
.mf-block__lead { font: 500 26px/31.2px var(--font-display); letter-spacing: 0; color: var(--ink-86); }
.mf-block__body > p { font: 400 22px/26.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.mf-block--appendix { padding-bottom: 10px; }

/* image + narrow column (typesafe "Beyond Horseless Carriages") */
.mf-split { display: flex; gap: 10px; width: 100%; max-width: var(--pg-col); }
.mf-split__fig { display: flex; flex-direction: column; gap: 10px; width: 400px; flex: none; }
.mf-split__frame { position: relative; height: 500px; overflow: hidden; background: rgba(0, 0, 0, 0.05); }
.mf-split__frame img { position: absolute; left: 50%; top: 0; width: 640px; max-width: none; height: 515px; transform: translateX(-50%); mix-blend-mode: multiply; object-fit: cover; }
.mf-split__cap { font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }
.mf-split .mf-block { flex: 1 1 auto; min-width: 0; }

/* the three steps nested inside a block */
.mf-steps { display: flex; flex-direction: column; gap: 50px; padding: 0 10px; border-left: var(--pg-rule); }
.mf-step { display: flex; flex-direction: column; gap: 10px; }
.mf-step h3 { font: 500 26px/31.2px var(--font-display); letter-spacing: 0; color: var(--ink-86); }

ol.mf-notes { margin: 0; padding: 0 0 0 21px; list-style: decimal; }
.mf-notes li { font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.mf-notes li::marker { font: inherit; }
.mf-notes a { text-decoration: underline; text-decoration-thickness: 1.2px; text-underline-offset: 3px; }
.mf-notes a:hover { color: var(--paper); }

.mf-end { width: 100%; }

@media (max-width: 1199px) {
  .mf__hero { height: 300px; }
}
@media (max-width: 899px) {
  .mf-split { flex-direction: column; }
  .mf-split__fig { width: 100%; }
  .mf-split__frame img { width: max(100%, 640px); height: 100%; }
}
@media (max-width: 809px) {
  .mf__spacer { height: 20px; }
  .mf__spacer--80 { height: 20px; }
  .mf__spacer--100 { height: 30px; }
  .mf__hero { height: 220px; }
  .mf-block__lead, .mf-step h3 { font-size: 22px; line-height: 26.4px; }
  .mf-split__frame { height: 288px; }
  .mf-split__frame img { width: max(100%, 358px); height: 288px; }
}

/* ================================================================ /desk (typesafe team) */

.dk { background: var(--white); }

/* hero: the clouds from the page top (under the nav), headline, CTA, hash strips */
.dk-hero { position: relative; margin-top: calc(-1 * var(--nav-h)); padding: var(--nav-h) var(--pg-pad) 0; overflow: hidden; }
.dk-hero__sky { position: absolute; left: 0; top: 0; width: 100%; height: auto; pointer-events: none; user-select: none; }
.dk-hero__sky img { width: 100%; height: auto; }
.dk-hero__inner { position: relative; display: flex; flex-direction: column; gap: 80px; max-width: 1240px; margin: 0 auto; padding-top: 124px; }
.dk-hero__content { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.dk-hero__title { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-86); text-align: center; }
.dk-hero__title span { display: block; }

.dk-title { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1240px; margin: 0 auto; }
.dk-title h2 { color: var(--ink-86); text-align: center; }

/* magenta: the three engine parts as staggered OS-window cards */
.dk-crew { background: var(--magenta); }
.dk-crew__head { padding: 30px var(--pg-pad) 0; }
.dk-crew__head .dk-title { gap: 100px; padding-bottom: 60px; }
.dk-crew__body { display: flex; flex-direction: column; gap: 22px; padding: 30px; }
.dk-crew__row { display: flex; gap: 10px; max-width: 1240px; min-height: 916px; margin: 0 auto; }
.dk-crew__slot { position: relative; display: flex; flex: 1 1 0; min-width: 0; }
.dk-crew__slot--1 { align-items: flex-start; padding-right: 40px; }
.dk-crew__slot--2 { align-items: flex-end; padding: 0 20px 20px; }
.dk-crew__slot--3 { align-items: center; padding: 0 0 40px 40px; }

.dk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  color: var(--ink);
  box-shadow: rgba(0, 0, 0, 0.02) 0 0.48px 2.4px 0, rgba(0, 0, 0, 0.2) 0 4px 20px 0;
}
.dk-card__bar, .dk-card__inner, .dk-card__info, .dk-spec__bar, .dk-spec__inner, .dk-spec__body { position: relative; }
.dk-card__bar::after, .dk-card__inner::after, .dk-card__info::after,
.dk-spec__bar::after, .dk-spec__inner::after, .dk-spec__body::after {
  content: ''; position: absolute; inset: 0; border: var(--border) solid var(--ink); pointer-events: none;
}
.dk-card__bar { display: flex; gap: 0; padding: 2px 3px 5px 4px; background: var(--ink); color: var(--paper); font: 500 18px/18px var(--font-pixel); letter-spacing: 0.01em; white-space: nowrap; }
.dk-card__inner { display: flex; flex-direction: column; gap: 4px; padding: 0 4px 4px; background: var(--grey-2); }
.dk-card__art { position: relative; aspect-ratio: 359 / 355; overflow: hidden; background: var(--grey-1); }
.dk-card__art canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.dk-card__info { display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 6px; background: var(--paper); }
.dk-card__name { align-self: flex-start; padding: 4px 2px; background: var(--ink); color: var(--paper); font: 500 36px/36px var(--font-pixel); letter-spacing: 0; }
.dk-card__bio { font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink); }
.dk-card__links { display: flex; gap: 10px; padding: 4px 8px 8px 0; }
.dk-card__link { padding: 2px 0; font: 500 20px/20px var(--font-pixel); letter-spacing: 0.01em; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.2px; text-underline-offset: 4px; }
.dk-card__link:hover { color: var(--magenta); }

/* the pop-out "Spec" window (typesafe "Fun fact"), placed over each card's edge */
.dk-spec { position: absolute; z-index: 2; display: flex; flex-direction: column; width: 179px; color: var(--ink); }
.dk-spec__bar { padding: 2px 0 5px 4px; background: var(--ink); color: var(--grey-1); font: 500 18px/18px var(--font-pixel); letter-spacing: 0.01em; }
.dk-spec__inner { padding: 0 3px 3px; background: var(--grey-2); }
.dk-spec__body { padding: 4px 4px 8px; background: var(--grey-1); font: 500 18px/18px var(--font-pixel); letter-spacing: 0.01em; color: var(--ink); }
.dk-spec__icon { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -1px; }
/* offsets from typesafe's 1440 layout, measured from the card's info panel */
.dk-card--1 .dk-spec { right: 5px; bottom: -66px; }
.dk-card--2 .dk-spec { right: -59px; top: -86px; }
.dk-card--3 .dk-spec { left: -55px; top: -127px; }

/* pink: method (typesafe "Culture") */
.dk-method { background: var(--pink); }
.dk-method__head { padding: 100px var(--pg-pad) 50px; }
.dk-method__head .dk-title { max-width: none; gap: 20px; }
.dk-method__head .pg-hash + .pg-hash { margin-top: -20px; }
.dk-method__body { max-width: 1240px; margin: 0 auto; padding: 0 30px 100px; }
.dk-method__col { max-width: 810px; margin: 0 auto; padding: 0 0 10px 10px; border-left: var(--pg-rule); }
.dk-method__col p { font: 400 22px/26.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.dk-method__col p + p { margin-top: 20px; }
.dk-method__col p.dk-method__strong { color: var(--black); }
.dk-method__foot { max-width: 1180px; margin: 40px auto 0; }

/* white: rules (typesafe "Values"), a staggered 4-column grid */
.dk-rules { background: var(--white); }
.dk-rules__top { padding-bottom: 100px; }
.dk-rules__head { padding: 0 var(--pg-pad) 50px; }
.dk-rules__grid { display: flex; flex-direction: column; gap: 80px; padding: 40px var(--pg-pad) 140px; }
.dk-rules__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; width: 100%; max-width: 1240px; margin: 0 auto; }
.dk-rule { display: flex; flex-direction: column; gap: 50px; padding: 0 10px; border-left: var(--pg-rule); }
.dk-rule__eyebrow { min-height: 24px; padding-right: 56px; font: 400 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }
.dk-rule__text { font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.dk-rule__img { align-self: flex-end; width: 64px; height: 64px; object-fit: cover; image-rendering: pixelated; }
.dk-rule__copy { display: flex; flex-direction: column; gap: 50px; }
.dk-rules__row--a .dk-rule:nth-child(1) { grid-column: 1; }
.dk-rules__row--b .dk-rule:nth-child(1) { grid-column: 2; }

/* full-bleed band (typesafe team photo, 1440 x 946 + 20) */
.dk-photo { padding-bottom: 20px; background: var(--white); }
.dk-photo canvas { width: 100%; height: auto; aspect-ratio: 1440 / 946; image-rendering: pixelated; background: var(--grey-1); }

/* the four fee tiers (typesafe swag row) */
.dk-tiers { padding: 60px var(--pg-pad) 0; background: var(--white); }
.dk-tiers > .pg-hash { max-width: 1240px; margin: 0 auto; }
.dk-tiers > .pg-hash.dk-join__hash { max-width: none; margin: 0 0 30px; }
.dk-tiers__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 1240px; margin: 40px auto 60px; padding: 0; list-style: none; }
.dk-tier { position: relative; display: flex; flex-direction: column; gap: 10px; }
.dk-tier img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; image-rendering: pixelated; }
.dk-tier__cap { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dk-tier__fee { padding: 2px 4px 4px; background: var(--ink); color: var(--paper); font: 500 28px/28px var(--font-pixel); letter-spacing: 0.01em; }
.dk-tier__n { font: 300 13px/16px var(--font-mono); letter-spacing: 0.05em; color: var(--ink-86); }

/* the universe strip (typesafe photo carousel): 49 stock tiles sliding by */
.dk-strip { position: relative; overflow: hidden; background: var(--paper); }
/* padding-right = gap, so the doubled list loops at exactly -50% */
ul.dk-strip__track { display: flex; gap: 16px; width: max-content; padding: 0 16px 0 0; margin: 0; list-style: none; animation: dk-slide 160s linear infinite; }
.dk-strip.is-paused .dk-strip__track { animation-play-state: paused; }
.dk-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 260px;
  height: 260px;
  padding: 10px;
  background: var(--grey-1);
  flex: none;
}
.dk-tile::after { content: ''; position: absolute; inset: 0; border: var(--border) solid var(--ink); pointer-events: none; }
.dk-tile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.dk-tile__sym { font: 500 28px/28px var(--font-pixel); color: var(--ink); background: var(--paper); padding: 2px 4px 4px; }
.dk-tile__pools { font: 400 12px/14px var(--font-mono); color: var(--ink-86); text-align: right; }
.dk-tile__logo { align-self: center; width: 96px; height: 96px; border-radius: 50%; }
.dk-tile__name { font: 400 15px/18px var(--font-body); letter-spacing: 0.04em; color: var(--ink-86); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-tile:nth-child(3n + 2) { background: var(--pink); }
.dk-tile:nth-child(3n + 3) { background: var(--paper); }
@keyframes dk-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* white: call to action (typesafe "Join Us") */
.dk-join { background: var(--white); padding: 0 var(--pg-pad); }
.dk-join__inner { display: flex; flex-direction: column; align-items: center; gap: 100px; max-width: 1240px; margin: 0 auto; }
.dk-join__content { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.dk-join__content h2 { color: var(--ink-86); text-align: center; }
.dk-join__content p { max-width: 650px; font: 400 22px/26.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink); text-align: center; }
.dk-join__cta { margin-top: 10px; }
.dk-join__hash { margin-bottom: 30px; }

/* teal: the dither grid, 5 x 3 tiles (12 typesafe dithers + 3 planet dithers) */
.dk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--teal); }
.dk-grid__cell { position: relative; aspect-ratio: 288 / 320; overflow: hidden; }
.dk-grid__cell img, .dk-grid__cell canvas { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

@media (max-width: 1199px) {
  .dk-crew__row { min-height: 0; }
  .dk-crew__slot--1, .dk-crew__slot--2, .dk-crew__slot--3 { padding: 0; }
  .dk-crew__slot--2 { padding-top: 120px; }
  .dk-crew__slot--3 { padding-top: 60px; align-items: flex-start; }
  /* narrower cards: keep each Spec window over its own card's art */
  .dk-card--2 .dk-spec { right: 8px; top: -104px; }
  .dk-card--3 .dk-spec { left: 8px; top: -112px; }
  .dk-rules__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dk-rules__row--a .dk-rule:nth-child(1), .dk-rules__row--b .dk-rule:nth-child(1) { grid-column: auto; }
}
@media (max-width: 999px) {
  .dk-crew__row { flex-direction: column; align-items: center; gap: 90px; }
  .dk-crew__slot { width: 100%; max-width: 450px; flex: none; }
  .dk-crew__slot--2, .dk-crew__slot--3 { padding-top: 0; }
  /* order as typesafe's phone layout: first, third, second */
  .dk-crew__slot--3 { order: 2; }
  .dk-crew__slot--2 { order: 3; }
}
@media (max-width: 809px) {
  .dk-rule__copy { gap: 0; }
  .dk-hero__inner { padding-top: 60px; gap: 0; }
  .dk-hero__inner > .pg-hash { display: none; }
  .dk-hero__content { gap: 40px; padding-bottom: 20px; }
  .dk-crew__head { padding: 60px var(--pg-pad) 0; }
  .dk-crew__head .dk-title { padding-bottom: 30px; }
  .dk-crew__head .pg-hash { display: none; }
  .dk-crew__body { padding: 30px 24px; }
  .dk-crew__body > .pg-hash { display: none; }
  /* the Spec window sits inside the card text on phones, as typesafe's fun fact line */
  .dk-card .dk-spec { position: static; width: auto; }
  .dk-spec__bar { display: none; }
  .dk-spec__inner { padding: 0; background: transparent; }
  .dk-spec__body { padding: 0; background: transparent; }
  .dk-spec__inner::after, .dk-spec__body::after { display: none; }
  .dk-method__head { padding: 80px var(--pg-pad) 50px; }
  .dk-method__head .pg-hash { display: none; }
  .dk-method__body { padding: 0 24px 80px; }
  .dk-method__foot { display: none; }
  .dk-rules__top { padding-bottom: 60px; }
  .dk-rules__grid { padding: 40px 24px 90px; }
  .dk-rules__row { grid-template-columns: minmax(0, 1fr); gap: 80px; }
  .dk-rule__img { align-self: flex-start; }
  .dk-tile { width: 200px; height: 200px; }
  .dk-tile__logo { width: 72px; height: 72px; }
  .dk-join { padding: 80px 24px 0; }
  .dk-join__inner { gap: 40px; }
  .dk-join__inner > .pg-hash { display: none; }
  .dk-join__content p { font-size: 22px; }
  .dk-tiers { padding-top: 40px; }
  .dk-tiers__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; margin: 24px auto 40px; }
  .dk-tiers > .pg-hash:first-of-type { display: none; }
  .dk-tier__fee { font-size: 22px; line-height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .dk-strip { overflow-x: auto; }
  ul.dk-strip__track { animation: none; }
}

/* ================================================================ /notes/* (typesafe blog post, teal-grey) */

.nt { display: flex; flex-direction: column; gap: 60px; margin: 20px 0; padding: 0 var(--pg-pad); }
.nt-back { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.nt-back a, .nt-back span { display: inline-flex; align-items: center; gap: 6px; padding: 10px 7px; font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }
.nt-back a:hover { color: var(--magenta); }
.nt-back a, .nt-back > span { height: 32px; }
.nt-back__mark { font-size: 12px; line-height: 12px; }

.nt-cover { width: 100%; max-width: 1380px; height: 350px; margin: 0 auto; overflow: hidden; border: 1px solid var(--ink); }
.nt-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.nt + .nt { margin-top: 0; }

.nt-head { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 1240px; margin: 0 auto; }
.nt-head__meta { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 10px; }
.nt-tag { padding: 2px 3px 5px; background: var(--ink-86); color: var(--teal-grey); font: 500 22px/22px var(--font-pixel); letter-spacing: 0.01em; }
.nt-date { padding: 2px 3px 5px; font: 500 16px/16px var(--font-pixel); letter-spacing: 0.01em; color: var(--ink); }
.nt-title { width: 100%; max-width: 1024px; color: var(--ink-86); text-align: center; }

/* the post body: 820 column with the left rule, typesafe's rich-text styles */
.nt-body {
  width: 100%;
  max-width: var(--pg-col);
  margin: 0 auto;
  padding: 0 10px 50px;
  border-left: var(--pg-rule);
  font: 400 17px/20.4px var(--font-body);
  letter-spacing: 0.05em;
  color: var(--ink-86);
}
.nt-body > * + * { margin-top: 20px; }
.nt-body strong { font-weight: 700; color: var(--ink); }
.nt-body em { font-style: italic; }
.nt-body a:not(.cta-link) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.nt-body a:not(.cta-link):hover { color: var(--magenta); }
.nt-body h2 { margin-top: 40px; font: 500 64px/57.6px var(--font-display); letter-spacing: 0; text-transform: capitalize; color: var(--ink-86); }
.nt-body h3 { margin-top: 40px; font: 500 26px/31.2px var(--font-display); letter-spacing: 0; color: var(--ink-86); }
.nt-body h4 { margin-top: 30px; font: 500 22px/30.8px var(--font-display); letter-spacing: 0; color: var(--ink-86); }
.nt-body h5 { margin-top: 30px; font: 700 16px/16px var(--font-inter); letter-spacing: -0.02em; color: var(--ink-86); }
.nt-body h2 + *, .nt-body h3 + *, .nt-body h4 + * { margin-top: 20px; }
.nt-body ul, .nt-body ol { padding-left: 21px; }
.nt-body ul { list-style: disc; }
.nt-body ol { list-style: decimal; }
.nt-body li + li { margin-top: 0; }
.nt-body code { padding: 1.7px 3.4px; background: rgba(0, 0, 0, 0.1); font: 400 0.94em/1 var(--font-fragment); letter-spacing: 0; color: #333333; }
.nt-byline { font-style: italic; }
.nt-byline + * { margin-top: 60px; }

/* tables (typesafe: 1px translucent grey rules, tinted header) */
.nt-table { width: 100%; overflow-x: auto; }
.nt-table table { width: 100%; border: 1px solid rgba(153, 153, 153, 0.25); font: inherit; }
.nt-table th, .nt-table td { padding: 10px; text-align: left; vertical-align: top; border: 1px solid rgba(153, 153, 153, 0.25); }
.nt-table th { background: rgba(153, 153, 153, 0.1); font-weight: 700; color: var(--ink); }
.nt-table td.num { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nt-table caption { caption-side: bottom; padding-top: 8px; text-align: left; font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; color: var(--ink-86); }

/* a figure in the post: pink pyramid / band diagrams drawn in SVG */
.nt-fig { margin-top: 40px; }
.nt-fig svg { width: 100%; max-width: 480px; height: auto; overflow: visible; }
.nt-fig--wide svg { max-width: 800px; }
.nt-fig .f-shape { fill: var(--pink); stroke: var(--ink); stroke-width: 1; }
.nt-fig .f-band { fill: var(--pink); stroke: var(--ink); stroke-width: 1; }
.nt-fig .f-gap { fill: var(--ink); }
.nt-fig .f-rule { stroke: var(--ink); stroke-width: 1; fill: none; }
.nt-fig .f-dash { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
.nt-fig .f-dot { fill: var(--pink); stroke: var(--ink); stroke-width: 1.2; }
.nt-fig text { font-family: var(--font-mono); font-weight: 400; font-size: 13px; letter-spacing: 0; fill: var(--ink); }
.nt-fig text.f-sm { font-size: 11px; fill: var(--ink-86); }
.nt-fig figcaption { margin-top: 10px; font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; color: var(--ink-86); }
.nt-fig + * { margin-top: 40px; }

/* light FAQ inside a post (typesafe blog FAQ: dashed rule, ink chevron box) */
.nt-faq { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.nt-faq__item { padding: 0 10px 20px; border-left: 1px dashed var(--ink); }
.nt-faq__item[open] { border-left-style: solid; }
.nt-faq__q { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; cursor: pointer; list-style: none; font: 300 10px/12px var(--font-mono); letter-spacing: 0.05em; text-transform: capitalize; color: var(--ink-86); }
.nt-faq__q::-webkit-details-marker { display: none; }
.nt-faq__q::marker { content: ''; }
.nt-faq__icon {
  width: 20px; height: 20px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Crect x='.5' y='.5' width='19' height='19' stroke='%231E1E1E'/%3E%3Cpath d='M5 7l5 6 5-6' stroke='%231E1E1E' stroke-width='1.25'/%3E%3C/svg%3E") center/20px 20px no-repeat;
  transition: transform 0.3s var(--ease);
}
.nt-faq__item[open] .nt-faq__icon { transform: rotate(180deg); }
.nt-faq__a { padding-top: 20px; font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.nt-faq__a p + p { margin-top: 12px; }

/* next notes at the foot of a post */
.nt-more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }

@media (max-width: 1199px) {
  .nt-body h2 { font-size: 41px; line-height: 36.9px; }
  .nt-cover { height: 300px; }
}
@media (max-width: 809px) {
  .nt { gap: 40px; }
  .nt-cover { height: 220px; }
  .nt-tag { font-size: 20px; line-height: 20px; }
  .nt-body h2 { font-size: 33px; line-height: 29.7px; }
  .nt-body h3 { font-size: 22px; line-height: 26.4px; }
  .nt-table td.num { font-size: 12px; }
  .nt-table table { font-size: 14px; line-height: 17px; letter-spacing: 0.02em; }
  .nt-table th, .nt-table td { padding: 6px; overflow-wrap: break-word; }
}

/* ================================================================ /legal/* (typesafe terms, pink) */

.lg { padding: 140px var(--pg-pad) 140px; }
.lg__col { display: flex; flex-direction: column; gap: 60px; max-width: 700px; margin: 0 auto; padding: 100px 50px 0; }
.lg__head { display: flex; flex-direction: column; gap: 15px; max-width: 600px; }
.lg__org { font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.lg__title { font: 500 48px/43.2px var(--font-display); letter-spacing: 0; text-transform: capitalize; color: var(--ink-86); }
.lg__date { font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.lg__body { max-width: 600px; font: 400 17px/20.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink-86); }
.lg__body > * + * { margin-top: 20px; }
.lg__body strong { font-weight: 700; color: var(--ink); }
.lg__body a { color: var(--black); text-decoration: underline; text-decoration-thickness: 1.2px; text-underline-offset: 3px; }
.lg__body a:hover { color: var(--magenta); }
.lg__body h2 { margin-top: 40px; font: 500 26px/31.2px var(--font-display); letter-spacing: 0; color: var(--ink-86); }
.lg__body h3 { margin-top: 20px; font: 700 16px/16px var(--font-inter); letter-spacing: -0.02em; color: var(--ink-86); }
.lg__body ul { padding-left: 21px; list-style: disc; }
.lg__body code { font: 400 15px/1 var(--font-mono); letter-spacing: 0; padding: 1px 3px; background: rgba(0, 0, 0, 0.08); }
.lg__caps { text-transform: uppercase; }

@media (max-width: 809px) {
  .lg { padding: 60px var(--pg-pad) 80px; }
  .lg__col { padding: 40px 0 0; gap: 40px; }
  .lg__title { font-size: 41px; line-height: 38px; }
}

/* ================================================================ /404 */

.nf { position: relative; margin-top: calc(-1 * var(--nav-h)); padding: var(--nav-h) var(--pg-pad) 0; overflow: hidden; }
.nf__sky { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; }
.nf__sky img { width: 100%; height: auto; }
.nf__inner { position: relative; display: flex; flex-direction: column; gap: 80px; max-width: 1240px; margin: 0 auto; padding: 124px 0 0; }
.nf__content { display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center; }
.nf__title { color: var(--ink-86); }
.nf__lead { max-width: 560px; font: 400 22px/26.4px var(--font-body); letter-spacing: 0.05em; color: var(--ink); }
.nf__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.nf__window { width: min(100%, 420px); margin: 0 auto; }
.nf__window .os-window__body { font: 400 13px/1.5 var(--font-mono); letter-spacing: 0; text-align: left; }
.nf__window code { font: inherit; }
.nf__end { margin: 80px calc(-1 * var(--pg-pad)) 0; width: auto; }

@media (max-width: 809px) {
  .nf__inner { padding-top: 60px; gap: 40px; }
  .nf__inner > .pg-hash { display: none; }
  .nf__ctas { gap: 16px 40px; }
  .nf__end { margin-top: 40px; }
}
