/* Tokens — Teahouse palette per docs/contributor/design-system/README.md
   Light + dark sets keyed on prefers-color-scheme. Hex approximations of the
   authoritative oklch values in `05 Mode Palettes.html`. */
:root {
  --paper: #EFE9D8;
  --porcelain: #FCFAF2;
  --paper-alt: #E5DFCB;
  --line: #D6D0BC;
  --ink: #2A2117;
  --ink-2: #4F4435;
  --ink-3: #7B7261;
  --braise: #C44A1E;
  --braise-soft: #F4D5C3;
  --jade: #2E8A6A;
  --jade-soft: #D6ECDF;
  --golden: #D6B14E;

  --max-width: 56rem;
  --measure: 38rem;
  --radius-card: 20px;
  --radius-pill: 9999px;
  --pad-x: 20px;

  --font-sans: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1B1712;
    --porcelain: #2A2319;
    --paper-alt: #332B20;
    --line: #3E3628;
    --ink: #F4EFE0;
    --ink-2: #CEC6B3;
    --ink-3: #9B9280;
    --braise: #E88050;
    --braise-soft: #5E3522;
    --jade: #7BC9A6;
    --jade-soft: #24473A;
    --golden: #E8C467;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--braise);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: none;
}

/* Header / footer */
.site-header,
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px var(--pad-x);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand .bao-glyph {
  width: 28px;
  height: 24px;
  color: var(--braise);
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-nav a {
  color: var(--ink-3);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

/* Main + prose */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px var(--pad-x) 56px;
}

.prose {
  max-width: var(--measure);
}

main > * + * {
  margin-top: 28px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.1em;
}

.prose p:last-child,
.prose ul:last-child,
.prose ol:last-child {
  margin-bottom: 0;
}

.prose h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}

.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.5rem;
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.prose ul, .prose ol {
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.4rem 0;
}

.prose .meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.2rem;
}

.prose strong {
  color: var(--ink);
}

.prose code {
  background: var(--paper-alt);
  padding: 0.05rem 0.35rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

/* Eyebrow */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
}

/* Lede */
.lede {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 24px;
}

/* Hero */
.hero {
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 32px var(--pad-x);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.hero-copy {
  max-width: var(--measure);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}

.hero .lede {
  font-size: 1.2rem;
  color: var(--ink-2);
  margin: 0 0 8px;
}

.hero-art {
  width: 160px;
  height: 138px;
  display: grid;
  place-items: center;
  color: var(--ink);
  flex-shrink: 0;
}

.hero-art .bao-glyph {
  width: 124px;
  height: 106px;
}

@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 24px 18px;
    text-align: left;
  }
  .hero-art {
    width: 120px;
    height: 104px;
    order: -1;
  }
  .hero-art .bao-glyph {
    width: 92px;
    height: 80px;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
}

/* Feature section + grid */
.feature-section h2 {
  max-width: var(--measure);
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

@media (max-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
}

.feature-card .eyebrow {
  color: var(--jade);
  margin-bottom: 8px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}

.feature-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.97rem;
}

/* Release notes */
.release {
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-top: 20px;
}

.release h2 {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--braise);
  font-feature-settings: "tnum";
}

.release-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 4px 0 14px;
}

.release-notes {
  white-space: pre-wrap;
  margin: 0;
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.88rem;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: var(--ink);
}

/* Bao SVG — the outline + eyes use currentColor (set via `color:` on a parent),
   and the cheeks/tongue ride on `.bao-cheeks` (build.py rewrites the SVG's
   hardcoded #F5C8C8 fills to that class on inline). */
.bao-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bao-cheeks {
  fill: var(--braise-soft);
}
