﻿/* ==========================================================================
   GAONA · Rendimiento Máster — hoja de estilos
   Tokens → base → layout → componentes → secciones → utilidades
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  --fs: 1;
  --font-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

  --r-xs: 6px; --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px;
  --gap: clamp(16px, 2vw, 24px);
  --pad-x: clamp(16px, 5vw, 64px);
  --maxw: 1320px;
  --nav-h: 72px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);

  /* acento (personalizable) */
  --acc: #ff5a1f; --acc-2: #ff8a3d; --acc-ink: #fff;
}
:root[data-accent="crimson"] { --acc: #e5383b; --acc-2: #ff6b6e; }
:root[data-accent="lime"] { --acc: #a3d10c; --acc-2: #c8ee3c; --acc-ink: #10130a; }
:root[data-accent="cyan"] { --acc: #13b5dc; --acc-2: #53d6f3; --acc-ink: #04161b; }
:root[data-accent="violet"] { --acc: #7c6cf2; --acc-2: #a397ff; }

/* tema oscuro (por defecto) */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0f;
  --bg-2: #0f1115;
  --surface: #15171c;
  --surface-2: #1b1e24;
  --surface-3: #232730;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --ink: #f3f4f6;
  --ink-2: #c3c7cf;
  --muted: #8b919c;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
  --glass: rgba(15, 17, 21, .72);
  /* series de datos (validadas para la superficie oscura) */
  --s-blue: #3987e5; --s-blue-soft: #86b6ef; --s-orange: #d95926; --s-aqua: #199e70; --s-yellow: #c98500; --s-violet: #9085e9;
  --grid: #262a31; --axis: #3a3f48;
  --p-gen: var(--s-aqua); --p-comp: var(--s-orange); --p-tran: var(--s-violet);
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --critical: #d03b3b;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ef;
  --bg-2: #eeede8;
  --surface: #ffffff;
  --surface-2: #f7f6f3;
  --surface-3: #eceae4;
  --line: rgba(11, 11, 11, .09);
  --line-2: rgba(11, 11, 11, .16);
  --ink: #0f1012;
  --ink-2: #3d3f44;
  --muted: #6d6f75;
  --shadow: 0 24px 50px -30px rgba(20, 20, 20, .35), 0 0 0 1px var(--line);
  --glass: rgba(244, 243, 239, .78);
  --s-blue: #2a78d6; --s-blue-soft: #9ec5f4; --s-orange: #eb6834; --s-aqua: #1baf7a; --s-yellow: #eda100; --s-violet: #4a3aa7;
  --grid: #e7e5df; --axis: #c3c2b7;
}

/* ------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(16px * var(--fs)); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--acc); color: var(--acc-ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i .f, .i-orcid .f { fill: #a6ce39; stroke: none; }
svg .f { fill: #a6ce39; stroke: none; } svg .w { stroke: #fff; stroke-width: 1.9; } svg .wf { fill: #fff; stroke: none; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* estado inicial de los revelados (solo con JS y con animación permitida) */
.js [data-reveal] { opacity: 0; }
.js [data-motion="reduced"] [data-reveal], :root.js[data-motion="reduced"] [data-reveal] { opacity: 1; }
@media (prefers-reduced-motion: reduce) { :root.js:not([data-motion="full"]) [data-reveal] { opacity: 1; } }
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding: .16em .02em .06em; margin: -.16em -.02em -.06em; }
.sc { display: inline-block; will-change: transform; }

/* --------------------------------------------------------------- preloader */
.preloader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--bg); }
.preloader.is-done { pointer-events: none; }
.pl-inner { display: grid; justify-items: center; gap: 18px; }
.pl-bar { width: 240px; height: 60px; overflow: visible; }
.pl-shaft { stroke: var(--ink-2); stroke-width: 3; stroke-linecap: round; }
.pl-plates rect { fill: var(--acc); }
.pl-plates rect:nth-child(2) { fill: var(--ink-2); }
.pl-count { font-family: var(--font-display); font-size: 64px; line-height: 1; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.pl-count small { font-size: 24px; color: var(--muted); margin-left: 4px; }
.pl-label { font-size: .75rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.pl-curtain { position: absolute; inset: 0; background: var(--acc); transform: scaleY(0); transform-origin: bottom; }

/* ---------------------------------------------------------------- cursor */
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 999; opacity: 0; transition: opacity .3s; }
.has-cursor .cursor-dot, .has-cursor .cursor-ring { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--acc); }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.cursor-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent);
  transition: transform .45s var(--ease), background-color .3s, border-color .3s; }
.cursor-ring.is-hover::after { transform: scale(1.6); background: color-mix(in srgb, var(--acc) 12%, transparent); border-color: var(--acc); }
.cursor-ring.is-down::after { transform: scale(.8); }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ------------------------------------------------------- scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); transform-origin: left; transform: scaleX(0); }

/* -------------------------------------------------------------------- nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--pad-x);
  transition: background-color .5s var(--ease), backdrop-filter .5s, transform .6s var(--ease), box-shadow .5s;
}
.nav.is-solid { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { width: 38px; height: 38px; }
.bm-bg { fill: var(--acc); }
.bm-g { fill: none; stroke: var(--acc-ink); stroke-width: 3; stroke-linecap: round; }
.bm-bar { stroke: var(--acc-ink); stroke-width: 2; stroke-linecap: round; opacity: .55; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text b { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; letter-spacing: .06em; }
.brand-text small { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.nav-links { position: relative; display: flex; gap: 4px; margin: 0 auto; padding: 5px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.nav-links a { position: relative; z-index: 1; padding: 8px 14px; font-size: .84rem; font-weight: 500; color: var(--ink-2); border-radius: 999px; transition: color .3s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-ink { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--surface-3); opacity: 0;
  transition: transform .55s var(--ease), width .55s var(--ease), opacity .3s; }
.nav-actions { display: flex; gap: 8px; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 60%, transparent); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .3s, box-shadow .3s, color .3s; }
.icon-btn:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.icon-btn .i { width: 20px; height: 20px; }
.i-sun { display: none; } [data-theme="light"] .i-sun { display: block; } [data-theme="light"] .i-moon { display: none; }
.menu-btn { display: none; }

/* ---------------------------------------------------------------- buttons */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em; overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: box-shadow .4s var(--ease), background-color .3s, color .3s; }
.btn .i { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.btn:hover .i { transform: translateX(3px); }
.btn-primary { background: var(--acc); color: var(--acc-ink); box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--acc) 80%, transparent); }
.btn-primary::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--acc-2); transform: translateY(101%); border-radius: inherit; transition: transform .6s var(--ease); }
.btn-primary:hover::before { transform: none; }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(8px); background: color-mix(in srgb, var(--surface) 30%, transparent); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-sm { height: 40px; padding: 0 16px; font-size: .85rem; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-btn { color: var(--acc); font-weight: 600; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.link-btn:hover { background-size: 100% 1px; }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--nav-h) + 40px) 0 40px; overflow: hidden; background: #07080a; color: #f3f4f6; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 8, 10, .92) 0%, rgba(7, 8, 10, .55) 45%, rgba(7, 8, 10, .1) 75%),
              linear-gradient(0deg, rgba(7, 8, 10, .95) 0%, rgba(7, 8, 10, 0) 45%); }
.hero-content { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: #c3c7cf; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 var(--acc); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 60%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero-title { margin: 18px 0 22px; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(3rem, min(10.5vw, 13.5svh), 9.6rem); line-height: .92; letter-spacing: .005em; }
.hero-title .line { display: block; }
.hero-title .accent { color: transparent; -webkit-text-stroke: 1.5px #f3f4f6; }
.hero-title .accent .sc { background: linear-gradient(90deg, var(--acc), var(--acc-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 0; color: transparent; }
.hero-lead { max-width: 560px; font-size: clamp(1rem, 1.3vw, 1.15rem); color: #c3c7cf; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .btn-ghost { color: #f3f4f6; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.hero-stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(28px, 5svh, 72px); }
.stat { padding: 18px 0 4px; border-top: 1px solid rgba(255, 255, 255, .16); }
.stat + .stat { padding-left: 24px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: #9aa0aa; letter-spacing: .04em; }
.scroll-cue { position: absolute; z-index: 2; right: var(--pad-x); bottom: 150px; width: 26px; height: 44px; border-radius: 20px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 3px; height: 9px; margin-left: -1.5px; border-radius: 3px; background: #fff; animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }

/* ---------------------------------------------------------------- marquee */
.marquee { overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line); background: var(--bg-2); }
.marquee-track { display: flex; align-items: center; gap: 36px; width: max-content; will-change: transform; }
.marquee-track span { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.8rem); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; color: var(--ink); }
.marquee-track span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px var(--muted); }
.marquee-track i { width: 14px; height: 14px; border-radius: 3px; background: var(--acc); transform: rotate(45deg); flex: none; }

/* --------------------------------------------------------------- sections */
.section { position: relative; padding: clamp(56px, 6vw, 88px) 0 clamp(72px, 9vw, 120px); }
.section-alt { background: var(--bg-2); }
.sec-head { max-width: 820px; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-kicker { display: flex; align-items: center; gap: 14px; font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.sec-kicker span { font-family: var(--font-mono); color: var(--acc); letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; background: color-mix(in srgb, var(--acc) 12%, transparent); }
.sec-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.3rem, 5.6vw, 4.6rem); line-height: .96; letter-spacing: .005em; }
.sec-sub { margin-top: 20px; font-size: 1.05rem; color: var(--ink-2); max-width: 640px; }
.block-title { font-size: 1.35rem; font-weight: 600; margin-bottom: 26px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.block-title small { font-size: .8rem; font-weight: 500; color: var(--muted); }

/* ----------------------------------------------------------------- cards */
.card { position: relative; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(18px, 2.2vw, 28px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h4 { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 600; }
.card-head h4 .i { color: var(--acc); width: 20px; height: 20px; }
[data-tilt] { transform-style: preserve-3d; will-change: transform; }
[data-tilt]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .08), transparent 45%); }
[data-tilt]:hover::after { opacity: 1; }

/* media con carga progresiva */
:where(.media) { position: relative; }
.media { overflow: hidden; background-size: cover; background-position: center; }
.media img { opacity: 0; transition: opacity 1.1s var(--ease), filter 1.1s var(--ease); filter: blur(12px); }
.media img.is-loaded { opacity: 1; filter: none; }

/* chips, legend, segmented */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); white-space: nowrap; }
.chip .i { width: 14px; height: 14px; }
.chip.acc { background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 40%, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--ink-2); }
.legend .lg { display: inline-flex; align-items: center; gap: 8px; }
.legend .sw-c { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legend .sw-l { width: 16px; height: 2px; border-radius: 2px; flex: none; }
.legend.toggles .lg { height: 30px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: opacity .3s, box-shadow .3s; user-select: none; }
.legend.toggles .lg:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.legend.toggles .lg.is-off { opacity: .4; }
.legend.toggles .lg.is-off .sw-c { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--muted); }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.seg.full { display: flex; width: 100%; }
.seg.full .seg-btn { flex: 1; justify-content: center; }
.seg-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: .84rem; font-weight: 500; color: var(--ink-2); transition: color .3s, background-color .3s; white-space: nowrap; }
.seg.sm .seg-btn { height: 30px; padding: 0 12px; font-size: .78rem; }
.seg-btn .i { width: 16px; height: 16px; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--line-2); }

/* form controls */
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.input, .select, textarea { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  transition: border-color .3s, box-shadow .3s, background-color .3s; outline: none; }
textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 18%, transparent); }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.select.sm { height: 36px; font-size: .84rem; width: auto; }
.input-unit { position: relative; }
.input-unit .input { padding-right: 46px; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .8rem; color: var(--muted); pointer-events: none; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--surface-3); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 22%, transparent); transition: box-shadow .3s; }
.range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 22%, transparent); }
.range:active::-webkit-slider-thumb { box-shadow: 0 0 0 9px color-mix(in srgb, var(--acc) 22%, transparent); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background-color .3s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .45s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--acc); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------------------------------------------------------------- atleta */
.athlete { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.athlete-photo { position: sticky; top: calc(var(--nav-h) + 24px); margin: 0; border-radius: var(--r-xl); aspect-ratio: 4 / 5; box-shadow: var(--shadow); }
.athlete-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.athlete-photo figcaption { position: absolute; left: 16px; bottom: 14px; font-size: .7rem; color: rgba(255, 255, 255, .7); letter-spacing: .04em; }
.athlete-body { display: grid; gap: var(--gap); }
.athlete-id h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3.2rem); text-transform: uppercase; line-height: 1; margin-bottom: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 18px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.kpi .i { width: 20px; height: 20px; color: var(--acc); margin-bottom: 10px; }
.kpi b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .78rem; color: var(--muted); }
.marks-list { display: grid; gap: 18px; }
.mark-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; }
.mark-row .nm { font-weight: 600; font-size: .92rem; }
.mark-track { position: relative; height: 10px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.mark-cur, .mark-goal { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 10px; transform-origin: left; transform: scaleX(0); }
.mark-goal { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--acc) 55%, transparent) 0 4px, transparent 4px 8px); }
.mark-cur { background: linear-gradient(90deg, var(--acc), var(--acc-2)); }
.mark-val { font-family: var(--font-mono); font-size: .88rem; white-space: nowrap; }
.mark-val b { color: var(--ink); } .mark-val span { color: var(--muted); }
.mark-val em { font-style: normal; color: var(--good); font-size: .78rem; margin-left: 6px; }
.athlete-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: .92rem; color: var(--ink-2); }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--acc); border-bottom: 2px solid var(--acc); transform: rotate(-45deg); }
.countdown { overflow: hidden; }
.countdown::before { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--acc) 30%, transparent), transparent 70%); }
.cd-name { font-weight: 600; }
.cd-num { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 4px; }
.cd-num b { font-family: var(--font-display); font-weight: 400; font-size: 4rem; line-height: 1; color: var(--acc); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ macrociclo */
.macro-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
.macro-jump { display: flex; align-items: center; gap: 8px; }
.macro-toolbar .legend { margin-left: auto; }
.macro-shell { position: relative; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.macro-scroll { overflow-x: auto; overflow-y: hidden; scroll-behavior: auto; overscroll-behavior-x: contain; cursor: grab; }
.macro-scroll.is-drag { cursor: grabbing; user-select: none; }
.macro-scroll::-webkit-scrollbar { height: 0; }
.macro-scroll { scrollbar-width: none; }
.macro-fade { position: absolute; top: 0; bottom: 0; width: 60px; pointer-events: none; z-index: 5; transition: opacity .3s; }
.macro-fade.l { left: var(--lbl, 150px); background: linear-gradient(90deg, var(--surface), transparent); opacity: 0; }
.macro-fade.r { right: 0; background: linear-gradient(-90deg, var(--surface), transparent); }
.macro-shell.at-start .macro-fade.l { opacity: 0; } .macro-shell:not(.at-start) .macro-fade.l { opacity: 1; }
.macro-shell.at-end .macro-fade.r { opacity: 0; }
.macro { display: flex; width: max-content; --row: 34px; --wk: 52px; --dy: 58px; font-size: .74rem; }
.m-labels { position: sticky; left: 0; z-index: 4; width: var(--lbl, 150px); flex: none; background: var(--surface); box-shadow: 1px 0 0 var(--line), 10px 0 20px -14px rgba(0, 0, 0, .5); }
.m-labels div { height: var(--row); display: flex; align-items: center; padding: 0 14px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.m-labels div.tall, .m-row.tall { height: calc(var(--row) * 1.6); }
.m-labels div.grp { color: var(--ink-2); }
.wk { display: flex; flex: none; }
.wk-col { width: var(--wk); flex: none; }
.wk-days { display: flex; overflow: hidden; width: 0; transition: width .75s var(--ease-io); }
.wk.is-open .wk-days { width: calc(var(--dy) * 7); }
.wk-day { width: var(--dy); flex: none; background: color-mix(in srgb, var(--acc) 3.5%, transparent); }
.wk-day:last-child { box-shadow: inset -1px 0 0 var(--line-2); }
.m-row { height: var(--row); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; position: relative; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-row.lbl-cell { justify-content: flex-start; overflow: visible; border-right-color: transparent; }
.m-row.lbl-cell.end { border-right-color: var(--line-2); }
.m-row .span-label { position: absolute; left: 8px; z-index: 2; font-weight: 600; font-size: .72rem; color: var(--ink); pointer-events: none; }
.m-row.per { color: var(--ink); }
.m-row.per .span-label { text-transform: uppercase; letter-spacing: .08em; }
.wk-head { cursor: pointer; flex-direction: column; gap: 0; font-weight: 700; font-size: .8rem; transition: background-color .3s; user-select: none; }
.wk-head .plus { width: 14px; height: 14px; color: var(--muted); transition: transform .6s var(--ease), color .3s; }
.wk-head:hover { background: var(--surface-3); }
.wk-head:hover .plus { color: var(--acc); }
.wk.is-open .wk-head { background: color-mix(in srgb, var(--acc) 16%, transparent); }
.wk.is-open .wk-head .plus { transform: rotate(135deg); color: var(--acc); }
.wk.is-sel .wk-col .m-row { background-color: color-mix(in srgb, var(--acc) 7%, transparent); }
.code { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; font-weight: 700; font-size: .72rem; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.code.R { background: #f39a2b; color: #1b1203; box-shadow: none; }
.code.C { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 55%, transparent); }
.code.CH { background: var(--ink); color: var(--bg); box-shadow: none; }
.code.COMP { background: var(--acc); color: var(--acc-ink); box-shadow: none; }
.bar-cell { position: absolute; left: 7px; right: 7px; bottom: 4px; border-radius: 3px 3px 1px 1px; transform-origin: bottom; }
.bar-cell.int { background: var(--s-orange); }
.bar-cell.vol { background: var(--s-blue); }
.m-row .bar-val { position: relative; z-index: 1; font-size: .66rem; font-weight: 600; color: var(--ink); text-shadow: 0 1px 2px var(--surface), 0 0 4px var(--surface); align-self: flex-start; margin-top: 2px; }
.m-row.is-r { background: color-mix(in srgb, #f39a2b 12%, transparent); }
.m-row.ctrl .ctl { font-size: .62rem; font-weight: 700; padding: 2px 5px; border-radius: 5px; background: var(--surface-3); color: var(--ink); }
.m-row.ctrl .ctl.comp { background: var(--acc); color: var(--acc-ink); }
.m-row.dim { color: var(--muted); }
.m-row.day-name { font-weight: 700; }
.m-row.day-name.off { color: var(--muted); font-weight: 500; }
.m-row .sess { font-size: .6rem; line-height: 1.1; white-space: normal; padding: 0 4px; color: var(--ink-2); }
.dots { display: inline-flex; gap: 2px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--surface-3); }
.dots i.on.vol { background: var(--s-blue); } .dots i.on.int { background: var(--s-orange); }
.macro-minimap { position: relative; height: 6px; margin: 14px 0 0; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.macro-minimap span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 6px; background: var(--acc); opacity: .8; }
.week-detail { margin-top: var(--gap); display: grid; grid-template-columns: auto 1fr; gap: 20px 32px; align-items: start; }
.wd-num { font-family: var(--font-display); font-weight: 400; font-size: 5rem; line-height: .85; }
.wd-num small { display: block; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.wd-body { display: grid; gap: 14px; }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.wd-item { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.wd-item small { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wd-item b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.wd-text { color: var(--ink-2); font-size: .92rem; }
.wd-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- charts */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: var(--gap); }
.chart-card { overflow: hidden; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-head h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.chart { position: relative; width: 100%; height: var(--h, 260px); }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart + .chart { margin-top: 6px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: var(--gap); }
.chart-grid .span-2 { grid-column: span 2; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis text, .chart .lbl { fill: var(--muted); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.chart .axis .base { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .band-lbl { fill: var(--ink-2); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.chart .band { opacity: .07; }
.chart .x-hl { fill: var(--ink); opacity: 0; transition: opacity .2s; }
.chart .x-hl.on { opacity: .06; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; }
.chart .cross.on { opacity: .7; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .pt { stroke: var(--surface); stroke-width: 2; }
.chart .pt-hl { stroke: var(--surface); stroke-width: 2.5; opacity: 0; transition: opacity .15s; pointer-events: none; }
.chart .pt-hl.on { opacity: 1; }
.chart .dlabel { fill: var(--ink); font-size: 11px; font-weight: 600; }
.donut-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; height: auto; min-height: 280px; }
.donut-wrap svg { max-height: 300px; }
.donut-center .big { fill: var(--ink); font-family: var(--font-display); font-size: 40px; }
.donut-center .sub { fill: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.donut-legend { display: grid; gap: 10px; font-size: .84rem; min-width: 160px; }
.donut-legend .row { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: default; transition: background-color .2s; }
.donut-legend .row.sub { padding-left: 26px; font-size: .78rem; color: var(--ink-2); grid-template-columns: 1fr auto; }
.donut-legend .row:hover, .donut-legend .row.is-hl { background: var(--surface-2); }
.donut-legend b { font-variant-numeric: tabular-nums; }
.arc { transition: opacity .3s, transform .5s var(--ease); transform-origin: center; }
.arc-dim { opacity: .25; }
.table-view { margin-top: var(--gap); padding: 0; }
.table-view summary, .refs summary { display: flex; align-items: center; gap: 10px; padding: 18px 24px; cursor: pointer; font-weight: 600; list-style: none; }
.table-view summary::-webkit-details-marker, .refs summary::-webkit-details-marker { display: none; }
.table-view summary::after, .refs summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .4s var(--ease); }
.table-view[open] summary::after, .refs[open] summary::after { transform: rotate(-135deg); }
.table-scroll { overflow: auto; max-height: 460px; border-top: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child, .data-table td.l, .data-table th.l { text-align: left; }
.data-table thead th { position: sticky; top: 0; background: var(--surface); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); z-index: 1; }
.data-table tbody tr:hover td { background: var(--surface-2); }

/* tooltip */
.tip { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; min-width: 170px; max-width: 280px; padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 94%, transparent); backdrop-filter: blur(12px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6), 0 0 0 1px var(--line-2);
  font-size: .8rem; opacity: 0; transform: translate3d(0, 0, 0) scale(.96); transition: opacity .18s, transform .18s; }
.tip.on { opacity: 1; }
.tip h5 { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.tip .tr { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; padding: 2px 0; color: var(--ink-2); }
.tip .tr b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tip .tr i { width: 10px; height: 10px; border-radius: 3px; }
.tip .tr i.ln { height: 2px; }
.tip .tr.tot { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; grid-template-columns: 1fr auto; }

/* ---------------------------------------------------------------- sesión */
.week-picker { display: grid; grid-template-columns: auto 1fr auto; gap: 18px 20px; align-items: center; }
.wp-main { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; min-width: 0; }
.wp-num { display: flex; align-items: baseline; gap: 8px; }
.wp-num small { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); align-self: center; }
.wp-num b { font-family: var(--font-display); font-weight: 400; font-size: 3.4rem; line-height: 1; min-width: 1.6ch; text-align: right; font-variant-numeric: tabular-nums; }
.wp-num span { color: var(--muted); font-size: .9rem; }
.wp-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-track { grid-column: 1 / -1; position: relative; }
.wp-ticks { display: flex; gap: 2px; height: 8px; margin-bottom: 4px; }
.wp-ticks i { flex: 1; border-radius: 2px; opacity: .8; transition: transform .3s var(--ease), opacity .3s; transform-origin: bottom; }
.wp-ticks i.is-r { opacity: .35; }
.wp-ticks i.is-on { transform: scaleY(1.9); opacity: 1; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: var(--gap); }
.day { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 190px; padding: 16px 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); text-align: left;
  transition: transform .5s var(--ease), box-shadow .4s, background-color .3s; overflow: hidden; }
.day.is-active { cursor: pointer; }
.day.is-active:hover { transform: translateY(-4px); }
.day.is-sel { box-shadow: 0 0 0 2px var(--acc), 0 24px 40px -24px color-mix(in srgb, var(--acc) 60%, transparent); }
.day.is-off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.day-top { display: flex; justify-content: space-between; align-items: baseline; }
.day-top b { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1; text-transform: uppercase; }
.day-top span { font-size: .72rem; color: var(--muted); }
.day-label { font-size: .84rem; font-weight: 600; line-height: 1.3; }
.day.is-off .day-label { color: var(--muted); font-weight: 500; }
.day-stats { margin-top: auto; display: grid; gap: 6px; }
.day-stat { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }
.day-stat b { color: var(--ink); font-variant-numeric: tabular-nums; }
.day-meter { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.day-meter i { display: block; height: 100%; border-radius: 4px; background: var(--s-orange); transform-origin: left; }
.day .i.day-i { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; opacity: .07; stroke-width: 1.2; }
.day .ctl-badge { display: inline-block; margin-left: 6px; vertical-align: 1px; font-size: .62rem; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--acc); color: var(--acc-ink); }
.ex.head span, .ex.head .cue { font-size: .66rem; color: var(--muted); }
.ue { margin-top: var(--gap); }
.ue-card { display: grid; gap: var(--gap); }
.ue-head { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.ue-head h3 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1; }
.ue-head p { color: var(--ink-2); margin-top: 8px; }
.ue-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ue-obj { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ue-obj div { padding: 16px; border-radius: var(--r-sm); background: var(--surface-2); }
.ue-obj small { display: flex; align-items: center; gap: 8px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); margin-bottom: 6px; }
.ue-obj p { font-size: .88rem; color: var(--ink-2); }
.ue-part h4 { display: flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.ue-part h4::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ex-list { display: grid; gap: 8px; }
.ex { display: grid; grid-template-columns: 34px minmax(0, 2.4fr) 70px 70px 90px 90px minmax(0, 2fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .86rem; }
.ex.head { background: transparent; padding-top: 0; padding-bottom: 0; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ex .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); font-weight: 700; font-size: .78rem; }
.ex .nm { font-weight: 600; }
.ex .nm small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.ex .kg { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1; }
.ex .kg small { font-family: var(--font-body); font-size: .7rem; color: var(--muted); margin-left: 2px; }
.ex .cue { color: var(--ink-2); font-size: .8rem; }
.ex .pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.ex.simple { grid-template-columns: 34px minmax(0, 2.4fr) 120px minmax(0, 2fr); }
.guide { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.guide li { position: relative; padding-left: 22px; font-size: .88rem; color: var(--ink-2); }
.guide li::before { content: ''; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 2px; background: var(--acc); transform: rotate(45deg); }
.ue-empty { display: grid; place-items: center; text-align: center; gap: 10px; padding: 48px 20px; color: var(--muted); }
.ue-empty .i { width: 42px; height: 42px; color: var(--acc); }
.ue-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ----------------------------------------------------------- herramientas */
.tools { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.tool-tabs { display: grid; gap: 6px; position: sticky; top: calc(var(--nav-h) + 20px); }
.tool-tab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); text-align: left; color: var(--ink-2); transition: background-color .3s, color .3s, box-shadow .3s; }
.tool-tab .i { width: 22px; height: 22px; }
.tool-tab b { display: block; font-size: .92rem; font-weight: 600; color: inherit; }
.tool-tab small { display: block; font-size: .72rem; color: var(--muted); }
.tool-tab:hover { background: var(--surface); color: var(--ink); }
.tool-tab.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tool-tab.is-on .i { color: var(--acc); }
.tool-panel { min-height: 460px; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(20px, 3vw, 40px); }
.tool-form { display: grid; gap: 16px; align-content: start; }
.tool-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 4px; }
.tool-src { font-size: .76rem; color: var(--muted); margin-top: 8px; }
.result-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.result-big b { font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 7vw, 5.2rem); line-height: .9; color: var(--ink); font-variant-numeric: tabular-nums; }
.result-big span { font-size: 1rem; color: var(--muted); }
.result-note { font-size: .86rem; color: var(--ink-2); margin-top: 6px; }
.res-list { display: grid; gap: 8px; margin-top: 18px; }
.res-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .88rem; }
.res-item b { font-variant-numeric: tabular-nums; }
.pct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 18px; }
.pct-cell { padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); text-align: center; }
.pct-cell small { display: block; font-size: .7rem; color: var(--muted); }
.pct-cell b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pct-cell.hl { background: color-mix(in srgb, var(--acc) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 45%, transparent); }
.plate-vis { width: 100%; height: 170px; margin-top: 10px; }
.plate-vis .shaft { stroke: #9aa0aa; stroke-width: 6; stroke-linecap: round; }
.plate-vis .sleeve { fill: #c3c7cf; }
.plate-vis .collar { fill: #6d7280; }
.plate-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.zone-bar { display: flex; height: 36px; border-radius: 10px; overflow: hidden; margin-top: 16px; }
.zone-bar div { display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: #0b0c0f; transition: flex-grow .8s var(--ease); }

/* -------------------------------------------------------------------- IA */
.section-ai { overflow: hidden; }
.ai-bg { position: absolute; inset: 0; opacity: .12; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.ai-bg img { width: 100%; height: 100%; object-fit: cover; }
.ai { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
.ai-form { display: grid; gap: 16px; position: sticky; top: calc(var(--nav-h) + 20px); }
.ai-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-fields .full { grid-column: 1 / -1; }
.ai-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ai-out { min-height: 520px; display: flex; flex-direction: column; }
.ai-empty { margin: auto; display: grid; justify-items: center; text-align: center; gap: 12px; max-width: 360px; }
.ai-empty h4 { font-size: 1.2rem; }
.ai-orb { position: relative; width: 96px; height: 96px; margin-bottom: 8px; }
.ai-orb span { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--acc); opacity: .5; animation: orb 3.6s var(--ease) infinite; }
.ai-orb span:nth-child(2) { animation-delay: 1.2s; } .ai-orb span:nth-child(3) { animation-delay: 2.4s; }
.ai-orb::after { content: ''; position: absolute; inset: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--acc-2), var(--acc)); box-shadow: 0 0 40px var(--acc); }
@keyframes orb { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.3); opacity: 0; } }
.ai-loading { margin: auto; display: grid; justify-items: center; gap: 16px; text-align: center; }
.ai-loading .bar-anim { width: 220px; height: 60px; }
.ai-loading p { color: var(--muted); font-size: .9rem; min-height: 1.6em; }
.ai-result { display: grid; gap: 20px; }
.ai-result-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ai-result-head h3 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.02; }
.ai-result-head p { color: var(--ink-2); margin-top: 8px; font-size: .92rem; }
.ai-block h4 { display: flex; align-items: center; gap: 10px; font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.ai-block h4 .i { color: var(--acc); }
.ai-ex { display: grid; grid-template-columns: minmax(0, 2fr) auto auto auto; gap: 12px; align-items: center; padding: 11px 14px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .86rem; }
.ai-ex + .ai-ex { margin-top: 6px; }
.ai-ex b { font-weight: 600; }
.ai-ex small { display: block; color: var(--muted); font-size: .76rem; }
.ai-ex .tag { font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.ai-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ai-day { padding: 16px; border-radius: var(--r-md); background: var(--surface-2); }
.ai-day h5 { margin: 0 0 4px; font-size: 1rem; }
.ai-day p { font-size: .82rem; color: var(--ink-2); }
.ai-day ul { list-style: none; margin-top: 10px; display: grid; gap: 4px; font-size: .8rem; color: var(--ink-2); }
.ai-day ul li::before { content: '— '; color: var(--acc); }
.ai-text { font-size: .95rem; color: var(--ink-2); display: grid; gap: 12px; }
.ai-text h1, .ai-text h2, .ai-text h3 { font-size: 1.05rem; color: var(--ink); margin-top: 8px; }
.ai-text ul, .ai-text ol { padding-left: 20px; display: grid; gap: 6px; }
.ai-text strong { color: var(--ink); }
.ai-text code { font-family: var(--font-mono); font-size: .85em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.ai-text table { border-collapse: collapse; font-size: .84rem; width: 100%; }
.ai-text th, .ai-text td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.ai-warn { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warn) 12%, transparent); font-size: .82rem; color: var(--ink-2); }
.ai-warn .i { color: var(--warn); }
.ai-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-saved { margin-top: var(--gap); display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ai-saved:empty { display: none; }
.saved-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); text-align: left; transition: transform .4s var(--ease); }
.saved-item:hover { transform: translateY(-3px); }
.saved-item .i { color: var(--acc); width: 20px; height: 20px; }
.saved-item b { display: block; font-size: .88rem; }
.saved-item small { color: var(--muted); font-size: .74rem; }
.saved-item .del { margin-left: auto; color: var(--muted); padding: 6px; border-radius: 8px; }
.saved-item .del:hover { color: var(--critical); background: var(--surface-2); }
.caret { display: inline-block; width: 8px; height: 1.1em; background: var(--acc); vertical-align: text-bottom; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------------------------------------------------------- perfil */
.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.profile-photo { position: relative; aspect-ratio: 4 / 5; max-width: 460px; width: 100%; justify-self: center; border-radius: var(--r-xl);
  background: radial-gradient(120% 80% at 60% 30%, color-mix(in srgb, var(--acc) 38%, var(--surface)) 0%, var(--surface) 62%); box-shadow: var(--shadow); overflow: hidden; }
.profile-photo img { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.pp-ring { position: absolute; width: 130%; aspect-ratio: 1; left: -15%; top: -8%; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--ink) 20%, transparent); animation: spin 60s linear infinite; }
.pp-glow { position: absolute; width: 60%; aspect-ratio: 1; right: -10%; top: 5%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--acc-2) 45%, transparent), transparent 70%); filter: blur(10px); }
@keyframes spin { to { transform: rotate(360deg); } }
.pp-badge { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--glass); backdrop-filter: blur(12px); box-shadow: 0 0 0 1px var(--line-2); color: var(--ink); }
.pp-badge .i { color: var(--acc); }
.profile-body { display: grid; gap: 20px; }
.profile-name { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: .95; }
.profile-role { font-size: 1.05rem; font-weight: 500; color: var(--acc); }
.profile-bio { color: var(--ink-2); font-size: 1.02rem; max-width: 620px; }
.orcid-card { display: flex; align-items: center; gap: 16px; padding: 18px 22px; max-width: 460px; transition: box-shadow .4s; }
.orcid-card:hover { box-shadow: 0 0 0 1px #a6ce39, 0 20px 40px -24px rgba(166, 206, 57, .5); }
.orcid-card .orcid-i { width: 44px; height: 44px; }
.orcid-card small { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.orcid-card b { display: block; font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: .02em; }
.orcid-card .ext { margin-left: auto; color: var(--muted); }
.profile-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.profile-facts div { display: grid; grid-template-columns: 22px 1fr; gap: 2px 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.profile-facts .i { grid-row: span 2; width: 22px; height: 22px; color: var(--acc); margin-top: 2px; }
.profile-facts b { font-size: .92rem; }
.profile-facts span { font-size: .78rem; color: var(--muted); }
.timeline-wrap, .portfolio-wrap { margin-top: clamp(60px, 8vw, 100px); }
.timeline { list-style: none; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 18px; height: 2px; background: var(--line-2); }
.timeline .tl-line { position: absolute; left: 0; right: 0; top: 18px; height: 2px; background: linear-gradient(90deg, var(--acc), var(--acc-2)); transform-origin: left; transform: scaleX(0); }
.tl { position: relative; padding-top: 44px; }
.tl::before { content: ''; position: absolute; top: 11px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line-2); transition: box-shadow .4s, background-color .4s; }
.tl.is-on::before { background: var(--acc); box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc) 22%, transparent); }
.tl.is-now::before { animation: pulse 2.4s infinite; }
.tl small { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.tl b { display: block; font-size: .95rem; line-height: 1.3; margin: 6px 0; }
.tl p { font-size: .8rem; color: var(--muted); }
.portfolio { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.pf { position: relative; grid-column: span 4; min-height: 360px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: flex-end; color: #f3f4f6; isolation: isolate; }
.pf.wide { grid-column: span 8; }
.pf .media { position: absolute; inset: 0; z-index: -2; }
.pf .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), opacity 1.1s var(--ease), filter 1.1s var(--ease); }
.pf:hover .media img { transform: scale(1.06); }
.pf::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 9, 11, .95) 10%, rgba(8, 9, 11, .2) 70%); }
.pf-body { padding: 26px; display: grid; gap: 10px; }
.pf-tag { display: inline-flex; width: max-content; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(8px); }
.pf h4 { font-size: 1.35rem; font-weight: 600; }
.pf p { font-size: .88rem; color: #c3c7cf; }
.pf .pf-go { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: #fff; margin-top: 4px; }
.pf .pf-go .i { transition: transform .5s var(--ease); }
.pf:hover .pf-go .i { transform: translateX(4px); }

/* ---------------------------------------------------------- fundamentos */
.found { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.found-col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 16px; }
.found-col h3 .i { color: var(--acc); width: 22px; height: 22px; }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; text-align: left; font-weight: 600; font-size: .92rem; }
.acc-item button .i { color: var(--muted); transition: transform .5s var(--ease); }
.acc-item.is-open button .i { transform: rotate(45deg); color: var(--acc); }
.acc-panel { height: 0; overflow: hidden; transition: height .6s var(--ease); }
.acc-panel p { padding-bottom: 16px; font-size: .88rem; color: var(--ink-2); }
.refs { margin-top: var(--gap); padding: 0; }
.refs ol { padding: 0 24px 24px 48px; display: grid; gap: 10px; font-size: .86rem; color: var(--ink-2); }

/* ---------------------------------------------------------------- footer */
.footer { position: relative; padding: 60px 0 40px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-big { font-family: var(--font-display); font-size: clamp(4rem, 17vw, 16rem); line-height: .8; text-align: center; letter-spacing: .01em; color: transparent; -webkit-text-stroke: 1px var(--line-2); user-select: none; margin-bottom: 40px; white-space: nowrap; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 10px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: .85rem; transition: box-shadow .3s; }
.footer-links a:hover { box-shadow: inset 0 0 0 1px var(--acc); }
.footer-note { margin-top: 26px; }

/* ---------------------------------------------------------------- drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .5); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.drawer-backdrop.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 210; width: min(440px, 100vw); background: var(--surface); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .6);
  transform: translateX(105%); transition: transform .7s var(--ease-io); display: flex; flex-direction: column; }
.drawer.on { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.drawer-head h3 .i { color: var(--acc); }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; display: grid; gap: 28px; align-content: start; }
.set-group { display: grid; gap: 14px; }
.set-group > h5 { margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.set-group > h5 .i { width: 16px; height: 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; transition: box-shadow .3s, transform .4s var(--ease); }
.swatch:hover { transform: scale(1.1); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.set-grid .full { grid-column: 1 / -1; }
.set-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 400; display: grid; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .86rem; font-weight: 500; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.toast .i { width: 18px; height: 18px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .nav-links a { padding: 8px 10px; font-size: .8rem; }
  .ex { grid-template-columns: 34px minmax(0, 2fr) 60px 64px 80px 84px; }
  .ex .cue { grid-column: 2 / -1; }
  .ex.head .cue { display: none; }
}
@media (max-width: 1024px) {
  :root { --nav-h: 64px; }
  .menu-btn { display: inline-grid; }
  .nav-links { position: fixed; top: var(--nav-h); left: 12px; right: 12px; flex-direction: column; gap: 2px; padding: 10px; border-radius: var(--r-lg);
    background: var(--surface); box-shadow: var(--shadow); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .4s var(--ease), transform .5s var(--ease); }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 16px; font-size: .95rem; border-radius: var(--r-sm); }
  .nav-ink { display: none; }
  .nav-actions { margin-left: auto; }
  .athlete, .profile, .ai, .tools { grid-template-columns: minmax(0, 1fr); }
  .seg.full .seg-btn { min-width: 0; padding: 0 8px; }
  .athlete-photo { position: relative; top: 0; max-width: 520px; }
  .ai-form, .tool-tabs { position: static; }
  .tool-tabs { grid-template-columns: repeat(3, 1fr); }
  .tool-tab small { display: none; }
  .chart-grid { grid-template-columns: 1fr; }
  .chart-grid .span-2 { grid-column: auto; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .found { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before, .timeline .tl-line { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline .tl-line { transform-origin: top; transform: scaleY(0); }
  .tl { padding: 0 0 26px 36px; }
  .tl::before { top: 3px; left: 0; }
  .pf, .pf.wide { grid-column: span 12; min-height: 300px; }
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; }
  .scroll-cue { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .athlete-grid, .ue-obj, .guide, .tool-grid, .tool-form .row2, .ai-fields, .profile-facts { grid-template-columns: 1fr; }
  .mark-row { grid-template-columns: 1fr auto; }
  .mark-row .mark-track { grid-column: 1 / -1; grid-row: 2; }
  .days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day { min-height: 160px; }
  .week-picker { grid-template-columns: auto 1fr auto; }
  .wp-main { justify-content: center; }
  .week-detail { grid-template-columns: 1fr; }
  .ex, .ex.simple { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; }
  .ex .nm { flex: 1 1 60%; min-width: 0; }
  .ex .kg { margin-left: auto; }
  .ex .pct, .ex .sr, .ex .rest { font-size: .76rem; padding: 3px 8px; border-radius: 6px; background: var(--surface-3); }
  .ex .pct, .ex.simple .sr { margin-left: 36px; }
  .ex .cue { flex-basis: 100%; padding-left: 36px; }
  .ex .nil { display: none; }
  .ex .nil + .nil + .sr { margin-left: 36px; }
  .ex.head { display: none; }
  .tool-tabs { grid-template-columns: repeat(2, 1fr); }
  .donut-wrap { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .macro-toolbar .legend { margin-left: 0; }
  .macro-shell { --lbl: 104px; }
  .m-labels div { padding: 0 10px; font-size: .6rem; letter-spacing: .04em; white-space: normal; line-height: 1.15; }
  .ue-head { grid-template-columns: 1fr; }
  .ai-ex { grid-template-columns: 1fr auto; }
}

/* ------------------------------------------------------------------ print */
@media print {
  .nav, .preloader, .scroll-progress, .hero, .marquee, .drawer, .drawer-backdrop, .footer, .cursor-dot, .cursor-ring, .toasts, .tip,
  #atleta, #macrociclo, #cargas, #herramientas, #ia, #perfil, #fundamentos, .week-picker, .days, .ue-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  [data-reveal] { opacity: 1 !important; }
}
