/* Andy Stone. One plain personal page. System fonts, no external assets, no JS.
   Palette: one ink, one linen paper (warm, slightly rose), one accent (oxblood), one support tint. Contrast pairs are computed in qa/check.mjs.
   Two weights: 400 and 700. One centred column, like a page in a notebook; headings are regular-weight serif, labels are small sans. */

:root {
  --paper: #f9f2ec;
  --paper-2: #efe2d8;
  --ink: #2a2220;
  --ink-2: #5c4e48;
  --rule: #dccbbf;
  --rule-strong: #8a7468;
  --accent: #7a2e22;
  --accent-ink: #f9f2ec;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --col: 40rem;
  --gut: clamp(1.125rem, 5vw, 2rem);
  --tap: 2.75rem; /* 44px */
  --section: clamp(2.75rem, 2rem + 3vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 clamp(1.0625rem, 1rem + .25vw, 1.125rem)/1.65 var(--sans);
  overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
p, ul, ol, dl { margin: 0 0 1rem; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .75rem; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.75rem + 3.5vw, 3.75rem); letter-spacing: -.015em; text-align: center; }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); font-style: italic; }
strong { font-weight: 700; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: .5rem; top: -4rem; z-index: 2; background: var(--ink); color: var(--paper); padding: .75rem 1rem; }
.skip:focus { top: .5rem; }

/* one centred column */
.top, main, .foot { max-width: calc(min(var(--col), var(--measure)) + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }
.staging { margin: 0; padding: .5rem var(--gut); font-size: .875rem; color: var(--ink); text-align: center; border-bottom: 1px dashed var(--rule-strong); }

.top { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding-top: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--rule); }
.me { font-family: var(--serif); font-size: 1.125rem; letter-spacing: .04em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.top ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.top li a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); padding: 0 .75rem; font-size: .9375rem; }

main section, main article { padding-top: var(--section); }
main > section:first-child, main > article:first-child { padding-top: clamp(1.75rem, 1rem + 3vw, 3.5rem); }
main > :last-child { padding-bottom: var(--section); }

.intro { text-align: center; }
.lede { font-size: clamp(1.1875rem, 1.1rem + .5vw, 1.3125rem); line-height: 1.5; }
.aside, .updated, .src, .note, .later { color: var(--ink-2); font-size: .9375rem; }
.draft-tag {
  display: inline-block; vertical-align: .1em; margin-left: .25rem;
  font: 400 .8125rem/1.5 var(--sans); letter-spacing: .03em; text-transform: lowercase; font-style: normal;
  color: var(--ink); background: var(--paper-2); border: 1px dashed var(--rule-strong); border-radius: 999px; padding: 0 .55rem;
  white-space: nowrap;
}

/* the one action: a real button */
.jump {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .625rem 1.5rem;
  font-weight: 700; color: var(--accent-ink); background: var(--accent); border: 2px solid var(--accent); border-radius: 6px; text-decoration: none;
}
.jump:hover { background: var(--paper); color: var(--accent); }
.intro p:has(.jump) { margin: 1.5rem 0 1.25rem; }
@media (max-width: 30rem) { .jump { display: flex; width: 100%; } }

/* the site list: compact name / status line, what it is underneath */
.sites { margin: 1.25rem 0 1rem; }
.site { padding: .75rem 0 .5rem; border-bottom: 1px dotted var(--rule-strong); display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: baseline; }
.site:first-child { border-top: 1px dotted var(--rule-strong); }
.site dt { font-family: var(--serif); font-weight: 700; font-size: 1.1875rem; }
.site dd { margin: 0; }
.site .status { justify-self: end; text-align: right; color: var(--ink-2); font-size: .9375rem; }
.site .what { grid-column: 1 / -1; margin-top: -.25rem; }
.status a, .status .off { display: inline-flex; align-items: center; min-height: var(--tap); }
@media (max-width: 26rem) { .site { grid-template-columns: 1fr; } .site .status { justify-self: start; text-align: left; } .site .what { margin-top: 0; } }

.x { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.x a { display: inline-flex; align-items: center; min-height: var(--tap); }

.out { display: inline-flex; align-items: center; min-height: var(--tap); }

.doc h2 { margin-top: 2rem; font-size: clamp(1.25rem, 1.15rem + .5vw, 1.5rem); }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: .5rem; }
.draft-head { display: inline-block; font-weight: 700; color: var(--ink); background: var(--paper-2); border: 1px dashed var(--rule-strong); border-radius: 6px; padding: .25rem .75rem; }

.foot { padding-bottom: 2.5rem; color: var(--ink-2); font-size: .9375rem; text-align: center; }
.foot > :first-child { padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.foot ul { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; }
.foot a { display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
