/* Parser website stylesheet.
   Shared by home, blog, letter, Join Us, Terms, Privacy, and 404. Loaded after site.css and second.css. */

@font-face { font-family: "Geist Mono"; src: url(../fonts/GeistMono-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* Parser dark-only brand palette: #0B0D10 canvas, #ECEFF3 ink, Parser blue #1E71C9 */
  color-scheme: dark;
  --brand: #1E71C9;
  --brand-hover: #1861AF;
  --brand-soft: #152537;
  --bg: #0B0D10;
  --ink: #ECEFF3;
  --on-ink: #0B0D10;
  --muted: color-mix(in srgb, var(--ink) 62%, transparent);
  --faint: color-mix(in srgb, var(--ink) 38%, transparent);
  --ink-20: color-mix(in srgb, var(--ink) 20%, transparent);
  --ink-10: color-mix(in srgb, var(--ink) 12%, transparent);
  --fill-0: color-mix(in srgb, var(--ink) 3%, transparent);
  --fill: color-mix(in srgb, var(--ink) 5%, transparent);
  --fill-2: color-mix(in srgb, var(--ink) 8%, transparent);
  --fill-3: color-mix(in srgb, var(--ink) 9%, transparent);
  --line: rgba(236, 239, 243, 0.09);
  --hair: rgba(236, 239, 243, 0.14);
  --raised: #14181F;
  --column: 1024px;
  --gutter: 20px;
  --t14: 14px; --l24: 24px; --l20: 20px;
  --button-primary: var(--brand);
  --button-foreground: #FFFFFF;
  --button-ring: color-mix(in srgb, #5CA3ED 55%, transparent);
  --button-hover: var(--brand-hover);
  --button-font-size: var(--t14);
  --grain: 0;
}

/* Figma sets Inter in its regular cut at every size; the browser would otherwise switch to
   the narrower display cut for large text and break lines differently */
html { background: var(--bg); }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-optical-sizing: none; }
.site { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.site:has(> .bar) { padding-top: calc(64px + var(--safe-area-top, 0px)); }
.col { width: min(var(--column), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
/* a window wider than a phone but narrower than the column (a tablet) keeps 40 at each side, not
   20: on every page, so the bar and the footer stay put from one page to the next */
@media (min-width: 761px) { :root { --gutter: 40px; } }

/* type, tuned for Parser's Saans variable font */
.t-display { font-weight: 440; font-size: 28px; line-height: 39px; letter-spacing: -0.75px; margin: 0; text-wrap: pretty; }
.t-lead { font-weight: 440; font-size: 20px; line-height: 28px; letter-spacing: -.4px; margin: 0; text-wrap: pretty; }
.t-body { font-size: var(--t14); line-height: var(--l24); letter-spacing: -.15px; margin: 0; text-wrap: pretty; }
.t-meta { font-size: var(--t14); line-height: var(--l24); letter-spacing: -.15px; color: var(--muted); margin: 0; text-wrap: pretty; }
.t-strong { font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
/* the bar's mark and the footer's icons are written into this stylesheet, so every page draws them in
   its first frame; fetched as files they came a frame or three after the page and blinked on each move
   between pages. Drawn from assets/redo/: mark-bar.svg (as a 238×154 picture: the file itself is 420 KB),
   bot.svg, human.svg (Lucide, ISC), sun.svg, moon.svg */
.foot .view .icon { --src: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20stroke%3D%22%233B2E10%22%20stroke-width%3D%222.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%208V4H8%22%2F%3E%3Crect%20width%3D%2216%22%20height%3D%2212%22%20x%3D%224%22%20y%3D%228%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M2%2014h2%22%2F%3E%3Cpath%20d%3D%22M20%2014h2%22%2F%3E%3Cpath%20d%3D%22M15%2013v2%22%2F%3E%3Cpath%20d%3D%22M9%2013v2%22%2F%3E%3C%2Fsvg%3E"); }
.foot .view.on .icon { --src: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20stroke%3D%22%233B2E10%22%20stroke-width%3D%222.25%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%228%22%20r%3D%225%22%2F%3E%3Cpath%20d%3D%22M20%2021a8%208%200%200%200-16%200%22%2F%3E%3C%2Fsvg%3E"); }
.foot .theme .sun { --src: url("data:image/svg+xml,%3Csvg%20preserveAspectRatio%3D%22none%22%20overflow%3D%22visible%22%20style%3D%22display%3A%20block%3B%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cg%20id%3D%22Frame%20184%22%20clip-path%3D%22url(%23clip0_0_320)%22%3E%20%3Ccircle%20id%3D%22Ellipse%203%22%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223.5%22%20stroke-width%3D%221.5%22%20stroke%3D%22%233B2E10%22%2F%3E%20%3Ccircle%20id%3D%22Ellipse%204%22%20cx%3D%228%22%20cy%3D%221%22%20r%3D%221%22%20fill%3D%22%233B2E10%22%2F%3E%20%3Ccircle%20id%3D%22Ellipse%205%22%20cx%3D%228%22%20cy%3D%2215%22%20r%3D%221%22%20fill%3D%22%233B2E10%22%2F%3E%20%3Ccircle%20id%3D%22Ellipse%206%22%20cx%3D%221%22%20cy%3D%228%22%20r%3D%221%22%20fill%3D%22%233B2E10%22%2F%3E%20%3Ccircle%20id%3D%22Ellipse%207%22%20cx%3D%2215%22%20cy%3D%228%22%20r%3D%221%22%20fill%3D%22%233B2E10%22%2F%3E%20%3Ccircle%20id%3D%22Ellipse%208%22%20cx%3D%223.05029%22%20cy%3D%2212.9491%22%20r%3D%221%22%20fill%3D%22%233B2E10%22%2F%3E%20%3Ccircle%20id%3D%22Ellipse%209%22%20cx%3D%2212.9497%22%20cy%3D%223.05063%22%20r%3D%221%22%20fill%3D%22%233B2E10%22%2F%3E%20%3Ccircle%20id%3D%22Ellipse%2010%22%20cx%3D%223.05029%22%20cy%3D%223.05063%22%20r%3D%221%22%20fill%3D%22%233B2E10%22%2F%3E%20%3Ccircle%20id%3D%22Ellipse%2011%22%20cx%3D%2212.9499%22%20cy%3D%2212.9492%22%20r%3D%221%22%20fill%3D%22%233B2E10%22%2F%3E%20%3C%2Fg%3E%20%3Cdefs%3E%20%3CclipPath%20id%3D%22clip0_0_320%22%3E%20%3Crect%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22white%22%2F%3E%20%3C%2FclipPath%3E%20%3C%2Fdefs%3E%20%3C%2Fsvg%3E"); }
.foot .theme .moon { --src: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13%2010.1A5.25%205.25%200%201%201%205.9%203a4.25%204.25%200%200%200%207.1%207.1Z%22%20stroke%3D%22%233B2E10%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E"); }

/* the kit's button: dark, a deeper brown when pointed at */
.button:hover { background-color: var(--button-hover); }

/* ---------- top bar: 1024 column, 20 from the top ---------- */
/* The shared viewport stylesheet extends this surface through Safari’s safe area. */
.bar { position: fixed; inset: 0 0 auto; z-index: 10; background: var(--bg); }
.bar .col { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 550; font-size: 16px; line-height: 24px; letter-spacing: -.2px; border-radius: 6px; }
.brand .name {
  display: inline-block;
  width: 78px;
  height: 20px;
  margin-top: 2px;
  overflow: hidden;
  text-indent: -9999px;
  color: transparent;
  background: var(--ink);
  -webkit-mask: url("../brand/parser-wordmark-black.svg") left center / contain no-repeat;
  mask: url("../brand/parser-wordmark-black.svg") left center / contain no-repeat;
}
:is(.brand, .hero-mark) .mark { display: none !important; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a.link { white-space: nowrap; display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: var(--t14); font-weight: 470; line-height: var(--l20); transition: background-color .15s, color .15s; }
/* ghost links: no box on hover; a thin underline draws in */
.nav a.link { position: relative; isolation: isolate; }
.nav a.link::after, .nav a.link::before { content: ""; position: absolute; pointer-events: none; transform: scaleX(0); transform-origin: left center; transition: transform .32s var(--ease); }
/* Line (default): a thin underline draws in from the left */
.nav a.link::after { left: 10px; right: 10px; bottom: 5px; height: 1px; background: currentColor; }
.nav a.link:hover::after { transform: none; }
/* on a page of its own, the bar shows where you are: that link dark, the others grey (frames 5-7) */
.nav.here a.link { color: var(--muted); }
.nav.here a.link[aria-current], .nav.here a.link:hover { color: var(--ink); }
/* the bar's waitlist button: always there on the other pages; on home it arrives once the
   email box has scrolled away, and the links make room for it */
.nav .cta { display: flex; }
.nav .cta .button { gap: .26em; }
.nav .cta.away { display: none; }
/* arriving, the button fades and slides in whole (never revealed through a slot); leaving, it
   fades first; the links beside it glide over (the page's script) */
.nav .cta.entering .button { animation: cta-in .42s cubic-bezier(.2,.7,.2,1) both; }
.nav .cta.leaving .button { opacity: 0; transform: translateX(6px); transition: opacity .14s ease, transform .14s ease; }
@keyframes cta-in { from { opacity: 0; transform: translateX(10px) scale(.97); } }

/* ---------- footer ---------- */
.foot { margin-top: auto; }
.foot .col { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 0 0 40px; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; color: var(--muted); }
/* a page longer than the window gets a line above the footer (frame 7) */
.foot.lined .col { border-top: 1px solid var(--line); padding: 24px 0; margin-top: calc(72px + var(--safe-area-top, 0px)); }
.foot nav, .foot .right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot a, .foot .link { color: inherit; text-decoration: none; transition: color .2s; border-radius: 4px; }
.foot .link { padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; cursor: pointer; }
.foot a:hover, .foot .link:hover, .foot a[aria-current] { color: var(--ink); }
/* the company name in the footer goes to the lab's page */
.foot a.maker { color: inherit; }
.foot .rule { width: 1px; height: 16px; background: var(--hair); }
.foot .theme { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; position: relative; }
.foot .theme .icon { position: absolute; inset: 0; transition: opacity .3s var(--ease), transform .45s var(--ease); }
.foot .theme .moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-theme="dark"] .foot .theme .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="dark"] .foot .theme .moon { opacity: 1; transform: none; }
.foot .theme::before { content: ""; position: absolute; inset: -14px; }
/* the link to the agent view (<page>/ai), beside day/night: a bot (Lucide's) on the human page, a person (user-round) on the agent view, both in ink like day/night */
.foot .view { display: grid; place-items: center; width: 16px; height: 16px; color: var(--ink); position: relative; }
.foot .view::before { content: ""; position: absolute; inset: -14px -6px -14px -14px; }
.foot .view:focus-visible { outline: 2px solid var(--button-ring); outline-offset: 2px; border-radius: 4px; }
/* narrower than any current phone, the maker's line, the bot and day/night sit closer, so they keep one line as before */
@media (max-width: 351.98px) { .foot .right { gap: 14px; } }
@media (max-width: 333.98px) { .foot .right { gap: 10px; } }

:is(.brand, .nav a.link, .foot a, .foot .link, .foot .theme, .topics button, .row, .role, .back, :is(.read-more, .hero-more) a, .dd-trigger):focus-visible { outline: 2px solid var(--button-ring); outline-offset: 2px; }

/* ---------- inputs: the drawn filled field ---------- */
.field { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px; background: var(--fill-3); color: var(--ink); transition: box-shadow .15s; }
.field.search { background: var(--fill-2); padding: 0 10px 0 8px; }
.field .icon { opacity: .6; }
.field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 0; font: inherit; font-size: var(--t14); font-weight: 470; line-height: var(--l20); color: var(--ink); }
.field input::placeholder { color: var(--faint); }
/* typing in a field darkens it a step; no ring */
.field:focus-within { background: color-mix(in srgb, var(--brand) 7%, var(--fill-3)); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--brand) 42%, transparent); }
.field.search:focus-within { background: var(--fill-3); }
.field input::-webkit-search-cancel-button, .field input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
/* the search's own clear button: Lucide's x */
.clear { display: grid; place-items: center; width: 20px; height: 20px; margin-right: -4px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s; }
.clear:hover { color: var(--ink); background: var(--fill-2); }
.clear svg { width: 14px; height: 14px; }
.clear[hidden] { display: none; }
.field:has(input[aria-invalid="true"]) { box-shadow: 0 0 0 1.5px var(--ink); }

/* ---------- pages of their own: heading 112 from the top ---------- */
/* the bar ends at 64; headings start at 112 (blog, Join Us), 92 (back link) */
main.page { padding: 48px 0 0; }
/* --post-col: the one width a post's heading, picture and text share */
main.page.post-page { padding-top: 28px; --post-col: 680px; }
.head { display: flex; flex-direction: column; gap: 4px; }
.head.center { width: min(520px, 100%); margin: 0 auto; text-align: center; gap: 12px; }
/* centred lines read as one shape: even out the line lengths instead of a long line over a short one */
.head.center .t-meta { text-wrap: balance; }


/* Blog: search and topics on the left, posts on the right (frame 5) */
/* the left side (heading, search, topics) stays exactly where it starts; only the posts scroll.
   The posts start level with the search, as drawn */
.blog { display: grid; grid-template-columns: 250px 1fr; gap: 52px; }
.side .head .t-meta { white-space: nowrap; }
.side .tools { display: flex; flex-direction: column; gap: 28px; margin-top: 56px; }
.blog .list { padding-top: 124px; }
.list .posts > li { transition: opacity .3s var(--ease), transform .45s var(--ease); }
.list.out .posts > li { opacity: 0; transform: translateY(-4px); transition-duration: .14s; }
.list.in .posts > li { opacity: 0; transform: translateY(10px); transition: none; }
.list .posts > li:nth-child(2) { transition-delay: .04s; } .list .posts > li:nth-child(3) { transition-delay: .08s; } .list .posts > li:nth-child(4) { transition-delay: .12s; } .list .posts > li:nth-child(n+5) { transition-delay: .16s; }
.list.out .posts > li { transition-delay: 0s; }
/* the left side stays exactly where it starts while the posts scroll */
.side { display: flex; flex-direction: column; align-self: start; position: sticky; top: calc(112px + var(--safe-area-top, 0px)); }
.topics { display: flex; flex-direction: column; gap: 12px; padding-left: 4px; margin: 0; list-style: none; }
.topics li { display: flex; }
.topics button { display: inline-flex; gap: 8px; align-items: baseline; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; cursor: pointer; transition: color .15s; border-radius: 4px; }
.topics button .n { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.topics button:hover { color: var(--ink); }
.topics button[aria-pressed="true"] { color: var(--ink); font-weight: 500; }
.posts { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 0; list-style: none; }
.posts li { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.posts li:last-child { border-bottom: 0; }
/* a row lights up as a whole when pointed at, so it's clear what a press opens */
.row { display: flex; gap: 33px; align-items: center; color: inherit; text-decoration: none; margin: -10px; padding: 10px; border-radius: 20px; transition: background-color .2s; }
.row:hover { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.thumb { width: 200px; height: 120px; flex: none; border-radius: 12px; background: var(--fill); overflow: hidden; transition: background-color .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.row:hover .thumb img { transform: scale(1.03); }
.row .words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-right: 24px; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; }
.row .words > div { display: flex; flex-direction: column; gap: 4px; }
.row .title { font-weight: 500; transition: color .15s; }
.row .title .go { display: inline-block; margin-left: 6px; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .25s var(--ease); }
.row:hover .title .go { opacity: 1; transform: none; }
.row .excerpt { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .meta { display: flex; gap: 8px; color: var(--muted); }
.empty { padding: 28px 0; color: var(--muted); font-size: var(--t14); }

/* Join Us: centred heading, open roles in soft rows with two filters (frame 6) */
.roles { margin-top: 87px; display: flex; flex-direction: column; gap: 20px; }
.roles-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 4px; flex-wrap: wrap; }
.picks { display: flex; gap: 12px; }
.role-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.role { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; padding: 12px 28px 12px 20px; border-radius: 12px; background: var(--fill-0); color: var(--ink); text-decoration: none; font-size: var(--t14); line-height: var(--l20); letter-spacing: -.25px; transition: background-color .2s; }
.role:hover { background: var(--fill); }
.role .what { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.role .what b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role .meta { display: flex; gap: 6px; }
.role .meta span + span { color: var(--muted); }
.role .go { font-weight: 500; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.role .go .arrow { transition: transform .2s var(--ease); }
.role:hover .go .arrow { transform: translateX(2px); }
.head[hidden], .roles[hidden] { display: none; }
/* the dropdown (chrome.js): the drawn filled trigger opening the app's Select menu */
.dd { position: relative; display: inline-flex; }
.dd-trigger { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 10px; border: 0; border-radius: 10px; background: var(--fill-2); color: var(--ink); font: inherit; font-size: var(--t14); font-weight: 470; line-height: var(--l20); cursor: pointer; transition: background-color .15s; }
.dd-trigger:hover, .dd-trigger[aria-expanded="true"] { background: var(--fill-3); }
.dd-trigger .icon { transition: transform .2s var(--ease); }
.dd-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.dd .dd-menu { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: max(100%, 144px); max-height: 280px; overflow: auto; margin: 0; padding: 4px; list-style: none; border-radius: 10px; background: var(--raised); color: var(--ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent), 0 4px 6px -1px rgb(0 0 0 / .24), 0 2px 4px -2px rgb(0 0 0 / .2); outline: none; opacity: 0; transform: scale(.96) translateY(-3px); transform-origin: top right; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
.dd-menu.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .dd .dd-menu { transform: none; transition: opacity 120ms ease; } }
.dd-menu li { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 32px 6px 8px; border-radius: 8px; font-size: var(--t14); line-height: var(--l20); white-space: nowrap; cursor: pointer; transition: background-color .1s; }
.dd-menu li.on { background: var(--fill-2); }
.dd-menu .tick { position: absolute; right: 8px; width: 16px; height: 16px; opacity: 0; color: var(--brand); }
.dd-menu li[aria-selected="true"] { font-weight: 500; }
.dd-menu li[aria-selected="true"] .tick { opacity: 1; }

/* one blog post (frame 7): centred heading, then the picture and the text in one reading column */
.post-head { width: min(var(--post-col), 100%); margin: 52px auto 0; text-align: center; display: flex; flex-direction: column; gap: 4px; }
/* "Back to Blog" stays with you: once the page scrolls, it shrinks to a round arrow button
   just under the bar */
.back-wrap { position: sticky; top: calc(72px + var(--safe-area-top, 0px)); z-index: 8; height: 24px; margin-bottom: 0; pointer-events: none; }
.back { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0; border-radius: 16px; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; color: var(--muted); text-decoration: none; transition: color .15s, background-color .25s, padding .3s var(--ease), height .3s var(--ease), transform .3s var(--ease), box-shadow .25s; }
.back:hover { color: var(--ink); }
.back .label { display: inline-block; max-width: 140px; overflow: hidden; white-space: nowrap; transition: max-width .3s var(--ease), opacity .2s; }
.back .arrow { display: grid; place-items: center; width: 16px; height: 16px; }
.back .arrow svg { width: 16px; height: 16px; }
.back-wrap.stuck .back { width: 36px; height: 36px; padding: 0; justify-content: center; gap: 0; border-radius: 50%; color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, var(--bg)); transform: translateY(-6px); }
.back-wrap.stuck .back .label { max-width: 0; opacity: 0; }
.back-wrap.stuck .back:hover { background: color-mix(in srgb, var(--ink) 10%, var(--bg)); }
.cover { width: min(var(--post-col), 100%); height: auto; margin: 40px auto 0; border-radius: 32px; background: var(--fill-2); overflow: hidden; }
.cover img { width: 100%; height: auto; display: block; }
.prose { width: min(540px, 100%); margin: 52px auto 0; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; font-weight: 500; }
.prose p { margin: 0 0 24px; text-wrap: pretty; }
.prose h2 { font-weight: 440; font-size: 20px; line-height: 28px; letter-spacing: -.5px; margin: 28px 0 12px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- home ---------- */
/* the story: the page scrolls as any page does. The words on the left go by; the painting on the
   right holds still beside them (sticky) until the story ends, then leaves with it */
.story { --svh: 1vh; }
@supports (height: 1svh) { .story { --svh: 1svh; } }
body[data-page="home"] .site { position: relative; }
.story { --foot: 76px; --top: calc(64px + var(--safe-area-top, 0px)); position: relative; display: grid; grid-template-columns: 348px minmax(0, 1fr); column-gap: clamp(40px, 6vw, 96px); align-items: start; }
.copy { grid-column: 1; grid-row: 1; position: relative; z-index: 1; }
/* the hero fills the first screen, centred between the bar and the footer */
.hero { min-height: calc(100 * var(--svh) - var(--top) - var(--foot)); box-sizing: border-box; padding: 24px 0 40px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.hero .words { display: flex; flex-direction: column; gap: 12px; }
/* the text under the headline: three paragraphs at the 14/24 of t-meta, the size this text had as one paragraph.
   They wrap as body text (pretty: full lines, no lone word at the end), not balanced like the
   headline, which would draw each paragraph to a different width */
.hero .sub { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; color: var(--muted); }
.hero .sub p { margin: 0; text-wrap: pretty; }
/* hero mark disabled: Parser uses the wordmark in the top bar without a separate p icon */
.hero-mark { display: none; }

/* Clean editorial hairline cohort ledger (no box, no neon glow, no bar-chart clutter) */
.seat-ledger {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin-bottom: -4px;
}
.seat-ledger[hidden] { display: none; }
.seat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  line-height: 16px;
}
.seat-kicker {
  color: var(--muted);
  letter-spacing: -0.01em;
  transition: color 220ms var(--ease-out);
}
.seat-ledger.is-claimed .seat-kicker {
  color: #5CA3ED;
}
.seat-num {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  line-height: 16px;
  letter-spacing: -0.02em;
}
.seat-odometer {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 560;
}
.seat-win {
  display: inline-block;
  height: 16px;
  line-height: 16px;
  overflow: hidden;
  vertical-align: top;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 15%, #000 85%, transparent 100%);
  transition: opacity 200ms var(--ease-out);
}
.seat-win.is-blank {
  width: 0;
  opacity: 0;
}
.seat-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
  transition: transform 640ms var(--ease-out);
}
.seat-win:first-child .seat-strip {
  transition-duration: 500ms;
}
.seat-digit {
  display: block;
  height: 16px;
  line-height: 16px;
  text-align: center;
}
.seat-of {
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 420;
  margin-left: 3px;
}
.seat-track {
  position: relative;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.seat-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  transition: transform 680ms var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .seat-strip, .seat-fill { transition: none; }
}
.join { display: flex; gap: 8px; }
.join .field { flex: 1; min-width: 0; }   /* the box gives way to the button on a narrow screen (it would otherwise hold its typing width and push the button out) */
.join-status { margin: 0; min-height: 0; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; color: var(--muted); text-wrap: pretty; opacity: 0; transform: translateY(4px); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }
.join-status.shown { margin-top: 8px; min-height: 24px; opacity: 1; transform: none; }
.join-status.error { color: var(--ink); }
@keyframes field-shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-4px); }
  48% { transform: translateX(4px); }
  74% { transform: translateX(-2px); }
}
.field.shake { animation: field-shake 280ms var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .field.shake { animation: none; }
  .join-status { transform: none; transition: opacity 120ms ease; }
}
.joined { display: flex; flex-direction: column; gap: 2px; outline: none; animation: joined-in .35s cubic-bezier(.2,.7,.2,1) both; }
.joined.leaving { opacity: 0; transform: translateY(-4px); transition: opacity .3s ease, transform .3s ease; }
@keyframes joined-in { from { opacity: 0; transform: translateY(6px); } }
.join.join-return { animation: joined-in .4s cubic-bezier(.2,.7,.2,1) both; }
/* the paragraphs follow one another as ordinary paragraphs; each fills in word by word as it
   reaches the middle of the window (the page's script, keyed straight to the scroll). The room
   after the last one lets it reach the middle beside the painting before the story ends */
.beats { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 40px; }
.beats li { color: var(--ink); }
.beats li > span { display: block; }
.beats .w { opacity: .2; }
/* "Read our Manifesto" closes the paragraphs, as one more line of them: always underlined, with an
   arrow that steps forward when pointed at. The room after it lets the block reach the middle of the
   window beside the painting before the story ends */
.read-more { margin: 40px 0 0; padding-bottom: calc(24 * var(--svh)); }
/* A withheld manifesto leaves only the scroll room, without a gap for its absent line. */
.read-more:empty { margin: 0; }
:is(.read-more, .hero-more) a { display: inline-flex; align-items: baseline; gap: .35em; color: var(--ink); text-decoration: none; border-radius: 6px; }
:is(.read-more, .hero-more) a span:first-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, var(--ink) 45%, transparent); transition: text-decoration-color .2s; }
:is(.read-more, .hero-more) a .arrow { display: inline-block; transition: transform .3s var(--ease); }
:is(.read-more, .hero-more) a:hover span:first-child { text-decoration-color: var(--brand); }
:is(.read-more, .hero-more) a:hover .arrow { transform: translateX(4px); }
/* secondary link sits quietly beneath the waitlist form */
.hero-more { margin: 0; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; }
/* the painting: held beside the words while they scroll, between the bar and the footer */
/* the painting, at its full height between the bar and the footer, inside the column: its right edge
   lines up with the bar's and the footer's, and the column gap (40 at least) keeps it clear of the words */
.art-slot { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--top) + 16px); height: calc(100 * var(--svh) - var(--top) - var(--foot) - 32px - 14px);
  width: 100%; justify-self: end; }   /* against the column's right edge; its size: the page's script */
/* the sheet of the page's colour that the crayon rubs away when the page opens (the page's script) */
.art-cover { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; transition: opacity .5s var(--ease); }
.art-cover.gone { opacity: 0; }
.hero #join-box { margin-top: 8px; }
/* "Kept for your next visit · Start over": once someone has painted, under the painting's right edge, and
   only while interacting with the painting (or the line has keyboard focus). */
.art-slot .kept.on { opacity: 0; pointer-events: none; transition: opacity .3s; }
/* Bridge the small gap so a mouse can reach reset without losing hover. */
.art-slot .kept::before { content: ""; position: absolute; inset: -14px 0 100%; }
@media (any-hover: hover) {
  .art-slot:hover .kept.on { opacity: 1; pointer-events: auto; }
}
.art-slot.touch-active .kept.on, .art-slot .kept.on:focus-within { opacity: 1; pointer-events: auto; }
#art { position: absolute; inset: 0; overflow: hidden; touch-action: none; contain: strict; opacity: 0; transition: opacity 1.1s var(--ease);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
#art.on { opacity: 1; }
#art img { position: absolute; max-width: none; opacity: .22; filter: saturate(.55); pointer-events: none; -webkit-user-select: none; user-select: none; }
:root[data-theme="dark"] #art img { opacity: .3; }
#art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the saved line sits just under the painting's brushed edge, whose margin grows with the painting's
   height (about 4% of it): so it is placed by that, not by a fixed distance */
.kept { position: absolute; left: 8%; white-space: nowrap; bottom: calc(4% - 32px); z-index: 2; font-size: 12.5px; line-height: 20px; color: var(--muted); display: flex; gap: 14px; opacity: 0; transition: opacity .6s; pointer-events: none; }
.kept.on { opacity: 1; pointer-events: auto; }
.kept button { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; border-bottom: 1px solid var(--ink-20); }
/* every home frame shows the footer at the bottom of the screen */
body[data-page="home"] .foot { position: sticky; bottom: 0; z-index: 9; background: var(--bg); }
/* the words scroll under the held footer: they fade out 56px before it, so they never run right up
   against it (only under the words' column: the painting beside them holds still) */
/* (one screen: nothing scrolls under the footer, so it needs no fade above it) */
body[data-page="home"] .foot .col, body[data-page="home"] .foot.lined .col { border-top: 0; margin-top: 0; padding: 12px 0 40px; }

@media (max-height: 500px) { body[data-page="home"] .foot { position: static; } .story { --foot: 0px; } }

/* the logo: on home it rests above the headline, twice the bar's size; the bar shows neither mark
   nor name until it has scrolled away, then they rise in together (the page's script
   sets body.brand-on) */
.hero-mark .mark { display: block; width: 40px; height: 40px; }
.hero-mark .mark i { border-radius: 10px; }
body[data-page="home"] .brand > .mark, body[data-page="home"] .brand > .name { opacity: 0; transform: translateY(8px); transition: opacity .15s ease, transform .15s ease; }
body[data-page="home"].brand-on .brand > .mark, body[data-page="home"].brand-on .brand > .name { opacity: 1; transform: none; transition: opacity .45s var(--ease), transform .55s var(--ease); }
@media (max-width: 559px), (max-width: 899px) and (min-height: 501px), (orientation: portrait) and (max-width: 1100px) { body[data-page="home"] .brand > .mark, body[data-page="home"] .brand > .name { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body[data-page="home"] .brand > * { transition: none !important; } }
/* one screen: the word "Second" holds the bar's top-left corner while the big mark rests above the
   headline (the mark joins it only where the big one is hidden: a short window, a phone) */
body[data-page="home"]:not(.brand-on) .brand > .name { opacity: 1; transform: none; }
body[data-page="home"]:not(.brand-on) .brand > .mark { display: none; }
/* where the big mark is hidden (the same windows that hide .hero-mark above), the bar holds mark and
   name from the first frame: waiting for the page's script to set brand-on drew a frame without the
   mark, then "Second" jumped right, each time the page loaded (clicking the logo reloads it) */
@media (max-height: 880px), (max-width: 559px), (max-width: 899px) and (min-height: 501px), (orientation: portrait) and (max-width: 1100px) {
  body[data-page="home"]:not(.brand-on) .brand > .mark { display: block; opacity: 1; transform: none; }
}
/* the headline is Inter, as the brand guidelines set for everything Second writes (t-display);
   the name in it a step heavier */
.hero .t-display { text-wrap: balance; max-width: 340px; }
.hero .t-display strong { font-weight: 500; }

/* arriving on home: the words ease in one after another */
.arrive { animation: page-in .7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
/* once arrived, the scroll moves them directly */
.arrived .arrive { animation: none; }

/* moving between pages (new.js): the content fades out quickly, the next page's content rises
   in softly; the top bar and footer simply stay where they are */
html { scrollbar-gutter: stable; overscroll-behavior-y: none; }
body { overscroll-behavior-y: none; }
.site > main { animation: page-in .5s cubic-bezier(.2,.7,.2,1) backwards; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
html.leaving .site > main { opacity: 0; transform: translateY(-4px); transition: opacity .17s ease, transform .17s ease; }
/* a page and its agent view (the footer's bot) are one page at two addresses. The bar and the
   footer's links are in the human view alone, so on that switch they leave and arrive with the
   content instead of appearing at once; the bot turns between grey and full; and the scrollbar's
   thumb is put away while the page is between the two (new.js marks the way out, theme.js the arrival) */
html.switching { scrollbar-color: transparent transparent; }
html.switching :is(.bar, .foot nav) { opacity: 0; transition: opacity .17s ease; }
html.switched :is(.bar, .foot nav) { animation: view-in .5s cubic-bezier(.2,.7,.2,1) backwards; }
@keyframes view-in { from { opacity: 0; } }

/* during a day/night switch nothing fades its own colour: the page crossfades as one (theme.js) */
html.theme-swap *, html.theme-swap *::before, html.theme-swap *::after, html.theme-swap body { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }

@media (prefers-reduced-motion: reduce) {
  #join-box, .nav .cta, #art, .arrive, .role-frame { transition: none !important; }
  .site > main, .arrive, html.switched :is(.bar, .foot nav) { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- narrower windows ---------- */
@media (max-width: 960px) {
  .blog { grid-template-columns: 1fr; gap: 28px; }
  .blog .list { padding-top: 0; }
  .side { position: static; }
  .topics { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
}
/* the stacked layout (a phone, a narrow window, or a tablet held upright: anywhere a painting beside
   the words would be a thin strip, or the words a cramped column): one column, centred, never wider
   than a comfortable reading width (600), with the painting above the words, scrolling with them;
   the mark stays in the bar. The page's script tests the
   same thing */
@media (max-width: 559px), (max-width: 899px) and (min-height: 501px), (orientation: portrait) and (max-width: 1100px) {
  .story { grid-template-columns: minmax(0, 1fr); --foot: 0px; }
  .story { width: min(600px, calc(100% - 2 * var(--gutter))); }
  .art-slot { grid-column: 1; grid-row: 1; position: relative; top: auto; margin: 4px 0 12px; width: min(50%, 184px); height: auto; aspect-ratio: 1; justify-self: center; }
  .hero #join-box { margin-top: 0; }
  .art-slot .kept { display: flex; }
  .art-slot .kept > span { display: none; }
  .art-slot .kept button {
    min-height: 44px; padding: 0; border: 0;
    text-decoration: underline; text-decoration-color: var(--ink-20); text-underline-offset: 4px;
  }
  /* (the painting keeps touch-action: none here too: a finger that goes down on it paints, in any
     direction, and the page scrolls from anywhere else) */
  .copy { grid-row: 2; }
  .hero { min-height: 0; padding: 12px 0 24px; gap: 18px; }
  .hero-mark { display: none; }
  .beats { gap: 24px; } .read-more { margin-top: 28px; padding-bottom: 0; }
  .copy { width: min(100%, 460px); justify-self: center; }
  .hero .words { gap: 10px; }
  .hero .t-display { font-size: 25px; line-height: 32px; letter-spacing: -.85px; max-width: none; }
  .hero .sub { margin-top: 0; line-height: 22px; }
  .join .field, .join .button { height: 44px; }
  .beats li { font-size: 18px; line-height: 26px; letter-spacing: -.5px; }
  body[data-page="home"] .told { min-height: calc(100svh - 64px - var(--safe-area-top, 0px)); display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; padding: 24px 0; }
  body[data-page="home"] .foot { position: static; }
  /* Compact spacing for phones; primary CTA sits cleanly above mobile browser toolbars. */
  body[data-page="home"] .hero { padding: 8px 0 20px; gap: 16px; }
}
/* the careers page is one column at every size: it keeps the home page's single-column width (600,
   centred, the page's own margins below that), rather than the full width of the bar */
body[data-page="join"] main.page > .col { width: min(600px, calc(100% - 2 * var(--gutter))); }
/* one role is laid out as a post: the full column, so "Back to Join Us" sits beside the text, not over it */
body[data-page="join"] main.page.post-page > .col { width: min(var(--column), calc(100% - 2 * var(--gutter))); }
/* a short window beside the painting (a laptop's small browser, a phone on its side): the hero
   tighter, without its mark (the bar shows it), so the email box still makes the first screen */
@media (min-width: 560px) and (max-height: 520px) {
  .hero-mark { display: none; }
  .hero { padding: 12px 0 16px; gap: 20px; }
  .hero .words { gap: 8px; }
  .hero .t-display { font-size: 22px; line-height: 28px; }
  .art-slot { height: calc(100 * var(--svh) - var(--top) - 16px - 44px); }   /* room under it for its line */
}
/* stacked, wider than a phone: the painting keeps to the column (a phone lets it bleed a little) */
@media (min-width: 561px) and (max-width: 899px) and (min-height: 501px), (orientation: portrait) and (min-width: 561px) and (max-width: 1100px) {
  .art-slot { margin: 16px 0 0; }
}
/* a phone on its side: too short to stack, so the painting holds still beside the words, as on a
   computer, and the words scroll past it screen by screen */
@media (max-width: 899px) and (max-height: 500px) and (min-width: 560px) {
  .story { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); column-gap: 24px; width: min(var(--column), calc(100% - 2 * var(--gutter))); }
  .art-slot { grid-column: 2; grid-row: 1; position: sticky; top: calc(72px + var(--safe-area-top, 0px)); margin: 8px 0 0; height: calc(100svh - 72px - 34px - var(--safe-area-top, 0px)) !important; }
  .copy { grid-column: 1; grid-row: 1; }
  .kept { left: 8%; bottom: -26px; }
  .hero { padding-top: 12px; gap: 18px; }
  .hero .words { gap: 8px; }
  .hero .t-display { font-size: 22px; line-height: 28px; }
}
/* a short phone (an SE): the hero a little tighter, so the email box still makes the first screen */
@media (max-width: 760px) and (max-height: 640px) {
  .hero { padding-top: 20px; gap: 14px; }
  .join .field, .join .button { height: 40px; }
}
@media (max-width: 760px) {
  .row { flex-direction: column; align-items: stretch; gap: 16px; }
  .thumb { width: 100%; height: auto; aspect-ratio: 5 / 3; }
  .row .words { padding-right: 0; }
  .role { padding: 12px 16px; }
  .roles { margin-top: 48px; }
  .cover { border-radius: 20px; }
  .foot .col { flex-direction: column; align-items: flex-start; }
  .foot nav { gap: 6px 16px; }
}
@media (max-width: 520px) {
  /* a phone's bar keeps Manifesto, Join Us and Join waitlist; the blog stays a tap away from a post's back link */
  .nav a.blog-link { display: none; }

  .nav { gap: 0; }
  .nav a.link { padding: 0 7px; }
  .nav .cta .button { padding: 0 9px; margin-left: 4px; }
  .brand { gap: 5px; }
}
/* the button says just "Join" only where "Join waitlist" would crowd "Second" (iPhone SE and mini) */
@media (max-width: 389.98px) {
  .nav .wide { display: none; }
}

@media (max-width: 359.98px) {
  .bar .brand .name { width: 64px; height: 16.5px; }
}

/* ---------- the agent view: every page's twin at <page>/ai (scripts/build-agent-views.cjs) ----------
   The page's markdown, the same text an agent receives, drawn for a person. Nothing is taken
   out: a link keeps its brackets and its address, a heading keeps its #; the marks and the
   addresses are only dimmer than the words. Each section is a block between two side rules.
   It is a page of the site like any other: same paper, ink,
   day/night, and the same quick fade in and out; the footer keeps the bot (in ink here) and
   day/night where the human page has them. */
body[data-page="ai"] main.page { padding: 56px 0 40px; font-family: var(--mono); font-size: 13.5px; line-height: 25px; letter-spacing: 0; color: var(--muted); }
.mdv .col { width: min(740px, calc(100% - 2 * var(--gutter))); display: flex; flex-direction: column; gap: 40px; }
.mdv .col[hidden] { display: none; }
.mdv .blk { border-inline: 1px solid var(--ink-20); padding: 0 28px; overflow-wrap: anywhere; }
.mdv .ln { min-height: 25px; white-space: pre-wrap; }
.mdv .ln.h, .mdv .ln b { color: var(--ink); font-weight: 500; }
.mdv .ln.li { padding-left: 2ch; text-indent: -2ch; }
.mdv .dim { color: var(--faint); font-weight: 400; }
.mdv a { color: var(--ink); text-decoration: none; border-radius: 2px; }
.mdv a .u { color: var(--faint); font-weight: 400; }
.mdv a:hover .lb { text-decoration: underline; text-underline-offset: 3px; }
.mdv a:focus-visible { outline: 2px solid var(--button-ring); outline-offset: 2px; }
body[data-page="ai"] .foot { position: sticky; bottom: 0; z-index: 9; background: var(--bg); }
body[data-page="ai"] .foot .col, body[data-page="ai"] .foot.lined .col { justify-content: flex-end; border-top: 0; margin-top: 0; padding: 12px 0 40px; }
@media (max-width: 600px) {
  body[data-page="ai"] main.page { padding-top: 32px; font-size: 12.5px; }
  .mdv .col { gap: 28px; }
  .mdv .blk { padding: 0 14px; }
}

/* ---------- Terms and Privacy: one reading column, set like a blog post ----------
   The words are the reviewed text (deploy/second-base/site), written in as they are; these rules
   only set them in the design's type */
.legal-doc { width: min(600px, 100%); margin: 0 auto; padding-top: 52px; font-size: 16px; line-height: 1.65; font-weight: 400; letter-spacing: -.2px; overflow-wrap: break-word; }
.legal-doc h1 { font-weight: 440; font-size: 28px; line-height: 40px; letter-spacing: -1.25px; margin: 0; text-wrap: pretty; }
.legal-doc .updated { margin: 4px 0 40px; font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; color: var(--muted); }
.legal-doc p { margin: 0 0 20px; text-wrap: pretty; }
.legal-doc h2 { font-weight: 440; font-size: 20px; line-height: 28px; letter-spacing: -.5px; margin: 56px 0 16px; text-wrap: pretty; }
.legal-doc h3 { font-weight: 500; font-size: 16px; line-height: 24px; letter-spacing: -.25px; margin: 32px 0 12px; text-wrap: pretty; }
.legal-doc strong { font-weight: 560; }
.legal-doc :is(ul, ol) { margin: 0 0 20px; padding-inline-start: 1.25em; }
.legal-doc li { padding-inline-start: .25em; }
.legal-doc li + li { margin-top: 8px; }
.legal-doc li::marker { color: var(--faint); }
.legal-doc a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-decoration-thickness: 1px; text-underline-offset: .2em; transition: text-decoration-color .15s; overflow-wrap: anywhere; }
.legal-doc a:hover { text-decoration-color: currentColor; }
.legal-doc .subclause { padding-left: 20px; }
.legal-doc [id] { scroll-margin-top: calc(96px + var(--safe-area-top, 0px)); }
/* the contents: a quiet list between two rules, before the first section */
.legal-doc .legal-toc { margin: 32px 0 8px; padding: 20px 0; border-block: 1px solid var(--line); font-size: var(--t14); line-height: var(--l24); letter-spacing: -.25px; }
.legal-doc .legal-toc ol { margin: 0; padding-inline-start: 2em; }
.legal-doc .legal-toc li + li { margin-top: 4px; }
.legal-doc .legal-toc li::marker { font-variant-numeric: tabular-nums; }
.legal-doc .legal-toc a { color: var(--muted); text-decoration: none; overflow-wrap: normal; }
.legal-doc .legal-toc a:hover { color: var(--ink); }
.join[hidden] { display: none; }

/* a saved email picked from the browser's suggestions keeps the field's own look (no blue fill) */
.field input:-webkit-autofill, .field input:-webkit-autofill:hover, .field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 40px color-mix(in srgb, var(--ink) 8%, var(--bg)) inset; box-shadow: 0 0 0 40px color-mix(in srgb, var(--ink) 8%, var(--bg)) inset;
  transition: background-color 9999s ease 0s; font: inherit; font-size: var(--t14); font-weight: 470;
}
.field:focus-within input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px color-mix(in srgb, var(--ink) 11%, var(--bg)) inset; box-shadow: 0 0 0 40px color-mix(in srgb, var(--ink) 11%, var(--bg)) inset; }

/* ---------- phones ---------- */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 760px) {
  /* home: the footer sits at the end of the page instead of holding two rows of the screen */
  body[data-page="home"] .foot { position: static; }
  body[data-page="home"] .foot .col { padding: 8px 0 max(16px, env(safe-area-inset-bottom)); }
  .beats li { font-size: 18px; line-height: 26px; }
  .role .what b { white-space: normal; }
  .role { align-items: flex-start; }
  .role .go { padding-top: 2px; }
}
/* on touch screens there is no pointing: hover looks would stick after a tap */
@media (hover: none) {
  .row:hover { background: none; } .row:hover .thumb img { transform: none; } .row:hover .title .go { opacity: 0; }
  .role:hover { background: var(--fill-0); } .role:hover .go .arrow { transform: none; }
  .nav a.link:hover::after, .nav a.link:hover::before { transform: scaleX(0); }
  :is(.read-more, .hero-more) a:hover .arrow { transform: none; }
}

/* ---------- phones: layout ---------- */
.topic-pick { display: none; }
@media (max-width: 760px) {
  /* Terms and Privacy */
  .legal-doc { padding-top: 0; font-size: 15px; }
  .legal-doc .subclause { padding-left: 0; }
  /* Keep the links together in reading order, then put the maker and controls
     on a full-width row. Short windows wrap links without spreading two columns. */
  .foot .col { gap: 16px; }
  body[data-page="home"] .foot .col { gap: 4px; }   /* home is a one-pager: its footer stays compact */
  .foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; width: 100%; }
  .foot nav a { display: inline-flex; align-items: center; min-height: 40px; }
  .foot .right { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .foot .maker { margin-right: auto; min-width: 0; line-height: 20px; }
  .foot .rule { flex: none; margin-inline: 8px; }
  .foot :is(.view, .theme) { flex: none; width: 40px; height: 40px; }
  .foot .theme .icon { inset: 12px; }
  .foot :is(.view, .theme)::before { inset: 0; }
  /* blog: topics become one dropdown, 8 under the search; 40 before the first post */
  .side .tools { gap: 8px; margin-top: 32px; }
  .topics { display: none; }
  .topic-pick { display: block; }
  .topic-pick .dd, .topic-pick .dd-trigger { width: 100%; justify-content: space-between; }
  .blog { gap: 40px; }
  /* Join Us: Open Roles centred, the two dropdowns side by side across the width */
  .roles-head { flex-direction: column; align-items: stretch; gap: 12px; padding-left: 0; }
  /* Join Us: heading, line and Open Roles on the left */
  .head.center { text-align: left; margin: 0; }
  .head.center .t-meta { text-wrap: pretty; }
  .picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .picks .dd, .picks .dd-trigger { width: 100%; justify-content: space-between; }
  .picks .dd-menu { left: 0; right: 0; min-width: 0; }
}

/* Long-form Markdown blocks, including static diagrams and enhanced figures. */
.post-page .prose { width: min(var(--post-col), 100%); margin-top: 40px; font-size: 16px; line-height: 1.65; font-weight: 400; }
.post-page .prose :is(ul, ol) { margin: 0 0 24px; padding-inline-start: 1.5em; }
.post-page .prose li + li { margin-top: .5em; }
.post-page .prose :is(pre, table, .katex-block) { max-width: 100%; overflow-x: auto; }
.post-page .prose table { display: block; border-collapse: collapse; }
.post-page .prose :is(th, td) { padding: .35em .7em; border: 1px solid var(--line); }
.post-page .prose figure { margin: 2em 0; }
.post-page .prose figcaption { color: var(--muted); margin-top: .5em; }
.post-page .prose img { max-width: 100%; height: auto; }
.post-page .prose a { text-decoration: underline; text-underline-offset: .15em; }
/* at night the long text takes the homepage's quieter grey; headings and bold stay bright */
:root[data-theme="dark"] .post-page .prose { color: var(--muted); }
:root[data-theme="dark"] .post-page .prose :is(h2, h3, strong) { color: var(--ink); }

/* Keep the cover and article on the page's center line. The rail occupies
   only the right margin, and stays within the article as the footer arrives. */
body[data-post] .post-page { --post-col: 620px; }
.post-head .t-meta em { font-style: normal; }
.post-cover { width: min(var(--post-col), 100%); margin: 40px auto 0; }
.post-cover .cover { width: 100%; margin: 0; }
.post-cover figcaption { margin-top: 9px; color: var(--muted); text-align: right; font-size: 12px; line-height: 1.5; }
.post-cover cite { font-style: normal; }
.post-cover a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.post-reading { margin-top: 36px; }
.post-reading .prose { margin: 0 auto; }
.post-reading .prose h2 {
  scroll-margin-top: calc(122px + var(--safe-area-top, 0px));
}
.post-toc { display: none; }
@media (min-width: 841px) {
  body[data-post] .post-page { --post-col: min(52vw, 620px); }
  body[data-post] .post-page > .col { width: min(1240px, calc(100% - 2 * var(--gutter))); }
  body[data-post] .back-wrap { margin-inline-start: max(0px, calc((100% - var(--column)) / 2)); }
  .post-reading { display: grid; grid-template-columns: minmax(0, 1fr) var(--post-col) minmax(0, 1fr); column-gap: clamp(20px, 3vw, 48px); }
  .post-reading .prose { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; }
  .post-toc {
    display: block; grid-column: 3; grid-row: 1; align-self: start;
    position: sticky; top: calc(126px + var(--safe-area-top, 0px)); max-width: 212px;
    max-height: calc(100vh - 150px - var(--safe-area-top, 0px)); overflow-y: auto;
    --section-ink: #5CA3ED;
  }
  .post-toc[inert] { opacity: 0; pointer-events: none; }
  .post-toc p { margin: 0 0 14px; font: 550 14px/1.5 var(--sans); }
  .post-toc ol { position: relative; list-style: none; padding: 0 0 0 20px; margin: 0; }
  .post-toc ol::before {
    content: ''; position: absolute; inset: 0 auto 0 4px; width: 1px; background: var(--hair); transform-origin: top;
  }
  .post-toc a { display: block; position: relative; padding: 8px 0; font: 400 13.5px/1.5 var(--sans); color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
  .post-toc a:is(:hover, :focus-visible) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .post-toc a:focus-visible { outline-offset: -1px; }
  .post-toc a[aria-current] { color: var(--section-ink); font-weight: 535; }
  .post-toc .toc-dot {
    position: absolute; left: 1.5px; top: 0; width: 6px; height: 6px;
    border-radius: 50%; background: var(--section-ink); box-shadow: 0 0 0 3px var(--bg);
    opacity: 0; pointer-events: none;
    transition: transform 260ms var(--ease-out), opacity 180ms var(--ease-out);
  }
  .post-toc .toc-dot.on { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .post-toc .toc-dot { transition: opacity 140ms ease; }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(.post-toc) { scroll-behavior: smooth; }
  .post-toc { transition: opacity 360ms ease-out; }
  .post-toc ol::before { transition: transform 420ms var(--ease); }
  .post-toc[inert] ol::before { transform: scaleY(0); }
}

/* ---------- home on a phone: one screen ----------
   The footer uses the shared stacked rows: links above, left-aligned maker and right-aligned controls below. The room
   under the email box is only its status line's, so the painting, the words, the email box and the
   footer share one screen (the page's script gives the painting what is left, 120 at least) */
@media (max-width: 760px) {
  body[data-page="home"] :is(.foot, .foot.lined) .col { gap: 4px; padding: 12px 0 calc(20px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 559px), (max-width: 899px) and (min-height: 501px), (orientation: portrait) and (max-width: 1100px) {
  body[data-page="home"] .hero { padding: 8px 0 12px; gap: 16px; }
}
/* Stack email input over a full-width thumb-friendly CTA on phones so it clears iOS/Android bottom toolbars cleanly. */
@media (max-width: 559px) {
  body[data-page="home"] .site:has(> .bar) { padding-top: calc(54px + var(--safe-area-top, 0px)); }
  body[data-page="home"] .bar .col { padding: 14px 0 10px; }
  body[data-page="home"] .art-slot { width: min(42%, 152px); margin: 0 0 8px; }
  body[data-page="home"] .hero { gap: 15px; padding: 4px 0 48px; }
  body[data-page="home"] .join { flex-direction: column; gap: 10px; }
  body[data-page="home"] .join .field { flex: none; height: 46px; padding: 0 14px; border-radius: 11px; }
  body[data-page="home"] .join .button { width: 100%; height: 46px; border-radius: 11px; font-size: 15px; font-weight: 520; }
}
/* Taller tablets (not phones) keep extra breathing room above the email box. */
@media (min-width: 560px) and (max-width: 899px) and (min-height: 760px), (orientation: portrait) and (min-width: 560px) and (max-width: 1100px) and (min-height: 760px) {
  body[data-page="home"] .art-slot { width: min(56%, 240px); margin: 12px 0 24px; }
  body[data-page="home"] .hero { gap: 28px; }
  body[data-page="home"] .hero #join-box { margin-top: 12px; }
}
/* Short phones (iPhone SE / small viewports): keep headline and artwork extra tight above the fold. */
@media (max-width: 559px) and (max-height: 700px) {
  body[data-page="home"] .art-slot { width: 136px; margin: 0 0 8px; }
  body[data-page="home"] .hero .t-display { font-size: 22px; line-height: 29px; letter-spacing: -.75px; }
  body[data-page="home"] .hero { padding-top: 4px; gap: 12px; }
}


/* Keep touch input text at its native readable size when the keyboard opens. */
@media (hover: none) and (pointer: coarse) {
  body[data-page="home"] #email,
  body[data-page="home"] .survey .answer-text { font-size: 16px; }
}
