:root {
  --bg: #12100e;
  --fg: #e8e3db;
  --dim: #9a9187;
  --dimmer: #6b645c;
  --rule: #2c2825;
  --accent: #d8a657;
  --link: #a9c99a;
  --measure: 34rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  padding: 3.5rem 1.5rem 6rem;
}

.wrap { max-width: var(--measure); margin: 0 auto; }
.wide { max-width: 46rem; margin: 0 auto; }

/* ---- masthead ---- */

header.top {
  max-width: var(--measure);
  margin: 0 auto 3.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
header.top .name {
  font: 600 1.05rem/1.2 ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  letter-spacing: .01em;
  color: var(--fg);
  text-decoration: none;
  display: inline-block;
}
header.top .name:hover { color: var(--accent); }
header.top nav {
  margin-top: .7rem;
  font: 400 .8rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
header.top nav a { color: var(--dim); text-decoration: none; margin-right: 1.4rem; }
header.top nav a:hover, header.top nav a[aria-current] { color: var(--accent); }
header.top a { border-bottom: 0; }
header.top nav a[aria-current] { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* pages with a wider content column get a matching masthead and rule */
header.top.w, body.w footer { max-width: 46rem; }

/* ---- type ---- */

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 .4rem;
  letter-spacing: -.01em;
}
h2 {
  font-size: 1.12rem;
  font-weight: 600;
  margin: 2.75rem 0 .75rem;
  letter-spacing: -.005em;
}
h3 {
  font: 600 .78rem/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--dim);
  margin: 2.25rem 0 .6rem;
}
p { margin: 0 0 1.1rem; }
a { color: var(--link); text-decoration: none; border-bottom: 1px solid #3f4a39; }
a:hover { color: var(--accent); border-bottom-color: var(--accent); }
strong { font-weight: 600; color: #fff; }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

.lede { font-size: 1.1rem; color: var(--fg); }
.sub {
  font: 400 .78rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--dimmer);
  margin: 0 0 2.5rem;
  letter-spacing: .02em;
}

code, kbd, .mono {
  font: 400 .86em/1.5 ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
code { color: var(--accent); background: rgba(216,166,87,.07); padding: .08em .32em; border-radius: 2px; }

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--rule);
  color: var(--dim);
  font-style: italic;
}

ul, ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
li { margin-bottom: .45rem; }

/* ---- callout ---- */

.note {
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  padding: 1rem 1.15rem .3rem;
  margin: 1.75rem 0;
  font-size: .95rem;
  background: rgba(255,255,255,.015);
}
.note p:last-child { margin-bottom: .8rem; }
.note .tag {
  display: block;
  font: 600 .7rem/1 ui-monospace, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .6rem;
}

/* ---- tables ---- */

.tbl { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .8rem .5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th {
  font: 600 .72rem/1.4 ui-monospace, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--dim);
}
td.num, th.num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
/* A right-aligned numeric cell with padding-right:0 sits flush against the
   next column. On a table where .num is the LAST column that is invisible;
   on one where it is not, '2 d' and 'him' render as '2 dhim'. Found by
   screenshotting before publishing, 2026-09-30, which is the third layout
   fault that has caught and the second that reading the HTML did not. */
td.num + td, th.num + th { padding-left: 1.1rem; }

/* ---- log index ---- */

.entries { list-style: none; padding: 0; margin: 2rem 0 0; }
.entries li { margin-bottom: 1.6rem; }
.entries .when {
  font: 400 .75rem/1.4 ui-monospace, Menlo, Consolas, monospace;
  color: var(--dimmer);
  letter-spacing: .04em;
}
.entries .what { display: block; font-size: 1.02rem; margin-top: .1rem; }
.entries .gloss { display: block; color: var(--dim); font-size: .93rem; margin-top: .15rem; }

/* ---- footer ---- */

footer {
  max-width: var(--measure);
  margin: 5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font: 400 .78rem/1.7 ui-monospace, Menlo, Consolas, monospace;
  color: var(--dimmer);
}
footer a { color: var(--dim); border-bottom-color: var(--rule); }

@media (max-width: 480px) {
  body { padding: 2.5rem 1.15rem 4rem; font-size: 16px; }
  h1 { font-size: 1.5rem; }
}

/* ---- verbatim regulatory quotes: readable, not italic ---- */

blockquote.reg { font-style: normal; color: var(--fg); }
blockquote.reg p { margin-bottom: .75rem; }
blockquote.reg p:last-child { margin-bottom: 0; }

p.src {
  font-size: .85rem;
  color: var(--dim);
  border-left: 2px solid var(--rule);
  padding-left: 1.1rem;
  margin-top: -.6rem;
}
p.src code { font-size: .95em; word-break: break-all; }

/* Block-level entry links pick up the site-wide border-bottom across the full
   column width, which reads as a divider rather than a link. Keep the underline
   on the text only. */
.entries .what { border-bottom: 0; }
.entries .what:hover { border-bottom: 0; }
.entries a.what span, .entries .what { text-decoration-thickness: 1px; }
.entries .what { display: inline; }
.entries li > .what { display: inline-block; margin-top: .1rem; }

/* date cells that must not wrap mid-hyphen */
td.d { white-space: nowrap; }
