/* =============================================================================
   stalkcreators.com page layer.
   Sits on top of claim.css and only adds what the design system has no class
   for. Light mode only: claim.css sets color-scheme: light and there is no dark
   variant anywhere in this file by design.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-text-primary);
  background: var(--color-background-primary);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

[hidden] { display: none !important; }

a { color: inherit; }

:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: 6px; }

/* ---------------------------------------------------------------- passcode */

.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--color-background-surface);
}
.gate-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.gate-mark { height: 26px; width: auto; margin-bottom: 8px; }
.gate-copy { margin: 0 0 8px; }
.gate-card h1 { margin: 0; }
.gate-card form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.gate-card .input { width: 100%; }

/* -------------------------------------------------------------------- hero */

.hero-band {
  background: var(--color-background-brand);
  padding: 28px 32px 132px;
}
.hero-inner, .section-inner {
  max-width: var(--container-content);
  margin: 0 auto;
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
}
.hero-mark { height: 24px; width: auto; }
.hero-title { margin: 0; max-width: 15ch; }
.hero-sub { color: rgba(255, 255, 255, 0.82); margin: 16px 0 0; max-width: 46ch; }

.freshness { color: rgba(255, 255, 255, 0.72); white-space: nowrap; }
.freshness.is-stale { color: #ffd9d6; font-weight: 600; }

/* ---------------------------------------------------------------- pipeline */

.pipeline-wrap {
  max-width: var(--container-content);
  margin: -84px auto 0;
  padding: 0 32px;
}
.pipeline-card {
  padding: 32px 8px 24px;
  overflow: visible; /* the conversion pills sit on the card edge */
}

.topline {
  display: flex;
  gap: 56px;
  padding: 0 24px 24px;
  flex-wrap: wrap;
}
.topline-stat { display: flex; flex-direction: column; gap: 2px; }
.topline-stat .numeric-lg { color: var(--color-text-primary); }
.topline-stat:first-child .numeric-lg { color: var(--color-text-brand); }
.topline-label { color: var(--color-text-secondary); }

.pipeline { display: flex; align-items: stretch; padding: 20px 0 4px; }

.stage {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  padding: 8px 20px 12px;
  background: none;
  border: 0;
  border-radius: var(--radius-inner);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: var(--transition-quick);
}
.stage + .stage { border-left: 1px solid var(--color-border-default); border-radius: 0 var(--radius-inner) var(--radius-inner) 0; }
.stage:hover .stage-name { color: var(--color-text-brand); }
.stage[aria-pressed="true"] { background: var(--color-background-surface); }

/* The topline keeps the full 60px numeric-lg. Stage cells are roughly 170px
   wide once seven of them share the card, and a five character count like
   1,501 overflows at that size, so the pipeline gets its own step down. */
.stage-count {
  font: italic 900 38px/40px var(--font-family);
  letter-spacing: -1.3px;
}
.stage--last .stage-count { color: var(--color-text-brand); }
.stage-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stage-name { display: block; }
.stage-sub { display: block; color: var(--color-text-tertiary); }

/* Conversion pill straddles the hairline between two stages. */
.conv {
  position: absolute;
  top: -14px;
  right: 0;
  transform: translateX(50%);
  z-index: 2;
  height: 22px;
  padding: 0 9px;
  font: 600 11px/22px var(--font-family);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* The Instagram cell. It has no number element at all, so the page is
   structurally incapable of implying a measured zero. */
.stage--ghost {
  flex: 0 0 176px;
  cursor: default;
  justify-content: center;
  gap: 4px;
  margin-right: 12px;
  padding: 14px 18px;
  border: 1px dashed #e2e6ee;
  background: transparent;
}
.stage--ghost:hover .stage-name { color: inherit; }
.ghost-status { color: var(--color-text-secondary); }

.pipeline-lost {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 28px;
  padding: 14px 24px 0;
  flex-wrap: wrap;
}
.lost-label { margin-right: auto; color: var(--color-text-tertiary); }
.lost-item { display: inline-flex; align-items: baseline; gap: 8px; }
.lost-item .numeric-md { color: var(--color-text-tertiary); }

/* ---------------------------------------------------------------- sections */

.section { padding: 72px 32px; }
.section--surface { background: var(--color-background-surface); }
.section--table { padding-top: 64px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head h2 { margin: 0; }

/* ------------------------------------------------------------ source chips */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-pill);
  background: var(--color-background-primary);
  font: 500 13px/30px var(--font-family);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: var(--transition-quick);
  white-space: nowrap;
}
.chip:hover { border-color: #dfe4ee; color: var(--color-text-primary); }
.chip[aria-pressed="true"] {
  background: var(--color-badge-process);
  border-color: transparent;
  color: var(--color-text-brand);
  font-weight: 600;
}
.chip-count { opacity: 0.6; margin-left: 6px; }
.filter-note { margin: 0 0 16px; }

/* ------------------------------------------------------------------- table */

.table-scroll {
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 660px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-inner);
  -webkit-overflow-scrolling: touch;
}
table.creators { width: 100%; min-width: 780px; border-collapse: collapse; }
table.creators thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-background-primary);
  border-bottom: 1px solid var(--color-border-default);
  padding: 12px 16px;
  text-align: left;
  font: 600 12px/16px var(--font-family);
  letter-spacing: -0.24px;
  color: var(--color-text-tertiary);
  white-space: nowrap;
}
table.creators td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-default);
  vertical-align: middle;
}
table.creators tbody tr:last-child td { border-bottom: 0; }
table.creators tbody tr:hover { background: #fafbfd; }
table.creators .num { text-align: right; }

.cell-name { display: flex; flex-direction: column; gap: 1px; }
.cell-empty { color: var(--color-text-tertiary); }
.cell-links { display: flex; gap: 10px; align-items: center; }
.cell-links a { display: inline-flex; color: var(--color-icon-tertiary); transition: var(--transition-quick); }
.cell-links a:hover { color: var(--color-icon-brand); }
.cell-links svg { width: 16px; height: 16px; display: block; }

.chip-muted {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--color-background-surface);
  color: var(--color-text-secondary);
  font: 600 10px/22px var(--font-family);
  white-space: nowrap;
}
.chip-stage {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--color-badge-process);
  color: var(--color-text-brand);
  font: 600 10px/22px var(--font-family);
  white-space: nowrap;
}
.days-warn { color: var(--color-text-error); }

.empty-row td {
  padding: 48px 16px;
  text-align: center;
  color: var(--color-text-secondary);
}

/* ------------------------------------------------------------------ charts */

.chart-card { padding: 32px; }
.chart-card h2 { margin: 0 0 2px; }
.chart-sub { margin: 0 0 16px; }
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }

.chart-tip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  background: var(--color-background-primary);
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-dropdown);
  padding: 8px 12px;
  transform: translate(-50%, -120%);
}
.chart-tip .tip-label { display: block; font: 400 12px/18px var(--font-family); color: var(--color-text-secondary); }
.chart-tip .tip-value { display: block; font: 600 16px/24px var(--font-family); }

/* ------------------------------------------------------------------ footer */

.site-footer { padding: 40px 32px 64px; border-top: 1px solid var(--color-border-default); }
.site-footer p { margin: 0 0 4px; }

/* ------------------------------------------------------------- skeletons */

.sk { display: inline-block; border-radius: var(--radius-input); }

/* ----------------------------------------------------------------- mobile */

@media (max-width: 768px) {
  .hero-band { padding: 24px 20px 108px; }
  .hero-top { margin-bottom: 32px; }
  .hero-title { font: 700 36px/38px var(--font-family); letter-spacing: -1.4px; max-width: none; }
  .hero-sub { font-size: 15px; }

  .pipeline-wrap { margin-top: -68px; padding: 0 16px; }
  .pipeline-card { padding: 24px 8px 20px; }

  .topline { gap: 24px; padding: 0 16px 20px; }
  .topline-stat { flex: 1 1 40%; }
  .topline-stat .numeric-lg { font: italic 900 34px/36px var(--font-family); letter-spacing: -0.7px; }

  .pipeline { flex-direction: column; padding: 8px 0 0; }
  .stage {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-inner);
  }
  .stage + .stage { border-left: 0; border-top: 1px solid var(--color-border-default); border-radius: var(--radius-inner); }
  .stage-count { font: italic 900 30px/30px var(--font-family); letter-spacing: -0.6px; min-width: 62px; }
  .stage-text { display: flex; flex-direction: column; gap: 1px; }
  /* The pill is the step OUT of this stage. Stacked vertically that boundary
     is the bottom edge, not the top, or it reads as the previous transition. */
  .conv { top: auto; bottom: -11px; right: 16px; transform: none; }

  .stage--ghost {
    flex: 1 1 auto;
    margin: 0 0 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .pipeline-lost { justify-content: flex-start; gap: 20px; padding: 12px 16px 0; }
  .lost-label { margin-right: 0; flex-basis: 100%; }

  .section { padding: 48px 20px; }
  .site-footer { padding: 32px 20px 48px; }
  .chart-card { padding: 24px 20px; }
  .table-scroll { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .stage, .chip, .cell-links a { transition: none; }
}

.reality-note { margin: 14px 24px 0; }
@media (max-width: 768px) { .reality-note { margin: 12px 16px 0; } }
