:root {
  /* OpenCode Osaka Jade TUI — light
     primary cyan, secondary magenta, accent green */
  --paper: #f7f8f7;
  --ink: #1a1d1b;
  --muted: #4a5c52;
  --rule: #d5ddd7;
  --cyan: #1faa90;
  --green: #3d7a52;
  --magenta: #a8527a;
  --blue: #3d7560;
  --cyan-soft: #d4efe8;
  --magenta-soft: #ead5de;
  --inline-bg: #e6ece8;
  --code-bg: #111c18;
  --code-ink: #C1C497;
  --kw: #2DD5B7;
  --fn: #509475;
  --tp: #549e6a;
  --st: #63b07a;
  --cm: #53685B;
  --num: #D2689C;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --measure: 36rem;
  --body: 1.125rem;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--magenta); text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
em { font-style: italic; }
abbr[title] {
  text-decoration: none;
  letter-spacing: 0.02em;
}

::selection { background: var(--magenta-soft); color: var(--ink); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--paper);
  padding: 0.4rem 0.6rem;
}
.skip:focus { top: 0.6rem; }

.wrap {
  width: min(var(--measure), calc(100% - 2.5rem));
  margin: 0 auto;
}

.site-header {
  padding: 1.6rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.75rem;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--cyan);
  text-decoration: none;
}
.wordmark:hover { color: var(--magenta); }

h1 {
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0 0 0.55rem;
}

.lede {
  font-size: 1.05em;
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 0.9rem;
}

.meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 2.4rem;
}
.meta time { color: var(--muted); }

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin: 2.2rem 0 0.55rem;
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 1.6rem 0 0.4rem;
}

p { margin: 0 0 1em; }

li { margin: 0.3em 0; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.15em; }
li::marker { color: var(--muted); }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--green);
  background: var(--inline-bg);
  padding: 0.08em 0.32em;
  border-radius: 2px;
  font-variant-ligatures: none;
}

figure.code {
  position: relative;
  margin: 1.4rem 0 1.6rem;
}
figure.code figcaption {
  position: absolute;
  top: 0.55rem;
  right: 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--cm);
  pointer-events: none;
}
figure.code pre {
  margin: 0;
  padding: 1.95rem 1.2rem 1.15rem;
}

pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1.15rem 1.2rem;
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  tab-size: 4;
  border-radius: 6px;
  font-variant-ligatures: none;
}
pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
  color: inherit;
}
pre ::selection {
  background: #2a4a40;
  color: var(--code-ink);
}

.kw { color: var(--kw); font-weight: 500; }
.fn { color: var(--fn); }
.tp { color: var(--tp); }
.st { color: var(--st); }
.cm { color: var(--cm); font-style: italic; }
.num { color: var(--num); }

kbd {
  font-family: var(--mono);
  font-size: 0.78em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--paper);
  white-space: nowrap;
}

blockquote {
  margin: 1.6rem 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 2px solid var(--ink);
  color: var(--ink);
}
blockquote p { margin-bottom: 0.4em; }
blockquote footer {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.03em;
}

.note {
  margin: 1.6rem 0;
  padding: 0.9rem 1.05rem;
  border-left: 2px solid var(--magenta);
  background: color-mix(in srgb, var(--inline-bg) 70%, var(--paper));
}
.note strong {
  font-family: var(--mono);
  font-size: 0.78em;
  letter-spacing: 0.06em;
  color: var(--magenta);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.3rem 0 1.7rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.6rem 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}
th {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer {
  margin: 3.2rem 0 2.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  :root { --body: 1.0625rem; }
  h1 { font-size: 1.55rem; }
  .wrap { width: min(var(--measure), calc(100% - 2rem)); }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { min-width: 8rem; padding-right: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* home */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.standfirst {
  margin: 0 0 1.1em;
}

.contact {
  margin: 0 0 2.6rem;
  color: var(--muted);
}

.home h2 {
  margin-top: 2.4rem;
}

ul.index {
  list-style: none;
  padding: 0;
  margin: 0 0 0.4rem;
}
ul.index li {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.35rem 1.1rem;
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
}
ul.index li:last-child {
  border-bottom: 1px solid var(--rule);
}
ul.index time,
ul.index .kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 0.28em;
}
ul.index a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
ul.index a:hover {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
ul.index .one-liner {
  display: block;
  margin: 0.15em 0 0;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.95em;
}

@media (max-width: 640px) {
  ul.index li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

