/* ============================================================
   VELOCITY GTM — homepage + section components
   ============================================================ */

/* ---------------- HERO ---------------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(36px, 5vw, 70px); padding-bottom: clamp(56px, 7vw, 104px); }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 72% 30%, #000 0%, transparent 62%);
  mask-image: radial-gradient(120% 80% at 72% 30%, #000 0%, transparent 62%);
  opacity: .5;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  padding: .4rem .7rem .4rem .5rem; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: var(--sh-xs); color: var(--ink-2); margin-bottom: 1.5rem;
}
.hero-badge .tag-green { padding: .2em .5em; font-size: .66rem; }
.hero h1 { margin-bottom: 1.9rem; line-height: 1.08; text-wrap: normal; }
.hero h1 .accent-text { position: relative; }
.hero-sub { max-width: 540px; margin-bottom: 2rem; }
.hero-cta { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 1.4rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-trust .tline { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--ink-2); }
.hero-trust .tline svg { width: 16px; height: 16px; color: var(--green); flex: none; }

/* ---------------- ENGINE (hero product mock) ---------------- */
.engine {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.engine-head { position: relative; }
.engine-cap {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem; border-bottom: 1px solid var(--line);
}
.engine-cap .ttl { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-mono); font-size: .76rem; color: var(--ink-2); font-weight: 500; }
.engine-cap .ttl .sq { width: 9px; height: 9px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.live { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: .68rem; color: var(--muted); letter-spacing: .03em; }
.live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: livepulse 1.8s ease-out infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(27,138,87,.45); } 70% { box-shadow: 0 0 0 7px rgba(27,138,87,0); } 100% { box-shadow: 0 0 0 0 rgba(27,138,87,0); } }

/* pipeline */
.pipe {
  display: flex; align-items: center; gap: 6px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
.stage {
  display: flex; align-items: center; gap: 7px; flex: none;
  padding: 6px 10px; border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--line-2);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.stage-ico { width: 15px; height: 15px; color: var(--muted); display: grid; place-items: center; transition: color .3s ease; }
.stage-ico svg { width: 15px; height: 15px; }
.stage span { font-family: var(--font-mono); font-size: .67rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: color .3s ease; }
.stage.active { background: var(--accent); border-color: var(--accent); box-shadow: 0 6px 16px rgba(42,111,219,.32); transform: translateY(-1px); }
.stage.active .stage-ico, .stage.active span { color: #fff; }
.conn { flex: none; color: var(--line-2); display: grid; place-items: center; }
.conn svg { width: 11px; height: 11px; }

/* bounce fx */
.bouncefx {
  position: absolute; top: 50px; right: 14px; z-index: 5;
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  padding: .35em .6em; border-radius: var(--r-xs);
  background: var(--red-soft); color: var(--red); border: 1px solid #F1CFCF;
  opacity: 0; transform: translateY(-4px) scale(.96); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.bouncefx.show { opacity: 1; transform: translateY(0) scale(1); }
.bouncefx svg { width: 11px; height: 11px; }

/* feed table */
.feed { min-height: 252px; }
.feed table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.feed thead th {
  text-align: left; font-family: var(--font-mono); font-weight: 500;
  font-size: .62rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: .55rem .9rem; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.feed thead th:nth-child(2) { width: 38%; }
.feed thead th:nth-child(3) { width: 16%; }
.feed thead th:nth-child(4) { width: 12%; text-align: center; }
.feed-row td { padding: .58rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.feed-row { opacity: 0; transform: translateY(-7px); transition: opacity .35s ease, transform .35s ease, background .5s ease; background: var(--accent-soft); }
.feed-row.show { opacity: 1; transform: none; background: transparent; }
.feed-row.out { opacity: 0; }
.cell-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cell-stack { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cell-name { font-size: .82rem; font-weight: 600; color: var(--ink); }
.cell-sub { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-email { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { font-family: var(--font-mono); font-weight: 600; font-size: .72rem; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 5px; padding: 2px 6px; }
.vrf { color: var(--green); display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--green-soft); border-radius: 6px; }

.engine-foot {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: 11px 16px; border-top: 1px solid var(--line);
  background: var(--surface-2); font-family: var(--font-mono); font-size: .7rem; color: var(--muted);
}
.engine-foot b { color: var(--ink); }
.engine-foot .ef-r { display: inline-flex; align-items: center; gap: .9rem; }
.engine-foot .chip2v { color: var(--green); }

/* ---------------- METRIC STRIP ---------------- */
.metrics { border-block: 1px solid var(--line); background: var(--surface); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: clamp(30px, 3.8vw, 50px) clamp(20px, 2.5vw, 36px); border-left: 1px solid var(--line); }
.metric:first-child { border-left: none; }
.metric .num { font-size: clamp(1.9rem, 3vw, 2.7rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.metric .num small { font-size: .5em; font-weight: 700; color: var(--accent); }
.metric .lab { margin-top: .72rem; font-size: .9rem; color: var(--muted); }
@media (max-width: 720px) { .metrics-grid { grid-template-columns: 1fr 1fr; } .metric:nth-child(3) { border-left: none; } .metric:nth-child(3), .metric:nth-child(4) { border-top: 1px solid var(--line); } }

/* ---------------- OUR CLIENTS (marquee) ---------------- */
#clients { padding-bottom: clamp(20px, 3vw, 32px); }
#clients + .section { padding-top: clamp(44px, 5.5vw, 64px); }
.client-marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); }
.client-track { display: flex; align-items: stretch; gap: .9rem; width: max-content; animation: client-marq 46s linear infinite; }
.client-marquee:hover .client-track { animation-play-state: paused; }
@keyframes client-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.client { flex: none; display: inline-flex; align-items: center; gap: .72rem; padding: .68rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); box-shadow: var(--sh-xs); white-space: nowrap; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.client:hover { border-color: var(--line-2); box-shadow: var(--sh-sm); transform: translateY(-1px); }
.client-logo { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; background: #fff; flex: none; }
.client-chip { flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: .68rem; letter-spacing: .02em; }
.client-name { font-weight: 700; font-size: 1.08rem; letter-spacing: -.012em; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .client-track { animation: none; flex-wrap: wrap; justify-content: center; } .client-marquee { -webkit-mask-image: none; mask-image: none; } }

/* ---------------- COMPARISON (us vs them) ---------------- */
.vs { border-block: 1px solid var(--line); background: var(--surface); }
.vs-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 0; margin-top: 3rem; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); background: var(--surface); }
.vs-grid .vs-row { display: contents; }
.vs-cell { padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .7rem; }
.vs-cell.dim { background: var(--surface-2); }
.vs-col-head { padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--line); }
.vs-col-head .ch-lab { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vs-col-head .ch-name { display: block; font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; margin-top: .4rem; }
.vs-col-head.them { background: var(--surface-2); }
.vs-col-head.us { background: var(--ink); border-bottom-color: var(--ink); }
.vs-col-head.us .ch-lab { color: #8FB6F2; }
.vs-col-head.us .ch-name { color: #fff; display: flex; align-items: center; gap: .5rem; }
.vs-col-head.us .ch-name .bm { width: 22px; height: 22px; border-radius: 6px; overflow: hidden; flex: none; }
.vs-col-head.us .ch-name .bm img { width: 100%; height: 100%; object-fit: cover; }
.vs-feature { font-weight: 700; font-size: .98rem; color: var(--ink); }
.vs-feature .sub { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin-top: .2rem; }
.vs-cell.us-cell { background: var(--accent-soft); }
.vs-cell .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.vs-cell .ic.no { background: var(--red-soft); color: var(--red); }
.vs-cell .ic.yes { background: var(--green-soft); color: var(--green); }
.vs-cell .ic svg { width: 13px; height: 13px; }
.vs-cell .txt { font-size: .92rem; color: var(--ink-2); line-height: 1.4; }
.vs-cell.us-cell .txt { color: var(--ink); font-weight: 600; }
.vs-row:last-child .vs-cell { border-bottom: none; }
.vs-foot { margin-top: 1.4rem; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .vs-grid { grid-template-columns: 1fr; }
  .vs-col-head.them { display: none; }
  .vs-feature .sub { display: block; }
  .vs-cell { border-bottom: 1px solid var(--line); }
  .vs-cell.them-cell::before { content: "Others: "; font-family: var(--font-mono); font-size: .7rem; color: var(--muted); margin-right: .3rem; }
  .vs-cell.us-cell::before { content: "Velocity: "; font-family: var(--font-mono); font-size: .7rem; color: var(--accent-ink); margin-right: .3rem; }
}

/* ---------------- STEPS (how it works) ---------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3.2rem; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem 1.4rem; box-shadow: var(--sh-xs); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.step:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line-2); }
.step-n { font-family: var(--font-mono); font-size: .76rem; font-weight: 600; color: var(--accent); letter-spacing: .04em; }
.step-day { font-family: var(--font-mono); font-size: .64rem; color: var(--muted); float: right; padding: 3px 7px; background: var(--surface-2); border-radius: var(--r-xs); }
.step h3 { font-size: 1.12rem; margin: 1rem 0 .5rem; letter-spacing: -.01em; }
.step p { font-size: .92rem; color: var(--ink-2); line-height: 1.5; }
.step-thumb { margin-top: 1.1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.thumb-line { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: .68rem; color: var(--ink-2); padding: 4px 0; }
.thumb-line .bx { width: 13px; height: 13px; border-radius: 3px; border: 1px solid var(--line-2); flex: none; display: grid; place-items: center; }
.thumb-line .bx.ck { background: var(--green-soft); border-color: #CBE6D6; color: var(--green); }
.thumb-line .bx.ck svg { width: 9px; height: 9px; }
.thumb-bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 6px 0; }
.thumb-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
@media (max-width: 920px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------------- LOOM differentiator ---------------- */
.loom { background: var(--surface); border-block: 1px solid var(--line); }
.loom-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.loom-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.15rem; }
.loom-list li { display: flex; gap: .9rem; align-items: flex-start; }
.loom-list .lk { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.loom-list .lk svg { width: 14px; height: 14px; }
.loom-list strong { display: block; font-size: 1rem; font-weight: 700; }
.loom-list span { font-size: .92rem; color: var(--ink-2); }

/* loom player mock */
.player { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden; }
.player-screen { position: relative; aspect-ratio: 16 / 9; background: #0c1322; display: grid; place-items: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.player-poster, .player-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; background: #0c1322; }
.player-screen.playing .player-video { object-fit: contain; object-position: center; }
.player-screen.playing [data-pl-overlay] { opacity: 0; pointer-events: none; }
.player-screen.playing .play-btn { opacity: 0; pointer-events: none; }
.player-screen [data-pl-overlay], .player-screen .play-btn { transition: opacity .3s ease; }
.player-screen.playing { cursor: pointer; }
.player-shade { position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 48%, rgba(8,16,34,.12), rgba(8,16,34,.52)); }
.player-rec { position: absolute; top: 12px; left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: .62rem; font-weight: 600; letter-spacing: .06em; color: #fff; background: rgba(8,16,34,.6); border: 1px solid rgba(255,255,255,.16); padding: .3em .55em; border-radius: var(--r-xs); backdrop-filter: blur(4px); }
.player-rec .rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: livepulse 1.8s ease-out infinite; }
.play-btn {
  position: relative; z-index: 2; width: 64px; height: 64px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: var(--sh-lg);
  transition: transform .2s ease;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 22px; height: 22px; margin-left: 3px; }
.cam {
  position: absolute; bottom: 14px; right: 14px; z-index: 3;
  width: 64px; height: 64px; border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-ink));
  box-shadow: var(--sh-md); display: grid; place-items: center; color: #fff;
  font-family: var(--font-mono); font-weight: 700; font-size: .9rem;
}
.player-bar { padding: 12px 16px; }
.player-meta { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-bottom: 9px; }
.player-meta b { color: var(--ink); }
.scrub { height: 5px; border-radius: 4px; background: var(--surface-3); position: relative; }
.scrub i { position: absolute; left: 0; top: 0; height: 100%; width: 38%; background: var(--accent); border-radius: 4px; }
.scrub i::after { content: ""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
@media (max-width: 900px) { .loom-grid { grid-template-columns: 1fr; } }

/* ---------------- CASE STUDY ---------------- */
.case-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.case-quote { font-size: clamp(1.3rem, 2.2vw, 1.85rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.3; margin: 1.6rem 0; text-wrap: balance; }
.case-quote .q { color: var(--accent); }
.case-by { display: flex; align-items: center; gap: .8rem; }
.case-by .av { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; color: var(--ink-2); flex: none; }
.case-by .who b { display: block; font-size: .95rem; }
.case-by .who span { font-size: .85rem; color: var(--muted); }

.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-md); overflow: hidden; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; }
.rstat { padding: 1.6rem 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rstat:nth-child(2n) { border-right: none; }
.rstat:nth-child(n+3) { border-bottom: none; }
.rstat .rk { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rstat .rv { font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; margin-top: .5rem; line-height: 1; }
.rstat .rv small { font-size: .5em; font-weight: 700; }
.rstat .rd { margin-top: .5rem; font-size: .82rem; color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.rstat .rd.flat { color: var(--muted); }
.rstat .rd svg { width: 12px; height: 12px; }
@media (max-width: 880px) { .case-grid { grid-template-columns: 1fr; } }

/* ---------------- FINAL CTA ---------------- */
.cta { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(100% 100% at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(100% 100% at 50% 0%, #000, transparent 70%);
}
.cta-inner { position: relative; text-align: center; max-width: 760px; margin-inline: auto; }
.cta h2 { color: #fff; font-size: clamp(2.1rem, 4vw, 3.4rem); letter-spacing: -.03em; }
.cta p { color: #B7BBC3; font-size: clamp(1.05rem, 1.6vw, 1.3rem); margin: 1.3rem auto 2.4rem; max-width: 540px; }
.cta-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.cta-fine { margin-top: 1.8rem; font-family: var(--font-mono); font-size: .76rem; color: #80858F; }
.cta.section { padding-bottom: clamp(32px, 4vw, 48px); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: none; }
  .engine { max-width: 560px; }
}

/* ============================================================
   CLAY-STYLE LIVE ENRICHMENT TABLE (hero engine v2)
   ============================================================ */
/* toolbar */
.eng-tb { display: flex; align-items: center; gap: .45rem; padding: .55rem .7rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.eng-run { display: inline-flex; align-items: center; gap: .38rem; font-family: var(--font-sans); font-size: .72rem; font-weight: 600; color: var(--green); background: var(--green-soft); border: 1px solid #CBE6D6; border-radius: var(--r-xs); padding: .32em .55em; white-space: nowrap; }
.eng-run svg { width: 12px; height: 12px; animation: eng-spin 2.6s linear infinite; }
@keyframes eng-spin { to { transform: rotate(360deg); } }
.eng-chip { font-family: var(--font-mono); font-size: .67rem; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; padding: .32em .5em; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); white-space: nowrap; }
.eng-chip b { color: var(--ink); font-weight: 600; }
.eng-tb .spacer { flex: 1; }
.eng-live { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.eng-live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: livepulse 1.8s ease-out infinite; flex: none; }

/* table */
.ctbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ctbl th, .ctbl td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ctbl th:last-child, .ctbl td:last-child { border-right: none; }
.ctbl tbody tr:last-child td { border-bottom: none; }
.ctbl thead th { background: var(--surface-2); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.col-h { display: flex; align-items: center; gap: .38rem; min-width: 0; }
.col-ic { width: 14px; height: 14px; flex: none; color: var(--muted); display: grid; place-items: center; font-family: var(--font-mono); font-size: .72rem; font-weight: 600; }
.col-ic svg { width: 13px; height: 13px; }
.col-ic.accent { color: var(--accent); }
.col-name { font-size: .68rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.col-prog { flex: 1; height: 4px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.col-prog i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 3px; transition: width .6s cubic-bezier(.22,.61,.36,1); }
.col-pct { font-family: var(--font-mono); font-size: .56rem; font-weight: 600; color: var(--green); flex: none; }
.col-tag { font-family: var(--font-mono); font-size: .55rem; color: var(--muted); background: var(--surface-3); border-radius: 4px; padding: 1px 5px; }
.col-tag.ok { color: var(--green); background: var(--green-soft); border: 1px solid #CBE6D6; }

/* cells */
.ctbl td { padding: .45rem .6rem; vertical-align: middle; height: 46px; }
.cell { font-size: .72rem; color: var(--ink-2); min-width: 0; }
.c-contact { display: flex; align-items: center; gap: 7px; min-width: 0; }
.c-contact .avatar { width: 22px; height: 22px; font-size: .58rem; }
.c-stack { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.c-name { font-size: .73rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sub { font-size: .61rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-email { display: flex; align-items: center; gap: 6px; min-width: 0; }
.c-email .stat { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.c-email .stat.ok { background: var(--green); }
.c-email .stat.bad { border-radius: 2px; background: var(--red); }
.c-email .em { font-family: var(--font-mono); font-size: .65rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-cond { font-size: .65rem; color: var(--muted); font-style: italic; }
.c-match { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: .67rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 5px; padding: 2px 7px; }
.c-match .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.c-ice { font-size: .66rem; color: var(--ink-2); line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 2.7em; }

/* running skeleton */
.cell.running { background: rgba(42,111,219,.045); }
.sk { display: flex; align-items: center; gap: 7px; }
.sk-spin { width: 11px; height: 11px; border: 2px solid var(--accent-line); border-top-color: var(--accent); border-radius: 50%; animation: eng-spin .7s linear infinite; flex: none; }
.sk-bar { flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: sk-shimmer 1.1s linear infinite; }
@keyframes sk-shimmer { to { background-position: -200% 0; } }
.cell.justdone { animation: cell-flash 1s ease; }
@keyframes cell-flash { 0% { background: rgba(42,111,219,.16); } 100% { background: transparent; } }

/* foot */
.eng-foot { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border-top: 1px solid var(--line); background: var(--surface-2); }
.foot-run { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .64rem; color: var(--green); font-weight: 600; white-space: nowrap; }
.foot-run .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
.done-prog { width: 120px; max-width: 30%; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.done-prog i { display: block; height: 100%; width: 8%; background: var(--green); border-radius: 4px; transition: width .5s ease; }
.eng-foot .lbl { font-family: var(--font-mono); font-size: .64rem; color: var(--muted); white-space: nowrap; }
.eng-foot .lbl b { color: var(--ink); }
.eng-foot .spacer { flex: 1; }

@media (max-width: 460px) {
  .eng-chip.hide-sm, .eng-foot .eng-live { display: none; }
}


/* ---- in-house math / savings ---- */
.math { display: grid; grid-template-columns: 1.15fr auto 1fr; gap: 0; align-items: stretch; margin-top: 2.6rem; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); background: var(--surface); }
.math-col { padding: 1.8rem 1.7rem; }
.math-col.diy { background: var(--surface-2); }
.math-col.us { background: var(--ink); color: #fff; }
.math-head { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.math-col.us .math-head { color: #8FB6F2; }
.math-sub { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; margin-top: .35rem; }
.math-col.us .math-sub { color: #fff; }
.math-rows { margin-top: 1.3rem; display: flex; flex-direction: column; gap: .2rem; }
.math-rows .mr { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); }
.math-rows .mr:last-of-type { border-bottom: none; }
.math-rows .mr .t { display: inline-flex; align-items: center; gap: .55rem; }
.math-rows .mr .t .d { width: 7px; height: 7px; border-radius: 2px; background: var(--line-2); transform: rotate(45deg); flex: none; }
.math-rows .mr .v { font-family: var(--font-mono); font-weight: 600; color: var(--ink); white-space: nowrap; }
.math-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; padding-top: 1.1rem; border-top: 2px solid var(--line-2); }
.math-total .lab { font-size: .9rem; font-weight: 700; color: var(--ink); }
.math-total .amt { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.math-total .amt small { font-size: .45em; font-weight: 600; color: var(--muted); }
.math-note { margin-top: .8rem; font-size: .8rem; color: var(--muted); line-height: 1.4; }
/* us column */
.math-col.us .math-list { margin-top: 1.3rem; display: flex; flex-direction: column; gap: .7rem; }
.math-col.us .math-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: #C9CCD2; }
.math-col.us .math-list .ck { flex: none; width: 18px; height: 18px; border-radius: 5px; background: rgba(143,182,242,.18); color: #8FB6F2; display: grid; place-items: center; margin-top: 1px; }
.math-col.us .math-list .ck svg { width: 11px; height: 11px; }
.math-col.us .math-total { border-top-color: rgba(255,255,255,.2); }
.math-col.us .math-total .lab { color: #C9CCD2; }
.math-col.us .math-total .amt { color: #fff; }
.math-col.us .math-total .amt small { color: #8FB6F2; }
/* center divider with savings badge */
.math-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 .5rem; background: var(--surface); border-inline: 1px solid var(--line); position: relative; }
.math-save { text-align: center; padding: 1rem .6rem; }
.math-save .pct { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.math-save .big { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--green); margin-top: .3rem; line-height: 1; }
.math-save .sm { font-size: .72rem; color: var(--muted); margin-top: .35rem; }
.math-arrow { width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: .4rem auto 0; }
.math-arrow svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .math { grid-template-columns: 1fr; }
  .math-mid { border-inline: none; border-block: 1px solid var(--line); flex-direction: row; gap: 1rem; }
  .math-arrow { transform: rotate(90deg); }
