.aepuzz-stats{--red:#bd1823;--ink:#222;--muted:#626262;--line:#dedede;--paper:#fff;--soft:#f5f5f5}
.aepuzz-stats *{box-sizing:border-box}
.aepuzz-stats{margin:0;color:var(--ink);background:var(--paper);font:16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.aepuzz-stats a{color:var(--red);text-underline-offset:3px}
.aepuzz-stats button,.aepuzz-stats input,.aepuzz-stats select{font:inherit}
.aepuzz-stats button{cursor:pointer}
.aepuzz-stats button:focus-visible,.aepuzz-stats a:focus-visible,.aepuzz-stats input:focus-visible,.aepuzz-stats select:focus-visible,.aepuzz-stats summary:focus-visible{outline:3px solid #222;outline-offset:3px}
.aepuzz-stats{max-width:1180px;margin:auto;padding:0 24px}
.aepuzz-stats .intro{padding:42px 0 24px}
.aepuzz-stats .eyebrow{font-size:.76rem;letter-spacing:.13em;color:var(--red);font-weight:750}
.aepuzz-stats .intro h1{font-size:clamp(28px,4.5vw,45px);line-height:1.13;margin:10px 0}
.aepuzz-stats .intro p{max-width:780px;color:var(--muted);margin:0 0 12px}
.aepuzz-stats .pilot{font-size:.82rem;color:#666}
.aepuzz-stats .tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:20px}
.aepuzz-stats .tabs button{border:0;border-bottom:3px solid transparent;background:#fff;padding:12px 14px;color:#444;font-weight:650}
.aepuzz-stats .tabs button[aria-pressed=true]{border-bottom-color:var(--red);color:var(--red)}
.aepuzz-stats .filterbox{border:1px solid var(--line);padding:20px;background:#fafafa}
.aepuzz-stats .searchline{margin-bottom:16px}
.aepuzz-stats .inline{display:flex;gap:8px}
.aepuzz-stats .inline input{flex:1;min-width:0}
.aepuzz-stats label{display:block;font-size:.86rem;font-weight:650}
.aepuzz-stats input,.aepuzz-stats select{display:block;width:100%;margin-top:5px;min-height:44px;background:white;border:1px solid #b7b7b7;border-radius:4px;padding:8px 10px;color:#222}
.aepuzz-stats button.primary,.aepuzz-stats button.secondary{min-height:44px;border-radius:4px;padding:9px 16px;font-weight:650;border:1px solid var(--red)}
.aepuzz-stats button.primary{background:var(--red);color:#fff;align-self:end}
.aepuzz-stats button.secondary{background:#fff;color:#333;border-color:#aaa}
.aepuzz-stats .filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;align-items:end}
.aepuzz-stats .pick{display:block;width:100%;text-align:left;background:white;border:1px solid var(--line);padding:12px;margin:6px 0;border-radius:4px}
.aepuzz-stats .pick:hover{border-color:var(--red)}
.aepuzz-stats .pick span{display:block;color:var(--muted);font-size:.85rem}
.aepuzz-stats .picked{color:var(--red);font-weight:650;margin:8px 0}
.aepuzz-stats #comparepick{margin-bottom:16px}
.aepuzz-stats #status{min-height:28px;margin-top:18px;color:var(--muted)}
.aepuzz-stats #status.error{color:#a0131c;font-weight:650}
.aepuzz-stats #results{margin:6px 0 30px}
.aepuzz-stats .metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;margin:16px 0 24px}
.aepuzz-stats .metric{border:1px solid var(--line);padding:15px 16px;min-width:0}
.aepuzz-stats .metric small{display:block;color:var(--muted)}
.aepuzz-stats .metric strong{display:block;font-size:30px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--red)}
.aepuzz-stats h2{font-size:1.45rem;line-height:1.2;margin:24px 0 12px}
.aepuzz-stats h3{font-size:1.15rem;margin:20px 0 10px}
.aepuzz-stats .muted{color:var(--muted);font-size:.88rem}
.aepuzz-stats .tablewrap{overflow-x:auto;border:1px solid var(--line);margin:12px 0}
.aepuzz-stats table{width:100%;border-collapse:collapse;font-size:.92rem;text-align:left}
.aepuzz-stats th,.aepuzz-stats td{padding:11px 12px;vertical-align:top;border-bottom:1px solid var(--line)}
.aepuzz-stats th{background:#f1f1f1;white-space:nowrap}
.aepuzz-stats td.num,.aepuzz-stats th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.aepuzz-stats tbody tr:last-child td{border-bottom:0}
.aepuzz-stats tbody tr:hover{background:#fafafa}
.aepuzz-stats .pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0}
.aepuzz-stats .pager button:disabled{opacity:.45;cursor:default}
.aepuzz-stats .empty{padding:28px;border:1px solid var(--line);background:#fafafa;color:#555}
.aepuzz-stats .chart{border:1px solid var(--line);padding:16px;margin:12px 0}
.aepuzz-stats .chart svg{width:100%;height:auto;max-height:300px;display:block}
.aepuzz-stats .chart label{max-width:450px}
.aepuzz-stats .notes{border-top:1px solid var(--line);padding:18px 0 30px;color:var(--muted);font-size:.9rem}
.aepuzz-stats .notes summary{font-weight:650;cursor:pointer}
.aepuzz-stats .bars{display:grid;gap:8px}
.aepuzz-stats .barrow{display:grid;grid-template-columns:55px 1fr 70px;gap:10px;align-items:center;font-size:.88rem}
.aepuzz-stats .bar{height:13px;background:var(--red);min-width:2px}
.aepuzz-stats .track{background:#eee}
.aepuzz-stats .barrow strong{text-align:right}
.aepuzz-stats [hidden]{display:none!important}
@media(max-width:760px){.aepuzz-stats{padding:0 16px}
.aepuzz-stats .intro{padding:28px 0 18px}
.aepuzz-stats .tabs{gap:0}
.aepuzz-stats .tabs button{padding:10px 9px;font-size:.85rem}
.aepuzz-stats .filters{grid-template-columns:repeat(2,minmax(0,1fr))}
.aepuzz-stats .filterbox{padding:14px}
.aepuzz-stats .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
.aepuzz-stats .metric strong{font-size:25px}
.aepuzz-stats th,.aepuzz-stats td{padding:9px 10px}
.aepuzz-stats .tablewrap{margin-right:0}
.aepuzz-stats .pager{font-size:.83rem}}
.aepuzz-stats .rank-bars{display:grid;gap:12px}
.aepuzz-stats .rank-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,2fr) minmax(42px,auto);align-items:center;gap:10px;font-size:.88rem}
.aepuzz-stats .rank-row strong{text-align:right;font-variant-numeric:tabular-nums}
.aepuzz-stats .rank-label{overflow-wrap:anywhere}
.aepuzz-stats .rank-row .bar{min-width:0}
.aepuzz-stats .tablewrap .pick{min-width:120px}
.aepuzz-stats{min-width:0}
.aepuzz-stats select:disabled{opacity:.55}
.aepuzz-stats .chart h3:first-child{margin-top:0}
@media(max-width:480px){.aepuzz-stats .rank-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px;gap:6px}
.aepuzz-stats .pager{flex-wrap:wrap}
.aepuzz-stats .metric strong{font-size:22px}
.aepuzz-stats .tabs button{flex:1 1 43%;text-align:left}}
.aepuzz-stats .year-records{border:1px solid var(--line);margin:12px 0;padding:12px 16px}
.aepuzz-stats .year-records summary{font-weight:700;cursor:pointer;padding:6px 0}
.aepuzz-stats .year-records .tablewrap{margin-bottom:0}
.aepuzz-stats .tabs button{flex:0 1 auto}
@media(max-width:600px){.aepuzz-stats .tabs button{padding:10px 9px;font-size:.88rem}
.aepuzz-stats .year-records{padding:8px}}
.aepuzz-stats .cohort-legend{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:12px;font-size:.85rem;color:var(--muted)}
.aepuzz-stats .cohort-legend span:before{content:"";display:inline-block;width:11px;height:11px;margin-right:6px;vertical-align:baseline;background:var(--red)}
.aepuzz-stats .cohort-legend .cohort-repeat-label:before{background:#606060}
.aepuzz-stats .cohort-track{display:flex;min-width:0;height:18px;background:#eee}
.aepuzz-stats .cohort-new{background:var(--red)}
.aepuzz-stats .cohort-repeat{background:#606060}
.aepuzz-stats .mode-block{border:1px solid var(--line);border-left:3px solid var(--red);margin:14px 0;padding:16px}
.aepuzz-stats .mode-block>h3{margin:0 0 12px;color:var(--red);font-size:1.2rem}
.aepuzz-stats .mode-block h4{font-size:1rem;margin:14px 0 8px}
.aepuzz-stats .mode-block .metrics{margin:10px 0}
.aepuzz-stats .mode-block .year-records{margin:8px 0}
.aepuzz-stats .mode-block .tablewrap{margin:8px 0}
@media(max-width:600px){.aepuzz-stats .mode-block{padding:10px}}
.aepuzz-stats .event-links{display:grid;gap:.45rem;min-width:12rem}
.aepuzz-stats .event-links .pick{text-align:left}
.aepuzz-stats .event-links a{display:block;font-weight:600;line-height:1.35}
.aepuzz-stats .event-links details{margin:0;padding:0;border:0;background:transparent}
.aepuzz-stats .event-links details a{padding:.35rem 0}
.aepuzz-stats .event-links summary{cursor:pointer;font-size:.86rem;color:inherit}
.aepuzz-stats .puzzle-cell{display:flex;align-items:center;gap:.55rem;min-width:145px}
.aepuzz-stats .puzzle-cell img{width:76px;height:60px;object-fit:contain;background:#f6f6f6;border:1px solid #ddd;border-radius:4px}
.aepuzz-stats .puzzle-cell small{display:block;font-size:.75rem}
.aepuzz-stats .puzzle-feature .puzzle-cell img{width:clamp(150px,34vw,350px);height:auto;max-height:270px;object-fit:contain}
.aepuzz-stats .puzzle-feature{margin:1rem 0}
.aepuzz-stats .puzzle-preview{padding:.75rem;border-top:1px solid #ddd}
.aepuzz-stats .chart svg circle[role=button]{cursor:pointer}
.aepuzz-stats .chart svg circle[role=button]:focus{stroke:#111;stroke-width:3}
/* Línea visual común con Mis participaciones. Solo se carga en estadísticas v9. */
body.aep-stats-page{padding-top:0;padding-bottom:64px;background:#f8f6f6!important}
.aep-stats-page #header_falso{height:76px;margin:0}
.aep-stats-page footer{z-index:20}
.aepuzz-stats{--red:#bd1823;--red-dark:#a01620;--red-soft:#fbf0f1;--line:#e1dddd;--muted:#595959;background:transparent;max-width:1320px;padding:24px clamp(14px,2.4vw,32px) 36px;min-width:0}
.aepuzz-stats .intro{padding:10px 0 16px}.aepuzz-stats .intro h1{font-size:clamp(1.7rem,3.8vw,2.4rem);font-weight:750;letter-spacing:-.025em}
.aepuzz-stats .eyebrow{letter-spacing:.08em}.aepuzz-stats .legacy-link{font-size:.86rem;margin:6px 0 0}.aepuzz-stats .legacy-link a{font-weight:600}
.aepuzz-stats .tabs{gap:4px 8px}.aepuzz-stats .tabs button{background:transparent;border-radius:5px 5px 0 0;line-height:1.35}.aepuzz-stats .tabs button[aria-pressed=true]{background:var(--red-soft);color:var(--red-dark)}.aepuzz-stats .tabs button:hover{background:#f5ecec}
.aepuzz-stats .filterbox,.aepuzz-stats #results:not(:empty){background:#fff;border:1px solid var(--line);border-radius:8px;padding:clamp(14px,2.1vw,22px);min-width:0}
.aepuzz-stats .filterbox .filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}.aepuzz-stats .filters label{flex:1 1 155px;min-width:0;margin:0;display:block}.aepuzz-stats .filters button{flex:0 0 auto;align-self:flex-end}
.aepuzz-stats .filterbox label{font-weight:600;line-height:1.3}.aepuzz-stats .filterbox select,.aepuzz-stats .filterbox input,.aepuzz-stats .filterbox .inline button,.aepuzz-stats .filterbox #reset{box-sizing:border-box;height:44px;min-height:44px;max-height:44px;line-height:1.25;font-size:.92rem}.aepuzz-stats .filterbox .inline button,.aepuzz-stats .filterbox #reset{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;margin:0}.aepuzz-stats .filterbox select{margin-top:5px}.aepuzz-stats .searchline .inline input,.aepuzz-stats #comparepick .inline input{margin-top:0}.aepuzz-stats .inline{margin-top:5px}
.aepuzz-stats h2{color:var(--red-dark);font-size:1.28rem;font-weight:750;line-height:1.35;padding:0 0 10px;margin:24px 0 15px;border-bottom:2px solid #efd0d3}.aepuzz-stats #results>h2:first-child{margin-top:0}.aepuzz-stats h3{color:var(--red-dark);font-size:1.08rem;font-weight:700;line-height:1.4;padding:8px 12px;border-left:3px solid var(--red);background:var(--red-soft);border-radius:0 4px 4px 0}.aepuzz-stats h4{font-size:1rem;font-weight:700;color:var(--red-dark)}
.aepuzz-stats .metric{border-left:3px solid var(--red);border-radius:6px;background:#fff}.aepuzz-stats .metric small{font-weight:600;font-size:.84rem}.aepuzz-stats .metric strong{color:var(--red-dark);font-size:clamp(1.2rem,2.2vw,1.8rem);overflow-wrap:anywhere;line-height:1.25;margin-top:5px}.aepuzz-stats .chart,.aepuzz-stats .mode-block,.aepuzz-stats .year-records,.aepuzz-stats .tablewrap{border-radius:6px;background:#fff}.aepuzz-stats .chart h3:first-child,.aepuzz-stats .mode-block>h3{margin-top:0}.aepuzz-stats th{background:var(--red-soft);color:var(--red-dark);border-bottom-color:#e3c6c9;font-weight:700}.aepuzz-stats td{border-color:#eee;vertical-align:middle}.aepuzz-stats .empty{background:var(--red-soft);border-left:3px solid var(--red);border-radius:4px}.aepuzz-stats .year-records summary{color:var(--red-dark)}.aepuzz-stats .notes{padding-bottom:12px}
@media(max-width:640px){.aepuzz-stats{padding-top:14px}.aepuzz-stats .filters label{flex:1 1 calc(50% - 12px)}.aepuzz-stats .filters button{width:100%}.aepuzz-stats .filterbox{padding:12px}.aepuzz-stats .tabs button{font-size:.85rem}.aepuzz-stats .metric{padding:10px}.aepuzz-stats .tablewrap{max-width:100%}}
@media(max-width:360px){.aepuzz-stats .filters label{flex:1 1 100%}.aepuzz-stats .metrics{grid-template-columns:1fr}}
