/* ═══════════════════════════════════════════════════════════════
   Article pages: the five leadership episodes.
   Loads on top of styles.css and reuses its tokens, nav and shell.
   Kept in its own file so the index stylesheet is never touched.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --prose: min(722px, 100%);      /* same column as the framework rows */
  --fig-line: rgba(64, 64, 64, .18);
}

body.is-article { background: var(--bg-band); }


/* ── Masthead ──────────────────────────────────────────────────── */
.post__head {
  padding-top: calc(var(--hero-pad-top) + var(--nav-h) + clamp(2rem, 4vw, 3.5rem));
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
  background: var(--bg-hero);
}

.post__kicker {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-nav);
}
.post__kicker a { border-bottom: 1px solid transparent; }
.post__kicker a:hover { border-bottom-color: currentColor; }

.post__h1 {
  margin-top: 14px;
  max-width: 20ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.15rem, 4.1vw, 3.875rem);
  font-variation-settings: "opsz" 14, "wdth" 100;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  text-wrap: balance;
}

.post__stand {
  margin-top: 18px;
  max-width: 58ch;
  font-size: clamp(1.0625rem, 1.32vw, 1.25rem);
  line-height: 1.42;
  color: var(--ink);
  text-wrap: pretty;
}

/* At-a-glance strip: the hero stat row's vocabulary, smaller */
.post__meta {
  margin-top: clamp(1.75rem, 3.4vw, 2.75rem);
  max-width: var(--hero-col);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule-hero);
  border-bottom: 1px solid var(--rule-hero);
}
.post__meta > div {
  padding-block: clamp(.875rem, 1.6vw, 1.25rem);
  padding-inline-start: clamp(1rem, 2.6vw, 2.4375rem);
  border-left: 1px solid var(--rule-hero);
}
.post__meta > div:first-child {
  padding-inline-start: 0;
  border-left: 0;
}
.post__meta dt {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-nav);
}
.post__meta dd {
  margin-top: 5px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.19vw, 1.125rem);
  font-variation-settings: "opsz" 14, "wdth" 100;
  line-height: 1.25;
  color: var(--ink);
}


/* ── Prose ─────────────────────────────────────────────────────── */
.post__body {
  padding-top: clamp(2.5rem, 5vw, 4.25rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.post__body > * { max-width: var(--prose); }

.post__body p,
.post__body li {
  font-size: clamp(1rem, 1.13vw, 1.0625rem);
  line-height: 1.62;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.post__body p + p { margin-top: 1.1em; }

.post__body h2 {
  margin-top: clamp(2.25rem, 4.2vw, 3.5rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.98vw, 1.75rem);
  font-variation-settings: "opsz" 14, "wdth" 100;
  line-height: 1.22;
  color: var(--ink-strong);
  text-wrap: balance;
}
.post__body h2 + p { margin-top: .85em; }

.post__body h3 {
  margin-top: clamp(1.75rem, 3vw, 2.25rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.39vw, 1.3125rem);
  font-variation-settings: "opsz" 14, "wdth" 100;
  line-height: 1.25;
  color: var(--ink-strong);
}
.post__body h3 + p { margin-top: .6em; }

.post__body strong { color: var(--ink-strong); font-weight: 500; }

.post__list { margin-top: 1.1em; }
.post__list li {
  position: relative;
  padding-left: 22px;
  margin-top: .6em;
}
.post__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Numbered steps: used for the six intake fields and the three routes */
.steps { margin-top: 1.2em; counter-reset: step; }
.steps li {
  position: relative;
  padding-left: 44px;
  margin-top: .85em;
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .12em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85em;
  color: var(--accent);
  font-variation-settings: "opsz" 14, "wdth" 100;
}

/* The line worth stopping on */
.post__pull {
  margin-top: clamp(1.75rem, 3.2vw, 2.5rem);
  padding-left: clamp(1rem, 2vw, 1.5rem);
  border-left: 2px solid var(--accent);
}
.post__pull p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 1.72vw, 1.5rem);
  font-variation-settings: "opsz" 14, "wdth" 100;
  line-height: 1.32;
  color: var(--ink-strong);
  text-wrap: balance;
}


/* ── Diagrams ──────────────────────────────────────────────────── */
.fig {
  margin-top: clamp(2rem, 3.6vw, 2.875rem);
  max-width: var(--prose);
}
.fig__frame {
  padding: clamp(1.25rem, 2.4vw, 2rem);
  border-radius: 6px;
  background: var(--bg-card);
  box-shadow:
    0 0 0 1px var(--rule-hair),
    0 6px 18px rgba(0, 0, 0, .05);
}
.fig svg { width: 100%; height: auto; }
.fig figcaption {
  margin-top: 12px;
  font-size: clamp(.875rem, .99vw, .9375rem);
  line-height: 1.5;
  color: var(--ink-nav);
  text-wrap: pretty;
}

/* Shared SVG vocabulary */
.d-box   { fill: #fff; stroke: var(--fig-line); stroke-width: 1.5; }
.d-fill  { fill: #ececec; stroke: none; }
.d-key   { fill: #1a1a1a; stroke: none; }
.d-keybox{ fill: rgba(0, 0, 0, .07); stroke: #1a1a1a; stroke-width: 1.5; }
.d-ink   { fill: #404040; stroke: none; }
.d-line  { stroke: var(--fig-line); stroke-width: 1.5; fill: none; }
.d-arrow { stroke: #404040; stroke-width: 1.5; fill: none; }
.d-t     { font-family: "Noto Sans", system-ui, sans-serif; font-size: 12px; fill: #404040; }
.d-t--sm { font-size: 10.5px; fill: #6a6a6a; }
.d-t--b  { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 700; font-size: 13px; fill: #1a1a1a; }
.d-t--key{ fill: #1a1a1a; }


/* ── Foot: where to go next ───────────────────────────────────── */
.post__foot {
  padding-block: clamp(2rem, 3.6vw, 2.875rem) clamp(3.5rem, 6vw, 5.5rem);
  border-top: 1px solid var(--rule-hero);
}
.post__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  justify-content: space-between;
  align-items: baseline;
}
.post__nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.19vw, 1.125rem);
  font-variation-settings: "opsz" 14, "wdth" 100;
  color: var(--ink-strong);
  border-bottom: 1px solid rgba(0, 0, 0, .25);
  padding-bottom: 2px;
}
.post__nav a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.post__nav small {
  display: block;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-nav);
  margin-bottom: 6px;
}


@media (max-width: 700px) {
  .post__meta { grid-template-columns: 1fr; }
  .post__meta > div {
    padding-inline-start: 0;
    border-left: 0;
  }
  .post__meta > div + div { border-top: 1px solid var(--rule-hero); }
  .post__h1 { max-width: none; }
}


/* ═══════════════════════════════════════════════════════════════
   Case studies: the three hands-on pages.
   Everything above is shared with the leadership episodes; these
   are the pieces only the case studies need: screenshots, code,
   specimens and data tables.
   ═══════════════════════════════════════════════════════════════ */

/* A figure allowed out of the prose column, for side-by-side captures */
.post__body > .fig--wide { max-width: var(--hero-col); }

/* Prose only gets its rhythm from p + p, so anything that isn't a
   paragraph leaves the next paragraph welded to it. */
.post__body .fig + p,
.post__body .snip + p,
.post__body .post__list + p,
.post__body .post__pull + p { margin-top: clamp(1.5rem, 2.8vw, 2.125rem); }


/* ── Screenshots ───────────────────────────────────────────────── */
.shot img,
.compare img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.shot__frame,
.compare__img {
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow:
    0 0 0 1px var(--rule-hair),
    0 6px 18px rgba(0, 0, 0, .06);
}

/* Phone captures are 780×1688, left full width they swamp the page */
.shot--phone { max-width: 330px; margin-inline: auto; }

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: start;
}
.compare--phone .compare__c { max-width: 320px; margin-inline: auto; }

.post__body .compare__l {
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-nav);
}
.post__body .compare__l--key { color: var(--accent); }


/* ── Data tables ───────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; }
.dtable {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  text-align: left;
}
.dtable th {
  padding: 0 14px 9px 0;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-nav);
  border-bottom: 1px solid var(--rule-hero);
}
.dtable td {
  padding: 11px 14px 11px 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule-hero);
  vertical-align: top;
}
.dtable tr:last-child td { border-bottom: 0; }
.dtable th:last-child,
.dtable td:last-child { padding-right: 0; }
.dtable .num {
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-strong);
}
.dtable .w {
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-strong);
}
.dtable .grp td {
  padding-top: 22px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 0;
}
.dtable .chg {
  display: block;
  margin-top: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ink-nav);
}


/* ── Code ──────────────────────────────────────────────────────── */
.post__body .snip {
  margin-top: clamp(1.5rem, 2.6vw, 2rem);
  padding: clamp(1rem, 1.8vw, 1.375rem) clamp(1rem, 2vw, 1.5rem);
  border-radius: 6px;
  border-left: 2px solid var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 1px var(--rule-hair);
  overflow-x: auto;
}
.snip code {
  font-family: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-strong);
  white-space: pre;
  tab-size: 2;
}
.snip .c { color: #7a7a7a; }
.snip .k { color: #555; }

.post__body p code,
.post__body li code,
.dtable code {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .045);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em;
  color: var(--ink-strong);
}


/* ── A closing note, set quieter than the body ─────────────────── */
.post__body .fine {
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
  padding-top: 18px;
  border-top: 1px solid var(--rule-hero);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-nav);
}


@media (max-width: 700px) {
  .compare { grid-template-columns: 1fr; }
  .compare--phone .compare__c { max-width: 320px; }
}
