/* Identity: "ledger paper". Cool mineral paper, ink, ledger green, and an accounting double-rule as the recurring motif. */
:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --alt: #e9eeec;
  --text: #0f1c1a;
  --muted: #3f4f4c;
  --line: #cfd8d5;
  --rule: #b7c4c0;
  --accent: #14594a;
  --accent-ink: #ffffff;
  --accent-hover: #0d4034;
  --tick: #a14a12;
  --band-bg: #10231f;
  --band-text: #eef4f2;
  --band-muted: #b9ccc6;
  --band-accent: #8fdcc4;
  --focus: #a14a12;
  --ph-bg: #fff1c2;
  --ph-text: #4a3500;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Book Antiqua", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1413;
    --surface: #131d1b;
    --alt: #101917;
    --text: #e9f0ee;
    --muted: #aebfba;
    --line: #25332f;
    --rule: #36483f;
    --accent: #7fd3ba;
    --accent-ink: #072019;
    --accent-hover: #a6e6d3;
    --tick: #f0a96b;
    --band-bg: #15302a;
    --band-text: #eef6f3;
    --band-muted: #bcd2cb;
    --band-accent: #9fe3cd;
    --focus: #f0a96b;
    --ph-bg: #4a3b0a;
    --ph-text: #ffe9a3;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.0625rem/1.65 var(--font); overflow-wrap: break-word; }
.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 45rem; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.012em; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6.4vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.15rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
p, ul, ol { margin: 0 0 1.1em; }
p { max-width: 68ch; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
main:focus { outline: none; }
.skip { position: absolute; left: .75rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; z-index: 100; border-radius: 4px; }
.skip:focus { top: .75rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.mark { width: 1.9rem; height: 1.9rem; flex: none; }
.mark .m-box { fill: var(--accent); }
.mark .m-ln { stroke: var(--accent-ink); }
.nav-toggle { display: none; font: inherit; background: none; color: var(--text); border: 1px solid var(--rule); border-radius: 6px; padding: .45rem .9rem; min-height: 2.75rem; cursor: pointer; }
.nav-toggle:hover { background: var(--alt); }
.site-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { position: relative; display: inline-block; padding: .65rem .85rem; color: var(--text); text-decoration: none; border-radius: 6px; font-size: .98rem; }
.site-nav a:hover { background: var(--alt); }
.site-nav a[aria-current="page"] { font-weight: 650; }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .3rem; height: 5px; border-top: 2px solid var(--accent); border-bottom: 1px solid var(--accent); }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.25rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.hero > .wrap > h1 { max-width: 20ch; }
.kicker { display: flex; align-items: center; gap: .6rem; font-size: .95rem; font-weight: 600; color: var(--accent); margin: 0 0 1.25rem; }
.kicker svg { width: 1.1rem; height: 1.1rem; flex: none; }
.kicker .k-tick { stroke: var(--tick); }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 40rem; }
.note { font-size: .9rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.fine { font-size: .875rem; color: var(--muted); }

.hero-home { position: relative; overflow: hidden; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 0; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-home h1 { max-width: 17ch; }
.trace { display: block; width: 100%; max-width: 30rem; height: auto; justify-self: center; }
.trace .t-grid { stroke: var(--line); stroke-width: 1; fill: none; }
.trace .t-col { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 5; }
.trace .t-head { fill: var(--alt); stroke: var(--rule); }
.trace .t-cell { fill: var(--rule); }
.trace .t-line { stroke: var(--accent); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trace .t-node { fill: var(--bg); stroke: var(--accent); stroke-width: 2.5; }
.trace .t-tick { stroke: var(--tick); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trace .t-total { stroke: var(--text); }
@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 3rem; }
  .trace { max-width: none; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes settle { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .trace .t-line, .trace .t-tick { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.5,0,.2,1) .25s forwards; }
  .trace .t-tick { animation-delay: 1.6s; animation-duration: .5s; }
  .trace .t-node { opacity: 0; animation: settle .4s ease-out forwards; }
  .trace .t-node:nth-of-type(1) { animation-delay: .35s; }
  .trace .t-node:nth-of-type(2) { animation-delay: .7s; }
  .trace .t-node:nth-of-type(3) { animation-delay: 1.05s; }
  .trace .t-node:nth-of-type(4) { animation-delay: 1.4s; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Sections */
section.wrap { padding-top: clamp(2.25rem, 5vw, 3.5rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.prose h2 { margin-top: 2.25rem; }
.prose h2:first-child { margin-top: 0; }
.sec-head { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 1.5rem; }
.sec-head h2 { margin: 0; }
.sec-head p { margin: 0; color: var(--muted); }
.rule2 { height: 6px; border-top: 2px solid var(--text); border-bottom: 1px solid var(--text); width: 3.5rem; margin: 0 0 1.25rem; opacity: .85; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 1rem; text-decoration: none; padding: .8rem 1.5rem; border-radius: 6px; border: 2px solid var(--accent); min-height: 2.9rem; transition: background-color .15s, border-color .15s, transform .15s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--alt); color: var(--accent-hover); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Pillars and cards */
.grid3, .grid2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 44rem) { .grid2 { grid-template-columns: repeat(2, 1fr); } .grid3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 4px 4px 10px 10px; padding: 1.5rem 1.5rem 1.6rem; }
.card .ico { width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; display: block; }
.ico .i-s { stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ico .i-t { stroke: var(--tick); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ico .i-f { fill: var(--accent); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }

/* Latest */
.latest { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.latest-head { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1.25rem; background: var(--alt); border-bottom: 1px solid var(--rule); font-weight: 650; font-size: .95rem; }
.latest-row { display: grid; grid-template-columns: 1fr; gap: .25rem; padding: 1.1rem 1.25rem; border-bottom: 1px dashed var(--rule); }
.latest-row:last-child { border-bottom: 0; }
.latest-row h3 { margin: 0; font-size: 1.1rem; }
.latest-row p { margin: 0; color: var(--muted); font-size: .98rem; }
.latest-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--rule); background: var(--surface); }
.latest-foot p { margin: 0; color: var(--muted); }

.empty { border: 2px dashed var(--rule); border-radius: 10px; padding: 1.5rem; color: var(--muted); }
.empty p { margin: 0; }

/* About teaser */
.about-t { display: grid; gap: 1.75rem; }
@media (min-width: 52rem) { .about-t { grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; } }
.facts { margin: 0; border-top: 2px solid var(--text); }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .95rem; }
.facts dd { margin: 0; }

/* Newsletter band */
.band { background: var(--alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4rem) 0; margin-top: clamp(1.5rem, 4vw, 3rem); }
.band.alt { background: var(--surface); }
#newsletter.band { background: var(--band-bg); color: var(--band-text); border-color: var(--band-bg); }
#newsletter.band h2 { color: var(--band-text); }
#newsletter.band p, #newsletter.band .fine { color: var(--band-muted); }
#newsletter.band a:not(.btn) { color: var(--band-accent); }
#newsletter.band .btn { background: var(--band-text); color: var(--band-bg); border-color: var(--band-text); }
#newsletter.band .btn:hover { background: var(--band-accent); border-color: var(--band-accent); color: var(--band-bg); }
#newsletter.band :focus-visible { outline-color: var(--band-accent); }
.fallback { margin-top: 1.25rem; }

.reslist { list-style: none; padding: 0; }
.reslist li { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.reslist h3 { margin-bottom: .2rem; }
.reslist p { margin: 0; color: var(--muted); }
.ph { background: var(--ph-bg); color: var(--ph-text); padding: .05em .35em; border-radius: 4px; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; padding-left: .2rem; }
.prose li::marker { color: var(--accent); }

/* Footer */
.site-footer { background: var(--alt); border-top: 1px solid var(--line); padding: 2.5rem 0 2rem; }
.foot-in { display: grid; gap: .5rem 2rem; }
@media (min-width: 48rem) { .foot-in { grid-template-columns: 1fr auto; align-items: start; } .foot-in .fine { grid-column: 1 / -1; padding-top: 1.25rem; margin-top: .75rem; border-top: 1px solid var(--line); } }
.foot-brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin: 0; }
.foot-tag { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .1rem 1.25rem; }
.site-footer li a { display: inline-block; padding: .4rem 0; }
.site-footer .fine { margin: 0; max-width: none; }

@media (max-width: 47.99rem) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav.open { display: block; padding-bottom: .75rem; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { display: block; padding: .8rem .85rem; }
  .js .site-nav a[aria-current="page"]::after { left: .85rem; right: auto; width: 2.5rem; bottom: .45rem; }
  .facts div { grid-template-columns: 1fr; gap: .1rem; }
}
@media print { .site-header, .skip { display: none; } }

.kit-wrap { margin-top: 1.25rem; max-width: 34rem; }
