/* ============================================================
   DZ HUB — Pure Black & White
   Bricolage Grotesque (display) + Figtree (body)
   OKLCH palette: grayscale neutrals, white as the action color.
   No chromatic accent — hierarchy is carried by luminosity + weight.
   ============================================================ */

:root {
  --bg:           oklch(9%  0 0);
  --bg-card:      oklch(12% 0 0);
  --bg-card-alt:  oklch(15% 0 0);
  --bg-deep:      oklch(6%  0 0);

  --line:         oklch(21% 0 0);
  --line-mid:     oklch(30% 0 0);

  --text:         oklch(96% 0 0);
  --muted:        oklch(60% 0 0);
  --faint:        oklch(40% 0 0);

  /* Action / accent is pure white; --on-accent is the ink on a white fill. */
  --accent:        oklch(97% 0 0);
  --accent-dim:    oklch(72% 0 0);
  --accent-sub:    oklch(97% 0 0 / 0.10);
  --accent-border: oklch(97% 0 0 / 0.24);
  --on-accent:     oklch(14% 0 0);

  /* Semantic status colors — the one place color is allowed, kept separate
     from the black & white brand palette. green = live, orange = wip, red = dead. */
  --st-ok:   oklch(74% 0.16 150);
  --st-warn: oklch(76% 0.16 55);
  --st-bad:  oklch(58% 0.21 27);

  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body:    'Figtree', sans-serif;

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    14px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 180ms ease;
}

/* ─── Reset ─────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ─── Navbar ─────────────────────────────────────────────── */

/* Static full-width header — no scroll animation. Solid bar, hairline below. */
.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  background: oklch(10% 0 0);
  border-bottom: 1px solid var(--line);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  width: 100%;
  padding: 0 clamp(20px, 4vw, 44px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.07em;
  color: var(--text);
}

.nav-side {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color var(--t);
}

.nav-links a:hover { color: var(--text); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.lang-button {
  min-width: 36px;
  height: 26px;
  padding: 0 9px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background var(--t), color var(--t);
}

.lang-button:hover { color: var(--text); }

.lang-button.is-active {
  background: var(--accent);
  color: var(--on-accent);
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 15px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--t), opacity var(--t);
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 28px 0 28px;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  padding: 48px 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.85); }
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-body);
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 5.8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  flex: 1;
}

.hero-lead {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.68;
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

/* ─── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform var(--t), background var(--t), border-color var(--t), color var(--t);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: oklch(88% 0 0);
  border-color: oklch(88% 0 0);
}

.btn-secondary {
  background: transparent;
  border-color: var(--line-mid);
  color: var(--muted);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: oklch(38% 0 0);
}

/* ─── Hero Panel ─────────────────────────────────────────── */

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 20px;
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--accent);
}

.panel-stage {
  flex: 1;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
  min-height: 300px;
}

.panel-slides { position: absolute; inset: 0; }

.panel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.9s ease, transform 5.5s ease;
}

.panel-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.panel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 28%,
    oklch(9% 0 0 / 0.55) 62%,
    oklch(9% 0 0 / 0.95) 100%
  );
}

.panel-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 24px;
  z-index: 1;
}

.stage-kicker {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-body);
}

.stage-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--text);
}

.stage-meta {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ─── Marquee ────────────────────────────────────────────── */

.panel-marquee {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  flex-shrink: 0;
}

.panel-marquee__track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  padding: 9px 0;
  animation: marqueeScroll 22s linear infinite;
  will-change: transform;
}

.panel-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.panel-marquee__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-dim);
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Support section ────────────────────────────────────── */

.support-section {
  padding: 0 0 100px;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 0.96;
  color: var(--text);
}

.section-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 54ch;
}

/* ─── Filtro da grade ────────────────────────────────────── */
/* Mesmo desenho dos chips de periodo do contador: a pagina ja ensinou o
   usuario que pilula = escolher recorte, entao nao invento um segundo idioma
   pra dizer a mesma coisa. */

.sort-bar {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-deep);
  flex-shrink: 0;
}

.sort-chip {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color var(--t), background var(--t);
}

.sort-chip:hover { color: var(--muted); }

.sort-chip.is-active {
  background: var(--accent-sub);
  color: var(--text);
}

.sort-chip:focus-visible {
  outline: 1px solid var(--accent-dim);
  outline-offset: 1px;
}

/* ─── Cards ──────────────────────────────────────────────── */

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.support-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.48s ease,
    transform 0.48s ease,
    border-color var(--t);
}

.support-card.visible,
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.support-card.has-features { cursor: pointer; }

.support-card.has-features:hover {
  border-color: var(--line-mid);
}

.support-card.has-features:active {
  transform: scale(0.992);
}

.support-card.has-features:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-media {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.support-card.has-features:hover .card-media img {
  transform: scale(1.04);
}

.card-media::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(transparent, var(--bg-card) 100%);
  pointer-events: none;
}

.card-topline {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.card-index {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-body);
}

.card-status {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-body);
}

.card-status.is-supported {
  background: var(--st-ok);
  color: var(--on-accent);
  border: 1px solid var(--st-ok);
}

.card-status.is-developing {
  background: var(--st-warn);
  color: var(--on-accent);
  border: 1px solid var(--st-warn);
}

.card-status.is-discontinued {
  background: var(--st-bad);
  color: oklch(98% 0 0);
  border: 1px solid var(--st-bad);
}

.card-copy {
  padding: 14px 18px 20px;
}

/* Titulo e metrica na mesma linha, metrica encostada na direita. `baseline`
   alinha o texto, nao as caixas — com fontes de tamanhos diferentes e a unica
   forma de as duas parecerem escritas na mesma reta. */
.card-copy__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.card-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.card-metric {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.855rem;
  line-height: 1.55;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 12px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-dim);
  text-transform: uppercase;
  transition: color var(--t), gap var(--t);
}

.support-card.has-features:hover .card-action {
  color: var(--accent);
  gap: 8px;
}

.card-action::after {
  content: '→';
}

/* ─── Reveal ─────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

/* ─── Feature modal ──────────────────────────────────────── */

.feature-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.feature-modal[hidden] { display: none; }

.feature-modal:not([hidden]) .feature-modal__backdrop {
  animation: backdropIn 160ms ease-out forwards;
}

.feature-modal:not([hidden]) .feature-modal__dialog {
  animation: dialogIn 240ms var(--ease-out) forwards;
}

.feature-modal__backdrop {
  position: absolute;
  inset: 0;
  background: oklch(5% 0 0 / 0.86);
}

.feature-modal__dialog {
  position: relative;
  width: min(900px, 100%);
  max-height: min(88vh, 800px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-lg);
  background: oklch(11% 0 0);
  box-shadow: 0 40px 100px oklch(0% 0 0 / 0.5);
}

.feature-modal__dialog::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--accent);
}

.feature-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px 22px;
  border-bottom: 1px solid var(--line);
}

.feature-modal__header-main { min-width: 0; }

.feature-modal__eyebrow {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dim);
  font-family: var(--font-body);
}

.feature-modal__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.feature-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  letter-spacing: -0.04em;
  line-height: 0.96;
  color: var(--text);
}

.feature-modal__status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.feature-modal__status.is-supported {
  background: var(--st-ok);
  color: var(--on-accent);
  border: 1px solid var(--st-ok);
}

.feature-modal__status.is-developing {
  background: var(--st-warn);
  color: var(--on-accent);
  border: 1px solid var(--st-warn);
}

.feature-modal__status.is-discontinued {
  background: var(--st-bad);
  color: oklch(98% 0 0);
  border: 1px solid var(--st-bad);
}

.feature-modal__count {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.feature-modal__close {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: background var(--t), color var(--t), border-color var(--t);
}

.feature-modal__close:hover {
  background: var(--bg-card-alt);
  color: var(--text);
  border-color: var(--line-mid);
}

.feature-modal__toolbar {
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
}

.feature-modal__search {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--t);
}

.feature-modal__search::placeholder { color: var(--faint); }
.feature-modal__search:focus { border-color: var(--accent-dim); }

.feature-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 32px 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-mid) transparent;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list__item {
  position: relative;
  padding-left: 15px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
}

.feature-list__item::before {
  content: '';
  position: absolute;
  top: 0.64em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
}

.feature-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ─── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.footer-inner p,
.footer-inner a {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--faint);
  text-transform: uppercase;
  transition: color var(--t);
}

.footer-inner a:hover { color: var(--muted); }

/* ─── Keyframes ──────────────────────────────────────────── */

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 20px 0;
  }

  .hero-panel { min-height: 420px; }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .navbar-inner {
    width: 100%;
    height: 60px;
    padding: 0 16px;
  }

  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: 61px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 16px 14px;
    background: oklch(11% 0 0);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 10px 0;
    font-size: 0.93rem;
    width: 100%;
  }

  .nav-side { gap: 10px; }

  .hero,
  .support-section {
    width: calc(100% - 32px);
  }

  .hero-copy {
    padding: 28px 24px 32px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn { width: 100%; }

  /* Tres rotulos por extenso nao cabem num telefone estreito. A barra rola
     dentro dela mesma — o que nao pode e a PAGINA ganhar rolagem lateral. */
  .sort-bar {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sort-bar::-webkit-scrollbar { display: none; }

  .sort-chip {
    flex: 0 0 auto;
    padding: 7px 12px;
    font-size: 0.68rem;
  }

  .feature-modal { padding: 10px; }

  .feature-modal__header,
  .feature-modal__toolbar,
  .feature-modal__body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .feature-list { grid-template-columns: 1fr; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    width: calc(100% - 32px);
  }
}

/* ─── Reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-dot { animation: none; }
  .panel-marquee__track { animation-duration: 80s !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Live execution counter
   ══════════════════════════════════════════════════════════════════════════
   A STRIP, not a panel. This is supporting information sitting under a hero
   that already owns the page — the first version was ~370px tall for three
   numbers and read as a second hero competing with the first.

   Monochrome like the rest of the brand. The only colour is the live dot,
   same rule as the status pills: colour is allowed when it MEANS something.
   Here it means "this number is moving".

   Numbers use tabular figures. Without them every digit has its own width, so
   a counter animating up to 1,284 visibly jitters as it climbs — the one place
   proportional digits actively look broken. */

.pulse {
  max-width: 1120px;
  margin: 0 auto 72px;
  padding: 22px 28px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.pulse__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pulse__live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.pulse__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--st-ok);
  animation: pulse-beat 2.4s var(--ease-out) infinite;
}

@keyframes pulse-beat {
  0%   { box-shadow: 0 0 0 0   oklch(74% 0.16 150 / 0.5); }
  70%  { box-shadow: 0 0 0 7px oklch(74% 0.16 150 / 0); }
  100% { box-shadow: 0 0 0 0   oklch(74% 0.16 150 / 0); }
}

.pulse__since {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--faint);
  margin: 0;
}

/* ── numbers on the left, sparkline on the right, one line ── */
.pulse__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.pulse__figures {
  display: flex;
  gap: clamp(28px, 5vw, 56px);
}

.pulse__figure {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pulse__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  transition: color 420ms var(--ease-out);
}

/* Flash when a figure moves while somebody is looking at the page. That
   instant — a stranger, somewhere, running the script — is the only reason to
   put a live counter on a site instead of a screenshot. */
.pulse__value.is-bumped {
  color: var(--st-ok);
  transition: none;
}

.pulse__label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ── sparkline ── */
.pulse__chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.pulse__spark {
  display: block;
  width: 168px;
  height: 30px;
}

/* Faint full-height track behind every day, so an empty stretch reads as
   "quiet days" instead of "the chart failed to draw". Early on, most of these
   ARE zero — the structure is what keeps that from looking broken. */
.pulse__spark .track { fill: var(--bg-card-alt); }
.pulse__spark .bar   { fill: var(--line-mid); }
.pulse__spark .bar.today { fill: var(--accent-dim); }

/* Range switcher. Doubles as the chart's caption — a separate "LAST 14 DAYS"
   label under buttons that already say 14D would be the same word twice. */
.pulse__ranges {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-deep);
}

.pulse__range {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: color var(--t), background var(--t);
}

.pulse__range:hover { color: var(--muted); }

.pulse__range.is-active {
  background: var(--accent-sub);
  color: var(--text);
}

/* ── per-script bars, in columns so one script does not span the page ── */
.pulse__scripts {
  list-style: none;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 32px;
}

.pulse__script {
  display: grid;
  grid-template-columns: minmax(72px, 104px) 1fr auto;
  align-items: center;
  gap: 12px;
}

.pulse__script-name {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse__script-track {
  height: 4px;
  border-radius: 999px;
  background: var(--bg-card-alt);
  overflow: hidden;
}

.pulse__script-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-dim);
  width: 0;
  transition: width 900ms var(--ease-out);
}

.pulse__script-count {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
  text-align: right;
}

@media (max-width: 720px) {
  .pulse {
    padding: 20px 18px 18px;
    margin-bottom: 56px;
  }
  .pulse__row { gap: 20px; }
  .pulse__figures { gap: 24px; width: 100%; justify-content: space-between; }
  .pulse__chart { align-items: flex-start; width: 100%; }
  .pulse__spark { width: 100%; }
  .pulse__value { font-size: 24px; }
}

/* Someone who asked for less motion still gets the numbers — just without the
   heartbeat, the count-up and the bar sweep. */
@media (prefers-reduced-motion: reduce) {
  .pulse__dot { animation: none; }
  .pulse__script-fill { transition: none; }
  .pulse__value { transition: none; }
}
