/* xSwim, el feed de publicaciones (/posts/) y cada publicación ampliada (web/feed.py). Lo común (letra, colores,
   segmentados, caras, banderas) está en site.css. Color con significado, además del de site.css:
     --ink    lo que está en foco: la selección de los filtros, la barra elegida
     --grey   contexto: las demás barras, los puntos, la carrera antes de acercarse a su mejor marca
     --rope   la mejor marca de cada uno (el punto amarillo de «Careers») y el nadador que se busca
     --fast   enlaces y lo que se puede tocar para ir a otro sitio (como en el resto de la web) */

/* La columna de 1040 px de las publicaciones; los 24 px del móvil, en site.css (son de todas las páginas). */
.art .col, .mesa .col, .morenav { max-width: calc(1040px + 2 * var(--gut)); }

/* ================================================================ la lista (Hugo, 23-11: la X de docs/web-estilo.md, «Cómo empieza el feed»)
   Con la letra y el aire de la portada: Archivo 800 en frase normal y apretado, frases en --text. Ejemplo: web/estilo_feed.py. */
.fd { padding: calc(var(--barh) + 64px) 0 96px; }
.fd .meta { display: flex; gap: 14px; align-items: center; font: 600 14px var(--f-body); color: var(--muted); margin: 0 0 18px; }
.fd .meta .k { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.cover { display: grid; gap: 40px; }
.cover h1 { font-size: clamp(38px, 10.6vw, 46px); line-height: .98; letter-spacing: -0.04em; }
.cover h1 a { text-decoration: none; }
.cover .lead { margin: 20px 0 0; }
.cover .go { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; height: 50px; padding: 0 22px; border-radius: 999px; background: var(--ink);
  color: #fff; text-decoration: none; font: 700 16px var(--f-body); transition: transform .3s var(--spring); }
.cover .go:hover { transform: translateY(-2px); }
.cover .media { position: relative; display: block; border-radius: 18px; overflow: hidden; background: var(--soft); aspect-ratio: 4 / 5;
  box-shadow: 0 30px 60px -32px rgba(11, 34, 51, .5); }
.cover .media img, .cover .media video { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 901px) {
  .fd { padding-top: calc(var(--barh) + 96px); }
  .cover { grid-template-columns: 1fr 340px; gap: 80px; align-items: center; }
  .cover h1 { font-size: clamp(56px, 5.6vw, 84px); }
  .cover .media { aspect-ratio: 9 / 16; }
  .cover.car .media { aspect-ratio: 4 / 5; }
}
@media (max-width: 359px) {
  .cover { grid-template-columns: minmax(0, 1fr); }
  .cover h1, .p-careers { overflow-wrap: anywhere; }
  .fd .meta, .p-careers .key span { flex-wrap: wrap; }
  .cover .go { height: auto; min-height: 50px; padding-block: 8px; }
}
/* la corchera fina de la marca separa la portada del resto (roja en los últimos 5 m) */
.lane { position: relative; height: 10px; margin: 72px 0 48px;
  background: radial-gradient(circle at 5px 5px, var(--rope) 3.6px, transparent 4.2px) 0 0 / 14px 10px repeat-x, linear-gradient(var(--line), var(--line)) 0 4.5px / 100% 1px no-repeat; }
.lane::after { content: ''; position: absolute; right: 0; top: 0; width: 10%; height: 10px;
  background: radial-gradient(circle at 5px 5px, var(--red) 3.6px, transparent 4.2px) 0 0 / 14px 10px repeat-x, linear-gradient(var(--line), var(--line)) 0 4.5px / 100% 1px no-repeat, var(--bg); }
.fd .fbar { margin: 0 0 32px; }
/* la lista (móvil): titular, frase y la portada pequeña a la derecha */
.flist { list-style: none; margin: 0; padding: 0; }
.flist li a { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 20px; align-items: start; padding: 28px 0; border-top: 1px solid var(--line); text-decoration: none; }
.flist li:first-child a { border-top: 0; padding-top: 4px; }
.flist .meta { margin-bottom: 10px; font-size: 13px; }
.flist h3 { font: 800 21px/1.12 var(--f-head); letter-spacing: -0.025em; margin: 0; text-wrap: balance; overflow-wrap: break-word; }
.flist .dek { font-size: 15px; line-height: 1.5; color: var(--text); margin: 10px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.flist img { width: 84px; height: 105px; object-fit: cover; border-radius: 12px; background: var(--soft); }
/* las cintas (ordenador): una por tipo, que se desliza de lado; el reel se mueve al pasar el ratón */
.shelves { display: none; }
@media (min-width: 901px) {
  .flist { display: none; }
  .shelves { display: block; }
  .shelf { margin: 0 0 80px; }
  .shelf .hd { display: flex; align-items: end; justify-content: space-between; margin: 0 0 24px; }
  .shelf h2 { font-size: 40px; letter-spacing: -0.035em; }
  .shelf .nav { display: flex; gap: 8px; }
  .shelf .nav button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
  .shelf .nav button:hover { border-color: var(--ink); }
  .shelf .nav .back svg { transform: scaleX(-1); }
  .shrow { display: grid; grid-auto-flow: column; grid-auto-columns: 272px; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 0 30px; }
  .shrow::-webkit-scrollbar { display: none; }
  .shrow a { scroll-snap-align: start; text-decoration: none; }
  .shrow .pic { aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--soft); position: relative; transition: transform .4s var(--spring), box-shadow .4s; }
  .shrow a:hover .pic { transform: translateY(-6px); box-shadow: 0 26px 44px -26px rgba(11, 34, 51, .5); }
  .shrow .pic img, .shrow .pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .shrow .pic video { opacity: 0; transition: opacity .3s; }
  .shrow a:hover .pic video { opacity: 1; }
  .shrow .meta { margin: 18px 0 8px; font-size: 13px; }
  .shrow h3 { font: 800 19px/1.18 var(--f-head); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
  .fd[data-t]:not([data-t="all"]) .shelf { display: none; }
  .fd[data-t="rec"] .shelf.rec, .fd[data-t="study"] .shelf.study, .fd[data-t="race"] .shelf.race { display: block; }
  .fd[data-t]:not([data-t="all"]) .shrow { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .fd[data-t]:not([data-t="all"]) .shelf .nav { display: none; }
}

/* ================================================================ la noticia
   Hugo, 23-11: el texto de la derecha salía demasiado grande y la mesa no se veía. Ahora el titular va a lo ancho en Archivo
   estrecho (misma familia que la portada, apretada, en frase normal) y no pasa de dos o tres líneas; el reel o el carrusel,
   pequeño, y el texto del post plegado. Con mesa de datos (Hugo eligió esta de dos), la publicación es la mesa (.mesa.pm):
   el titular encima de los filtros, el post como una pieza al lado de la primera gráfica y su texto al final. */
.ptop .pcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font: 600 14px var(--f-body); color: var(--muted); margin: 0 0 14px; }
.ptop .pcrumbs a:first-child { color: var(--fast); text-decoration: none; }
.ptop .pcrumbs .more { font-size: 14px; }
h1.ptitle { font-weight: 900; font-variation-settings: "wdth" 76; letter-spacing: -0.02em; line-height: .98; font-size: clamp(31px, 9vw, 38px); max-width: 21em; }
h1.ptitle.l { font-size: clamp(29px, 8.2vw, 35px); }
h1.ptitle.xl { font-size: clamp(27px, 7.6vw, 32px); }
@media (min-width: 901px) {
  h1.ptitle { font-size: clamp(44px, 4.3vw, 60px); }
  h1.ptitle.l { font-size: clamp(40px, 3.8vw, 52px); }
  h1.ptitle.xl { font-size: clamp(36px, 3.3vw, 46px); }
}
.ptop + .pbody, .ptop .dek { margin-top: 26px; }
.art .col, .mesa.pm > .col:first-child { padding-top: calc(var(--barh) + 44px); }
.art .col { padding-bottom: clamp(36px, 4.4vw, 56px); }
.art .pbody { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "dek" "media" "text"; }
.art .dek, .mesa.pm .dek { grid-area: dek; font: 500 clamp(18px, 1.5vw, 21px)/1.4 var(--f-body); color: var(--ink); margin: 0; max-width: 34em; }
.art .media { grid-area: media; margin-top: 24px; }
.art .ptext { grid-area: text; min-width: 0; margin-top: 22px; }
.art .prose p, .p-caption .prose p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; color: var(--text); max-width: 40em; }
/* el texto del post, plegado a cinco líneas; se abre con el botón (feed.js lo enseña solo si hay más) */
.prose.fold { max-height: calc(16px * 1.6 * 5); overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.prose.fold.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.unfold { border: 0; background: none; padding: 0; margin: 4px 0 0; height: 40px; font: 700 15px var(--f-body); color: var(--fast); cursor: pointer; }
.unfold:hover { text-decoration: underline; text-underline-offset: 3px; }
.art .who, .p-post .who { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.art .stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 18px 0 0; font: 600 14px var(--f-body); color: var(--muted); }
@media (min-width: 640px) {
  /* el reel, estrecho (9:16); el carrusel, algo más ancho (4:5). Al lado, la frase y el texto */
  .art .pbody { grid-template-columns: 252px minmax(0, 1fr); grid-template-areas: "media dek" "media text"; grid-template-rows: auto 1fr; column-gap: 56px; }
  .art.car .pbody { grid-template-columns: clamp(240px, 30vw, 320px) minmax(0, 1fr); }
  .art .pbody { column-gap: clamp(28px, 4vw, 56px); }
  .art .media { margin-top: 0; }
  .art .ptext { margin-top: 18px; }
}
.art .media.reel video { max-height: none; }

/* con mesa: la cabecera encima de los filtros */
.mesa.pm .ptop { padding-bottom: 26px; }
.mesa.pm .ptop .dek { margin-top: 18px; }
.p-post .media.reel video { max-height: 520px; }
.p-caption h3 { font: 800 21px/1.2 var(--f-body); letter-spacing: -0.01em; margin-bottom: 14px; }
.p-caption .prose { columns: 2 320px; column-gap: 56px; }
.p-caption .prose p { break-inside: avoid; }
.media.reel video { width: 100%; aspect-ratio: 9 / 16; max-height: calc(100vh - 130px); border-radius: 18px; background: var(--ink); object-fit: contain; }
.media.car { position: relative; }
.media.car .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 16px; background: var(--panel); box-shadow: 0 1px 0 var(--line); }
.media.car .track::-webkit-scrollbar { display: none; }
.media.car .track img { flex: none; width: 100%; height: auto; scroll-snap-align: start; }
.media .nav { position: absolute; top: calc(50% - 32px); width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--panel); color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 22px -10px rgba(11, 34, 51, .55); transition: opacity .2s, transform .3s var(--spring); }
.media .nav:hover { transform: scale(1.08); }
.media .nav[disabled] { opacity: 0; pointer-events: none; }
.media .prev { left: 10px; }
.media .next { right: 10px; }
.media .next svg { transform: rotate(180deg); }
.media .dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.media .dots button { width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.media .dots button::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grey); transition: background .2s, transform .3s var(--spring); }
.media .dots button[aria-current="true"]::after { background: var(--ink); transform: scale(1.25); }
@media (max-width: 719px), (pointer: coarse) { .media .dots { gap: 0; margin-top: 4px; } .media .dots button { width: 40px; height: 40px; } }   /* 40 px para el dedo */
@media (hover: none) { .media .nav { display: none; } }
.morenav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 34px; padding-bottom: clamp(60px, 8vw, 100px); }
.morenav a { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; text-decoration: none; color: var(--ink); align-items: start; }
.morenav img { grid-row: 1 / span 2; width: 64px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; background: var(--soft); }
.morenav .nl { font: 600 13px var(--f-body); color: var(--muted); }
.morenav .t { font: 700 16px/1.3 var(--f-body); }
.morenav a:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.morenav a:nth-child(2):last-child { text-align: left; }
@media (max-width: 639px) {
  .media.reel video { max-height: 78vh; width: auto; max-width: 100%; margin: 0 auto; }
  .art.car .media { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); }
  .art.car .media .track { border-radius: 0; }
}
@media (max-width: 860px) {
  .morenav { grid-template-columns: 1fr; }
}

/* ================================================================ la mesa de datos */
.mesa { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ctl { position: sticky; top: var(--stick); z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.ctl .col { padding-top: 12px; padding-bottom: 12px; }
/* la prueba: en el ordenador, en la ficha; en el móvil no cabe en la línea y va en la hoja */
.sheet .evrow { display: none; }
@media (max-width: 600px) { .evchip { display: none; } .sheet .evrow { display: flex; } }
.who-find { position: relative; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 14px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); }
.who-find:focus-within { border-color: var(--ink); }
.who-find input { border: 0; outline: 0; background: none; font: 500 15px var(--f-body); color: var(--ink); flex: 1; min-width: 0; height: 40px; }
.who-find.has { background: var(--rope); border-color: var(--rope); color: var(--ink); }
.sugg { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; right: 0; max-height: 360px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--panel); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(11, 34, 51, .45); }
.sugg[hidden] { display: none; }
.sugg li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; font: 600 15px var(--f-body); color: var(--ink); }
.sugg li small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; }
.sugg li.on, .sugg li:hover { background: var(--bg); }
.sugg .none { color: var(--muted); cursor: default; font-weight: 500; }

.mesa .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(28px, 3.6vw, 56px); padding-top: 8px; padding-bottom: clamp(50px, 6vw, 80px); }
.pane { grid-column: span 6; padding: 30px 0 36px; border-top: 1px solid var(--line); min-width: 0; }
.pane, .mesa { scroll-margin-top: 150px; }
.pane:first-child, .p-post { border-top: 0; }
.p-ages, .p-events { grid-column: span 8; }
.p-post, .p-side { grid-column: span 4; }
.p-careers, .p-table, .p-caption, .method { grid-column: 1 / -1; }
.p-post { padding-top: 30px; }
/* la gráfica de puestos y la de cada año, juntas; carreras, la tabla y el texto, debajo */
.p-careers { order: 1; } .p-table, .p-caption, .method { order: 2; }
.mh h3 { font: 800 21px/1.2 var(--f-body); letter-spacing: -0.01em; }
.mh h3 .evname { color: var(--muted); font-weight: 700; }
.mh .sum svg { display: inline-block; vertical-align: -1px; margin: 0 2px 0 6px; }
.mh .sum { margin: 6px 0 0; color: var(--text); font-size: 15px; line-height: 1.5; min-height: 1.5em; }
.mh .sum b, .p-side b.n, .num { font-family: var(--f-num); font-weight: 900; font-size: 1.32em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.viz { position: relative; margin-top: 18px; touch-action: pan-y; }
.viz svg { display: block; width: 100%; overflow: visible; }
.viz text { font: 500 12px var(--f-body); fill: var(--muted); }
.viz .ax line, .viz line.grid { stroke: var(--soft); }
.viz .ax .base { stroke: var(--line); }
.viz .big { font: 900 22px var(--f-num); fill: var(--ink); }
.viz .tl { font: 700 13px var(--f-body); fill: var(--ink); }
.viz canvas { display: block; }
.viz .hit { fill: transparent; cursor: pointer; }

/* la de las edades: las barras (hombres arriba, mujeres abajo, como en el carrusel) */
.vhist rect.b { fill: var(--grey); transition: fill .25s; }
.vhist rect.b.on { fill: var(--ink); }
.vhist .face { transition: opacity .3s; }
.vhist .face text { font: 700 12px var(--f-body); fill: var(--ink); }
.vhist .med line { stroke: var(--ink); stroke-dasharray: 2 3; }
.vhist .you { fill: var(--rope); stroke: var(--ink); stroke-width: 1.5; }

/* la lista de al lado */
.p-side h4 { font: 800 19px/1.25 var(--f-body); margin: 0; }
.p-side .hint { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
/* sin barra propia: los primeros que caben y «See all» lleva a la tabla con esa edad (Hugo, 23-11) */
.p-side ol { list-style: none; margin: 14px 0 0; padding: 0; }
.p-side li { display: grid; grid-template-columns: 26px 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--soft); }
.p-side li .rk { font: 900 18px var(--f-num); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.p-side li a, .p-side li .nm { font: 700 15px/1.2 var(--f-body); color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.p-side li a:hover { text-decoration: underline; }
.p-side li small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.p-side li .fl { width: 16px; height: 16px; }
.p-side li .tm { font: 900 20px var(--f-num); font-variant-numeric: tabular-nums; text-align: right; }
.p-side li.you { background: linear-gradient(90deg, rgba(242, 194, 48, .35), rgba(242, 194, 48, 0)); }
.p-side .more { display: inline-block; margin-top: 12px; border: 0; background: none; padding: 0; cursor: pointer; }
.p-side .card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.p-side .card .av { width: 64px; height: 64px; }
.p-side .card h4 a { color: var(--ink); text-decoration: none; }
.p-side .card h4 a:hover { text-decoration: underline; }
.p-side .clear { border: 0; background: none; color: var(--fast); font: 700 14px var(--f-body); padding: 0; cursor: pointer; margin-top: 4px; }

/* las caras sobre las barras, como en el carrusel */
.vhist .fc { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 3px; transform: translateX(-50%); text-decoration: none; color: var(--ink);
  font: 700 12px/1 var(--f-body); white-space: nowrap; animation: fcpop .55s var(--spring) both; }
.vhist .fc .av { box-shadow: 0 0 0 2px var(--panel); }
.vhist a.fc:hover span { text-decoration: underline; }
.vhist .stem { stroke: var(--ink); stroke-width: 1; animation: stemin .3s both; }
@keyframes stemin { from { opacity: 0; } }
@keyframes fcpop { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.5); } }

/* prueba a prueba */
.evs .row-hit { fill: transparent; cursor: pointer; }
.evs .row-hit:hover, .evs .sel { fill: var(--bg); }
.evs .iqr { stroke-width: 6; stroke-linecap: round; }
.evs .m { stroke: var(--ink); } .evs .w { stroke: var(--text); }
.evs .iqr.m { stroke: var(--grey); } .evs .iqr.w { stroke: var(--soft); }
.evs circle.m { fill: var(--ink); stroke: none; } .evs circle.w { fill: var(--panel); stroke: var(--ink); stroke-width: 2; }
.evs .evn { font: 600 13px var(--f-body); fill: var(--ink); }
.evs .evn.dim { fill: var(--muted); }

/* carreras */
.crs .pre { stroke: var(--grey); stroke-width: 2; stroke-dasharray: 2 4; stroke-linecap: round; }
.crs .near { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.crs .first { fill: var(--panel); stroke: var(--muted); stroke-width: 1.5; }
.crs .best { fill: var(--rope); stroke: var(--ink); stroke-width: 1.5; }
.crs .nm { font: 700 13px var(--f-body); fill: var(--ink); }
.crs .nm.you { fill: var(--ink); }
.crs .tm { font: 900 15px var(--f-num); fill: var(--muted); }
.crs .youbg { fill: rgba(242, 194, 48, .3); }
.crs .key text { font: 500 12px var(--f-body); fill: var(--text); }
.crs a:hover .nm { text-decoration: underline; }

.crs { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); column-gap: clamp(28px, 3.6vw, 56px); }
.crs .ccol { min-width: 0; }
.crs .ccol.wide { grid-column: 1 / -1; margin-bottom: 18px; }
.crs h4 { font: 700 15px var(--f-body); margin: 0 0 4px; min-height: 1.3em; }
.crs .crow, .crs .cax { display: grid; grid-template-columns: var(--nw, 180px) minmax(0, 1fr) 58px; gap: 10px; align-items: center; }
.crs .crow { height: 34px; border-top: 1px solid var(--soft); }
.crs .crow.you { background: linear-gradient(90deg, rgba(242, 194, 48, .38), rgba(242, 194, 48, 0) 70%); }
.crs .cn { display: flex; align-items: center; gap: 8px; min-width: 0; text-decoration: none; color: var(--ink); }
.crs .cn span { min-width: 0; font: 700 14px/1.1 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crs .cn small { display: block; font: 500 12px var(--f-body); color: var(--muted); }
.crs a.cn:hover span b { text-decoration: underline; }
.crs .cn b { font-weight: 700; }
.crs .ct { font: 900 17px var(--f-num); text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.crs svg { width: 100%; height: 20px; }
.crs .cax svg { height: 18px; }
.key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 6px; font-size: 13px; color: var(--text); }
.key span { display: inline-flex; align-items: center; gap: 6px; }

/* por año */
.era path { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.era .m { stroke: var(--ink); } .era .w { stroke: var(--ink); stroke-dasharray: 1 0; }
.era .dim { stroke: var(--grey); }
.era .end { font: 700 13px var(--f-body); fill: var(--ink); }
.era .end.dim { fill: var(--muted); }
.era .cur line { stroke: var(--line); }

/* la tabla */
.tbl { margin-top: 16px; overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { font: 600 13px var(--f-body); color: var(--muted); text-align: right; padding: 0 10px 10px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl th button { border: 0; background: none; font: inherit; color: inherit; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tbl th button:hover, .tbl th button.on { color: var(--ink); }
.tbl th button svg { width: 10px; height: 10px; opacity: 0; }
.tbl th button.on svg { opacity: 1; }
@media (pointer: coarse) {
  .tbl th { padding-bottom: 0; }
  .tbl th button { min-height: 40px; min-width: 30px; }
  .p-side .more { min-height: 40px; }
  .tbl .tfoot button, .agechip { min-height: 40px; }
}
.tbl th button.on.asc svg { transform: rotate(180deg); }
.tbl th:nth-child(2), .tbl td:nth-child(2), .tbl th:nth-child(3), .tbl td:nth-child(3) { text-align: left; }
.tbl td { padding: 8px 10px; border-top: 1px solid var(--soft); text-align: right; white-space: nowrap; font-size: 15px; color: var(--text); }
.tbl td.n { font: 900 19px var(--f-num); color: var(--ink); }
.tbl td.rk { font: 900 19px var(--f-num); color: var(--muted); }
.tbl td .sw { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.tbl td a.sw:hover { text-decoration: underline; }
.tbl tr.you td { background: rgba(242, 194, 48, .28); }
.tbl .nmw small { display: none; }
/* la tabla en el móvil: puesto, nadador (con la prueba y el año debajo), tiempo y edad; sin deslizarse de lado */
@media (max-width: 600px) {
  .tbl { overflow: visible; }
  .tbl table { table-layout: fixed; }
  .tbl th:nth-child(n+3), .tbl td:nth-child(n+3) { display: none; }
  .tbl th:nth-child(4), .tbl td:nth-child(4), .tbl th:nth-child(5), .tbl td:nth-child(5) { display: table-cell; }
  .tbl th:nth-child(1) { width: 34px; } .tbl th:nth-child(4) { width: 76px; } .tbl th:nth-child(5) { width: 44px; }
  .tbl th:nth-child(5) button { font-size: 0; } .tbl th:nth-child(5) button::before { content: 'Age'; font-size: 13px; }
  .tbl th, .tbl td { padding-left: 4px; padding-right: 4px; }
  .tbl td .sw { gap: 8px; min-width: 0; }
  .tbl .nmw { display: flex; flex-direction: column; min-width: 0; }
  .tbl .nmw span { overflow: hidden; text-overflow: ellipsis; }
  .tbl .nmw small { display: block; font: 500 12px var(--f-body); color: var(--muted); }
}
.tbl .st-done { color: var(--muted); }
.tbl .tfoot { display: flex; align-items: center; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.tbl .tfoot button, .agechip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 14px; font: 700 14px var(--f-body); color: var(--ink); cursor: pointer; }
.tbl .tfoot button:hover, .agechip:hover { border-color: var(--ink); }
.agechip { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 3px 10px; font-size: 13px; vertical-align: 1px; }
.empty { padding: 30px 0; color: var(--muted); }

.method { margin-top: 10px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--text); font-size: 15px; }
.method summary { cursor: pointer; font: 700 16px var(--f-body); color: var(--ink); }
.method ul { margin: 14px 0 0; padding-left: 20px; max-width: 60em; }
.method li { margin: 0 0 8px; }


@media (max-width: 1100px) {
  .p-side, .p-events, .p-rank, .p-era { grid-column: 1 / -1; }
  .p-ages { grid-column: span 7; } .p-post { grid-column: span 5; }
  .p-side ol { columns: 2; column-gap: 32px; }
  .p-side li { break-inside: avoid; }
}
/* móvil: las gráficas una debajo de otra y la barra de filtros fija arriba (una sola línea, docs/web-estilo.md) */
@media (max-width: 760px) {
  .mesa .grid { column-gap: 0; }
  .p-side .more { margin-top: 0; padding: 12px 0; }   /* 40 px para el dedo */
  .tbl th button { min-height: 40px; min-width: 32px; }
  .moreb { min-height: 40px; }   /* una columna: los huecos entre las doce sobraban y la sacaban de la pantalla a 320 px */
  .pane { grid-column: 1 / -1; }
  .p-post { order: -1; padding-top: 24px; }
  .p-ages { border-top: 1px solid var(--line); }
  .p-side ol { columns: 1; }
}

@media (prefers-reduced-motion: reduce) { .media .nav { transition: none; } .vhist .fc, .vhist .stem { animation: none; } .shrow .pic, .cover .go { transition: none; } }
@media (forced-colors: active) {
  .who-find:focus-within { outline: 2px solid Highlight; }
}
