/* Warm paper, built on the anjadhe.ai tokens. */
:root {
  --color-bg: #faf7f1;
  --color-surface: #ffffff;
  --color-text: #1d1a16;
  --color-text-secondary: #5e584e;
  --color-text-tertiary: #8c8577;
  --color-border: #ece6da;
  --color-border-hover: #d8d0c0;
  --color-accent: #2f6bff;
  --tile: #171717;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-serif: "New York", "Iowan Old Style", Charter, Georgia, "Times New Roman", serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  /* tmea's mark: each word in one of its topic colours. */
  --tm-a: #588cda; --tm-b: #c77434; --tm-c: #48a260; --tm-d: #bf6aa5; --tm-e: #927ad2; --tm-f: #b08505;
  /* Zen master's paper and ink. */
  --zen-ground: #f2efe8; --zen-ink: #1b1a18;
  /* pavear's orange. */
  --pv-accent: #c2410c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #161412;
    --color-surface: #1f1c19;
    --color-text: #efebe4;
    --color-text-secondary: #aba59a;
    --color-text-tertiary: #7a746a;
    --color-border: #2e2a25;
    --color-border-hover: #3f3a33;
    --tile: #000000;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --tm-a: #74a6ef; --tm-b: #de8f57; --tm-c: #69ba7c; --tm-d: #d686bc; --tm-e: #aa95e8; --tm-f: #c79e41;
    --zen-ground: #1b1a18; --zen-ink: #e9e5db;
    --pv-accent: #d9521a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font: 14.5px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* Split layout: the intro stays pinned on the left, content scrolls on the right. */
.shell {
  max-width: 1120px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 80px;
}
.intro {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 72px 0 40px;
}
.wordmark { font-family: var(--font-serif); font-weight: 400; font-size: 22px; text-decoration: none; }
.tagline { font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 1.15; margin: 28px 0 16px; }
.lede { font-size: 15.5px; line-height: 1.6; color: var(--color-text-secondary); margin: 0; }
.sections { display: flex; flex-direction: column; gap: 4px; margin-top: 40px; }
.sections a {
  display: inline-flex; align-items: center; gap: 12px; width: max-content;
  padding: 6px 0; text-decoration: none;
  text-transform: uppercase; font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--color-text-tertiary); transition: color 120ms;
}
.sections a::before { content: ""; width: 24px; height: 1px; background: currentColor; transition: width 160ms; }
.sections a:hover, .sections a[aria-current] { color: var(--color-text); }
.sections a:hover::before, .sections a[aria-current]::before { width: 48px; }
.links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.links a { color: var(--color-text-secondary); text-decoration: none; border-bottom: 1px solid var(--color-border-hover); }
.links a:hover { color: var(--color-text); border-color: var(--color-text); }
.copy { margin: 16px 0 0; color: var(--color-text-tertiary); font-size: 13px; }

main { padding: 72px 0 96px; min-width: 0; }
main > section + section { margin-top: 72px; }
main section { scroll-margin-top: 72px; }
.eyebrow {
  text-transform: uppercase; font-size: 11.5px; font-weight: 600;
  letter-spacing: .06em; color: var(--color-text-secondary); margin: 0 0 16px;
}
h1 { font-family: var(--font-serif); font-weight: 400; font-size: 40px; line-height: 1.12; margin: 0 0 12px; }

.products { display: grid; gap: 12px; }
.product {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: 10px;
  text-decoration: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.product:hover { border-color: var(--color-border-hover); box-shadow: var(--shadow-sm); }
.product:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.product svg.mark { flex: none; width: 52px; height: 52px; }
.product .body { flex: 1; min-width: 0; }
.tmea .t { fill: var(--color-bg); stroke: var(--color-border-hover); }
.tmea .g { stroke: var(--color-text); }
.zen .t { fill: var(--zen-ground); stroke: var(--color-border-hover); }
.zen .e { stroke: var(--zen-ink); }
.product .name { font-family: var(--font-serif); font-size: 21px; line-height: 1.2; }
.product .desc { color: var(--color-text-secondary); margin-top: 2px; }
.product .go {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  color: var(--color-text-tertiary); white-space: nowrap; transition: color 120ms;
}
.product .go svg { transition: transform 120ms; }
.product:hover .go { color: var(--color-text); }
.product:hover .go svg { transform: translateX(2px); }

/* Posts */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--color-border); }
.post-list li:last-child { border-bottom: 1px solid var(--color-border); }
.post-list a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 20px; padding: 16px 0; text-decoration: none; }
.post-list time { grid-row: span 2; padding-top: 4px; color: var(--color-text-tertiary); font-size: 13px; font-variant-numeric: tabular-nums; }
.post-list .t { font-family: var(--font-serif); font-size: 19px; line-height: 1.3; }
.post-list a:hover .t { text-decoration: underline; text-decoration-color: var(--color-border-hover); text-underline-offset: 3px; }
.post-list .x {
  color: var(--color-text-secondary);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.post-meta { color: var(--color-text-tertiary); font-size: 13px; }
.back a { color: var(--color-text-secondary); text-decoration: none; }
.back a:hover { color: var(--color-text); }

article h1 { margin-bottom: 12px; }
.post-meta { margin: 0 0 40px; }
.prose { font-size: 16.5px; line-height: 1.75; }
.prose > * { margin: 0 0 1.1em; }
.prose h2 { font-family: var(--font-serif); font-weight: 400; font-size: 26px; line-height: 1.25; margin: 1.8em 0 .5em; }
.prose h3 { font-size: 17px; margin: 1.6em 0 .4em; }
.prose a { color: var(--color-text); text-decoration-color: var(--color-border-hover); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--color-text); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin-left: 0; padding-left: 16px; border-left: 2px solid var(--color-border-hover); color: var(--color-text-secondary); }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 4px; padding: .1em .3em; }
.prose pre { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.prose th { font-weight: 600; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose hr { border: 0; border-top: 1px solid var(--color-border); margin: 2em 0; }
.prose details { border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 16px; }
.prose details > summary { cursor: pointer; color: var(--color-text-secondary); }
.prose details[open] > summary { margin-bottom: 12px; }
.prose details pre { margin: 0 0 6px; }
.video { position: relative; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.back { margin-top: 56px; }

/* One column: the intro sits on top and scrolls away. */
@media (max-width: 860px) {
  .shell { display: block; padding: 0 16px; }
  .intro { position: static; height: auto; padding: 40px 0 0; }
  .tagline { font-size: 30px; margin-top: 24px; }
  .sections { display: none; }
  .links { margin-top: 24px; }
  .copy { display: none; }
  main { padding: 48px 0 64px; }
  h1 { font-size: 32px; }
}
@media (max-width: 520px) {
  .product { flex-wrap: wrap; }
  .product .go { width: 100%; padding-left: 70px; }
  .post-list a { grid-template-columns: 1fr; }
  .post-list time { grid-row: auto; order: 3; padding-top: 2px; }
}
/* Inner pages on small screens: keep the intro short so the page starts sooner. */
@media (max-width: 860px) {
  .intro.inner .tagline, .intro.inner .lede, .intro.inner .links { display: none; }
  .intro.inner { padding-top: 32px; }
}
