/* Every value here comes from DESIGN.md. Change DESIGN.md first. */

:root {
  --font-serif: "Literata", Georgia, serif;
  --font-hand: "Caveat", cursive;
  --font-mono: ui-monospace, Menlo, monospace;

  --text-xs: 14px;
  --text-sm: 16px;
  --text-md: 18px;
  --text-base: 20px;
  --text-lg: 24px;
  --text-xl: 28px;
  --text-2xl: 32px;
  --text-3xl: 40px;
  --display: clamp(32px, 5vw, 56px);
  --ornament: 96px;

  --paper: #F6F2EA;
  --surface: #FFFDF8;
  --ink: #1F1B16;
  --ink-soft: #4A433A;
  --muted: #6B6358;
  --rule: #DCD3C4;
  --rule-strong: #C9BFAE;
  --accent: #B4380A;
  --accent-strong: #9A2F08;
  --on-accent: #FFF6EC;
  --note-bg: #EAF0F4;
  --note-rule: #C3D2DD;
  --note-ink: #2F4E66;

  --rule-hair: 1px solid var(--rule);
  --rule-dash: 1px dashed var(--rule-strong);

  --measure: 660px;
  --margin-col: 260px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17150F;
    --surface: #211E17;
    --ink: #EDE6D9;
    --ink-soft: #C9C0B0;
    --muted: #A39A8B;
    --rule: #3A352C;
    --rule-strong: #4D473C;
    --accent: #F07A4B;
    --accent-strong: #FF9466;
    --on-accent: #17150F;
    --note-bg: #1A232B;
    --note-rule: #2F4150;
    --note-ink: #A9C4D9;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: 1.6;
}

a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 4px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.accent { color: var(--accent); }
.hand { font-family: var(--font-hand); color: var(--accent); }
.label { margin: 0 0 8px; font-size: var(--text-xs); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.site-header { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: baseline; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; }
.wordmark { font-family: var(--font-hand); font-weight: 700; font-size: var(--text-2xl); text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-family: var(--font-hand); font-size: var(--text-xl); line-height: 1.2; }
.site-header nav a { text-decoration: none; }

.post-header { max-width: 760px; padding-top: 16px; }
.kicker { margin: 0 0 8px; font-size: var(--text-xl); }
.post-header h1 { margin: 0; font-size: var(--display); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; }
.dek { margin: 24px 0 0; font-size: var(--text-lg); line-height: 1.4; font-style: italic; color: var(--ink-soft); }

.cover { margin: 48px 0 40px; }
.cover img { width: 100%; max-width: 900px; filter: brightness(1.04) contrast(1.05); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) {
  .cover img { mix-blend-mode: normal; filter: brightness(0.88); border-radius: 6px; }
}

/* The reading column. Notes float into the margin on wide screens. */
.post-body { max-width: var(--measure); padding-bottom: 8px; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 24px; }
.post-body h2 { margin: 64px 0 12px; font-size: var(--text-2xl); line-height: 1.2; font-weight: 500; }
.post-body h3 { margin: 48px 0 8px; font-size: var(--text-xl); line-height: 1.25; font-weight: 500; }
.post-body img { max-width: 100%; height: auto; }
.post-body figure { margin: 32px 0; }
.post-body figcaption { margin-top: 8px; font-size: var(--text-sm); color: var(--muted); }
.post-body figcaption p { margin: 0; }
.post-body blockquote { margin: 0 0 24px; padding-left: 24px; border-left: var(--rule-hair); color: var(--ink-soft); font-style: italic; }
.post-body blockquote.blockquote-extra,
.post-body .blockquote-extra { margin: 40px 0; padding: 0; border: 0; font-size: var(--text-xl); line-height: 1.3; color: var(--ink); }
.post-body .blockquote-extra p { margin: 0; }
.post-body pre, .post-body code { font-family: var(--font-mono); font-size: var(--text-sm); }
.post-body pre { padding: 16px; overflow-x: auto; background: var(--surface); border: var(--rule-hair); }
.post-body table { display: block; overflow-x: auto; border-collapse: collapse; margin: 0 0 24px; font-size: var(--text-md); }
.post-body th, .post-body td { padding: 8px 12px; border-bottom: var(--rule-hair); text-align: left; }
.fn-ref { color: var(--accent); font-size: var(--text-xs); padding-left: 1px; }

.sidenote, .marginnote { margin: 0 0 24px; }
.sidenote { padding-left: 16px; border-left: var(--rule-hair); font-size: var(--text-sm); line-height: 1.5; color: var(--muted); }
.sidenote-n { color: var(--accent); }
.marginnote { font-family: var(--font-hand); font-size: var(--text-lg); line-height: 1.2; color: var(--accent); transform: rotate(-2deg); }

/* Phone: the note follows its paragraph. */
div.noted { display: flex; flex-direction: column; }
div.noted > p { order: 1; }
div.noted > aside { order: 2; }

/* Desktop: the note floats into the margin at its paragraph's top.
   clear: right stacks long notes instead of overlapping them. */
@media (min-width: 1000px) {
  div.noted { display: block; }
  .noted > aside {
    float: right;
    clear: right;
    width: var(--margin-col);
    margin: 4px calc(-1 * (var(--margin-col) + 48px)) 16px 0;
  }
}

.divider { margin: 64px 0; text-align: center; font-family: var(--font-hand); font-size: var(--text-xl); color: var(--accent); letter-spacing: 12px; }
.callout { margin: 0 0 24px; padding: 24px; background: var(--surface); border: var(--rule-hair); }
.callout > :last-child { margin-bottom: 0; }
.toc { margin: 0 0 40px; padding: 24px; border: var(--rule-hair); }
.toc ol { margin: 0; padding-left: 24px; font-size: var(--text-md); }
.toc .toc-h3 { margin-left: 24px; font-size: var(--text-sm); }
.toc .toc-h4 { margin-left: 48px; font-size: var(--text-sm); }
.notes { margin-top: 48px; padding-top: 16px; border-top: var(--rule-hair); font-size: var(--text-sm); color: var(--ink-soft); }
.post-body a.embed-post { display: flex; gap: 16px; align-items: center; margin: 32px 0; padding: 12px; background: var(--surface); border: var(--rule-hair); border-radius: 2px; text-decoration: none; color: var(--ink); }
.post-body a.embed-post:hover { border-color: var(--accent); }
.post-body a.embed-post:hover .embed-post-title { color: var(--accent); }
.embed-post-img { flex: none; width: 112px; height: 84px; object-fit: cover; border: var(--rule-hair); }
.embed-post-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.embed-post-title { font-size: var(--text-lg); line-height: 1.25; font-weight: 500; }
.embed-post-dek { font-size: var(--text-sm); line-height: 1.45; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) {
  .embed-post-img { width: 72px; height: 72px; }
  .embed-post-title { font-size: var(--text-md); }
}
.video iframe { width: 100%; height: auto; border: 0; }
.tooltip { border-bottom: 1px dotted var(--ink); }
.tooltip-text { display: none; }

.site-footer { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-top: 32px; padding-bottom: 48px; border-top: var(--rule-hair); font-size: var(--text-sm); color: var(--muted); }

/* ---- Shared page parts ---- */
.page .post-header, .post .post-header { padding-top: 16px; }
.page .post-header, .post .post-header { margin-bottom: 32px; }
.muted { color: var(--muted); }
.kicker a { text-decoration: none; }

/* ---- Homepage ---- */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding: 32px 0 56px; border-bottom: var(--rule-hair); }
.hero-text { flex: 999 1 520px; min-width: 0; }
.hero-kicker { margin: 0 0 12px; font-size: var(--text-xl); }
.hero h1 { margin: 0; font-size: var(--display); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; }
.hero-bio { margin: 24px 0 0; max-width: 600px; color: var(--ink-soft); }
.hero-photo { flex: 1 1 220px; max-width: 260px; margin: 0; }
.hero-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 30% 25%; border: 8px solid var(--surface); border-radius: 4px; transform: rotate(2deg); box-shadow: 0 8px 24px rgba(60, 40, 20, 0.18); }
.hero-photo figcaption { margin-top: 16px; text-align: center; font-size: var(--text-lg); color: var(--muted); }

.as-seen-on { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; padding: 24px 0; border-bottom: var(--rule-hair); font-size: var(--text-sm); font-style: italic; color: var(--ink-soft); }
.as-seen-on .hand { font-style: normal; font-size: var(--text-lg); }
.as-seen-on a { text-decoration: none; }

.home-section { display: flex; flex-wrap: wrap; gap: 24px 56px; padding: 64px 0; border-bottom: var(--rule-hair); }
.home-aside { flex: 1 1 200px; }
.home-aside h2 { margin: 0; font-size: var(--text-xl); font-weight: 500; line-height: 1.2; }
.home-aside-note { margin: 8px 0 0; font-size: var(--text-lg); line-height: 1.2; color: var(--muted); }
.home-main { flex: 999 1 560px; min-width: 0; }

.latest { list-style: none; margin: 0 0 24px; padding: 0; }
.latest li { padding: 24px 0; border-bottom: var(--rule-dash); }
.latest li:first-child { padding-top: 0; }
.latest a { display: block; text-decoration: none; }
.latest .label { margin: 0; }
.latest-title { display: block; margin-top: 4px; font-size: var(--text-2xl); line-height: 1.2; font-weight: 500; }

.ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; }
.ideas blockquote { margin: 0; font-size: var(--text-lg); line-height: 1.4; font-style: italic; }
.ideas p { grid-column: 1 / -1; margin: 0; }

.thinking { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px 40px; }
.thinking li { display: flex; gap: 12px; }
.thinking-n { flex: none; width: 24px; font-size: var(--text-lg); line-height: 1.2; font-style: italic; color: var(--accent); }
.thinking strong { font-weight: 600; }
.thinking li > span:last-child { color: var(--ink-soft); }
.thinking li strong { color: var(--ink); }

.home-pair { gap: 40px; }
.home-pair > div { flex: 1 1 300px; min-width: 0; }
.home-pair .pair-title { font-size: var(--text-xl); line-height: 1.3; font-weight: 500; }
.home-pair p:last-child { margin: 8px 0 0; font-size: var(--text-md); color: var(--ink-soft); }

/* ---- Sign-up ---- */
.signup { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; margin: 64px 0; padding: clamp(24px, 5vw, 40px); background: var(--surface); border: var(--rule-hair); border-radius: 6px; }
.signup-text { flex: 999 1 360px; min-width: 0; }
.signup h2 { margin: 0; font-size: var(--text-3xl); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; }
.signup-text p { margin: 8px 0 0; font-size: var(--text-md); color: var(--ink-soft); }
.signup-form { flex: 1 1 320px; display: flex; flex-wrap: wrap; gap: 12px; }
.signup-form label { flex: 1 1 140px; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.signup-form input { min-height: 48px; padding: 0 16px; font: inherit; font-size: var(--text-md); letter-spacing: normal; text-transform: none; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 4px; }
.signup-form button { flex: 1 0 auto; min-height: 48px; padding: 0 24px; font: inherit; font-size: var(--text-md); color: var(--paper); background: var(--ink); border: 0; border-radius: 4px; cursor: pointer; }
.signup-form button:hover { background: var(--accent); }
.signup-status { flex-basis: 100%; margin: 0; font-size: var(--text-sm); color: var(--ink-soft); }
.signup-status.is-error { color: var(--accent); }

/* ---- Lists of posts ---- */
.year-group { display: flex; flex-wrap: wrap; gap: 8px 56px; padding: 32px 0; border-top: var(--rule-hair); scroll-margin-top: 24px; }
.year-group > h2 { flex: 1 1 160px; margin: 0; font-size: var(--text-xl); font-weight: 500; line-height: 1.2; }
.post-list { flex: 999 1 560px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 12px 0; border-bottom: var(--rule-dash); }
.post-list li:last-child { border-bottom: 0; }
.post-list a { display: block; text-decoration: none; }
.post-list-title { display: block; font-size: var(--text-lg); line-height: 1.25; font-weight: 500; }
.post-list-dek { display: block; margin-top: 4px; font-size: var(--text-sm); line-height: 1.5; color: var(--muted); }
.category-index { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 40px; font-size: var(--text-md); }
.category-index a { text-decoration: none; }

/* ---- Post end ---- */
.keep-reading { padding: 0 0 24px; }
.keep-reading h2 { margin: 0 0 24px; font-size: var(--text-xl); font-weight: 500; }
.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; }
.post-grid a { display: block; padding-top: 16px; border-top: var(--rule-hair); text-decoration: none; }
.post-grid .label { display: block; }
.post-grid-title { display: block; font-size: var(--text-lg); line-height: 1.25; font-weight: 500; }
.send-self { font-size: var(--text-md); color: var(--ink-soft); }

.not-found { padding: 96px 0; }
.not-found h1 { margin: 0; font-size: var(--display); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; }

footer.wrap .site-footer { margin-top: 0; }

/* Old Minima inline social icons (about.md). An SVG with no size defaults to 300x150. */
.svg-icon { display: inline-block; width: var(--text-sm); height: var(--text-sm); margin-right: 4px; vertical-align: -2px; }

/* ---- Homepage sections from index.md ---- */
.home-prose > :first-child { margin-top: 0; }
.home-prose p, .home-prose ul, .home-prose ol { margin: 0 0 16px; }
.home-prose ul, .home-prose ol { padding-left: 24px; }
.home-prose li { margin-bottom: 12px; }
.home-prose li p { margin: 0 0 8px; }
.home-prose ol > li::marker { font-style: italic; color: var(--accent); }
.home-prose .post-list { padding-left: 0; }
.home-prose .post-list h3 { margin: 0; font-size: var(--text-xl); font-weight: 500; line-height: 1.3; }
.rss-subscribe { margin: 32px 0 0; font-size: var(--text-sm); color: var(--muted); }

/* ---- Easter eggs ---- */
.egg { white-space: nowrap; }
.egg-note { margin: 32px 0 0; font-size: var(--text-xl); transform: rotate(-2deg); }
.callout-label { margin: 0 0 8px; font-weight: 600; }
/* The "note" box is the blue box posts refer to ("Fun blue box about black starts"). */
.callout-note { background: var(--note-bg); border-color: var(--note-rule); }
.callout-note .callout-label { color: var(--note-ink); }
/* Konami code: every word in handwriting. */
.hand-mode body, .hand-mode body * { font-family: var(--font-hand) !important; }
.thinking .more { color: var(--accent); text-decoration: none; font-weight: 600; }

/* Carbon ad: a quiet card in the text column, in the page's own type and colours. */
.carbon-slot { margin: 32px 0; }
.carbon-slot:empty { display: none; }
#carbonads { max-width: 420px; padding: 16px; background: var(--surface); border: var(--rule-hair); border-radius: 2px; font-size: var(--text-sm); line-height: 1.45; }
#carbonads > span { display: flex; flex-direction: column; gap: 8px; }
#carbonads .carbon-wrap { display: flex; gap: 16px; align-items: flex-start; }
#carbonads .carbon-img { flex: none; line-height: 0; }
#carbonads .carbon-img img { width: 130px; height: auto; border: var(--rule-hair); }
#carbonads a { color: var(--ink-soft); text-decoration: none; }
#carbonads a:hover { color: var(--ink); }
#carbonads .carbon-poweredby { align-self: flex-end; font-size: var(--text-xs); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }

/* Share row: quiet text buttons, with the share total as a margin-style note. */
.share { position: relative; max-width: var(--measure); margin: 0 0 64px; }
.share-count { margin-left: auto; font-size: var(--text-lg); line-height: 1; transform: rotate(-2deg); white-space: nowrap; }
.share-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding: 16px 0; border-top: var(--rule-hair); border-bottom: var(--rule-hair); }
.share-row .label { margin: 0 8px 0 0; }
.share-row { align-items: center; gap: 8px; }
.share-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: var(--rule-hair); border-radius: 50%; background: none; color: var(--ink-soft); cursor: pointer; transition: color .15s, border-color .15s; }
.share-link:hover, .share-link:focus-visible { color: var(--accent); border-color: var(--accent); }
.share-icon { width: 17px; height: 17px; fill: currentColor; }
.share-copied { font-size: var(--text-lg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The ShareThis account still has its sticky bar switched on; the share row replaces it. */
.st-sticky-share-buttons { display: none !important; }

/* Homepage hero motion options (_includes/hero-motion.html). */
.hero { position: relative; isolation: isolate; }
.hero-motion { position: absolute; top: -120px; bottom: -24px; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: -1; overflow: hidden; pointer-events: none; }
body { overflow-x: clip; }
.hero-motion > svg { width: 100%; height: 100%; display: block; }
.hero-motion .markup { overflow: visible; }
.hero-motion .markup path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }

@media (max-width: 480px) {
  .share-row .label { display: none; }
  .share-link { width: 36px; height: 36px; }
}

/* Phone and tablet: footnotes start closed. Tapping the number opens the note under its
   paragraph (the old site used Bigfoot for the same job). Link-year eggs are desktop-only. */
.fn-toggle, .post-body a.fn-toggle { color: var(--accent); text-decoration: none; cursor: pointer; }
@media (max-width: 999px) {
  .noted > aside.sidenote { display: none; }
  .noted > aside.sidenote.is-open { display: block; margin: -8px 0 24px; padding: 12px 16px; background: var(--surface); border: var(--rule-hair); border-left: 2px solid var(--accent); }
  .noted > aside.sidenote .sidenote-n { display: none; }
  .noted > aside.marginnote.egg { display: none; }
  .fn-ref { padding-left: 0; }
  .fn-toggle { padding: 1px 6px; border: 1px solid var(--accent); border-radius: 10px; font-size: 12px; line-height: 1; }
  .fn-toggle[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); }
}
@media (max-width: 999px) {
  .fn-toggle { position: relative; }
  .fn-toggle::after { content: ""; position: absolute; inset: -12px -8px; }
}
mjx-container[display="true"], mjx-container[jax] { display: block; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
@media (max-width: 600px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 16px; padding-bottom: 8px; }
  .site-header nav { font-size: var(--text-lg); gap: 4px 16px; }
}
@media (max-width: 400px) { .site-header nav { gap: 4px 12px; } }
@media (max-width: 360px) { .site-header nav { font-size: 20px; gap: 4px 8px; } }

/* Forms inside posts (the calculators): the page's type and colours instead of browser defaults. */
.post-body input[type="number"], .post-body input[type="text"], .post-body select:not(.select2-hidden-accessible) {
  box-sizing: border-box; height: 44px; padding: 0 12px; font: inherit; font-size: var(--text-md); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 2px;
}
.post-body input:focus-visible, .post-body select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Select2 city pickers. */
html .select2-container { font-family: var(--font-serif); font-size: var(--text-md); }
html .select2-container--default .select2-selection--single { height: 44px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 2px; }
html .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; padding-left: 12px; padding-right: 32px; color: var(--ink); }
html .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; right: 8px; }
html .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--muted) transparent transparent; }
html .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent var(--muted); }
html .select2-container--default.select2-container--open .select2-selection--single, html .select2-container--default.select2-container--focus .select2-selection--single { border-color: var(--accent); }
html .select2-dropdown { background: var(--surface); border: 1px solid var(--accent); border-radius: 2px; box-shadow: 0 8px 24px rgba(31, 27, 22, 0.12); }
html .select2-search--dropdown { padding: 8px; }
html .select2-container--default .select2-search--dropdown .select2-search__field { height: 36px; padding: 0 10px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 2px; outline: none; }
html .select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--accent); }
html .select2-container--default .select2-results > .select2-results__options { max-height: 320px; }
html .select2-results__option { padding: 6px 12px; color: var(--ink); }
html .select2-container--default .select2-results__group { padding: 12px 12px 4px; font-size: var(--text-xs); font-weight: 400; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
html .select2-container--default .select2-results__option .select2-results__option { padding-left: 20px; }
html .select2-container--default .select2-results__option--highlighted[aria-selected], html .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--paper); color: var(--accent); }
html .select2-container--default .select2-results__option[aria-selected="true"], html .select2-container--default .select2-results__option--selected { background: none; color: var(--accent); font-weight: 600; }

/* Calculator tables (rows with a city picker): label column stays on one line; on phones each
   row stacks into label, picker, then amount and currency, so nothing is cut off. */
.post-body table:has(.select_js) td:first-child { white-space: nowrap; color: var(--ink-soft); }
@media (max-width: 640px) {
  .post-body table:has(.select_js), .post-body table:has(.select_js) tbody { display: block; }
  .post-body table:has(.select_js) tr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; padding: 12px 0; border-bottom: var(--rule-hair); }
  .post-body table:has(.select_js) td { padding: 0; border: 0; }
  .post-body table:has(.select_js) td:nth-child(1), .post-body table:has(.select_js) td:nth-child(2) { grid-column: 1 / -1; }
  .post-body table:has(.select_js) td:nth-child(1) { font-size: var(--text-sm); }
  .post-body table:has(.select_js) td:empty { display: none; }
  .post-body table:has(.select_js) input[type="number"] { width: 100%; max-width: none !important; }
}
.post-body #target-salary { font-size: var(--text-lg); font-weight: 600; color: var(--ink); }

/* Calculator table on wider screens: fixed columns that fit the text column, so the
   currency never falls off the edge; long city names end in an ellipsis on one line. */
@media (min-width: 641px) {
  .post-body table:has(.select_js) { display: table; width: 100%; table-layout: fixed; }
  .post-body table:has(.select_js) td:nth-child(1) { width: 112px; }
  .post-body table:has(.select_js) td:nth-child(3) { width: 150px; }
  .post-body table:has(.select_js) td:nth-child(4) { width: 56px; }
  .post-body table:has(.select_js) input[type="number"] { width: 100%; max-width: none !important; }
}
html .select2-container .select2-selection--single .select2-selection__rendered { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Carbon ad stays quiet until the reader looks at it. */
#carbonads { opacity: 0.6; transition: opacity .2s; }
#carbonads:hover, #carbonads:focus-within { opacity: 1; }

/* Phones: 18px body keeps about 36 characters a line; 20px gave 31, which reads choppy. */
@media (max-width: 600px) {
  .post-body { font-size: var(--text-md); line-height: 1.6; }
  .post-body p, .post-body ul, .post-body ol { margin-bottom: 20px; }
  .post-body h2 { margin-top: 48px; font-size: var(--text-xl); }
  .post-body h3 { margin-top: 36px; font-size: var(--text-lg); }
  .post-body .blockquote-extra { font-size: var(--text-lg); }
}
.divider-small { margin: 4px 0 28px; letter-spacing: 0; }

/* About page: intro beside the photo, sections as homepage rows, photos as tilted prints. */
.about-intro p { margin: 0; font-size: var(--text-3xl); line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }
.about-prose ul { list-style: none; padding: 0; }
.about-prose ul li { padding: 10px 0; border-bottom: var(--rule-dash); }
.about-prose ul li:last-child { border-bottom: 0; }
.about-prose ol { padding-left: 0; list-style: none; counter-reset: op; }
.about-prose ol li { counter-increment: op; position: relative; padding-left: 40px; margin-bottom: 16px; }
.about-prose ol li::before { content: counter(op); position: absolute; left: 0; top: -2px; font-size: var(--text-lg); font-style: italic; color: var(--accent); }
.about-prose ol li p { margin: 0; }
.about-photos { display: flex; justify-content: center; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding: 56px 0 24px; border-top: var(--rule-hair); }
.about-photos .print { margin: 0; padding: 10px 10px 34px; background: var(--surface); box-shadow: 0 2px 0 var(--rule), 0 14px 30px rgba(31, 27, 22, 0.14); }
.about-photos .print img { display: block; height: 260px; width: auto; max-width: 100%; object-fit: cover; }
.about-photos .print:nth-child(1) { transform: rotate(-3deg); }
.about-photos .print:nth-child(2) { transform: rotate(2deg); }
.about-photos .print:nth-child(3) { transform: rotate(-1.5deg); }
.fine-print { margin-top: 32px; font-size: var(--text-sm); color: var(--muted); }
@media (max-width: 600px) {
  .about-intro p { font-size: var(--text-xl); }
  .about-photos { gap: 20px; }
  .about-photos .print img { height: 200px; }
}
.post-body .calc-note { margin: 8px 0 24px; font-size: var(--text-sm); color: var(--muted); }
