/* bymachines.ai — one stylesheet, no JavaScript, no third-party assets.
   Palette "Lisbon": limestone of the calçada, basalt for text, the Atlantic for links and numbers, sandstone for tables.
   Airy layout: generous spacing, thin lines, no bands. Serif display type for the lab voice, sans body, tabular numerals.
   Dark mode = basalt night by system preference. */
:root {
  --limestone: #f8f5ee;
  --basalt: #1a1b1d;
  --sand: #d9c8a4;
  --sand-soft: #f0e9d9;
  --sand-deep: #a88a55;
  --ocean: #0e5a74;
  --ocean-2: #167a98;
  --ocean-soft: #e3eff4;
  --foam: #ffffff;

  --bg: var(--limestone);
  --bg-raised: var(--foam);
  --fg: var(--basalt);
  --muted: #736a5d;
  --line: #e6ded0;
  --accent: var(--ocean);
  --accent-2: var(--ocean-2);
  --accent-soft: var(--ocean-soft);
  --zero: #ada598;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 66ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416; --bg-raised: #1b1d20; --fg: #ece6d9; --muted: #a79e8f; --line: #2b2d31;
    --accent: #7cc3d9; --accent-2: #9ad4e6; --accent-soft: #163541; --zero: #6f6a62;
    --sand: #8f7b52; --sand-soft: #24211a; --sand-deep: #c9ad76;
  }
}
* { box-sizing: border-box; }
html { font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--fg); background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); text-decoration-thickness: 2px; }

/* header */
header.site .inner { max-width: 66rem; margin: 0 auto; padding: 30px 20px 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; }
header.site .brand { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--fg); text-decoration: none; }
header.site .brand small { display: block; font-family: var(--sans); font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 2px; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-left: auto; }
header.site nav a { color: var(--fg); text-decoration: none; opacity: .8; padding-bottom: 3px; border-bottom: 2px solid transparent; }
header.site nav a:hover, header.site nav a[aria-current="page"] { opacity: 1; border-bottom-color: var(--accent); }

main { max-width: 66rem; margin: 0 auto; padding: 40px 20px 72px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; letter-spacing: -.005em; font-weight: 700; }
h1 { font-size: 2.4rem; margin: 0 0 .6em; }
h2 { font-size: 1.6rem; margin: 2.6em 0 .7em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
p, ul, ol, blockquote { max-width: var(--measure); }
.lede { font-size: 1.22rem; line-height: 1.55; max-width: var(--measure); }
.muted { color: var(--muted); }
.answer { border-left: 3px solid var(--sand-deep); padding: .2em 0 .2em 1.1em; margin: 1.4em 0; max-width: var(--measure); }

/* hero */
.hero { padding: 12px 0 10px; }
.hero h1 { font-size: 3rem; max-width: 20ch; margin-bottom: .5em; }
.hero .lede { font-size: 1.3rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 16px; margin: 36px 0 12px; max-width: none; }
.stat { padding: 6px 0 0; border-top: 2px solid var(--sand); }
.stat b { display: block; font-family: var(--serif); font-size: 2.2rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; margin-top: 8px; }
.stat span { font-size: .88rem; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 24px 32px; margin-top: 8px; }
.card { padding: 4px 0 0; border-top: 2px solid var(--sand); }
.card h3 { margin: 12px 0 .4em; color: var(--accent); }
.card p { margin-bottom: 0; }

code, kbd { font-family: var(--mono); font-size: .9em; background: var(--sand-soft); padding: .1em .35em; border-radius: 3px; }
pre { font-family: var(--mono); font-size: .88em; overflow-x: auto; padding: 12px 14px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 6px; }
pre code { background: none; padding: 0; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.2em 0 2em; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; caption-side: top; padding: 11px 14px 9px; font-family: var(--serif); font-weight: 700; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
th { position: sticky; top: 0; background: var(--bg-raised); font-weight: 600; font-size: .82rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
td.num, th.num { text-align: right; }
td.zero { color: var(--zero); }
tbody tr:last-child td { border-bottom: none; }
.meta { font-size: .9rem; color: var(--muted); margin: -.2em 0 1.6em; }
.meta a { color: inherit; }
.files a { font-family: var(--mono); font-size: .88em; }
.pill { display: inline-block; font-size: .78rem; padding: .1em .6em; border: 1px solid var(--sand); border-radius: 999px; color: var(--muted); }
.list { list-style: none; padding: 0; max-width: none; }
.list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: none; }
.list .title { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; }
.empty { color: var(--muted); }

/* footer — light, one thin sand line */
footer.site { border-top: 1px solid var(--sand); }
footer.site .inner { max-width: 66rem; margin: 0 auto; padding: 26px 20px 56px; font-size: .9rem; color: var(--muted); }
footer.site p { max-width: none; margin: .4em 0; }
footer.site a { color: inherit; }
footer.site strong { font-family: var(--serif); font-size: 1.05rem; color: var(--fg); }

@media (max-width: 640px) {
  html { font-size: 16px; }
  main { padding-top: 28px; }
  h1 { font-size: 1.9rem; }
  .hero h1 { font-size: 2.15rem; }
  .hero .lede { font-size: 1.12rem; }
  header.site nav { margin-left: 0; }
  header.site .inner { padding-top: 22px; }
}
