:root {
  --paper: #f4f2ec;
  --paper-2: #ebe8df;
  --card: #fbfaf6;
  --ink: #1d1f3d;
  --muted: #4f5268;
  --link: #1d1f3d;
  --line-strong: #1d1f3d;
  --code-bg: #e8e4d6;
  --gold: #e2b23c;
  --gold-ink: #6b4d06;
  --night: #1d1f3d;
  --rule: #d9d6cc;
  --display: "Epilogue", system-ui, sans-serif;
  --body: "Epilogue", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1.125rem/1.65 var(--body); }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--line-strong); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1rem; font-weight: 500; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--gold); color: var(--night); padding: .4rem .8rem; z-index: 9; }
.tag { font: 500 .78rem/1 var(--mono); color: var(--link); letter-spacing: .01em; white-space: nowrap; }

/* masthead */
.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font: 500 1.2rem/1 var(--display); letter-spacing: -.01em; }
.brand-mark { width: 2rem; height: 2rem; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.2rem; font: 600 .95rem/1.4 var(--display); }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--link); }
.nav .rss { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border: 1px solid var(--rule); border-radius: 999px; font-size: .85rem; }
.nav .rss:hover { border-color: var(--line-strong); }

/* front page (the v4 concept): the newest article behind the logo's open door, topic shelves, the archive band */
.eyebrow { margin: 0 0 1rem; font: 500 .8rem/1.4 var(--mono); color: var(--muted); }
.lede { color: var(--muted); max-width: 44rem; margin: 0 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .8rem 1.25rem; font: 500 1rem/1 var(--display); text-decoration: none; }
.btn-solid { background: var(--night); color: #fff; }
.btn-solid:hover { background: #2c2f57; color: #fff; }
.btn-line { border: 1px solid #b9b5a8; color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.fp-eyebrow { margin: 0; font: 400 .8rem/1.5 var(--mono); color: var(--muted); }
.fp-eyebrow b { color: var(--ink); font-weight: 600; }
.fp-title { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .2s; }
.fp-title:hover, .fp-title:focus-visible { background-size: 100% 1.5px; color: inherit; }
.fp-link { font: 500 1rem/1.4 var(--display); color: var(--ink); text-decoration: underline; text-underline-offset: .3em; }
.fp-link::after { content: " \2192"; }
.fp-lead { margin: 1.25rem 0 0; font-size: 1.25rem; line-height: 1.55; max-width: 34ch; }
.fp-hero { padding: clamp(2.5rem, 5vw, 5rem) 0 clamp(1.5rem, 3vw, 3rem); }
.fp-hero__grid { display: grid; gap: 3rem; align-items: center; }
.fp-hero__grid > * { min-width: 0; }
@media (min-width: 64rem) { .fp-hero__grid { grid-template-columns: 5fr 7fr; gap: 2.5rem; } }
.fp-hero h1 { margin: 0; font-size: clamp(2.75rem, 3.4vw + 1rem, 4.5rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 500; max-width: 10ch; }
.fp-door { position: relative; min-width: 0; margin-right: clamp(2.75rem, 7vw, 6.5rem); background: var(--night); padding: clamp(.6rem, 1.6vw, 1.4rem); }
.fp-door__room { position: relative; z-index: 1; min-width: 0; background: var(--card); padding: clamp(1.1rem, 2.4vw, 2.1rem); }
.fp-door__leaf { position: absolute; z-index: 0; top: calc(-1 * clamp(.6rem, 1.6vw, 1.4rem)); bottom: calc(-1 * clamp(.6rem, 1.6vw, 1.4rem));
  left: calc(100% - clamp(.6rem, 1.6vw, 1.4rem)); width: clamp(2.25rem, 8.6vw, 7.9rem); background: var(--gold); clip-path: polygon(0 11%, 100% 0, 100% 100%, 0 89%); }
.fp-door__leaf::after { content: ""; position: absolute; left: 22%; top: 50%; width: 22%; aspect-ratio: 1; transform: translateY(-50%); background: var(--night); }
.fp-door h2 { margin: .75rem 0 0; font-size: clamp(1.5rem, 1.2vw + 1rem, 2rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 500; }
.fp-door__desc { margin: .75rem 0 0; max-width: 46ch; font-size: 1.05rem; }
.fp-code { margin-top: 1.25rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.fp-code figure { min-width: 0; margin: 0; border: 1px solid var(--rule); background: var(--paper); }
.fp-code figcaption { font: 400 .75rem/1.4 var(--mono); padding: .45rem .75rem; border-bottom: 1px solid var(--rule); color: var(--muted); }
.fp-code .now figcaption { background: var(--night); color: var(--paper); border-color: var(--night); }
.fp-code pre { margin: 0; padding: .75rem; font: .8rem/1.6 var(--mono); color: var(--ink); overflow-x: auto; white-space: pre; }
.fp-code mark { background: var(--gold); color: var(--night); padding: 1px 3px; }
.fp-toc { margin: 1.1rem 0 0; padding-left: 1.1rem; font-size: 1rem; }
.fp-more { margin: 1.25rem 0 0; }
.fp-sec { padding: clamp(3rem, 5vw, 5rem) 0; }
.fp-sec h2 { margin: 0; font-size: clamp(2rem, 1.8vw + 1.1rem, 3rem); letter-spacing: -.03em; font-weight: 500; }
.fp-sub { margin-top: .5rem; }
.fp-entry { position: relative; padding: .4rem 0 .4rem 1.75rem; display: grid; gap: 1rem 2rem; }
.fp-entry::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .75rem; border: 3px solid var(--night); border-right: 0; }
.fp-entry h2 { font-size: clamp(1.6rem, 1.2vw + 1rem, 2.25rem); line-height: 1.12; max-width: 26ch; }
.fp-entry__aside p { margin: 0 0 .75rem; max-width: 60ch; }
@media (min-width: 48rem) { .fp-entry { grid-template-columns: 7fr 5fr; align-items: start; } .fp-entry > .fp-eyebrow, .fp-entry > h2 { grid-column: 1; } .fp-entry__aside { grid-column: 2; grid-row: 2; } }
.fp-shelves { margin-top: 1.5rem; display: grid; gap: 1.5rem 2rem; border-top: 2px solid var(--night); }
@media (min-width: 64rem) { .fp-shelves { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fp-shelf { padding-top: 1.25rem; }
.fp-shelf h3 { margin: 0; font-size: 1.4rem; font-weight: 500; letter-spacing: -.01em; }
.fp-shelf > p { margin: .4rem 0 0; color: var(--muted); max-width: 34ch; }
.fp-shelf ul { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.fp-shelf li { padding: .85rem 0; border-top: 1px solid var(--rule); }
.fp-shelf li a, .fp-roster a { font-weight: 500; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.fp-shelf li a:hover, .fp-roster a:hover { text-decoration-color: currentColor; }
.fp-shelf li .fp-eyebrow { display: block; margin-top: .2rem; }
.fp-note { margin: 2rem 0 0; max-width: 46rem; color: var(--muted); font-size: 1rem; }
.fp-archive { background: var(--night); color: var(--paper); padding: clamp(4.5rem, 8vw, 8rem) 0; }
.fp-archive__grid { display: grid; gap: 3rem; }
@media (min-width: 64rem) { .fp-archive__grid { grid-template-columns: 5fr 6fr; gap: 4rem; justify-content: space-between; } }
.fp-archive h2 { margin: 0; font-size: clamp(2rem, 1.8vw + 1.1rem, 3rem); letter-spacing: -.03em; font-weight: 500; max-width: 14ch; color: var(--paper); }
.fp-archive .fp-lead { color: var(--paper); max-width: 38ch; }
.fp-archive .fp-eyebrow { color: #b9bac6; }
.fp-facts { list-style: none; margin: 1.75rem 0; padding: 0; display: grid; gap: .75rem; }
.fp-facts li { position: relative; padding-left: 1.4rem; }
.fp-facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--gold); }
.fp-archive .fp-link { color: var(--gold); }
.fp-roster { list-style: none; margin: .75rem 0 0; padding: 0; }
.fp-roster li { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 16fr) auto; gap: 1rem; align-items: baseline; padding: .95rem 0; border-top: 1px solid rgba(244, 242, 236, .16); }
.fp-roster b { font-weight: 500; color: #b9bac6; }
.fp-roster a { color: var(--paper); }
@media (max-width: 47.99rem) { .fp-roster li { grid-template-columns: 1fr auto; } .fp-roster b { grid-column: 1 / -1; } }
@media (max-width: 39.99rem) {
  .fp-door { margin-right: 1.9rem; padding: .45rem; }
  .fp-door__leaf { top: -.45rem; bottom: -.45rem; left: calc(100% - .45rem); width: 2.25rem; }
  .fp-door__room { padding: 1.1rem .9rem; }
  .fp-door__desc { display: none; }
  .fp-code pre { font-size: .72rem; padding: .6rem; }
  .actions .btn { width: 100%; justify-content: center; }
}

/* sections and feed rows */
.section { padding: 3rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head a { font: 600 .95rem/1.4 var(--display); text-decoration: none; }
.section-head a:hover { text-decoration: underline; }
.feed { list-style: none; margin: .5rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.feed li { border-bottom: 1px solid var(--rule); }
.feed a { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 1.25rem; align-items: baseline; padding: 1.05rem .5rem; margin: 0 -.5rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.feed a:hover { background: var(--card); }
.feed a:hover .row-title { color: var(--link); text-decoration: underline; text-underline-offset: .15em; }
.row-main { display: grid; gap: .25rem; min-width: 0; }
.row-title { font: 600 1.2rem/1.25 var(--display); letter-spacing: -.01em; margin: 0; }
.row-desc { color: var(--muted); font-size: 1rem; }
.row-meta { font: .8rem/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.row-by { font: .8rem/1.4 var(--mono); color: var(--muted); }
@media (max-width: 40rem) { .feed a { grid-template-columns: 1fr; gap: .4rem; } .row-meta { white-space: normal; } }

.section-note { margin: -.25rem 0 1rem; color: var(--muted); font-size: 1rem; }

/* listings: articles, topics, archive years, 404 */
.wrap.narrow { max-width: 52rem; }
.listing { padding: 2.25rem 0 4rem; }
.listing h2 { font-size: 1.5rem; margin: 2.75rem 0 .75rem; }
.page-title { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: .35rem 0 .75rem; font-weight: 500; letter-spacing: -.025em; }
.lede { color: var(--muted); max-width: 44rem; margin: 0 0 2rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.5rem 0 1rem; }
.filters a { padding: .45rem .75rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); text-decoration: none; }
.filters a:hover { border-color: var(--line-strong); }
.empty { padding: 1.1rem 1.25rem; border: 1px dashed var(--rule); border-radius: 12px; color: var(--muted); font-size: 1rem; }
.other-years { margin-top: 1.75rem; }
.crumbs { font: .85rem/1.4 var(--mono); color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }

/* articles */
.article { max-width: 48rem; padding-top: 2.25rem; padding-bottom: 3.5rem; }
.article h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .25rem 0 .75rem; font-weight: 500; letter-spacing: -.025em; }
.article .kicker, .listing .kicker { margin: 0; font: inherit; letter-spacing: 0; text-transform: none; }
.article .kicker a, .listing .kicker a { text-decoration: none; }
.article .kicker a:hover .tag { text-decoration: underline; }
.meta { color: var(--muted); font-size: 1rem; margin: 0 0 1.5rem; }
.hero-img { width: 100%; height: auto; border-radius: 12px; margin: 0 0 1.5rem; }
.prose h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: 1.25rem; margin: 1.8rem 0 .6rem; }
.prose img, .prose figure img { max-width: 100%; height: auto; border-radius: 8px; }
.prose figure { margin: 1.5rem 0; }
.prose blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.1rem; border-left: 4px solid var(--line-strong); color: var(--muted); }
.prose code { font: .88em/1.4 var(--mono); background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: var(--night); color: #f4f2ec; border-radius: 10px; padding: 1rem 1.1rem; overflow-x: auto; font: .88rem/1.55 var(--mono); }
.prose pre code { background: none; padding: 0; color: inherit; font: inherit; }
.prose :not(pre) > code { overflow-wrap: anywhere; }  /* long inline JSON or paths wrap on phones */
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .4rem .6rem; text-align: left; }
.archive abbr { text-decoration: none; }
.bio { margin-top: 2.5rem; padding: 1.1rem 1.25rem; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; font-size: 1rem; }
.bio h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.bio p { margin: .4rem 0; }
.bio .where { color: var(--muted); font: .85rem/1.4 var(--mono); }
.license { font: .85rem/1.5 var(--mono); color: var(--muted); margin-top: 1.5rem; }
.flow { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.flow a:hover { border-color: var(--line-strong); }
.flow a { display: block; padding: .9rem 1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); text-decoration: none; color: var(--ink); font: 600 1rem/1.3 var(--display); }
.flow a small { display: block; font: .75rem/1.4 var(--mono); color: var(--muted); }
.flow .next { text-align: right; }
.more { padding-top: 0; }

/* footer */
.footer { border-top: 2px solid var(--night); padding: 2.75rem 0 2.25rem; font-size: 1rem; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; align-items: flex-start; }
.footer p { margin: .6rem 0 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.footer nav a { color: var(--ink); }
.footer .legal { flex-basis: 100%; font-size: .9rem; }
.footer .legal a { color: var(--muted); }
@media (max-width: 40rem) { .footer nav { display: grid; grid-template-columns: 1fr 1fr; } }

/* Sponsor (Wordfully): a centred band on the front page only, between the newest articles and the topics. */
.supporter { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--gold); padding: 1.25rem 1.25rem 1.35rem; }
.supporter__label { margin: 0 0 .85rem; font: 500 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.supporter__logo { display: inline-block; line-height: 0; }
.supporter__logo img { display: block; width: 132px; height: auto; }
.supporter__text { margin: .9rem 0 1.1rem; font-size: .95rem; line-height: 1.55; color: var(--ink); }
.supporter__text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.supporter__cta { display: block; padding: .7rem 1rem; background: var(--night); color: var(--paper); font: 500 .95rem/1.2 var(--display); text-align: center; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.supporter__cta:hover { background: #2c2f57; color: var(--paper); }
.supporter__cta:active { transform: translateY(1px); }
.supporter a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.fp-supporter { padding: clamp(1rem, 2vw, 2rem) 0; }
.supporter--band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem 2rem; max-width: 52rem; margin: 0 auto; }
.supporter--band .supporter__label { grid-column: 1 / -1; margin: 0; }
.supporter--band .supporter__text { margin: 0; }
.supporter--band .supporter__cta { white-space: nowrap; }
@media (max-width: 760px) {
  .supporter--band { grid-template-columns: 1fr; }
}
