.site-inner { gap: clamp(12px, 2.2vw, 32px); }
.site-nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.site-nav a { padding: 9px 11px; color: var(--muted); font-size: .84rem; font-weight: 620; text-decoration: none; border-radius: 6px; }
.site-nav a:hover { color: #e5f5f3; background: #172631; }
.site-nav [aria-current] { color: #9cf1d7; background: #18322f; box-shadow: inset 0 0 0 1px #2d534c; }
.site-shell-footer { max-width: 1536px; margin: 0 auto; padding-inline: clamp(18px, 3.1vw, 48px); align-items: baseline; flex-wrap: wrap; gap: 10px 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-links a { color: #b6c9d2; text-underline-offset: 3px; }
.footer-links a:hover, .footer-links a[aria-current] { color: #9cf1d7; }
.policy-view { max-width: 980px; }
.policy-panel { padding: clamp(16px, 3vw, 28px); }
.policy-panel section + section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-quiet); }
.policy-panel h2 { font-size: 1.04rem; }
.policy-panel p { color: #b6c9d2; margin-top: 9px; line-height: 1.6; }
.policy-panel a, .contact-panel p a { color: #9cf1d7; text-underline-offset: 3px; overflow-wrap: anywhere; }
.contact-panel { scroll-margin-top: 14px; }
.view-root:focus { outline: none; }
.view-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 23px; }
.view-heading p, .directory-intro > p { margin-top: 10px; color: var(--muted); line-height: 1.5; }
.view-notice { color: #d4bc89; font-size: .84rem; line-height: 1.45; margin-block: 11px; }
.view-notice:empty { display: none; }
.empty-view { grid-column: 1 / -1; padding: 24px; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; line-height: 1.45; background: #111b25; }
.view-caption { color: var(--muted); font-size: .85rem; line-height: 1.5; margin-top: 15px; }
.view-caption a { color: #95e9d3; text-underline-offset: 3px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #91ddcb; font-weight: 630; font-size: .82rem; margin-bottom: 12px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.back-link span { font-size: 1.1rem; }
.report-profile { text-decoration: none; }

.directory-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: stretch; overflow: hidden; min-height: 245px; background: linear-gradient(120deg, #162c34, #14212a 62%, #132732); border: 1px solid #2f4853; border-radius: 12px; }
.directory-hero:has(.directory-map[hidden]) { grid-template-columns: 1fr; }
.directory-intro { padding: clamp(22px, 3.1vw, 40px); align-content: center; position: relative; z-index: 1; }
.directory-intro h1 { font-size: clamp(2.45rem, 5.2vw, 4rem); }
.directory-intro > p { max-width: 480px; }
.directory-stats { display: flex; flex-wrap: wrap; margin: 23px 0 0; gap: 13px 24px; }
.directory-stats > div { display: flex; flex-direction: column-reverse; gap: 4px; }
.directory-stats > div + div { padding-left: 20px; border-left: 1px solid #34505a; }
.directory-stats dt { font-size: .76rem; color: #adbfca; }
.directory-stats dd { font-size: clamp(1.24rem, 2.7vw, 1.82rem); font-weight: 700; line-height: 1; }
.directory-map { position: relative; min-height: 240px; background: #142832; overflow: hidden; }
.directory-map canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.directory-map::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, #172730 0%, transparent 38%), linear-gradient(0deg, #101d29a8, transparent 34%); }
.directory-map-label { position: absolute; bottom: 16px; right: 17px; display: grid; justify-items: end; gap: 4px; z-index: 1; text-align: right; }
.directory-map-label span { color: #92e0d2; font-size: .67rem; letter-spacing: .09em; }
.directory-map-label strong { color: #e1f2f4; font-size: .82rem; }

.catalog-controls { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin: 19px 0 15px; }
.segmented { display: inline-flex; align-items: center; padding: 3px; gap: 3px; border: 1px solid var(--border); background: #101a24; border-radius: 8px; flex-wrap: wrap; }
.segmented button, .segmented a { border: 0; border-radius: 5px; padding: 7px 10px; font-size: .82rem; font-weight: 620; text-decoration: none; color: #aabecb; background: transparent; white-space: nowrap; }
.segmented button:hover, .segmented a:hover { background: #1b303a; color: #e9f9f6; }
.segmented [aria-pressed=true], .segmented [aria-current] { background: #204139; color: #a5efd7; }
.directory-search { flex: 1 1 235px; }
.race-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.race-card { padding: 18px; text-decoration: none; display: grid; gap: 16px; overflow: hidden; background: linear-gradient(145deg, #162430, #111b26 70%); transition: background .16s ease, border-color .16s ease; }
.race-card.is-live { border-color: #397364; background: linear-gradient(145deg, #1a332f, #13212c 58%); }
.race-card:hover { border-color: #66b8a7; background: linear-gradient(145deg, #203740, #17252e 65%); }
.race-card-head, .race-card-footer { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.race-card-head .race-status { flex: none; }
.race-card-name { min-width: 0; }
.race-card-name h2 { color: #f1f7f9; font-size: clamp(1.06rem, 2.05vw, 1.45rem); line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.race-card-name p { color: #a9bfca; font-size: .83rem; margin-top: 5px; overflow-wrap: anywhere; }
.card-route { display: flex; align-items: center; column-gap: 14px; row-gap: 7px; flex-wrap: wrap; padding: 10px 11px; border: 1px solid #2d4652; background: #101f2b; border-radius: 7px; }
.card-journey { display: flex; flex: 1 1 170px; align-items: center; gap: 8px; font-size: .82rem; font-weight: 580; min-width: 0; }
.card-journey span { overflow-wrap: anywhere; }
.card-origin { color: #ead1b0; }
.card-destination { color: #bcebdc; }
.card-route-track { display: inline-block; width: 17px; min-width: 17px; border-top: 1px dashed #769b9d; position: relative; }
.card-route-track::after { content: ''; width: 4px; height: 4px; position: absolute; right: 0; top: -2.5px; border-top: 1px solid #b1cbc8; border-right: 1px solid #b1cbc8; transform: rotate(45deg); }
.card-distance { color: #d7e7ef; font-size: .79rem; white-space: nowrap; }
.race-card-stats { display: grid; gap: 9px; }
.race-card-totals { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 7px; color: #b2c6d2; font-size: .81rem; }
.race-card-totals > span > strong { font-size: 1.25rem; color: #e7f2f8; }
.card-progress { background: #30444e; height: 5px; border-radius: 4px; overflow: hidden; }
.race-card-footer { padding-top: 12px; border-top: 1px solid var(--border-quiet); align-items: center; flex-wrap: wrap; }
.card-updated { color: var(--muted); font-size: .74rem; }
.card-action { display: inline-block; color: #a0efd7; font-size: .8rem; font-weight: 680; border: 1px solid #396055; border-radius: 6px; padding: 6px 8px; background: #1b3735; white-space: nowrap; }

.ace-header { flex-wrap: wrap; justify-content: start; }
.ace-header .panel-heading { margin-right: auto; }
.ace-sort { width: 171px; min-height: 36px; }
.ace-sort select { height: 34px; }
.ace-table-wrap { overflow: auto; }
.ace-table-wrap table { min-width: 655px; }
.ace-table-wrap th:first-child { width: 8%; }
.ace-table-wrap th:nth-child(2) { width: 28%; }
.ace-table-wrap th:nth-child(3) { width: 17%; }
.ace-table-wrap th:nth-child(4) { width: 13%; }
.ace-table-wrap th:nth-child(5), .ace-table-wrap th:nth-child(6) { width: 9%; }
.ace-table-wrap th:last-child { width: 16%; }
.ace-table-wrap td:last-child { text-align: right; }
.ace-table-wrap td { padding-block: 6px; }
.ace-table-wrap tr:hover td { background: #152631; }
.ace-name strong, .ace-owner { display: block; overflow-wrap: anywhere; }
.ace-owner { color: var(--muted); margin-top: 3px; font-size: .76rem; }
.ace-speed { text-decoration: none; color: #b4e8d9; }
.ace-speed:hover { text-decoration: underline; }

.profile-grid { display: grid; grid-template-columns: minmax(235px, .7fr) minmax(0, 1.3fr); gap: 15px; align-items: start; }
.profile-search { width: auto; max-width: none; margin: 0 14px 12px; }
.profile-matches { display: grid; padding-inline: 13px; gap: 5px; }
.profile-list-item { text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 9px; background: #14232e; border: 1px solid #293e49; border-radius: 6px; color: #e0eef3; padding: 7px 10px; min-height: 42px; }
.profile-list-item:hover, .profile-list-item[aria-pressed=true] { background: #1c3835; border-color: #497d6e; }
.profile-list-name { min-width: 0; }
.profile-list-name > span, .profile-list-name > strong { display: block; overflow-wrap: anywhere; font-size: .78rem; }
.profile-list-name > span { margin-top: 3px; color: #adbfcc; }
.profile-list-rank { color: #9ee8d1; font-size: .81rem; }
.profile-details { overflow: hidden; }
.profile-details > .panel-header { border-bottom: 1px solid var(--border-quiet); }
.profile-details > .panel-header h2 { font-family: var(--mono); }
.profile-details .empty-view { margin: 15px; }
.profile-metrics, .recap-metrics { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-metrics div { padding: 13px 15px; border-bottom: 1px solid var(--border-quiet); border-right: 1px solid var(--border-quiet); }
.profile-metrics dt, .recap-metric dt { color: #a8bdc9; font-size: .77rem; }
.profile-metrics dd { margin-top: 5px; color: #a8ecd6; font-weight: 680; overflow-wrap: anywhere; }
.profile-section { padding: 16px; }
.profile-section + .profile-section { border-top: 1px solid var(--border-quiet); }
.profile-section h3 { margin: 0 0 11px; font-size: .96rem; }
.parent-grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.parent-slot { padding: 10px; border-radius: 7px; border: 1px dashed #3a525d; background: #14232e; }
.parent-slot dt { color: #9fb7c4; font-size: .76rem; }
.parent-slot dd { margin-top: 4px; font-size: .86rem; }
.parent-slot .placeholder-field, .parent-ring, .profile-note { color: var(--muted); }
.parent-ring { display: block; margin-top: 4px; }
.profile-note { font-size: .81rem; margin-top: 9px; }
.career-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.career-link { background: #14232e; border: 1px solid var(--border); border-radius: 6px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; color: #dfedf4; text-decoration: none; font-size: .83rem; }
.career-link:hover { border-color: #4c887b; }
.career-race { min-width: 0; }
.career-race span { display: block; margin-top: 3px; color: var(--muted); font-size: .74rem; }
.career-speed { color: #9fdfd0; text-align: right; }
.career-rank { color: #eed1a5; }

.recap-summary { margin-bottom: 16px; }
.recap-summary .view-notice { padding: 0 14px 8px; }
.recap-metric { min-height: 86px; padding: 13px 16px; border-top: 1px solid var(--border-quiet); border-right: 1px solid var(--border-quiet); }
.recap-metric dd { display: grid; gap: 6px; margin-top: 4px; }
.recap-metric strong { color: #edf7fb; font-size: 1.06rem; overflow-wrap: anywhere; }
.recap-metric:first-child strong { color: #8ce9cf; }
.recap-metric dd span { color: var(--muted); font-size: .8rem; }
.recap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.info-panel { padding: 16px; }
.info-panel p { color: #b2c5d0; margin-top: 10px; line-height: 1.55; font-size: .87rem; }
.info-panel p.method-emphasis { color: #a9ebd8; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.contact-link { display: inline-block; text-decoration: none; }

@media (max-width: 1030px) {
  .site-inner { gap: 14px; }
  .site-nav a { padding-inline: 8px; font-size: .79rem; }
  .feed-clock { display: none; }
}

@media (max-width: 690px) {
  .site-inner { display: grid; grid-template-columns: 1fr auto; row-gap: 0; }
  .site-inner .brand { justify-self: start; min-height: 52px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding-bottom: 8px; }
  .site-nav a { display: grid; place-items: center; min-height: 34px; font-size: .72rem; padding: 5px 3px; text-align: center; }
  .site-inner .feed-status { grid-column: 2; grid-row: 1; }
  .directory-hero { grid-template-columns: minmax(0, 1fr); }
  .directory-map { min-height: 145px; }
  .directory-map::after { background: linear-gradient(#172730 0%, transparent 30%), linear-gradient(0deg, #101d29b0, transparent 44%); }
  .directory-stats { gap: 10px 13px; margin-top: 17px; }
  .directory-stats > div + div { padding-left: 12px; }
  .race-card-grid, .profile-grid, .recap-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-controls { margin-block: 13px; }
  .directory-search { max-width: none; }
  .race-card { padding: 13px; gap: 12px; }
  .recap-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-heading { margin-bottom: 16px; }
}

@media (max-width: 390px) {
  .segmented button, .segmented a { padding-inline: 7px; font-size: .76rem; }
  .directory-intro { padding-inline: 15px; }
  .recap-metric, .profile-metrics div { padding-inline: 9px; }
  .race-card-head { flex-wrap: wrap; gap: 7px; }
}
