/* ============================================================
   AUTOLINK COMPONENTS — the two /ad-accounts sections, shared.
   1. HOW IT WORKS timeline  (.hiw-*)   → docs/partials/hiw.html
   2. COMPARISON TABLE       (.cmp-*)   → docs/partials/cmp.html
   Load AFTER core.css (and before page CSS):
     <link rel="stylesheet" href="assets/css/components.css" />
     <script src="assets/js/components.js" defer></script>   (after core.js)
   The rules below are copied 1:1 from ad-accounts.html (inline <style>) so the
   look is literally the same code. ad-accounts.html itself does NOT load this
   file — if you change a rule here, change it there too (and vice versa).
   Only additions vs. the original: section wrappers (.hiw-section /
   .cmp-section), the `.site` text-wrap resets, `.hiw-meta[hidden]`, and the
   reduced-motion block at the end. Demo: /docs/components-demo
   Read docs/DESIGN-LESSONS.md before changing anything here.
   ============================================================ */

/* Section wrappers. On ad-accounts both live in one <section> that sits above
   the fixed .ambient/.grain layers (section { z-index: 2 }). */
.hiw-section, .cmp-section { position: relative; z-index: 2; }
.hiw-section { padding-top: 80px; }
.section-head.hiw-head { margin-bottom: 0; }

/* body.site (new pages) balances/prettifies h2/h3/p. ad-accounts has no
   body.site, so undo it here to keep the exact same line breaks. */
.site .section-head h2, .site .hiw-desc, .site .cmp-foot-slogan { text-wrap-style: auto; }
/* Step descriptions on phones: no lone word on the last line ("…paid from / it."). */
@media (max-width: 600px) { .site .hiw-desc { text-wrap: pretty; } }

/* ============ SECTION HEAD (ad-accounts .section-head) ============ */
.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  margin-bottom: 80px;
  align-items: end;
}
.section-head .label-col {
  padding-top: 8px;
  border-top: 1px solid var(--line-2);
}
/* When section-head has only an h2 (no label-col), let it span the full row
   instead of being squeezed into the 200px label column. */
.section-head > h2:first-child {
  grid-column: 1 / -1;
}
.section-head h2 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(32px, 3.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: min(900px, 100%);
  overflow-wrap: break-word;
}
.section-head h2 .em {
  font-family: var(--font-sans);
  font-weight: 400;
  background: linear-gradient(180deg, #FFFFFF 0%, #B8BAC0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-head .lead-num {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.16em;
  margin-top: 4px;
}

/* ============================================================
   1. HOW IT WORKS — timeline (.hiw)
   ============================================================ */
/* ============ HOW IT WORKS — scroll-driven timeline ============ */
.hiw {
  position: relative;
  margin: 0 0 56px;
  padding: 8px 0 56px;
  overflow: hidden;
  isolation: isolate;
}
.hiw-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hiw-bg .hiw-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 85%);
  opacity: 0.4;
}
.hiw-bg .hiw-orb {
  position: absolute;
  width: 700px; height: 700px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.04), transparent 65%);
  filter: blur(60px);
  border-radius: 50%;
}
.hiw-inner {
  position: relative;
  z-index: 2;
}

.hiw-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 90px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 70%, transparent);
  z-index: 5;
  padding-top: 8px;
}
.hiw-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hiw-progress {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.16em;
}
.hiw-progress-fill {
  width: 120px; height: 1px;
  background: var(--line-2);
  position: relative; overflow: hidden;
}
.hiw-progress-fill::before {
  content: ""; position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #FFFFFF, #B8BAC0);
  transform: scaleX(var(--hiw-p, 0));
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.hiw-progress-num {
  color: var(--text-3);
}
.hiw-progress-num .hiw-progress-cur { color: var(--text); }

.hiw-stage {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  /* Push the rail (line + dots) into the page margin on wide viewports,
     clamped so it never gets cut off on narrower screens. */
  --rail-shift: max(-180px, min(0px, calc((var(--grid) - 100vw) / 2 + 32px)));
}
.hiw-step-index {
  transform: translateX(var(--rail-shift, 0px));
}

/* Vertical rail */
.hiw-rail {
  position: relative;
  width: 80px;
}
.hiw-rail-line {
  position: absolute;
  left: 39px; top: 0; bottom: 0;
  width: 1px;
  z-index: 1;
  background: linear-gradient(180deg, transparent, var(--line-2) 6%, var(--line-2) 94%, transparent);
  transform: translateX(var(--rail-shift, 0px));
}
.hiw-rail-fill {
  position: absolute;
  left: 39px; top: 0;
  width: 1px;
  z-index: 1;
  height: 0;
  background: linear-gradient(180deg, #FFFFFF, #B8BAC0 60%, #6E7079);
  box-shadow: 0 0 14px rgba(255,255,255,0.5);
  transition: height 0.12s linear, top 0.12s linear;
  transform: translateX(var(--rail-shift, 0px));
}
/* Dots must paint above the fill bar so the beam never visually
   cuts through a dot — give the step-index its own stacking layer. */
.hiw-step-index { z-index: 3; }
.hiw-step { z-index: 2; }

/* Steps */
.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hiw-step {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 48px;
  padding: 64px 0 72px;
  margin-left: -80px;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.7s var(--ease-out);
  opacity: 0.32;
}
.hiw-step:last-child { border-bottom: 0; }
.hiw-step.is-active { opacity: 1; }
.hiw-step.is-passed { opacity: 0.55; }
/* A step that has entered the screen keeps its text + art (no blank holes
   when scrolling fast or between steps); the active step keeps the highlight. */
.hiw-step.is-seen .hiw-tag,
.hiw-step.is-seen .hiw-title span,
.hiw-step.is-seen .hiw-desc { opacity: 1; transform: translateY(0); visibility: visible; }
.hiw-step.is-seen .hiw-art { opacity: 1; transform: translateY(0) scale(1); }
.hiw-step.is-seen:not(.is-active) { opacity: 0.55; }
@media (max-width: 900px) { .hiw-step.is-seen { opacity: 1; } }

.hiw-step-index {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 6px;
}
.hiw-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  position: relative;
  z-index: 2;
  transition: border-color 0.5s var(--ease-out), background 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
  margin-bottom: 16px;
}
.hiw-step.is-active .hiw-dot {
  background: #FFFFFF;
  border-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08), 0 0 24px rgba(255,255,255,0.5);
}
.hiw-step.is-passed .hiw-dot {
  background: var(--text-3);
  border-color: var(--text-3);
}
.hiw-dot-pulse {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  opacity: 0;
}
.hiw-step.is-active .hiw-dot-pulse {
  /* pulse animation removed */
}
@keyframes hiwDotPulse {
  0%   { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.6); opacity: 0; }
}
.hiw-num {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.16em;
  transition: color 0.4s var(--ease-out);
}
.hiw-num { display: none; }
.hiw-step.is-active .hiw-num { color: var(--text); }

.hiw-step-body {
  display: grid;
  grid-template-columns: 1fr 480px;
  grid-template-areas:
    "text art"
    "text art"
    "text art";
  column-gap: 64px;
  row-gap: 0;
  align-items: start;
}
.hiw-step-body > .hiw-tag,
.hiw-step-body > .hiw-title,
.hiw-step-body > .hiw-desc { grid-column: 1; }
.hiw-step-body > .hiw-title { align-self: start; margin-top: 0; }
.hiw-step-body .hiw-art  { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.hiw-tag {
  display: none;
}
.hiw-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
  max-width: 620px;
  text-wrap: balance;
}
.hiw-title span {
  display: inline-block;
  transform: translateY(28px);
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.hiw-title span:nth-child(2) { transition-delay: 0.1s; }
.hiw-title span:nth-child(3) { transition-delay: 0.2s; }
.hiw-title-tri { letter-spacing: -0.02em; }
.hiw-title-tri span { margin-right: 0.18em; }

/* Typewriter animation for step titles */
.hiw-title.is-typewriter span {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.hiw-caret-tw {
  display: inline-block;
  width: 0.045em;
  height: 0.78em;
  background: linear-gradient(180deg, #FFFFFF, #C8CACF);
  vertical-align: baseline;
  margin-left: 0.04em;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.55), 0 0 18px rgba(255, 255, 255, 0.2);
  transform: translateY(0.06em);
  opacity: 0;
}
.hiw-title.is-typewriter .hiw-caret-tw { opacity: 1; }
.hiw-title.is-typing .hiw-caret-tw {
  animation: hiwCaretBlink 0.85s steps(2, end) infinite;
}
.hiw-title.is-typed .hiw-caret-tw {
  animation: hiwCaretFinish 1.6s ease-out forwards;
}
@keyframes hiwCaretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes hiwCaretFinish {
  0% { opacity: 1; }
  20% { opacity: 0; }
  40% { opacity: 1; }
  60% { opacity: 0; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}
.hiw-title .hiw-em {
  font-family: var(--font-sans);
  font-weight: 400;
  background: linear-gradient(180deg, #FFFFFF 0%, #B8BAC0 60%, #6E7079);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.hiw-desc {
  display: block; /* hidden by opacity only, so screen readers can read every step (audit #25) */
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 480px;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease-out) 0.15s, transform 0.7s var(--ease-out) 0.15s;
}
.hiw-step.is-active .hiw-tag,
.hiw-step.is-active .hiw-title span,
.hiw-step.is-active .hiw-desc {
  opacity: 1;
  transform: translateY(0);
}
.hiw-step.is-active .hiw-desc { visibility: visible; }

/* Step art card */
/* Wrapper for the mobile art scaler. Invisible (display:contents) on desktop
   so the art behaves exactly as before; becomes a real clipping box on mobile. */
.hiw-art-slot { display: contents; }
.hiw-art {
  position: relative;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.05), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(255,255,255,0.025), transparent 50%),
    rgba(255,255,255,0.015);
  padding: 28px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: opacity 0.9s var(--ease-out) 0.25s, transform 0.9s var(--ease-out) 0.25s;
}
.hiw-art::before {
  content: ""; position: absolute;
  top: 0; left: -50%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.hiw-step.is-active .hiw-art {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.hiw-step.is-active .hiw-art::before {
  opacity: 1;
  animation: hiwArtSweep 4s var(--ease-in-out) 0.6s infinite;
}
@keyframes hiwArtSweep {
  0%, 100% { transform: translateX(-30%); }
  50%      { transform: translateX(220%); }
}

/* Step counter: hidden by default (as on ad-accounts). The [hidden] attr must win over display:flex. */
.hiw-meta[hidden] { display: none; }

/* ============================================================
   2. COMPARISON TABLE (.cmp)
   ============================================================ */
/* ============ COMPARISON TABLE ============ */
.cmp-section-head {
  margin-top: 24px;
  margin-bottom: 56px;
  align-items: end;
  text-align: center;
  justify-items: center;
}
.cmp-section-head > h2:first-child {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.cmp-section-head .label-col .lead-num {
  margin-top: 0;
  display: block;
  text-transform: uppercase;
}
@media (max-width: 960px) {
  .cmp-section-head { margin-bottom: 36px; }
}
/* Underline + dot animation on the AutoLink vs alternatives heading */
.cmp-head-uline-wrap {
  position: relative;
  display: inline-block;
  padding-bottom: 0.14em;
}
.cmp-head-uline-end {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.cmp-head-uline-end::after {
  /* Acts as the period — replaces "." after "alternatives" */
  content: "";
  position: absolute;
  left: calc(100% + 0.10em);
  bottom: 0.20em;
  width: 0.13em;
  height: 0.13em;
  border-radius: 50%;
  background: var(--text);
  opacity: 0;
  transform: translateY(-6px) scale(0.4);
  transform-origin: center;
}
.cmp-section-head.in .cmp-head-uline-end::after {
  animation: cmpHeadULineDot 0.34s var(--ease-snappy, cubic-bezier(0.22, 1, 0.36, 1)) 1.55s forwards;
}
.cmp-head-uline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 0.22em;
  overflow: visible;
  display: block;
  pointer-events: none;
}
.cmp-head-uline-stroke {
  fill: none;
  stroke: var(--text);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  opacity: 0;
}
.cmp-section-head.in .cmp-head-uline-stroke {
  opacity: 1;
  animation: cmpHeadULine 1.4s cubic-bezier(0.55, 0.1, 0.4, 0.95) 0.45s forwards;
}
@keyframes cmpHeadULine {
  to { stroke-dashoffset: 0; }
}
@keyframes cmpHeadULineDot {
  0%   { opacity: 0; transform: translateY(-6px) scale(0.4); }
  55%  { opacity: 1; transform: translateY(0) scale(1.35); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.cmp {
  position: relative;
  margin: 0;
  padding: 0 0 64px;
}
.cmp-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(255,255,255,0.04), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.012), rgba(255,255,255,0.005));
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 30px 80px -40px rgba(0,0,0,0.6);
}
.cmp-frame::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}
.cmp-corner {
  position: absolute;
  width: 22px; height: 22px;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out) 0.5s;
}
.cmp.in .cmp-corner { opacity: 0.6; }
.cmp-corner::before,
.cmp-corner::after {
  content: ""; position: absolute;
  background: rgba(255,255,255,0.55);
  box-shadow: 0 0 8px rgba(255,255,255,0.35);
}
.cmp-corner::before { width: 22px; height: 1px; top: 0; left: 0; }
.cmp-corner::after  { width: 1px;  height: 22px; top: 0; left: 0; }
.cmp-corner.tl { top: -1px;    left: -1px; }
.cmp-corner.tr { top: -1px;    right: -1px;   transform: scaleX(-1); }
.cmp-corner.bl { bottom: -1px; left: -1px;    transform: scaleY(-1); }
.cmp-corner.br { bottom: -1px; right: -1px;   transform: scale(-1, -1); }

.cmp-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr);
}

/* Header */
.cmp-head { display: contents; }
.cmp-head .cmp-cell {
  padding: 34px 32px 26px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.cmp-head-feature {
  display: flex; flex-direction: column;
  justify-content: flex-end;
}
.cmp-head-feature .cmp-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.cmp-head-col {
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  text-align: center;
  border-left: 1px solid var(--line-2);
}
.cmp-head-col .cmp-col-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* AutoLink column: the wordmark instead of the word (owner request). */
.cmp-head-al .cmp-col-title { display: inline-flex; align-items: center; gap: 0.32em; }
.cmp-logo { height: 1.05em; width: auto; display: block; flex: none; transform: translateY(0.06em); }
@media (max-width: 600px) { .cmp-head-al .cmp-col-title { flex-direction: column; gap: 4px; white-space: normal; text-align: center; } }
@media (max-width: 420px) { html .cmp-head-al .cmp-col-title { letter-spacing: -0.01em; } }
@media (max-width: 600px) { .cmp-logo { height: 12.5px; } }
/* AutoLink column premium treatment */
.cmp-head-al {
  background:
    radial-gradient(ellipse 110% 130% at 50% 0%, rgba(255,255,255,0.07), transparent 70%);
}
.cmp-head-al .cmp-col-title {
  background: linear-gradient(180deg, #FFFFFF 0%, #C9CBD1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cmp-head-al::before {
  content: "";
  position: absolute;
  top: -1px; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  z-index: 1;
}
.cmp-head-std .cmp-col-title {
  color: var(--text-2);
}

/* Body rows */
.cmp-row { display: contents; }
.cmp-row .cmp-cell {
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.cmp-row .cmp-mark-cell {
  justify-content: center;
  border-left: 1px solid var(--line);
}
.cmp-row .cmp-yes-cell {
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.022) 50%, transparent);
}
.cmp-row:last-child .cmp-cell { border-bottom: 0; }

.cmp-row .cmp-feat { gap: 22px; }
.cmp-row .cmp-ix {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.2em;
  min-width: 28px;
  font-variant-numeric: tabular-nums;
}
.cmp-row .cmp-lbl {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Table cells fade in together when the table enters view (no per-row stagger) */
.cmp.in .cmp-row .cmp-cell { opacity: 1; transform: translateY(0); }

/* Per-row mark + sweep animations (all timed from when row.in is set).
   Within a single row: V is drawn FIRST and completes, THEN the X is drawn,
   so each row reads as "check, then cross" — then the next row begins. */
.cmp-row.in .cm-tick     { animation: cmpTickDraw 0.34s cubic-bezier(0.55, 0.05, 0.25, 1) 0.04s forwards; }
.cmp-row.in .cm-x1       { animation: cmpXDraw 0.20s cubic-bezier(0.55, 0.05, 0.25, 1) 0.42s forwards; }
.cmp-row.in .cm-x2       { animation: cmpXDraw 0.20s cubic-bezier(0.55, 0.05, 0.25, 1) 0.55s forwards; }
.cmp-row.in .cmp-mark-yes::before { animation: cmpYesPulse 0.7s var(--ease-out) 0.34s forwards; }
.cmp-row.in .cmp-feat::after { animation: cmpRowSweep 0.7s var(--ease-out) 0.08s forwards; }

@keyframes cmpTickDraw {
  0%   { stroke-dashoffset: 56; opacity: 0; }
  14%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes cmpXDraw {
  0%   { stroke-dashoffset: 36; opacity: 0; }
  16%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes cmpYesPulse {
  0%   { opacity: 0; transform: scale(0.65); }
  50%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.55); }
}

/* Sweep line under each feature label when its mark draws */
.cmp-row .cmp-feat::after {
  content: "";
  position: absolute;
  left: 32px; right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.45), transparent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
.cmp.in .cmp-row .cmp-feat::after {
  animation: cmpRowSweep 0.7s var(--ease-out) forwards;
}

/* Marks (hand-drawn pen, no circles) */
.cmp-mark {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  position: relative;
}
.cmp-mark-svg {
  width: 100%; height: 100%;
  display: block;
  overflow: visible;
}
.cm-tick {
  fill: none;
  stroke: url(#cmpInkGreen);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 56;
  stroke-dashoffset: 56;
  opacity: 0;
}
.cm-x {
  fill: none;
  stroke: url(#cmpInkRed);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  opacity: 0;
}
.cmp-mark-yes .cmp-mark-svg { transform: rotate(-3deg); }
.cmp-mark-no  .cmp-mark-svg { transform: rotate(2.5deg); }
@keyframes cmpRowSweep {
  0%   { transform: scaleX(0); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* (per-row timings live above on .cmp-row.in) */

/* Footer with signature */
.cmp-foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 1.8fr);
  border-top: 1px solid var(--line-2);
  background:
    radial-gradient(ellipse 60% 100% at 70% 50%, rgba(255,255,255,0.025), transparent 80%);
}
.cmp-foot-meta {
  padding: 28px 36px;
  display: flex; flex-direction: column;
  justify-content: center;
}
.cmp-foot-slogan-wrap {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  padding-bottom: 12px;
}
.cmp-foot-slogan {
  font-family: var(--font-sans);
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.022em;
  color: var(--text);
  font-weight: 500;
  margin: 0;
  display: inline-block;
  /* Writing/clip-path reveal animation removed — slogan now just appears. */
}
.cmp-slogan-end {
  position: relative;
  white-space: nowrap;
}
.cmp-slogan-end::after {
  content: "";
  position: absolute;
  left: calc(100% + 0.06em);
  bottom: 0.08em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0;
  transform: translateY(-3px) scale(0.4);
  transform-origin: center;
}
.cmp-foot.in .cmp-slogan-end::after {
  animation: cmpFootULineDot 0.32s var(--ease-snappy) 3.30s forwards;
}
.cmp-foot-uline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 10px;
  overflow: visible;
  display: block;
  pointer-events: none;
}
.cmp-foot-uline-stroke {
  fill: none;
  stroke: var(--text);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
  opacity: 0;
}
.cmp-foot.in .cmp-foot-uline-stroke {
  opacity: 1;
  animation: cmpFootULine 1.15s cubic-bezier(0.55, 0.1, 0.4, 0.95) 2.10s forwards;
  /* synced with signature underline flourish (data-i=7) — both draw 2.10s → 3.25s */
}
@keyframes cmpFootULine {
  to { stroke-dashoffset: 0; }
}
@keyframes cmpFootULineDot {
  0%   { opacity: 0; transform: translateY(-3px) scale(0.4); }
  55%  { opacity: 1; transform: translateY(0) scale(1.35); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.cmp-foot-sig {
  position: relative;
  padding: 16px 28px 22px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background:
    radial-gradient(ellipse 120% 130% at 50% 60%, rgba(255,255,255,0.05), transparent 75%);
}
.cmp-sig-svg {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.cmp-sig-label {
  font-family: var(--font-sans);
  font-size: 9.5px;
  color: var(--text-3);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out) 3.35s;
}
.cmp-foot.in .cmp-sig-label { opacity: 1; }

.cmp-sig-stroke {
  fill: none;
  stroke: url(#cmpInk);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  opacity: 0;
}
.cmp-foot.in .cmp-sig-stroke {
  opacity: 1;
  animation: cmpSigDraw var(--dur, 0.4s) cubic-bezier(0.45, 0.05, 0.4, 1) var(--d, 0s) forwards;
}
@keyframes cmpSigDraw {
  from { stroke-dashoffset: var(--len, 400); }
  to   { stroke-dashoffset: 0; }
}
.cmp-sig-dot { opacity: 0; transform-origin: center; }
.cmp-foot.in .cmp-sig-dot {
  animation: cmpSigDot 0.18s var(--ease-snappy) var(--ddot, 1.7s) forwards;
}
@keyframes cmpSigDot {
  0%   { opacity: 0; transform: translateY(-2px) scale(0.6); }
  60%  { opacity: 1; transform: translateY(0) scale(1.3); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* Per-stroke timing — starts from when footer enters view */
.cmp-sig-stroke[data-i="0"] { --len: 240; --dur: 0.22s; --d: 0.20s; }
.cmp-sig-stroke[data-i="1"] { --len: 32;  --dur: 0.08s; --d: 0.44s; }
.cmp-sig-stroke[data-i="2"] { --len: 540; --dur: 0.48s; --d: 0.54s; }
.cmp-sig-stroke[data-i="3"] { --len: 26;  --dur: 0.06s; --d: 1.04s; }
.cmp-sig-stroke[data-i="4"] { --len: 240; --dur: 0.24s; --d: 1.12s; }
.cmp-sig-stroke[data-i="5"] { --len: 400; --dur: 0.42s; --d: 1.38s; }
.cmp-sig-stroke[data-i="6"] { --len: 140; --dur: 0.16s; --d: 1.82s; }
/* data-i=7 is the signature's underline flourish — draw it in lockstep with
   the slogan underline on the left (2.10s → 3.25s) for a single synced beat. */
.cmp-sig-stroke[data-i="7"] { --len: 480; --dur: 1.15s; --d: 2.10s; }
/* i-dot pops at the same instant as the slogan-end period on the left */
.cmp-sig-dot { --ddot: 3.30s; }

@media (max-width: 860px) {
  .cmp-grid { grid-template-columns: minmax(0, 1.4fr) 92px 92px; }
  .cmp-foot { grid-template-columns: 1fr; }
  .cmp-foot-sig { border-left: 0; border-top: 1px solid var(--line); }
  .cmp-row .cmp-cell { padding: 18px 18px; }
  .cmp-head .cmp-cell { padding: 22px 18px 16px; }
  .cmp-row .cmp-feat { gap: 14px; }
  .cmp-row .cmp-lbl { font-size: 14px; }
  .cmp-head-col .cmp-col-title { font-size: 12.5px; white-space: normal; }
  .cmp-head-col .cmp-col-sub { display: none; }
  .cmp-head-feature .cmp-head-tag { font-size: 13px; max-width: none; }
  .cmp-mark { width: 28px; height: 28px; }
  .cmp-row .cmp-feat::after { left: 18px; }
}
@media (max-width: 520px) {
  .cmp-grid { grid-template-columns: minmax(0, 1fr) 64px 64px; }
  .cmp-row .cmp-feat { gap: 10px; }
  .cmp-row .cmp-ix { display: none; }
  .cmp-row .cmp-lbl { font-size: 13.5px; text-wrap: balance; }
  .cmp-row .cmp-cell { padding: 16px 12px; }
  .cmp-head .cmp-cell { padding: 18px 12px 12px; }
  .cmp-foot-meta { padding: 20px 14px; }
  .cmp-foot-slogan { font-size: 18px; }
  .cmp-foot-sig { padding: 14px 12px 18px; }
  .cmp-sig-svg { width: 180px; }
  .cmp-row .cmp-feat::after { left: 12px; }
}

/* ============ RESPONSIVE (kept last so it wins — same order as ad-accounts) ============ */
@media (max-width: 960px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 900px) {
  .hiw-stage { grid-template-columns: 48px 1fr; }
  .hiw-rail { width: 48px; }
  .hiw-rail-line, .hiw-rail-fill { left: 23px; }
  .hiw-step { grid-template-columns: 48px 1fr; gap: 24px; margin-left: -48px; padding: 56px 0; }
  /* Stack art below text when there's no room beside it: drop to a single
     column and clear the 2-column area template so the art doesn't land in a
     phantom zero-width track. Art is the last child, so it flows under the text. */
  .hiw-step-body {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    column-gap: 0;
    row-gap: 32px;
    align-items: start;
    /* Let the 1fr column shrink below the form's min-content width. Without
       this the form rows forced the column (and heading) wider than the screen
       on iOS Safari, so nothing scaled and it overflowed off the right edge. */
    min-width: 0;
  }
  /* Art stacks below the text. On mobile the slot becomes a real clipping box,
     sized by JS (components.js) to the scaled art. The art is laid out at native
     480x320 and shrunk with transform:scale (NOT zoom — Safari mis-clips zoom +
     overflow:hidden). Panels too small to read (< 0.33) get .hiw-art-hide. */
  .hiw-art-slot {
    display: block;
    grid-column: 1;
    align-self: start;
    overflow: hidden;
    margin-inline: auto;
    min-width: 0;
    max-width: 100%;
  }
  .hiw-step-body .hiw-art {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    width: 100%;
    height: 280px;
    margin-inline: auto;
  }
  .hiw-art.hiw-art-fit  { width: 480px; height: 320px; max-width: none; transform-origin: top left; }
  .hiw-art.hiw-art-hide { display: none; }
}
/* Phones (audit #6): every art is laid out 360px wide (.hiw-art-phone — page CSS
   reflows its contents for that width) and spans the full content column over
   the rail; a solid card so the rail line doesn't show through. */
@media (max-width: 600px) {
  .hiw-art-slot { position: relative; z-index: 4; margin-inline: 0; max-width: none; }
  .hiw-art.hiw-art-fit.hiw-art-phone { width: 360px; background-color: var(--bg); }
}
/* Landscape phones (audit #10): text left, art right, like desktop. */
@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .hiw-step-body {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 28px; row-gap: 0; align-items: center;
  }
  .hiw-step-body > .hiw-title, .hiw-step-body > .hiw-desc, .hiw-step-body > .hiw-tag { grid-column: 1; }
  .hiw-step-body > .hiw-art-slot { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin-inline: 0; }
  .hiw-step { padding: 22px 0; }
}

/* Short / landscape viewports — compact the steps so the height-scaled art + heading fit. */
@media (max-height: 600px) and (max-width: 900px) {
  .hiw-step { padding: 26px 0; }
  .hiw-step-body { row-gap: 14px; }
}
@media (max-width: 420px) { html .cmp-head-col .cmp-col-title { font-size: 10px; letter-spacing: 0.04em; } }
@media (max-width: 400px) {
  .cmp-section-head h2 { font-size: clamp(21px, 7vw, 32px); }
}

/* ============ REDUCED MOTION (html.reduced is set by boot.js) ============
   Everything renders in its final state: steps fully visible, rail fill
   without easing, ✓/✗ marks + signature already drawn. */
html.reduced .hiw-step,
html.reduced .hiw-title span,
html.reduced .hiw-desc,
html.reduced .hiw-art,
html.reduced .hiw-dot,
html.reduced .hiw-rail-fill,
html.reduced .hiw-progress-fill::before { transition: none !important; }
html.reduced .hiw-title span,
html.reduced .hiw-desc { opacity: 1; transform: none; visibility: visible; }
html.reduced .hiw-art { opacity: 1; transform: none; }
html.reduced .hiw-art::before { animation: none !important; opacity: 0; }
html.reduced .hiw-caret-tw { animation: none !important; opacity: 0; }

html.reduced .cmp-row .cmp-cell,
html.reduced .cmp-corner,
html.reduced .cmp-sig-label { transition: none !important; }
html.reduced .cmp-row .cmp-cell { opacity: 1; transform: none; }
html.reduced .cmp-corner { opacity: 0.6; }
html.reduced .cm-tick,
html.reduced .cm-x,
html.reduced .cmp-sig-stroke,
html.reduced .cmp-head-uline-stroke,
html.reduced .cmp-foot-uline-stroke { animation: none !important; stroke-dashoffset: 0 !important; opacity: 1; }
html.reduced .cmp-sig-dot,
html.reduced .cmp-head-uline-end::after,
html.reduced .cmp-slogan-end::after { animation: none !important; opacity: 1; transform: none; }
html.reduced .cmp-sig-label { opacity: 1; }
html.reduced .cmp-row .cmp-feat::after,
html.reduced .cmp-mark-yes::before { animation: none !important; opacity: 0; }


/* ============================================================
   3. MOUSE CURSOR CLICK (shared by hub / copywriting / video journey art + demos)
   Markup (inside a position:relative art box):
     <span class="art-cursor X-cursor"><svg viewBox="0 0 20 24" width="20" height="24"><path d="M3 2 L 3 19 L 7.5 14.8 L 10 21 L 12.6 19.9 L 10.1 13.8 L 16 13.8 Z" fill="#FFFFFF" stroke="#08090B" stroke-width="1.2" stroke-linejoin="round"/></svg></span>
     <span class="art-ripple"></span>   ← inside the clicked button (button: position:relative; overflow:hidden)
   Per use: position the cursor tip (left/top/bottom) + set --cur-d (start). Timeline of the
   2.835s cursor (/ad-accounts motion × 0.9 — owner: "a touch faster"): glide in 0→62%
   (arrives +1.76s) · press 68% (+1.93s) · release 74% (+2.1s) · fade 88→100%.
   So the click lands at --cur-d + 1.93s: start the button press (artBtnPress) and the ripple
   (artRipple) there, and change the label/state only AFTER it (~+0.18s, i.e. --cur-d + 2.1s).
   Journey art plays on .hiw-step:is(.is-active, .is-played); a JS loop can instead toggle
   .is-clicking on a parent (see .art-cursor-loop).
   ============================================================ */
/* Shared mouse cursor (ad-accounts request-form cursor): glides in from the lower
   right, rests ~300ms, clicks (press down/up), fades. --cur-d = when it starts. */
.art-cursor {
  position: absolute; z-index: 4;
  opacity: 0;
  pointer-events: none;
  transform: translate(110px, 70px);
  will-change: transform, opacity;
}
.art-cursor svg { display: block; }
@media (min-width: 901px) { .art-cursor { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45)); } }
.hiw-step:is(.is-active, .is-played) .art-cursor { animation: artCursor 2.835s cubic-bezier(0.42, 0, 0.25, 1) var(--cur-d, 1.4s) 1 both; }
@keyframes artCursor {   /* = /ad-accounts hiwCursorPath motion, × 0.9 (2.835s): glide 0→62%, press 68%, release 74% */
  0%   { opacity: 0; transform: translate(110px, 70px) scale(0.85); }
  6%   { opacity: 1; transform: translate(104px, 66px) scale(1); }
  62%  { opacity: 1; transform: translate(0, 0) scale(1); }
  68%  { opacity: 1; transform: translate(0, 0) scale(0.86); }
  74%  { opacity: 1; transform: translate(0, 0) scale(1); }
  88%  { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(14px, 18px) scale(1); }
}

.art-ripple {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.18);
  opacity: 0; transform: scale(0);
  pointer-events: none;
}
@keyframes artRipple {
  0%   { opacity: 0.9; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(5.5); }
}
@keyframes artBtnPress {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0); }
  35%      { transform: scale(0.965); box-shadow: 0 0 0 6px rgba(255,255,255,0.16); }
}
/* Looping demos (JS adds .is-clicking each cycle, removes it to reset). */
.is-clicking > .art-cursor, .is-clicking .art-cursor-loop { animation: artCursor 2.835s cubic-bezier(0.42, 0, 0.25, 1) var(--cur-d, 0s) 1 both; }
html.reduced .art-cursor, html.reduced .art-ripple { display: none; }

/* Replay reset (components.js replay()): one style flush with no transitions/animations
   so a re-activated step snaps back to its start state, then plays again. */
.hiw-step.hiw-replay, .hiw-step.hiw-replay *, .hiw-step.hiw-replay *::before, .hiw-step.hiw-replay *::after {
  transition: none !important; animation: none !important;
}
.cmp.cmp-replay, .cmp.cmp-replay *, .cmp.cmp-replay *::before, .cmp.cmp-replay *::after {
  transition: none !important; animation: none !important;
}

/* ============================================================
   Big screens (audit #15): the journey grows with core's --grid.
   Art scales as one unit via zoom (its inner layout keeps 480px),
   step text and the gap follow.
   ============================================================ */
@media (min-width: 2400px) {
  .hiw-section { --hiw-z: 1.3; }
}
@media (min-width: 3200px) {
  .hiw-section { --hiw-z: 1.7; }
}
@media (min-width: 2400px) {
  .hiw-step-body { grid-template-columns: 1fr calc(480px * var(--hiw-z)); column-gap: calc(64px * var(--hiw-z)); }
  .hiw-step-body .hiw-art { zoom: var(--hiw-z); }
  .hiw-title { font-size: calc(52px * var(--hiw-z)); max-width: calc(620px * var(--hiw-z)); }
  .hiw-desc { font-size: calc(16px * var(--hiw-z)); max-width: calc(440px * var(--hiw-z)); }
  .hiw-step { padding: calc(64px * var(--hiw-z)) 0 calc(72px * var(--hiw-z)); }
  .cmp-foot-slogan { font-size: calc(22px * var(--hiw-z, 1.3)); }
}

/* ============================================================
   Contact Us under the comparison-table slogan (audit #1).
   ============================================================ */
.cmp-foot-cta { align-self: flex-start; margin-top: 18px; }
@media (max-width: 600px) { .cmp-foot-cta { margin-top: 14px; min-height: 44px; padding: 12px 20px; } }
@media (min-width: 2400px) { .cmp-foot-cta { font-size: 17px; padding: 15px 26px; margin-top: 24px; } }
@media (min-width: 3200px) { .cmp-foot-cta { font-size: 20px; padding: 18px 32px; } }

/* Partner strip: one Google logo size on every page (audit #16). */
.partners-row .partner-logo.p-google img { max-height: 64%; }

/* ============================================================
   GOOD TO KNOW — capsrow, ported 1:1 from /ad-accounts (audit #4).
   Cells carry data-title / data-body / data-tags; components.js
   builds one shared detail modal with the same typewriter.
   ============================================================ */
.gtk-section { position: relative; z-index: 2; }
.capsrow { margin: 0; padding: 0; } /* section spacing comes from .gtk-section */
.capsrow .capsrow-head, .capsrow .capsrow-cell, .capsrow .capsrow-more {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.capsrow.in .capsrow-head, .capsrow.in .capsrow-cell, .capsrow.in .capsrow-more { opacity: 1; transform: translateY(0); }
.capsrow.in .capsrow-cell:nth-child(1) { transition-delay: 0.16s; }
.capsrow.in .capsrow-cell:nth-child(2) { transition-delay: 0.23s; }
.capsrow.in .capsrow-cell:nth-child(3) { transition-delay: 0.30s; }
.capsrow.in .capsrow-cell:nth-child(4) { transition-delay: 0.37s; }
.capsrow.in .capsrow-cell:nth-child(5) { transition-delay: 0.44s; }
.capsrow.in .capsrow-cell:nth-child(6) { transition-delay: 0.51s; }
.capsrow.in .capsrow-cell:nth-child(7) { transition-delay: 0.58s; }
.capsrow.in .capsrow-cell:nth-child(8) { transition-delay: 0.65s; }
.capsrow.in .capsrow-more { transition-delay: 0.75s; }
.capsrow.reveal { opacity: 1; transform: none; transition: none; }
html.reduced .capsrow .capsrow-head, html.reduced .capsrow .capsrow-cell, html.reduced .capsrow .capsrow-more { opacity: 1; transform: none; transition: none; }
.capsrow-head {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 10px; text-align: center; margin-bottom: 32px;
}
.capsrow-eyebrow { font-size: 11px; color: var(--text-3); letter-spacing: 0.18em; text-transform: uppercase; }
/* Same type as every other section headline (.section-head h2). */
.capsrow-title {
  font-family: var(--font-sans); font-weight: 500;
  font-size: clamp(32px, 3.4vw, 56px); line-height: 1.05; letter-spacing: -0.035em;
  margin: 0; max-width: 700px;
}
.capsrow-title .em {
  font-weight: 400;
  background: linear-gradient(180deg, #FFFFFF 0%, #B8BAC0 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-bottom: 0.08em;
}
.capsrow-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.capsrow-cell {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px;
  padding: 22px 20px; min-height: 68px;
  border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: transparent; color: inherit; text-align: left; font: inherit;
  cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent;
}
.capsrow.in .capsrow-cell { transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), background 0.4s var(--ease-out); }
.capsrow-cell::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, #FFFFFF, transparent);
  transform: scaleX(0); transition: transform 0.5s var(--ease-out);
}
.capsrow-cell:hover { background: rgba(255,255,255,0.025); }
.capsrow-cell:hover::after, .capsrow-cell.is-active::after { transform: scaleX(1); }
.capsrow-cell:focus-visible { outline: 1px solid rgba(255,255,255,0.6); outline-offset: -1px; }
.capsrow-cell.is-active { background: rgba(255,255,255,0.05); }
.capsrow-cell.is-active .capsrow-toggle { transform: rotate(45deg); background: #FFFFFF; border-color: #FFFFFF; }
.capsrow-cell.is-active .capsrow-toggle::before, .capsrow-cell.is-active .capsrow-toggle::after { background: #08090B; }
.capsrow-cell:nth-child(4n) { border-right: 0; }
.capsrow-cell:nth-last-child(-n+4) { border-bottom: 0; }
.capsrow-ix { font-size: 10px; color: var(--text-3); letter-spacing: 0.14em; }
.capsrow-lbl { font-size: 14px; font-weight: 500; color: var(--text); letter-spacing: -0.005em; }
.capsrow-toggle {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2);
  position: relative; flex-shrink: 0;
  transition: transform 0.3s var(--ease-snappy, var(--ease-out)), background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.capsrow-toggle::before, .capsrow-toggle::after { content: ""; position: absolute; background: var(--text-2); transition: background 0.3s var(--ease-out); }
.capsrow-toggle::before { top: 50%; left: 6px; right: 6px; height: 1px; transform: translateY(-50%); }
.capsrow-toggle::after { left: 50%; top: 6px; bottom: 6px; width: 1px; transform: translateX(-50%); }
.capsrow-more { margin: 28px 0 0; text-align: center; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.capsrow-more a, .capsrow-more .capsrow-link {
  color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35);
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
}
.capsrow-more a:hover, .capsrow-more .capsrow-link:hover { text-decoration-color: #FFFFFF; }
@media (hover: none) { .capsrow-more a, .capsrow-more .capsrow-link { display: inline-block; padding: 10px 2px; margin: -10px 0; } }
@media (max-width: 960px) {
  .capsrow-grid { grid-template-columns: repeat(2, 1fr); }
  .capsrow-cell:nth-child(4n) { border-right: 1px solid var(--line); }
  .capsrow-cell:nth-child(2n) { border-right: 0; }
  .capsrow-cell:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .capsrow-cell:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 520px) {
  .capsrow-cell { grid-template-columns: 28px 1fr auto; gap: 8px; padding: 18px 12px; min-height: 64px; }
  .capsrow-lbl { font-size: 13.5px; }
}
@media (max-width: 480px) {
  .capsrow-grid { grid-template-columns: 1fr; }
  .capsrow-cell, .capsrow-cell:nth-child(4n) { border-right: 0; }
  .capsrow-cell:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .capsrow-cell:last-child { border-bottom: 0; }
}
@media (min-width: 2400px) {
  .capsrow-lbl { font-size: 18px; }
  .capsrow-cell { padding: 28px 26px; }
  .capsrow-more { font-size: 18px; }
}

/* Detail modal (same card, brackets and typewriter as /ad-accounts). */
.capsrow-modal {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  padding: 32px; z-index: 200; pointer-events: none; opacity: 0; transition: opacity 0.35s var(--ease-out);
}
.capsrow-modal.is-open { display: flex; pointer-events: auto; opacity: 1; }
.capsrow-modal-backdrop {
  position: absolute; inset: 0; background: rgba(6,7,9,0.72);
  backdrop-filter: blur(8px) saturate(130%); -webkit-backdrop-filter: blur(8px) saturate(130%); cursor: pointer;
}
.capsrow-modal-card {
  position: relative; width: min(620px, 100%); max-height: calc(100dvh - 64px); overflow: auto;
  padding: 56px 56px 44px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.09);
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 30%), #0c0d0f;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 40px 120px -28px rgba(0,0,0,0.85);
  transform: translateY(20px); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s var(--ease-out);
}
.capsrow-modal.is-open .capsrow-modal-card { transform: translateY(0); opacity: 1; }
.capsrow-modal-card::before, .capsrow-modal-card::after { content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none; }
.capsrow-modal-card::before { top: -1px; left: -1px; border-top: 1px solid rgba(255,255,255,0.45); border-left: 1px solid rgba(255,255,255,0.45); }
.capsrow-modal-card::after { bottom: -1px; right: -1px; border-bottom: 1px solid rgba(255,255,255,0.45); border-right: 1px solid rgba(255,255,255,0.45); }
.capsrow-modal-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10); background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.capsrow-modal-close:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.30); }
.capsrow-modal-close span { position: absolute; width: 12px; height: 1px; background: rgba(255,255,255,0.8); }
.capsrow-modal-close span:nth-child(1) { transform: rotate(45deg); }
.capsrow-modal-close span:nth-child(2) { transform: rotate(-45deg); }
body.capsrow-modal-open { overflow: hidden; }
.capsrow-detail-head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.capsrow-detail-ix {
  font-size: 10px; color: var(--text-3); letter-spacing: 0.22em; text-transform: uppercase;
  padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.08); width: 100%;
}
.capsrow-detail-title { margin: 0; font-weight: 400; font-size: 32px; line-height: 1.1; letter-spacing: -0.035em; color: var(--text); min-height: 1.1em; }
.capsrow-detail-body { margin: 0 0 28px; font-size: 16px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; min-height: 4.8em; }
.capsrow-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.06); }
.capsrow-detail-meta span {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2);
  padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 100px;
}
.caps-caret-tw {
  display: inline-block; width: 0.04em; min-width: 1px; height: 0.78em; background: rgba(255,255,255,0.85);
  vertical-align: baseline; margin-left: 0.06em; transform: translateY(0.06em);
}
.is-typing > .caps-caret-tw { animation: twBlink 0.7s step-end infinite; }
.is-typed > .caps-caret-tw { opacity: 0; transition: opacity 0.6s var(--ease-out) 0.8s; }
@media (max-width: 600px) {
  .capsrow-modal { padding: 16px; align-items: flex-end; }
  .capsrow-modal-card { padding: 48px 22px 26px; }
  .capsrow-detail-title { font-size: 26px; }
  .capsrow-detail-body { font-size: 15px; }
}

/* Comparison table → Good to know: one gap on every page (final scan: video had
   the heading touching the table, copy had 108px). */
html .cmp-section:has(+ .gtk-section) { padding-bottom: 0; }
html .gtk-section { padding-top: clamp(64px, 8vw, 112px); }
.site .cmp-foot-slogan { text-wrap: balance; }
