@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Barlow:wght@400;500;600;700&display=swap');
.back-menu{display:inline-flex;align-items:center;gap:8px;margin-bottom:28px;padding:10px 0;color:var(--muted);font-size:13px;font-weight:600;text-decoration:none}.back-menu:hover{color:var(--accent)}
/* Keep the shared header visible while preserving its space in the layout. */
body>header{position:sticky;top:0;z-index:100;background:var(--bg);box-shadow:0 4px 16px #0003}
main>.page-nav{position:sticky;top:var(--header-height,81px);z-index:90;background:var(--bg);flex-wrap:wrap;padding-top:12px;box-shadow:0 6px 12px #0002}
html{scroll-padding-top:calc(var(--header-height,81px) + var(--navigation-height,70px) + 16px)}
.driver-categories{display:flex;flex-direction:column;gap:6px;margin:12px 0}.driver-category-row{display:flex;align-items:center;gap:6px;min-width:0}.driver-category-tag,.driver-vehicle-tag{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:36px;padding:5px 8px;border:1px solid #3b433d;border-radius:4px;background:#111713;color:var(--accent);font-size:10px;letter-spacing:.5px}.driver-category-tag{flex:0 0 66px}.driver-category-tag.is-primary{border-color:#748941}.driver-category-tag img,.driver-vehicle-tag .brand-logo{display:block;width:48px;height:24px;object-fit:contain;object-position:center;flex-shrink:0}.driver-vehicle-tag{min-width:0}.driver-vehicle-tag span{overflow-wrap:anywhere}.detail-info .driver-categories{margin-bottom:20px}
.page-nav{display:flex;gap:8px;margin-bottom:35px;border-bottom:1px solid #343b34;padding-bottom:14px}.page-nav a{color:var(--muted);text-decoration:none;padding:10px 20px;border-radius:4px;font-weight:600;font-size:14px}.page-nav a[aria-current]{color:var(--accent);background:#d9ff5f12}.page-nav a:hover{color:var(--accent)}
.circuits-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.circuit-card{border:1px solid #343b34;border-radius:8px;overflow:hidden;background:var(--panel)}.circuit-visual{min-height:220px;padding:24px;display:flex;flex-direction:column;justify-content:space-between;background:repeating-linear-gradient(125deg,transparent 0 35px,#ffffff03 35px 37px),radial-gradient(ellipse at bottom right,#3a482d,#18201b)}.circuit-wordmark{font:italic 800 clamp(34px,4vw,60px)/1 'Barlow Condensed',Impact,sans-serif;text-transform:uppercase;letter-spacing:1px;overflow-wrap:anywhere}.track-pending{font-size:11px;color:var(--muted)}.circuit-body{padding:24px}.circuit-body h3{font-size:24px}.circuit-stats{display:flex;align-items:center;gap:14px;margin:24px 0}.circuit-stats strong{font:700 48px/1 'Barlow Condensed',Impact,sans-serif;color:var(--accent)}.circuit-stats span{font-size:12px;color:var(--muted);max-width:100px}.calendar-button{font:600 11px Barlow,Arial,sans-serif;letter-spacing:1.5px;color:var(--accent);background:transparent;border:1px solid #53633b;border-radius:4px;padding:12px 16px;cursor:pointer}.calendar-button:hover{background:#d9ff5f15}.season-calendar{margin-top:48px}.calendar-list{display:grid;gap:8px}.calendar-row{display:grid;grid-template-columns:75px minmax(150px,1fr) 2fr auto;align-items:center;gap:24px;padding:18px 24px;border:1px solid #343b34;border-radius:5px;background:var(--panel)}.round-number{border-right:1px solid #343b34}.round-number small{display:block;font-size:9px;letter-spacing:2px;color:var(--muted)}.round-number strong{font:700 34px 'Barlow Condensed',Impact,sans-serif;color:var(--accent)}.race-date{font-weight:600;text-transform:capitalize}.race-track h3{font-size:18px;margin-bottom:5px}.race-category{font-size:10px;letter-spacing:2px;color:var(--muted)}#circuits-error{padding:20px;border:1px solid #d89e59;color:#ffe3b5}
@media(max-width:800px){.circuits-grid{grid-template-columns:1fr}.circuit-visual{min-height:170px}.circuit-wordmark{font-size:52px}.calendar-row{grid-template-columns:50px 1fr;gap:12px;padding:16px}.round-number{grid-row:span 2}.race-track{grid-column:2}.race-category{display:none}}
.rating{position:absolute;right:12px;top:12px;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;width:55px;height:62px;background:#c82e35;color:white;border:1px solid #ff7375;border-radius:5px;box-shadow:0 4px 16px #0004}
.rating strong{font:700 30px 'Barlow Condensed',Impact,sans-serif;line-height:1}.rating small{font-size:9px;letter-spacing:2px;margin-top:5px}
.skills-panel{margin-top:26px}.skill-caption{color:var(--muted);font-size:12px}.skills-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.skill{display:grid;grid-template-columns:1fr auto;gap:8px;background:#141a16;padding:12px;border-left:3px solid #c82e35;border-radius:4px;font-size:13px}.skill strong{color:#ff999e}.skill meter{width:100%;height:7px;grid-column:1/-1;accent-color:#d93a42}.instagram{display:block;margin:18px 0;color:var(--accent);font-size:13px}
@media(max-width:400px){.skills-grid{grid-template-columns:1fr}}
.category-logos{display:flex;align-items:center;gap:20px;margin:22px 0;max-width:100%}
.category-logos img{display:block;object-fit:contain;height:auto}
.category-logo{width:clamp(135px,15vw,210px);min-width:0}
.actc-logo{width:clamp(80px,8vw,110px);min-width:0}
.category-logos .category-logo-divider{display:block;width:1px;height:44px;background:#46503e;flex-shrink:0}
@media(max-width:400px){.category-logos{gap:12px}.category-logo{width:135px}.actc-logo{width:75px}}
.vehicle,.detail-brand{display:inline-flex;align-items:center;gap:10px}
.portrait .vehicle .brand-logo,.detail-brand .brand-logo{position:static;display:block;width:46px;height:28px;object-fit:contain;object-position:center;flex-shrink:0}
.detail-brand{padding:10px 14px;background:#101612;border:1px solid #343b34;border-radius:5px;margin-bottom:12px;font-size:13px}
.detail-brand .brand-logo{width:65px;height:36px}
:root{color-scheme:dark;--bg:#111413;--panel:#1b201e;--text:#f2f3ed;--muted:#a4ada6;--accent:#d9ff5f}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Barlow,Arial,sans-serif}header{padding:24px 4vw;border-bottom:1px solid #303730;display:flex;justify-content:space-between;align-items:center}.logo{color:var(--text);text-decoration:none;font-size:27px;font-weight:800;display:flex;align-items:center;gap:10px}.logo span{color:var(--accent)}.logo b{font-size:12px;letter-spacing:2px;margin-left:15px}.version,.eyebrow{font-size:11px;letter-spacing:2px;color:var(--muted)}main{max-width:1500px;margin:auto;padding:45px 4vw}.eyebrow{color:var(--accent);font-weight:700}.intro{display:flex;align-items:center;justify-content:space-between;gap:35px;padding:20px 0 40px}h1{font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(48px,6vw,84px);line-height:.98;text-transform:uppercase;letter-spacing:-1px;margin:0}h1 em{font-style:normal;color:var(--accent)}.intro p{color:var(--muted);max-width:490px;line-height:1.6}.category{border-left:3px solid var(--accent);padding:12px 28px;background:linear-gradient(90deg,#242d1b,transparent)}.category span,.category small{display:block;font-size:11px;color:var(--muted);letter-spacing:1px}.category strong{display:block;font-family:'Barlow Condensed',Impact,sans-serif;font-style:italic;font-size:75px;color:var(--accent)}.toolbar{display:flex;gap:12px;align-items:center;border-top:1px solid #343b34;padding:25px 0}.toolbar>div{margin-right:auto;min-width:155px}h2{font-size:24px;margin:0 0 5px}#count{font-size:13px;color:var(--muted)}input,select{font:inherit;color:var(--text);border:1px solid #3b433d;background:var(--panel);padding:12px;border-radius:5px;max-width:100%}.search{width:310px}.search input{width:100%}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.card{padding:0;text-align:left;font:inherit;color:inherit;border:1px solid #343b34;border-radius:8px;background:var(--panel);overflow:hidden;cursor:pointer;transition:transform .15s,border-color .15s}.card:hover{transform:translateY(-4px);border-color:var(--accent)}:focus-visible{outline:3px solid var(--accent);outline-offset:4px}.portrait{height:245px;position:relative;overflow:hidden;background:radial-gradient(ellipse at bottom,#475143 0, #252d27 45%,#1a211d 85%)}.portrait:before{content:'';position:absolute;inset:0;background:repeating-linear-gradient(125deg,transparent 0 35px,#ffffff03 35px 37px)}.portrait img{position:absolute;bottom:0;width:100%;height:95%;object-fit:contain;object-position:bottom}.number{position:absolute;top:8px;left:14px;font-family:'Barlow Condensed',Impact,sans-serif;font-size:64px;color:#ffffff21;font-style:italic}.vehicle{position:absolute;bottom:12px;left:12px;background:#101612df;color:var(--accent);padding:6px 9px;border-radius:3px;font-size:11px;text-transform:uppercase;letter-spacing:1px}.card-body{padding:18px}h3{margin:0;font-size:19px}.card-body p{color:var(--muted);font-size:13px;margin:8px 0 20px;min-height:30px}.card-link{font-size:10px;letter-spacing:1.5px;color:var(--accent)}footer{display:flex;justify-content:space-between;gap:20px;margin-top:40px;padding-top:22px;border-top:1px solid #343b34;color:var(--muted);font-size:11px}dialog{position:fixed;width:min(930px,94vw);max-height:90vh;padding:0;border:1px solid #46503e;border-radius:12px;background:var(--panel);color:var(--text)}dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}.close{position:absolute;right:12px;top:10px;z-index:2;border:1px solid #68705e;border-radius:50%;width:35px;height:35px;background:#151b16;color:white;font-size:25px;cursor:pointer}#detail-content{display:grid;grid-template-columns:32% 68%}.detail-visual{position:relative;background:radial-gradient(ellipse at bottom,#546242,#1b261e);min-height:480px;overflow:hidden}.detail-visual img{width:100%;height:100%;object-fit:contain;object-position:bottom;position:absolute;z-index:1}.big-number{position:absolute;top:30px;left:20px;font:italic 90px 'Barlow Condensed',Impact,sans-serif;color:#ffffff25}.detail-info{padding:45px 30px 30px}.detail-info h2{font:700 40px 'Barlow Condensed',Impact,sans-serif;margin:12px 0 25px}.facts{display:grid;grid-template-columns:105px 1fr;gap:12px;font-size:14px}.facts dt{color:var(--muted)}.facts dd{margin:0}.detail-info h3{margin-top:30px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:15px}.stats>div{background:#101612;padding:12px;border-radius:4px}.stats strong,.stats span{display:block}.stats strong{font-size:20px}.stats span{font-size:11px;color:var(--muted);margin-top:6px}.notice{color:var(--muted);font-size:12px;line-height:1.6}.source{color:var(--accent);font-size:13px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.fallback{display:grid;place-items:center;height:100%;font-size:70px;color:var(--accent)}#error{padding:20px;border:1px solid #d89e59;color:#ffe3b5}@media(min-width:1400px){.grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(max-width:1000px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.toolbar{flex-wrap:wrap}.toolbar>div{width:100%}.search{flex:1}}@media(max-width:700px){header{padding:20px}.version{display:none}.intro{display:block}.category{margin-top:25px}.category strong{font-size:45px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.portrait{height:200px}.card-body{padding:12px}.card-body h3{font-size:16px}.search{flex-basis:100%}select{font-size:13px}footer{display:block;line-height:2}footer>span{display:block}#detail-content{display:block}.detail-visual{height:220px;min-height:0}.detail-info{padding:25px 20px}.detail-info h2{font-size:32px}}@media(prefers-reduced-motion:reduce){.card{transition:none}}
/* Driver detail: number, red skills block, then portrait. */
.circuit-visual{position:relative;isolation:isolate;min-height:300px;gap:12px;overflow:hidden}
.circuit-background,.circuit-shade{position:absolute;inset:0;width:100%;height:100%;z-index:-2;pointer-events:none}
.circuit-background{object-fit:cover;object-position:center 60%}
.circuit-shade{z-index:-1;background:linear-gradient(180deg,#08100b88,#08100b55 45%,#08100be6)}
.circuit-layout{display:block;align-self:center;width:100%;max-width:300px;height:155px;object-fit:contain;filter:drop-shadow(0 2px 5px #000);mix-blend-mode:screen}
.circuit-wordmark{font-size:clamp(32px,3.4vw,52px);text-shadow:0 2px 8px #0009}
.circuit-visual .eyebrow{color:var(--accent);text-shadow:0 1px 4px #000}
.circuit-autodrome{font-size:15px;font-weight:600;line-height:1.4;margin:0 0 12px;color:var(--text)}
.race-category-logo{display:block;width:100px;height:42px;object-fit:contain}.race-track{min-width:0}.race-track h3{line-height:1.35}
@media(max-width:800px){.race-category-logo{grid-column:2;width:85px;height:32px}}
@media(max-width:800px){.circuit-visual{min-height:300px}.circuit-wordmark{font-size:44px}}
.detail-visual{display:flex;flex-direction:column;min-height:0}
.visual-header{position:relative;min-height:110px;flex-shrink:0}
.visual-header .big-number{position:static;display:block;padding:12px 20px;font-size:72px;line-height:1.15}
.detail-visual .skills-panel{position:relative;z-index:1;margin:0 14px 16px;padding:15px;background:#1b201e;border:1px solid #343b34;border-radius:7px}
.detail-visual .skills-panel h3{font-size:18px;margin:0}
.detail-visual .skill-caption{color:var(--muted);font-size:12px;line-height:1.5;margin:7px 0 12px}
.detail-visual .skills-grid{grid-template-columns:1fr;gap:7px}
.detail-visual .skill{padding:12px;border:0;border-left:3px solid #c82e35;background:#141a16;font-size:13px}
.detail-visual .skill strong{color:#ff999e}
.detail-visual .skill meter{accent-color:#d93a42}
.detail-photo{position:relative;min-height:270px;flex:1}
.detail-photo>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:bottom}
@media(max-width:700px){.detail-visual{height:auto;min-height:0}.detail-visual .skills-grid{grid-template-columns:1fr 1fr}.detail-photo{min-height:260px}.visual-header{min-height:100px}}
@media(max-width:400px){.detail-visual .skills-grid{grid-template-columns:1fr}}

/* Main menu and category overview. */
.page-nav{flex-wrap:wrap}
.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.home-tile{display:flex;flex-direction:column;align-items:flex-start;gap:18px;padding:30px;border:1px solid #343b34;border-radius:8px;background:var(--panel);color:var(--text);text-decoration:none}
a.home-tile:hover{border-color:var(--accent);background:#242c23}
.home-tile h3{font:700 38px/1.1 'Barlow Condensed',Impact,sans-serif;text-transform:uppercase}
.home-tile p{color:var(--muted);line-height:1.6;margin:0;max-width:480px}
.tile-link{color:var(--accent);font-size:12px;letter-spacing:1px;text-decoration:none;margin-top:auto}
a.tile-link:hover{text-decoration:underline}
.simulation-tile{background:linear-gradient(125deg,#29341e,var(--panel));border-color:#53633b}
.home-tile button{font:600 13px Barlow,Arial,sans-serif;padding:12px 20px;border:1px solid #53633b;border-radius:4px;background:#d9ff5f12;color:var(--muted);cursor:not-allowed}
.home-tile small{font-size:12px;color:var(--muted)}
@media(max-width:700px){.home-grid{grid-template-columns:1fr}.home-tile{padding:24px}.page-nav a{padding:10px 12px}}

.category-heading{display:flex;align-items:center;gap:18px;width:100%;flex-wrap:wrap}
.category-heading img{display:block;width:110px;height:56px;object-fit:contain;flex-shrink:0}
.category-heading h3{flex:1;min-width:160px}

.category-heading .category-actc-logo{width:48px;height:32px;margin-left:auto}

.category-branch{margin:36px 0 20px;padding-top:24px;border-top:1px solid #343b34}
.branch-route{color:var(--muted);line-height:1.7;margin:10px 0 0}
.branch-logo-heading{margin:0 0 24px}
.branch-federation-logo{display:block;width:150px;height:76px;object-fit:contain}
.branch-ladders{display:grid;gap:20px}
.branch-ladder{display:flex;align-items:center;gap:0;list-style:none;margin:0;padding:0}
.branch-ladder-step{display:flex;align-items:center;min-width:0}
.branch-ladder-step+.branch-ladder-step::before{content:'→';flex-shrink:0;margin:0 20px;color:var(--accent);font-size:30px;line-height:1}
.branch-category-logo{display:block;width:130px;max-width:100%;height:68px;object-fit:contain}
@media(max-width:700px){.branch-category-logo{width:100px;height:56px}.branch-ladder-step+.branch-ladder-step::before{margin:0 10px;font-size:24px}}
@media(max-width:520px){.branch-ladder{flex-direction:column;align-items:flex-start}.branch-ladder-step{flex-direction:column;width:130px}.branch-ladder-step+.branch-ladder-step::before{content:'↓';margin:10px 0}.branch-category-logo{width:130px;height:60px}}
.category-heading .category-federation-logo{width:48px;height:32px;margin-left:auto}

/* Category availability: same lift and border highlight as driver cards. */
.category-available{transition:transform .15s,border-color .15s}
.category-available:hover,.category-available:focus-within{transform:translateY(-4px);border-color:var(--accent)}
.category-pending{position:relative;overflow:hidden}
.category-pending>.eyebrow{min-height:22px}
.coming-soon-ribbon{display:block;align-self:flex-end;width:160px;max-width:100%;height:auto;margin-top:auto;object-fit:contain;pointer-events:none}
@media(prefers-reduced-motion:reduce){.category-available{transition:none}.category-available:hover,.category-available:focus-within{transform:none}}

/* General circuit catalog: layouts are independent of championship dates. */
.circuit-diagram{display:flex;align-items:center;justify-content:center;min-height:155px;width:100%}.layout-selector{display:flex;flex-direction:column;gap:8px;margin-top:20px;font-size:12px;color:var(--muted)}.layout-selector select{width:100%}.circuit-search{display:block;margin-bottom:24px;width:min(420px,100%)}

.calendar-category-badge img{display:block;width:min(230px,50vw);max-height:100px;object-fit:contain;margin-bottom:16px}.calendar-category-badge[hidden]{display:none}

.driver-toolbar{flex-wrap:wrap}.driver-toolbar label{max-width:100%}.driver-toolbar .search{flex-grow:1}

.driver-category-team{display:block;margin-top:5px;color:var(--text);font-size:14px;font-weight:700;line-height:1.4;overflow-wrap:anywhere}.driver-category-entry+.driver-category-entry{margin-top:6px}.card-body>.driver-categories{margin-bottom:24px}

/* Keep portraits aligned while category details grow below them. */
#grid .portrait>img{width:84%;height:82%;left:8%;bottom:0;object-fit:contain;object-position:center bottom}
#grid .portrait>.number{z-index:3;color:var(--accent);-webkit-text-stroke:1.5px #101410;paint-order:stroke fill;text-shadow:1px 2px 3px #0009;line-height:1;pointer-events:none}
#grid>.card{display:flex;flex-direction:column;align-items:stretch}
#grid>.card>.portrait{height:265px;flex:0 0 auto;width:100%}
#grid .card-body{display:flex;flex-direction:column;flex:1;min-width:0;padding:16px 18px}
#grid .card-link{margin-top:0;padding-top:8px}
#grid .driver-categories{gap:8px;margin:auto 0 16px;padding-top:10px}
#grid .driver-category-entry+.driver-category-entry{margin-top:0}
#grid .driver-category-row{gap:5px}
#grid .driver-category-tag,#grid .driver-vehicle-tag{height:32px;gap:5px;padding:4px 6px;font-size:9px;letter-spacing:.2px}
#grid .driver-category-tag{flex-basis:60px}
#grid .driver-category-tag img,#grid .driver-vehicle-tag .brand-logo{width:42px;height:22px}
#grid .driver-category-team{margin-top:3px;font-size:14px;line-height:1.3;min-height:2.6em}
.detail-info button.driver-category-tag,.stats-total-button{cursor:pointer;font-family:inherit;transition:transform .15s,border-color .15s,background .15s}
.detail-info button.driver-category-tag:hover,.stats-total-button:hover{transform:translateY(-4px);border-color:var(--accent);background:#d9ff5f12}
.stats-total-button{padding:9px 14px;border:1px solid #3b433d;border-radius:4px;background:#111713;color:var(--accent);font-size:13px;margin-bottom:8px}
.stats-total-button[aria-pressed="true"]{border-color:var(--accent);background:#d9ff5f1c}
.stats-scope{color:var(--accent);font-size:12px;margin:8px 0 0}
.stats-coverage{display:block;font-size:10px;color:var(--muted);margin-top:6px}
@media(prefers-reduced-motion:reduce){.detail-info button.driver-category-tag,.stats-total-button{transition:none}}
@media(max-width:700px){
 #grid>.card>.portrait{height:210px}
 #grid .card-body{padding:12px}
 #grid .driver-category-tag{flex-basis:48px}
 #grid .driver-category-tag img,#grid .driver-vehicle-tag .brand-logo{width:32px;height:20px}
}

/* Five home cards: featured manager and four catalog entries. */
.home-page{min-height:100dvh;display:flex;flex-direction:column}
.home-page>main{width:100%;flex:1}
.home-page .home-grid{align-items:stretch}
.home-page .simulation-tile{grid-column:1/-1}
.home-page .home-tile{min-width:0}
.home-page .home-tile .tile-link{padding-top:12px}
.home-page .manager-menu-actions{width:100%}
@media(min-width:1101px){
 .home-page .home-grid{grid-template-columns:1.1fr 1fr 1fr;grid-template-rows:repeat(2,minmax(170px,1fr))}
 .home-page .simulation-tile{grid-column:1;grid-row:1/3}
 .home-page .simulation-tile .manager-menu-actions{margin-top:auto}
}
@media(max-width:700px){.home-page .simulation-tile{grid-column:auto}}

/* Compact desktop spacing; content can grow without crossing the footer. */
@media(min-width:1101px) and (min-height:740px){
 .home-page{min-height:100dvh;display:flex;flex-direction:column}
 .home-page>header{position:static;flex-shrink:0;padding:14px 4vw}
 .home-page>main{width:100%;min-height:calc(100dvh - var(--header-height,67px));margin:0 auto;padding:14px 4vw 10px;display:flex;flex-direction:column}
 .home-page main>.page-nav{position:static;flex-shrink:0;padding-top:0;padding-bottom:10px;margin-bottom:14px}
 .home-page main>.eyebrow{flex-shrink:0}
 .home-page .intro{flex-shrink:0;padding:12px 0 18px;gap:24px}
 .home-page .intro h1{font-size:clamp(44px,6.5dvh,64px)}
 .home-page .intro p{font-size:14px;line-height:1.45;margin:12px 0 0}
 .home-page .category{padding:8px 22px}
 .home-page .home-garage{display:flex;flex-direction:column;flex:1}
 .home-page .toolbar{flex-shrink:0;padding:12px 0}
 .home-page .toolbar h2{font-size:22px;margin-bottom:2px}
 .home-page .home-grid{flex:1;grid-template-rows:repeat(2,minmax(170px,1fr));gap:12px}
 .home-page .home-tile{min-width:0;padding:16px 20px;gap:8px}
 .home-page .home-tile h3{font-size:30px}
 .home-page .home-tile p{font-size:14px;line-height:1.4;max-width:none}
 .home-page .home-tile .manager-menu-actions{flex:none;width:100%;margin-top:auto;gap:8px}
 .home-page .home-tile .manager-button{flex:0 1 auto;padding:8px 12px;font-size:12px}
 .home-page #manager-saved-info{font-size:11px;line-height:1.25}
 .home-page #manager-saved-info:empty{display:none}
 .home-page main>footer{flex-shrink:0;margin-top:12px;padding-top:10px;line-height:14px}
}
.skill-editor{margin-top:14px}
.skill-editor button{border:1px solid #627333;border-radius:4px;padding:10px 14px;background:#d6ff58;color:#111;font-weight:700;cursor:pointer}
.skill-editor button:disabled{opacity:.55;cursor:wait}
.skill-editor-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.skill-editor-form p{grid-column:1/-1;margin:0;font-size:12px;color:#c4ccc1}
.skill-editor-form label{display:grid;gap:4px;font-size:13px}
.skill-editor-form input{min-width:0;width:100%;box-sizing:border-box;background:#101612;color:#fff;border:1px solid #637048;border-radius:4px;padding:8px;font:inherit}
.skill-editor-form button[type=button]{background:transparent;color:#eee}
.driver-card-age{font-size:.8em;font-weight:500;white-space:nowrap;color:var(--muted)}
#grid .driver-card-location{margin:4px 0 0;font-size:13px;line-height:1.35;color:var(--muted);overflow-wrap:anywhere}

/* Equipos y perfiles de edad */
.driver-flag{display:inline-flex;align-items:center;width:fit-content;padding:4px 9px;margin:6px 0;border:1px solid #748795;border-radius:4px;font-size:.7rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#d8e2eb;background:#202c37}
.driver-flag[hidden]{display:none}
.driver-flag-young{color:#c9f85c;border-color:#79992e;background:#26301b}
.driver-flag-veteran{color:#f4cb88;border-color:#8c6c3e;background:#30271d}
.team-card{min-width:0}.team-card h3{overflow-wrap:anywhere}
.team-top-badge{display:inline-block;margin-top:10px}#team-detail-labels:not(:empty){margin:12px 0}
.team-toolbar{flex-wrap:wrap}.team-toolbar label{max-width:100%}
.team-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-right:24px}.team-detail-heading>div:first-child{min-width:0}#team-detail-logo:empty{display:none}#team-detail-logo{flex-shrink:0}.team-detail-heading .team-logo{display:block;width:88px;height:88px}.team-driver-category{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-height:28px}.team-driver-category img{width:62px;height:28px;object-fit:contain}.team-driver-category small{color:var(--muted)}
@media(max-width:480px){.team-detail-heading{gap:12px}.team-detail-heading .team-logo{width:62px;height:62px}.team-detail-heading h2{margin-right:0}}
.team-card{cursor:pointer;transition:transform .18s,border-color .18s,box-shadow .18s}.team-card:hover,.team-card:focus-visible{transform:translateY(-4px);border-color:var(--accent);box-shadow:0 10px 24px #0004}.team-card .team-heading{width:100%}.team-card .team-categories{margin-bottom:0}
.team-detail{width:min(760px,94vw);padding:32px}.team-detail h2{font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(28px,5vw,42px);text-transform:uppercase;margin:12px 32px 8px 0;overflow-wrap:anywhere}.team-detail>p{color:var(--muted);font-size:14px}.team-detail .team-vehicles{margin:4px 0}.team-detail .team-roster li{gap:8px;padding:18px 0}.team-detail .team-roster a{font-size:18px}
@media(prefers-reduced-motion:reduce){.team-card{transition:none}.team-card:hover,.team-card:focus-visible{transform:none}}
.team-search{display:flex;flex-direction:column;gap:8px;width:100%;margin:0 0 24px}.team-search>span{font-size:14px;font-weight:700;color:var(--accent)}.team-search input{min-width:0;min-height:48px}.team-search small{font-size:12px;color:var(--muted)}
.team-detail .team-roster li{position:relative;padding-left:112px;min-height:140px;justify-content:center}.team-driver-photo{position:absolute;left:0;top:16px;width:92px;height:108px;object-fit:contain;object-position:center bottom;border-radius:6px;background:radial-gradient(ellipse at bottom,#384330,#151c17)}
@media(max-width:480px){.team-detail .team-roster li{padding-left:84px;min-height:124px}.team-driver-photo{width:70px;height:92px}.team-detail .team-roster a{overflow-wrap:anywhere}}
.team-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:100px}.team-identity{min-width:0}.team-heading h3{margin-bottom:0}.team-logo{width:100px;height:100px;flex:0 0 100px;object-fit:contain}
@media(max-width:480px){.team-heading{gap:10px}.team-logo{width:76px;height:76px;flex-basis:76px}}
.team-categories,.team-vehicles{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:14px 0}
.team-category{display:inline-flex;align-items:center;min-height:45px}.team-category img{width:85px;height:45px;object-fit:contain}
.team-vehicles span{display:inline-flex;align-items:center;gap:7px;font-size:.8rem;color:#c6cdd2}.team-vehicles img{width:28px;height:28px;object-fit:contain}
.team-roster{list-style:none;padding:0;margin:16px 0 0}.team-roster li{display:flex;align-items:flex-start;flex-direction:column;gap:5px;padding:12px 0;border-top:1px solid #ffffff20}.team-roster a{color:inherit;text-decoration:none;font-weight:700}.team-roster a:hover{color:#c9f85c}.team-roster small{color:#a0acb5}.team-roster .driver-flag{margin:0}

.driver-flags{display:flex;flex-wrap:wrap;gap:6px}.driver-flags[hidden]{display:none}
.driver-flag-top{color:#ffe176;border-color:#ac8e31;background:#332c18}
.label-editor{margin:12px 0 20px}.label-editor button{border:1px solid #627333;border-radius:4px;padding:10px 14px;background:var(--accent);color:#111;font:700 12px Barlow,Arial,sans-serif;cursor:pointer}.label-editor button[hidden]{display:none}.label-editor button:disabled{opacity:.6;cursor:wait}
.label-editor-form{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px;padding:14px;border:1px solid #3b433d;border-radius:5px;background:#111713}.label-editor-form p{width:100%;margin:0;color:var(--muted);font-size:12px;line-height:1.5}.label-editor-form label{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700}.label-editor-form input{accent-color:var(--accent);width:16px;height:16px;padding:0}.label-editor-form button[type=button]{background:transparent;color:var(--text)}

/* Driver profile: reserve room for the portrait and compact the added tags. */
.driver-profile-tags{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-bottom:12px}
.driver-profile-tags .label-editor{margin:0}.driver-profile-tags .label-editor:empty{display:none}
.driver-profile-tags:has(.label-editor-form){align-items:flex-start}
.driver-profile-tags .label-editor:has(.label-editor-form){flex-basis:100%}
@media(min-width:801px){
 #detail{width:min(1200px,96vw);max-height:94dvh}
 #detail-content{grid-template-columns:30% minmax(0,1fr);min-height:min(660px,calc(94dvh - 2px))}
 #detail .visual-header{min-height:84px}
 #detail .visual-header .big-number{font-size:60px;padding:10px 16px}
 #detail .detail-visual .skills-panel{margin:0 12px 12px;padding:12px}
 #detail .detail-visual .skills-panel h3{font-size:17px}
 #detail .detail-visual .skill-caption{margin:5px 0 10px;font-size:11px}
 #detail .detail-visual .skills-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 #detail .detail-visual .skill{padding:9px 8px;font-size:12px;gap:6px}
 #detail .skill-editor{margin-top:10px}
 #detail .skill-editor button,#detail .label-editor button{padding:8px 10px;font-size:11px}
 #detail .detail-photo{min-height:230px}
 #detail .detail-info{min-width:0;padding:28px 26px 20px}
 #detail .detail-info h2{font-size:36px;line-height:1.1;margin:10px 0 12px}
 #detail .detail-info>.driver-categories{flex-direction:row;flex-wrap:wrap;gap:10px 16px;margin:8px 0 12px}
 #detail .detail-info .driver-category-entry{margin-top:0;min-width:0}
 #detail .driver-category-team{font-size:12px;margin-top:4px}
 #detail .stats-total-button{margin-bottom:0;padding:7px 12px;font-size:12px}
 #detail .facts{gap:7px 12px;font-size:13px;line-height:1.35;margin:12px 0}
 #detail .facts dd{min-width:0;overflow-wrap:anywhere}
 #detail .detail-info h3{margin-top:16px;font-size:18px}
 #detail .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px}
 #detail .stats>div{padding:9px;min-width:0}
 #detail .stats strong{font-size:19px;line-height:1.2;overflow-wrap:anywhere}
 #detail .stats span{font-size:10px;margin-top:4px}
 #detail .detail-info>.notice{font-size:11px;line-height:1.4;margin:10px 0}
 #detail .instagram{margin:10px 0;font-size:12px}
}
@media(min-width:801px) and (max-height:760px){
 #detail .detail-info{padding:22px 24px 16px}
 #detail .detail-info h2{font-size:32px}
 #detail .detail-photo{min-height:190px}
 #detail .stats{gap:6px}#detail .stats>div{padding:7px}
}

@media(min-width:801px) and (max-width:1000px){
 #detail .detail-visual .skills-grid{grid-template-columns:1fr}
 #detail .stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Equal statistic cards across every row, including multiline debut dates. */
#detail .stats{grid-auto-rows:1fr;align-items:stretch}
#detail .stats>div{display:flex;flex-direction:column;min-height:84px}
#detail .stats strong{min-height:2.4em}
#detail .stats span{margin-top:auto;padding-top:4px}

.session-weather-icon{display:inline-block;vertical-align:middle;font-size:1.15em;line-height:1.2;margin-left:6px;white-space:nowrap}

.team-rating-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #ffffff15}.team-rating-row>span{flex:1;min-width:140px}.team-rating-row>strong{color:var(--accent)}.team-rating-row form{flex-basis:100%}.team-rating-row input[type=number]{width:100px}

.team-rank-admin{display:block;margin-top:8px;color:var(--accent);font-weight:700;font-size:13px}

.driver-flag-occasional{border-color:#e5bd65;color:#e5bd65;background:#e5bd6510}.label-editor-form fieldset{display:grid;gap:8px;max-height:260px;overflow:auto;width:100%;border:1px solid #53633b;padding:12px}.label-editor-form fieldset:disabled{opacity:.5}

.circuit-identity{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px}.circuit-logo{display:block;max-width:130px;width:auto;height:42px;object-fit:contain;filter:drop-shadow(0 1px 3px #000a)}

img.layout-image-inverted{filter:invert(1) drop-shadow(0 2px 5px #000);mix-blend-mode:screen}

.circuit-filters{display:grid;grid-template-columns:minmax(220px,2fr) 1fr 1fr;gap:14px;margin:0 0 24px}.circuit-filters label{display:grid;gap:7px;font-size:12px;min-width:0}.circuit-filters input,.circuit-filters select{width:100%;min-width:0;padding:10px;background:#1b211c;color:var(--text);border:1px solid #4c5846;border-radius:4px}
.circuit-province{font-size:12px;color:var(--muted);margin:4px 0 12px}.circuit-category-tags{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.circuit-category-tag{font-size:10px;font-weight:700;color:var(--accent);border:1px solid #53633b;border-radius:4px;padding:5px 7px}.circuit-notes{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;color:var(--muted);line-height:1.5}
.circuit-edit-button{margin-top:16px;padding:9px 12px;border:1px solid #728742;border-radius:4px;color:var(--accent);background:transparent;font:600 12px Barlow,Arial,sans-serif;cursor:pointer}.circuit-edit-button:hover{background:var(--accent);color:var(--bg)}
.circuit-edit-dialog{width:min(680px,94vw);max-height:90dvh;overflow:auto;padding:28px;background:var(--bg);color:var(--text);border:1px solid #728742;border-radius:8px}.circuit-edit-dialog::backdrop{background:#000b}.circuit-edit-form{display:grid;gap:18px}.circuit-edit-form h2{margin:0;font:700 30px 'Barlow Condensed',sans-serif}.circuit-edit-form p{margin:0;font-size:13px;line-height:1.5}
.circuit-edit-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.circuit-edit-fields label,.circuit-edit-form>label{display:grid;gap:7px;font-size:12px;min-width:0}.circuit-edit-fields input,.circuit-edit-fields select,.circuit-edit-form textarea{width:100%;min-width:0;background:#1b211c;color:var(--text);border:1px solid #4c5846;padding:9px;border-radius:4px}
.circuit-editor-tags{display:grid;grid-template-columns:1fr 1fr;gap:10px;border:1px solid #4c5846;padding:14px}.circuit-editor-tags legend{font-size:13px;padding:0 6px}.circuit-editor-tags label{display:flex;align-items:center;gap:8px;font-size:12px}.circuit-editor-tags input{accent-color:var(--accent)}.circuit-edit-form button{padding:9px 12px;cursor:pointer}.circuit-edit-form button:disabled{opacity:.6;cursor:wait}
@media(max-width:650px){.circuit-filters,.circuit-edit-fields,.circuit-editor-tags{grid-template-columns:1fr}.circuit-edit-dialog{padding:20px}}
