@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400..700&display=swap");

/* Alexis Parrón — componentes. Todo valor de color, espacio o radio sale de tokens.css. */

.ap-root, .ap-root * { box-sizing: border-box; }
.ap-root { background: var(--background); color: var(--foreground); font: 400 16px/1.65 var(--font-sans); }
:where(.ap-root) a { color: inherit; text-decoration: none; }
:where(.ap-root) :where(h1, h2, h3, p) { margin: 0; }
.ap-root ::selection { background: var(--yellow); color: var(--graphite); }
.ap-root a:focus-visible, .ap-root button:focus-visible, .ap-root summary:focus-visible {
  outline: var(--size-ring) solid var(--ring); outline-offset: var(--size-ring-offset);
}

/* Panel: un bloque en tema grafito. Pon data-theme="dark" en el mismo elemento. */
.ap-panel { background: var(--background); color: var(--foreground); padding: var(--space-panel); }

/* Brand: nombre + handle + firma 3×2 */
.ap-brand { display: inline-flex; gap: 21px; align-items: center; }
.ap-brand strong { display: block; font: 700 34px/1.05 var(--font-display); letter-spacing: -0.7px; }
.ap-brand .ap-handle { display: block; font: 12px var(--font-mono); color: var(--muted-foreground); margin-top: 5px; }
.ap-signature { display: grid; grid-template-columns: repeat(3, 6px); gap: 5px; }
.ap-signature i { height: 6px; background: var(--foreground); }
.ap-signature i:nth-child(2), .ap-signature i:last-child { background: var(--yellow); }
.ap-signature i:nth-child(3), .ap-signature i:nth-child(4) { opacity: 0.5; }

/* Header */
.ap-header { display: flex; align-items: center; gap: 36px; padding: 30px 0 26px; border-bottom: 1px solid var(--border-strong); }
.ap-header-rule { flex: 1; height: 1px; background: var(--border); }
.ap-nav { display: flex; gap: 27px; align-items: center; font-size: 14px; }
.ap-nav a { padding: 8px 0; }
.ap-nav a:hover { box-shadow: 0 2px 0 var(--yellow); }

/* Button */
.ap-button {
  min-height: var(--size-button); padding: 12px 23px; display: inline-flex; gap: 28px;
  justify-content: space-between; align-items: center; font: 600 15px/1.2 var(--font-sans);
  border: 1px solid var(--input); border-radius: var(--radius); background: transparent; color: var(--foreground);
  cursor: pointer; transition: background .2s, transform .2s;
}
.ap-button:hover { transform: translateY(-2px); }
.ap-button > span[aria-hidden] { font-size: 22px; line-height: 1; }
.ap-button--primary { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.ap-button--primary > span[aria-hidden] { color: var(--accent); }
.ap-button--outline:hover { background: var(--secondary); }
.ap-button--yellow { background: var(--yellow); color: var(--graphite); border-color: var(--yellow); }
.ap-button--yellow > span[aria-hidden] { color: var(--graphite); }
.ap-button--yellow:hover { background: var(--yellow-hover); }
[data-theme="dark"] .ap-button--primary > span[aria-hidden] { color: var(--graphite); }

/* Label, eyebrow, tag */
.ap-label { display: inline-block; background: var(--yellow); color: var(--graphite); padding: 8px 13px; font: 500 12px/1.4 var(--font-mono); letter-spacing: 1.5px; text-transform: uppercase; }
.ap-eyebrow { font: 12px/1.6 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; }
.ap-eyebrow--muted { color: var(--muted-foreground); }
.ap-eyebrow--accent { color: var(--yellow); }
.ap-tag { display: inline-block; font-size: 12px; border: 1px solid var(--border); padding: 2px 8px; white-space: nowrap; }

/* Highlight: subrayado de marcador inclinado */
.ap-highlight { position: relative; z-index: 0; white-space: nowrap; }
.ap-highlight::after {
  content: ""; position: absolute; z-index: -1; height: 18%; left: -5%; right: -8%; bottom: 6%;
  background: var(--yellow); transform: rotate(-3deg); border-radius: var(--radius-mark);
}

/* Section heading: etiqueta + ruta sobre un filete */
.ap-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; z-index: 0; }
.ap-section-heading::before { content: ""; position: absolute; z-index: -1; height: 1px; width: 100%; top: 50%; background: var(--border-strong); }
.ap-section-heading .ap-eyebrow { background: var(--background); padding-left: 20px; }
.ap-section-heading .ap-eyebrow span { margin: 0 10px; }

/* Card */
.ap-card { border: 1px solid var(--border); background: var(--card); color: var(--card-foreground); padding: var(--space-card-y) var(--space-card-x); }
.ap-card-topline { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 20px; }
.ap-card h3 { font: 600 34px/1.1 var(--font-display); letter-spacing: -0.4px; margin-bottom: 13px; }
.ap-card > p { max-width: 530px; color: var(--muted-foreground); }

/* Disclosure: details/summary con + que gira a × */
.ap-disclosure { border-top: 1px solid var(--border); }
.ap-disclosure > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 15px; cursor: pointer; padding: 15px 0; font-size: 14px; }
.ap-disclosure > summary::-webkit-details-marker { display: none; }
.ap-disclosure > summary > span[aria-hidden] { font-size: 22px; line-height: 1; transition: transform .2s; }
.ap-disclosure[open] > summary > span[aria-hidden] { transform: rotate(45deg); }
.ap-disclosure-body { padding: 2px 0 19px; color: var(--muted-foreground); font-size: 14px; line-height: 1.8; }
.ap-disclosure-body p + p { margin-top: 12px; }
.ap-disclosure-body strong { color: var(--foreground); }

/* Flow: pasos sobre retícula de puntos */
.ap-flow { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px 18px; font: 12px var(--font-mono);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 12px 12px; }
.ap-flow > span { padding: 14px 10px; border: 1px solid var(--border-strong); background: var(--background); text-align: center; }
.ap-flow > span.is-focus { background: var(--yellow); border-color: var(--yellow); color: var(--graphite); }
.ap-flow > b { font: 18px var(--font-mono); }
.ap-flow--vertical { flex-direction: column; gap: 2px; padding: 7px 0; background-size: var(--size-dot-grid) var(--size-dot-grid); }
.ap-flow--vertical > span { padding: 8px 20px; border-color: var(--process-border); }
.ap-flow--vertical > b { font-size: 12px; font-weight: 400; line-height: 1.3; color: var(--process-arrow); }

/* List item con cuadrado y flecha */
.ap-list-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ap-list-item > span:last-child { margin-left: auto; color: var(--foreground); }
[data-theme="dark"] .ap-list-item > span:last-child { color: var(--yellow); }
.ap-list-item small { display: block; font-size: 12px; color: var(--muted-foreground); margin-top: 3px; }
.ap-list-item .ap-square { width: 12px; height: 12px; border: 1px solid var(--foreground); margin-top: 6px; flex-shrink: 0; }
/* Metric */
.ap-metric { font: 700 100px/.95 var(--font-display); letter-spacing: -3px; }
.ap-metric > small { display: block; font: 500 25px var(--font-display); letter-spacing: 0; margin-bottom: 4px; }
.ap-metric .ap-percent { font-size: 65px; letter-spacing: -2px; }
.ap-count { display: flex; align-items: baseline; gap: 13px; font: 600 94px/1 var(--font-display); }
.ap-count > span { font: 500 30px var(--font-display); }

/* Text link */
.ap-text-link { display: inline-flex; align-items: center; gap: 24px; font-size: 14px; padding: 5px 0; border-bottom: 1px solid var(--border-strong); }
.ap-text-link:hover { box-shadow: 0 2px 0 var(--yellow); }

/* Social */
.ap-social { display: inline-flex; width: var(--size-social); height: var(--size-social); align-items: center; justify-content: center; border: 1px solid var(--border); transition: background .2s, border-color .2s; }
.ap-social svg { width: 16px; height: 16px; }
.ap-social:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-foreground); }

/* Consent banner */
.ap-consent { max-width: 420px; padding: 20px 22px; background: var(--inverse); color: var(--inverse-foreground); font-size: 14px; line-height: 1.6; box-shadow: var(--shadow-float); }
.ap-consent-title { font: 500 12px/1.4 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--yellow); margin-bottom: 8px; }
[data-theme="dark"] .ap-consent-title { color: var(--inverse-foreground); }
.ap-consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ap-consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.ap-consent-button { font: 600 14px var(--font-sans); min-height: var(--size-button-compact); padding: 10px 16px; border: 1px solid var(--inverse-foreground); background: transparent; color: var(--inverse-foreground); cursor: pointer; transition: background .2s, color .2s; }
.ap-consent-button:hover { background: var(--inverse-foreground); color: var(--inverse); }

/* Hand note */
.ap-hand-note { font: italic 17px var(--font-serif); transform: rotate(-4deg); display: inline-block; color: var(--muted-foreground); }
[data-theme="dark"] .ap-hand-note { color: var(--paper-note); }

@media (prefers-reduced-motion: reduce) {
  .ap-root *, .ap-root *::before, .ap-root *::after { transition: none !important; }
}
