:root{color-scheme:light;--ink:#151515;--muted:#5b5656;--red:#c71530;--paper:#f5f4f2;--edge:#dfdcda}*{box-sizing:border-box}[hidden]{display:none!important}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);background:var(--paper);font:16px/1.5 "Instrument Sans",Arial,sans-serif}.wrap{width:min(1100px,calc(100% - 36px));margin-inline:auto}header{background:var(--ink);color:white;border-bottom:4px solid var(--red)}.mast{display:flex;align-items:center;justify-content:space-between;min-height:66px}.mast img{display:block;object-fit:contain}.mast a{color:inherit}.hero{padding:36px 0 23px}.overline{font-size:.76rem;font-weight:800;letter-spacing:.15em;color:var(--red);margin:0 0 6px}h1{font-size:clamp(2.4rem,7vw,4.65rem);line-height:1;letter-spacing:-.06em;margin:0}h1 span{color:var(--red)}h2{line-height:1.25;margin:0 0 9px;font-size:1.45rem}p{margin:0 0 12px}.hero p:last-child{margin:12px 0 0;color:var(--muted)}.layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(250px,1fr);gap:16px;align-items:start}.card{background:white;border:1px solid var(--edge);padding:clamp(15px,3vw,24px);border-radius:8px;min-width:0}.primary-card{min-height:230px}.modes,.account-tabs,.actions,.start{display:flex;gap:8px;flex-wrap:wrap}.modes,.account-tabs{margin-bottom:18px}.start{align-items:end;margin-top:14px}.actions{margin-top:15px}button,input,select{font:inherit}button{border:1px solid var(--edge);border-radius:5px;background:white;color:var(--ink);cursor:pointer;padding:8px 12px;min-height:42px;font-size:.9rem;font-weight:700}button:hover:not(:disabled){border-color:#717171}button[aria-pressed=true]{background:var(--ink);color:white;border-color:var(--ink)}button:disabled{cursor:default;opacity:.76}.red{background:var(--red);color:white;border-color:var(--red)}.red:hover:not(:disabled){background:#a90b23}.quiet{background:#f6f5f4}.error{color:#a31127;font-size:.88rem}.error:empty{display:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--red);outline-offset:2px}label{display:grid;gap:3px;font-size:.86rem;font-weight:700}input,select{min-width:0;width:100%;min-height:40px;border:1px solid #a7a3a2;padding:6px 9px;border-radius:4px;background:white;color:var(--ink)}small,.fine{color:var(--muted);font-size:.8rem;font-weight:400}form,form>div{display:grid;gap:10px}details{margin:14px 0}summary{cursor:pointer;text-decoration:underline;font-weight:700;font-size:.85rem}details form{margin-top:8px}.check{display:flex;align-items:flex-start;gap:8px;margin:4px 0}.check input{width:17px;min-height:17px;accent-color:var(--red)}.activity-top{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:10px;color:var(--muted);font-weight:700;font-size:.85rem}.activity-top #score{margin-left:auto;color:var(--ink)}.badge{display:inline-block;padding:3px 8px;border-radius:4px}.badge[data-level=Básico]{background:#daf2df;color:#205932}.badge[data-level=Intermedio]{background:#ffecb2;color:#604500}.badge[data-level=Avanzado]{background:#ffdce1;color:#8d1328}.clock{display:flex;gap:10px;align-items:center;margin-bottom:14px}.clock label{min-width:39px;font-variant-numeric:tabular-nums}progress{width:100%;height:8px;accent-color:var(--red)}.concept,.feedback,.finish{padding:12px 14px;background:#f5f4f2;border-left:3px solid var(--ink);margin:0 0 12px}.concept p,.feedback p,.finish p{margin:5px 0 0}.choices{display:grid;gap:7px}.choice{text-align:left;display:grid;grid-template-columns:22px 1fr;gap:9px;font-weight:500}.choice b{color:var(--red)}.choice[data-result=correct]{border-color:#27743a;background:#e9f5e9;opacity:1}.choice[data-result=wrong]{border-color:#ad1d33;background:#fce9ed;opacity:1}.feedback,.finish{margin-top:12px}.rank{margin-top:16px}.rank-head{display:flex;justify-content:space-between;gap:13px;align-items:end;margin-bottom:10px}.rank-head p{margin:0;color:var(--muted)}.rank-head label{min-width:130px}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:.91rem}th,td{padding:9px 8px;border-bottom:1px solid var(--edge);white-space:nowrap}th{background:var(--paper)}#rank-status{margin:8px 0 0;color:var(--muted)}footer{color:var(--muted);padding:23px 0;font-size:.82rem}@media(max-width:740px){.layout{grid-template-columns:1fr}.hero{padding-top:25px}.rank-head{align-items:start;flex-direction:column}}

body{--red:#b5122c;--paper:#f8f6f5}
header{background:#fff;color:var(--ink);border-bottom:1px solid var(--edge)}
.mast{min-height:66px;gap:12px}
.mast img{width:clamp(132px,35vw,164px);height:auto}
.mast .ranking-link{display:inline-flex;align-items:center;gap:9px;padding:8px 13px;min-height:42px;border:1px solid #ead0d4;border-radius:7px;color:var(--red);background:#fff5f6;font-size:.88rem;font-weight:700;text-decoration:none;white-space:nowrap}
.ranking-link:hover{background:#fce7eb}
.ranking-link span{font-size:1.02rem}
.hero{padding:28px 0 23px}
.hero .breadcrumb{display:inline-block;margin-bottom:13px;color:var(--muted);font-size:.86rem;text-decoration:none}
.breadcrumb:hover{text-decoration:underline}
.hero h1{font-size:clamp(2.1rem,6vw,4.2rem)}
.layout{grid-template-columns:minmax(0,1.75fr) minmax(265px,1fr);gap:20px}
.card{border-radius:12px}
.modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:20px}
.modes button{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:4px;text-align:left;min-height:66px;padding:10px 13px;border-radius:8px;color:var(--ink)}
.modes button small{font-size:.78rem}
.modes button[aria-pressed="true"]{border-color:#ca5769;background:#fff0f3;color:#95142a;box-shadow:inset 0 -2px 0 #bd223c}
.modes button[aria-pressed="true"] small{color:#713441}
.start{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:10px;max-width:460px}
.start select,.start button{width:100%;height:46px;min-height:46px;margin:0}
.start button{padding:6px}
#resume{margin-top:10px}
.account h2{margin-bottom:13px}
.account #account-form button{min-height:44px}
.account-switch{text-align:center;font-size:.82rem;margin:8px 0 0;color:var(--muted)}
.account-switch button{font-size:inherit;border:0;min-height:34px;padding:3px 4px;color:#95142a;background:transparent;text-decoration:underline;text-underline-offset:3px}
.account #recovery{border-top:1px solid var(--edge);padding-top:9px;margin:7px 0 0}
.account #recovery summary{display:inline-flex;align-items:center;min-height:35px;color:var(--muted);font-weight:600}
.account .fine{margin:3px 0 0}
.rank{scroll-margin-top:16px}
@media(max-width:740px){.layout{grid-template-columns:minmax(0,1fr);gap:13px}.hero{padding-top:19px}.rank-head{display:grid;gap:10px}}
@media(max-width:370px){.wrap{width:calc(100% - 24px)}.modes button{padding-inline:8px}.modes button small{font-size:.72rem}}

.actions{align-items:center;justify-content:space-between;column-gap:16px}
.back-link{margin-inline-start:auto;padding:5px 2px;border:0;background:transparent;color:var(--muted);font-size:.78rem;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.back-link:hover:not(:disabled){color:var(--red)}
.rank{overflow:hidden;border:1px solid #e7d8db;border-radius:12px;background:#fff;box-shadow:0 10px 24px #4a101009}
.rank-head{display:block;margin:0;padding:clamp(18px,4vw,30px);background:linear-gradient(112deg,#9d102a,#c71530 65%,#d32a43);color:#fff}
.rank-head h2{font-size:clamp(1.6rem,4.5vw,2.25rem);letter-spacing:-.035em;margin-bottom:5px}
.rank-head p{color:#fff3f5;font-size:.88rem}
.rank-content{padding:clamp(12px,3vw,22px)}
.rank-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:14px}
.rank-filters button{padding-inline:3px;border-radius:7px;background:#faf9f8;font-size:clamp(.72rem,2.4vw,.88rem)}
.rank-filters [data-level="Básico"]{--level-ink:#205932;--level-bg:#e8f6e9}
.rank-filters [data-level="Intermedio"]{--level-ink:#614300;--level-bg:#fff2cc}
.rank-filters [data-level="Avanzado"]{--level-ink:#8d1328;--level-bg:#ffe9ee}
.rank-filters [data-level="Mixto"]{--level-ink:#52357a;--level-bg:#f0e8fb}
.rank-filters button[aria-pressed="true"]{color:var(--level-ink);background:var(--level-bg);border-color:var(--level-ink)}
.rank .table-scroll{border:1px solid #eee6e7;border-radius:8px}
.rank th,.rank td{padding:9px clamp(6px,2vw,14px);border-color:#f0eaeb}
.rank th{color:#5e343c;background:#faf1f3;font-size:clamp(.72rem,2.4vw,.82rem)}
.rank td:first-child,.rank td:nth-child(n+3),.rank th:first-child,.rank th:nth-child(n+3){text-align:center}
.rank td:nth-child(n+3){font-variant-numeric:tabular-nums}
.rank tbody tr:nth-child(even){background:#fbfaf9}
.rank tbody tr:last-child td{border-bottom:0}
.rank-referee{white-space:normal;overflow-wrap:anywhere;width:100%}
.rank-referee small{display:block;font-size:.76rem}
.rank-place{display:inline-grid;place-items:center;min-width:1.9rem;height:1.9rem;padding-inline:4px;border-radius:50%;background:#f4efee;font-weight:800}
.rank-place[data-place="1"]{background:#ffedb0;color:#674700}
.rank-place[data-place="2"]{background:#e9edf4;color:#344360}
.rank-place[data-place="3"]{background:#f9e3d5;color:#743e22}
#rank-status:not(:empty){margin-top:12px;padding:13px 10px;text-align:center;background:#fbf7f7;border-radius:7px}
#leave-dialog{width:min(400px,calc(100% - 30px));border:1px solid var(--edge);border-radius:12px;padding:22px;color:var(--ink);box-shadow:0 18px 55px #0003}
#leave-dialog::backdrop{background:#19101380}
.leave-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:18px}

.start-status{grid-column:1 / -1;margin:0;padding:9px 12px;border-left:3px solid var(--red);border-radius:4px;background:#fff0f3;color:#8d1328;font-size:.88rem}
.start-status:empty{display:none}
