:root{color-scheme:dark;font:16px/1.5 Arial,sans-serif;background:#18162F;color:#f4f7f9}*{box-sizing:border-box}body{margin:0;background:linear-gradient(#222039,#18162F 45rem);min-height:100vh}a{color:inherit}header,main,footer{max-width:1100px;margin:auto;padding:20px 24px}header{display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:700;letter-spacing:.04em}nav{display:flex;gap:18px;flex-wrap:wrap}nav a{text-decoration:none}nav a:hover,nav a:focus-visible,.section-head a:hover{text-decoration:underline;text-decoration-color:#E6007E;text-decoration-thickness:2px}main{max-width:1240px;padding:26px 20px 60px}h1{font-size:clamp(2rem,5vw,3rem);margin:0 0 24px}h2{font-size:1.5rem;margin:0}h3{font-size:1.2rem;margin:0 0 8px}.panel,.attention{border:1px solid #657887;border-radius:20px;background:#28263e;padding:26px;margin-bottom:24px}.attention{border-left:5px solid #E6007E}.attention p{margin:8px 0 0}.section-head{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin-bottom:18px}.section-head a{font-weight:700;text-decoration:none}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:14px}.item{background:#211f37;border:1px solid #657887;border-radius:14px;padding:20px}.item.focus{border-top:3px solid #E6007E}.item p{margin:6px 0 0}.metric{font-size:1.3rem;font-weight:700;color:#fff}.quiet,.item small{color:#c2cbd1}.primary{display:inline-block;border-radius:10px;padding:13px 20px;background:#f4f7f9;color:#18162F;text-decoration:none;font-weight:700}.progress-panel{border-left:4px solid #E6007E}.periods{display:flex;gap:8px;margin:0 0 18px}.periods button{background:#211f37;color:#f4f7f9;border:1px solid #657887;border-radius:8px;padding:9px 14px;font:inherit;cursor:pointer}.periods button[aria-pressed=true]{border-bottom:3px solid #E6007E}footer{color:#c2cbd1;padding-bottom:32px}@media(max-width:600px){header{align-items:flex-start}nav{gap:10px;font-size:.88rem}.brand{font-size:.85rem}.panel,.attention{padding:20px}main{padding-top:15px}}
.more-link{margin:22px 0 0}.more-link a{font-weight:700;text-decoration:underline;text-decoration-color:#E6007E;text-underline-offset:4px}.achievement-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:14px}.achievement-list .item{border-top:3px solid #E6007E}.achievement-list .item p{margin-bottom:12px}.achievement-list .item a{font-weight:700;text-underline-offset:4px}.back-link{display:inline-block;margin-bottom:18px;text-underline-offset:4px}a:focus-visible,button:focus-visible{outline:3px solid #f4f7f9;outline-offset:3px}
.achievement-list{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))}

@media(min-width:900px){.cards{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}}

#observations .item,#riding-status{min-width:0;overflow-wrap:anywhere}

.goal-link{display:flex;width:fit-content;align-items:center;min-height:44px;max-width:100%;overflow-wrap:anywhere}

/* D3A: links sit at the bottom of each focus card within its grid row. */
.item.focus{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}
.item.focus .goal-link{margin-top:auto;padding-top:12px}
@media(max-width:360px){main{padding-inline:16px}}

/* F3: fill the available desktop row; keep compact reminders and aligned actions. */
@media(min-width:900px){.cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}}
.cards .item{min-width:0}.cards .item h3{line-height:1.25;text-wrap:balance;overflow-wrap:break-word}.section-head h2{min-width:0}
#attention{padding:18px 22px;margin-bottom:20px}#attention h2{margin:0;font-size:1.25rem}#attention p{margin:8px 0}#attention .primary{margin-top:8px;min-height:44px}

/* FINAL-REFINE-1: fixed value/unit groups and restrained mobile card spacing. */
@media(max-width:600px){#focus-goals .item{padding-inline:16px}#focus-goals .goal-path{display:flex;flex-wrap:wrap;column-gap:6px;row-gap:2px}#focus-goals .goal-stage{white-space:nowrap}}
#attention .event-result-name{font-weight:600;color:#f4f7f9;margin:4px 0 12px}

/* UI-FINAL-V2: compact saved progress, using the existing site palette and type. */
body:has(#focus-goals) h1{font-size:clamp(2rem,4vw,2.5rem);line-height:1.2;margin-bottom:24px}
body:has(#focus-goals) .panel{padding:24px;border-radius:16px}
body:has(#focus-goals) .section-head{margin-bottom:16px}body:has(#focus-goals) .section-head h2{font-size:1.4rem}
body:has(#focus-goals) .cards{gap:16px}body:has(#focus-goals) .cards .item{padding:18px;border-radius:12px}
body:has(#focus-goals) .item.focus{border-top-width:1px;border-top-color:#657887}body:has(#focus-goals) .cards .item h3{text-wrap:initial;font-size:1.125rem;line-height:1.35;margin-bottom:12px}
body:has(#focus-goals) #attention{padding:16px 20px;border-radius:16px}
body:has(#focus-goals) #attention h2{font-size:1rem;line-height:1.4;color:#c2cbd1;font-weight:400}
body:has(#focus-goals) #attention .event-result-name{font-size:1.25rem;line-height:1.35;font-weight:700;margin:4px 0 8px}
body:has(#focus-goals) .goal-path{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 12px}
body:has(#focus-goals) .goal-stage{min-width:0;white-space:normal!important}body:has(#focus-goals) .goal-stage-label{font-size:.8125rem;color:#c2cbd1;margin-bottom:2px}
body:has(#focus-goals) .goal-stage dd{margin:0;font-size:1.125rem;line-height:1.4;white-space:nowrap}
body:has(#focus-goals) .item.focus .goal-link{padding-top:8px;min-height:36px}
body:has(#focus-goals) .item.is-linked{position:relative;transition:border-color .15s,background-color .15s}
body:has(#focus-goals) .item.is-linked:hover{border-color:#e6007e;background:#29263f}
body:has(#focus-goals) .item.is-linked:has(a:focus-visible){outline:3px solid #f4f7f9;outline-offset:3px;box-shadow:0 0 0 6px #e6007e}
body:has(#focus-goals) .item.is-linked :is(.goal-link,.progress-card-link)::after{content:"";position:absolute;inset:0;border-radius:inherit}
body:has(#focus-goals) .progress-card-link{display:inline-flex;align-items:center;min-height:36px;margin-top:8px;text-underline-offset:4px}
body:has(#focus-goals) #observations .metric{font-size:1.25rem;line-height:1.4}body:has(#focus-goals) #observations .quiet{display:block;font-size:.875rem;line-height:1.5;margin-top:8px}
body:has(#focus-goals) .more-link{margin-top:18px}
@media(max-width:600px){body:has(#focus-goals) .panel{padding:16px}body:has(#focus-goals) .section-head{gap:8px}body:has(#focus-goals) .section-head h2{font-size:1.25rem}body:has(#focus-goals) .section-head>a{font-size:.875rem}body:has(#focus-goals) .cards .item{padding:16px}body:has(#focus-goals) #attention{padding:14px 16px}body:has(#focus-goals) .goal-path{grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:8px 12px}body:has(#focus-goals) .goal-stage dd{font-size:1.0625rem}}

body:has(#focus-goals) .item.is-linked :is(.goal-link,.progress-card-link):focus-visible{outline:0!important;box-shadow:none!important}
