:root {
  --bg: #f6f3ee; --fg: #2b2622; --muted: #6d655c;
  --rule: #ddd5c9; --accent: #b4441f; --card: #fffdfa;
  --measure: 34rem; --wide: 60rem;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16140f; --fg: #e8e2d8; --muted: #9a9088;
          --rule: #322c25; --accent: #e2733f; --card: #1d1a14; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 1.0625rem/1.7 Georgia, "Iowan Old Style", "Times New Roman", serif;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* --- masthead ------------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--rule); background: var(--bg);
            position: sticky; top: 0; z-index: 5; }
.bar {
  max-width: var(--wide); margin: 0 auto; padding: .85rem 1.25rem;
  display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap;
}
.brand {
  font-size: .95rem; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; color: var(--fg); font-weight: 600; white-space: nowrap;
}
.bar nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.bar nav a {
  font-family: ui-sans-serif, system-ui, sans-serif; font-size: .83rem;
  letter-spacing: .07em; text-decoration: none; color: var(--muted);
  padding: .2rem 0; border-bottom: 2px solid transparent;
}
.bar nav a:hover { color: var(--fg); }
.bar nav a.here { color: var(--accent); border-bottom-color: var(--accent); }
/* Phones: brand on its own line, nav as a full-width row underneath. */
@media (max-width: 29rem) {
  .bar { gap: .5rem; }
  .brand { width: 100%; }
  .bar nav { width: 100%; justify-content: space-between; gap: .5rem; }
}

main { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem 5rem; }

/* --- type ----------------------------------------------------------- */
.page-title { font-size: 1.9rem; font-weight: normal; margin: 3rem 0 .3rem; }
.page-sub { color: var(--muted); font-style: italic; margin: 0 0 1rem; }
.eyebrow {
  font-family: ui-sans-serif, system-ui, sans-serif; font-size: .72rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; margin: 0 0 .75rem;
}
.date {
  color: var(--muted); font-size: .78rem; letter-spacing: .13em;
  text-transform: uppercase; font-family: ui-sans-serif, system-ui, sans-serif;
  margin: 0;
}
p { margin: 0 0 1.25rem; hyphens: auto; }
a { color: var(--accent); }
strong { font-weight: 600; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em;
  background: color-mix(in srgb, var(--rule) 45%, transparent);
  padding: .08em .3em; border-radius: 3px;
}

/* --- home ----------------------------------------------------------- */
.hero { padding: 4rem 0 2rem; }
.hero h1 {
  font-size: 2.4rem; font-weight: normal; margin: 0 0 .75rem; line-height: 1.1;
}
.lede { font-size: 1.15rem; color: var(--muted); }
.latest {
  border-top: 1px solid var(--rule); padding: 2.5rem 0;
}
.latest h3 { font-size: 1.45rem; font-weight: normal; margin: .4rem 0 1rem; }
.latest h3 a { text-decoration: none; }
.latest h3 a:hover { text-decoration: underline; }
.teaser { color: var(--muted); }
.more { font-family: ui-sans-serif, system-ui, sans-serif; font-size: .85rem;
        text-decoration: none; }
.more:hover { text-decoration: underline; }

/* --- diary ---------------------------------------------------------- */
article { padding: 3rem 0; border-top: 1px solid var(--rule); }
article h2 {
  font-size: 1.6rem; font-weight: normal; line-height: 1.25;
  margin: .4rem 0 1.6rem; color: var(--accent);
}
figure { margin: 0 0 1.8rem; }
figure img { width: 100%; height: auto; display: block; border-radius: 2px; }
/* Desktop: let the pictures breathe past the text measure. */
@media (min-width: 46rem) {
  figure { width: calc(var(--measure) + 8rem); margin-left: -4rem; }
}

/* --- scaffolding ---------------------------------------------------- */
.scaffold-note {
  font-family: ui-sans-serif, system-ui, sans-serif; font-size: .8rem;
  color: var(--muted); border-left: 3px solid var(--accent);
  padding: .5rem 0 .5rem .85rem; margin: 1.5rem 0 2.5rem;
}
.scaffold {
  border: 1px dashed var(--rule); border-radius: 4px; background: var(--card);
  padding: 1.25rem 1.4rem; margin: 0 0 1rem;
}
.scaffold h2 { font-size: 1.15rem; font-weight: normal; margin: 0 0 .35rem; }
.scaffold .intent {
  margin: 0; color: var(--muted); font-size: .95rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

/* --- footer --------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--rule); margin-top: 3rem;
  padding: 2rem 1.25rem 3rem; text-align: center; color: var(--muted);
  font-size: .8rem;
}
.foot p { margin: 0 0 .35rem; }
.built { font-family: ui-sans-serif, system-ui, sans-serif; opacity: .75; }
