/* the bestiary-grimoire · shared style (11-13 redo: calm notebook; cream, ink and chartreuse in Courier Prime)
   chartreuse #8fae1b is for stars, rules and borders only: as text it fails contrast. text greens are #4f6b09 (5.5:1). */
@font-face { font-family: 'Courier Prime'; src: url('fonts/CourierPrime-Regular.ttf') format('truetype'); font-weight: normal; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('fonts/CourierPrime-Bold.ttf') format('truetype'); font-weight: bold; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f6f3e8; --panel: #efeadb; --panel2: #ebe5d2; --ink: #22251c; --muted: #5c5f52;
  --green: #4f6b09; --chart: #8fae1b; --line: #c9d49a; --tint: #e4ecc4; --rust: #a8461f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Courier Prime', 'Courier New', Courier, monospace;
  font-size: 16px; line-height: 1.6;
}
.page { max-width: 700px; margin: 0 auto; padding: 28px 16px 40px; }
a { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { background: var(--tint); }
b, strong { font-weight: bold; }
img { max-width: 100%; height: auto; }
code, .tok { color: var(--green); font-family: inherit; }
.star { color: var(--chart); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* the top bar on every page */
.topnav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between;
  font-size: 14px; border-bottom: 2px solid var(--chart); padding-bottom: 8px; margin-bottom: 28px; }
.topnav .home { font-weight: bold; text-decoration: none; color: var(--green); }
.topnav nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* the front page header */
.hello h1 { font-size: 44px; line-height: 1.1; margin: 0 0 6px; color: var(--green); letter-spacing: 1px; }
.hello .what { font-size: 19px; margin: 0 0 6px; }
.hello .tags { font-size: 14px; color: var(--muted); margin: 0; }

/* sections */
section { margin: 40px 0 0; }
h2 { font-size: 15px; letter-spacing: 2px; text-transform: lowercase; color: var(--green); margin: 0 0 14px;
  border-top: 1px solid var(--line); padding-top: 14px; }
h2::before { content: "✦ "; color: var(--chart); }
h3 { font-size: 17px; color: var(--green); margin: 22px 0 6px; }
p { margin: 0 0 12px; }

/* cards: the work */
.card-list { display: grid; gap: 12px; }
.work { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--chart); border-radius: 4px; padding: 14px 16px; }
.work .t { font-weight: bold; font-size: 17px; }
.work .t a { text-decoration-thickness: 2px; }
.work p { margin: 6px 0 0; }
.work .meta { font-size: 13px; color: var(--muted); margin-top: 8px; }
.work.with-pic { display: grid; grid-template-columns: 1fr 180px; gap: 14px; align-items: start; }
.work.with-pic img { border: 1px solid var(--line); border-radius: 3px; background: #fff; }
@media (max-width: 520px) { .work.with-pic { grid-template-columns: 1fr; } .work.with-pic img { width: 100%; } }
.tag { text-indent: 0; display: inline-block; font-size: 12px; color: var(--green); background: var(--tint); border-radius: 3px; padding: 0 6px; margin-left: 4px; vertical-align: 2px; font-weight: normal; }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding-left: 1.3em; text-indent: -1.3em; margin-bottom: 8px; }
ul.plain li::before { content: "✦ "; color: var(--chart); }

.creed p { margin-bottom: 6px; }
.contact { line-height: 2; }
.refs { font-size: 14px; }
.refs li { margin-bottom: 6px; }

/* results tables scroll sideways on a phone instead of breaking the page */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.results { border-collapse: collapse; margin: 10px 0 8px; font-size: 14px; width: 100%; min-width: 440px; }
table.results th, table.results td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
table.results th { background: var(--panel2); color: var(--green); font-weight: normal; }
table.results td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.results td.best { color: var(--green); font-weight: bold; }
.fine { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 8px; }
.fine b { color: var(--green); }
.quote { font-style: italic; }

/* the write-ups (doubt-and-loop, little-qwen-counts) keep their old markup: table.frame + td.boxhead + td.story */
.article-head h1 { font-size: 34px; line-height: 1.15; margin: 0 0 6px; color: var(--green); }
.article-head .subtitle { color: var(--muted); font-size: 15px; margin: 0 0 4px; }
.byline { font-size: 14px; color: var(--muted); }
table.frame { width: 100%; border-collapse: collapse; margin: 36px 0 0; border: 0; background: none; }
table.frame td { padding: 0; border: 0; }
td.boxhead { font-size: 15px; letter-spacing: 2px; color: var(--green); border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 12px; }
td.boxhead::before { content: "✦ "; color: var(--chart); }
.story h3 { margin-top: 20px; }
img.card { display: block; margin: 14px auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
img.card.wide { width: 100%; }
.tiny { font-size: 13px; color: var(--muted); }
.builds { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; font-size: 14px; margin: 18px 0 0; }
.builds b { color: var(--green); }
.divider { display: none; }

/* footer */
footer { margin-top: 48px; border-top: 2px solid var(--chart); padding-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }
footer p { margin: 0 0 6px; }
.counter { display: inline-block; border: 1px solid var(--chart); padding: 0 6px; color: var(--green); background: var(--panel2); letter-spacing: 2px; margin: 0 1px; }

/* small tables inside the write-ups (little qwen counts) */
table.tiny { border-collapse: collapse; margin: 8px 0 12px; font-size: 14px; color: var(--ink); }
table.tiny th, table.tiny td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
table.tiny th { color: var(--green); background: var(--panel2); font-weight: normal; }
p.tiny { margin-top: 4px; }
.story em { color: var(--muted); }
.story b { color: var(--green); }
