/* The blog's frame takes the landing page's world: a desk under one lamp,
   charcoal plates as screens (code), bone paper as documents (the decision),
   one highlighter yellow (the masthead bar and text selection only).
   Light is the same desk by daylight. The reading column is unchanged:
   42rem, 17px, line height 1.7, code wraps inside the column. */

@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("fonts/SchibstedGrotesk-normal-400-900-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("fonts/SchibstedGrotesk-normal-400-900-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fragment Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/FragmentMono-normal-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fragment Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/FragmentMono-normal-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/LibreCaslonText-normal-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/LibreCaslonText-normal-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/LibreCaslonText-italic-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/LibreCaslonText-italic-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light dark;
  /* the desk by daylight */
  --ground-0: #e6e3db; --ground-1: #efede8; --ground-2: #f8f7f4;
  --lamp: rgba(255, 255, 255, .6);
  --text: #171511; --text-2: #46423a; --text-3: #645f55;
  --hair: rgba(23, 21, 17, .13); --hair-2: rgba(23, 21, 17, .26);
  --link-line: rgba(23, 21, 17, .42);
  --tint: rgba(23, 21, 17, .065);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  --paper-shadow: 0 18px 44px -22px rgba(23, 21, 17, .5), 0 1px 0 rgba(23, 21, 17, .14);
  --plate-shadow: inset 0 1px 0 rgba(235, 228, 211, .14), inset 0 0 0 1px rgba(235, 228, 211, .06), 0 18px 40px -24px rgba(23, 21, 17, .6), 0 1px 0 rgba(23, 21, 17, .2);
  /* the two materials and the one hue: the same in both themes */
  --plate-0: #292826; --plate-1: #1d1c1a; --on-plate: #ebe4d3;
  --paper: #ebe4d3; --paper-ink: #171511; --paper-2: rgba(23, 21, 17, .66); --paper-hair: rgba(23, 21, 17, .16);
  --mark: #f0d24e; --ink: #171511;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --law: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
@media (prefers-color-scheme: dark) {
  :root {
    /* the desk at night, as on the landing page */
    --ground-0: #0e0d0c; --ground-1: #141210; --ground-2: #1a1714;
    --lamp: rgba(235, 228, 211, .055);
    --text: #ebe4d3; --text-2: #b8b09e; --text-3: #9c9483;
    --hair: rgba(235, 228, 211, .1); --hair-2: rgba(235, 228, 211, .22);
    --link-line: rgba(235, 228, 211, .4);
    --tint: rgba(235, 228, 211, .08);
    --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    --paper-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8), 0 1px 0 rgba(0, 0, 0, .5);
    --plate-shadow: inset 0 1px 0 rgba(235, 228, 211, .14), inset 0 0 0 1px rgba(235, 228, 211, .06), 0 24px 60px -28px rgba(0, 0, 0, .85), 0 1px 0 rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { background: var(--ground-1); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--hair-2) var(--ground-1); }
body {
  margin: 0;
  min-height: 100vh;
  /* the desk: grain over a lamp-lit ground that darkens towards the foot, never a flat fill */
  background:
    var(--grain) 0 0 / 240px 240px,
    radial-gradient(900px 560px at 50% 80px, var(--lamp), transparent 70%) no-repeat,
    radial-gradient(1400px 900px at 70% 0, var(--ground-2), transparent) no-repeat,
    linear-gradient(var(--ground-1) calc(100% - 520px), var(--ground-0));
  background-color: var(--ground-1);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--mark); color: var(--ink); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.wrap { max-width: 42rem; margin: 0 auto; padding: 0 16px; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }

/* masthead: the typographic wordmark under the lamp */
.mast .wrap { display: flex; align-items: center; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 400 1.0625rem/1 var(--sans); letter-spacing: -.01em; color: var(--text-3); text-decoration: none; }
.brand::before { content: ""; flex: none; width: 3px; height: 16px; background: var(--mark); }
.brand b { font-weight: 600; color: var(--text); }
.brand:hover b { text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: .2em; }

main.wrap { padding: 2.5rem 16px 3rem; overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--sans); color: var(--text); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(30px, 22.4px + 1.96vw, 44px); line-height: 1.06; letter-spacing: -.025em; margin: 0 0 .9rem; }
h2 { font-size: clamp(20px, 17.8px + .56vw, 24px); line-height: 1.2; letter-spacing: -.015em; margin: 2.6rem 0 .8rem; }
h3 { font-size: clamp(17px, 15.4px + .42vw, 20px); line-height: 1.3; letter-spacing: -.01em; margin: 2rem 0 .5rem; }
p, ul, ol, blockquote, pre { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: .35rem 0; }
li::marker { color: var(--text-3); font-variant-numeric: proportional-nums; }
.meta { color: var(--text-3); font-size: .9375rem; font-variant-numeric: tabular-nums; margin: 0 0 2rem; }
strong { font-weight: 650; }

/* quoted human text speaks in the statute face */
blockquote { padding-left: 1.1rem; border-left: 1px solid var(--hair-2); font-family: var(--law); font-size: 1.0625rem; line-height: 1.65; }
blockquote p:last-child { margin-bottom: 0; }

/* code: machine text on a charcoal plate, wrapping inside the column */
/* no ligatures: "=>" and "??" must show as typed */
code { font-family: var(--mono); font-size: .88em; font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0, "zero" 1; overflow-wrap: anywhere; }
:not(pre) > code { background: var(--tint); padding: .1em .3em; }
pre {
  background: linear-gradient(160deg, var(--plate-0), var(--plate-1));
  color: var(--on-plate);
  box-shadow: var(--plate-shadow);
  border-radius: 3px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  line-height: 1.55;
  font-size: .875rem;
  tab-size: 4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 1.4rem;
  scrollbar-color: rgba(235, 228, 211, .22) transparent;
}
pre code { font-size: inherit; white-space: inherit; overflow-wrap: inherit; }
pre:focus-visible { outline-color: var(--text); }

/* the case block: the article's own "The decision" section, as a sheet of paper */
.case { position: relative; background: var(--paper); color: var(--paper-ink); box-shadow: var(--paper-shadow); padding: 22px 28px 6px; margin: 2.2rem 0 2.8rem; }
.case::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06; mix-blend-mode: multiply; background-image: var(--noise); background-size: 240px 240px; }
.case > * { position: relative; z-index: 1; }
.case h2 { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--paper-ink); font-size: .9375rem; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--paper-ink); }
.case ul { list-style: none; padding: 0; margin: 0; }
.case li { margin: 0; padding: 12px 0 13px; border-bottom: 1px solid var(--paper-hair); font-size: .9375rem; line-height: 1.55; }
.case li:last-child { border-bottom: 0; }
.case .k { font-weight: 600; }
.case a { text-decoration-color: var(--paper-2); }
.case a:hover { text-decoration-color: currentColor; }
.case :focus-visible { outline-color: var(--paper-ink); }

.product-note { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 1.1rem 0 .1rem; margin: 2rem 0; }
.repo-link { margin-top: 1.5rem; }

/* the index: one claim, then the cases as rows of a ledger */
.home h1 { margin-bottom: 0; }
.posts { list-style: none; padding: 0; margin: 2.75rem 0 0; border-top: 1px solid var(--hair-2); }
.posts li { margin: 0; padding: 1.5rem 0 1.6rem; border-bottom: 1px solid var(--hair); }
.posts h2 { margin: 0 0 .45rem; }
.posts h2 a { text-decoration: none; }
.posts h2 a:hover { text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.posts p { margin: 0 0 .5rem; color: var(--text-2); }
.posts .meta { margin: 0; font-size: 13px; }

footer.site { color: var(--text-3); font-size: 13px; line-height: 1.5; padding: 3.5rem 0 3rem; }

@media (min-width: 720px) {
  /* the sheet's text lines up with the column; its paper reaches past it */
  .case { margin-left: -28px; margin-right: -28px; }
}
@media (max-width: 639px) {
  .mast .wrap { height: 56px; }
  main.wrap { padding-top: 1.75rem; }
  .case { padding: 18px 18px 4px; }
  /* plates bleed on a phone, as on the landing page; paper never does */
  pre { margin-left: -16px; margin-right: -16px; border-radius: 0; padding: .9rem 16px; }
}
