/* V·SAG house style (2026-09, The Quiet House). ONE source of truth: design/vsag.css.
   design/stamp.py copies this file, vsag.js and fonts/ into every room's public/ folder.
   Never edit the copies. Paper by day, sky by night. One column, one left edge, one ornament.

   Order: fonts, tokens, base, shell (header / footer), prose, plates, lists, forms, sheets, print. */

/* ---------- fonts: self hosted, split by script so Greek only loads when a page has Greek ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/inter-roman-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/inter-symbols.woff2") format("woff2"); unicode-range: U+2190-2193, U+2197-2198, U+25B6, U+2715; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/inter-roman-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/inter-roman-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: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("/fonts/literata-italic-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("/fonts/literata-italic-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("/fonts/literata-italic-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: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/literata-roman-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/literata-roman-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/literata-roman-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; }

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --paper:   #faf8f3;               /* warm white, the page */
  --paper-2: #f2eee5;               /* quiet insets: fields, code */
  --ink:     #22201c;               /* soft charcoal, about 15:1 on paper */
  --ink-2:   #57524a;               /* dates, captions, standfirst, about 7:1 */
  --ink-3:   #8b857a;               /* hairline labels only, never body text */
  --rule:    rgba(34, 32, 28, .13);
  --gold:    #b37a1c;               /* ornament only: middot, underline, progress */
  --gold-ink:#7f5410;               /* gold that passes as small text, about 6:1 */
  --select:  rgba(179, 122, 28, .22);
  --error:   #a3352b;               /* form errors, about 6:1 */

  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans:  "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --text:    clamp(1.125rem, 1.03rem + .42vw, 1.25rem);   /* 18px phone to 20px desk */
  --leading: 1.72;
  --measure: calc(var(--text) * 34);                       /* about 68 characters, same on every element */
  --gutter:  clamp(1.25rem, 5vw, 2rem);
}
:root[data-theme="night"] {
  color-scheme: dark;
  --paper:   #0e1116;
  --paper-2: #161b24;
  --ink:     #e9e5dc;
  --ink-2:   #aaa598;
  --ink-3:   #716d63;
  --rule:    rgba(233, 229, 220, .14);
  --gold:    #e8b873;               /* the old house gold comes back at night */
  --gold-ink:#f0d9a8;
  --select:  rgba(232, 184, 115, .28);
  --error:   #f0a097;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="paper"]) {
    color-scheme: dark;
    --paper: #0e1116; --paper-2: #161b24; --ink: #e9e5dc; --ink-2: #aaa598; --ink-3: #716d63;
    --rule: rgba(233, 229, 220, .14); --gold: #e8b873; --gold-ink: #f0d9a8;
    --select: rgba(232, 184, 115, .28); --error: #f0a097;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: var(--text); line-height: var(--leading);
  font-optical-sizing: auto; font-kerning: normal; font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}
[hidden] { display: none !important; }
::selection { background: var(--select); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: .75rem; background: var(--paper); padding: .4rem .7rem; z-index: 10; }

/* everything sits on one column, one left edge */
.col { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* touch screens: the small links get full 44px tap targets */
@media (pointer: coarse) { .site-nav a, .words button, .site-foot a, .themebtn { padding-block: .75rem; } }

/* for headings that only screen readers need */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* showcase rooms (covers, screenshots, canvases) get a wider page; their sentences still sit in .col */
.wide { max-width: calc(70rem + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* small voice: dates, labels, navigation */
.label {
  font: 500 .8125rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); font-variant-numeric: tabular-nums; margin: 0;
}
.label .dot, .dot { color: var(--gold); }

/* ---------- shell: header ---------- */
.site-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .5rem 2rem; padding-block: clamp(1.4rem, 4vw, 2.2rem) 0; }
.wordmark { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: .09em;
  line-height: 1.2; white-space: nowrap; }
.wordmark a { text-decoration: none; color: var(--ink); }
.wordmark b { color: var(--gold); font-weight: inherit; }
.wordmark .wordmark__room { font: 500 .6875rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-2); margin-left: .65rem; }
.wordmark .wordmark__room:hover { color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font: 400 .875rem/1.4 var(--sans); }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: .3rem 0; transition: color .12s ease; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"], .words button.is-on, .words button[aria-pressed="true"] {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px; text-underline-offset: .55em; }
/* phones: no hamburger, no hidden menu. Six short words fit on one quiet row. */
@media (max-width: 30rem) {
  .site-nav { width: 100%; justify-content: space-between; gap: .25rem .8rem; font-size: .8125rem; }
  .site-nav a.is-home { display: none; }   /* the wordmark is the way home on a phone */
}

/* reading progress, the only moving thing on the page */
.progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 0; background: var(--gold); z-index: 20; }

/* ---------- entry ---------- */
.entry { padding-block: clamp(2.6rem, 8vw, 5.5rem) 0; }
.entry h1 {
  font-size: clamp(2.05rem, 1.45rem + 2.7vw, 3.05rem); line-height: 1.13; letter-spacing: -.012em;
  font-weight: 560; margin: .85rem 0 1.15rem; text-wrap: balance;
}
.standfirst { font-style: italic; font-size: 1.14em; line-height: 1.55; color: var(--ink-2);
  margin: 0 0 2.7rem; text-wrap: pretty; }

.prose p { margin: 0 0 1.45em; text-wrap: pretty; hanging-punctuation: first; }
.prose a { text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: .075em; text-underline-offset: .22em; transition: text-decoration-thickness .12s ease; }
.prose a:hover { text-decoration-thickness: .15em; }
.prose h2 { font-size: 1.35em; line-height: 1.25; font-weight: 600; margin: 2.4em 0 .7em; }
.prose blockquote { margin: 2em 0; padding-left: 1.2em; border-left: 2px solid var(--gold);
  font-style: italic; color: var(--ink-2); }
.prose hr, .break { border: 0; text-align: center; margin: 2.6em 0; color: var(--gold); letter-spacing: .9em; }
.prose hr::before, .break::before { content: "\00B7\00B7\00B7"; }

/* photographs: plates tipped into the notebook. No corners, no shadows, no frames. */
.plate { margin: 2.9em 0; }
.plate img { width: 100%; border-radius: 2px; background: var(--paper-2); }
.plate figcaption { font: 400 .8125rem/1.5 var(--sans); color: var(--ink-2); margin-top: .7rem; }
@media (min-width: 62rem) { .plate { margin-inline: -5rem; } .plate figcaption { padding-inline: 5rem; } }

.endmark { text-align: center; color: var(--gold); font-size: 1.9em; line-height: 1; margin: 3rem 0 0; }

/* earlier / later */
.turn { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3.2rem; padding-top: 1.8rem;
  border-top: 1px solid var(--rule); }
.turn a { text-decoration: none; display: block; }
.turn a b { display: block; font-weight: 500; font-size: 1.02em; line-height: 1.35; margin-top: .35rem; }
.turn a:hover b { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .2em; }
.turn .next { text-align: right; }

/* the one book mention that replaces the sticky banner */
.aside-book { display: flex; gap: 1.1rem; align-items: center; margin-top: 3rem; padding: 1.4rem 0;
  border-block: 1px solid var(--rule); text-decoration: none; }
.aside-book img { width: 52px; border-radius: 2px; flex: none; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.aside-book b { font-weight: 600; }
.aside-book span { display: block; }
.aside-book .go { font: 500 .875rem/1.4 var(--sans); color: var(--gold-ink); margin-top: .2rem; }
.aside-book p { margin: 0; line-height: 1.45; }

/* by email */
.letter { margin-top: 3rem; }
.letter p:not(.label) { margin: .5rem 0 1rem; color: var(--ink-2); font-size: .95em; line-height: 1.55; }
.letter form { display: flex; gap: .6rem; flex-wrap: wrap; }
.letter input { flex: 1 1 14rem; font: 400 1rem/1.2 var(--sans); color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 3px; padding: .8rem .9rem; }
.letter button { font: 600 .9375rem/1.2 var(--sans); color: var(--paper); background: var(--ink);
  border: 0; border-radius: 3px; padding: .8rem 1.3rem; cursor: pointer; }
.letter button:hover { background: var(--gold-ink); }

/* ---------- home ---------- */
.hello { padding-block: clamp(2.8rem, 8vw, 5.5rem) 0; }
.hello img { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 1.5rem; }
.hello h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.3rem); line-height: 1.08; letter-spacing: -.015em;
  font-weight: 560; margin: 0 0 1rem; text-wrap: balance; }
.hello p { margin: 0; font-size: 1.08em; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

.block { margin-top: clamp(3rem, 8vw, 4.6rem); }
.block > .label { padding-bottom: .8rem; border-bottom: 1px solid var(--rule); }

.latest h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.1rem); line-height: 1.18; letter-spacing: -.01em;
  font-weight: 560; margin: 1.3rem 0 .7rem; text-wrap: balance; }
.latest h2 a { text-decoration: none; }
.latest h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: .06em; text-underline-offset: .18em; }
.latest p { margin: 0 0 1rem; }
.more { font: 500 .9375rem/1.4 var(--sans); color: var(--gold-ink); text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: .22em; }

/* the ledger: a life as a table of contents */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { border-bottom: 1px solid var(--rule); }
.ledger a { display: grid; grid-template-columns: 7.4em 1fr; gap: 1rem; align-items: baseline;
  padding: .82rem 0; text-decoration: none; }
.ledger time { font: 400 .8125rem/1.4 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums;
  letter-spacing: .02em; }
.ledger span { font-size: 1.04em; line-height: 1.35; }
.ledger a:hover span { text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: .07em; text-underline-offset: .2em; }
.ledger + .more { display: inline-block; margin-top: 1.2rem; }
@media (max-width: 30rem) { .ledger a { grid-template-columns: 1fr; gap: .1rem; } }

.booklist { list-style: none; margin: 0; padding: 0; }
.booklist li { border-bottom: 1px solid var(--rule); }
.booklist a { display: grid; grid-template-columns: 46px 1fr; gap: 1.1rem; align-items: center;
  padding: 1rem 0; text-decoration: none; }
.booklist img { width: 46px; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.booklist b { font-weight: 600; display: block; line-height: 1.3; }
.booklist i { display: block; font-style: normal; color: var(--ink-2); font-size: .92em; line-height: 1.45; }
.booklist em { font: 500 .75rem/1.4 var(--sans); font-style: normal; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold-ink); }
.booklist a:hover b { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .2em; }

/* ---------- page heads (biography, portfolio, archive, room fronts) ---------- */
.pagehead { padding-block: clamp(2.8rem, 8vw, 5.5rem) 0; }
.pagehead h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.3rem); line-height: 1.08; letter-spacing: -.015em;
  font-weight: 560; margin: .8rem 0 1rem; text-wrap: balance; }
.pagehead .lede { margin: 0; font-size: 1.08em; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }

/* the works: a bibliography, not a card grid */
.works { list-style: none; margin: 0; padding: 0; }
.works li { border-bottom: 1px solid var(--rule); }
.works a, .works .row { display: grid; grid-template-columns: 4.2em 1fr auto; gap: .3rem 1rem; align-items: baseline;
  padding: .95rem 0; text-decoration: none; }
.works .y { font: 400 .8125rem/1.4 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.works b { font-weight: 600; display: block; line-height: 1.3; }
.works i { display: block; font-style: normal; color: var(--ink-2); font-size: .92em; line-height: 1.45; margin-top: .15rem; }
.works em { font: 500 .75rem/1.4 var(--sans); font-style: normal; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold-ink); white-space: nowrap; }
.works a:hover b { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .2em; }
@media (max-width: 34rem) { .works a, .works .row { grid-template-columns: 3.2em 1fr; } .works em { grid-column: 2; } }

.works--plain a, .works--plain .row { grid-template-columns: 1fr auto; }
@media (max-width: 34rem) { .works--plain a, .works--plain .row { grid-template-columns: 1fr; } .works--plain em { grid-column: 1; } }

/* at a glance: a plain definition list */
.facts { display: grid; grid-template-columns: 7.5em 1fr; margin: 0; }
.facts dt, .facts dd { margin: 0; padding: .72rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font: 500 .8125rem/2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }

/* a portrait sits inside the column, modest, never wider than the text */
.plate--inset { margin: 2.4rem 0 2.6rem; max-width: 24rem; }
@media (min-width: 62rem) { .plate--inset { margin-inline: 0; } }
.plate--inset img { aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 38%; }

/* leftover photographs at the foot of an entry */
.entry .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.entry .gallery a { display: block; }
.entry .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; background: var(--paper-2); }

/* ---------- buttons, fields, word filters, sheets ---------- */
.btn { display: inline-block; font: 600 .9375rem/1.2 var(--sans); color: var(--paper); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 3px; padding: .8rem 1.3rem; text-decoration: none; cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
.btn:hover { background: var(--gold-ink); border-color: var(--gold-ink); }
.btn--quiet { color: var(--ink); background: transparent; border-color: var(--ink-3); }
.btn--quiet:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.field { font: 400 1rem/1.2 var(--sans); color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 3px; padding: .8rem .9rem; width: 100%; }
.field::placeholder { color: var(--ink-3); }
.field[aria-invalid="true"] { border-color: var(--error); }

/* filters are words, not chips */
.words { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font: 400 .875rem/1.4 var(--sans); }
.words button { font: inherit; color: var(--ink-2); background: none; border: 0; padding: .3rem 0; cursor: pointer; }
.words button:hover { color: var(--ink); }

/* a sheet: the one overlay pattern (contents, gates, settings) */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1.25rem;
  background: rgba(20, 18, 14, .45); }
.sheet[hidden] { display: none; }
.sheet__card { position: relative; width: 100%; max-width: 30rem; max-height: 86vh; overflow: auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 4px;
  padding: clamp(1.4rem, 4vw, 2rem); box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.sheet__close { position: absolute; top: .7rem; right: .8rem; font: 400 1.4rem/1 var(--sans); color: var(--ink-2);
  background: none; border: 0; cursor: pointer; padding: .3rem .5rem; }
.sheet__close:hover { color: var(--ink); }

/* a dark window into space: canvases keep their night sky inside a paper page */
.window { --w-ink: #e9e5dc; --w-ink-2: #aaa598; --w-rule: rgba(233, 229, 220, .16); --w-gold: #e8b873;
  background: #0b0e14; background-clip: padding-box; color: var(--w-ink); border: 1px solid var(--rule);
  border-radius: 4px; overflow: hidden; }

/* ---------- shell: footer ---------- */
.site-foot { margin-top: clamp(4rem, 10vw, 6rem); }
.site-foot > div { padding-block: 1.8rem 3rem; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem;
  font: 400 .8125rem/1.6 var(--sans); color: var(--ink-2); }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.site-foot nav { display: flex; gap: 1.1rem; }
.themebtn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.themebtn:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .site-head, .site-foot, .turn, .letter, .aside-book, .progress { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .plate { margin-inline: 0; break-inside: avoid; }
}
