:root {
  --ink: #11110f;
  --paper: #f4f1ea;
  --rule: #1a1a17;
  --accent: #d94f1f;
  --accent-2: #1f5fd9;
  --muted: #6b6960;
  --soft: #ebe7dd;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-serif, "Iowan Old Style", "Charter", Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.mono { font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace; }

header.top {
  border-bottom: 1px solid var(--rule);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
}
header.top .brand { display: flex; align-items: center; gap: 10px; }
header.top .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
header.top nav { display: flex; gap: 18px; }
header.top nav a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
header.top nav a:hover, header.top nav a.active {
  border-color: var(--ink);
}

main {
  flex: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 28px 64px;
  width: 100%;
}
.eyebrow {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
h1 {
  font-size: clamp(44px, 8vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  font-weight: 600;
}
h1 .ital { font-style: italic; font-weight: 400; color: var(--accent); }
h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
  font-weight: 600;
}
.lede {
  font-size: clamp(18px, 2vw, 22px);
  max-width: 58ch;
  color: #2a2a25;
  margin: 0 0 36px;
  text-wrap: pretty;
}
p { max-width: 64ch; text-wrap: pretty; }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: 36px;
}
.cell {
  background: var(--paper);
  padding: 22px 20px;
  grid-column: span 4;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cell.span-6 { grid-column: span 6; }
.cell.span-12 { grid-column: span 12; }
.cell .k {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.cell .v {
  font-size: 22px;
  letter-spacing: -0.01em;
  font-feature-settings: "tnum";
}
.cell .v small { font-size: 13px; color: var(--muted); margin-left: 4px; }
@media (max-width: 720px) {
  .cell, .cell.span-6 { grid-column: span 12; }
}

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
button.btn, a.btn {
  font: inherit; font-size: 15px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 12px 20px;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
  display: inline-block;
  transition: transform 80ms ease, background 120ms ease, color 120ms ease;
}
button.btn:hover, a.btn:hover { background: var(--accent); border-color: var(--accent); }
button.btn:active { transform: translateY(1px); }
button.btn.ghost, a.btn.ghost { background: transparent; color: var(--ink); }
button.btn.ghost:hover, a.btn.ghost:hover { background: var(--ink); color: var(--paper); }

.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.swatch { aspect-ratio: 1/1; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
@media (max-width: 720px) { .swatches { grid-template-columns: repeat(2, 1fr); } }

.type-row { border-top: 1px solid var(--rule); padding: 18px 0; display: flex; align-items: baseline; gap: 24px; }
.type-row .label { font-family: ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); width: 110px; flex-shrink: 0; }

footer {
  border-top: 1px solid var(--rule);
  padding: 18px 28px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.haiku-out {
  border: 1px solid var(--rule);
  padding: 24px;
  min-height: 140px;
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  white-space: pre-wrap;
  background: #fff;
  margin-top: 16px;
}
.haiku-out.empty { color: var(--muted); font-style: italic; }
.haiku-out.thinking::after {
  content: "▍";
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
input.text, select.text {
  font: inherit;
  font-size: 15px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 0;
  min-width: 240px;
}

.big-num {
  font-size: clamp(140px, 30vw, 320px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0;
  color: var(--accent);
}
