/* Self-hosted fonts (SIL Open Font License, see fonts/LICENSE.txt). No requests leave this site. */
@font-face { font-family: "Geist"; src: url("fonts/geist-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ── tokens ───────────────────────────────────────────────────────────────
   The materials of German paperwork: grey office paper (Umweltpapier),
   black ink, highlighter yellow, and the violet-blue ink of an official
   stamp, which is the one brand colour. Type scale: 1.25.                 */
:root {
  --paper: #e4e2dc;
  --ink: #15171a;
  --soft: #4d4f52;
  --line: rgba(21, 23, 26, .18);
  --yellow: #f6e14b;         /* highlighter */
  --stamp: #3341b5;          /* stamp ink: the brand colour */
  --doc: #f3f2ee;            /* the page inside the composition */

  --s-1: .8rem; --s0: 1rem; --s1: 1.25rem; --s2: 1.563rem; --s3: 1.953rem; --s4: 2.441rem;
  --sp1: .5rem; --sp2: 1rem; --sp3: 1.5rem; --sp4: 2.5rem; --sp5: 4rem; --sp6: 6.5rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17181b;
    --ink: #e4e2dc;
    --soft: #a4a6aa;
    --line: rgba(228, 226, 220, .18);
    --stamp: #8d99ff;
    --doc: #24262a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--s0)/1.55 "Geist", system-ui, sans-serif;
  font-variant-numeric: oldstyle-nums proportional-nums;
}
::selection { background: var(--yellow); color: #15171a; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
html[data-lang="en"] .de, html[data-lang="de"] .en { display: none !important; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* one link style everywhere: a thin underline that darkens on hover */
.link, .t, .elsewhere a, .back {
  text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .22em;
  text-decoration-skip-ink: auto; text-decoration-color: var(--line);
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
.link:hover, .t:hover, .elsewhere a:hover, .back:hover { color: var(--stamp); text-decoration-color: currentColor; }
@media (prefers-reduced-motion: reduce) { .link, .t, .elsewhere a, .back { transition: none; } }

/* ── one grid for the whole site ──────────────────────────────────────────
   Every block lines up on the same named lines: a label column, a text
   column, and an aside.                                                    */
.grid {
  display: grid; column-gap: var(--sp4);
  grid-template-columns: [full-start] minmax(20px, 1fr) [label-start] 11rem [label-end text-start] minmax(0, 40rem) [text-end aside-start] minmax(0, 15rem) [aside-end] minmax(20px, 1fr) [full-end];
}
.grid > * { grid-column: label-start / aside-end; }
@media (max-width: 959px) {
  .grid { column-gap: 0; grid-template-columns: [full-start] 20px [label-start text-start aside-start] minmax(0, 1fr) [label-end text-end aside-end] 20px [full-end]; }
}

/* ── header ── */
.site-head { padding: var(--sp3) 0; }
.site-head .row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp2); }
.byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem var(--sp2); }
.who { margin: 0; font: 600 var(--s0)/1.2 "Geist", sans-serif; letter-spacing: -.01em; }
.who a { text-decoration: none; }
.role { font-size: var(--s-1); color: var(--soft); }
.langs { display: flex; align-items: center; font: 500 var(--s-1)/1 "Geist", sans-serif; color: var(--soft); }
.langs .sep { opacity: .5; }
.langs button { font: inherit; border: 0; background: none; color: var(--soft); min-height: 40px; padding: .4rem .4rem; cursor: pointer; }
.langs button:hover { color: var(--ink); }
.langs button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .4em; }

/* ── intro beside the composition ── */
.intro { padding: var(--sp5) 0 var(--sp4); border-bottom: 1px solid var(--line); align-items: end; }
.intro .text { grid-column: text-start / text-end; }
.intro .comp { grid-column: aside-start / aside-end; align-self: end; }
.lede { margin: 0; max-width: 17em; font: 600 clamp(var(--s3), 3.6vw, var(--s4))/1.12 "Geist", sans-serif; letter-spacing: -.03em; text-wrap: balance; }
.sub { margin: var(--sp3) 0 0; max-width: 34rem; font: 400 var(--s1)/1.5 "Newsreader", Georgia, serif; font-optical-sizing: auto; color: var(--soft); text-wrap: pretty; }
.comp { width: 100%; max-width: 15rem; height: auto; display: block; }
@media (max-width: 959px) {
  .intro { padding-top: var(--sp4); row-gap: var(--sp4); }
  .intro .comp { grid-row: 2; max-width: 120px; }
}

/* ── work ── */
.work { padding: var(--sp4) 0 var(--sp5); row-gap: var(--sp3); }
.work h2 { grid-column: label-start / label-end; margin: 0; padding-top: 1.35rem; font: 600 var(--s0)/1.3 "Geist", sans-serif; letter-spacing: -.01em; }
.list { grid-column: text-start / aside-end; list-style: none; margin: 0; padding: 0; }
@media (min-width: 960px) { .list { grid-column: text-start / text-end; } }
.list li { padding: var(--sp3) 0 var(--sp4); border-bottom: 1px solid var(--line); }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp3); }
.kind { margin: 0 0 .35rem; font-size: var(--s-1); color: var(--soft); }
.t { font: 600 var(--s1)/1.3 "Geist", sans-serif; letter-spacing: -.015em; text-wrap: balance; }
.yr { flex-shrink: 0; font-size: var(--s-1); color: var(--soft); font-variant-numeric: tabular-nums lining-nums; }
.d { margin: .5rem 0 0; max-width: 62ch; font: 400 1.125rem/1.55 "Newsreader", Georgia, serif; font-optical-sizing: auto; text-wrap: pretty; hanging-punctuation: first; }
html[data-lang="de"] .d { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 6 3 3; }
.meta { margin: .6rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sp3); font-size: var(--s-1); }
.meta a { display: inline-block; padding: .55rem 0; }
.tools { color: var(--soft); }
@media (max-width: 599px) { .tools { flex-basis: 100%; } }

/* ── project pages ── */
.back { display: inline-block; padding: .55rem 0; font-size: var(--s-1); color: var(--soft); }
.article { padding: var(--sp4) 0 var(--sp5); row-gap: var(--sp4); }
.article > * { grid-column: text-start / text-end; }
.article .side { grid-column: label-start / label-end; font-size: var(--s-1); color: var(--soft); }
@media (max-width: 959px) { .article .side { grid-column: text-start / text-end; } }
.article h1 { margin: 0; font: 600 clamp(var(--s3), 3.6vw, var(--s4))/1.1 "Geist", sans-serif; letter-spacing: -.03em; text-wrap: balance; }
.article h2 { margin: var(--sp4) 0 var(--sp1); font: 600 var(--s1)/1.3 "Geist", sans-serif; letter-spacing: -.015em; }
.prose p, .prose li { font: 400 1.125rem/1.6 "Newsreader", Georgia, serif; font-optical-sizing: auto; text-wrap: pretty; hanging-punctuation: first; }
.prose p { margin: 0 0 var(--sp2); max-width: 62ch; }
.prose ul { margin: 0 0 var(--sp2); padding-left: 1.1em; max-width: 62ch; }
.prose li { margin-bottom: .35rem; }
.prose [lang="de"] { hyphens: auto; -webkit-hyphens: auto; }
.status { margin: var(--sp4) 0 0; padding: var(--sp3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status p { margin: 0; }
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .3rem var(--sp3); font-size: var(--s-1); }
.facts dt { color: var(--soft); }
.facts dd { margin: 0; }

/* the four steps of an answer, as a plain diagram */
.steps { list-style: none; margin: var(--sp3) 0 var(--sp2); padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--paper); padding: var(--sp2); font-size: var(--s-1); line-height: 1.45; counter-increment: step; }
.steps li::before { content: counter(step); display: block; margin-bottom: .4rem; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.steps li:nth-child(3)::before { color: var(--stamp); }

/* ── footer ── */
.site-foot { padding: 0 0 var(--sp5); }
.site-foot .row { padding-top: var(--sp3); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem var(--sp3); font-size: var(--s-1); color: var(--soft); }
@media (min-width: 960px) { .site-foot .row { grid-column: text-start / aside-end; } }
.elsewhere { display: flex; flex-wrap: wrap; gap: 0 var(--sp3); }
.elsewhere a { display: inline-block; padding: .55rem 0; color: var(--ink); }

/* ── composition: an abstract document page ──────────────────────────────
   Highlighted passage (yellow, printed slightly off-register), an official
   stamp (stamp blue), and redaction bars (black). Colours follow the scheme. */
.comp .page { fill: var(--doc); }
.comp .txt { fill: var(--soft); opacity: .35; }
.comp .hl { fill: var(--yellow); }
.comp .redact { fill: var(--ink); }
.comp .stamp { fill: none; stroke: var(--stamp); }
.comp .stamp-dot { fill: var(--stamp); }

/* ── print: plain, with link addresses ── */
@media print {
  :root { --paper: #fff; --ink: #000; --soft: #333; --line: #bbb; }
  .langs, .comp, .site-foot .elsewhere { display: none !important; }
  .intro, .work, .article { padding-top: 1rem; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #333; word-break: break-all; }
  .list li, .steps li { break-inside: avoid; }
}

/* project pages: the side facts sit beside the article on wide screens */
@media (min-width: 960px) { .article .side { grid-row: 1 / span 8; align-self: start; } }

/* 404 */
.lost { padding: var(--sp6) 0; }
.lost h1 { grid-column: text-start / text-end; margin: 0 0 var(--sp2); font: 600 var(--s3)/1.2 "Geist", sans-serif; letter-spacing: -.02em; }
.lost p { grid-column: text-start / text-end; margin: 0 0 var(--sp2); font: 400 var(--s1)/1.5 "Newsreader", Georgia, serif; color: var(--soft); letter-spacing: 0; }
.steps li { margin: 0; }
.prose > h2:first-child { margin-top: 0; }

/* the project status, set as a rubber stamp in stamp ink */
.stamped { margin: -1rem 0 0; }
.stamp-label { display: inline-block; padding: .35rem .75rem .3rem; border: 2px solid var(--stamp); border-radius: 4px;
               outline: 1px solid var(--stamp); outline-offset: 2px; color: var(--stamp);
               font: 700 var(--s-1)/1.2 "Geist", sans-serif; letter-spacing: .08em; text-transform: uppercase;
               transform: rotate(-3deg); transform-origin: left center; }
@media print { .stamp-label { color: #000; border-color: #000; outline-color: #000; } }

/* ═══ Current design layer: overrides the base rules above (keep it after them) ═══
   Soft surfaces instead of hairlines, a friendly reply on every link, screenshots as specimens,
   quieter metadata, and dark-mode fixes. */

/* ── fonts: Fraunces (variable: opsz, wght, SOFT) for headlines; body stays Newsreader, labels Geist ── */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ── palette: Oslo. Snow white, glacier mist, one fjord blue as the brand colour; the flag red marks only the stamp ── */
:root {
  --paper: #fbf9f5;          /* soft white */
  --doc: #f3efe8;            /* linen: soft surfaces, title bars, status, diagram cells */
  --sheet: #ffffff;          /* the page in the composition */
  --ink: #1f2430;
  --soft: #5b5750;
  --line: rgba(31, 36, 48, .14);
  --yellow: #f4c95d;         /* cloudberry highlighter */
  --stamp: #0f4c81;          /* fjord blue: links, hover washes, dots, status labels, focus */
  --wash: #fdf0cf;           /* a pale sun wash for hover and focus */
  --redact: #0b1217;         /* redaction bars stay black in both schemes */
  --flag: #ba0c2f;           /* Norwegian flag red: ONLY the stamp ring and dot (composition, sheets, favicon, share images) */
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1a22;        /* night fjord */
    --doc: #172733;
    --sheet: #1d3040;
    --ink: #f1ebe0;
    --soft: #b8ad9c;
    --line: rgba(241, 235, 224, .16);
    --yellow: #d8b94e;
    --stamp: #8fbbea;
    --wash: #1f3447;
    --redact: #0a1218;
    --flag: #e04d66;         /* 3.5:1 on the dark sheet, 4.6:1 on the dark paper */
  }
}

/* focus: a stamp-blue ring with soft corners */
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; border-radius: 6px; }

/* ── header: the language switch becomes a quiet pill ── */
.langs { gap: 0; padding: 3px; border-radius: 999px; background: rgba(31, 36, 48, .05); }
@media (prefers-color-scheme: dark) { .langs { background: rgba(241, 235, 224, .08); } }
.langs .sep { display: none; }
.langs button { min-width: 44px; min-height: 44px; padding: 0 .6rem; border-radius: 999px; text-decoration: none !important;
                transition: background-color 180ms cubic-bezier(.3, .7, .2, 1), color 180ms ease; }
.langs button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 36, 48, .08); }

/* ── intro ── */
.intro { padding: calc(var(--sp5) + 1rem) 0 var(--sp5); border-bottom: 0; }
.sub { max-width: 32rem; font-size: var(--s1); line-height: 1.55; }
@media (min-width: 960px) { .sub { font-size: 1.375rem; } }

/* the composition: a page lifted off the paper, slightly turned */
.comp .page { fill: var(--sheet); rx: 12px; filter: drop-shadow(0 1px 1px rgba(31, 36, 48, .06)) drop-shadow(0 14px 22px rgba(31, 36, 48, .14)); }
.comp .stamp { stroke: var(--flag); }
.comp .stamp-dot { fill: var(--flag); }
.comp { transform: rotate(1.5deg); overflow: visible; }
.comp .redact { fill: var(--redact); }
@media (max-width: 599px) { .intro .comp { display: none; } }
@media (min-width: 600px) and (max-width: 959px) {
  .intro { grid-template-columns: [full-start] 20px [label-start text-start] minmax(0, 1fr) [text-end aside-start] 120px [aside-end] 20px [full-end]; column-gap: 1.5rem; }
  .intro .comp { grid-row: 1; max-width: 120px; }
}

/* ── section heading: a quiet column label ── */
.work h2 { font: 500 var(--s-1)/1.3 "Geist", sans-serif; color: var(--soft); letter-spacing: 0; }

/* ── entries: space instead of hairlines, one quiet metadata line ── */
.list { border-top: 0; }
.list li { border-bottom: 0; padding: 0 0 var(--sp5); }
.kind { margin: 0 0 .3rem; }
.head { display: block; }
.t { font-size: var(--s1); }
.yr { display: none; }

/* every link replies with a soft stamp-blue wash */
.link, .t, .elsewhere a, .back {
  text-decoration-color: color-mix(in srgb, var(--stamp) 40%, transparent);
  border-radius: 6px; padding: .12em .32em; margin: -.12em -.32em;
  transition: background-color 160ms ease-out, color 160ms ease-out, text-decoration-color 160ms ease-out;
}
.link:hover, .t:hover, .elsewhere a:hover, .back:hover,
.link:focus-visible, .t:focus-visible, .elsewhere a:focus-visible, .back:focus-visible { background: var(--wash); color: var(--stamp); }
.meta { font-size: .875rem; gap: 0 1.6rem; }
.meta a { padding: .55rem .32em; }

/* ── screenshots as specimens: no padded frame, a hairline frame, numbered dots, a legend, click to zoom ── */
:root { --frame: rgba(31, 36, 48, .10); --on-stamp: #ffffff; }
@media (prefers-color-scheme: dark) { :root { --frame: rgba(241, 235, 224, .16); --on-stamp: #0e1a22; } }
.shot { position: relative; margin: var(--sp3) 0 .2rem; }
.shot .zoom { position: relative; display: block; cursor: zoom-in; text-decoration: none; }
.shot .zoom img { display: block; width: 100%; height: auto; }
.shot .zoom:focus-visible { outline-offset: -4px; border-radius: 0; } /* inset: the window clips anything outside it */

/* the window frame: a title bar (three quiet dots, a centred title) above the image. Dots are placed in
   percentages of .zoom, which holds only the image, so the bar never shifts them. */
/* a screenshot pasted onto the page: a hairline frame and a soft lifted shadow (the shadow is the window's own, so its overflow:hidden does not clip it) */
.window { overflow: hidden; border-radius: 10px; background: var(--doc);
          box-shadow: 0 0 0 1px var(--frame), 0 1px 2px rgba(31, 36, 48, .06), 0 18px 40px -14px rgba(31, 36, 48, .30); }
@media (prefers-color-scheme: dark) { .window { box-shadow: 0 0 0 1px var(--frame), 0 18px 40px -14px rgba(0, 0, 0, .6); } }
.titlebar { box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); align-items: center; column-gap: 8px;
            height: 36px; padding: 0 13px; background: var(--doc); box-shadow: inset 0 -1px 0 var(--frame); }
.lights { display: inline-flex; gap: 6px; }
.lights i { display: block; width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.lights i:nth-child(1) { background: #ee6a5f; }
.lights i:nth-child(2) { background: #f4bf4f; }
.lights i:nth-child(3) { background: #61c554; }
@media (prefers-color-scheme: dark) { .lights i { opacity: .9; } }
.wtitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font: 400 .8rem/1 "Geist", sans-serif; color: var(--soft); }
.wtitle .en, .wtitle .de { display: inline; }
@media (max-width: 599px) { .titlebar { height: 32px; padding: 0 11px; } }
.dot { position: absolute; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
       background: var(--stamp); color: var(--on-stamp); box-shadow: 0 0 0 2px var(--sheet); font: 600 .8125rem/1 "Geist", sans-serif; pointer-events: none; }
.shot .dots-list { list-style: none; margin: .7rem 0 0; padding: 0; counter-reset: dot; font: 400 .875rem/1.45 "Geist", sans-serif; color: var(--soft); }
.shot .dots-list li { position: relative; margin: 0 0 .3rem; padding: 0 0 0 1.9rem; counter-increment: dot; }
.shot .dots-list li::before { content: counter(dot); position: absolute; left: 0; top: .08em; display: grid; place-items: center; width: 1.25rem; height: 1.25rem;
                        border-radius: 50%; background: var(--stamp); color: var(--on-stamp); font: 600 .75rem/1 "Geist", sans-serif; }
@media (prefers-reduced-motion: reduce) { .link, .t, .elsewhere a, .back, .langs button { transition: none; } }

/* ── the zoom view: one native dialog per page ── */
.lightbox { box-sizing: border-box; width: auto; max-width: min(96vw, 1400px); max-height: 92vh; margin: auto; padding: 0; border: 0; border-radius: 10px;
            background: var(--sheet); color: var(--ink); overflow: auto; }
.lightbox::backdrop { background: rgba(6, 12, 16, .8); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox img { display: block; flex: none; max-width: 100%; height: auto; }
.lightbox .titlebar { position: sticky; top: 0; z-index: 1; flex: none; height: 52px; padding: 0 .5rem 0 13px; } /* taller than a thumbnail bar so the Close button keeps a 44px target */
.lightbox .close { justify-self: end; grid-column: 3; flex: none; min-width: 44px; min-height: 44px; padding: 0 1rem; border: 0; border-radius: 999px;
                   background: var(--stamp); color: var(--on-stamp); font: 600 .875rem/1 "Geist", sans-serif; cursor: pointer; }
.lightbox .close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── project pages ── */
.steps { gap: 6px; background: transparent; border: 0; }
.steps li { background: var(--doc); border-radius: 12px; }
.steps li:nth-child(3) { color: var(--stamp); }
.status { background: var(--doc); border: 0; border-radius: 14px; padding: var(--sp3); }
.stamped { margin: -1.2rem 0 0; }
.stamp-label { outline: 0; border-radius: 4px; text-transform: none; letter-spacing: .04em; font-weight: 650; transform: rotate(-2deg); }

/* ── footer: space instead of a rule ── */
.site-foot { padding-top: var(--sp4); }
.site-foot .row { border-top: 0; padding-top: 0; }

/* ── one gentle moment: the stamp lands, once per visit ── */
@keyframes stamp-land {
  0%   { opacity: 0; transform: scale(1.3) rotate(-7deg); }
  60%  { opacity: 1; transform: scale(.97) rotate(.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes stamp-label-land {
  0%   { opacity: 0; transform: scale(1.3) rotate(-9deg); }
  60%  { opacity: 1; transform: scale(.97) rotate(-1.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(-2deg); }
}
.comp .stamp-group { transform-box: fill-box; transform-origin: center; animation: stamp-land 480ms cubic-bezier(.2, .8, .2, 1) 300ms both; }
.stamped .stamp-label { animation: stamp-label-land 480ms cubic-bezier(.2, .8, .2, 1) 250ms both; }
@media (prefers-reduced-motion: reduce) { .comp .stamp-group, .stamped .stamp-label { animation: none; } }

/* ── headlines: Fraunces, soft. Wider and darker than Newsreader, so sizes are a step smaller. ── */
.lede, .list .t, .article h1, .article h2, .lost h1 {
  font-family: "Fraunces", "Newsreader", Georgia, serif; font-weight: 420; font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50; letter-spacing: -.02em; text-wrap: balance;
}
.lede { font-size: clamp(1.6rem, 2.9vw, 2.15rem); line-height: 1.15; max-width: 16em; }
.article h1 { font-size: clamp(2.1rem, 4vw, 2.8rem); line-height: 1.08; }
.lost h1 { font-size: clamp(2.1rem, 4vw, 2.8rem); line-height: 1.08; }
.article h2 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -.015em; }

/* ── round 3: the work is the hero ── */
.list .t { font-size: 1.75rem; line-height: 1.15; }
@media (max-width: 599px) { .list .t { font-size: 1.45rem; } }

/* each entry gets a small sheet in the language of the big composition.
   The four sheets are defined once, as <symbol>s in a hidden <svg class="sym"> at the top of each page,
   and drawn with <use> at three sizes: small (this list), large (project-page hero mark), share image. */
.entry { min-width: 0; }
.sheet { display: block; width: 48px; height: 60px; margin: 0 0 .75rem; overflow: visible; }
@media (min-width: 600px) {
  .list > li { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 1.25rem; align-items: start; }
  .sheet { width: 64px; height: 80px; margin: .1rem 0 0; }
}

/* The hidden sprite. A <use> clone does not pick up page stylesheet rules (rules written against the
   symbol's classes are ignored in current Chrome), so each shape in the <symbol>s carries an inline style that
   reads the page's variables (--sheet, --soft, --yellow, --redact, --stamp, ...). Variables inherit into the
   clone, so light and dark mode follow, and so do the motion variables set on the .sheet <svg> below. */
.sym { position: absolute; width: 0; height: 0; overflow: hidden; }
.sym symbol { overflow: visible; }

/* the large mark on a project page: beside the title on wide screens, above it on phones */
.article > .hero-sheet { width: 96px; height: 120px; margin: 0 0 calc(-1 * var(--sp3)); }
@media (min-width: 960px) {
  .article > .hero-sheet { grid-column: aside-start / aside-end; grid-row: 1 / span 3; align-self: start; justify-self: start;
                           width: 180px; height: 225px; margin: .15rem 0 0; }
}

/* Motion on the sheets: three one-shot moves, each when its sheet first scrolls into view (script adds .in).
   The hidden start state exists only when script runs AND reduced motion is not requested; otherwise,
   and in print, every sheet is simply drawn in its final state. The moves run on registered custom
   properties set on the <svg>, which the <use> clones inherit. */
@property --hl-p { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --r1-p { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --r2-p { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --st-o { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --st-s { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --st-r { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@keyframes sheet-stamp {
  0%   { --st-o: 0; --st-s: 1.3; --st-r: -7deg; }
  60%  { --st-o: 1; --st-s: .97; --st-r: .5deg; }
  100% { --st-o: 1; --st-s: 1; --st-r: 0deg; }
}
@media (prefers-reduced-motion: no-preference) {
  html.js .sheet:not(.in) { --hl-p: 0; --r1-p: 0; --r2-p: 0; --st-o: 0; }
  html.js .sheet {
    transition: --hl-p 500ms cubic-bezier(.2, .8, .2, 1),
                --r1-p 400ms cubic-bezier(.2, .8, .2, 1),
                --r2-p 400ms cubic-bezier(.2, .8, .2, 1) 80ms;
  }
  html.js .sheet.in { animation: sheet-stamp 480ms cubic-bezier(.2, .8, .2, 1) 120ms both; }
}
@media print {
  html.js .sheet, html.js .sheet:not(.in) { --hl-p: 1; --r1-p: 1; --r2-p: 1; --st-o: 1; --st-s: 1; --st-r: 0deg; transition: none; animation: none; }
}

/* ── "what the model sees": a pill like the language switch ── */
.views.js .seg + .panels { margin-top: .75rem; }
.views.js .panels { display: grid; }
.views.js .panels > * { grid-area: 1 / 1; min-width: 0; }
.views.js .panels > [hidden] { display: block !important; visibility: hidden; }
.seg { display: inline-flex; max-width: 100%; margin: var(--sp3) 0 0; padding: 3px; border-radius: 999px; background: rgba(31, 36, 48, .05);
       font: 500 var(--s-1)/1.25 "Geist", sans-serif; }
@media (prefers-color-scheme: dark) { .seg { background: rgba(241, 235, 224, .08); } }
.seg button { flex: 0 1 auto; min-width: 0; min-height: 44px; padding: .3rem .9rem; border: 0; border-radius: 999px; background: none;
              font: inherit; color: var(--soft); cursor: pointer; text-align: center;
              transition: background-color 180ms cubic-bezier(.3, .7, .2, 1), color 180ms ease; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 36, 48, .08); }
/* the stream view: a soft panel with the same 16:10 shape as the screenshot (it grows only if the words need more room) */
.stream-body { box-sizing: border-box; aspect-ratio: 16 / 10; padding: 2rem 3rem; background: var(--doc); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.stream-body p { margin: 0; max-width: 34rem; }
.stream-note { font: 500 .95rem/1.45 "Geist", sans-serif; color: var(--ink); }
.stream-line { font: 400 1.0625rem/1.5 "Newsreader", Georgia, serif; color: var(--soft); }
.list .chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.list .chips li { padding: .2rem .55rem; border-radius: 6px; background: var(--sheet); color: var(--ink);
                  font: 400 .8rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; box-shadow: 0 0 0 1px var(--line); }

/* on phones the same words are set tighter, so the panel keeps the screenshot's height (checked at 375px, EN and DE) */
@media (max-width: 599px) {
  .stream-body { padding: .6rem .75rem; gap: .4rem; }
  .stream-note { font-size: .8125rem; line-height: 1.35; }
  .stream-line { font-size: .8125rem; line-height: 1.35; }
  .list .chips { gap: .25rem; }
  .list .chips li { padding: .05rem .4rem; font-size: .7rem; line-height: 1.3; }
}
@media (max-width: 359px) {
  .stream-body { padding: .45rem .6rem; gap: .3rem; }
  .stream-note, .stream-line { font-size: .75rem; line-height: 1.3; }
  .list .chips li { padding: 0 .3rem; }
}

/* ── citation peek on the Not a Lawyer page ── */
.peek { margin: var(--sp3) 0 var(--sp4); padding: var(--sp3); background: var(--doc); border-radius: 14px; }
@media (max-width: 599px) { .peek { padding: var(--sp2); } }
.peek-label { display: block; margin: 0 0 .75rem; font: 500 var(--s-1)/1.3 "Geist", sans-serif; color: var(--soft); }
.prose .peek-q { margin: 0 0 .4rem; font: 600 1rem/1.4 "Geist", sans-serif; }
.prose .peek-a { margin: 0 0 .9rem; }
.cite summary { display: inline-flex; align-items: center; gap: .45em; padding: .3rem .75rem; border: 1.5px solid var(--stamp); border-radius: 999px;
                color: var(--stamp); font: 600 .85rem/1.3 "Geist", sans-serif; cursor: pointer; list-style: none;
                transition: background-color 160ms ease-out; }
.cite summary::-webkit-details-marker { display: none; }
.cite summary::after { content: ""; width: .4em; height: .4em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
                       transform: translateY(-.1em) rotate(45deg); transition: transform 160ms ease-out; }
.cite[open] summary::after { transform: translateY(.1em) rotate(-135deg); }
.cite summary:hover { background: var(--wash); }
.law { margin: 1rem 0 .9rem; }
.prose .law p, .prose .law li { margin: 0; font: 400 1.125rem/1.6 "Newsreader", Georgia, serif; }
.prose .law ul { list-style: none; margin: 0; padding: 0 0 0 1em; }
.law mark { background: var(--yellow); color: var(--ink); padding: 0 .12em; border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (prefers-color-scheme: dark) { .law mark { color: var(--redact); } }
.prose .trans-label { margin: 0 0 .2rem; font: 500 var(--s-1)/1.3 "Geist", sans-serif; color: var(--soft); }
.prose .trans { margin: 0 0 .9rem; font-size: 1rem; color: var(--soft); }
.prose .src { margin: 0; font: 400 var(--s-1)/1.45 "Geist", sans-serif; color: var(--soft); }

/* ── privacy colophon in the footer ── */
.colophon { max-width: 100%; }
.colophon summary { display: inline-block; padding: .55rem 0; cursor: pointer; }
.colophon summary:hover { color: var(--ink); }
.files { list-style: none; margin: .2rem 0 .4rem; padding: 0; font: 400 .8rem/1.6 "Geist", sans-serif; color: var(--soft);
         font-variant-numeric: tabular-nums lining-nums; }
.files .file { color: var(--soft); overflow-wrap: anywhere; }
.files-none { margin: .2rem 0 .4rem; font: 400 .8rem/1.6 "Geist", sans-serif; color: var(--soft); }
@media (prefers-reduced-motion: reduce) { .seg button, .cite summary, .cite summary::after { transition: none; } }

/* ── plain-language pass: lead line, picture captions, "made with" disclosure ── */
.article .lead { margin: calc(-1 * var(--sp2)) 0 0; max-width: 36rem; font: 400 1.25rem/1.5 "Newsreader", Georgia, serif; font-optical-sizing: auto; color: var(--ink); text-wrap: pretty; }
.shot .looking { margin: 0 0 .6rem; max-width: 40rem; font: 400 .875rem/1.45 "Geist", sans-serif; color: var(--soft); }
.shot .dots-note { margin: .5rem 0 0; font: 400 .875rem/1.45 "Geist", sans-serif; color: var(--soft); }
.made, .tech { flex-basis: 100%; margin: 0; font: 400 .8rem/1.5 "Geist", sans-serif; color: var(--soft); }
.made summary, .tech summary { display: inline-flex; align-items: center; gap: .55em; min-height: 44px; padding: 0 .32em; margin: 0 -.32em; border-radius: 6px;
                color: var(--soft); cursor: pointer; list-style: none; transition: background-color 160ms ease-out, color 160ms ease-out; }
.made summary::-webkit-details-marker, .tech summary::-webkit-details-marker { display: none; }
.made summary::before, .tech summary::before { content: ""; flex: none; width: .4em; height: .4em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
                        transform: rotate(-45deg); transition: transform 160ms ease-out; }
.made[open] summary::before, .tech[open] summary::before { transform: rotate(45deg); }
.made summary:hover, .tech summary:hover { color: var(--ink); background: var(--wash); }
.made summary:focus-visible, .tech summary:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }
.made-list { margin: 0 0 .4rem; padding: 0 0 0 1.1em; color: var(--soft); }
@media (prefers-reduced-motion: reduce) { .made summary, .made summary::before, .tech summary::before { transition: none; } }

/* long fact labels ("Made with (for programmers)") need room: the facts stack, label above value */
.facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
.facts dt { margin-top: .7rem; }
.facts dt:first-child { margin-top: 0; }
.facts dt, .facts dd { overflow-wrap: break-word; }

/* ── mom-test pass 2: technical-details disclosure, privacy lines, title gloss ── */
.tech { margin: var(--sp2) 0 var(--sp3); }
.tech-body { padding: .3rem 0 0 1.1em; }
.tech-body > :last-child { margin-bottom: 0; }
.priv { display: block; font: 400 .8125rem/1.45 "Geist", sans-serif; color: var(--soft); }
.try { margin: 0; }
.meta .try { display: flex; flex-direction: column; align-items: flex-start; }
.meta .try .priv { margin: -.25rem 0 .4rem .32em; }
.article > .try { margin: calc(-1 * var(--sp2)) 0 0; }
.article > .try .link { display: inline-block; padding: .55rem .32em; font: 500 1rem/1.3 "Geist", sans-serif; }
.article > .try .priv { margin: -.2rem 0 0 .32em; }
.facts .priv { margin-top: .1rem; }
.tgloss { display: block; margin: .15rem 0 0; font: 400 .875rem/1.45 "Geist", sans-serif; color: var(--soft); }

/* ── before / after picture: two small windows with an arrow between ── */
/* Stacked at every width: side by side, the second crop (a wide line of text) shrank to unreadable type. */
.ba .ba-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; justify-items: start; }
.ba .ba-item { min-width: 0; width: 100%; max-width: 38rem; }
.ba .ba-label { margin: 0 0 .45rem; font: 600 .875rem/1.3 "Geist", sans-serif; color: var(--ink); }
.ba .zoom .hl { position: absolute; background: var(--yellow); opacity: .55; border-radius: 3px; pointer-events: none; }
.ba .ba-arrow { display: grid; place-items: center; width: 2rem; height: 2rem; margin: .2rem 0 .2rem 1rem; border-radius: 50%; background: var(--doc); color: var(--stamp); font: 600 1.1rem/1 "Geist", sans-serif; }
.ba .ba-arrow::before { content: "↓"; }
.ba .ba-cap { margin: .8rem 0 0; max-width: 40rem; font: 400 .875rem/1.45 "Geist", sans-serif; color: var(--soft); }
.ba .ba-more { margin: .2rem 0 0; }
.ba .ba-more .zoom { display: inline-block; cursor: pointer; padding: .55rem .32em; font: 500 .875rem/1.3 "Geist", sans-serif; }

/* ── screenshots, round 4: a "desktop" plate behind a realistic Mac window, a Screenshot tag, an enlarge pill ── */
:root { --plate-a: color-mix(in srgb, var(--yellow) 26%, var(--paper)); --plate-b: color-mix(in srgb, var(--stamp) 13%, var(--paper)); --wborder: rgba(31, 36, 48, .24); }
@media (prefers-color-scheme: dark) {
  :root { --plate-a: color-mix(in srgb, var(--yellow) 9%, var(--paper)); --plate-b: color-mix(in srgb, var(--stamp) 16%, var(--paper)); --wborder: rgba(241, 235, 224, .26); }
}
.plate { position: relative; box-sizing: border-box; padding: clamp(24px, 5vw, 48px); border-radius: 16px; background: linear-gradient(135deg, var(--plate-a), var(--plate-b)); }
.plate .tag { position: absolute; top: .5rem; left: .9rem; font: 500 .75rem/1 "Geist", sans-serif; color: var(--soft); }
.plate .tag .en, .plate .tag .de { display: inline; }
.shot .window { border: 1px solid var(--wborder); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(31, 36, 48, .10), 0 8px 24px rgba(31, 36, 48, .12), 0 24px 60px rgba(31, 36, 48, .16); }
@media (prefers-color-scheme: dark) { .shot .window { box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .45); } }
.shot .titlebar { height: 40px; padding: 0 14px; box-shadow: inset 0 -1px 0 var(--wborder); }
@media (max-width: 599px) { .shot .titlebar { height: 40px; padding: 0 12px; } }
.shot .zoom { overflow: hidden; }
.expand { position: absolute; right: .6rem; bottom: .6rem; display: inline-flex; align-items: center; gap: .4em; padding: .35rem .65rem; border-radius: 999px;
          background: var(--sheet); color: var(--ink); box-shadow: 0 0 0 1px var(--wborder), 0 2px 8px rgba(31, 36, 48, .18);
          font: 600 .75rem/1 "Geist", sans-serif; pointer-events: none; transition: background-color 160ms ease-out; }
.expand .en, .expand .de { display: inline; }
.expand svg { flex: none; }
.shot .zoom:hover .expand { background: var(--wash); }
.shot .zoom:focus-visible { outline: 2px solid var(--stamp); outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) { .expand { transition: none; } }
.shot .looking { margin-bottom: .8rem; }
.ba .ba-item .plate { margin-top: 0; }
/* before/after: slimmer plates so the wide second crop keeps readable type; the pill sits top right so it never covers the yellow marks */
.ba .plate { padding: clamp(20px, 3vw, 28px); padding-top: clamp(26px, 3.4vw, 32px); }
.ba .ba-item { max-width: none; }
.ba .expand { bottom: auto; top: .5rem; }

/* Not a Lawyer: the screenshot is a whole Mac window with its own traffic lights, so it gets no title bar of ours.
   The window's rounded corners are transparent in the image; the shadow follows them. */
.appplate .appwin { overflow: visible; cursor: zoom-in; }
.appplate .appwin img { border-radius: 12px; filter: drop-shadow(0 1px 2px rgba(31, 36, 48, .12)) drop-shadow(0 8px 24px rgba(31, 36, 48, .14)) drop-shadow(0 24px 60px rgba(31, 36, 48, .18)); }
@media (prefers-color-scheme: dark) { .appplate .appwin img { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)) drop-shadow(0 8px 24px rgba(0, 0, 0, .4)) drop-shadow(0 24px 60px rgba(0, 0, 0, .5)); } }
.appplate .expand { bottom: auto; top: .9rem; right: 1rem; }
.appplate { padding: clamp(12px, 2.5vw, 24px); padding-top: clamp(26px, 3.4vw, 34px); }
.appplate .zoom:focus-visible { outline-offset: 6px; }
@media (max-width: 599px) {
  .appplate .dot { width: 18px; height: 18px; margin: -9px 0 0 -9px; font-size: .6875rem; }
  .appplate .expand { top: .4rem; bottom: auto; right: .4rem; padding: .25rem .5rem; font-size: .6875rem; }
}

/* homepage: the app window is capped so it does not dominate the entry (full width on phones; large on the project pages) */
@media (min-width: 600px) { .list .shot .appplate { max-width: 480px; } }

/* detail crops on the homepage: a real crop of the screenshot, hairline border, rounded corners, soft shadow; the link opens the whole window */
.zoom.crop { border-radius: 10px; box-shadow: 0 0 0 1px var(--wborder), 0 1px 2px rgba(31, 36, 48, .10), 0 8px 24px rgba(31, 36, 48, .12); background: var(--sheet); }
@media (prefers-color-scheme: dark) { .zoom.crop { box-shadow: 0 0 0 1px var(--wborder), 0 8px 24px rgba(0, 0, 0, .4); } }
.zoom.crop img { border-radius: 10px; }
.ba .ba-item .zoom.crop { display: block; }
@media (max-width: 599px) { .plate .dot { width: 18px; height: 18px; margin: -9px 0 0 -9px; font-size: .6875rem; } .plate .expand { top: .4rem; right: .4rem; padding: .25rem .5rem; font-size: .6875rem; } }
.zoom.crop .expand { top: .5rem; bottom: auto; }
/* the pill sits where the crop is empty: bottom right of the title block; beside "No tagged structure" in the page list */
.zoom.crop.see .expand { top: auto; bottom: .5rem; }
.zoom.crop.read .expand { top: 22%; }
.plate:has(> .zoom.crop) { padding: clamp(14px, 2.5vw, 22px); padding-top: clamp(28px, 3.4vw, 34px); }
@media (max-width: 599px) { .zoom.crop.see .expand { bottom: .4rem; top: auto; } .zoom.crop.read .expand { top: 20%; } }
.shot .why { margin: .5rem 0 0; max-width: 40rem; font: 400 .875rem/1.45 "Geist", sans-serif; color: var(--soft); }

/* ── accessibility pass ── */
/* project pages: DOM order = visual order. Back link first; facts after the lead. Wide screens: both sit in the side column. */
.article > .back { grid-column: text-start / text-end; justify-self: start; margin-bottom: calc(-1 * var(--sp3) - .5rem); }
@media (min-width: 960px) {
  .article > .back { grid-column: label-start / label-end; grid-row: 1; align-self: start; margin-bottom: -.5rem; }
  .article > .side { margin-top: 20px; }
}
/* homepage titles are headings; the look is unchanged */
.list .th { display: inline; margin: 0; font: inherit; letter-spacing: inherit; }
/* focus ring on screenshots: ink ring outside, paper halo inside it, readable on white screenshots and on the plate, light and dark */
.shot .zoom:focus-visible, .appplate .zoom:focus-visible, .zoom.crop:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 3px var(--sheet); border-radius: 10px; }
.appplate .appwin:focus-visible { border-radius: 12px; }
/* footer, header and back links: targets of at least 24px without moving the layout */
.elsewhere a, .who a, .back { display: inline-block; padding-block: .5rem; margin-block: -.5rem; }
/* skip link */
.skip { position: absolute; left: .75rem; top: -5rem; z-index: 30; padding: .7rem 1rem; border-radius: 8px; background: var(--ink); color: var(--paper);
        font: 600 .875rem/1.2 "Geist", sans-serif; text-decoration: none; }
.skip:focus { top: .75rem; outline: 3px solid var(--stamp); outline-offset: 3px; }
.skip .en, .skip .de { display: inline; }
main:focus { outline: 0; }
