/* =========================================================
   blog.css — shared styles for /blog/* and legal subpages
   Loads AFTER styles.css, so it inherits every design token
   (--ink, --orange, --line, --shadow, fonts, dark mode, etc.)
   ========================================================= */

/* ---- Sub-page nav tweaks (brand becomes a link) ---- */
.nav--sub .nav__brand {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ---- Breadcrumb ---- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.crumb a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.15s ease;
}
.crumb a:hover {
  color: var(--orange);
}
.crumb i {
  font-size: 9px;
  opacity: 0.55;
}
.crumb [aria-current] {
  color: var(--ink);
}

/* ---- Sub-page header band ---- */
.subhero {
  padding: 56px 0 48px;
  border-bottom: 3px solid var(--line);
  background: var(--bg-deep);
}
.subhero__inner {
  max-width: 820px;
}

/* ---- Insights hero: text over a generative risk-line graphic ---- */
.subhero--hero {
  overflow: hidden;
}
.subhero__grid {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 320px;
}
.subhero__grid .subhero__inner {
  position: relative;
  z-index: 2;
  max-width: 600px;
}
/* The risk-line sits behind the text, pinned to the right of the container,
   masked on its left edge so it dissolves where the headline overlaps. */
.subhero__visual {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 1;
  width: min(520px, 47vw);
  opacity: 0.95;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 60%, transparent 100%);
  mask-image: linear-gradient(to left, #000 60%, transparent 100%);
}
/* Bespoke animated heroes render as a crisp object, not faded wallpaper. */
.subhero__visual.is-card {
  --ok: #2f9e44;
  --warn: #e8920c;
  --danger: #d2453f;
  width: min(420px, 44vw);
  opacity: 1;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}
[data-theme='dark'] .subhero__visual.is-card {
  --ok: #51cf66;
  --warn: #ffb454;
  --danger: #ff6f6a;
}

/* ---- Centered hero variant: pill → title → visual → lede, stacked ---- */
.subhero--center {
  position: relative;
}
.subhero--center .container {
  position: relative;
  z-index: 1;
}
/* Ambient ops-log columns drifting up the side gutters. */
.gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(150px, 18vw, 280px);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 12px;
  line-height: 2.15;
  color: var(--ink-mute);
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 22%,
    #000 78%,
    transparent
  );
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 22%,
    #000 78%,
    transparent
  );
}
.gutter--left {
  left: 0;
  text-align: left;
  padding-left: 24px;
}
.gutter--right {
  right: 0;
  text-align: right;
  padding-right: 24px;
}
.gutter__line {
  display: block;
  white-space: nowrap;
}
.gutter__line b {
  color: var(--ink-soft);
  font-weight: 600;
}
.gutter__line i {
  color: var(--orange-deep);
  font-style: normal;
}
@media (max-width: 1100px) {
  .gutter {
    display: none;
  }
}
/* Floating case-fact chips variant */
.gutter--chips {
  --chip-ok: #2f9e44;
  opacity: 0.7;
}
[data-theme='dark'] .gutter--chips {
  --chip-ok: #51cf66;
}
.chip {
  position: absolute;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.01em;
  background: var(--paper);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 5px 9px;
  will-change: transform;
}
.gutter--right .chip {
  left: auto;
  right: 16px;
}
.chip b {
  color: var(--ink);
  font-weight: 700;
}
.chip i {
  font-style: normal;
  color: var(--orange-deep);
}
.chip i.chip__ok {
  color: var(--chip-ok);
}
/* Shimmering cell grid variant */
.gutter--grid {
  opacity: 0.5;
}
.ggrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 14px;
}
.gcell {
  aspect-ratio: 1;
  border: 2px solid var(--line);
  background: var(--orange);
}
/* Sonar rings variant (OceanPayment) */
.gutter--sonar {
  opacity: 0.85;
}
.ping {
  position: absolute;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border: 2.5px solid var(--teal);
  border-radius: 50%;
}
/* Scanline firewall variant (Chargeback) */
.gutter--scan {
  --scan-bad: #d2453f;
  --scan-ok: #2f9e44;
  opacity: 0.8;
}
[data-theme='dark'] .gutter--scan {
  --scan-bad: #ff6f6a;
  --scan-ok: #51cf66;
}
.scanline {
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  background: var(--orange);
  box-shadow:
    0 0 10px 1px var(--orange),
    0 9px 18px -6px var(--orange);
}
.threat {
  position: absolute;
  width: 11px;
  height: 11px;
  margin: -5px 0 0 -5px;
  border: 2px solid var(--scan-bad);
  background: color-mix(in srgb, var(--scan-bad) 28%, transparent);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}
.threat.is-clear {
  border-color: var(--scan-ok);
  background: color-mix(in srgb, var(--scan-ok) 34%, transparent);
}
/* Equalizer bars variant (Refunds) */
.gutter--bars {
  --eq-a: #e8920c;
  --eq-b: #2f9e44;
  opacity: 0.95;
  /* Keep the top (label) fully visible; only soften the very bottom. */
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, #000 88%, transparent);
}
[data-theme='dark'] .gutter--bars {
  --eq-a: #ffb454;
  --eq-b: #51cf66;
}
.eqhead {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 11px;
}
.gutter--right .eqhead {
  justify-content: flex-end;
}
.eqhead__k {
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.eqhead__v {
  font-weight: 700;
  font-size: 15px;
  color: var(--eq-a);
}
.gutter--right .eqhead__v {
  color: var(--eq-b);
}
.eqhead__u {
  color: var(--ink-mute);
}
.eq {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 62%;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.eqbar {
  flex: 1;
  height: 100%;
  background: var(--eq-a);
}
.gutter--right .eqbar {
  background: var(--eq-b);
}

.subhero--center .subhero__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.subhero--center .crumb {
  justify-content: center;
}
.subhero--center .subhero__lede {
  order: 2;
  margin-left: auto;
  margin-right: auto;
}
.subhero--center .post-meta {
  order: 2;
  justify-content: center;
}
/* In the centered layout the visual flows inline, between title and lede. */
.subhero--center .subhero__visual.is-card {
  order: 1;
  position: static;
  transform: none;
  width: 100%;
  max-width: 460px;
  margin: 34px auto 30px;
  display: block;
}

@media (max-width: 900px) {
  .subhero__grid {
    min-height: 0;
  }
  .subhero__grid .subhero__inner {
    max-width: 100%;
  }
  .subhero__visual {
    width: 340px;
    opacity: 0.4;
    right: -20px;
  }
  .subhero__visual.is-card {
    display: none;
  }
}
@media (max-width: 560px) {
  .subhero__visual {
    display: none;
  }
}

/* ---- Generative risk-threshold line graphic (pure SVG + CSS) ---- */
.riskline {
  --rl-danger: #d2453f;
  --rl-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono",
    monospace;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
[data-theme='dark'] .riskline {
  --rl-danger: #ff6f6a;
}
.rl-axis {
  stroke: var(--line);
  stroke-width: 1.5;
  opacity: 0.45;
}
.rl-threshold {
  stroke: var(--rl-danger);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  opacity: 0;
  animation: rl-fade 0.5s ease 0.2s forwards;
}
.rl-label,
.rl-thr-label,
.rl-tick {
  font-family: var(--rl-mono);
}
.rl-label {
  fill: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-anchor: end;
}
.rl-thr-label {
  fill: var(--rl-danger);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-anchor: end;
  opacity: 0;
  animation: rl-fade 0.5s ease 0.4s forwards;
}
.rl-tick {
  fill: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-anchor: middle;
}
.rl-area {
  fill: var(--orange);
  opacity: 0;
  animation: rl-fade-area 0.9s ease 1.2s forwards;
}
.rl-line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: rl-draw 1.7s cubic-bezier(0.65, 0, 0.2, 1) 0.3s forwards;
}
.rl-dot {
  fill: var(--orange);
  stroke: var(--bg);
  stroke-width: 2.5;
  opacity: 0;
  animation: rl-fade 0.4s ease 1.85s forwards;
}
.rl-pulse {
  fill: none;
  stroke: var(--orange);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: rl-pulse 2.4s ease-out 2.1s infinite;
}
@keyframes rl-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes rl-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes rl-fade-area {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.13;
  }
}
@keyframes rl-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.55;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rl-line {
    animation: none;
    stroke-dashoffset: 0;
  }
  .rl-threshold,
  .rl-thr-label,
  .rl-dot {
    animation: none;
    opacity: 1;
  }
  .rl-area {
    animation: none;
    opacity: 0.13;
  }
  .rl-pulse {
    display: none;
  }
}

/* ---- PayPal hero: "Case won" dispute file (GSAP-driven) ---- */
.caseviz {
  --cv-ok: #2f9e44;
  position: relative;
  width: 100%;
}
[data-theme='dark'] .caseviz {
  --cv-ok: #51cf66;
}
.caseviz__file {
  background: var(--paper);
  border: 3px solid var(--line);
  box-shadow: 7px 7px 0 var(--shadow);
  padding: 18px 18px 20px;
}
.caseviz__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.caseviz__id {
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
}
.caseviz__status {
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 4px 10px;
  border: 2px solid var(--line);
  white-space: nowrap;
}
.caseviz__status.is-open {
  background: var(--bg-warm);
  color: var(--ink);
}
.caseviz__status.is-review {
  background: var(--orange);
  color: #0d0d10;
}
.caseviz__status.is-won {
  background: var(--cv-ok);
  color: #06210f;
  border-color: #06210f;
}
.caseviz__evidence {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.caseviz__chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--line);
  padding: 8px 11px;
}
.caseviz__chip i {
  width: 16px;
  text-align: center;
  color: var(--orange-deep);
}
.caseviz__bar {
  height: 9px;
  background: var(--bg-warm);
  border: 2px solid var(--line);
  overflow: hidden;
}
.caseviz__bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--orange);
}
.caseviz__stamp {
  position: absolute;
  right: -8px;
  bottom: -16px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cv-ok);
  border: 4px solid var(--cv-ok);
  border-radius: 6px;
  padding: 3px 15px;
  background: color-mix(in srgb, var(--cv-ok) 14%, var(--bg));
  transform: rotate(-8deg);
}

/* ---- Klarna hero: "Pay in 4" ---- */
.payviz {
  width: 100%;
}
.payviz__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.payviz__tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
}
.payviz__risk {
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #06210f;
  background: var(--ok);
  border: 2px solid #06210f;
  padding: 3px 9px;
}
.payviz__track {
  position: relative;
  margin: 0 2px;
}
.payviz__line,
.payviz__progress {
  position: absolute;
  top: 9px;
  left: 10px;
  right: 10px;
  height: 3px;
}
.payviz__line {
  background: var(--bg-warm);
}
.payviz__progress {
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
}
.payviz__steps {
  position: relative;
  display: flex;
  justify-content: space-between;
}
.payviz__node {
  width: 21px;
  height: 21px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
}
.payviz__node i {
  font-size: 9px;
  opacity: 0;
  color: #06210f;
}
.payviz__node.is-paid {
  background: var(--ok);
}
.payviz__node.is-paid i {
  opacity: 1;
}
.payviz__labels {
  display: flex;
  justify-content: space-between;
  margin: 10px 0 0;
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 11px;
  color: var(--ink-mute);
}
.payviz__labels span {
  width: 21px;
  text-align: center;
}
.payviz__total {
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.payviz__total b {
  color: var(--ink);
}

/* ---- OceanPayment hero: "Account radar" ---- */
.radar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.radar__scope {
  position: relative;
  width: min(228px, 92%);
  aspect-ratio: 1;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--shadow);
  overflow: hidden;
}
.radar__scope::before,
.radar__scope::after {
  content: '';
  position: absolute;
  background: var(--line-soft);
}
.radar__scope::before {
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-1px);
}
.radar__scope::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-1px);
}
.radar__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--line-soft);
  border-radius: 50%;
}
.radar__ring--1 {
  width: 40%;
  height: 40%;
}
.radar__ring--2 {
  width: 72%;
  height: 72%;
}
.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    color-mix(in srgb, var(--teal) 50%, transparent) 0deg,
    transparent 62deg,
    transparent 360deg
  );
}
.radar__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  transform: translate(-50%, -50%);
}
.radar__blip {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 24%, transparent);
}
.radar__blip--flag {
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 30%, transparent);
}
.radar__blip--flag.is-cleared {
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 30%, transparent);
}
.radar__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.radar__led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--warn);
}
.radar__led.is-ok {
  background: var(--ok);
}

/* ---- Chargeback hero: "Deflect" ---- */
.deflect {
  width: 100%;
}
.deflect__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.deflect__tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--ink);
}
.deflect__count {
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 12px;
  color: var(--ink-mute);
}
.deflect__count b {
  color: var(--ink);
  font-size: 14px;
}
.deflect__field {
  position: relative;
  height: 152px;
  border: 3px solid var(--line);
  background: repeating-linear-gradient(
      0deg,
      transparent 0 17px,
      var(--line-soft) 17px 18px
    ),
    var(--paper);
  overflow: hidden;
}
.deflect__shield {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #0d0d10;
  background: var(--orange);
  border: 3px solid var(--line);
  box-shadow: 4px 4px 0 var(--shadow);
  z-index: 2;
}
.deflect__dart {
  position: absolute;
  left: 0;
  top: calc(50% - 3px);
  width: 18px;
  height: 6px;
  background: var(--danger);
  clip-path: polygon(0 50%, 32% 0, 100% 0, 100% 100%, 32% 100%);
  z-index: 1;
}

/* ---- Refunds hero: "Counter-move" ---- */
.counter {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.counter__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.counter__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.counter__dir {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  font-size: 11px;
}
.counter__dir--down {
  background: var(--warn);
  color: #3a1c00;
}
.counter__dir--up {
  background: var(--ok);
  color: #06210f;
}
.counter__bar {
  height: 16px;
  border: 3px solid var(--line);
  background: var(--bg-warm);
  overflow: hidden;
}
.counter__fill {
  display: block;
  height: 100%;
}
.counter__fill--refund {
  background: var(--warn);
}
.counter__fill--csat {
  background: var(--ok);
}
.counter__val {
  margin-top: 7px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}
.counter__val span {
  font-size: 13px;
  color: var(--ink-mute);
}

/* ---- Insights index hero: "Signal grid" ---- */
.signals {
  width: 100%;
}
.signals__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 2px solid var(--line-soft);
}
.signals__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
}
.signals__status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--rl-mono, ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.signals__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}
.signals__status.is-live .signals__dot {
  animation: sig-pulse 1.4s ease-in-out infinite;
}
@keyframes sig-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}
.signals__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}
.signals__k {
  flex: 0 0 94px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.signals__spark {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
}
.signals__spark i {
  display: block;
  flex: 1;
  min-height: 2px;
  background: var(--orange);
}
.signals__v {
  flex: 0 0 44px;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
}

.subhero__eyebrow {
  margin: 22px 0 18px;
}
.subhero__title {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-size: clamp(34px, 6vw, 64px);
  color: var(--ink);
  text-transform: none;
}
.subhero__title .hl {
  color: var(--orange);
}
.subhero__lede {
  margin-top: 20px;
  max-width: 680px;
  font-family: var(--font-body);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.post-meta i {
  color: var(--orange);
}

/* ---- Article shell ---- */
.article {
  padding: 64px 0 24px;
}
.prose {
  max-width: 760px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink-soft);
}
.prose > * + * {
  margin-top: 1.15em;
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 2em;
  padding-top: 0.4em;
  scroll-margin-top: 120px;
}
.prose h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 3vw, 25px);
  line-height: 1.15;
  color: var(--ink);
  margin-top: 1.6em;
  scroll-margin-top: 120px;
}
.prose p {
  color: var(--ink-soft);
}
.prose strong {
  color: var(--ink);
  font-weight: 800;
}
.prose a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  font-weight: 700;
}
.prose a:hover {
  color: var(--orange);
}
.prose ul,
.prose ol {
  padding-left: 0;
  list-style: none;
}
.prose ul li,
.prose ol li {
  position: relative;
  padding-left: 30px;
  margin-top: 0.6em;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  background: var(--orange);
  border: 2px solid var(--line);
}
.prose ol {
  counter-reset: prose-ol;
}
.prose ol li {
  counter-increment: prose-ol;
}
.prose ol li::before {
  content: counter(prose-ol);
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--orange);
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 20px 24px;
  border-left: 4px solid var(--orange);
  background: var(--bg-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 2.6vw, 23px);
  line-height: 1.4;
  color: var(--ink);
}

/* ---- Callout / TL;DR box ---- */
.callout {
  margin: 2em auto;
  max-width: 760px;
  padding: 26px 28px;
  background: var(--paper);
  border: 3px solid var(--line);
  box-shadow: 7px 7px 0 var(--shadow);
}
.callout--tldr {
  background: var(--tint-amazon);
}
.callout__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.callout__label i {
  color: var(--orange);
}
.callout ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.callout ul li {
  position: relative;
  padding-left: 26px;
  margin-top: 0.5em;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.callout ul li:first-child {
  margin-top: 0;
}
.callout ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 900;
  color: var(--orange-deep);
}

/* ---- Stat strip inside articles ---- */
.statline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 2em auto;
  max-width: 760px;
  border: 3px solid var(--line);
  box-shadow: 7px 7px 0 var(--shadow);
  background: var(--paper);
}
.statline__item {
  padding: 22px 18px;
  text-align: center;
  border-right: 3px solid var(--line);
}
.statline__item:last-child {
  border-right: 0;
}
.statline__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1;
  color: var(--orange-deep);
}
.statline__lab {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---- End-of-post CTA ---- */
.post-cta {
  margin: 56px auto 80px;
  max-width: 760px;
  padding: 40px 34px;
  background: var(--ink);
  border: 3px solid var(--line);
  box-shadow: 8px 8px 0 var(--shadow);
  text-align: center;
}
.post-cta h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cream);
}
/* The box background is var(--ink), which is dark in light mode and
   cream in dark mode — so the body text must invert to stay readable. */
.post-cta p {
  margin: 16px auto 26px;
  max-width: 520px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 243, 223, 0.78);
}
[data-theme='dark'] .post-cta p {
  color: rgba(13, 13, 16, 0.68);
}
.post-cta .btn-big {
  margin: 0 auto;
}

/* ---- Author / disclosure footer note ---- */
.post-foot {
  max-width: 760px;
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 2px solid var(--line-soft);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-mute);
}

/* ---- Related posts ---- */
.related {
  margin-top: 40px;
}
.related__title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
}

/* =========================================================
   Blog index grid
   ========================================================= */
.bloglist {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
  gap: 26px;
  padding: 56px 0 16px;
}
.bcard {
  display: flex;
  flex-direction: column;
  scroll-margin-top: 150px;
  padding: 28px 26px;
  background: var(--paper);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bcard:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0 var(--shadow);
}
.bcard--wide {
  grid-column: 1 / -1;
}
.bcard__tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--orange);
  border: 2px solid var(--line);
  padding: 5px 10px;
}
.bcard__title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.bcard__desc {
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.bcard__meta {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.bcard__arrow {
  margin-left: auto;
  color: var(--orange-deep);
  font-size: 14px;
  transition: transform 0.15s ease;
}
.bcard:hover .bcard__arrow {
  transform: translateX(4px);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 720px) {
  .subhero {
    padding: 40px 0 34px;
  }
  .article {
    padding: 44px 0 16px;
  }
  .prose {
    font-size: 17px;
  }
  .bloglist {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
  .statline {
    grid-template-columns: 1fr;
  }
  .statline__item {
    border-right: 0;
    border-bottom: 3px solid var(--line);
  }
  .statline__item:last-child {
    border-bottom: 0;
  }
  .post-cta,
  .callout {
    padding: 24px 20px;
  }
}

/* =========================================================
   INSIGHTS ENHANCEMENTS (injected by insights-enhance.js)
   ========================================================= */

/* 1. Reading progress bar (articles) */
.readbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.readbar__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--orange);
}

/* 2. H2 underline draw-in */
.article .prose h2.h2-draw {
  position: relative;
}
.article .prose h2.h2-draw::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 52px;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.article .prose h2.h2-draw.is-drawn::after {
  transform: scaleX(1);
}

/* 3. Sticky scroll-spy TOC (wide screens only) */
.post-toc {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 188px;
  max-height: 74vh;
  overflow-y: auto;
  z-index: 60;
  display: none;
}
.post-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}
.post-toc li {
  margin: 0;
}
.post-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-mute);
  font-size: 12.5px;
  line-height: 1.32;
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.post-toc a:hover {
  color: var(--ink);
}
.post-toc a.active {
  color: var(--ink);
  border-left-color: var(--orange);
  font-weight: 700;
}
@media (min-width: 1300px) {
  .post-toc {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(-6px);
    transition:
      opacity 0.4s,
      visibility 0.4s,
      transform 0.4s;
    pointer-events: none;
  }
  .post-toc.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
  }
}

/* 5. "Next playbook" card (articles) */
.nextcard {
  position: relative;
  display: block;
  max-width: 760px;
  margin: 44px auto 8px;
  padding: 26px 30px;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s,
    transform 0.6s,
    box-shadow 0.2s;
}
.nextcard.is-in {
  opacity: 1;
  transform: none;
}
.nextcard:hover {
  box-shadow: 7px 7px 0 0 var(--shadow);
}
.nextcard__eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.nextcard__tag {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 11px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.nextcard__title {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display, inherit);
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.16;
  max-width: 74%;
}
.nextcard__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-weight: 700;
  color: var(--orange-deep);
}
.nextcard__go i {
  transition: transform 0.2s;
}
.nextcard:hover .nextcard__go i {
  transform: translateX(5px);
}
.nextcard__viz {
  top: auto;
  bottom: 26px;
  right: 28px;
  opacity: 0.5;
}
@media (max-width: 560px) {
  .nextcard__title {
    max-width: 100%;
  }
  .nextcard__viz {
    display: none;
  }
}

/* 6. Index card hover + mini-viz watermark */
.bcard {
  position: relative;
  overflow: hidden;
}
.bcard > * {
  position: relative;
  z-index: 1;
}
.bcard::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}
.bcard:hover::before {
  transform: scaleX(1);
}
.bcard__arrow {
  transition: transform 0.25s;
}
.bcard:hover .bcard__arrow {
  transform: translateX(6px);
}
.bcard > .bcard__viz {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 0;
  opacity: 0.16;
  transition: opacity 0.3s;
}
.bcard:hover > .bcard__viz {
  opacity: 0.5;
}

/* Mini-viz motifs (shared by index cards + next-playbook card) */
.mini {
  position: absolute;
  width: 74px;
  height: 42px;
  pointer-events: none;
}
.mini--disputes .mini__track {
  position: absolute;
  left: 0;
  right: 22px;
  top: 50%;
  margin-top: -3px;
  height: 6px;
  background: var(--line);
}
.mini--disputes .mini__fill {
  display: block;
  height: 100%;
  width: 100%;
  background: #2f9e44;
}
.mini--disputes .mini__tick {
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2f9e44;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 9px;
}
.mini--risk {
  display: flex;
  align-items: center;
  gap: 7px;
}
.mini--risk i {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #bdbab2;
}
.mini--processors .mini__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--teal);
}
.mini--processors .mini__ping {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  opacity: 0.25;
}
.mini--chargebacks {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 42px;
}
.mini--chargebacks i {
  display: block;
  width: 8px;
  height: 100%;
  background: var(--ink-mute);
  transform-origin: bottom;
  transform: scaleY(0.6);
}
.mini--chargebacks .mini__scan {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
}
.mini--retention {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  height: 42px;
}
.mini--retention .mini__col {
  position: relative;
  width: 12px;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.mini--retention .mini__col i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: bottom;
}
.mini--retention .mini__col--down i {
  background: #d2453f;
  transform: scaleY(0.4);
}
.mini--retention .mini__col--up i {
  background: #2f9e44;
  transform: scaleY(0.85);
}

/* 7. Category filter pills */
.blogfilter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 26px;
}
.blogfilter__pill {
  padding: 7px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
}
.blogfilter__pill:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.blogfilter__pill:active {
  transform: translateY(1px);
}
.blogfilter__pill.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .readbar__fill,
  .article .prose h2.h2-draw::after {
    transition: none;
  }
}
