/*
 * Editorial Essay — Blueprint skin + Marketing Loops diagrams.
 *
 * Loaded only for posts using template-editorial-blueprint.php, after
 * editorial-essay.css. Every rule is prefixed
 * `#primary.editorial-post.ed-skin-blueprint` — one class more than the base
 * file's `#primary.editorial-post`, so equal-shape rules here win without
 * !important, and the theme's `body.single-post #primary <x>` rules (see the
 * header of editorial-essay.css) stay beaten.
 *
 * Diagram classes use the `ed-loop-` prefix (never `opal-`: style.css adds
 * 9rem padding to any opal-prefixed div). Diagram markup lives in the post
 * body (docs/loops-essay-body.html); behaviour in js/editorial-loops.js.
 *
 * Motion contract: every animated state has a static end state that is the
 * DEFAULT. JS opts figures into motion by adding .is-armed (hidden/start
 * state) and then .is-live. Without JS, or under prefers-reduced-motion,
 * figures render finished. The base file's reduced-motion block also kills
 * every animation/transition under #primary.editorial-post.
 */

/* ---------------------------------------------------------------- *
 * Page shell — paper + grid behind the header, and the sticky-rail fix
 * that editorial-essay.css scopes to the default template's body class.
 * ---------------------------------------------------------------- */

body.post-template-template-editorial-blueprint {
  background-color: #f4f2ec;
}

body.post-template-template-editorial-blueprint #page {
  overflow: clip;
}

#primary.editorial-post.ed-skin-blueprint {
  --ed-paper: #f4f2ec;
  --ed-ink: #14213d;
  --ed-muted: #5c6170;
  --ed-blue: #2a70ea;
  --ed-blue-pale: #e3ebfb;
  --ed-line: #d6d0c2;
  --bp-grid: rgba(20, 33, 61, 0.055);
  --bp-faint: #b9b19f;
  --bp-red: #d6453d;
  --bp-card: #fffdf8;
  --bp-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  background-color: var(--ed-paper);
  background-image:
    linear-gradient(var(--bp-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center top;
  color: var(--ed-ink);
}

/* ---------------------------------------------------------------- *
 * Type: Garamond display stays; annotations go monospace.
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-eyebrow,
#primary.editorial-post.ed-skin-blueprint .ed-read-time,
#primary.editorial-post.ed-skin-blueprint .ed-rail-progress,
#primary.editorial-post.ed-skin-blueprint .ed-loop-tag {
  font-family: var(--bp-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* Headline: Light weight, Bold for emphasis, one ink colour throughout. */
#primary.editorial-post.ed-skin-blueprint .ed-title {
  font-weight: 300;
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-title em,
#primary.editorial-post.ed-skin-blueprint .ed-title strong {
  font-style: normal;
  font-weight: 700;
  color: inherit;
}

#primary.editorial-post.ed-skin-blueprint .ed-title sup {
  color: inherit;
}

/* Chapter heading emphasis matches the headline: Bold, upright, same ink. */
#primary.editorial-post.ed-skin-blueprint .ed-main h2[data-chapter] em,
#primary.editorial-post.ed-skin-blueprint .ed-main h2[data-chapter] strong {
  font-style: normal;
  font-weight: 700;
  color: inherit;
}

#primary.editorial-post.ed-skin-blueprint .ed-chapter-kicker {
  color: var(--ed-blue);
  text-transform: none;
  letter-spacing: 0.02em;
}

#primary.editorial-post.ed-skin-blueprint .ed-main .ed-chapter-kicker {
  border-top: 1px solid var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-main h2[data-chapter] {
  padding-left: 0;
  padding-top: 0;
}

#primary.editorial-post.ed-skin-blueprint .ed-main h2[data-chapter]::before {
  position: static;
  display: block;
  margin-bottom: 14px;
  content: "CH." attr(data-chapter-number);
  font: 500 0.75rem/1 var(--bp-mono);
  letter-spacing: 0.12em;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-lead::first-letter {
  color: var(--ed-blue);
  /* Lift the cap so its top lines up with the first line's cap height. */
  margin-top: -8px;
}

#primary.editorial-post.ed-skin-blueprint .ed-annotated > div > p {
  font-size: 1.0625rem;
  line-height: 1.85;
}

#primary.editorial-post.ed-skin-blueprint .ed-underline {
  text-decoration-color: var(--ed-blue);
}

/* Rail: monospace index, blue technical marker on the current chapter. */
#primary.editorial-post.ed-skin-blueprint .ed-rail-inner nav a span {
  font-family: var(--bp-mono);
  font-size: 0.6875rem;
  color: var(--bp-faint);
}

#primary.editorial-post.ed-skin-blueprint .ed-rail-inner nav a {
  position: relative;
  border-left: 1px solid var(--ed-line);
  padding-left: 14px;
  transition: color 0.3s, border-color 0.3s;
}

#primary.editorial-post.ed-skin-blueprint .ed-rail-inner nav a.is-current {
  border-left: 2px solid var(--ed-blue);
  padding-left: 13px;
}

#primary.editorial-post.ed-skin-blueprint .ed-rail-progress,
#primary.editorial-post.ed-skin-blueprint .ed-cover {
  border-color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-start {
  border-color: var(--ed-ink);
  background: var(--ed-paper);
}

/* ---------------------------------------------------------------- *
 * Loop masthead (populated by editorial-loops.js)
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-masthead--loop {
  margin-top: -52px;
  margin-bottom: -16px;
}

/* Headline centred on the loop: the SVG box's centre is the loop centre
   (cx 600 / cy 200 of the viewBox; slice crops symmetrically). */
#primary.editorial-post.ed-skin-blueprint .ed-masthead--loop .ed-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92%, 1100px);
  margin: 0;
  text-align: center;
  text-wrap: balance;
  pointer-events: auto;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 360;
  overflow: hidden;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead text {
  font-family: var(--bp-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  fill: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-guide {
  fill: none;
  stroke: var(--bp-faint);
  stroke-width: 1;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-dash {
  stroke-dasharray: 3 5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-faint {
  opacity: 0.45;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-ring {
  fill: none;
  stroke: var(--ed-blue);
  stroke-width: 1.5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-tick {
  fill: var(--ed-paper);
  stroke: var(--ed-ink);
  stroke-width: 1.2;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-blue {
  fill: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-code {
  fill: var(--ed-blue);
  font-size: 13px;
  letter-spacing: 0.02em;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-orbit,
#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-arc {
  transform-box: view-box;
  animation: ed-loop-spin 16s linear infinite;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead.is-paused .m-orbit,
#primary.editorial-post.ed-skin-blueprint .ed-loop-masthead.is-paused .m-arc {
  animation-play-state: paused;
}

@keyframes ed-loop-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  #primary.editorial-post.ed-skin-blueprint .ed-masthead--loop {
    margin-top: -74px;
    margin-bottom: -24px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-masthead {
    aspect-ratio: auto;
    height: 380px;
  }
}

@media (max-width: 700px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-masthead .m-wide {
    display: none;
  }
}

@media (max-width: 500px) {
  #primary.editorial-post.ed-skin-blueprint .ed-masthead--loop {
    margin-top: -69px;
    margin-bottom: -12px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-masthead {
    height: 300px;
  }
}

/* ---------------------------------------------------------------- *
 * Pull quotes
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-quote {
  margin: 64px 0;
  padding: 26px 0 30px 28px;
  border-left: 2px solid var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-quote > .ed-eyebrow {
  display: block;
  color: var(--ed-blue);
  text-transform: none;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-quote blockquote {
  font: 300 clamp(40px, 4.4vw, 68px) / 1.04 var(--ed-serif);
  letter-spacing: -0.02em;
  color: var(--ed-ink);
  text-wrap: balance;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-quote blockquote em {
  font-family: var(--ed-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--ed-blue);
  padding-right: 0.08em;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-quote--end {
  margin-top: 80px;
  border-left: 0;
  border-top: 1px solid var(--ed-ink);
  padding: 34px 0 0;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-thesis {
  font: 400 clamp(26px, 2.4vw, 34px) / 1.25 var(--ed-serif);
  max-width: 720px;
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-thesis em {
  font-family: var(--ed-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ed-blue);
  padding-right: 0.08em;
}

/* Margin note as a code listing. Hidden: the "// in code" note was cut from
   the essay; this keeps it off the page until the post markup drops it too
   (scripts/rm-loop-code-aside.php). */
#primary.editorial-post.ed-skin-blueprint .ed-loop-code {
  display: none;
  border-top-color: var(--ed-blue);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-code .ed-eyebrow {
  color: var(--ed-blue);
  text-transform: none;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-code code {
  display: block;
  margin-top: 14px;
  font: 400 0.875rem/1.8 var(--bp-mono);
  background: none;
  padding: 0;
  color: var(--ed-ink);
  white-space: normal;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-code code .k {
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-code code .i {
  display: block;
  padding-left: 2ch;
}

/* ---------------------------------------------------------------- *
 * Figure frame shared by all six diagrams
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig {
  container-type: inline-size;
  position: relative;
  margin: 48px 0 56px;
  border: 1px solid var(--ed-ink);
  background-color: var(--bp-card);
  background-image:
    linear-gradient(rgba(42, 112, 234, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 112, 234, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Registration corners — a drafting-sheet detail. */
#primary.editorial-post.ed-skin-blueprint .ed-loop-fig::before,
#primary.editorial-post.ed-skin-blueprint .ed-loop-fig::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 0 solid var(--ed-blue);
  pointer-events: none;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig::before {
  top: -5px;
  left: -5px;
  border-width: 2px 0 0 2px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig::after {
  right: -5px;
  bottom: -5px;
  border-width: 0 2px 2px 0;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ed-line);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-tag {
  display: inline-block;
  font-size: 0.6875rem;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig-top > .ed-loop-tag:first-child {
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 0.6875rem/1.4 var(--bp-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig-top > .ed-loop-legend:nth-of-type(3) {
  margin-left: auto;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-legend i {
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--ed-blue);
  border-radius: 50%;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-legend i.is-core {
  background: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-hint {
  margin-left: auto;
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-cap {
  padding: 14px 20px;
  border-top: 1px solid var(--ed-line);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text {
  font-family: var(--bp-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  fill: var(--ed-ink);
}

/* ---------------------------------------------------------------- *
 * FIG 01 — project line morphs into a loop
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint [data-loop="morph"] .ed-loop-svg {
  padding: 18px 12px 6px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-morph-guide {
  fill: none;
  stroke: var(--bp-faint);
  stroke-dasharray: 3 5;
  opacity: 0.6;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-morph-path {
  fill: none;
  stroke: var(--ed-blue);
  stroke-width: 2.5;
  stroke-linecap: round;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-morph-nodes circle {
  fill: var(--bp-card);
  stroke: var(--ed-ink);
  stroke-width: 1.5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-morph-nodes .ed-loop-learn {
  fill: var(--ed-blue);
  stroke: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg .ed-loop-morph-labels text {
  text-anchor: middle;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-learn,
#primary.editorial-post.ed-skin-blueprint .ed-loop-morph-loop text {
  fill: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-big {
  font: 300 44px/1 var(--ed-serif);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-morph-proj {
  opacity: 0;
}

/* ---------------------------------------------------------------- *
 * FIG 02 — gridlock
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-gridlock {
  display: grid;
  gap: 18px;
  padding: 24px 20px 18px;
}

@container (min-width: 700px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-gridlock {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 30px 30px 24px;
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stat {
  display: grid;
  gap: 10px;
  align-content: start;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stat-num {
  font: 300 clamp(80px, 9vw, 120px) / 0.9 var(--ed-serif);
  letter-spacing: -0.04em;
  color: var(--ed-blue);
  font-variant-numeric: tabular-nums;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stat-label {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-track-line {
  stroke: var(--ed-ink);
  stroke-width: 1.5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-node {
  fill: var(--bp-card);
  stroke: var(--ed-ink);
  stroke-width: 1.5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-node.ed-loop-end {
  fill: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-mistake circle {
  fill: #fbe9e7;
  stroke: var(--bp-red);
  stroke-width: 1.5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-mistake path {
  stroke: var(--bp-red);
  stroke-width: 2;
  stroke-linecap: round;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-mistake {
  transform-box: fill-box;
  transform-origin: center;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-red {
  fill: var(--bp-red);
  font-size: 11px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg .ed-loop-stages text {
  fill: var(--ed-muted);
  font-size: 11px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-runner {
  fill: var(--ed-blue);
  opacity: 0;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="gridlock"].is-live .ed-loop-runner {
  opacity: 1;
}

/* One 9s cycle = three 3s projects; each mistake flashes as the runner
   reaches the midpoint of its own track. */
#primary.editorial-post.ed-skin-blueprint [data-loop="gridlock"].is-live .ed-loop-mistake {
  animation: ed-loop-hit 9s linear infinite;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="gridlock"].is-live .ed-loop-track:nth-of-type(2) .ed-loop-mistake {
  animation-delay: 3s;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="gridlock"].is-live .ed-loop-track:nth-of-type(3) .ed-loop-mistake {
  animation-delay: 6s;
}

@keyframes ed-loop-hit {
  0%, 12% { transform: scale(1); }
  16.5% { transform: scale(1.55); }
  22%, 100% { transform: scale(1); }
}

/* ---------------------------------------------------------------- *
 * Dials (FIG 03 anatomy, FIG 05 org) — HTML buttons positioned on an
 * SVG ring with CSS trig, so they stay real, focusable controls.
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-dial {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  margin-inline: auto;
  --r: 35%;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-dial--org {
  --r: 37.5%;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-dial-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ring-guide {
  fill: none;
  stroke: var(--bp-faint);
  stroke-dasharray: 3 5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ring-progress {
  fill: none;
  stroke: var(--ed-blue);
  stroke-width: 2.5;
  stroke-dasharray: 1 1;
  stroke-dashoffset: calc(1 - var(--progress, 1));
  transition: stroke-dashoffset 0.6s ease;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-dial-label {
  font-size: 12px;
  fill: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-dial-lap {
  font: 300 22px/1 var(--ed-serif);
  letter-spacing: 0.02em;
  fill: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stage,
#primary.editorial-post.ed-skin-blueprint .ed-loop-station {
  position: absolute;
  left: calc(50% + var(--r) * cos(var(--a) * 60deg - 90deg));
  top: calc(50% + var(--r) * sin(var(--a) * 60deg - 90deg));
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--ed-ink);
  border-radius: 999px;
  background: var(--bp-card);
  color: var(--ed-ink);
  font: 500 0.6875rem/1.1 var(--bp-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stage span {
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stage:hover,
#primary.editorial-post.ed-skin-blueprint .ed-loop-station:hover {
  border-color: var(--ed-blue);
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stage[aria-current="step"],
#primary.editorial-post.ed-skin-blueprint .ed-loop-station[aria-pressed="true"] {
  background: var(--ed-blue);
  border-color: var(--ed-blue);
  color: #fff;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stage[aria-current="step"] span {
  color: #fff;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-stage:focus-visible,
#primary.editorial-post.ed-skin-blueprint .ed-loop-station:focus-visible,
#primary.editorial-post.ed-skin-blueprint .ed-loop-controls button:focus-visible,
#primary.editorial-post.ed-skin-blueprint .ed-loop-toggle button:focus-visible {
  outline: 2px solid var(--ed-blue);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- *
 * FIG 03 — anatomy stepper
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-anatomy,
#primary.editorial-post.ed-skin-blueprint .ed-loop-org {
  display: grid;
  gap: 26px;
  padding: 30px 22px 26px;
}

@container (min-width: 760px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-anatomy,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-org {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 34px;
    padding: 36px 34px 30px;
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-panels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

/* JS shows one panel at a time; without JS all six read as an ordered list. */
#primary.editorial-post.ed-skin-blueprint .ed-loop-panels > li[hidden],
#primary.editorial-post.ed-skin-blueprint .ed-loop-lesson[hidden] {
  display: none;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-panels > li,
#primary.editorial-post.ed-skin-blueprint .ed-loop-lesson {
  display: grid;
  gap: 12px;
  align-content: start;
}

#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-panels > li:not([hidden]),
#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-lesson:not([hidden]) {
  animation: ed-loop-in 0.45s ease both;
}

@keyframes ed-loop-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-panels h3,
#primary.editorial-post.ed-skin-blueprint .ed-loop-lesson h3 {
  font: 400 clamp(28px, 2.6vw, 36px) / 1.08 var(--ed-serif);
  letter-spacing: -0.015em;
  color: var(--ed-ink);
  margin: 0;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-explain,
#primary.editorial-post.ed-skin-blueprint .ed-loop-lesson p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px 16px 14px;
  border: 1px solid var(--ed-ink);
  background: #fff;
  font-size: 0.875rem;
  line-height: 1.5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-card p {
  margin: 0;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-card b {
  font-weight: 600;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-card-tag {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 500 0.625rem/1.3 var(--bp-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-card-tag i {
  font-style: normal;
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-card mark {
  background: none;
  color: inherit;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-email.is-flagged mark {
  background: #fbe0dc;
  box-shadow: inset 0 -2px 0 var(--bp-red);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-flag {
  justify-self: start;
  padding: 4px 8px;
  background: var(--bp-red);
  color: #fff;
  font: 500 0.6875rem/1.3 var(--bp-mono);
  letter-spacing: 0.04em;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-flag--ok {
  background: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-note {
  background: #fff6d6;
  border-color: #c9a640;
  font: 400 1.25rem/1.3 var(--ed-serif);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rule {
  border-style: dashed;
  border-color: var(--ed-blue);
  background: var(--ed-blue-pale);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rule.is-approved {
  border-style: solid;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-email.is-better {
  border-color: var(--ed-blue);
  box-shadow: 4px 4px 0 var(--ed-blue-pale);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-controls:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ed-ink);
  border-radius: 50%;
  background: var(--bp-card);
  color: var(--ed-ink);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-controls button:hover {
  background: var(--ed-ink);
  color: #fff;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-count {
  font: 500 0.75rem/1 var(--bp-mono);
  letter-spacing: 0.1em;
  color: var(--ed-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- *
 * FIG 04 — compounding rings
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint [data-loop="compound"] .ed-loop-svg {
  padding: 22px 14px 10px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ring {
  fill: none;
  stroke: var(--ed-blue);
  stroke-width: 1.25;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-core {
  fill: var(--ed-blue);
  opacity: 0.9;
  transform-box: fill-box;
  transform-origin: center;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-carry {
  fill: none;
  stroke: var(--ed-blue);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-small {
  font-size: 10px;
  fill: var(--ed-blue);
}

/* FIG 04: smaller, tighter label lifted off the arrow so it clears both rings. */
#primary.editorial-post.ed-skin-blueprint [data-loop="compound"] svg text.ed-loop-small {
  font-size: 8px;
  letter-spacing: 0.06em;
  transform: translateY(-5px);
}

/* FIG 04: ripple off each core (added by editorial-loops.js; motion only). */
#primary.editorial-post.ed-skin-blueprint .ed-loop-ripple {
  fill: none;
  stroke: var(--ed-blue);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ed-loop-ripple 3.2s ease-out infinite;
  animation-delay: calc(var(--d, 0) * 1s + 1.4s + var(--rd, 0s));
}

@keyframes ed-loop-ripple {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-on-core {
  font-size: 9px;
  fill: #fff;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed .ed-loop-ring {
  stroke-dashoffset: 1;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed .ed-loop-core,
#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed .ed-loop-carry,
#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed text {
  opacity: 0;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed .ed-loop-core {
  transform: scale(0.2);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed.is-live .ed-loop-ring {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s ease calc(var(--d, 0) * 1s);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed.is-live .ed-loop-core {
  opacity: 0.9;
  transform: scale(1);
  transition: opacity 0.6s ease calc(var(--d, 0) * 1s + 0.5s), transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) calc(var(--d, 0) * 1s + 0.5s);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed.is-live .ed-loop-carry,
#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed.is-live text {
  opacity: 1;
  transition: opacity 0.6s ease calc(var(--d, 0) * 1s + 0.8s);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="compound"].is-armed.is-live text.ed-loop-on-core {
  opacity: 1;
}

/* ---------------------------------------------------------------- *
 * FIG 05 — org-wide loop
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-ring-flow {
  fill: none;
  stroke: var(--ed-blue);
  stroke-width: 1.5;
  stroke-dasharray: 2 10;
  opacity: 0.7;
  animation: ed-loop-flow 3s linear infinite;
}

@keyframes ed-loop-flow {
  to { stroke-dashoffset: -48; }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-spokes line {
  stroke: var(--bp-faint);
  stroke-dasharray: 3 4;
  transition: stroke 0.3s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-spokes line.is-active {
  stroke: var(--ed-blue);
  stroke-dasharray: none;
  stroke-width: 2;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-core-node {
  fill: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-core-label {
  fill: #fff;
  font-size: 11px;
  letter-spacing: 0.12em;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-core-count {
  fill: #cfe0ff;
  font-size: 10px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pulse {
  fill: var(--ed-blue);
  stroke: #fff;
  stroke-width: 2;
  opacity: 0;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-shapes {
  justify-self: start;
  padding: 5px 9px;
  border: 1px dashed var(--ed-blue);
  color: var(--ed-blue);
  font: 500 0.6875rem/1.3 var(--bp-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lessons {
  display: grid;
  gap: 30px;
}

/* ---------------------------------------------------------------- *
 * FIG 06 — ledger
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-toggle:not([hidden]) {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--ed-ink);
  padding: 2px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-toggle button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  min-height: 32px;
  font: 500 0.6875rem/1 var(--bp-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-muted);
  cursor: pointer;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-toggle button[aria-pressed="true"] {
  background: var(--ed-ink);
  color: #fff;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-toggle button[data-ledger-view="loops"][aria-pressed="true"] {
  background: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0;
  background: none;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger th,
#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger td {
  padding: 18px 22px;
  vertical-align: top;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--ed-line);
  background: none;
  transition: opacity 0.45s ease, color 0.45s ease;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger th + th,
#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger td + td {
  border-left: 2px solid var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger th {
  font: 400 clamp(22px, 2.2vw, 30px) / 1.1 var(--ed-serif);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger th .ed-loop-tag {
  display: block;
  margin-bottom: 8px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger th + th .ed-loop-tag {
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger td {
  font: 400 clamp(19px, 1.7vw, 23px) / 1.25 var(--ed-serif);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger td:first-child {
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ledger tbody tr:last-child td {
  border-bottom: 0;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-cycle {
  color: var(--ed-blue);
  font-family: var(--ed-sans);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="ledger"].is-armed tbody tr {
  opacity: 0;
  transform: translateY(10px);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="ledger"].is-armed.is-live tbody tr {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease calc(var(--i, 0) * 0.12s), transform 0.5s ease calc(var(--i, 0) * 0.12s);
}

@container (max-width: 520px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-ledger th,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-ledger td {
    padding: 14px 12px;
  }
}

/* ---------------------------------------------------------------- *
 * Phones — dial buttons shrink; org stations get a little more room.
 * ---------------------------------------------------------------- */

@container (max-width: 420px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-stage,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-station {
    padding: 5px 7px;
    font-size: 0.625rem;
    letter-spacing: 0.03em;
    gap: 4px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-anatomy,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-org {
    padding-inline: 12px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-fig-top,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-cap {
    padding-inline: 14px;
  }
}

/* Phones: the wide SVGs scale down with their box, so their text scales
   too. Raise the user-unit size per figure (ratio of viewBox width to the
   ~340px box at 390) so rendered labels stay >= 11px, and drop the purely
   decorative annotations that would collide at that size. */
@container (max-width: 520px) {
  #primary.editorial-post.ed-skin-blueprint [data-loop="morph"] svg.ed-loop-svg text,
  #primary.editorial-post.ed-skin-blueprint [data-loop="compound"] svg.ed-loop-svg text {
    font-size: 26px;
    letter-spacing: 0.02em;
  }

  #primary.editorial-post.ed-skin-blueprint [data-loop="gridlock"] svg.ed-loop-svg text {
    font-size: 21px;
    letter-spacing: 0.02em;
  }

  #primary.editorial-post.ed-skin-blueprint [data-loop="morph"] svg.ed-loop-svg text.ed-loop-big {
    font-size: 64px;
  }

  #primary.editorial-post.ed-skin-blueprint [data-loop="compound"] svg.ed-loop-svg text.ed-loop-small,
  #primary.editorial-post.ed-skin-blueprint [data-loop="compound"] svg.ed-loop-svg text.ed-loop-on-core,
  #primary.editorial-post.ed-skin-blueprint [data-loop="gridlock"] svg.ed-loop-svg .ed-loop-stages text:nth-child(2),
  #primary.editorial-post.ed-skin-blueprint [data-loop="gridlock"] svg.ed-loop-svg .ed-loop-stages text:nth-child(3) {
    display: none;
  }
}

@container (max-width: 520px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-core-label {
    font-size: 15px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-core-count {
    font-size: 15px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-dial-label {
    font-size: 15px;
  }
}

/* Reduced motion: the base file already zeroes every animation and
   transition under #primary.editorial-post; JS also never arms figures.
   The org ring's flow is decorative, so drop the dashes entirely. */
@media (prefers-reduced-motion: reduce) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-ripple {
    display: none;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-ring-flow {
    display: none;
  }
}

/* ================================================================ *
 * "How to Build Your First Marketing Loop" figures
 * (docs/first-loop-essay-body.html; behaviour in editorial-loops.js).
 * Written for marketers: controls and labels use the sans face in
 * sentence case; mono stays on small tags only.
 * ================================================================ */

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig [hidden][hidden] {
  display: none;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-ask {
  margin: 0;
  font: 400 0.9375rem/1.5 var(--ed-sans);
  color: var(--ed-ink);
}

/* Shared controls: segmented choices + decision buttons. */
#primary.editorial-post.ed-skin-blueprint .ed-loop-choices,
#primary.editorial-post.ed-skin-blueprint .ed-loop-decide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-choices button,
#primary.editorial-post.ed-skin-blueprint .ed-loop-decide button {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--ed-ink);
  border-radius: 999px;
  background: var(--bp-card);
  color: var(--ed-ink);
  font: 500 0.875rem/1.2 var(--ed-sans);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-decide button {
  min-height: 40px;
  padding: 7px 13px;
  font-size: 0.8125rem;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-choices button:hover,
#primary.editorial-post.ed-skin-blueprint .ed-loop-decide button:hover {
  border-color: var(--ed-blue);
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-choices button[aria-pressed="true"],
#primary.editorial-post.ed-skin-blueprint .ed-loop-decide button[aria-pressed="true"] {
  background: var(--ed-blue);
  border-color: var(--ed-blue);
  color: #fff;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-decide button[data-decide="dismiss"][aria-pressed="true"],
#primary.editorial-post.ed-skin-blueprint .ed-loop-decide button[data-decide="wait"][aria-pressed="true"] {
  background: var(--ed-ink);
  border-color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-choices .ed-loop-run {
  border-color: var(--ed-blue);
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-choices button:focus-visible,
#primary.editorial-post.ed-skin-blueprint .ed-loop-decide button:focus-visible {
  outline: 2px solid var(--ed-blue);
  outline-offset: 3px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-base-col h3,
#primary.editorial-post.ed-skin-blueprint .ed-loop-fb-result h3,
#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern h3 {
  margin: 0;
  font: 400 clamp(24px, 2.2vw, 30px) / 1.1 var(--ed-serif);
  letter-spacing: -0.01em;
  color: var(--ed-ink);
}

/* ---------------------------------------------------------------- *
 * FIG 01 — pick the work
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-pick {
  display: grid;
  gap: 22px;
  padding: 26px 22px 24px;
}

@container (min-width: 760px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-pick {
    padding: 32px 34px 28px;
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  background: none;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score th,
#primary.editorial-post.ed-skin-blueprint .ed-loop-score td {
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--ed-line);
  background: none;
  text-align: left;
  vertical-align: middle;
  transition: background 0.3s, opacity 0.3s, color 0.3s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score thead th {
  font: 600 0.8125rem/1.25 var(--ed-sans);
  color: var(--ed-ink);
  vertical-align: bottom;
  border-bottom-color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score tbody th {
  width: 34%;
  font: 500 0.9375rem/1.3 var(--ed-sans);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score tbody th span {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score td {
  font: 400 0.75rem/1.2 var(--ed-sans);
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score td::before {
  display: block;
  margin-bottom: 3px;
  font-size: 0.9375rem;
  letter-spacing: 3px;
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score td[data-n="3"]::before { content: "●●●"; content: "●●●" / ""; }
#primary.editorial-post.ed-skin-blueprint .ed-loop-score td[data-n="2"]::before { content: "●●○"; content: "●●○" / ""; }
#primary.editorial-post.ed-skin-blueprint .ed-loop-score td[data-n="1"]::before { content: "●○○"; content: "●○○" / ""; }
#primary.editorial-post.ed-skin-blueprint .ed-loop-score td[data-n="0"]::before { content: "✕"; content: "✕" / ""; color: var(--bp-red); }

#primary.editorial-post.ed-skin-blueprint .ed-loop-score td[data-n="0"] {
  color: var(--bp-red);
  font-weight: 600;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-score .ed-loop-score-key th,
#primary.editorial-post.ed-skin-blueprint .ed-loop-score .ed-loop-score-key td {
  border-bottom: 0;
}

#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-score [data-col] {
  opacity: 0.4;
}

#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-score [data-col].is-on {
  opacity: 1;
  background: var(--ed-blue-pale);
}

#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-score thead [data-col].is-on {
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-verdicts {
  display: grid;
  gap: 12px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-verdict {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-left: 3px solid var(--ed-ink);
  background: #fff;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-verdict b {
  font: 400 1.375rem/1.15 var(--ed-serif);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-verdict p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-verdict.is-good { border-left-color: var(--ed-blue); }
#primary.editorial-post.ed-skin-blueprint .ed-loop-verdict.is-good b { color: var(--ed-blue); }
#primary.editorial-post.ed-skin-blueprint .ed-loop-verdict.is-bad { border-left-color: var(--bp-red); }
#primary.editorial-post.ed-skin-blueprint .ed-loop-verdict.is-bad b { color: var(--bp-red); }

#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-verdict:not([hidden]) {
  animation: ed-loop-in 0.4s ease both;
}

/* Narrow: with JS, show only the chosen column; without, tighten. */
@container (max-width: 560px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-pick {
    padding-inline: 14px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-score th,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-score td {
    padding: 10px 6px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-score tbody th span {
    display: none;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-score td::before {
    letter-spacing: 1px;
    font-size: 0.8125rem;
  }

  #primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-score [data-col]:not(.is-on) {
    display: none;
  }

  #primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-score tbody th {
    width: 55%;
  }

  #primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-score tbody th span {
    display: block;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-choices button {
    padding-inline: 12px;
    font-size: 0.8125rem;
  }
}

/* ---------------------------------------------------------------- *
 * FIG 02 — two baselines
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-baseline {
  display: grid;
  gap: 30px;
  padding: 26px 22px 22px;
}

@container (min-width: 640px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-baseline {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 34px;
    padding: 32px 30px 26px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-base-col + .ed-loop-base-col {
    padding-left: 34px;
    border-left: 1px solid var(--ed-line);
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-base-col {
  display: grid;
  gap: 8px;
  align-content: start;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-checks {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-checks li {
  position: relative;
  margin: 0;
  padding-left: 30px;
  font: 400 1rem/1.4 var(--ed-sans);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ed-blue);
  color: #fff;
  font-size: 0.6875rem;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 160px;
  margin: 30px 0 30px;
  border-bottom: 1px solid var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-bar {
  position: relative;
  flex: 1;
  height: calc(var(--v) / 3 * 100%);
  background: var(--ed-blue-pale);
  border-top: 2px solid var(--ed-blue);
  transform-origin: bottom;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-bar b,
#primary.editorial-post.ed-skin-blueprint .ed-loop-bar i {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-style: normal;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-bar b {
  bottom: 10px;
  font: 600 0.8125rem/1 var(--ed-sans);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-bar i {
  bottom: -20px;
  font: 400 0.6875rem/1 var(--ed-sans);
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-avg {
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: calc(var(--v) / 3 * 100%);
  border-top: 1.5px dashed var(--ed-ink);
  pointer-events: none;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-avg span {
  position: absolute;
  right: 0;
  top: -22px;
  padding: 2px 6px;
  background: var(--ed-ink);
  color: #fff;
  font: 500 0.6875rem/1.3 var(--ed-sans);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-base-out {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 22px 22px;
  padding: 16px 18px;
  border: 1px solid var(--ed-blue);
  background: var(--ed-blue-pale);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-base-out > span {
  font: 300 36px/1 var(--ed-serif);
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-base-out p {
  margin: 0;
  font: 400 clamp(19px, 1.8vw, 23px) / 1.3 var(--ed-serif);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-base-out b {
  font-weight: 600;
  color: var(--ed-blue);
}

@container (min-width: 640px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-base-out {
    margin: 0 30px 26px;
  }
}

#primary.editorial-post.ed-skin-blueprint [data-loop="baseline"].is-armed .ed-loop-checks li {
  opacity: 0;
  transform: translateX(-8px);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="baseline"].is-armed .ed-loop-bar {
  transform: scaleY(0);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="baseline"].is-armed .ed-loop-avg,
#primary.editorial-post.ed-skin-blueprint [data-loop="baseline"].is-armed .ed-loop-base-out {
  opacity: 0;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="baseline"].is-armed.is-live .ed-loop-checks li {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease calc(var(--i, 0) * 0.12s), transform 0.45s ease calc(var(--i, 0) * 0.12s);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="baseline"].is-armed.is-live .ed-loop-bar {
  transform: none;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) calc(0.3s + var(--i, 0) * 0.12s);
}

#primary.editorial-post.ed-skin-blueprint [data-loop="baseline"].is-armed.is-live .ed-loop-avg {
  opacity: 1;
  transition: opacity 0.5s ease 1.1s;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="baseline"].is-armed.is-live .ed-loop-base-out {
  opacity: 1;
  transition: opacity 0.6s ease 1.5s;
}

/* ---------------------------------------------------------------- *
 * FIG 03 — feedback to rule
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-feedback {
  display: grid;
  gap: 26px;
  padding: 26px 22px 24px;
}

@container (min-width: 760px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-feedback {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 34px;
    padding: 32px 34px 28px;
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fb-work,
#primary.editorial-post.ed-skin-blueprint .ed-loop-fb-out,
#primary.editorial-post.ed-skin-blueprint .ed-loop-fb-result {
  display: grid;
  gap: 14px;
  align-content: start;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fb-out {
  gap: 18px;
}

#primary.editorial-post.ed-skin-blueprint [data-loop="feedback"][data-mode="why"] [data-mode-show="fix"],
#primary.editorial-post.ed-skin-blueprint [data-loop="feedback"][data-mode="fix"] [data-mode-show="why"] {
  display: none;
}

#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-fb-result,
#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-note p {
  animation: ed-loop-in 0.4s ease both;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rule {
  transition: opacity 0.3s, border-color 0.3s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rule.is-dismissed {
  opacity: 0.55;
  border-color: var(--ed-muted);
  background: transparent;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rule.is-dismissed .ed-loop-rule-text {
  text-decoration: line-through;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rule.is-dismissed .ed-loop-card-tag i {
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rule-text {
  font: 400 1.1875rem/1.35 var(--ed-serif);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rulecount {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--ed-line);
  font: 400 1rem/1.3 var(--ed-sans);
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rulecount b {
  font: 300 2.5rem/1 var(--ed-serif);
  color: var(--ed-blue);
}

/* ---------------------------------------------------------------- *
 * FIG 04 — evidence desk
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-evidence {
  display: grid;
  gap: 20px;
  padding: 26px 22px 24px;
}

@container (min-width: 760px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-evidence {
    padding: 32px 30px 28px;
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-patterns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

@container (min-width: 820px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-patterns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern {
  display: grid;
  gap: 10px;
  align-content: start;
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--ed-ink);
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s, opacity 0.3s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern h3 {
  font-size: clamp(21px, 1.8vw, 24px);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pat-head .ed-loop-card-tag {
  flex: 1 0 100%;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-meter {
  display: inline-flex;
  gap: 3px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-meter i {
  width: 10px;
  height: 10px;
  border: 1px solid var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint [data-strength="6"] .ed-loop-meter i,
#primary.editorial-post.ed-skin-blueprint [data-strength="4"] .ed-loop-meter i:nth-child(-n+4),
#primary.editorial-post.ed-skin-blueprint [data-strength="1"] .ed-loop-meter i:first-child {
  background: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-strength {
  font: 500 0.8125rem/1.2 var(--ed-sans);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rec,
#primary.editorial-post.ed-skin-blueprint .ed-loop-suggest,
#primary.editorial-post.ed-skin-blueprint .ed-loop-outcome {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-rec {
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-suggest {
  color: var(--ed-muted);
  font-style: italic;
}

#primary.editorial-post.ed-skin-blueprint [data-strength="1"] .ed-loop-suggest {
  color: var(--bp-red);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-outcome {
  font-weight: 600;
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-outcome:empty {
  display: none;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern[data-state="approve"],
#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern[data-state="refine"] {
  border-color: var(--ed-blue);
  box-shadow: 4px 4px 0 var(--ed-blue-pale);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern[data-state="dismiss"] {
  opacity: 0.6;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern[data-state="dismiss"] .ed-loop-outcome,
#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern[data-state="wait"] .ed-loop-outcome {
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-pattern[data-state="wait"] {
  border-style: dashed;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-tally {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--ed-line);
  font: 400 clamp(19px, 1.8vw, 23px) / 1.3 var(--ed-serif);
  color: var(--ed-blue);
}

/* ---------------------------------------------------------------- *
 * FIG 05 — laps against the baseline
 * ---------------------------------------------------------------- */

#primary.editorial-post.ed-skin-blueprint .ed-loop-laps {
  display: grid;
  gap: 24px;
  padding: 26px 22px 24px;
}

@container (min-width: 760px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-laps {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
    gap: 34px;
    padding: 32px 34px 28px;
  }
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-grid {
  stroke: var(--ed-line);
  stroke-width: 1;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-base {
  stroke: var(--ed-ink);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-lap-baselabel {
  font-size: 13px;
  fill: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-seg {
  fill: none;
  stroke: var(--ed-blue);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: opacity 0.4s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-pt {
  fill: var(--ed-blue);
  stroke: var(--bp-card);
  stroke-width: 2;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-pt.is-base {
  fill: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-pt.is-dip {
  fill: var(--bp-red);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-point {
  transition: opacity 0.4s;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg .ed-loop-lap-point text {
  font: 400 24px/1 var(--ed-serif);
  letter-spacing: 0;
  fill: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg .ed-loop-lap-point[data-lap="2"] text {
  fill: var(--bp-red);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg .ed-loop-lap-x text {
  font-size: 13px;
  fill: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-point.is-future,
#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-seg.is-future {
  opacity: 0.12;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lap-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lapnotes {
  display: grid;
  gap: 16px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lapnote {
  display: grid;
  gap: 6px;
}

#primary.editorial-post.ed-skin-blueprint .is-enhanced .ed-loop-lapnote:not([hidden]) {
  animation: ed-loop-in 0.4s ease both;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lapnote b {
  font: 400 clamp(24px, 2.2vw, 30px) / 1.1 var(--ed-serif);
  color: var(--ed-ink);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lapnote b span {
  display: block;
  margin-top: 6px;
  font: 600 0.8125rem/1.3 var(--ed-sans);
  color: var(--ed-blue);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lapnote.is-dip b span {
  color: var(--bp-red);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-lapnote p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ed-muted);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-laprules {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px dashed var(--ed-blue);
  background: var(--ed-blue-pale);
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-laprules ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

#primary.editorial-post.ed-skin-blueprint .ed-loop-laprules li {
  margin: 0;
  font: 400 0.9375rem/1.4 var(--ed-sans);
  color: var(--ed-ink);
}

/* Phones: lift SVG label sizes so they render >= 11px in a ~340px box. */
@container (max-width: 520px) {
  #primary.editorial-post.ed-skin-blueprint .ed-loop-feedback,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-evidence,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-laps,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-baseline {
    padding-inline: 14px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-base-out {
    margin-inline: 14px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-decide {
    gap: 6px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-decide button {
    padding-inline: 11px;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg .ed-loop-lap-x text,
  #primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg text.ed-loop-lap-baselabel {
    font-size: 21px;
    letter-spacing: 0.02em;
  }

  #primary.editorial-post.ed-skin-blueprint .ed-loop-fig svg .ed-loop-lap-point text {
    font-size: 30px;
  }
}
