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

:root {
  --bg: #faf9f7;
  --bg-card: #ffffff;
  --border: #e8e5df;
  --border-strong: #d9d5cd;
  --text: #33312c;
  --text-secondary: #55524b;
  --text-muted: #6e6960;
  --accent: #3695a0;
  --accent-dark: #2b7780;
  --accent-subtle: rgba(54, 149, 160, 0.06);
  --accent-border: rgba(54, 149, 160, 0.22);
  --ink: #1a1917;
  --display: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  --body: 'Literata', Charter, Georgia, serif;
  --ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

::selection {
  background: rgba(54, 149, 160, 0.18);
  color: var(--ink);
}
::-moz-selection {
  background: rgba(54, 149, 160, 0.18);
  color: var(--ink);
}

body {
  font-family: var(--ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAVIGATION ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  transition: box-shadow 0.4s ease;
}
nav.scrolled { box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04); }
.nav-inner {
  max-width: 660px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: var(--display);
  font-weight: 600; font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s ease;
}
.logo:hover { color: var(--accent-dark); }
.nav-links { display: flex; gap: 1.75rem; align-items: center; }
.nav-link {
  position: relative;
  font-size: 0.8rem; font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}
.nav-link:hover { color: var(--accent-dark); }
.nav-link.primary { color: var(--accent-dark); font-weight: 500; }

/* ── ARTICLE HEADER ── */
.article-header {
  max-width: 660px;
  margin: 0 auto;
  padding: 7rem 2rem 2.5rem;
}
.article-meta {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.article-meta .dot {
  width: 3px; height: 3px;
  background: var(--border-strong);
  border-radius: 50%;
}
.article-header .eyebrow {
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}
.article-header h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.article-header .subtitle {
  font-family: var(--body);
  font-size: 1.18rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 540px;
}

/* ── TL;DR BLOCK ── */
.tldr {
  max-width: 660px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
}
.tldr-inner {
  padding: 1.5rem 1.75rem;
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0 3px 3px 0;
}
.tldr-label {
  font-family: var(--ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.65rem;
}
.tldr-inner p {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}
.tldr-inner p strong {
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 700px) {
  .tldr { padding: 1.25rem 1.25rem 0; }
}

.article-divider {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 2rem;
}
.article-divider .line {
  width: 40px; height: 1px;
  background: var(--accent);
  opacity: 0.35;
}

/* ── PIPELINE POSITION INDICATOR ── */
.pipeline-pos {
  max-width: 660px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
}
.pipeline-pos .pp-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pp-stages {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Kickoff node */
.pp-k {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 2px;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}
.pp-k:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pp-k.active {
  border-style: solid;
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
.pp-k.active:hover {
  opacity: 0.85;
}

/* Arrow between K and pipeline */
.pp-arrow {
  width: 12px;
  height: 6px;
  margin: 0 0.15rem;
  color: var(--border-strong);
}

/* AGENT pipeline stages */
.pp-pipe {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--border);
  gap: 1px;
}
.pp-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}
.pp-stage:hover {
  background: var(--accent-subtle);
  color: var(--accent-dark);
}
.pp-stage.active {
  color: #fff;
  background: var(--accent);
}
.pp-stage.active:hover {
  opacity: 0.85;
}

/* "Explore interactively" link */
.pp-explore-link {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: opacity 0.25s ease;
  cursor: pointer;
  margin-left: 0.25rem;
}
.pp-explore-link:hover {
  opacity: 0.7;
}

/* Stream indicator (for governance/adoption articles) */
.pp-stream-label {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-left: 0.15rem;
}
.pp-stream-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 32px;
  padding: 0 0.5rem;
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  background: var(--accent-subtle);
  font-family: var(--ui);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--accent-dark);
  letter-spacing: 0.02em;
}

@media (max-width: 700px) {
  .pipeline-pos { padding: 1.25rem 1.25rem 0; }
  .pp-k {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .pp-stage {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
}

/* ── ARTICLE BODY ── */
.article-body {
  max-width: 660px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
  font-family: var(--body);
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}
.article-body p {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 1.35rem;
  hanging-punctuation: first last;
}
.article-body p:last-child { margin-bottom: 0; }
.article-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
.article-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.article-body p strong {
  font-weight: 600;
}

/* H2: display serif, clear section breaks */
.article-body h2 {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 3.5rem;
  margin-bottom: 0.9rem;
  line-height: 1.25;
}

/* H3: same body font, slightly smaller, semibold */
.article-body h3 {
  font-family: var(--body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.article-body ol,
.article-body ul {
  margin-bottom: 1.35rem;
  padding-left: 1.25rem;
}
.article-body li {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}
.article-body li strong {
  font-weight: 600;
}

/* Insight blocks — pullout moments with copy */
.insight {
  position: relative;
  margin: 2.5rem 0;
  padding: 1.75rem 2rem;
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0 3px 3px 0;
}
.insight p {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  font-style: normal;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 0;
  letter-spacing: -0.01em;
}
.insight .copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0.3rem;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0.35;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.insight:hover .copy-btn { opacity: 1; }
.copy-btn:hover {
  color: var(--accent-dark);
  border-color: var(--border);
  background: var(--bg-card);
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.copied {
  color: var(--accent);
  background: rgba(54, 149, 160, 0.08);
  border-color: var(--accent-border);
}

/* Section break between major parts */
.article-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3rem 0 2.5rem;
}

/* Chain visualization — UI element, stays in sans */
.chain-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-card);
  margin: 1.75rem 0;
}
.chain-flow .step {
  font-family: var(--ui);
  font-size: 0.8rem;
  font-weight: 400;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text-secondary);
  white-space: nowrap;
}
.chain-flow .arrow {
  color: var(--accent);
  font-size: 0.75rem;
  opacity: 0.45;
}

/* ── AUTHOR BIO ── */
.author-bio {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 2rem;
}
.author-bio-inner {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.author-bio-text {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}
.author-bio-text strong {
  color: var(--ink);
  font-weight: 600;
}
.author-bio-text a {
  color: var(--accent-dark);
  text-decoration: none;
  font-family: var(--ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}
.author-bio-text a:hover {
  color: var(--accent);
}

/* ── ARTICLE CTA ── */
.article-cta {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}
.article-cta-inner {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.article-cta-inner h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
}
.article-cta-inner p {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
}
.cta-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-family: var(--ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.3s var(--ease-out);
}
.cta-link.primary-cta {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}
.cta-link.primary-cta:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(58, 98, 112, 0.12);
}
.cta-link.secondary-cta {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--border-strong);
}
.cta-link.secondary-cta:hover {
  border-color: var(--accent-border);
  background: var(--accent-subtle);
}
.cta-link svg {
  width: 13px; height: 13px;
  transition: transform 0.3s var(--ease-out);
}
.cta-link:hover svg { transform: translateX(2px); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--bg);
}
.footer-inner {
  max-width: 660px; margin: 0 auto;
  font-size: 0.78rem; font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.footer-inner a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer-inner a:hover { color: var(--accent-dark); }
.footer-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  transition: all 0.25s ease;
}
.footer-social a:hover {
  border-color: var(--accent-border);
  color: var(--accent-dark);
  background: var(--accent-subtle);
}
.footer-social svg { width: 15px; height: 15px; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .article-header { padding: 5.5rem 1.25rem 2rem; }
  .article-body { padding: 2rem 1.25rem 3.5rem; }
  .article-body p { font-size: 1.1rem; }
  .article-body li { font-size: 1.05rem; }
  .article-cta { padding: 0 1.25rem 3.5rem; }
  .article-divider { padding: 0 1.25rem; }
  .nav-links { gap: 1rem; }
  .chain-flow { padding: 1rem; gap: 0.3rem; }
  .cta-links { flex-direction: column; }
  .cta-link { justify-content: center; }
}

/* ── READING PROGRESS ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  z-index: 101;
  opacity: 0;
  transition: width 0.1s linear, opacity 0.4s ease;
}
.progress-bar.visible { opacity: 1; }

/* ── ENTRANCE ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes lineGrow {
  from { width: 0; }
  to { width: 40px; }
}

.article-meta {
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.1s forwards;
}
.article-header .eyebrow {
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.2s forwards;
}
.article-header h1 {
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.3s forwards;
}
.article-header .subtitle {
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) 0.45s forwards;
}
.article-divider .line {
  width: 0;
  animation: lineGrow 0.5s var(--ease-out) 0.6s forwards;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── NAV LINK UNDERLINE ── */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover::after { width: 100%; }

/* ── HR GROW ON SCROLL ── */
.article-body hr {
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out);
}
.article-body hr.visible {
  transform: scaleX(1);
}

/* ── CHAIN FLOW STAGGER ── */
.chain-flow .step,
.chain-flow .arrow {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.chain-flow.visible .step,
.chain-flow.visible .arrow {
  opacity: 1;
  transform: translateY(0);
}

/* ── INSIGHT BLOCK ENTRANCE ── */
.insight {
  transition: border-left-color 0.4s ease, background 0.3s ease;
}
.insight:hover {
  border-left-color: var(--accent-dark);
  background: rgba(54, 149, 160, 0.08);
}

/* ── CTA SECTION ENTRANCE ── */
.article-cta-inner {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.article-cta-inner.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── FOOTER SOCIAL HOVER ── */
.footer-social a svg {
  transition: transform 0.3s var(--ease-out);
}
.footer-social a:hover svg {
  transform: scale(1.1);
}

/* ── PREV / NEXT NAVIGATION ── */
.article-nav {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}
.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  max-width: 45%;
  transition: all 0.25s ease;
}
.article-nav a:hover { transform: translateY(-1px); }
.article-nav .nav-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.article-nav .nav-title {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.35;
}
.article-nav a:hover .nav-title { color: var(--accent-dark, #2b7780); }
.article-nav .next { text-align: right; margin-left: auto; }

@media (max-width: 700px) {
  .article-nav { padding: 2rem 1.25rem 0; flex-direction: column; gap: 1.5rem; }
  .article-nav a { max-width: 100%; }
  .article-nav .next { text-align: left; margin-left: 0; }
}

/* ── SUBSCRIBE SECTION ── */
.subscribe-section {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.subscribe-inner {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}
.subscribe-inner h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.subscribe-inner > p {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.subscribe-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
}
.subscribe-form input[type="email"],
.subscribe-form input[type="text"] {
  flex: 1;
  padding: 0.6rem 0.75rem;
  font-family: var(--ui);
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border);
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s ease;
}
.subscribe-form input[type="text"] {
  flex: 0 0 120px;
}
.subscribe-form input[type="email"]:focus,
.subscribe-form input[type="text"]:focus {
  border-color: var(--accent);
}
.subscribe-form input[type="email"]::placeholder,
.subscribe-form input[type="text"]::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}
.subscribe-btn {
  padding: 0.6rem 1.25rem;
  font-family: var(--ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
}
.subscribe-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(58, 98, 112, 0.12);
}
.subscribe-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}
.subscribe-status {
  font-size: 0.8rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
  color: var(--accent-dark);
}
.subscribe-status.error {
  color: #c0392b;
}

@media (max-width: 700px) {
  .subscribe-section { padding: 0 1.25rem 2.5rem; }
  .subscribe-form { flex-direction: column; max-width: 100%; }
  .subscribe-btn { text-align: center; }
}

/* ── PREFERS REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
  .reveal, .article-meta, .article-header .eyebrow,
  .article-header h1, .article-header .subtitle,
  .article-cta-inner {
    opacity: 1;
    transform: none;
  }
  .article-divider .line { width: 40px; }
  .article-body hr { transform: scaleX(1); }
  .chain-flow .step, .chain-flow .arrow { opacity: 1; transform: none; }
  .progress-bar { display: none; }
}