/* ============================================================
   Clipply — Platform Tracking page
   Layered on styles.css. Mirrors analytics.css / routing.css.
   Prefix: pt-
   ============================================================ */
.pt-page {
  --c-blue: #1E5BE6;
  --c-violet: #6E5BF0;
  --c-cyan: #22C7DA;
  --c-green: #1FB47A;
  --c-orange: #F0A93B;
  --c-red: #E5484D;
  --pt-line: rgba(11,20,55,0.09);
  --pt-soft: rgba(11,20,55,0.04);
}
.btn-lg { padding: 14px 22px; font-size: 15.5px; border-radius: 13px; }

/* ---------- shared section + heading ---------- */
.pt-section { padding: 92px 0; position: relative; }
.pt-tint { background: linear-gradient(180deg, transparent, rgba(238,243,255,0.55) 12%, rgba(238,243,255,0.55) 88%, transparent); }
.pt-head { max-width: 730px; margin: 0 auto 56px; text-align: center; }
.pt-kicker {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--blue-600); margin-bottom: 14px;
}
.pt-head h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 38px;
  letter-spacing: -0.025em; line-height: 1.08; color: var(--ink-900); margin: 0 0 14px;
}
.pt-head p { font-size: 17px; line-height: 1.55; color: var(--ink-500); margin: 0; text-wrap: pretty; }
.pt-head .accent {
  background: linear-gradient(120deg, var(--blue-500), var(--blue-700) 50%, var(--violet-500));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ============================================================
   HERO
   ============================================================ */
.pt-hero { padding: 128px 0 64px; text-align: center; position: relative; }
.pt-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: white; border: 1px solid var(--blue-200); color: var(--blue-700);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.pt-eyebrow .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-green); box-shadow: 0 0 0 0 rgba(31,180,122,0.5); animation: ptpulse 1.6s infinite; }
@keyframes ptpulse { 0% { box-shadow: 0 0 0 0 rgba(31,180,122,0.5); } 70% { box-shadow: 0 0 0 7px rgba(31,180,122,0); } 100% { box-shadow: 0 0 0 0 rgba(31,180,122,0); } }
.pt-h1 {
  font-family: var(--font-display); font-weight: 900; font-size: 56px; line-height: 1.04;
  letter-spacing: -0.03em; color: var(--ink-900); margin: 0 auto 22px; max-width: 920px;
}
.pt-h1 .accent {
  background: linear-gradient(120deg, var(--blue-500), var(--blue-700) 50%, var(--violet-500));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.pt-sub { font-size: 18px; line-height: 1.6; color: var(--ink-500); max-width: 680px; margin: 0 auto 30px; text-wrap: pretty; }
.pt-sub em { color: var(--ink-900); font-style: italic; font-weight: 600; }
.pt-hero-cta { display: flex; gap: 16px; justify-content: center; align-items: center; margin-bottom: 54px; flex-wrap: wrap; }
.pt-link-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--ink-700); transition: color .18s, gap .18s; }
.pt-link-btn:hover { color: var(--blue-600); gap: 9px; }

/* ============================================================
   ATTRIBUTION ENGINE (hero centerpiece)
   ============================================================ */
.pt-engine {
  max-width: 1080px; margin: 0 auto; text-align: left;
  background: rgba(255,255,255,0.72); border: 1px solid var(--pt-line); border-radius: 24px;
  padding: 20px; box-shadow: 0 30px 70px -34px rgba(13,30,90,0.34); backdrop-filter: blur(8px);
}
.pt-eng-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.pt-eng-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pt-eng-fav { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(180deg, var(--blue-50), var(--blue-100)); color: var(--blue-600); }
.pt-eng-url { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--ink-900); display: flex; align-items: center; gap: 8px; }
.pt-eng-badge { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--c-green); background: rgba(31,180,122,0.12); padding: 3px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.pt-eng-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-green); animation: ptpulse 1.6s infinite; }
.pt-eng-meta { font-size: 12px; color: var(--ink-400); margin-top: 3px; }
.pt-eng-meta b { color: var(--ink-700); font-weight: 600; }
.pt-eng-ctrls { display: flex; align-items: center; gap: 8px; }
.pt-ctrl {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px;
  font-weight: 600; font-size: 13px; border: 1px solid var(--pt-line); background: white; color: var(--ink-700);
  transition: background .16s, border-color .16s, color .16s;
}
.pt-ctrl:hover { border-color: var(--blue-300); color: var(--blue-700); }
.pt-ctrl.live-on { background: rgba(31,180,122,0.1); border-color: rgba(31,180,122,0.35); color: #16855a; }

/* KPI row */
.pt-eng-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.pt-kpi { border: 1px solid var(--pt-line); border-radius: 14px; padding: 14px 16px; background: var(--card); border-top: 3px solid var(--kt); position: relative; overflow: hidden; }
.pt-kpi-lbl { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-400); margin-bottom: 8px; }
.pt-kpi-ico { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--kt); background: color-mix(in srgb, var(--kt) 12%, white); }
.pt-kpi-val { font-family: var(--font-display); font-weight: 800; font-size: 28px; color: var(--ink-900); line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.pt-kpi-val.bump { animation: ptbump .42s cubic-bezier(.2,.7,.2,1); }
@keyframes ptbump { 0% { transform: scale(1); } 35% { transform: scale(1.12); color: var(--kt); } 100% { transform: scale(1); } }
.pt-kpi-val .em { font-size: 22px; }
.pt-kpi-sub { font-size: 11px; font-weight: 600; color: var(--ink-400); margin-top: 6px; }

/* body: feed + leaderboard */
.pt-eng-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.pt-panel { border: 1px solid var(--pt-line); border-radius: 16px; background: var(--card); padding: 14px; min-width: 0; }
.pt-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pt-panel-title { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 800; font-size: 13.5px; color: var(--ink-900); }
.pt-panel-note { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-400); }

/* incoming-click feed — each row shows raw signal resolving to a platform */
.pt-feed { display: flex; flex-direction: column; gap: 7px; min-height: 300px; }
.pt-feed-row {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 11px; border-radius: 11px; background: var(--ink-50); border: 1px solid var(--pt-soft);
  animation: ptfeedin .5s cubic-bezier(.2,.7,.2,1);
  position: relative; overflow: hidden;
}
@keyframes ptfeedin { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.pt-feed-row.fresh::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, rgba(30,91,230,0.14) 50%, transparent 80%);
  animation: ptscan .8s ease-out 1;
}
@keyframes ptscan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.pt-feed-glyph { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: white; font-size: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
.pt-feed-main { min-width: 0; }
.pt-feed-name { font-weight: 700; font-size: 13px; color: var(--ink-900); display: flex; align-items: center; gap: 6px; }
.pt-feed-name .pt-flag { font-size: 13px; }
.pt-feed-name .pt-dev { font-size: 10.5px; color: var(--ink-400); font-weight: 500; }
.pt-feed-sig { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-feed-sig b { color: var(--ink-700); }
.pt-feed-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.pt-method {
  display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 7px; border-radius: 6px; color: var(--mt); background: color-mix(in srgb, var(--mt) 12%, white);
}
.pt-conf { font-family: var(--font-mono); font-size: 10px; color: var(--ink-400); }
.pt-conf b { color: var(--c-green); }

/* live leaderboard */
.pt-board { display: flex; flex-direction: column; gap: 9px; }
.pt-board-row {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 9px; align-items: center;
  transition: order .3s;
}
.pt-board-rank { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ink-300); text-align: center; }
.pt-board-main { min-width: 0; }
.pt-board-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.pt-board-name { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-900); min-width: 0; }
.pt-board-glyph { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; color: white; font-size: 10px; flex-shrink: 0; }
.pt-board-val { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: var(--ink-900); }
.pt-board-val .pct { color: var(--ink-400); font-weight: 600; margin-left: 5px; }
.pt-board-track { display: block; width: 100%; height: 8px; border-radius: 5px; background: var(--ink-100); overflow: hidden; }
.pt-board-fill { display: block; height: 100%; border-radius: 5px; transition: width .65s cubic-bezier(.2,.7,.2,1); }

/* ============================================================
   DETECTION METHODS GRID
   ============================================================ */
.pt-meth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pt-meth {
  background: var(--card); border: 1px solid var(--pt-line); border-radius: 18px; padding: 24px;
  box-shadow: var(--shadow-sm); transition: transform .26s cubic-bezier(.2,.7,.2,1), box-shadow .26s, border-color .2s;
  position: relative; overflow: hidden;
}
.pt-meth:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-200); }
.pt-meth-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; color: white; }
.pt-meth h3 { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--ink-900); margin: 0 0 7px; }
.pt-meth p { font-size: 14px; line-height: 1.55; color: var(--ink-500); margin: 0 0 16px; }
.pt-meth-sig {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-600);
  background: var(--ink-50); border: 1px dashed var(--pt-line); border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.pt-meth-sig .row { display: flex; align-items: center; gap: 8px; }
.pt-meth-sig .row svg { color: var(--c-green); flex-shrink: 0; }
.pt-meth-sig .row .arrow { color: var(--ink-300); }
.pt-meth-sig .row b { color: var(--ink-900); }

/* ============================================================
   REPORT DASHBOARD
   ============================================================ */
.pt-dash { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.pt-card { background: var(--card); border: 1px solid var(--pt-line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.pt-card.col-7 { grid-column: span 7; }
.pt-card.col-5 { grid-column: span 5; }
.pt-card.col-12 { grid-column: span 12; }
.pt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.pt-card-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--ink-900); }
.pt-card-sub { font-size: 11.5px; color: var(--ink-400); font-family: var(--font-mono); letter-spacing: 0.04em; }

/* big leaderboard (report) */
.pt-rank { display: flex; flex-direction: column; gap: 14px; }
.pt-rank-row { display: grid; grid-template-columns: 34px 150px 1fr auto; gap: 12px; align-items: center; }
.pt-rank-num { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--ink-300); text-align: center; }
.pt-rank-name { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; color: var(--ink-900); }
.pt-rank-glyph { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: white; font-size: 13px; flex-shrink: 0; }
.pt-rank-cat { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-400); }
.pt-rank-track { height: 10px; border-radius: 6px; background: var(--ink-100); overflow: hidden; }
.pt-rank-fill { display: block; height: 100%; border-radius: 6px; width: 0; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.pt-rank-val { font-family: var(--font-mono); font-weight: 700; font-size: 13.5px; color: var(--ink-900); text-align: right; min-width: 54px; }

/* category donut */
.pt-donut-body { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pt-donut { position: relative; flex-shrink: 0; }
.pt-donut svg { display: block; transform: rotate(-90deg); }
.pt-donut-ring { transition: stroke-dasharray 1.1s cubic-bezier(.2,.7,.2,1); }
.pt-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pt-donut-center b { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--ink-900); line-height: 1; }
.pt-donut-center span { font-size: 10px; color: var(--ink-400); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px; }
.pt-legend { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 130px; }
.pt-legend-row { display: flex; align-items: center; gap: 10px; }
.pt-legend-dot { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; }
.pt-legend-name { font-size: 13px; color: var(--ink-700); flex: 1; }
.pt-legend-pct { font-family: var(--font-mono); font-weight: 700; font-size: 13.5px; color: var(--ink-900); }

/* channel table */
.pt-thead { display: grid; grid-template-columns: 1.5fr 0.8fr 0.7fr 0.6fr 0.8fr; gap: 12px; padding: 0 14px 11px; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-400); font-weight: 700; border-bottom: 1px solid var(--pt-line); }
.pt-trow { display: grid; grid-template-columns: 1.5fr 0.8fr 0.7fr 0.6fr 0.8fr; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--pt-soft); transition: background .15s; }
.pt-trow:hover { background: var(--ink-50); }
.pt-trow:last-child { border-bottom: none; }
.pt-trow .ch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-900); min-width: 0; }
.pt-trow .ch-glyph { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: white; font-size: 14px; flex-shrink: 0; }
.pt-cat-pill { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; display: inline-block; justify-self: start; }
.pt-trow .num { font-family: var(--font-mono); font-weight: 700; font-size: 13.5px; color: var(--ink-900); }
.pt-trow .conv { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-600); }
.pt-spark { display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.pt-spark i { flex: 1; background: linear-gradient(180deg, var(--blue-300), var(--blue-600)); border-radius: 2px 2px 0 0; min-height: 2px; }

/* insight footer */
.pt-insight {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(135deg, #EEF3FF, #F8F2FF); border: 1px dashed rgba(110,91,240,0.35);
  display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ink-700); line-height: 1.5;
}
.pt-insight .pt-ai-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-violet); font-weight: 800; }
.pt-insight b { color: var(--blue-700); font-weight: 700; }

/* ============================================================
   CTA
   ============================================================ */
.pt-cta-sec { padding: 40px 0 100px; }
.pt-cta { max-width: 780px; margin: 0 auto; text-align: center; background: linear-gradient(150deg, var(--ink-900), #142b6b); border-radius: 28px; padding: 56px 40px; color: white; box-shadow: 0 40px 80px -36px rgba(13,30,90,0.6); position: relative; overflow: hidden; }
.pt-cta::after { content: ''; position: absolute; top: -40%; right: -10%; width: 360px; height: 360px; background: radial-gradient(circle, rgba(92,204,250,0.3), transparent 70%); }
.pt-cta-tag { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #9FC0FF; background: rgba(255,255,255,0.08); padding: 6px 13px; border-radius: 999px; margin-bottom: 18px; }
.pt-cta h2 { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 38px; letter-spacing: -0.02em; margin: 0 0 14px; }
.pt-cta p { position: relative; font-size: 16.5px; line-height: 1.55; color: rgba(255,255,255,0.72); max-width: 520px; margin: 0 auto 28px; }
.pt-cta-actions { position: relative; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.pt-cta-actions .btn-ghost { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: white; }
.pt-cta-actions .btn-ghost:hover { background: rgba(255,255,255,0.18); color: white; }
.pt-cta-trust { position: relative; margin-top: 22px; font-size: 13px; color: rgba(255,255,255,0.55); display: inline-flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.pt-cta-trust span { display: inline-flex; align-items: center; gap: 6px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .pt-h1 { font-size: 42px; }
  .pt-eng-body { grid-template-columns: 1fr; }
  .pt-meth-grid { grid-template-columns: 1fr; }
  .pt-card.col-7, .pt-card.col-5, .pt-card.col-12 { grid-column: span 12; }
}
@media (max-width: 600px) {
  .pt-hero { padding: 104px 0 48px; }
  .pt-h1 { font-size: 32px; }
  .pt-head h2 { font-size: 27px; }
  .pt-eng-kpis { grid-template-columns: repeat(2, 1fr); }
  .pt-rank-row { grid-template-columns: 26px 1fr auto; }
  .pt-rank-cat { display: none; }
  .pt-thead { display: none; }
  .pt-trow { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .pt-trow .pt-cat-pill, .pt-trow .conv, .pt-trow .pt-spark { display: none; }
}
