/* Agentic Coding Digest — static site styles.
   One stylesheet for every page. No fonts, scripts, or assets are loaded from third
   parties: the site itself must not collect what the privacy policy says it doesn't. */

:root {
  color-scheme: light dark;

  --bg: #fbfaf8;
  --surface: #ffffff;
  --rule: #e5e1da;
  --ink: #14120f;
  --ink-soft: #55504a;
  --ink-faint: #857e75;
  --accent: #9a5b28;
  --accent-soft: #f3ece4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131211;
    --surface: #1b1a18;
    --rule: #2e2c29;
    --ink: #f3f1ee;
    --ink-soft: #b3ada4;
    --ink-faint: #837d75;
    --accent: #d7955c;
    --accent-soft: #242019;
  }
}

* { box-sizing: border-box; }

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

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

.wrap {
  max-width: 40rem;
  margin: 0 auto;
}

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

header.masthead {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

.masthead a.wordmark {
  display: inline-block;
  font: 600 15px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
}

.masthead a.wordmark:hover { color: var(--accent); }

h1 {
  font-size: clamp(2rem, 6vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 1.5rem 0 0.6rem;
}

.standfirst {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.updated {
  margin: 1.4rem 0 0;
  font: 400 13px/1.4 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

/* ---- prose ------------------------------------------------------------- */

h2 {
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 3rem 0 0.85rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

p, li { color: var(--ink); }

p { margin: 0 0 1.1rem; }

ul, ol { margin: 0 0 1.1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.5rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 600; }

code {
  font: 400 0.86em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--accent-soft);
  padding: 0.12em 0.36em;
  border-radius: 3px;
}

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

.table-scroll { overflow-x: auto; margin: 0 0 1.4rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font: 400 15px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

td code { font-size: 0.82em; }

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

.note {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.6rem;
  font-size: 0.97rem;
}

.note p:last-child { margin-bottom: 0; }

/* ---- source list ------------------------------------------------------- */

.sources { list-style: none; padding: 0; margin: 0 0 1.5rem; }

.sources li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}

.sources .name { font-weight: 600; }

.sources .meta {
  display: block;
  margin-top: 0.15rem;
  font: 400 13px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

.tag {
  display: inline-block;
  font: 600 11px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 0.28em 0.5em;
  margin-left: 0.4rem;
  vertical-align: 1px;
}

/* ---- index nav --------------------------------------------------------- */

.cards { list-style: none; padding: 0; margin: 2rem 0 0; }

.cards li { margin: 0 0 0.75rem; }

.cards a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
}

.cards a:hover { border-color: var(--accent); }

.cards .label { font-weight: 600; }

.cards .desc {
  display: block;
  margin-top: 0.2rem;
  font: 400 14px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-soft);
}

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

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font: 400 14px/1.6 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-faint);
}

footer a { color: var(--ink-soft); }

footer nav a { margin-right: 1.1rem; }

footer p { margin: 0.8rem 0 0; color: var(--ink-faint); }
