/* gaido.ai — the working notebook, one page.
   Tokens mirror the app: warm cream paper, deep ink, sanguine used like a
   red pencil in the margin. Hairlines for structure; no shadows, no radii. */

:root {
  --paper: oklch(97% 0.008 60);
  --paper-deep: oklch(95.5% 0.011 60);
  --paper-edge: oklch(93% 0.012 60);
  --ink: oklch(22% 0.014 60);
  --ink-soft: oklch(35% 0.012 60);
  --ink-muted: oklch(56% 0.011 60);
  --hairline: oklch(84% 0.009 60);
  --hairline-deep: oklch(64% 0.014 60);
  --sanguine: oklch(52% 0.16 28);
  --serif: 'Source Serif 4', Charter, Cambria, Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--paper); }

body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  font-feature-settings: 'tnum';
  -webkit-font-smoothing: antialiased;
}

.sheet {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 48px 0;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  min-height: 100vh;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--sanguine);
  text-underline-offset: 3px;
}
a:hover { color: var(--sanguine); }

code {
  font-family: var(--mono);
  font-size: 0.93em;
  background: var(--paper-deep);
  border: 1px solid var(--hairline);
  padding: 0.05em 0.35em;
}

.accent { color: var(--sanguine); }
.muted { color: var(--ink-muted); }

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

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.masthead-nav {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.masthead-nav .sep { color: var(--hairline-deep); margin: 0 10px; }
.masthead-nav a { text-decoration: none; }
.masthead-nav a:hover { color: var(--sanguine); }

/* ---- hero ---- */

.hero { padding: 88px 0 0; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.4vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.012em;
  max-width: 18ch;
}

.standfirst {
  margin: 28px 0 56px;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* ---- figures ---- */

.fig {
  border: 1px solid var(--hairline);
  background: var(--paper-deep);
}

.fig video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: var(--paper-edge);
}

.fig figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  border-top: 1px solid var(--hairline);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

/* ---- entries (numbered sections) ---- */

.entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 96px 0 0;
}

.entry-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  padding-top: 6px;
  position: sticky;
  top: 24px;
  align-self: start;
}

.entry-label .num {
  display: block;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--hairline-deep);
  padding-bottom: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}

.entry-body > p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.68;
  max-width: 60ch;
  margin-bottom: 32px;
}

.entry-body > p + pre { margin-top: -4px; }

/* ---- tick lists ---- */

.ticks {
  list-style: none;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 32px;
}

.ticks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}

.ticks li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--sanguine);
}

.ticks strong { font-weight: 500; }

.aside {
  font-family: var(--mono) !important;
  font-size: 13px !important;
  color: var(--ink-muted);
  max-width: 70ch;
}

/* ---- code blocks ---- */

pre {
  border: 1px solid var(--hairline);
  background: var(--paper-deep);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 32px;
  line-height: 1.7;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
}

pre.shell code { font-size: 15px; }

pre .comment { color: var(--ink-muted); }

/* ---- ledger (how it's built) ---- */

.ledger div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.ledger div:first-child { border-top: 1px solid var(--hairline); }

.ledger dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  padding-top: 3px;
}

.ledger dd {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 62ch;
}

/* ---- colophon ---- */

.colophon {
  margin-top: 120px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--hairline-deep);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12px;
}

/* ---- small screens ---- */

@media (max-width: 860px) {
  .sheet { padding: 0 20px; border: none; }
  .entry { grid-template-columns: 1fr; gap: 18px; padding-top: 72px; }
  .entry-label { position: static; }
  .entry-label .num { display: inline; border: none; margin-right: 8px; }
  .hero { padding-top: 56px; }
}
