/* Magnety landing. The tokens copy the dashboard's (packages/config/tailwind/preset.css), so the
   surface, the buttons and the focus ring are the same from magnety.pro to the sign-in screens.
   Near-black lettering and one lime signal colour: lime fills actions and never carries text on a
   light surface. Fonts are self-hosted (SIL OFL, see fonts/OFL.txt); nothing loads from other
   origins. No inline styles anywhere: the CSP refuses them, so every state lives in a class. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/fonts/bricolage-grotesque-latin-opsz.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/hanken-grotesk-latin-wght.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallbacks (the values next/font computes for the dashboard): no layout shift
   while the real fonts arrive. */
@font-face {
  font-family: 'Bricolage Fallback';
  src: local('Arial');
  ascent-override: 88.21%;
  descent-override: 25.61%;
  line-gap-override: 0%;
  size-adjust: 105.43%;
}

@font-face {
  font-family: 'Hanken Fallback';
  src: local('Arial');
  ascent-override: 99.07%;
  descent-override: 30.02%;
  line-gap-override: 0%;
  size-adjust: 100.94%;
}

:root {
  color-scheme: light;

  --background: oklch(0.978 0.003 250);
  --card: #ffffff;
  --foreground: oklch(0.18 0.006 265);
  --muted: oklch(0.955 0.004 250);
  --muted-foreground: oklch(0.46 0.012 260);
  --border: oklch(0.91 0.005 250);
  --input: oklch(0.86 0.008 250);
  --primary: oklch(0.873 0.191 136.8);
  --primary-foreground: oklch(0.17 0.02 140);
  --accent: oklch(0.96 0.06 136);
  --accent-foreground: oklch(0.38 0.11 142);
  --link: oklch(0.45 0.14 142);
  --ink: oklch(0.17 0.005 265);
  --ink-raised: oklch(0.24 0.007 265);
  --ink-border: oklch(0.28 0.007 265);
  --ink-muted: oklch(0.72 0.01 260);
  --ink-foreground: oklch(0.96 0.004 250);
  --entry-bg: #e0f2fe;
  --entry-fg: #0c4a6e;
  --published: #10b981;
  --status-bg: #ecfdf5;
  --status-fg: #064e3b;

  --font-display: 'Bricolage Grotesque', 'Bricolage Fallback', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', 'Hanken Fallback', system-ui, sans-serif;

  --h1: clamp(2.5rem, 1.5rem + 3.6vw, 3.5rem);
  --h2: clamp(2rem, 1.35rem + 2.4vw, 2.75rem);
  --h3: clamp(1.1875rem, 1.05rem + 0.45vw, 1.375rem);
  --text-lg: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  --text-base: 1.0625rem;
  --text-sm: 0.9375rem;
  --text-xs: 0.8125rem;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --section-y: clamp(48px, 6.5vw, 96px);
  --gutter: clamp(20px, 5vw, 64px);
  --content: 1160px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  --shadow-card: 0 1px 2px rgb(16 18 20 / 0.05), 0 4px 12px -4px rgb(16 18 20 / 0.08);
  --shadow-float: 0 2px 6px rgb(16 18 20 / 0.05), 0 24px 56px -24px rgb(16 18 20 / 0.28);
  --shadow-button: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 1px 2px rgb(16 18 20 / 0.08);
}

@media (max-width: 719.98px) {
  :root {
    --text-base: 1rem;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted-foreground: oklch(0.38 0.012 260);
    --border: oklch(0.8 0.008 250);
  }
}

/* Base */

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Unhinted glyph advances. With hinting, Chromium on Linux rounds each advance to a whole pixel
     and Hanken's «f» opens a visible gap at 13-16 px («of erta»); macOS and iOS already render
     this way. Kerning and ligatures stay on. */
  text-rendering: geometricPrecision;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  text-wrap: balance;
}

h1 {
  font-size: var(--h1);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}

h2 {
  font-size: var(--h2);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: 800;
  max-width: 22ch;
}

h3 {
  font-size: var(--h3);
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 700;
}

p {
  margin: 0;
  max-width: 62ch;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

a {
  color: inherit;
}

strong {
  font-weight: 600;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

.on-ink :focus-visible {
  outline-color: var(--primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-12 {
  width: 12px;
  height: 12px;
}

.icon-14 {
  width: 14px;
  height: 14px;
}

.icon-16 {
  width: 16px;
  height: 16px;
}

.icon-20 {
  width: 20px;
  height: 20px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--ink-foreground);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 10px;
  outline-color: var(--primary);
}

/* Buttons and links */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms ease-out,
    transform 100ms ease-out;
}

.button-large {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1.0625rem;
}

.button-small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.9375rem;
}

.button-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-button);
}

.button-primary:active {
  background: color-mix(in oklab, var(--primary), black 10%);
}

@media (hover: hover) {
  .button-primary:hover {
    background: color-mix(in oklab, var(--primary), black 6%);
  }

  .button-primary:hover:active {
    background: color-mix(in oklab, var(--primary), black 10%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button:active {
    transform: scale(0.97);
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--input);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  transition: text-decoration-color 120ms ease-out;
}

@media (hover: hover) {
  .text-link:hover {
    text-decoration-color: currentColor;
  }
}

/* Header: one opaque row, no script. */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 55px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: var(--r-sm);
}

.brand img {
  width: auto;
  height: 22.5px;
}

.top-nav {
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.top-login {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--foreground);
  border-radius: var(--r-sm);
}

@media (hover: hover) {
  .top-login:hover {
    text-decoration: underline;
    text-underline-offset: 5px;
  }
}

@media (max-width: 429.98px) {
  .top-cta-extra {
    display: none;
  }

  .top-actions .button-small {
    padding: 0 12px;
  }
}

@media (max-width: 373.98px) {
  .top-login {
    display: none;
  }
}

@media (min-width: 720px) {
  .top-inner {
    gap: 12px;
    height: 63px;
  }

  .brand img {
    height: 28px;
  }
}

@media (min-width: 960px) {
  .top-nav {
    display: flex;
    gap: 4px;
    margin-inline: auto;
  }

  .top-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--r-md);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 120ms ease-out;
  }

  .top-actions {
    margin-left: 0;
  }
}

@media (hover: hover) {
  .top-nav a:hover {
    color: var(--foreground);
  }
}

/* Sections */

main [id] {
  scroll-margin-top: 80px;
}

.band {
  padding-block: var(--section-y);
}

.band-white {
  background: var(--card);
}

.band-ink {
  background: var(--ink);
  color: var(--ink-foreground);
}

.section-head > * + * {
  margin-top: var(--s-5);
}

.lead {
  max-width: 52ch;
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--muted-foreground);
}

.note {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: none;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.45;
  color: var(--accent-foreground);
}

.eyebrow-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--accent-foreground);
  transform: translateY(-1px);
}

.cta-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-3);
}

.cta-row .note {
  text-align: center;
}

@media (min-width: 720px) {
  .cta-row {
    flex-direction: row;
    align-items: center;
    gap: var(--s-5);
  }

  .cta-row .note {
    text-align: left;
  }
}

/* Mock windows: HTML/CSS renderings of the real UI at 1:1, sized in px on purpose. */

.window {
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

figcaption {
  margin-top: var(--s-3);
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--published);
}

.dot-idle {
  background: color-mix(in oklab, var(--muted-foreground) 60%, transparent);
}

.sk {
  display: block;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--muted);
}

/* Meta event chips: one shape everywhere, tinted when sent, never solid lime. */

.events {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--foreground);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--input);
}

.event-name {
  font-weight: 500;
  color: var(--muted-foreground);
}

.event-name::before {
  content: '·\00a0';
}

.event.is-sent {
  background: var(--accent);
  border-color: color-mix(in oklab, var(--accent-foreground) 25%, transparent);
}

.event.is-sent .event-dot {
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--accent-foreground);
}

.on-ink .event {
  background: var(--ink-raised);
  border-color: var(--ink-border);
  color: var(--ink-foreground);
}

.on-ink .event-name {
  color: var(--ink-muted);
}

/* 1. Hero */

.hero {
  padding-block: 20px var(--section-y);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.hero h1 {
  margin-top: 12px;
}

.hero .lead {
  margin-top: 16px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 24px;
}

.hero-actions .text-link {
  align-self: flex-start;
}

.hero .note {
  margin-top: 2px;
}

@media (min-width: 720px) {
  .hero h1 {
    margin-top: 16px;
  }

  .hero .lead {
    margin-top: 24px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-top: 32px;
  }

  .hero .note {
    margin-top: 16px;
  }

  .map-demo {
    max-width: 720px;
  }
}

@media (min-width: 1180px) {
  .hero {
    padding-top: 72px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 540px;
    gap: 40px;
    align-items: center;
  }
}

/* A5.1 The funnel map demo */

.map-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.map-crumb {
  display: none;
  font-size: 13px;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.map-name {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--status-bg);
  color: var(--status-fg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.map-bar-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.mini-outline {
  border: 1px solid var(--input);
  background: var(--card);
  color: var(--foreground);
}

.mini-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.map-stage {
  display: flex;
  justify-content: center;
  padding: 14px;
  background-color: var(--background);
}

.map-canvas {
  display: none;
  position: relative;
  flex-shrink: 0;
  width: 488px;
  height: 340px;
}

@media (min-width: 720px) {
  .map-bar {
    flex-wrap: nowrap;
    min-height: 56px;
    padding: 0 16px;
  }

  .map-crumb {
    display: inline;
  }

  .map-bar-actions {
    width: auto;
    margin-left: auto;
  }

  .map-stage {
    padding: 28px 20px;
    background-image: radial-gradient(circle, var(--input) 1px, transparent 1.3px);
    background-size: 16px 16px;
  }

  .map-canvas {
    display: block;
  }

  .map-stage .map-list {
    display: none;
  }
}

.map-arrows {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.map-route {
  fill: none;
  stroke: color-mix(in oklab, var(--muted-foreground) 55%, transparent);
  stroke-width: 1.75;
  stroke-linecap: round;
}

.map-head {
  fill: color-mix(in oklab, var(--muted-foreground) 55%, transparent);
}

.map-route-lit {
  stroke: var(--link);
  stroke-width: 2.25;
  opacity: 0;
}

.map-route-lit.is-lit {
  opacity: 1;
}

.map-head.is-lit {
  fill: var(--link);
}

.map-entry {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--entry-bg);
  color: var(--entry-fg);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.map-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--border),
    0 1px 2px rgb(16 18 20 / 0.06);
}

.map-card-a {
  left: 0;
  top: 36px;
  width: 232px;
  height: 236px;
}

.map-card-b {
  left: 296px;
  top: 36px;
  width: 192px;
  height: 146px;
}

.map-card-c {
  left: 296px;
  top: 206px;
  width: 192px;
  height: 130px;
}

.map-card.is-arrived {
  box-shadow:
    0 0 0 2px var(--link),
    0 1px 2px rgb(16 18 20 / 0.06);
}

.mc-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 94px;
  padding: 12px 14px;
}

.map-card-a .mc-body {
  height: 124px;
}

.mc-name {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-addr {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--link);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.mc-addr span,
.mc-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted-foreground);
}

.mc-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin-top: 2px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: var(--muted);
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
}

.mc-routes {
  margin: 0 8px;
  padding: 6px 0;
}

.mc-routes-head {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 6px;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mc-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--r-md);
  color: var(--foreground);
  font-size: 13px;
}

.mc-row .icon {
  color: var(--muted-foreground);
}

.mc-row strong {
  font-weight: 600;
}

.mc-row .icon-lock {
  margin-left: -2px;
}

.mc-row.is-active {
  background: var(--accent);
  color: var(--accent-foreground);
}

.mc-row.is-active .icon {
  color: currentColor;
}

.mc-handle {
  position: absolute;
  top: 50%;
  right: -12px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--muted-foreground);
  box-shadow: 0 0 0 1.5px var(--card);
}

.mc-port {
  position: absolute;
  left: -5px;
  top: 18px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--muted-foreground);
  border-radius: 50%;
  background: var(--card);
}

.mc-note {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 14px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  background: color-mix(in oklab, var(--muted) 50%, transparent);
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 16px;
}

.mc-note-end {
  height: 36px;
}

.map-dot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow:
    0 0 0 3px var(--card),
    0 0 0 4px var(--link);
  transform: translate(289px, 52px);
  pointer-events: none;
}

/* Phone: the product's own list of cards instead of the canvas. */

.map-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.ml-label {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ml-label + .ml-card {
  margin-top: -2px;
}

.ml-card + .ml-label {
  margin-top: 6px;
}

.ml-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.ml-card.is-arrived {
  border-color: var(--link);
  box-shadow: 0 0 0 1px var(--link);
}

.ml-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
}

.ml-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 22px;
}

.ml-addr {
  overflow: hidden;
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ml-status {
  color: var(--muted-foreground);
  font-size: 13px;
}

.ml-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
}

.ml-rows-head {
  padding: 4px 8px 2px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.ml-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.3;
}

.ml-row strong {
  font-weight: 600;
}

.ml-arrow {
  color: var(--muted-foreground);
}

.ml-row.is-active {
  background: var(--accent);
  color: var(--accent-foreground);
}

.ml-row.is-active .ml-arrow {
  color: currentColor;
}

.ml-note {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.4;
}

/* The events row under the stage: real content, outside the aria-hidden picture. */

.map-events {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.map-events .events {
  grid-column: 1 / -1;
  grid-row: 2;
}

.map-events-label {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-toggle {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--foreground);
  font: inherit;
  cursor: pointer;
}

.demo-toggle[hidden] {
  display: none;
}

/* Desktop: the pause control sits beside the chips, which have room for two rows. */
@media (min-width: 720px) {
  .map-events-label {
    grid-column: 1 / -1;
  }

  .map-events .events {
    grid-column: 1;
  }

  .demo-toggle {
    grid-row: 2;
    margin-block: -7px 0;
  }
}

.demo-toggle-face {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: var(--r-md);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 120ms ease-out;
}

@media (hover: hover) {
  .demo-toggle:hover .demo-toggle-face {
    background: var(--muted);
  }
}

.demo-toggle:focus-visible {
  outline: none;
}

.demo-toggle:focus-visible .demo-toggle-face {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.demo-toggle .icon {
  display: none;
}

.demo-toggle[data-state='playing'] .icon-pause,
.demo-toggle[data-state='paused'] .icon-play,
.demo-toggle[data-state='ended'] .icon-replay {
  display: block;
}

#map-demo-caption {
  margin-top: 12px;
}

/* The demo's colour changes; only colours, opacity, transforms and stroke offsets move. */
@media (prefers-reduced-motion: no-preference) {
  .event,
  .event-dot,
  .mc-row,
  .ml-row,
  .ml-card {
    transition:
      background-color 200ms ease-out,
      border-color 200ms ease-out,
      color 200ms ease-out,
      box-shadow 200ms ease-out;
  }

  .map-card {
    transition: box-shadow 200ms ease-out;
  }

  .map-head {
    transition: fill 200ms ease-out;
  }

  .map-demo.is-resetting .map-route-lit {
    transition: opacity 200ms ease-out;
  }
}

/* 2. «Así se monta» */

.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  margin-top: 40px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 16px;
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1;
}

.step h3 {
  padding-top: 7px;
}

.step p {
  margin-top: 6px;
  color: var(--muted-foreground);
}

.h-line {
  display: inline-block;
}

@media (min-width: 1180px) {
  .build-grid {
    grid-template-columns: minmax(0, 1fr) 560px;
    column-gap: 64px;
    row-gap: 0;
    margin-top: 56px;
  }

  .build-steps {
    grid-area: 1 / 1;
  }

  .chat-demo {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .build-cta {
    grid-area: 2 / 1;
    align-self: start;
    margin-top: 40px;
  }
}

/* A5.2 The Chat con IA mock */

.chat-window {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.chat-seg {
  display: flex;
  gap: 2px;
  margin: 12px 12px 0;
  padding: 3px;
  border-radius: var(--r-md);
  background: var(--muted);
}

.chat-seg span {
  flex: 1;
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: 8px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
}

.chat-seg .is-selected {
  background: var(--card);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgb(16 18 20 / 0.08);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-head,
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}

.chat-head {
  display: none;
  font-size: 14px;
  font-weight: 700;
}

/* Anchored to the composer, as a chat with one turn looks: any spare height sits above it. */
.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px;
}

.bubble-user {
  align-self: flex-end;
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 12px 12px 4px 12px;
  background: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.chat-who {
  margin-bottom: -6px;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.chat-changes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.chat-changes-title {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-changes li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.chat-changes li .icon {
  color: var(--link);
  stroke-width: 2.25;
}

.chat-undo {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  margin-top: 2px;
  margin-left: -6px;
  padding: 0 6px;
  border-radius: var(--r-sm);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
}

.chat-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border);
}

.composer-box {
  height: 40px;
  line-height: 38px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid var(--input);
  border-radius: var(--r-md);
  color: var(--muted-foreground);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill-outline {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
}

.send-circle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}

.chat-preview {
  display: none;
  flex-direction: column;
  min-width: 0;
}

.preview-label {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preview-bar .mini-button {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.preview-area {
  flex: 1;
  padding: 14px;
  background: var(--background);
}

.preview-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--border);
}

.pv-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.pv-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -2px;
}

.sk-90 {
  width: 90%;
}

.sk-80 {
  width: 80%;
}

.sk-70 {
  width: 70%;
}

.sk-60 {
  width: 60%;
}

.pv-video {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.pv-video .icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
  stroke-width: 1;
}

.pv-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv-benefits li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-benefits .sk {
  flex: 1;
}

.pv-bullet {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.pv-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.pv-question {
  font-size: 13px;
  font-weight: 700;
}

.pv-options {
  display: flex;
  gap: 6px;
}

.pv-options span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.pv-next {
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

@media (min-width: 720px) {
  .chat-window {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .chat-seg {
    display: none;
  }

  .chat-head {
    display: flex;
  }

  .chat-panel {
    border-right: 1px solid var(--border);
  }

  .chat-preview {
    display: flex;
  }
}

@media (min-width: 1180px) {
  .chat-window {
    width: 560px;
  }
}

/* 3. The map band (ink) */

.map-band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
}

.map-band h2 {
  color: var(--ink-foreground);
}

.map-band .lead {
  margin-top: var(--s-5);
  color: var(--ink-muted);
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.checks li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 12px;
  color: var(--ink-muted);
}

.checks li .icon {
  margin-top: 3px;
  color: var(--primary);
  stroke-width: 2.25;
}

.checks p {
  max-width: 56ch;
}

.checks strong {
  color: var(--ink-foreground);
  font-weight: 600;
}

.map-band figcaption {
  color: var(--ink-muted);
}

.pages-head {
  color: var(--ink-foreground);
}

.pages-sub {
  margin-top: 6px;
  color: var(--ink-muted);
}

.pages-demo {
  margin-top: 20px;
}

@media (min-width: 1180px) {
  .map-band-grid {
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 64px;
    align-items: center;
  }
}

/* A5.3 The Páginas mock: a light window on ink */

.pages-window {
  padding: 20px;
  border-color: transparent;
}

.pg-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.pg-desc {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.4;
}

.pg-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.pg-groups span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.pg-groups .is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.pg-help {
  margin-top: 10px;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.4;
}

.pg-rows {
  margin-top: 14px;
}

.pg-rows li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.pg-rows li:last-child {
  padding-bottom: 0;
}

.pg-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.mc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.35;
}

/* 4. «Medición»: the rail from the click to the sale */

.rail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.rail-step {
  position: relative;
  padding-left: 48px;
}

/* Phone: one line runs down the left, through the numeral circles. */
.rail-step::before {
  content: '';
  position: absolute;
  left: 15.5px;
  top: 32px;
  bottom: -28px;
  width: 1px;
  background: var(--border);
}

.rail-step:last-child::before {
  display: none;
}

.rail-num {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
}

.rail-step h3 {
  padding-top: 3px;
}

.rail-step p {
  margin-top: 8px;
  color: var(--muted-foreground);
}

.rail-step .events {
  margin-top: 12px;
}

@media (min-width: 720px) {
  .rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 32px;
  }

  .rail-step {
    padding-left: 0;
    padding-top: 48px;
  }

  .rail-step::before {
    display: none;
  }
}

@media (min-width: 1180px) {
  .rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }

  /* Desktop: one line joins the numeral circles. */
  .rail-step::before {
    display: block;
    left: 44px;
    right: -20px;
    top: 15.5px;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .rail-step:last-child::before {
    display: none;
  }
}

.compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.compare-side {
  margin-top: 8px;
}

@media (min-width: 1180px) {
  .compare-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    column-gap: 64px;
  }

  .compare-title {
    grid-area: 1 / 1;
  }

  .compare-grid .compare-wrap {
    grid-area: 2 / 1;
    max-width: none;
  }

  .compare-side {
    grid-area: 2 / 2;
    align-self: start;
    margin-top: 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
}

/* Positioned so the sr-only answers inside scroll with the table instead of widening the page. */
.compare-wrap {
  position: relative;
  max-width: 760px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
}

.compare {
  width: 100%;
  min-width: 340px;
  border-collapse: collapse;
  font-size: var(--text-sm);
  line-height: 1.4;
}

.compare th,
.compare td {
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

.compare thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted-foreground);
  line-height: 1.3;
}

.compare thead .compare-us {
  color: var(--foreground);
  font-weight: 700;
}

.compare tbody th {
  font-weight: 500;
}

.compare tbody tr {
  border-top: 1px solid var(--border);
}

/* Phone: the row headers get half the width, so the rows stay short, and the column headers
   keep three lines at most. */
.compare tbody th {
  width: 52%;
}

.compare td {
  width: 24%;
  padding-inline: 8px;
  text-align: center;
}

.compare thead th[scope='col'] {
  padding-inline: 6px;
}

@media (min-width: 720px) {
  .compare th,
  .compare td {
    padding: 14px 16px;
  }

  .compare tbody th {
    width: auto;
  }

  .compare td {
    width: 12rem;
    padding-inline: 16px;
  }

  .compare thead th[scope='col'] {
    padding-inline: 16px;
  }
}

.compare thead th[scope='col'] {
  text-align: center;
}

.compare .compare-us {
  background: var(--accent);
}

.compare .icon {
  margin-inline: auto;
  color: var(--link);
  stroke-width: 2.5;
}

.compare-no {
  color: var(--muted-foreground);
}

.measure-events {
  margin-top: 12px;
  color: var(--muted-foreground);
}

/* 5. «Reproductor» */

.player-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.feature {
  padding-block: 18px;
  border-top: 1px solid var(--border);
}

.feature:first-child {
  border-top: 0;
  padding-top: 8px;
}

.feature h3 {
  font-size: 1.1875rem;
}

.feature p {
  margin-top: 8px;
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.bars {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.bar-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: var(--text-xs);
  font-weight: 600;
}

.bar-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--muted);
}

.bar-track::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: var(--r-pill);
  background: var(--link);
}

.bar-soft::after {
  width: 38%;
}

.bar-medium::after {
  width: 55%;
}

.bar-strong::after {
  width: 72%;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .feature,
  .feature:first-child {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--card);
  }
}

/* Tablets and small laptops: the mocks keep a readable size instead of spanning the column. */
@media (min-width: 720px) and (max-width: 1179.98px) {
  .chat-demo,
  .player-demo,
  .chart-card {
    max-width: 640px;
  }
}

@media (min-width: 1180px) {
  .player-grid {
    grid-template-columns: 520px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
}

/* A5.4 The player demo: plays only when asked */

.player-window {
  padding: 20px;
}

.demo-title {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.player {
  overflow: hidden;
  border-radius: 10px;
  background: var(--ink);
}

.player-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 20% 10%, oklch(0.36 0.02 265) 0, transparent 55%),
    radial-gradient(90% 80% at 85% 100%, oklch(0.42 0.09 140) 0, transparent 60%), var(--ink);
}

.player-glyph {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.16);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22);
  color: #fff;
  transition: opacity 200ms ease-out;
}

.player-glyph .icon {
  width: 22px;
  height: 22px;
  margin-left: 3px;
  fill: currentColor;
  stroke-width: 1;
}

.player-demo.is-playing .player-glyph {
  opacity: 0;
}

.player-time {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.player-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.player-bar {
  position: relative;
  height: 8px;
  background: rgb(255 255 255 / 0.14);
}

.player-bar-fill {
  position: absolute;
  inset: 0;
  background: var(--primary);
  transform: scaleX(0.62);
  transform-origin: left center;
}

.player-bar-pitch {
  position: absolute;
  left: 62%;
  top: -3px;
  width: 2px;
  height: 14px;
  background: #fff;
}

.demo-offer {
  display: grid;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px dashed var(--input);
  border-radius: 10px;
  background: var(--background);
  transition: border-color 300ms ease-out;
}

.offer-wait,
.offer-content {
  grid-area: 1 / 1;
}

.offer-wait {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.offer-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 300ms ease-out,
    visibility 0s 300ms;
}

.demo-offer.is-revealed {
  border-style: solid;
  border-color: var(--link);
}

.demo-offer.is-revealed .offer-wait {
  visibility: hidden;
}

.demo-offer.is-revealed .offer-content {
  visibility: visible;
  opacity: 1;
  transition: opacity 300ms ease-out;
}

.offer-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.offer-content .button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 4px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--foreground);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--input);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  cursor: pointer;
}

.text-button[hidden] {
  display: none;
}

.text-button .icon {
  fill: currentColor;
  stroke-width: 1;
}

@media (hover: hover) {
  .text-button:hover {
    text-decoration-color: currentColor;
  }
}

.player-demo .text-button:not([hidden]) + figcaption {
  margin-top: 0;
}

/* Analytics */

.analytics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 28px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

@media (min-width: 720px) {
  .analytics {
    margin-top: 48px;
    padding-top: 48px;
  }
}

.h3-large {
  font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.024em;
  line-height: 1.1;
  max-width: 24ch;
}

.analytics-copy p {
  margin-top: 20px;
  color: var(--muted-foreground);
}

.analytics-more {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.analytics-more li {
  max-width: 62ch;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.analytics-more strong {
  color: var(--foreground);
}

.chart-card {
  padding: 16px 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
}

.chart {
  position: relative;
}

.chart svg {
  width: 100%;
  height: auto;
}

.chart .grid line {
  stroke: var(--border);
  stroke-width: 1;
}

.chart .area {
  fill: url(#retention-fill);
}

.chart .line {
  fill: none;
  stroke: var(--foreground);
  stroke-width: 3;
  stroke-linecap: round;
}

.chart .pitch {
  stroke: var(--link);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.chart .drop {
  fill: var(--card);
  stroke: var(--foreground);
  stroke-width: 2.5;
}

.chart-label {
  position: absolute;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.chart-label-offer {
  left: 67%;
  top: 9%;
  color: var(--accent-foreground);
}

.chart-label-drop1 {
  left: 25.5%;
  top: 27%;
}

.chart-label-drop2 {
  left: 45.5%;
  top: 41%;
}

.chart-axis-start {
  left: 6%;
  bottom: 0;
}

.chart-axis-end {
  right: 3%;
  bottom: 0;
}

.chart-card figcaption {
  margin-top: 10px;
}

@media (max-width: 719.98px) {
  .chart-label-offer {
    left: 58%;
    top: 0;
  }

  .chart-label-drop1 {
    left: 26%;
    top: 16%;
  }

  .chart-label-drop2 {
    left: 21%;
    top: 55%;
  }
}

@media (min-width: 1180px) {
  .analytics {
    grid-template-columns: minmax(0, 1fr) 560px;
    gap: 64px;
    align-items: center;
  }
}

/* 6. «Calculadora» */

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 40px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Label above its value until the panel is wide enough to put them on one line. */
.calc-field-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.calc-field label {
  font-weight: 600;
}

.calc-field output {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.calc input[type='range'] {
  --fill: 50%;
  display: block;
  width: 100%;
  height: 44px;
  margin: 4px 0 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.calc #cpl {
  --fill: 11.2%;
}

.calc input[type='range']::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--link) 0 var(--fill), var(--muted) var(--fill) 100%);
}

.calc input[type='range']::-moz-range-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--link) 0 var(--fill), var(--muted) var(--fill) 100%);
}

.calc input[type='range']::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border: 2px solid var(--link);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-card);
  -webkit-appearance: none;
  appearance: none;
}

.calc input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid var(--link);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.calc input[type='range']:focus-visible {
  outline: none;
}

.calc input[type='range']:focus-visible::-webkit-slider-thumb {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

.calc input[type='range']:focus-visible::-moz-range-thumb {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

.calc-if {
  font-size: var(--text-sm);
  font-weight: 600;
}

.calc-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.calc-rows li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
}

.calc-number {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.calc-label {
  font-weight: 500;
  line-height: 1.35;
  text-wrap: balance;
}

.calc-rows .calc-highlight {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* The note and the call to action run under both columns, so the two columns end together. */
.calc-foot {
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.calc-foot .cta-row {
  margin-top: 20px;
}

@media (min-width: 720px) {
  .calc {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px 48px;
  }

  .calc-foot {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1180px) {
  .calc-field-head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
  }

  /* Every result reads the same way: the number, then its label on the number's baseline. The
     subgrid gives all three rows one number column, as wide as the widest number. */
  .calc-rows {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px 18px;
  }

  .calc-rows li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    column-gap: 18px;
    align-items: baseline;
  }

  .calc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
  }

  .calc-foot .cta-row {
    flex-shrink: 0;
    margin-top: 0;
  }
}

@media (forced-colors: active) {
  .calc input[type='range'] {
    -webkit-appearance: auto;
    appearance: auto;
  }
}

/* 7. «Todo incluido» */

.included {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 40px;
  margin-top: 32px;
}

.included li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-content: start;
  column-gap: 16px;
  padding-block: 18px;
  border-top: 1px solid var(--border);
}

.included-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--muted);
  color: var(--ink);
}

.included h3 {
  padding-top: 8px;
  font-size: 1.1875rem;
}

.included p {
  margin-top: 4px;
  color: var(--muted-foreground);
}

@media (min-width: 560px) {
  .included {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .included {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 8. «Preguntas» */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:focus-visible {
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.faq summary .icon {
  color: var(--muted-foreground);
}

.faq .icon-minus,
.faq details[open] .icon-plus {
  display: none;
}

.faq details[open] .icon-minus {
  display: block;
}

.faq details p {
  padding-bottom: 20px;
  color: var(--muted-foreground);
}

@media (min-width: 1180px) {
  .faq-grid {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }

  .faq-grid h2 {
    position: sticky;
    top: 96px;
  }
}

/* 9. The final call */

.cta {
  margin-inline: max(var(--gutter), calc((100% - var(--content)) / 2));
  margin-bottom: var(--section-y);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 72px);
  border-radius: var(--r-xl);
  background: var(--ink);
  color: var(--ink-foreground);
  text-align: center;
}

.cta h2 {
  margin-inline: auto;
  color: var(--ink-foreground);
}

.cta p {
  margin: 16px auto 0;
  color: var(--ink-muted);
  font-size: var(--text-lg);
}

.cta .button {
  width: 100%;
  margin-top: 32px;
}

@media (min-width: 720px) {
  .cta .button {
    width: auto;
  }
}

/* 10. Footer */

.foot {
  border-top: 1px solid var(--border);
}

.foot-inner {
  padding-block: 48px;
}

.foot-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.foot-brand img {
  align-self: flex-start;
  width: auto;
  height: 22px;
}

.foot-brand p {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}

.foot nav {
  display: flex;
  gap: 20px;
  margin-left: -2px;
}

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--input);
  text-underline-offset: 5px;
}

@media (hover: hover) {
  .foot nav a:hover {
    text-decoration-color: currentColor;
  }
}

.foot-legal {
  margin-top: 24px;
  color: var(--muted-foreground);
  font-size: var(--text-xs);
}

@media (min-width: 720px) {
  .foot-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  /* The links' 44 px hit area is centred on the 22 px logo. */
  .foot nav {
    margin-top: -11px;
  }
}

/* Accessibility modes */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}

@media (forced-colors: active) {
  .event,
  .button,
  .feature,
  .window,
  .map-card,
  .ml-card,
  .calc,
  .cta,
  .mini-button,
  .status-pill {
    border: 1px solid CanvasText;
  }

  .event.is-sent,
  .mc-row.is-active,
  .ml-row.is-active,
  .map-card.is-arrived,
  .ml-card.is-arrived,
  .calc-rows .calc-highlight {
    outline: 2px solid Highlight;
    outline-offset: 1px;
  }

  .map-route,
  .map-route-lit.is-lit {
    stroke: CanvasText;
  }

  .map-head,
  .map-head.is-lit {
    fill: CanvasText;
  }

  .map-dot,
  .bar-track::after,
  .player-bar-fill {
    background: Highlight;
  }
}

/* Legal pages (/privacidad/): plain reading width, the landing's own type. */
.legal {
  max-width: 46rem;
  padding-block: 3rem 4rem;
}
.legal h1 {
  font-family: var(--font-display);
  font-size: var(--h2);
  line-height: 1.1;
}
.legal h2 {
  font-family: var(--font-display);
  font-size: var(--h3);
  margin-top: 2rem;
}
.legal p,
.legal li {
  line-height: 1.6;
}
.legal ul {
  padding-left: 1.25rem;
}
.legal a {
  color: var(--link);
}
.legal-date {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}
