:root{--atlas-ink:#15394a;--atlas-blue:#175d7b;--atlas-line:#cbd9df;--atlas-paper:#f0f5f7;--atlas-muted:#4f6978}
body{background:var(--atlas-paper);color:var(--atlas-ink)}.icons{position:absolute;width:0;height:0;overflow:hidden}.app-shell{width:min(1360px,calc(100% - 48px));margin-inline:auto}.brand-copy b,.page-intro h1,.stage-head h2,.panel-title h2,.weatherhead h2,#startDesk h2{font-family:Georgia,"Times New Roman",serif;color:var(--atlas-ink);letter-spacing:-.04em}.brand-copy b{font-size:29px}.brand-copy small{letter-spacing:.08em}.page-intro h1{font-size:clamp(34px,3.8vw,54px);line-height:1.04}.stage-head h2{font-size:clamp(24px,2.4vw,36px)}.panel,.library-card{border-color:var(--atlas-line);box-shadow:none}.start-mode{display:flex;width:fit-content;gap:3px;padding:4px;border-radius:10px;background:#dfe9ed;margin:0 0 16px}.start-mode button{border:0;background:transparent;color:var(--atlas-ink);border-radius:7px;min-height:36px;padding:6px 15px;font-weight:650}.start-mode button[aria-pressed=true]{background:var(--atlas-ink);color:white}#startDesk{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px;margin-bottom:16px}#startDesk[hidden],#researchLink[hidden],#paymentMethods[hidden],#checkoutPay[hidden],#resumePayment[hidden],#checkPayment[hidden]{display:none}#startDesk h2,#startDesk p{margin:0}#startDesk label{margin:0;font-size:14px}#startDesk select{width:auto;max-width:100%}.atlas-controls{display:flex;flex-direction:column;gap:14px;min-width:0}.workspace{display:grid;grid-template-columns:minmax(0,1.52fr) minmax(330px,.9fr);gap:18px;align-items:start}.workspace>.stage-panel{grid-area:1/1;min-width:0;border-top:4px solid var(--atlas-blue);background:white}.workspace>.atlas-controls{grid-area:1/2}.atlas-controls .conditions-panel{position:static;order:3;max-height:none;min-width:0}.stage-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.stage-head>div{order:0}.stage-head>.status-chip{order:1}.stage-head>#jumpConditions{order:2;margin-left:auto}.recipe-focus{border:0;background:white;box-shadow:none;padding-block:6px}.recipe-products .recipe-line{border:0;border-bottom:1px solid var(--atlas-line);border-radius:0;background:#fff;padding:10px 0 10px 12px;border-left:4px solid #6f9fb4;margin-bottom:6px}.recipe-products .recipe-line:nth-child(n+2){border-left-color:#c57b50}.recipe-products .recipe-line b{color:var(--atlas-ink);font-size:clamp(19px,2.1vw,30px)}[data-snow] img{width:100%;height:50px;object-fit:contain;mix-blend-mode:multiply}.day-weather,.competition{overflow:hidden;padding:0}.day-weather :is(h2,p),.competition p{margin:0}.weatherhead,.weatherbody,.competition{padding:16px 19px}.weatherhead{min-height:112px;background:linear-gradient(80deg,#082330dc,#08233039),url('./trail.webp') center 48%/cover;color:#fff;display:flex;align-items:end;justify-content:space-between}.weatherhead h2{font-size:28px;color:#fff;margin:3px 0}.overline{font-size:12px;font-weight:700;letter-spacing:.09em;text-transform:uppercase}#weatherLead{font-size:28px;font-weight:750}.weatherbody .meta,.competition .meta,#pairPolicyNote{color:var(--atlas-muted);font-size:14px;line-height:1.4}.day-weather .location,.time-label,.switchrow,.inline-actions{display:flex;align-items:center;gap:9px}.day-weather .location,.time-label{justify-content:space-between}.location label{display:flex;align-items:center;gap:6px;margin:0}.weatherbody svg,.competition svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;vertical-align:-3px}.day-weather button,.competition button{color:var(--atlas-ink)}.location select{border:0;background-color:transparent}.weatherbody .iconbtn{width:39px;height:39px;background:#edf4f7;border:1px solid var(--atlas-line);border-radius:8px}.time-label{margin:8px 0 3px}.day-weather label{font-size:14px}.hours{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;margin:8px 0}.hours button{background:#e8f2f6;border:0;border-radius:5px;padding:6px 0}.hours button>*{display:block}.hours button[aria-pressed=true]{background:var(--atlas-ink);color:#fff}.inline-actions .textbtn{min-height:34px;background:transparent;border:0;text-decoration:underline;color:var(--atlas-blue);cursor:pointer;padding:3px 0}.switchrow{position:relative;cursor:pointer;min-height:40px;margin:4px 0}.switchrow input{width:20px;height:20px;min-height:20px;accent-color:var(--atlas-blue)}.switchrow .switch{display:none}.competition details{margin-top:8px}.competition summary,.competition a{color:var(--atlas-blue)}.competition details p{font-size:14px}.competition .overline{color:var(--atlas-blue)}.day-weather [hidden],.competition [hidden]{display:none}
@media(min-width:1100px){#tab-calc>.page-intro{padding-right:330px;min-height:65px}#tab-calc>.start-mode{margin:-60px 0 22px auto}}
@media(max-width:980px){.app-shell{width:calc(100% - 22px)}.workspace{display:flex;flex-direction:column;gap:12px}.workspace>.atlas-controls{display:contents}.workspace .stage-panel{order:2;width:100%}.workspace .conditions-panel{order:1;width:100%}.workspace .day-weather{order:3;width:100%}.workspace .competition{order:4;width:100%}.start-mode{margin-bottom:10px}.stage-head #jumpConditions{display:none}}
@media(max-width:530px){.stage-head h2,.weatherhead h2{font-size:24px}.page-intro h1{font-size:34px}.brand-copy b{font-size:22px}.page-intro p{font-size:14px}.admin-view{margin-bottom:8px;padding:6px 9px}.admin-view select{min-height:34px}.start-mode button{min-height:34px}.recipe-focus-body small,.recipe-line small{font-size:13px}.atlas-controls .day-weather{margin:0}.weatherhead{min-height:80px}}
@media print{.start-mode,#startDesk,.day-weather,.competition,#jumpConditions{display:none!important}.workspace{display:block}.atlas-controls{display:none}}
.desk-panel{max-width:980px;margin:auto}.desk-panel label{display:grid;gap:5px}.desk-panel input,.desk-panel select,.desk-panel textarea{max-width:100%;font:inherit}.desk-panel textarea{width:100%;padding:10px;border:1px solid var(--atlas-line);border-radius:8px}.desk-tools,#deskInvite{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:12px 0}.desk-panel .inline{display:flex;align-items:center;gap:8px}.desk-panel .inline input{width:auto}.desk-panel details{padding:12px 0;border-block:1px solid var(--atlas-line)}.desk-panel h2,.desk-panel h3{margin-top:22px}.desk-panel #deskEntry{border-top:1px solid var(--atlas-line);margin-top:20px}.desk-rows article{padding:16px 0;border-bottom:1px solid var(--atlas-line);overflow-wrap:anywhere}.desk-rows article>p{white-space:pre-line}.desk-panel [hidden],#deskPrint{display:none!important}.desk-tools button,#deskRoster button{min-height:36px}.desk-panel #deskRoster li{margin-block:5px}.desk-panel #deskRoster button{margin-left:10px}
@media print{body.desk-print .app-shell>*:not(#tab-service),body.desk-print .topbar,body.desk-print header,body.desk-print footer,body.desk-print #tab-service>*:not(#deskPrint){display:none!important}body.desk-print #tab-service,body.desk-print #deskPrint,body.desk-print main{display:block!important}body.desk-print #deskPrint p{white-space:pre-line}}
.history-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));align-items:end;gap:12px}.history-controls label{display:grid;gap:4px}.history-controls input,.history-controls select{width:100%;min-width:0}.course-card{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:12px 0;color:#19495b}.course-card[hidden]{display:none}.course-card svg{width:min(190px,100%);height:84px;background:#edf5f5;border:1px solid #c8d8dc;border-radius:8px}.course-card path{stroke:#165f72;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;fill:none}.course-card figcaption{font-size:.92rem}.desk-course{margin:12px 0}.desk-panel [aria-pressed=true]{background:#19495b;color:#fff}.desk-panel #deskMatches{border-left:3px solid #2b7789;padding:2px 14px;margin:12px 0}.desk-panel #deskAthleteList article{border-bottom:1px solid var(--atlas-line);padding:10px 0}.desk-panel #deskAthleteList h3{margin:0}.desk-panel #deskMatches h3{margin:6px 0}.desk-rows summary{cursor:pointer}.desk-rows details button{margin-right:8px}
@media print{body.card-print header,body.card-print footer,body.card-print .app-shell>*:not(#tab-calc),body.card-print #tab-calc>*:not(.workspace),body.card-print .workspace>*:not(.stage-panel),body.card-print .stage-panel>*:not(#startCard),body.card-print #startCard button,body.card-print #cardManual{display:none!important}body.card-print #tab-calc,body.card-print .workspace,body.card-print .stage-panel,body.card-print #startCard,body.card-print #startCard .card-content{display:block!important}body.card-print .stage-panel{border:0}.course-card{break-inside:avoid}.course-card path{stroke:#183b49}}
.glide-stars{display:flex;align-items:center;gap:6px;flex-wrap:wrap;border:0;padding:4px 0;margin:6px 0}.glide-stars legend{font-weight:600}.glide-stars button[aria-pressed=true]{background:#19495b;color:#fff}.glide-stars button{min-height:36px}

#seriesPanel { margin-block: 1rem 1.5rem; }
#seriesPanel [hidden] { display: none; }
#seriesPanel .series-variant { min-width: 0; margin: .65rem 0; padding: .8rem; border: 1px solid var(--line,#c9d6dc); border-radius: .6rem; }
#seriesPanel .race-actions { flex-wrap: wrap; }
#seriesPanel .cycle-record { overflow-wrap: anywhere; }
#seriesPanel .series-columns { display:grid; gap:.6rem; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)); }
#seriesPanel label { display:grid; gap:.25rem; }
#seriesPanel input, #seriesPanel select { min-width:0; max-width:100%; }
#seriesPanel .series-shortlist { display:flex; align-items:center; gap:.4rem; }
#seriesPanel .series-shortlist input { width:auto; }

#diaryDialog { box-sizing:border-box;width:min(34rem,calc(100% - 1rem));max-height:92dvh;overflow:auto;border:1px solid #bacbd5;border-radius:1rem;padding:1rem;color:#15394a;background:#fff; }
#diaryDialog::backdrop {background:#14324477}
.diary-head {display:flex;align-items:center;justify-content:space-between;gap:.5rem}
#diaryDialog fieldset {min-width:0;border:0;padding:0;margin:.85rem 0}
#diaryDialog legend,#diaryDialog summary {font-weight:650}
#diaryDialog details {margin:1rem 0}
#diaryDialog label {display:grid;gap:.25rem}
#diaryDialog [hidden],#windowPanel[hidden]{display:none}
#diaryDialog .diary-scale {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.3rem}
.diary-scale label {position:relative}
.diary-scale input {position:absolute;opacity:0}
.diary-scale span {display:grid;place-items:center;min-height:44px;background:#edf3f7;border-radius:.45rem;color:#183748}
.diary-scale input:checked+span {background:#17597a;color:white}
.diary-scale input:focus-visible+span {outline:3px solid #e78c3a}
.diary-point {display:grid;grid-template-columns:1fr 1.5fr auto;align-items:center;gap:.3rem;margin:.5rem 0}
.diary-point>* {min-width:0}
#diaryRows {display:grid;gap:.35rem} #diaryDialog textarea {width:100%;box-sizing:border-box}
.distance-chart {overflow:auto;margin:.5rem 0}.distance-chart svg {width:100%;height:auto;max-height:300px;display:block}
.distance-chart svg text {font:12px system-ui;fill:#223e4d}.distance-chart table,#windowStages table {width:100%;font-size:.85rem;border-collapse:collapse}
.distance-chart td,.distance-chart th,#windowStages td,#windowStages th {text-align:left;padding:.3rem;overflow-wrap:anywhere;border-bottom:1px solid #c9d6dd}

#windowPanel [hidden],#historyMore[hidden]{display:none}
#relayForecast{overflow:auto}#relayForecast table{width:100%;border-collapse:collapse;font-size:.86rem}#relayForecast td,#relayForecast th{padding:.35rem;text-align:left;border-bottom:1px solid #c9d6dd}
#relayForecast [aria-pressed=true]{font-weight:750;text-decoration:underline}
.relay-leg{margin:.65rem 0;padding:.6rem;min-width:0}.relay-leg input,.relay-leg select,#windowPanel input,#windowPanel select{max-width:100%;min-width:0;box-sizing:border-box}
#raceFormatFields,#windowLoops,#windowRelay,#relayForecast{margin:.5rem 0}
