:root {
  color-scheme: light;
  --ink: #10120f;
  --ink-soft: #30332e;
  --paper: #f3f1e9;
  --surface: #fffefa;
  --surface-soft: #ebe9df;
  --muted: #686b64;
  --line: #d4d2c8;
  --mint: #00e5a3;
  --lime: #c9f83a;
  --orange: #ff6a2b;
  --content: 760px;
  --wide: 1180px;
  --radius: 24px;
  --shadow: 0 24px 70px rgb(16 18 15 / 0.11);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 0.18em; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

::selection { background: var(--lime); color: var(--ink); }
:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #005c45;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

.topbar,
.article-shell,
.footer-inner {
  width: min(calc(100% - 40px), var(--wide));
  margin-inline: auto;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-logo { width: 40px; height: auto; }
.brand-text { white-space: nowrap; }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 650;
}

.topbar-nav a { text-decoration: none; white-space: nowrap; }
.topbar-nav a:not(.nav-subscribe):not(.nav-cta):hover { text-decoration: underline; }

.nav-subscribe,
.nav-cta {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}

.nav-subscribe { background: var(--lime); }
.nav-cta { background: var(--orange); color: var(--ink); }

.nav-subscribe-dot,
.nav-cta-dot {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.article-shell { padding-block: 26px 88px; }
.article-page { min-width: 0; }

.breadcrumbs {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 0.8rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li { min-width: 0; }
.breadcrumbs li:last-child { max-width: 62ch; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #9b9d96; }

.article-hero {
  overflow: hidden;
  margin-bottom: 72px;
  border: 1px solid #252822;
  border-radius: 30px;
  background: #10120f;
  color: #f7f5ee;
  box-shadow: var(--shadow);
}

.hero-copy { padding: clamp(30px, 6vw, 74px); }

.article-kicker,
.section-label,
.toc__head,
.stack-card__role,
.decision-card__flag {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.article-kicker { margin: 0 0 18px; color: var(--mint); }

h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.7rem, 6.6vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

h1.is-long {
  max-width: 21ch;
  font-size: clamp(2.45rem, 5vw, 4.8rem);
}

.article-deck {
  max-width: 64ch;
  margin: 26px 0 0;
  color: #c7c9c2;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.55;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 24px;
  color: #9ea19a;
  font-size: 0.86rem;
}

.article-meta a { color: #f7f5ee; font-weight: 700; }

.hero-figure { margin: 0; border-top: 1px solid #30332d; }

.article-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #151713;
}

.hero-figure figcaption {
  padding: 13px clamp(18px, 4vw, 42px) 15px;
  border-top: 1px solid #30332d;
  color: #9ea19a;
  font-size: 0.78rem;
}

.article-body { font-size: clamp(1.03rem, 1.35vw, 1.12rem); }

.article-body > section,
.article-body > nav,
.article-body > div {
  width: min(100%, var(--content));
  margin-inline: auto;
}

.article-body > #role-map,
.article-body > #stack-layers,
.article-body > #when-not-needed,
.article-body > #prompts,
.article-body > .article-cta { width: 100%; }

.article-body > .wide-section { width: 100%; }

.article-body section { scroll-margin-top: 24px; }

.article-body h2,
.sources h2,
.related-section h2 {
  max-width: 27ch;
  margin: 82px 0 22px;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.article-body h3 {
  margin: 36px 0 14px;
  font-size: clamp(1.25rem, 2.1vw, 1.58rem);
  line-height: 1.17;
  letter-spacing: -0.025em;
}

.article-body p,
.article-body ul,
.article-body ol { max-width: 72ch; }

.article-body p { margin-block: 0 1.25em; }
.article-body li + li { margin-top: 0.45em; }

.article-body a:not(.button):not(.commercial-link) {
  text-decoration-color: #8c8e87;
  text-decoration-thickness: 1px;
}

.article-body code,
.sources code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.article-body p code,
.article-body li code {
  padding: 0.08em 0.3em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #e9e7de;
}

.article-body pre {
  max-width: 100%;
  overflow-x: auto;
  margin-block: 20px;
  padding: 20px;
  border: 1px solid #2c2f2a;
  border-radius: 14px;
  background: #11130f;
  color: #f5f3ec;
  font-size: 0.84rem;
  line-height: 1.58;
  white-space: pre;
}

.article-body pre code { color: inherit; }
.section-label { margin: 0 0 12px; color: var(--muted); }

.answer-card {
  margin-bottom: 52px;
  padding: clamp(24px, 5vw, 52px) 0 clamp(26px, 5vw, 52px) clamp(22px, 5vw, 52px);
  border-left: 7px solid var(--mint);
}

.answer-card h2 {
  max-width: 30ch;
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 3.6vw, 2.8rem);
}

.answer-card p:last-child { margin-bottom: 0; }

.key-takeaways {
  margin-block: 44px 62px;
  padding: 28px clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.key-takeaways ul { margin: 0; padding-left: 1.25em; }

.toc {
  margin-block: 42px 72px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.toc__head { margin: 0 0 14px; color: var(--muted); }

.toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 32px;
  margin: 0;
  padding-left: 1.35em;
}

.callout {
  margin-block: 30px;
  padding: 20px 22px;
  border-left: 4px solid var(--orange);
  background: var(--surface);
}

.callout.tip { border-left-color: var(--mint); }
.callout strong { display: block; margin-bottom: 6px; }
.callout p:last-child { margin-bottom: 0; }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin-block: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 40px rgb(16 18 15 / 0.05);
}

.decision-table {
  width: 100%;
  min-width: 930px;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.46;
}

.decision-table caption { padding: 18px 20px; text-align: left; font-weight: 850; }
.decision-table th,
.decision-table td { padding: 15px 17px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.decision-table thead th { background: var(--ink); color: #fff; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.decision-table tbody th { min-width: 210px; }
.decision-table tbody tr:nth-child(even) { background: #f6f4ed; }

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 38px 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  list-style: none;
}

.pipeline li { min-width: 0; padding: 16px 14px 0 0; }
.pipeline span { display: block; color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.72rem; }
.pipeline strong, .pipeline small { display: block; }
.pipeline strong { margin-top: 14px; line-height: 1.15; }
.pipeline small { margin-top: 8px; color: var(--muted); line-height: 1.38; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.stack-card {
  min-width: 0;
  margin: 0;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.stack-card h3 { margin: 8px 0 15px; font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
.stack-card p { font-size: 0.95em; }
.stack-card__role { margin: 18px 0 0 !important; color: var(--muted); }

.tool-row { display: flex; min-height: 38px; align-items: center; flex-wrap: wrap; gap: 9px; }

.tool-row img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
}

.tool-mark {
  display: inline-grid;
  min-width: 40px;
  height: 36px;
  padding-inline: 8px;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 900;
}

.tool-mark--graph { background: #b9e3ff; color: #153146; }
.tool-mark--platega { min-width: 36px; padding: 0; background: #533beb; font-size: 1rem; }

.stack-card dl { display: grid; gap: 9px; margin: 20px 0 0; }
.stack-card dl div { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.stack-card dt { font-size: 0.74rem; font-weight: 850; text-transform: uppercase; }
.stack-card dd { margin: 0; color: var(--ink-soft); font-size: 0.86rem; }

.mini-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.mini-flow code { padding: 5px 8px; border-radius: 6px; background: var(--ink); color: #fff; }

.commercial-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 9px 15px;
  border-radius: 999px;
  background: #533beb;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.disclosure { margin: 18px 0; padding: 14px 16px; border-left: 3px solid #7c6a10; background: #fff7c8; font-size: 0.84rem; }
.cite { font-family: ui-monospace, monospace; font-size: 0.72em; font-weight: 850; }

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.decision-card { min-width: 0; padding: 26px; border-top: 4px solid var(--ink); background: var(--surface); }
.decision-card h3 { margin-top: 24px; font-size: 1.15rem; }
.decision-card__flag { margin: 0; color: var(--muted); }
.decision-card ul { padding-left: 1.15em; }

.build-steps { margin: 34px 0; padding: 0; list-style: none; counter-reset: build; }
.build-steps > li { counter-increment: build; padding: 28px 0; border-top: 1px solid var(--line); }
.build-steps > li:last-child { border-bottom: 1px solid var(--line); }
.build-steps h3 { margin: 5px 0 10px; }
.build-steps span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; }

.artifact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding: 15px 18px;
  border: 1px solid #2d302b;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #1a1c18;
  color: #f5f3ec;
}

.artifact-head div { display: grid; line-height: 1.2; }
.artifact-head span { color: #a8aaa3; font-size: 0.72rem; text-transform: uppercase; }
.artifact-head a { color: var(--mint); font-weight: 800; }
.article-body pre.artifact { margin-top: 0; border-radius: 0 0 14px 14px; }

.prompt-card { overflow: hidden; margin-block: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.prompt-card summary { display: flex; gap: 12px; align-items: center; padding: 17px 19px; cursor: pointer; font-weight: 800; }
.prompt-card summary span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.76rem; }
.prompt-card pre { margin: 0; border: 0; border-radius: 0; }

.checklist { margin: 26px 0 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding: 13px 0 13px 38px; border-top: 1px solid var(--line); }
.checklist li::before { content: "✓"; position: absolute; top: 13px; left: 4px; color: #087b59; font-weight: 950; }

.faq-list { border-top: 1px solid var(--line); }
.faq-list section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.faq-list h3 { margin: 0 0 8px; }
.faq-list p:last-child { margin-bottom: 0; }

.article-cta {
  margin-top: 84px !important;
  padding: clamp(30px, 6vw, 64px);
  border-radius: var(--radius);
  background: var(--ink);
  color: #f7f5ee;
}

.article-cta .section-label { color: var(--mint); }
.article-cta h2 { max-width: 24ch; margin-top: 0; }
.article-cta p { color: #c3c6be; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }

.button {
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid #f7f5ee;
  border-radius: 999px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.button--primary { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.button--secondary { color: #fff; }

.sources,
.related-section { width: min(100%, var(--content)); margin-inline: auto; }

.sources { margin-top: 86px; padding-top: 34px; border-top: 2px solid var(--ink); }
.sources h2, .related-section h2 { margin-top: 0; }
.sources > p:not(.section-label) { color: var(--muted); }

.source-list { margin: 30px 0 0; padding: 0; list-style: none; }
.source-list li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; padding: 17px 0; border-top: 1px solid var(--line); }
.source-number { padding-top: 2px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.74rem; }
.source-list p { margin: 5px 0 0; color: var(--muted); font-size: 0.88rem; }

.related-section { margin-top: 76px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.related-card {
  min-width: 0;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
}

.related-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.related-card span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.7rem; text-transform: uppercase; }
.related-card h3 { margin: 9px 0; font-size: 1.12rem; line-height: 1.2; }
.related-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.footer { padding-block: 38px; background: #10120f; color: #f7f5ee; }
.footer-inner { display: grid; gap: 23px; }
.footer-author, .footer-socials { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.social { display: inline-flex; align-items: center; gap: 7px; }
.footer-author-avatar { flex: 0 0 auto; }
.footer-author-avatar img { border-radius: 50%; }
.footer-author-name { font-weight: 850; }
.footer-author-handle { color: var(--mint); }
.footer-author-role, .footer-copy { color: #9ea19a; font-size: 0.85rem; }
.footer-socials a { color: #f7f5ee; }
.footer-copy a { color: #d9dbd4; }

@media (min-width: 768px) and (max-width: 1100px) {
  .topbar-nav { gap: 10px; font-size: 0.84rem; }
  .nav-subscribe, .nav-cta { padding-inline: 10px; }
  .article-shell { padding-bottom: 72px; }
  .article-hero { border-radius: 24px; }
  .hero-copy { padding: clamp(34px, 6vw, 58px); }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 0; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .decision-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .topbar,
  .article-shell,
  .footer-inner { width: min(calc(100% - 24px), var(--wide)); }

  .topbar { min-height: 0; align-items: flex-start; flex-direction: column; padding-block: 14px; }
  .topbar-nav { width: 100%; gap: 15px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
  .topbar-nav .nav-subscribe, .topbar-nav .nav-cta { min-height: 36px; padding: 6px 11px; }
  .article-shell { padding-block: 18px 58px; }
  .breadcrumbs { margin-bottom: 16px; }
  .breadcrumbs li:last-child { display: none; }
  .article-hero { margin-bottom: 52px; border-radius: 18px; }
  .hero-copy { padding: 26px 20px 28px; }
  h1 { font-size: clamp(2.25rem, 12.5vw, 3.8rem); }
  .article-deck { margin-top: 19px; }
  .article-meta { margin-top: 19px; }
  .hero-figure figcaption { padding: 10px 12px 12px; }
  .article-body h2, .sources h2, .related-section h2 { margin-top: 62px; font-size: clamp(1.75rem, 9vw, 2.55rem); }
  .answer-card { padding-left: 20px; border-left-width: 5px; }
  .key-takeaways { padding: 22px 19px; }
  .toc ol { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .pipeline li { padding-right: 8px; }
  .stack-grid, .decision-grid, .related-grid { grid-template-columns: 1fr; }
  .stack-card { padding: 21px 18px; }
  .stack-card dl div { grid-template-columns: 1fr; gap: 3px; }
  .artifact-head { align-items: flex-start; flex-direction: column; }
  .article-body pre { padding: 16px; font-size: 0.78rem; }
  .article-cta { margin-top: 64px !important; padding: 29px 20px; border-radius: 18px; }
  .cta-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; white-space: normal; }
  .source-list li { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
  .related-section { margin-top: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  body { background: #fff; color: #000; }
  .topbar, .footer, .breadcrumbs, .cta-actions, .related-section { display: none !important; }
  .article-shell { width: 100%; padding: 0; }
  .article-hero { border: 0; box-shadow: none; }
  .article-body > section, .article-body > nav, .article-body > div, .sources { width: 100%; }
  a { color: #000; }
}
