/* agicook — quiet typography, lab-notebook metadata, one loud pink. */

:root {
  --bg:        #faf8f5;
  --surface:   #ffffff;
  --text:      #17161b;
  --muted:     #6c6878;
  --rule:      #e4e0d9;
  --accent:    #d6006b;
  --accent-in: #ffffff;
  --accent-bg: #fdeaf3;
  --measure:   36rem;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0f0e13;
    --surface:   #16151c;
    --text:      #eceaf1;
    --muted:     #918ca0;
    --rule:      #29262f;
    --accent:    #ff5cb2;
    --accent-in: #17161b;
    --accent-bg: #26101c;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap--wide { max-width: 42rem; }

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

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

.masthead { padding: 5rem 0 0; }

.brand {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
}
.brand::after {
  content: "";
  display: inline-block;
  width: 0.42em; height: 0.42em;
  margin-left: 0.45em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.08em;
}
a.brand:hover { text-decoration: none; }

.lede {
  margin: 1.75rem 0 0;
  font-size: 1.375rem;
  line-height: 1.45;
  letter-spacing: -0.011em;
  max-width: 26ch;
  text-wrap: balance;
}
.lede em { font-style: italic; color: var(--muted); }

/* ---------- section headings ---------- */

.section {
  margin: 4.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.section > h2 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

/* ---------- experiment cards ---------- */

.cards { list-style: none; margin: 0; padding: 0; }

.card { padding: 0 0 1.9rem; margin: 0 0 1.9rem; border-bottom: 1px solid var(--rule); }
.card:last-child { border-bottom: 0; margin-bottom: 0; }

.card h3 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.008em;
  margin: 0 0 0.4rem;
}
.card h3 a { text-decoration: none; color: var(--text); background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%; }
.card h3 a:hover { color: var(--accent); }

.card p { margin: 0 0 0.7rem; color: var(--muted); }

/* the lab-notebook line: mono, factual, undecorated */
.meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem;
}
.meta .sep { opacity: 0.45; }
.meta .status { color: var(--text); }
.meta .status::before {
  content: "";
  display: inline-block;
  width: 0.4em; height: 0.4em;
  margin-right: 0.45em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.1em;
}
.status--live     { color: var(--accent); }
.status--progress { color: var(--muted); }
.status--draft    { color: var(--muted); opacity: 0.8; }

/* ---------- log ---------- */

.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li { margin: 0 0 1.4rem; }
.log-list a { color: var(--text); text-decoration: none; }
.log-list a:hover { color: var(--accent); }
.log-list .t { display: block; font-size: 1.0625rem; }
.log-list time {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- long-form prose ---------- */

.prose { padding: 3.5rem 0 0; }

.prose h1 {
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.021em;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}
.byline {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 3rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

.prose h2 {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 3.2rem 0 1rem;
  text-wrap: balance;
}
.prose h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.4rem 0 0.8rem;
}
.prose p { margin: 0 0 1.35rem; }
.prose > p:first-of-type { font-size: 1.15rem; line-height: 1.6; }

/* crew dialogue — the thing that makes the essay readable on screen */
.prose blockquote {
  margin: 1.9rem 0;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--text);
}
.prose blockquote p { margin: 0 0 0.7rem; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* the parsed tracker file */
.prose pre {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.65;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.4rem 1.5rem;
  overflow-x: auto;
  margin: 1.9rem 0;
}
.prose code { font-family: var(--mono); font-size: 0.86em; }
.prose pre code { font-size: inherit; }

.prose ul, .prose ol { margin: 0 0 1.35rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* a section written by a different voice */
.prose .aside-voice {
  margin: 2.6rem 0;
  padding: 1.5rem 1.6rem;
  background: var(--accent-bg);
  border-radius: 3px;
  font-size: 0.95rem;
}
.prose .aside-voice p:last-child { margin-bottom: 0; }

.footnote {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.refs { font-size: 0.85rem; color: var(--muted); }
.refs li { margin-bottom: 0.7rem; }
.refs a { word-break: break-word; }

/* ---------- footer ---------- */

.foot {
  margin-top: 6rem;
  padding: 1.4rem 0 4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }

.back {
  display: inline-block;
  margin-top: 3.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

@media (max-width: 34rem) {
  .masthead { padding-top: 3.25rem; }
  .lede { font-size: 1.2rem; max-width: none; }
  .prose h1 { font-size: 1.75rem; }
  .section { margin-top: 3.5rem; }
}

/* a long passage in someone else's voice */
.prose .voice {
  margin: 2.2rem 0 2.6rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--rule);
  color: var(--muted);
}
.prose .voice p:last-child { margin-bottom: 0; }
.prose .footnote { margin: -0.4rem 0 1.6rem; }

/* ============================================================
   THE INDEX — wide, asymmetric, loud. The essay stays narrow;
   this surface does not have to behave.
   ============================================================ */

:root { --teal: #0a7a6c; --display: "Bricolage Grotesque", "Newsreader", sans-serif; }
@media (prefers-color-scheme: dark) { :root { --teal: #45c2ab; } }

.wide { max-width: 78rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

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

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }

.field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}

.hero-inner {
  position: relative;
  padding: clamp(4rem, 13vh, 9rem) 0 clamp(2.5rem, 6vh, 4rem);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.6rem, 17vw, 15rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
  margin: 0;
  background: linear-gradient(96deg, var(--accent) 0%, var(--text) 42%, var(--teal) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.tagline {
  font-family: var(--mono);
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  letter-spacing: 0.34em;
  text-transform: lowercase;
  color: var(--accent);
  margin: 1.6rem 0 0;
}

/* ---------- the map: loose nodes, drawn connections ---------- */

.map { position: relative; padding: 2.5rem 0 1rem; }

.map .links {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
.map .links path {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 2 7;
}

.node {
  position: relative;
  width: min(var(--w, 25rem), 100%);
  margin-left: var(--dx, 0);
  margin-bottom: var(--gap, 3.4rem);
  padding-left: 1.9rem;
}
.node .dot {
  position: absolute; left: 0; top: 0.62em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rule);
  outline: 4px solid var(--bg);
  transition: background .18s ease, transform .18s ease;
}
.node.is-live .dot { background: var(--accent); }

.node h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs, 1.5rem);
  line-height: 1.06;
  letter-spacing: -0.024em;
  margin: 0 0 0.55rem;
  text-wrap: balance;
}
.node h3 a { color: var(--text); text-decoration: none; }
.node p { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.97rem; }
.node .meta { margin: 0; }

.node.is-live:hover h3 a,
.node.is-live:focus-within h3 a { color: var(--accent); }
.node.is-live:hover .dot { transform: scale(1.55); }
.node.is-dim { opacity: 0.66; }
.node.is-dim .dot { background: var(--rule); }

/* the log: smaller satellites, same language */
.node--log { --w: 21rem; --gap: 2rem; }
.node--log h3 { font-family: var(--serif); font-weight: 400; font-size: 1.08rem; letter-spacing: -0.005em; }
.node--log .dot { width: 6px; height: 6px; top: 0.55em; }

@media (min-width: 56rem) {
  .map--exp .node:nth-child(2) { --dx: 6%;  --w: 30rem; --fs: 2.6rem; }
  .map--exp .node:nth-child(3) { --dx: 34%; --w: 24rem; }
  .map--exp .node:nth-child(4) { --dx: 3%;  --w: 22rem; }
  .map--exp .node:nth-child(5) { --dx: 41%; --w: 26rem; }
  .map--exp .node:nth-child(6) { --dx: 12%; --w: 23rem; }
  .map--exp .node:nth-child(7) { --dx: 47%; --w: 24rem; }

  /* log satellites cycle through offsets, so the map keeps drifting as it grows */
  .map--log .node:nth-child(6n+2) { --dx: 22%; }
  .map--log .node:nth-child(6n+3) { --dx: 48%; }
  .map--log .node:nth-child(6n+4) { --dx: 8%;  }
  .map--log .node:nth-child(6n+5) { --dx: 36%; }
  .map--log .node:nth-child(6n+6) { --dx: 15%; }
  .map--log .node:nth-child(6n+7) { --dx: 42%; }
}
}

.wide .foot { margin-top: 3.5rem; }

.meta .topic { color: var(--accent); }

/* a log entry drawn back to the experiment its topic names */
.maps { position: relative; }
.crosslinks {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
.crosslinks path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.25;
  stroke-dasharray: 1 6;
  stroke-linecap: round;
  opacity: 0.34;
  transition: opacity .2s ease, stroke-width .2s ease;
}
.crosslinks path.is-active { opacity: 1; stroke-width: 1.8; stroke-dasharray: none; }
.node.is-linked .dot { transform: scale(1.55); background: var(--accent); }
a.topic { text-decoration: none; }
a.topic:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* dormant: paused, not finished — a ring rather than a filled mark */
.status--dormant { color: var(--muted); }
.status--dormant::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.node.is-dormant .dot {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--muted);
}
.node.is-dormant:hover .dot { box-shadow: inset 0 0 0 2px var(--accent); }

/* pinned versions, listed on the card that links to the latest */
.meta .versions { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.meta .versions a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.meta .versions a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- rule labels ---------- */
/* Used by the index, the log and the kitchen. Was markup with no styling until
   2026-08-31 — the label and its count rendered as bare inline text. */

.rule-label {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 3rem 0 0;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.rule-label > :last-child { margin-left: auto; font-variant-numeric: tabular-nums; }
.rule-label > :only-child { margin-left: 0; }
.rule-label a { color: var(--muted); text-decoration: none; }
.rule-label a:hover { color: var(--accent); }

