/* ============================================================
   JIFFYSCORE AI — LANDING PAGE (v2)
   ------------------------------------------------------------
   Elevated marketing surface. Composes ONLY design-system
   tokens (jiffy-tokens.css) — no new colours, fonts or radii.
   Inspiration: Supabase / Vercel / Resend density + motion,
   rendered entirely in the emerald · gold · lime system.

   Load order:  jiffy-tokens → jiffy-components → jiffy-pages → landing
   ============================================================ */

/* ---- Section kicker spacing tweaks ----------------------- */
.l-section { padding: calc(112px * var(--density)) 32px; max-width: 1280px; margin: 0 auto; }
.l-section--tight { padding: calc(72px * var(--density)) 32px; }
.l-center { text-align: center; }
.l-center .eyebrow { justify-content: center; }
.l-center .lead { margin-left: auto; margin-right: auto; }

/* ============================================================
   HERO — cinematic mesh + floating product demo
   ============================================================ */
.hero2 { position: relative; overflow: hidden; padding: 152px 24px 64px; }
.hero2-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mesh { position: absolute; border-radius: 50%; filter: blur(72px); opacity: 0.5; mix-blend-mode: screen; }
.mesh-1 { width: 720px; height: 720px; top: -260px; left: 50%; margin-left: -360px; background: radial-gradient(circle, rgba(232,181,60,0.30), transparent 66%); animation: mesh-a 24s var(--ease-out-quart) infinite alternate; }
.mesh-2 { width: 600px; height: 600px; top: -120px; right: -160px; background: radial-gradient(circle, rgba(141,230,90,0.22), transparent 66%); animation: mesh-b 28s var(--ease-out-quart) infinite alternate; }
.mesh-3 { width: 560px; height: 560px; top: 40px; left: -160px; background: radial-gradient(circle, rgba(123,220,140,0.18), transparent 66%); animation: mesh-c 32s var(--ease-out-quart) infinite alternate; }
@keyframes mesh-a { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px,40px) scale(1.12); } }
@keyframes mesh-b { from { transform: translate(0,0) scale(1); } to { transform: translate(50px,30px) scale(1.1); } }
@keyframes mesh-c { from { transform: translate(0,0) scale(1); } to { transform: translate(40px,-30px) scale(1.14); } }
html[data-motion="off"] .mesh, html[data-motion="subtle"] .mesh { animation: none; }

.hero2-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 16%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 16%, #000 0%, transparent 72%);
  opacity: 0.55;
}

.hero2-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; text-align: center; }

/* ---- Brand emblem "hologram" watermark ------------------- */
.hero-emblem {
  position: absolute; z-index: 0; pointer-events: none;
  width: 760px; height: 760px; top: -150px; left: 50%; margin-left: -380px;
  mix-blend-mode: screen; opacity: 0.10;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 38%, transparent 64%);
  mask-image: radial-gradient(circle at 50% 50%, #000 38%, transparent 64%);
  animation: emblem-spin 120s linear infinite;
}
@keyframes emblem-spin { to { transform: rotate(360deg); } }
html[data-motion="off"] .hero-emblem, html[data-motion="subtle"] .hero-emblem { animation: none; }
.cta-emblem {
  position: absolute; z-index: 0; pointer-events: none;
  width: 460px; height: 460px; top: 50%; left: 50%; transform: translate(-50%, -50%);
  mix-blend-mode: screen; opacity: 0.10;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 36%, transparent 66%);
  mask-image: radial-gradient(circle at 50% 50%, #000 36%, transparent 66%);
}
.cta-band { position: relative; }
@media (max-width: 560px) { .hero-emblem { width: 480px; height: 480px; margin-left: -240px; } }

.hero2 h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(46px, 7.4vw, 100px); line-height: 0.98; letter-spacing: -0.025em;
  margin: 20px auto 0; max-width: 16ch; color: var(--ink); text-wrap: balance;
}
.hero2 h1 em { color: var(--gold); font-style: normal; position: relative; }
.hero2 .lead { font-size: clamp(17px, 1.7vw, 21px); margin: 24px auto 0; max-width: 60ch; }

/* announce pill */
.announce {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: color-mix(in oklch, var(--cream) 60%, transparent);
  backdrop-filter: blur(10px); font-size: 13px; color: var(--ink-soft);
  transition: border-color .3s, transform .3s;
}
.announce:hover { border-color: var(--gold); transform: translateY(-1px); }
.announce { white-space: nowrap; }
.announce .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-lime); background: var(--lime-gradient); padding: 4px 9px; border-radius: var(--r-pill); }
.announce .arrow { color: var(--gold); display: inline-flex; }

.hero2-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

/* engine row */
.engine-row { margin-top: 40px; }
.engine-row .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.engine-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 30px; margin-top: 18px; }
.engine-logos .eng { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-weight: 600; font-size: 15px; opacity: 0.78; transition: opacity .3s, color .3s; }
.engine-logos .eng:hover { opacity: 1; color: var(--ink); }
.engine-logos .eng svg { color: var(--gold); }

/* ---- Floating product demo (browser frame) --------------- */
.demo-wrap { position: relative; z-index: 1; max-width: 1060px; margin: 64px auto 0; }
.demo-glow { position: absolute; inset: -40px -10px -10px; background: radial-gradient(ellipse 60% 60% at 50% 30%, rgba(141,230,90,0.18), transparent 70%); filter: blur(30px); pointer-events: none; }
.browser {
  position: relative;
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-3); overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); background: var(--bg-2); }
.browser-dots { display: flex; gap: 7px; }
.browser-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-soft); }
.browser-url {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--off); border: 1px solid var(--line-soft); border-radius: var(--r-pill);
  padding: 7px 14px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); max-width: 360px; margin: 0 auto;
}
.browser-url svg { color: var(--lime); }
.browser-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; min-height: 340px; }

/* left: AI answer */
.demo-answer { padding: 28px 30px; border-right: 1px solid var(--line-soft); }
.demo-answer .q { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.demo-answer .q .badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); border: 1px solid var(--line-soft); border-radius: var(--r-pill); padding: 4px 9px; flex: none; }
.demo-answer .q .qtext { font-size: 15px; color: var(--ink); font-weight: 500; }
.demo-answer .a-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.demo-answer .a-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.demo-answer .a-text { font-size: 15.5px; line-height: 1.7; color: var(--ink-soft); min-height: 132px; }
.demo-answer .a-text .cite { color: var(--gold); font-weight: 600; border-bottom: 1px solid var(--gold); padding-bottom: 1px; }
.demo-answer .type-caret { display: inline-block; width: 8px; height: 17px; vertical-align: -3px; background: var(--gold); margin-left: 1px; border-radius: 1px; animation: blink 1s steps(2,start) infinite; }
html[data-motion="off"] .type-caret { animation: none; }
.demo-answer .sources { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.demo-answer .src { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); border: 1px solid var(--line-soft); border-radius: var(--r-pill); padding: 5px 10px; transition: border-color .4s, color .4s, background .4s; }
.demo-answer .src.is-you { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

/* right: score panel */
.demo-score { padding: 24px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(180deg, transparent, rgba(141,230,90,0.04)); }
.demo-score .ds-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.ring { width: 168px; height: 168px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-2); }
.ring .prog { stroke: var(--lime); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(141,230,90,0.5)); transition: stroke-dashoffset 1.4s var(--ease-out-expo); }
.ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .num { font-family: var(--font-display); font-weight: 700; font-size: 52px; line-height: 1; color: var(--ink); letter-spacing: -0.02em; }
.ring .max { font-family: var(--font-mono); font-size: 11px; color: var(--mute); margin-top: 2px; }
.demo-score .mini-bars { width: 100%; display: grid; gap: 9px; margin-top: 20px; }
.demo-score .mb { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 10px; }
.demo-score .mb .k { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.demo-score .mb .track { height: 5px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.demo-score .mb .fill { height: 100%; width: 0; border-radius: var(--r-pill); background: var(--lime-gradient); transition: width 1.2s var(--ease-out-expo); }
.demo-score .mb .fill.gold { background: var(--gold); }

/* ============================================================
   ENGINE MARQUEE (logo cloud, motion)
   ============================================================ */
.eng-marquee { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--bg-2); overflow: hidden; padding: 22px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.eng-track { display: inline-flex; gap: 56px; white-space: nowrap; animation: scroll-x 42s linear infinite; will-change: transform; }
.eng-track .item { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; color: var(--ink-soft); font-weight: 700; letter-spacing: -0.01em; }
.eng-track .item svg { color: var(--gold); }
html[data-motion="off"] .eng-track { animation: none; }

/* ============================================================
   BENTO GRID — capabilities with live micro-demos
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 200px; gap: 18px; margin-top: 52px; }
.bento-card {
  position: relative; overflow: hidden;
  background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--r-xl);
  padding: 26px; display: flex; flex-direction: column;
  transition: transform .5s var(--ease-out-expo), box-shadow .5s, border-color .3s;
}
.bento-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow-3); }
.bento-card .bc-eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.bento-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin: 8px 0 6px; color: var(--ink); }
.bento-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.bento-card .bc-glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--gold-glow), transparent 70%); right: -80px; bottom: -80px; filter: blur(30px); opacity: .5; pointer-events: none; }

.b-span-3 { grid-column: span 3; }
.b-span-2 { grid-column: span 2; }
.b-row-2 { grid-row: span 2; }

/* citation feed (animated) */
.cite-feed { margin-top: auto; display: grid; gap: 8px; }
/* Visible by default (no trapped content); .is-in just settles the transform. */
.cite-pill { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--bg-2); font-size: 12.5px; color: var(--ink-soft); opacity: 1; transform: translateY(10px); transition: transform .5s var(--ease-out-expo); }
.cite-pill.is-in { transform: translateY(0); }
html[data-motion="off"] .cite-pill { transform: none; }
.cite-pill .ico { width: 22px; height: 22px; border-radius: 6px; background: var(--emerald-soft); color: var(--emerald); display: grid; place-items: center; flex: none; }
.cite-pill strong { color: var(--ink); font-weight: 600; }
.cite-pill .delta { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--lime); }

/* schema snippet */
.code-mini { margin-top: auto; background: var(--off); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 14px 16px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.65; overflow: hidden; }
.tok-key { color: var(--gold); }
.tok-str { color: var(--lime); }
.tok-punct { color: var(--mute); }
.tok-num { color: var(--ink-2); }
.tok-com { color: var(--mute); font-style: italic; }

/* knowledge graph mini */
.kg-mini { margin-top: auto; position: relative; height: 96px; }
.kg-mini svg { width: 100%; height: 100%; overflow: visible; }
.kg-mini .node { fill: var(--bg-2); stroke: var(--line); }
.kg-mini .node.hot { fill: var(--gold-soft); stroke: var(--gold); }
.kg-mini .edge { stroke: var(--line); stroke-dasharray: 3 4; }
.kg-mini .pulse { fill: var(--gold); }

/* export chips */
.exp-chips { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.exp-chips .ec { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-pill); background: var(--bg-2); font-size: 12px; color: var(--ink-soft); }
.exp-chips .ec b { font-family: var(--font-display); color: var(--gold); }

/* ============================================================
   INTERACTIVE — "what we score" signal selector + dial
   ============================================================ */
.scorelab { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; margin-top: 48px; }
.signal-list { display: grid; gap: 10px; }
.signal {
  text-align: left; width: 100%;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: var(--white); cursor: pointer; font-family: inherit;
  transition: border-color .3s, background .3s, transform .3s;
}
.signal:hover { border-color: var(--line); transform: translateX(2px); }
.signal.is-active { border-color: var(--gold); background: var(--gold-soft); box-shadow: var(--glow-gold); }
.signal .s-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-soft); display: grid; place-items: center; color: var(--gold); flex: none; }
.signal.is-active .s-ico { background: var(--gold); color: var(--on-lime); border-color: transparent; }
.signal .s-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.signal .s-desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.signal .s-val { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--gold); }

.scorelab-panel { display: flex; flex-direction: column; align-items: center; }
.lab-ring { width: 260px; height: 260px; position: relative; }
.lab-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lab-ring .track { stroke: var(--surface-2); }
.lab-ring .prog { stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease-out-expo), stroke .4s; }
.lab-ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lab-ring .num { font-family: var(--font-display); font-weight: 700; font-size: 80px; line-height: .9; letter-spacing: -0.03em; color: var(--ink); }
.lab-ring .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.lab-why { margin-top: 22px; max-width: 40ch; text-align: center; }
.lab-why .why-key { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.lab-why .why-text { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; margin-top: 8px; }

/* ============================================================
   SCHEMA SHOWCASE — tabs + big code block + copy
   ============================================================ */
.schema-card { background: linear-gradient(180deg, var(--cream) 0%, var(--off) 100%); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-2); margin-top: 44px; }
.schema-tabs { display: flex; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); background: var(--bg-2); align-items: center; }
.schema-tab { border: 0; background: transparent; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; transition: background .25s, color .25s; }
.schema-tab.is-active { background: var(--gold-soft); color: var(--gold); }
.schema-copy { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-soft); background: var(--off); color: var(--ink-soft); font-size: 12px; padding: 7px 12px; border-radius: var(--r-pill); cursor: pointer; transition: border-color .25s, color .25s; }
.schema-copy:hover { border-color: var(--gold); color: var(--gold); }
.schema-body { padding: 22px 26px; overflow-x: auto; }
.schema-body pre { margin: 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; }
.schema-pane { display: none; }
.schema-pane.is-active { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .browser-body { grid-template-columns: 1fr; }
  .demo-answer { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .b-span-3, .b-span-2 { grid-column: span 2; }
  .b-row-2 { grid-row: auto; }
  .bento-card { min-height: 220px; }
  .scorelab { grid-template-columns: 1fr; gap: 36px; }
  .scorelab-panel { order: -1; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .b-span-3, .b-span-2 { grid-column: span 1; }
  .hero2 { padding-top: 120px; }
}

/* ============================================================
   INTEGRATIONS — grouped by direction (in / out / notify)
   ============================================================ */
.ig-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; align-items: start; }
.ig-group { display: grid; gap: 12px; }
.ig-cat { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.ig-cat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold-glow); }
.ig-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px; background: var(--white);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  transition: transform .4s var(--ease-out-expo), border-color .3s, box-shadow .4s;
}
.ig-card:hover { transform: translateY(-3px); border-color: var(--line); box-shadow: var(--shadow-2); }
.ig-card .ig-logo {
  width: 44px; height: 44px; border-radius: 11px; flex: none;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  display: grid; place-items: center; color: var(--gold);
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.02em;
}
.ig-card .ig-name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.ig-card .ig-desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.5; }
@media (max-width: 920px) { .ig-groups { grid-template-columns: 1fr; } }

/* ============================================================
   SCROLL PROGRESS (fluid, Resend/Vercel-style top rail)
   ============================================================ */
.scroll-prog { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 200; background: var(--lime-gradient); box-shadow: 0 0 10px rgba(141,230,90,0.6); transform-origin: left; pointer-events: none; }

/* keep the (now 6-item) nav on one line at tablet widths */
.nav-link { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1180px) {
  .nav { padding-left: 24px; padding-right: 24px; }
  .nav-links { gap: 0; }
  .nav-links .nav-link { padding: 8px 10px; }
}

/* ============================================================
   POINTER GLOW — cards track the cursor (Supabase/Nuraform)
   Adds a soft gold halo that follows the pointer over a card.
   ============================================================ */
.glow-track { position: relative; }
.glow-track::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .4s; z-index: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), color-mix(in oklch, var(--gold) 16%, transparent), transparent 60%);
}
.glow-track:hover::after { opacity: 1; }
.glow-track > * { position: relative; z-index: 1; }
html[data-motion="off"] .glow-track::after { display: none; }

/* ============================================================
   MARKET COMPARISON — price-proportional range-bar chart
   ============================================================ */
.compare { max-width: 1040px; margin: 40px auto 0; }
.cmp-axis { display: grid; grid-template-columns: 230px 1fr 132px; gap: 22px; align-items: center; margin-bottom: 10px; padding: 0 24px; font-family: var(--font-mono); font-size: 10.5px; color: var(--mute); letter-spacing: .04em; }
.cmp-axis .ticks { grid-column: 2; display: flex; justify-content: space-between; }
.cmp-rows { display: grid; gap: 10px; }
.cmp-row {
  display: grid; grid-template-columns: 230px 1fr 132px; align-items: center; gap: 22px;
  padding: 16px 24px; border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  background: var(--white); transition: border-color .3s, transform .4s var(--ease-out-expo), box-shadow .4s;
}
.cmp-row:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: var(--shadow-2); }
.cmp-row.is-us { border-color: var(--gold); background: linear-gradient(165deg, var(--cream) 0%, var(--bg-2) 100%); box-shadow: var(--glow-gold); }
.cmp-head { min-width: 0; }
.cmp-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cmp-name .badge-us { font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-lime); background: var(--lime-gradient); border-radius: var(--r-pill); padding: 3px 8px; }
.cmp-use { font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }
.cmp-track { position: relative; height: 18px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden;
  background-image: linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 33.33% 100%; }
.cmp-bar { display: block; height: 100%; width: 0; min-width: 7px; margin-left: 0; border-radius: var(--r-pill);
  transition: width 1.1s var(--ease-out-expo), margin-left 1.1s var(--ease-out-expo); }
.cmp-bar.t-high { background: linear-gradient(90deg, var(--amber), var(--coral)); }
.cmp-bar.t-mid  { background: linear-gradient(90deg, var(--gold-deep), var(--amber)); }
.cmp-bar.t-us   { background: var(--lime-gradient); box-shadow: 0 0 14px rgba(141,230,90,0.5); }
.cmp-cost { font-family: var(--font-mono); font-size: 12px; color: var(--mute); text-align: right; white-space: nowrap; }
.cmp-cost b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.cmp-cost small { display: block; margin-top: 1px; }
.cmp-row.is-us .cmp-cost b { color: var(--lime); }
.cmp-note { font-size: 12px; color: var(--mute); text-align: center; margin-top: 20px; font-family: var(--font-mono); letter-spacing: .02em; max-width: 70ch; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* ============================================================
   PRICING v2 — audience tabs, ScorePass card, credit banner
   ============================================================ */
.price-controls { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 26px; }
.aud-panel { display: none; }
.aud-panel.is-active { display: block; }

/* override the design-system tier badge to match the strategy copy */
.tier.is-pro::before { content: 'RECOMMENDED'; }
.tier.is-agency::before {
  content: 'BEST FOR AGENCIES'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; padding: 5px 14px; white-space: nowrap;
  background: var(--lime-gradient); color: var(--on-lime); border-radius: var(--r-pill);
}
.tier.is-agency { background: linear-gradient(165deg, var(--cream) 0%, var(--bg-2) 100%); border-color: var(--lime); box-shadow: var(--glow-lime); }

/* compact one-off / 4-up cards */
.price-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; align-items: stretch; }

/* ---- Flip cards (front = price, back = how it works) ----- */
.price-grid-4 .tier.flip { padding: 0; background: transparent; border: 0; box-shadow: none; perspective: 1500px; min-height: 540px; }
.tier.flip.is-pro { box-shadow: none; }
.tier.flip .flip-inner { position: relative; width: 100%; height: 100%; min-height: 540px; transform-style: preserve-3d; transition: transform .7s var(--ease-spring); }
.tier.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  display: flex; flex-direction: column; padding: 30px 26px;
  border: 1px solid var(--line-soft); border-radius: var(--r-xl); background: var(--white); overflow: hidden;
  opacity: 1; transition: opacity .18s ease .34s;
}
.flip-back { transform: rotateY(180deg); background: linear-gradient(165deg, var(--cream) 0%, var(--bg-2) 100%); opacity: 0; }
.tier.flip.is-flipped .flip-front { opacity: 0; }
.tier.flip.is-flipped .flip-back { opacity: 1; }
.tier.flip.is-pro .flip-front { border-color: var(--gold); background: linear-gradient(165deg, var(--cream) 0%, var(--bg-2) 100%); box-shadow: var(--glow-gold); }
.tier.flip .flip-face .price { font-size: 44px; margin: 14px 0 4px; }
.tier.flip .flip-face ul { margin: 18px 0 22px; }
.tier.flip .flip-face .btn { margin-top: auto; }
html[data-motion="off"] .tier.flip .flip-inner { transition: none; }

/* flip toggle button */
.flip-toggle {
  display: inline-flex; align-items: center; gap: 7px; align-self: center;
  margin-top: 12px; padding: 7px 12px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--mute);
  border-radius: var(--r-pill); transition: color .25s, background .25s;
}
.flip-toggle:hover { color: var(--gold); background: var(--gold-soft); }
.flip-toggle svg { color: var(--gold); }

/* back-face detail list */
.flip-back h4 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--ink); margin: 8px 0 16px; letter-spacing: -0.01em; }
.fb-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 14px; }
.fb-list li { display: grid; gap: 3px; }
.fb-list .fb-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.fb-list li > span:last-child { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

@media (max-width: 980px) {
  .tier.flip, .tier.flip .flip-inner { min-height: 560px; }
}
.price-grid-4 .tier { padding: 30px 26px; display: flex; flex-direction: column; }
.price-grid-4 .tier .price { font-size: 44px; margin: 14px 0 4px; }
.price-grid-4 .tier ul { margin: 18px 0 22px; gap: 10px; }
.price-grid-4 .tier li { font-size: 13.5px; }
.price-grid-4 .tier .btn { margin-top: auto; }
.tier .plan-tagline { font-size: 13px; color: var(--ink-soft); min-height: 34px; margin-top: 2px; }
.tier .price .cur { font-size: 24px; vertical-align: super; font-weight: 600; color: var(--ink-soft); margin-right: 1px; }
.tier .price-sub { font-family: var(--font-mono); font-size: 11px; color: var(--mute); margin: -2px 0 4px; min-height: 15px; }
.tier .credit-line { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--lime); background: var(--emerald-soft); border: 1px solid rgba(123,220,140,0.2); border-radius: var(--r-pill); padding: 5px 11px; margin-bottom: 14px; }

/* ScorePass credit banner */
.credit-banner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center;
  margin: 28px auto 0; max-width: 920px; padding: 18px 26px;
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  background: color-mix(in oklch, var(--gold-soft) 70%, transparent); text-align: center;
}
.credit-banner .cb-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--gold); color: var(--on-lime); display: grid; place-items: center; flex: none; }
.credit-banner .cb-text { font-size: 14.5px; color: var(--ink); line-height: 1.5; max-width: 64ch; }
.credit-banner .cb-text strong { color: var(--gold); }

.price-foot { text-align: center; margin-top: 22px; font-family: var(--font-mono); font-size: 12px; color: var(--mute); }

/* All-plans accordion */
.allplans { max-width: 1040px; margin: 30px auto 0; }
.allplans > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  margin: 0 auto; padding: 11px 20px; border: 1px solid var(--line-soft); border-radius: var(--r-pill);
  background: var(--white); color: var(--ink-soft); font-size: 14px; font-weight: 600; transition: border-color .25s, color .25s;
  width: max-content;
}
.allplans { display: grid; justify-items: center; }
.allplans > summary::-webkit-details-marker { display: none; }
.allplans > summary:hover { border-color: var(--gold); color: var(--gold); }
.allplans > summary .chev { transition: transform .35s var(--ease-out-expo); display: inline-flex; }
.allplans[open] > summary .chev { transform: rotate(180deg); }
.allplans-grid { width: 100%; margin-top: 24px; border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; background: var(--white); }
.allplans-row { display: grid; grid-template-columns: 1.4fr 0.8fr 2fr auto; align-items: center; gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--line-soft); }
.allplans-row:last-child { border-bottom: 0; }
.allplans-row.head { background: var(--bg-2); font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.allplans-row .ap-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.allplans-row .ap-price { font-family: var(--font-mono); font-size: 14px; color: var(--gold); }
.allplans-row .ap-for { font-size: 13px; color: var(--ink-soft); }

/* Monitoring rationale band */
.monitor-band { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.monitor-stat { display: grid; gap: 16px; }
.monitor-stat .ms-card { border: 1px solid var(--line-soft); border-radius: var(--r-lg); background: var(--white); padding: 24px 26px; }
.monitor-stat .ms-num { font-family: var(--font-display); font-weight: 700; font-size: 50px; line-height: 1; color: var(--gold); letter-spacing: -0.02em; }
.monitor-stat .ms-lbl { font-size: 14px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }

@media (max-width: 980px) {
  .price-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .monitor-band { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .cmp-row { grid-template-columns: 1fr; gap: 12px; }
  .cmp-cost { text-align: left; }
  /* axis ticks would mis-align once rows stack — show a simple full-width scale */
  .cmp-axis { grid-template-columns: 1fr; padding: 0 4px; }
  .cmp-axis .ticks { grid-column: 1; }
  .cmp-axis > span:first-child { display: none; }
  .allplans-row { grid-template-columns: 1.2fr auto; }
  .allplans-row .ap-for, .allplans-row.head span:nth-child(3) { display: none; }
}
@media (max-width: 560px) {
  .price-grid-4 { grid-template-columns: 1fr; }
}
