/* stomra.com/articles and /sv/articles: the articles in the front page's look (sv/index.html, 20 Nov 2026):
   night ink and paper, Familjen Grotesk, IBM Plex Mono for small labels, the lamp for the one thing to do.
   Erik, 28 Nov 2026: the articles must look like the site itself. Pages are written by tools/articles.mjs. */
:root {
  --ink: #0c0e0d; --ink-2: #141715; --fg: #eef0ea;
  --paper: #e6e8e3; --paper-2: #d8dbd4; --sheet: #f1f2ee;
  --text: #121512; --muted: #5b6159; --faint: #868c83;
  --line-d: rgba(238, 240, 234, 0.14); --line-l: rgba(18, 21, 18, 0.14);
  --lamp: #f0a73a; --lamp-ink: #9a5f08;
  --r: 3px; --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(20px, 4.4vw, 64px);
  --measure: 40rem;
  --sans: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 19px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: rgba(240, 167, 58, 0.35); }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mono { font-family: var(--mono); }
.nw { white-space: nowrap; }

/* ── the bar: logo, pages, language, sign in, book ── */
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 22px var(--pad); font-size: 14px; color: var(--fg); }
.nav a { text-decoration: none; }
.nav .logo img { height: 24px; width: auto; }
.nav-c { display: flex; gap: 32px; }
.nav-r { display: flex; gap: 22px; align-items: center; justify-content: flex-end; }
.nav a.q { color: rgba(238, 240, 234, 0.78); transition: color 0.2s ease; }
.nav a.q:hover, .nav a.q[aria-current] { color: var(--fg); }
.btn { display: inline-block; background: var(--lamp); color: var(--ink); font-weight: 600; font-size: 17px; line-height: 1.3; padding: 16px 24px; border-radius: var(--r); text-decoration: none; white-space: nowrap; transition: transform 0.25s var(--ease), filter 0.25s var(--ease); }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-s { font-size: 14px; padding: 10px 16px; }
.tl { position: relative; display: inline-block; font-size: 17px; font-weight: 500; padding-bottom: 6px; white-space: nowrap; text-decoration: none; }
.tl::before, .tl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; }
.tl::before { opacity: 0.32; }
.tl::after { transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.tl:hover::after { transform: scaleX(1); }
.lang { position: relative; }
.lang summary { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid rgba(238, 240, 234, 0.28); border-radius: 999px; color: rgba(238, 240, 234, 0.9); font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; cursor: pointer; list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lang-m { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 150px; padding: 6px; background: rgba(20, 23, 21, 0.97); border: 1px solid var(--line-d); border-radius: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
.lang-m a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 4px; color: rgba(238, 240, 234, 0.82); font-size: 14px; }
.lang-m a:hover { background: rgba(238, 240, 234, 0.08); color: var(--fg); }
.lang-m a[aria-current] { color: var(--fg); }
.lang-m a[aria-current]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lamp); }
@media (max-width: 860px) { .nav { grid-template-columns: 1fr auto; } .nav-c, .nav-r .signin { display: none; } }

/* ── the dark head of a page ── */
.ahead { background: var(--ink); color: var(--fg); position: relative; overflow: hidden; }
.ahead::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.ahead-c { position: relative; z-index: 2; max-width: 1320px; margin: 0 auto; padding: clamp(48px, 9vh, 120px) var(--pad) clamp(44px, 7vh, 88px); }
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lamp); margin: 0 0 22px; }
.ahead h1 { margin: 0; font-weight: 500; font-size: clamp(40px, 5.6vw, 92px); line-height: 0.98; letter-spacing: -0.04em; max-width: 18ch; text-wrap: balance; }
.ahead .dek { margin: 26px 0 0; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; color: rgba(238, 240, 234, 0.72); max-width: 40rem; }
.ahead .byline { display: flex; align-items: center; gap: 14px; margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line-d); max-width: 40rem; }
.ahead .byline p { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ahead .byline .who { font-size: 16px; color: rgba(238, 240, 234, 0.72); }
.ahead .byline .who b { color: var(--fg); font-weight: 600; }
.ahead .byline .meta { font-family: var(--mono); font-size: 13px; color: rgba(238, 240, 234, 0.55); }
.face, .authors img, .author img, .alist .by img { border-radius: 50%; object-fit: cover; flex: none; background: var(--ink-2); }
.ahead .byline .face { width: 44px; height: 44px; }
/* the writers, under the list's lead */
.authors { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line-d); max-width: 40rem; }
.authors .lbl { flex-basis: 100%; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(238, 240, 234, 0.55); }
.authors .au { display: flex; align-items: center; gap: 12px; }
.authors img { width: 44px; height: 44px; }
.authors .au > span { display: flex; flex-direction: column; gap: 2px; font-family: var(--mono); font-size: 12.5px; color: rgba(238, 240, 234, 0.55); }
.authors b { font-family: var(--sans); font-size: 16px; font-weight: 600; color: var(--fg); }
.ahead.article h1 { font-size: clamp(38px, 4.8vw, 76px); max-width: 22ch; }

/* ── an article's body: one column on paper ── */
.body { padding: clamp(48px, 7vw, 96px) var(--pad) clamp(64px, 8vw, 112px); }
.body > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.body > .wide, .body > figure { max-width: 52rem; }
.body p, .body li { margin-top: 0; margin-bottom: 1.05em; }
.body h2 { font-weight: 500; font-size: clamp(30px, 3vw, 40px); line-height: 1.05; letter-spacing: -0.035em; margin-top: 2.2em; margin-bottom: 0.55em; scroll-margin-top: 24px; text-wrap: balance; }
.body h3 { font-weight: 600; font-size: 19px; line-height: 1.3; margin: 0 0 6px; }
.body ul, .body ol { padding-left: 1.25em; }
.body li { margin-bottom: 0.5em; }
.body b, .body strong { font-weight: 600; }
.body a { color: var(--text); text-decoration-color: var(--lamp); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.body code { font-family: var(--mono); font-size: 0.82em; background: var(--paper-2); padding: 0.12em 0.4em; border-radius: var(--r); }
.body .pull { font-size: clamp(22px, 2vw, 27px); line-height: 1.38; letter-spacing: -0.015em; font-weight: 500; margin-bottom: 1.2em; }
.body blockquote { margin: 1.8em auto; padding: 0.2em 0 0.2em 26px; border-left: 3px solid var(--lamp); font-size: clamp(23px, 2.2vw, 30px); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; }
.body blockquote p { margin: 0; }
.toc { background: var(--sheet); border: 1px solid var(--line-l); border-radius: var(--r); padding: 18px 24px 8px; font-size: 16px; margin-bottom: 2em; }
.toc b { display: block; font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--lamp); }
.steps { list-style: none; padding: 0 !important; counter-reset: s; }
.steps > li { counter-increment: s; position: relative; padding-left: 52px; margin: 0 0 1.1em; }
.steps > li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0.2em; font-family: var(--mono); font-size: 13px; color: var(--lamp-ink); border-top: 2px solid var(--lamp); padding-top: 4px; width: 34px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 1.6em auto 2em; }
.card { background: var(--sheet); border: 1px solid var(--line-l); border-radius: var(--r); padding: 18px 20px; }
.card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
.note, .tip { background: var(--sheet); border-left: 3px solid var(--lamp); padding: 14px 20px; border-radius: 0 var(--r) var(--r) 0; margin: 1.6em auto; font-size: 17px; }
.note p, .tip p { margin: 0; }
.tablewrap { overflow-x: auto; margin: 1.6em auto 2em; }
table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.45; }
th, td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line-l); vertical-align: top; }
th { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
figure { margin: 2.2em auto; }
figure img, figure video { width: 100%; border-radius: var(--r); background: var(--ink); }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
/* A place kept for a screenshot or a film. Only drafts have them: release refuses a page with one. */
figure.todo .frame { min-height: 240px; display: grid; place-items: center; padding: 24px; text-align: center; border: 2px dashed rgba(18, 21, 18, 0.25); border-radius: var(--r); background: repeating-linear-gradient(-45deg, var(--paper-2) 0 12px, var(--paper) 12px 24px); font-family: var(--mono); font-size: 14px; color: var(--muted); }
/* the author, after the body */
.body .author { display: flex; align-items: center; gap: 18px; margin-top: 3em; padding: 18px 20px; background: var(--sheet); border: 1px solid var(--line-l); border-radius: var(--r); }
.author img { width: 72px; height: 72px; }
.author p { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 16px; line-height: 1.45; color: var(--muted); }
.author b { color: var(--text); font-weight: 600; font-size: 18px; }
.next { max-width: var(--measure); margin: 3em auto 0; padding-top: 20px; border-top: 1px solid var(--line-l); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 15px; color: var(--muted); }
.next a { text-decoration: none; color: var(--text); }
.next a:hover { text-decoration: underline; text-decoration-color: var(--lamp); }

/* ── the end of every page: set up Stomra ── */
.end { background: var(--ink); color: var(--fg); padding: clamp(72px, 10vw, 140px) var(--pad); }
.end-c { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.end h2 { margin: 0; font-weight: 500; font-size: clamp(40px, 5.2vw, 84px); line-height: 0.96; letter-spacing: -0.04em; }
.end .lede { margin: 22px 0 0; font-size: 19px; color: rgba(238, 240, 234, 0.7); max-width: 30rem; }
.end ol { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.end li { counter-increment: c; position: relative; padding: 18px 0 18px 52px; border-top: 1px solid var(--line-d); color: rgba(238, 240, 234, 0.76); font-size: 17px; line-height: 1.5; }
.end li:last-child { border-bottom: 1px solid var(--line-d); }
.end li::before { content: counter(c, decimal-leading-zero); position: absolute; left: 0; top: 21px; font-family: var(--mono); font-size: 13px; color: var(--lamp); }
.end li b { color: var(--fg); font-weight: 600; }
.end code { font-family: var(--mono); font-size: 0.86em; color: var(--fg); background: rgba(238, 240, 234, 0.08); padding: 0.1em 0.4em; border-radius: var(--r); }
.end .go { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 32px; }
.end .go .tl { color: rgba(238, 240, 234, 0.94); }
.end .micro { font-size: 13.5px; color: rgba(238, 240, 234, 0.5); margin-top: 18px; }
@media (max-width: 860px) { .end-c { grid-template-columns: 1fr; } }

/* ── the list of articles ── */
.alist { max-width: 1320px; margin: 0 auto; padding: clamp(40px, 6vw, 88px) var(--pad) clamp(64px, 8vw, 112px); }
.alist .row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 11rem; gap: 8px 32px; align-items: baseline; padding: 30px 0; border-top: 1px solid var(--line-l); text-decoration: none; color: var(--text); }
.alist .row:last-child { border-bottom: 1px solid var(--line-l); }
.alist .no { font-family: var(--mono); font-size: 13px; color: var(--lamp-ink); }
.alist .t { font-size: clamp(24px, 2.4vw, 34px); font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.alist .d { display: block; margin-top: 10px; font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 46rem; }
.alist .when { font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: right; }
.alist .when small { display: block; color: var(--faint); font-size: 12px; margin-top: 4px; }
.alist .when .by { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.alist .by img { width: 24px; height: 24px; }
.alist a.row { transition: background 0.2s ease; }
.alist a.row:hover .t { text-decoration: underline; text-decoration-color: var(--lamp); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.alist .row.soon .t { color: #3b4139; }
.alist .row.soon .when { color: var(--lamp-ink); }
@media (max-width: 760px) { .alist .row { grid-template-columns: 1fr; } .alist .when { text-align: left; } .alist .when .by { justify-content: flex-start; } }

/* ── footer ── */
.ft { background: var(--ink); color: rgba(238, 240, 234, 0.55); padding: 40px var(--pad) 48px; font-size: 13px; border-top: 1px solid var(--line-d); }
.ft-c { max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px 40px; }
.ft-a { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ft-a img { height: 22px; width: auto; }
.ft-b { display: flex; gap: 26px; flex-wrap: wrap; }
.ft-b a { text-decoration: none; color: rgba(238, 240, 234, 0.65); }
.ft-b a:hover { color: var(--fg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .tl::after { transition: none; } }
