/* AI Industrialization — IBM Carbon-derived styles, ported from the signed-off
   prototype. Colors and type scale match it; don't redesign, extend. */

:root {
  --blue: #0f62fe;
  --blue-hover: #0043ce;
  --blue-light: #78a9ff;
  --ink: #161616;
  --ink-2: #393939;
  --ink-3: #525252;
  --gray: #6f6f6f;
  --gray-2: #8d8d8d;
  --line: #e0e0e0;
  --line-2: #c6c6c6;
  --line-dark: #393939;
  --faint: #a8a8a8;
  --bg-alt: #f4f4f4;
  --wrap: 1312px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: #fff;
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

.mono, .mono-label { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

.mono-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}

.dim { color: var(--gray); }
.accent { color: var(--blue); }

.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.tick { width: 32px; height: 2px; background: var(--blue); display: block; }
.tick-light { background: var(--blue-light); }

/* --- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner { height: 64px; display: flex; align-items: center; gap: 40px; }

.brand { display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--ink); }
.brand-org {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

.site-nav { display: flex; gap: 28px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--blue); }
.site-nav a.current { border-bottom-color: var(--blue); }

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

.hero-section { border-bottom: 1px solid var(--line); }

.hero {
  padding: 96px 32px 88px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 80px;
  align-items: start;
}

.hero-h1 {
  font-size: 46px;
  line-height: 1.18;
  font-weight: 300;
  letter-spacing: -0.022em;
  max-width: 22ch;
  text-wrap: pretty;
}

.hero-lede {
  margin-top: 32px;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 21px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}

.hero-cta { display: flex; gap: 16px; margin-top: 44px; flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  font-size: 15px;
  padding: 14px 22px;
  text-decoration: none;
  display: inline-block;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-secondary { border: 1px solid var(--gray-2); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); background: var(--bg-alt); }

.hero-aside {
  border-left: 1px solid var(--line);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero-aside-p { font-size: 15px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }

.workloads { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.workload {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.workload-n { font-size: 11px; color: var(--faint); min-width: 22px; }
.workload-name { font-size: 14px; }

/* --- writing section --- */

.writing-section { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.writing-section .wrap { padding-top: 80px; padding-bottom: 96px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 15px; font-weight: 500; letter-spacing: 0.12em; }
.section-note { font-size: 14px; color: var(--gray); }

.lead { background: #fff; border: 1px solid var(--line); margin-bottom: 2px; }
.lead-link {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  text-decoration: none;
  color: var(--ink);
}
.lead-empty { padding: 0; }
.lead-body { padding: 56px 56px 52px; }
.lead-title {
  margin-top: 18px;
  font-size: 36px;
  line-height: 1.22;
  font-weight: 400;
  letter-spacing: -0.018em;
  max-width: 24ch;
  text-wrap: pretty;
}
.lead-blurb {
  margin-top: 20px;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-3);
  max-width: 52ch;
  text-wrap: pretty;
}
.lead-meta {
  margin-top: 36px;
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 13px;
  color: var(--gray);
  flex-wrap: wrap;
}
.rule { width: 1px; height: 12px; background: var(--line-2); display: block; }

.lead-side {
  background: var(--ink);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}
.lead-side-label { color: var(--blue-light); }
.lead-side-list { display: flex; flex-direction: column; margin-top: 40px; }
.lead-side-item {
  padding: 10px 0;
  border-top: 1px solid var(--line-dark);
  font-size: 14px;
  color: var(--line-2);
}
.lead-side-cta { padding-top: 20px; font-size: 15px; color: var(--blue-light); }

.next-up {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 2px solid var(--blue);
  padding: 44px 56px 40px;
  margin-bottom: 2px;
  text-decoration: none;
  color: var(--ink);
}
.next-up:hover { border-color: var(--blue); }
.next-up-title {
  margin-top: 16px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: -0.015em;
  max-width: 32ch;
  text-wrap: pretty;
}
.next-up-blurb {
  margin-top: 16px;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-3);
  max-width: 60ch;
  text-wrap: pretty;
}
.next-up .lead-meta { margin-top: 28px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 36px 32px 32px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
}
.card:hover { border-color: var(--blue); }
.card-title { font-size: 22px; line-height: 1.28; font-weight: 400; letter-spacing: -0.012em; text-wrap: pretty; }
.card-blurb { font-size: 15px; line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }
.card-meta {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  color: var(--gray);
  border-top: 1px solid var(--bg-alt);
}
.card-coming { background: #fbfbfb; }
.card-coming .card-title { color: var(--ink-2); }

/* --- what we do --- */

.what-we-do {
  padding-top: 88px;
  padding-bottom: 88px;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 80px;
}
.what-we-do h2 { font-size: 15px; font-weight: 500; letter-spacing: 0.12em; }
.cap-list { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.cap-row {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
}
.cap-title { font-size: 22px; font-weight: 400; letter-spacing: -0.012em; line-height: 1.3; text-wrap: pretty; }
.cap-body { font-size: 16px; line-height: 1.68; color: var(--ink-2); text-wrap: pretty; }

/* --- about --- */

.about-hero { background: var(--ink); color: #fff; }
.about-hero .wrap { padding-top: 104px; padding-bottom: 96px; }
.about-hero .mono-label { color: var(--faint); }
.about-h1 {
  font-size: 52px;
  line-height: 1.14;
  font-weight: 300;
  letter-spacing: -0.024em;
  max-width: 26ch;
  text-wrap: pretty;
}

.about-cols-section { border-bottom: 1px solid var(--line); }
.about-cols {
  padding-top: 80px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 64px;
}
.about-p { font-size: 17px; line-height: 1.72; color: var(--ink-2); text-wrap: pretty; }

.principles-section { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.principles-section .wrap { padding-top: 80px; padding-bottom: 88px; }
.principles-head { margin-bottom: 48px; font-size: 15px; font-weight: 500; letter-spacing: 0.12em; }
.principle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2px; }
.principle {
  background: #fff;
  border: 1px solid var(--line);
  padding: 40px 32px 44px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.principle .mono { font-size: 12px; }
.principle-title { font-size: 26px; font-weight: 400; letter-spacing: -0.016em; line-height: 1.25; text-wrap: pretty; }
.principle-body { font-size: 16px; line-height: 1.68; color: var(--ink-2); text-wrap: pretty; }

.about-caps { padding-top: 88px; padding-bottom: 96px; }
.about-caps h2 { margin-bottom: 56px; font-size: 15px; font-weight: 500; letter-spacing: 0.12em; }
.cap-list-wide { display: flex; flex-direction: column; gap: 2px; }
.cap-row-wide {
  border-top: 1px solid var(--ink);
  padding: 40px 0 44px;
  display: grid;
  grid-template-columns: minmax(0, 80px) minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
  align-items: start;
}
.cap-n { font-size: 12px; color: var(--faint); padding-top: 6px; }
.cap-title-wide { font-size: 28px; font-weight: 400; letter-spacing: -0.018em; line-height: 1.22; text-wrap: pretty; }
.cap-body-wide {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* --- calendar --- */

.cal-hero { border-bottom: 1px solid var(--line); }
.cal-hero .wrap { padding-top: 88px; padding-bottom: 72px; }
.cal-h1 { font-size: 46px; line-height: 1.18; font-weight: 300; letter-spacing: -0.022em; text-wrap: pretty; }
.cal-lede {
  margin-top: 24px;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 62ch;
  text-wrap: pretty;
}

.cal-section .wrap { padding-top: 64px; padding-bottom: 72px; }
.cal-section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); }
.cal-group-head { display: block; margin-bottom: 32px; font-size: 15px; font-weight: 500; letter-spacing: 0.12em; }

.cal-list { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.cal-row {
  display: grid;
  grid-template-columns: minmax(0, 160px) minmax(0, 1fr) minmax(0, 130px);
  gap: 40px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.cal-date { font-size: 13px; color: var(--ink); padding-top: 2px; }
.cal-main { display: flex; flex-direction: column; gap: 10px; }
.cal-title { font-size: 22px; font-weight: 400; letter-spacing: -0.012em; line-height: 1.3; text-wrap: pretty; }
.cal-title a { color: var(--ink); text-decoration: none; }
.cal-title a:hover { color: var(--blue); }
.cal-blurb { font-size: 15px; line-height: 1.6; color: var(--ink-3); max-width: 68ch; text-wrap: pretty; }
.cal-authors { font-size: 13px; color: var(--gray); }
.cal-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  justify-self: start;
  white-space: nowrap;
}
.cal-scheduled { background: #edf5ff; color: var(--blue-hover); }
.cal-published { background: var(--ink); color: #fff; }
.cal-empty { font-size: 16px; color: var(--gray); }

/* --- post --- */

.post-header { border-bottom: 1px solid var(--line); }
.post-header .wrap { padding-top: 72px; padding-bottom: 64px; }
.back { text-decoration: none; display: inline-block; }
.post-h1 {
  margin-top: 32px;
  font-size: 56px;
  line-height: 1.1;
  font-weight: 300;
  letter-spacing: -0.028em;
  max-width: 20ch;
  text-wrap: pretty;
}
.post-lede {
  margin-top: 28px;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 23px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 46ch;
  text-wrap: pretty;
}
.post-meta {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.post-meta-item { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }

.post-grid {
  padding-top: 72px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr) minmax(0, 3fr);
  gap: 48px;
}

.post-toc {
  align-self: start;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}
.toc-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  gap: 12px;
}
.toc-n { color: var(--faint); }

.post-body { max-width: 68ch; }
.post-body .post-p {
  margin-top: 28px;
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 19px;
  line-height: 1.78;
  color: var(--ink-2);
  text-wrap: pretty;
}
.post-body .post-p:first-child {
  margin-top: 0;
  font-size: 21px;
  line-height: 1.72;
  color: var(--ink);
}
.post-h2 {
  margin-top: 64px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gray);
}
.post-h2 + .post-p { margin-top: 20px; }
.post-h3 { margin-top: 40px; font-size: 24px; font-weight: 400; letter-spacing: -0.014em; }
.pull { margin-top: 44px; padding: 32px 36px; background: var(--bg-alt); border-left: 2px solid var(--blue); }
.pull p { font-size: 24px; line-height: 1.45; font-weight: 300; letter-spacing: -0.014em; text-wrap: pretty; margin: 0; }
.pull-cite {
  display: block;
  margin-top: 20px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.post-colophon {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
}
.post-steps { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: none; }
.post-step { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.post-step:last-child { border-bottom: 1px solid var(--line); }
.post-step-n {
  flex: none;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--blue);
  line-height: 28px;
  min-width: 18px;
}
.post-step-do { margin: 0 0 8px; font-size: 18px; line-height: 1.5; font-weight: 500; }
.post-step-cmd {
  display: inline-block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--bg-alt);
  padding: 6px 10px;
}
.post-list { margin-top: 24px; padding-left: 22px; }
.post-list li { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin-top: 10px; }
.post-table { margin-top: 24px; width: 100%; border-collapse: collapse; }
.post-table th,
.post-table td {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  font-size: 17px;
  line-height: 1.6;
}
.post-table tr:last-child th,
.post-table tr:last-child td { border-bottom: 1px solid var(--line); }
.post-table th { width: 32%; padding-right: 24px; font-weight: 500; color: var(--ink); }
.post-table td { color: var(--ink-2); }
.post-refs {
  margin-top: 48px;
  padding: 24px 0 0 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
}
.post-refs li { margin-top: 8px; overflow-wrap: anywhere; }
.post-refs a { color: inherit; }
.post-figure { margin-top: 40px; }
.post-figure img { display: block; width: 100%; max-width: 560px; height: auto; }
.post-figure figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray);
}
.post-body code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88em;
  background: var(--bg-alt);
  padding: 2px 5px;
}
.post-foot {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--gray);
}

.post-related {
  align-self: start;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.related-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.related-item:hover { color: var(--blue); }
.related-tags { display: flex; align-items: center; gap: 8px; }
.related-tag { font-size: 11px; color: var(--gray); }
.related-soon {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--bg-alt);
  border: 1px solid var(--blue-light);
  border-radius: 2px;
  padding: 1px 6px;
}
.related-title { font-size: 15px; line-height: 1.35; }

/* --- footer --- */

.site-footer { background: var(--ink); color: var(--line-2); }
.footer-inner {
  padding-top: 64px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 48px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--line-2); text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-name { font-size: 18px; color: #fff; }
.footer-blurb { font-size: 14px; line-height: 1.6; margin-top: 8px; max-width: 32ch; }
.footer-item { font-size: 14px; }

/* --- responsive --- */

@media (max-width: 1000px) {
  .hero, .what-we-do { grid-template-columns: 1fr; gap: 48px; }
  .hero-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 32px; }
  .lead-link { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; gap: 40px; }
  .post-toc, .post-related { position: static; }
  .cap-row-wide { grid-template-columns: 1fr; gap: 16px; }
  .cal-row { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  /* Stack brand over nav so the three links don't wrap into the logo. */
  .header-inner {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .site-nav {
    margin-left: 0;
    gap: 20px 24px;
    width: 100%;
  }
  .site-nav a { font-size: 14px; }
  .hero { padding: 56px 20px 56px; }
  .hero-h1 { font-size: 34px; }
  .hero-lede { font-size: 18px; }
  .lead-body, .lead-side { padding: 32px 24px; }
  .lead-title { font-size: 28px; }
  .next-up { padding: 32px 24px; }
  .next-up-title { font-size: 24px; }
  .about-h1 { font-size: 34px; }
  .post-h1 { font-size: 34px; }
  .post-lede { font-size: 19px; }
  .cal-h1 { font-size: 32px; }
  .cap-row { grid-template-columns: 1fr; gap: 14px; }
  .post-meta { gap: 24px; }
}


/* ── Post diagrams (figures ported from design export) ── */
/* ============================================================
   Post figures — diagram figures for "Agents as Teammates".
   Class-based port of the design-tool export. Light-only.
   Reuses :root vars from styles.css; figure-specific chrome
   colors that have no matching var are kept as literals.
   ============================================================ */

/* --- Fig. 1 — fig-needs: what an agent teammate needs + DAM wiring --- */

.fig-needs .fn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.fig-needs .fn-cell {
  background: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fig-needs .fn-key {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--blue);
}
.fig-needs .fn-lead {
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
}
.fig-needs .fn-notes {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-3);
}
.fig-needs .fn-note { display: flex; gap: 8px; align-items: center; }
.fig-needs .fn-dot { flex: none; width: 6px; height: 6px; background: var(--blue); }

.fig-needs .fn-wire {
  background: var(--ink);
  color: var(--bg-alt);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 8px;
  font-size: 14px;
}
.fig-needs .fn-wire-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--gray-2);
  width: 100%;
}
.fig-needs .fn-flow {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 8px;
}
.fig-needs .fn-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fig-needs .fn-node {
  border: 1px solid var(--ink-3);
  padding: 8px 12px;
}
.fig-needs .fn-node-active { background: var(--blue); border-color: var(--blue); }
.fig-needs .fn-step {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--blue-light);
}
.fig-needs .fn-step-active { color: #d0e2ff; }
.fig-needs .fn-sub { display: block; font-size: 12px; color: var(--faint); }
.fig-needs .fn-sub-active { color: #d0e2ff; }

@media (max-width: 640px) {
  .fig-needs .fn-pair { grid-template-columns: 1fr; }
}

/* --- Fig. 2 — fig-thread: Slack thread becomes a structured issue --- */

.fig-thread .ft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.fig-thread .ft-panel { background: #fff; display: flex; flex-direction: column; }
.fig-thread .ft-head {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.fig-thread .ft-head-name { font-weight: 600; }
.fig-thread .ft-head-meta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--gray);
}
.fig-thread .ft-head-open {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: #198038;
}
.fig-thread .ft-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 14px;
  line-height: 1.5;
}
.fig-thread .ft-msg { display: flex; gap: 12px; }
.fig-thread .ft-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}
.fig-thread .ft-av-ds { background: #e8daff; color: #491d8b; }
.fig-thread .ft-av-dv { background: #d9fbfb; color: #004144; }
.fig-thread .ft-av-pm { background: #fff1f1; color: #750e13; }
.fig-thread .ft-av-agent { background: var(--blue); color: #fff; }
.fig-thread .ft-who { font-weight: 600; }
.fig-thread .ft-time { font-weight: 400; color: var(--gray); font-size: 12px; }
.fig-thread .ft-mention { background: #d0e2ff; color: var(--blue-hover); padding: 0 3px; }
.fig-thread .ft-msg-agent {
  background: var(--bg-alt);
  margin: 0 -20px;
  padding: 14px 20px;
  box-shadow: inset 3px 0 0 var(--blue);
}
.fig-thread .ft-agent-body { min-width: 0; }
.fig-thread .ft-tag {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 11px;
  color: var(--blue);
  border: 1px solid var(--blue);
  padding: 0 4px;
  margin-left: 4px;
}
.fig-thread .ft-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-3);
}
.fig-thread .ft-issue { gap: 16px; }
.fig-thread .ft-issue-title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.fig-thread .ft-labels { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.fig-thread .ft-label { background: var(--line); padding: 2px 8px; }
.fig-thread .ft-field {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 4px;
}
.fig-thread .ft-issue-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--gray);
}

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

/* --- Fig. 3 — fig-skills: skills turn expertise into shared capability --- */

.fig-skills .fs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  align-items: stretch;
}
.fig-skills .fs-cell {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fig-skills .fs-cell-expert { background: var(--bg-alt); }
.fig-skills .fs-cell-skill { background: var(--blue); color: #fff; }
.fig-skills .fs-cell-team { background: #fff; }
.fig-skills .fs-key {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--gray);
}
.fig-skills .fs-key-skill { color: #d0e2ff; }
.fig-skills .fs-item { font-size: 16px; color: var(--ink); }
.fig-skills .fs-mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 15px;
}

/* ============================================================
   Post figures — diagram figures for "Autonomous agents are
   changing how we conduct science". Same grid-and-strip
   language as the Agents as Teammates figures above.
   ============================================================ */

/* --- fig-loop: the design-build-test-learn cycle --- */

.fig-loop .fl-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
/* Each step draws its own right and bottom edge, so every divider renders at any width. */
.fig-loop .fl-step {
  background: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fig-loop .fl-key {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--blue);
}
.fig-loop .fl-name { font-size: 20px; line-height: 1.3; color: var(--ink); }
.fig-loop .fl-desc { font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.fig-loop .fl-return {
  background: var(--ink);
  color: var(--bg-alt);
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  font-size: 14px;
}
.fig-loop .fl-return-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--blue-light);
}

/* Screen-reader-only text (used where an SVG carries the visible label). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- fig-night: an example overnight run, as a horizontal two-lane timeline.
   Time runs left to right on the axis. Researcher actions sit above it,
   agent actions below. Slack exchanges are message cards; the agent
   working alone is a dashed log. --- */

.fig-night .tl-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 0;
  font-size: 14px;
}
.fig-night .tl-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: auto 36px auto;
  column-gap: 8px;
  padding-top: 14px;
}
/* Each card starts at its own tick. Lanes never share a row, so cards can be wide. */
.fig-night .tl-r1 { grid-column: 1 / 4; }
.fig-night .tl-away { grid-column: 4 / 6; }
.fig-night .tl-r2 { grid-column: 6 / 9; }
.fig-night .tl-solo { grid-column: 2 / 5; }
.fig-night .tl-slack-a { grid-column: 5 / 8; }
.fig-night .tl-slack-r { grid-row: 1; align-self: stretch; }
.fig-night .tl-solo, .fig-night .tl-slack-a { grid-row: 3; align-self: stretch; }
/* A stem from each card to the axis: a crisp-edged SVG, so every stem renders at
   the same width wherever the card lands on the pixel grid. */
.fig-night .tl-slack-r, .fig-night .tl-solo, .fig-night .tl-slack-a { position: relative; }
.fig-night .tl-stem { position: absolute; left: 12px; display: block; }
.fig-night .tl-stem-down { bottom: -19px; }
.fig-night .tl-stem-up { top: -19px; }
.fig-night p { margin: 0; }
.fig-night .tl-when { display: none; }

/* The axis: one line across, a label at each card's stem, the overnight span in blue. */
.fig-night .tl-axis {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: subgrid;
  position: relative;
  align-items: center;
}
.fig-night .tl-axis::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--line-2);
}
.fig-night .tl-tick {
  position: relative;
  justify-self: start;
  margin-left: 18px;
  padding: 0 6px;
  background: #fff;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-3);
}
.fig-night .tl-axis .tl-c1 { grid-column: 1; }
.fig-night .tl-axis .tl-c2 { grid-column: 2 / 5; }
.fig-night .tl-axis .tl-c3 { grid-column: 5; }
.fig-night .tl-axis .tl-c4 { grid-column: 6; }
.fig-night .tl-tick-span {
  justify-self: stretch;
  margin: 0;
  padding: 0;
  height: 2px;
  background: var(--blue);
  display: flex;
  justify-content: center;
  align-items: center;
}
.fig-night .tl-tick-lbl { padding: 0 6px; background: #fff; color: var(--blue-hover); }

.fig-night .tl-who {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.fig-night .tl-mark { flex: none; width: 8px; height: 8px; }
.fig-night .tl-mark-r { border: 1.5px solid var(--ink); }
.fig-night .tl-mark-a { background: var(--blue); border-radius: 50%; }

/* Agent working alone: a dashed, log-style block. */
.fig-night .tl-solo {
  padding: 10px 12px;
  border: 1.5px dashed var(--blue);
}
.fig-night .tl-log {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.fig-night .tl-log li { display: grid; grid-template-columns: 42px 1fr; align-items: baseline; }
.fig-night .tl-log-t { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; color: var(--gray); }
.fig-night .tl-log-best { color: var(--blue-hover); font-weight: 600; }
.fig-night .tl-away {
  justify-self: center;
  padding-bottom: 6px;
  font-size: 13px;
  font-style: italic;
  color: var(--gray);
}

/* Slack exchanges: message cards. */
.fig-night .tl-slack {
  padding: 10px 10px 10px;
  background: #fff;
  border: 1px solid var(--line-2);
  font-size: 13px;
  line-height: 1.45;
}
.fig-night .tl-msg { display: flex; gap: 8px; }
.fig-night .tl-av {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}
.fig-night .tl-av-a { background: var(--blue); color: #fff; }
.fig-night .tl-av-r { background: #e8daff; color: #491d8b; }
.fig-night .tl-name { font-weight: 600; }
.fig-night .tl-mention { background: #d0e2ff; color: var(--blue-hover); padding: 0 3px; }
.fig-night .tl-tag {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 400;
  font-size: 10px;
  color: var(--blue-hover);
  border: 1px solid var(--blue-hover);
  padding: 0 3px;
  margin-left: 2px;
}

@media (max-width: 760px) {
  /* Too narrow for four columns: one column in time order, each card shows its time. */
  .fig-night .tl-grid { display: flex; flex-direction: column; gap: 10px; }
  .fig-night .tl-axis, .fig-night .tl-away { display: none; }
  .fig-night .tl-grid > * { align-self: stretch; }
  .fig-night .tl-stem { display: none; }
  .fig-night .tl-when {
    display: block;
    margin-bottom: 4px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--ink-3);
  }
}

/* --- fig-team: individual loops sharing one knowledge base and channel --- */

.fig-team .ftm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 0;
  font-size: 14px;
}
.fig-team .ftm-loops {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding-top: 20px;
}
.fig-team .ftm-loop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.fig-team .ftm-ring { display: block; width: min(132px, 100%); height: auto; }
.fig-team .ftm-loop-name { font-size: 14px; color: var(--ink); }
/* Stems from each loop to the bus, drawn in one SVG with crisp edges so all three
   render at the same width as the bus. */
.fig-team .ftm-stems { display: block; width: 100%; height: 16px; margin-top: 6px; }
.fig-team .ftm-bus {
  height: 2px;
  background: var(--ink-3);
  margin: 0 calc(100% / 6);
}
.fig-team .ftm-dests {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.fig-team .ftm-dest { display: flex; flex-direction: column; }
.fig-team .ftm-io {
  flex: 1;
  min-height: 112px;
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  gap: 10px;
}
.fig-team .ftm-io p { margin: 16px 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); align-self: start; }
.fig-team .ftm-in { text-align: right; }
/* Two arrows that stretch from the bus down to the shared place: in, and back out. */
.fig-team .ftm-arrows { display: flex; justify-content: center; gap: 12px; align-self: stretch; }
.fig-team .ftm-a { position: relative; width: 2px; }
/* The shaft is a crisp-edged SVG so all four render at 2px wherever they land. */
.fig-team .ftm-shaft { position: absolute; left: 0; top: 0; display: block; width: 2px; height: 100%; }
.fig-team .ftm-a::after {
  content: '';
  position: absolute;
  left: -5px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}
.fig-team .ftm-a-down { margin-bottom: 2px; }
.fig-team .ftm-a-down::after { bottom: -2px; border-top: 10px solid var(--ink-3); }
.fig-team .ftm-a-up { margin-top: 0; }
.fig-team .ftm-a-up::after { top: 0; border-bottom: 10px solid var(--ink-3); }
.fig-team .ftm-io-label {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-bottom: 2px;
}
/* Knowledge base drawn as a database cylinder. */
.fig-team .ftm-db {
  position: relative;
  margin-top: 14px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px 4px;
  border: 2px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 50% 50% / 0 0 16px 16px;
  background: transparent;
  text-align: center;
}
.fig-team .ftm-db::before {
  content: '';
  position: absolute;
  top: -14px;
  left: -2px;
  right: -2px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
}
/* Channel drawn as a small chat window. */
.fig-team .ftm-chan {
  height: 100px;
  overflow: hidden;
  border: 2px solid var(--ink-3);
  background: #fff;
}
.fig-team .ftm-chan-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-2);
}
.fig-team .ftm-hash {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-3);
}
.fig-team .ftm-chan-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.fig-team .ftm-line { display: flex; align-items: center; gap: 8px; }
.fig-team .ftm-av { flex: none; width: 14px; height: 14px; }
.fig-team .ftm-av-a { background: var(--blue); }
.fig-team .ftm-av-r { background: var(--blue-light); }
.fig-team .ftm-bar { height: 8px; background: var(--line); }
.fig-team .ftm-place-name { font-size: 15px; font-weight: 600; color: var(--ink); }

@media (max-width: 640px) {
  /* Keep both places side by side under the bus; labels stack above the arrows. */
  .fig-team .ftm-loop-name { font-size: 12px; }
  .fig-team .ftm-dests { gap: 12px; }
  .fig-team .ftm-bus { margin: 0 calc(100% / 6) 0 12px; }
  .fig-team .ftm-io { grid-template-columns: 26px 1fr; column-gap: 6px; row-gap: 0; min-height: 0; }
  .fig-team .ftm-io p { grid-column: 2; margin: 12px 0 4px; text-align: left; align-self: start; }
  .fig-team .ftm-arrows { grid-column: 1; grid-row: 1 / span 2; gap: 8px; }
  .fig-team .ftm-db { height: 98px; padding: 14px 8px 4px; }
  .fig-team .ftm-chan { height: 112px; }
  .fig-team .ftm-chan-head { padding: 6px 8px; gap: 6px; }
  .fig-team .ftm-place-name { font-size: 14px; }
}
