/*
 * Agency Packs hub. The editor look from the Agency Score app (GTFO_Roadmap
 * DESIGN.md): role tokens for both themes, IBM Plex Sans for words and Plex
 * Mono for figures and file names, self-hosted. Yellow is the earned fill and
 * only appears in the wordmark square here, because nothing is earned yet.
 * No em or en dashes anywhere: scripts/brand-check.mjs fails if there are.
 */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg-title: #181a1f;
  --bg-panel: #1e2127;
  --bg-surface: #23272e;
  --bg-raised: #2a2f37;
  --bg-hover: #2e333c;
  --line: #323741;
  --line-strong: #434956;
  --text: #d6d9df;
  --text-muted: #b0b5bf;
  --text-faint: #959ba6;
  --accent: #6fa8f0;
  --earned: #ffe900;
  --good: #98c379;
  --info: #b39af0;
  --callout: color-mix(in srgb, #d2fdff 9%, #23272e);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg-title: #e9ebef;
    --bg-panel: #f2f3f5;
    --bg-surface: #fbfbfc;
    --bg-raised: #ffffff;
    --bg-hover: #e6e8ec;
    --line: #dadde3;
    --line-strong: #c3c7cf;
    --text: #23262d;
    --text-muted: #4a505b;
    --text-faint: #616772;
    --accent: #3b66a8;
    --good: #32742e;
    --info: #6b4fc0;
    --callout: #e3fdff;
  }
}
:root {
  --radius-tag: 3px;
  --radius-control: 5px;
  --radius-card: 6px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1120px;
  --gutter: 24px;
}
/* End of tokens: no raw colours below this line. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 24px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-tag); }
.mono, .files, .file-lines, .step-num, .crumb { font-family: var(--mono); }

/* ---- Title bar ---- */
.titlebar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 var(--gutter);
  background: var(--bg-title);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.wordmark:hover { text-decoration: none; }
.wordmark-mark { width: 13px; height: 13px; border-radius: var(--radius-tag); background: var(--earned); flex: none; }
.crumb { color: var(--text-faint); font-size: 12.5px; }
.crumb .sep { margin-right: 10px; }
.titlebar-nav { margin-left: auto; display: flex; gap: 4px; }
.titlebar-nav a { color: var(--text-muted); padding: 4px 8px; border-radius: var(--radius-control); }
.titlebar-nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }

/* ---- Layout ---- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 64px 0; border-top: 1px solid var(--line); }
h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.06; font-weight: 600; letter-spacing: -0.02em; max-width: 13ch; }
h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; }
.lede { font-size: 18px; color: var(--text-muted); max-width: 560px; }
.section-lede { color: var(--text-muted); margin-top: 6px; }
.micro { font-size: 12.5px; color: var(--text-faint); }
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 80px 0 72px;
}
.hero-copy { display: grid; gap: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-control);
  font: 500 14px/1 var(--sans);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
}
.btn-quiet:hover { background: var(--bg-hover); text-decoration: none; }
/* The "not yet" gate: dashed, unfilled, faint. Nothing here is blocked or earned. */
.btn-soon {
  background: transparent;
  border-style: dashed;
  color: var(--text-faint);
  cursor: not-allowed;
}

/* ---- Chips ---- */
.chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-tag);
  border: 1px solid currentColor;
  font: 500 11.5px/1 var(--sans);
}
.chip-good { color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
.chip-info { color: var(--info); background: color-mix(in srgb, var(--info) 10%, transparent); }
.chip-faint { color: var(--text-faint); }

/* ---- The example file ---- */
.file {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  overflow: hidden;
}
.file-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-title);
}
.file-name { font: 500 12.5px var(--mono); color: var(--text-muted); }
.file-lines {
  list-style: none;
  counter-reset: line;
  padding: 14px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}
.file-lines li {
  counter-increment: line;
  position: relative;
  padding: 0 16px 0 44px;
  min-height: 1.7em;
}
.file-lines li::before {
  content: counter(line);
  position: absolute;
  left: 0;
  width: 30px;
  color: var(--text-faint);
  text-align: right;
  opacity: 0.7;
}
.file-lines b { color: var(--text); font-weight: 500; }
.md-h1, .md-h2 { color: var(--text); font-weight: 500; }
.md-mark { color: var(--text-faint); margin-right: 6px; }
.file figcaption { padding: 10px 14px; border-top: 1px solid var(--line); }

/* ---- Packs ---- */
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.pack {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 14px;
  padding: 22px 22px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
}
.pack-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pack > p:not(.label) { color: var(--text-muted); }
.pack .label { margin-top: 4px; }
.files { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-content: start; font-size: 12.5px; }
.files li { padding: 3px 8px; border: 1px solid var(--line); border-radius: var(--radius-tag); background: var(--bg-surface); color: var(--text-muted); }
.pack .btn { justify-self: start; }

/* ---- Steps ---- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-control);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}
.steps p { color: var(--text-muted); margin-top: 6px; }

/* ---- Why ---- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.split p { color: var(--text-muted); }
.split h2 + p { margin-top: 12px; }
.callout { background: var(--callout); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px 22px; display: grid; gap: 8px; }
.callout p:not(.label) { color: var(--text); }

/* ---- Footer and status bar ---- */
.footer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--text-faint);
}
.statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: var(--bg-title);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-faint);
}
.statusbar .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }

/* ---- Narrow screens ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 56px 0 56px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .crumb, .titlebar-nav a:not(:first-child) { display: none; }
  .packs { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 48px 0; }
  .lede { font-size: 16px; }
  .actions .btn { flex: 1 1 100%; }
  .file-lines { font-size: 12px; }
  .file-lines li { padding-left: 36px; }
  .file-lines li::before { width: 24px; }
}
