/* ============================================================
   Shared chrome for the Layr internal doc pages — the releases
   index, every release-notes page, and the dev process page.
   ONE stylesheet so releases read as a series rather than a pile:
   `promote-to-prod` writes only a page body and links this, so a
   generated release cannot drift from the house style or require
   design decisions at release time.

   These are the PRODUCT's tokens, lifted from src/app/globals.css
   rather than approximated — navy stage, lime accent, Hanken
   Grotesk over IBM Plex Mono. A release page should look like the
   thing it is describing.

   The product's own rule, kept here: lime is the single loud
   accent, and anything solid-lime carries navy text
   (--on-accent), never white.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  /* --- product palette, default (navy) theme --- */
  --bg: #131f28;
  --bg-raised: #16252f;
  --bg-inset: #12202b;
  --line: #2a3d49;
  --line-soft: #223440;
  --ink: #eef4f6;
  --ink-2: #b3c3cd;
  --ink-3: #8799a4;
  --accent: #cdf468;          /* lime — the one loud accent */
  --on-accent: #16242e;       /* navy, never white, on solid lime */
  --accent-dim: #6f8f2f;
  --blue: #7ab3f5;
  --yellow: #e8a33d;
  --green: #3ecf8e;
  --danger: #e25550;
  --accent-bg: rgba(205,244,104,.10);
  --good-bg: rgba(62,207,142,.13);
  --warn-bg: rgba(232,163,61,.13);
  --info-bg: rgba(122,179,245,.13);
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --shadow: 0 8px 32px rgba(0,0,0,.4);
  color-scheme: dark;
}

/* The product ships a `light` theme; mirror its structural tokens rather than
   inverting the dark ones. Lime is unchanged — it is the constant. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #e7ebee; --bg-raised: #f2f5f7; --bg-inset: #dde3e7;
    --line: #cbd4da; --line-soft: #d8e0e5;
    --ink: #263038; --ink-2: #46555f; --ink-3: #62727c;
    --accent-dim: #5d7a26;
    --accent-bg: rgba(205,244,104,.30);
    --good-bg: rgba(62,207,142,.16); --warn-bg: rgba(232,163,61,.18);
    --info-bg: rgba(122,179,245,.18);
    --shadow: 0 6px 24px rgba(38,48,56,.12);
    color-scheme: light;
  }
}
:root[data-theme="dark"] {
  --bg: #131f28; --bg-raised: #16252f; --bg-inset: #12202b;
  --line: #2a3d49; --line-soft: #223440;
  --ink: #eef4f6; --ink-2: #b3c3cd; --ink-3: #8799a4;
  --accent-dim: #6f8f2f;
  --accent-bg: rgba(205,244,104,.10); --good-bg: rgba(62,207,142,.13);
  --warn-bg: rgba(232,163,61,.13); --info-bg: rgba(122,179,245,.13);
  --shadow: 0 8px 32px rgba(0,0,0,.4); color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #e7ebee; --bg-raised: #f2f5f7; --bg-inset: #dde3e7;
  --line: #cbd4da; --line-soft: #d8e0e5;
  --ink: #263038; --ink-2: #46555f; --ink-3: #62727c;
  --accent-dim: #5d7a26;
  --accent-bg: rgba(205,244,104,.30); --good-bg: rgba(62,207,142,.16);
  --warn-bg: rgba(232,163,61,.18); --info-bg: rgba(122,179,245,.18);
  --shadow: 0 6px 24px rgba(38,48,56,.12); color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
strong { font-weight: 650; color: var(--ink); }
code {
  font-family: var(--mono); font-size: .84em; background: var(--bg-inset);
  border: 1px solid var(--line-soft); padding: .1em .38em; border-radius: 4px;
  color: var(--ink-2); white-space: nowrap;
}
.shell { max-width: 820px; margin: 0 auto; padding: 0 24px 110px; }

/* The product's label idiom: tiny mono, bold, wide tracking, uppercase.
   It appears on every panel header in the app, so it belongs here. */
.eyebrow {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
p, ul, ol { color: var(--ink-2); margin-bottom: 14px; }
p.lede { font-size: 18.5px; line-height: 1.55; color: var(--ink); }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 8px; }
li::marker { color: var(--accent-dim); }

/* the product wordmark, same geometry and lime as the app's login mark */
.brand {
  /* flex, not inline-flex: the back link and eyebrow that follow must start on
     their own line rather than flowing alongside the wordmark. */
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
  color: var(--ink); text-decoration: none; width: fit-content;
}
.brand:hover { text-decoration: none; }
.brand span { font-size: 21px; font-weight: 800; letter-spacing: -.035em; }
.brand i { color: var(--accent); font-style: normal; }

/* release header */
header.rel { padding-top: 56px; margin-bottom: 44px; }
.rel-back {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); display: inline-block; margin-bottom: 22px;
}
.rel-back:hover { color: var(--accent); text-decoration: none; }
h1 {
  font-size: clamp(31px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em;
  line-height: 1.05; margin-bottom: 15px; text-wrap: balance; color: var(--ink);
}
/* The version as a lime pill — the product's own way of marking the one thing
   that matters on a header row. */
h1 .v {
  display: inline-block; font-family: var(--mono); font-size: 15px; font-weight: 700;
  letter-spacing: -.01em; background: var(--accent); color: var(--on-accent);
  padding: 3px 11px; border-radius: 999px; vertical-align: middle;
  margin-left: 12px; transform: translateY(-4px);
}
.rel-meta {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 18px;
  padding-top: 15px; border-top: 1px solid var(--line);
}
.rel-meta span + span::before { content: "·"; margin: 0 9px; color: var(--line); }

section { margin-top: 50px; scroll-margin-top: 24px; }
h2 {
  font-size: 23px; font-weight: 750; letter-spacing: -.02em; color: var(--ink);
  border-bottom: 1px solid var(--line); padding-bottom: 11px; margin-bottom: 20px;
  text-wrap: balance;
}
h3 { font-size: 16.5px; font-weight: 700; margin: 26px 0 9px; color: var(--ink); letter-spacing: -.01em; }

/* chips, matching the app's pills */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono);
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-3); background: var(--bg-inset);
  white-space: nowrap; vertical-align: middle;
}
.chip.good { color: var(--green); background: var(--good-bg); border-color: transparent; }
.chip.warn { color: var(--yellow); background: var(--warn-bg); border-color: transparent; }
.chip.staged { color: var(--blue); background: var(--info-bg); border-color: transparent; }
.chip.accent { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

.card {
  border: 1px solid var(--line); background: var(--bg-raised); border-radius: 12px;
  padding: 19px 21px; margin-bottom: 13px;
}
.card h3 { margin-top: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; color: var(--ink-2); }
th {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); border-bottom-color: var(--line);
}
td strong { color: var(--ink); }
.tw { overflow-x: auto; }

.note { border-left: 2px solid var(--accent-dim); padding-left: 15px; color: var(--ink-3); font-size: 14.5px; }
.callout {
  border: 1px solid var(--accent-dim); background: var(--accent-bg);
  border-radius: 12px; padding: 19px 21px; margin: 22px 0;
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* index-only: the release list */
.rlist { list-style: none; padding: 0; margin: 26px 0 0; }
.rlist li { margin: 0; border-bottom: 1px solid var(--line-soft); }
.rlist a {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 16px 12px; color: var(--ink-2); border-radius: 8px;
}
.rlist a:hover { text-decoration: none; background: var(--bg-raised); }
.rlist .rv {
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent);
  min-width: 58px; letter-spacing: -.01em;
}
.rlist .rt { color: var(--ink); font-weight: 600; flex: 1 1 260px; letter-spacing: -.01em; }
.rlist .rd {
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}

footer {
  margin-top: 66px; padding-top: 20px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3);
}

/* ── dev-process page only ────────────────────────────────────────────────
   A pipeline is a sequence, so it is drawn as one: numbered stages down a
   rail, rather than a table the reader has to reassemble in their head. */
.rail { list-style: none; padding: 0; margin: 26px 0 0; position: relative; }
.rail::before {
  content: ""; position: absolute; left: 15px; top: 12px; bottom: 12px;
  width: 2px; background: var(--line);
}
.rail > li { position: relative; padding: 0 0 26px 48px; }
.rail > li:last-child { padding-bottom: 0; }
.rail .n {
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; flex: none;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-3);
}
.rail > li.is-auto .n { border-color: var(--accent); color: var(--accent); }
.rail h3 { margin-top: 3px; }
.rail p:last-child, .rail ul:last-child { margin-bottom: 0; }

/* who does it — one glance, used in the rail and the summary table */
.who {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono);
  font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap; vertical-align: middle;
}
.who.auto { color: var(--on-accent); background: var(--accent); }
.who.human { color: var(--blue); background: var(--info-bg); }

/* a command the reader will copy */
pre {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  background: var(--bg-inset); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 13px 15px; margin: 13px 0;
  overflow-x: auto; color: var(--ink-2);
}
pre code { background: none; border: none; padding: 0; font-size: inherit; white-space: pre; }

/* a warning that has already cost someone time */
.trap { border: 1px solid var(--yellow); background: var(--warn-bg); border-radius: 12px; padding: 17px 19px; margin: 20px 0; }
.trap h3 { margin-top: 0; color: var(--ink); }
.trap p:last-child, .trap ul:last-child { margin-bottom: 0; }

nav.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
nav.jump a {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px;
}
nav.jump a:hover { color: var(--accent); border-color: var(--accent-dim); text-decoration: none; }
