/* ── Components ────────────────────────────────────────────────────────────── */

/* ── Card system ───────────────────────────────────────────────────────────────
   ONE elevation strategy (stan.vision rule): every card is an outlined opaque
   warm-grey surface — solid fill + 1px hairline + 16px radius. Hover adds an
   amber edge + warm glow lift. A single elevated focal variant (.demo-card-hero)
   is reserved for the one bento hero tile.
   .kpi-card / .section-card / .video-card / .momentum-card all opt in via the
   shared custom properties below so they stay visually identical.
   Backdrop-blur is intentionally NOT used on data cards: separation already comes
   from the 1px border, and frosting every card costs a compositing layer per card.
   Purposeful glass lives only on .topbar, .toast and modal overlays.          */
:root {
  --card-surface: var(--bg-surface-2);
  --card-border:  rgba(255, 255, 255, 0.06);
  --card-radius:  16px;
}

/* ── KPI Card ────────────────────────────────────────────── */
.kpi-card {
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

.kpi-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.kpi-card:hover { border-color: rgba(245, 158, 11, 0.2); box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1), var(--shadow-glow); transform: translateY(-1px); }
.kpi-card:hover::before { opacity: 1; }

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 10.5px;
  font-weight: var(--weight-semi);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.kpi-delta.up   { color: var(--green);  background: var(--green-subtle); }
.kpi-delta.down { color: var(--red);    background: var(--red-subtle); }
.kpi-delta.flat { color: var(--text-tertiary); background: var(--bg-hover); }

.kpi-delta-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ── KPI sparkline (Tremor metric+micro-shape anatomy) ───────
   A tiny inline-SVG bar strip rendered under the value from real per-bucket
   data. No <canvas> → no Chart.js id collisions. Draws in on entrance. */
.demo-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  margin-top: 2px;
}
.demo-spark-bar {
  flex: 1;
  min-width: 2px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
  opacity: 0.85;
  transform-origin: bottom;
  transform: scaleY(var(--h, 0.4));
  transition: transform var(--duration-slow) var(--ease-entrance);
}
/* Pre-entrance state: collapsed; twowEntrance flips .demo-spark-draw to draw up. */
body.twow-boot .demo-spark .demo-spark-bar { transform: scaleY(0.04); }
.demo-spark.demo-spark-draw .demo-spark-bar { transform: scaleY(var(--h, 0.4)); }

.demo-kpi-context {
  font-size: 10.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}

/* "Connect Stripe" honest empty KPI tile — amber-dashed, intentional, not a fake number. */
.demo-kpi-connect {
  border-style: dashed;
  border-color: var(--accent-line);
  background: var(--accent-04);
  align-items: stretch;
  justify-content: center;
  text-align: left;
}
.demo-kpi-connect:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}
.demo-kpi-connect .demo-connect-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--accent);
}

/* ── Video Card ──────────────────────────────────────────── */
.video-card {
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.video-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.video-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-surface-2);
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--ease);
}

.video-card:hover .video-thumb img { transform: scale(1.03); }

.video-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card:hover .video-thumb-overlay { opacity: 1; }

.play-btn {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.video-duration {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-2);
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 11px;
  font-weight: var(--weight-medium);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}

.video-info {
  padding: var(--space-3) var(--space-4) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.video-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.video-stats {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.video-stat {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.video-stat svg { width: 12px; height: 12px; opacity: 0.6; }

/* ── Platform Badge ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 10px;
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-yt       { color: var(--yt);     background: var(--yt-subtle); }
.badge-tiktok   { color: var(--tiktok); background: var(--tiktok-subtle); }
.badge-ig       { color: var(--ig);     background: var(--ig-subtle); }
.badge-accent   { color: var(--accent-hover); background: var(--accent-subtle); }
.badge-green    { color: var(--green);  background: var(--green-subtle); }
.badge-yellow   { color: var(--yellow); background: var(--yellow-subtle); }
.badge-red      { color: var(--red);    background: var(--red-subtle); }
.badge-neutral  { color: var(--text-secondary); background: var(--bg-surface-3); }

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* ── Section Card ────────────────────────────────────────── */
.section-card {
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  gap: var(--space-4);
}

/* Leading accent tick on section titles — a small amber bar before the label. */
.section-card-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.section-card-title::before {
  content: '';
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
/* Opt-out for nested/inline uses where a tick would be noise. */
.section-card-title.no-tick::before { display: none; }

.section-card-body {
  padding: var(--space-5);
}

/* ── Elevated focal variant — the single bento hero tile ───
   Stronger shadow + amber edge glow + a faint warm wash so size AND elevation
   both signal "this is the story". Reserved for ONE tile per view. */
.demo-card-hero {
  border-color: var(--accent-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-10), 0 0 60px rgba(245, 158, 11, 0.06);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-06) 0%, transparent 55%),
    var(--card-surface);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-btn);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: var(--weight-semi);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

/* ── Tab bar ─────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: var(--space-1);
  background: rgba(26, 26, 26, 0.5);
  border-radius: var(--radius-btn);
  padding: 3px;
}

.tab-item {
  padding: var(--space-2) var(--space-4);
  border-radius: 10px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  white-space: nowrap;
}

.tab-item:hover { color: var(--text-primary); }
.tab-item.active { background: var(--bg-surface-1); color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* ── Filter bar ──────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  transition: border-color var(--duration) var(--ease);
  appearance: none;
  padding-right: var(--space-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-select:hover { border-color: var(--text-tertiary); color: var(--text-primary); }

/* ── Search input ────────────────────────────────────────── */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap svg {
  position: absolute;
  left: var(--space-3);
  color: var(--text-tertiary);
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.search-input {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3) var(--space-2) calc(var(--space-3) + 22px);
  width: 220px;
  transition: border-color var(--duration) var(--ease), width var(--duration) var(--ease);
}

.search-input::placeholder { color: var(--text-tertiary); }
.search-input:focus { outline: none; border-color: var(--accent); width: 280px; }

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  font-size: var(--text-sm);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: slideIn 200ms var(--ease) forwards;
  max-width: 360px;
}

.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-4) 0;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: var(--text-tertiary);
}

/* Icon sits in a soft amber-tinted disc so the empty state feels intentional. */
.empty-state > svg,
.empty-state .demo-empty-icon {
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: var(--radius-full);
  background: var(--accent-06);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  opacity: 1;
  box-sizing: content-box;
}
.empty-state .demo-empty-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--text-secondary);
}
.empty-state p   { font-size: var(--text-sm); max-width: 320px; line-height: 1.6; margin: 0; }
.empty-state .demo-empty-action { margin-top: var(--space-2); }

/* ── Global keyboard focus ring — amber, consistent across interactive chrome ─ */
.btn:focus-visible,
.tab-item:focus-visible,
.filter-select:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--accent-glow);
}
.search-input:focus-visible { outline: none; }

/* ── Skeleton loader ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface-2) 25%, var(--bg-surface-3) 50%, var(--bg-surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Bento-shaped loading scaffold — mirrors the real Overview hero + KPI satellites
   so the layout doesn't jump when data lands. */
.demo-skel-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.demo-skel-hero {
  grid-column: span 7;
  height: 268px;
  border-radius: var(--card-radius);
}
.demo-skel-kpis {
  grid-column: span 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.demo-skel-kpis > .skeleton { height: 126px; border-radius: var(--card-radius); }
@media (max-width: 1180px) {
  .demo-skel-hero, .demo-skel-kpis { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

/* ── Sample data badge ───────────────────────────────────── */
.sample-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 10px;
  background: var(--yellow-subtle);
  color: var(--yellow);
  border-radius: var(--radius-badge);
  font-size: 10px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Top video list item (Tremor BarList row) ────────────────
   A proportional amber fill sits behind each row (width = views / max) so
   relative magnitude reads at a glance. Hover/focus moved off inline handlers
   into CSS for one consistent motion language. */
.top-video-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  margin: 0 calc(-1 * var(--space-3));
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: background var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.top-video-item:last-child { border-bottom: none; }

/* BarList magnitude fill — decorative, never intercepts the row click. */
.demo-bar-list-fill {
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 5px;
  height: 3px;
  border-radius: 2px;
  background: var(--bg-surface-3);
  overflow: hidden;
  pointer-events: none;
}
.demo-bar-list-fill > i {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: 2px;
  background: var(--bar, var(--accent));
  opacity: 0.9;
  transform-origin: left;
  transition: width var(--duration-slow) var(--ease-entrance);
}

.top-video-item:hover {
  background: var(--bg-hover);
  transform: translateX(2px);
}
.top-video-item:focus-visible {
  outline: none;
  background: var(--bg-hover);
  box-shadow: 0 0 0 2px var(--accent-glow) inset;
}

/* Per-channel carousel card hover (was inline onmouseover) — border picks up the
   platform hue passed in via --ch-hover so each card keeps its channel identity. */
.ch-card {
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.ch-card:hover {
  transform: translateY(-2px);
  border-color: var(--ch-hover, var(--accent)) !important;
  box-shadow: var(--shadow);
}
.ch-card:focus-visible {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.top-video-rank {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-disabled);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.top-video-thumb {
  width: 80px;
  height: 45px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface-2);
  flex-shrink: 0;
}

.top-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-video-details { flex: 1; min-width: 0; }

.top-video-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-video-sub {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 2px;
}

.top-video-views {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ── Chart container ─────────────────────────────────────── */
.chart-wrap {
  position: relative;
  width: 100%;
}

/* ── Stat row (Channel Stats — also a BarList) ─────────────── */
.stat-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0 calc(var(--space-3) + 4px);
  border-bottom: 1px solid var(--border-subtle);
}

.stat-row:last-child { border-bottom: none; }

.stat-label { font-size: var(--text-sm); color: var(--text-secondary); }
.stat-value { font-size: var(--text-sm); font-weight: var(--weight-semi); color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* Channel-stat magnitude fill — pinned to the row's lower edge. */
.stat-row .demo-bar-list-fill { left: 0; right: 0; bottom: 4px; }

/* ── KPI Modal animations ────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Guided tour (first visit) ───────────────────────────── */
.tb-tour-card {
  position: fixed;
  z-index: 1200;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: var(--bg-surface-2);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
  font-family: var(--font);
  animation: tbTourIn 200ms var(--ease) both;
}

@keyframes tbTourIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tb-tour-arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--bg-surface-2);
  transform: rotate(45deg);
  margin-left: -5px;
}

.tb-tour-arrow-top {
  top: -6px;
  border-left: 1px solid rgba(245, 158, 11, 0.35);
  border-top: 1px solid rgba(245, 158, 11, 0.35);
}

.tb-tour-arrow-bottom {
  bottom: -6px;
  border-right: 1px solid rgba(245, 158, 11, 0.35);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
}

.tb-tour-step {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.tb-tour-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tb-tour-body {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.tb-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.tb-tour-skip {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
}

.tb-tour-skip:hover { color: var(--text-secondary); }

.tb-tour-next {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.tb-tour-next:hover { background: var(--accent-hover); }

.tb-tour-ring {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 7px rgba(245, 158, 11, 0.18) !important;
  border-radius: 10px;
  transition: box-shadow 200ms var(--ease);
}

.tb-tour-sheet {
  left: 12px !important;
  right: 12px;
  top: auto !important;
  bottom: 12px;
  width: auto;
}

.tb-tour-sheet .tb-tour-arrow { display: none; }

/* ── TWOW: cinematic entrance (JS-gated; static without JS) ── */
body.twow-boot .twow-in {
  opacity: 0;
  transform: translateY(10px);
  animation: twowIn .32s cubic-bezier(.2, .7, .3, 1) forwards;
  animation-delay: calc(var(--twow-i, 0) * 50ms);
}
@keyframes twowIn { to { opacity: 1; transform: translateY(0); } }
.twow-pulse { animation: twowPulse 1s ease; }
@keyframes twowPulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, .45); }
  60%  { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
@media (prefers-reduced-motion: reduce) {
  body.twow-boot .twow-in { animation: none !important; opacity: 1 !important; transform: none !important; }
  .twow-pulse { animation: none !important; }
}
