/* Racetrack Wiki v3.0 application. See brand/selected-identity-v3/brand-spec.json. */
:root { --radius: var(--rw-radius-panel); --topbar-height: 72px; }
body { font-family: var(--rw-font-ui); line-height: var(--rw-leading-body); }
h1 { font-family: var(--rw-font-display); font-size: clamp(32px, 4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -.015em; }
h2 { font-size: 24px; line-height: 1.25; font-weight: 600; }
button, input, select, .button { min-height: var(--rw-target-min); }
button, .button, .icon-button, .compare-button, .atlas-result-profile { min-width: var(--rw-target-min); }
button, .button, select, input, .chip, .icon-button, .segmented, .segmented button { border-radius: var(--rw-radius-control); }
.button, .text-button, .chip, .select-field select, .directory-search input { font-size: 14px; }
.button, .icon-button, .chip { transition: background-color var(--rw-duration-control), color var(--rw-duration-control), border-color var(--rw-duration-control); }
.button.primary, .atlas-fallback .button.primary, .tray-actions .button { background: var(--rw-red); border-color: var(--rw-red); color: var(--rw-white); }
.button.primary:hover, .atlas-fallback .button.primary:hover, .tray-actions .button:hover { background: var(--rw-black); border-color: var(--rw-black); color: var(--rw-white); }
.button.secondary, .chip, .filter-toggle, .directory-search, .select-field select, .view-toggle, .segmented { border-color: var(--rw-control-boundary); }
.chip.active, .button.is-selected, .compare-button.is-selected { background: var(--rw-black); color: var(--rw-white); border-color: var(--rw-black); }
.icon-button { width: 44px; height: 44px; }
.button.is-saved, .icon-button.is-saved { width: auto; gap: 8px; padding-inline: 12px; background: var(--rw-green); border-color: var(--rw-green); color: var(--rw-white); }
.button.is-saved:hover, .icon-button.is-saved:hover { background: var(--rw-green); border-color: var(--rw-green); color: var(--rw-white); }
.button.is-selected:hover, .compare-button.is-selected:hover { background: var(--rw-black); border-color: var(--rw-black); color: var(--rw-white); }
.is-saved .icon svg { fill: none; }
.save-label { font-size: 14px; font-weight: 600; white-space: nowrap; }
.badge, .badge.high, .badge.High, .badge.medium, .badge.Medium, .badge.limited, .badge.Limited, .badge.verified, .badge.warning { background: var(--rw-surface); color: var(--rw-muted); border-color: var(--rw-rule); font-size: 12px; }
.badge.grade { color: var(--rw-black); }
.eyebrow { font-size: 12px; line-height: 16px; letter-spacing: .08em; color: var(--rw-muted); }
.page-heading .eyebrow::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--rw-red); }
.page { padding: 48px 48px 64px; }
.lede { max-width: 65ch; font-size: 16px; line-height: 26px; }
.breadcrumbs, .select-field > span, .country-label, .compare-label, .source-id { font-size: 12px; letter-spacing: .04em; }
.source-id, .source-ref { font-family: var(--rw-font-mono); }
.article-section p, .article-section ul, .article-section ol, .static-article p, .static-article ul, .static-article ol { max-width: 72ch; font-size: 16px; line-height: 26px; }
.article-section p.article-intro { font-size: 20px; line-height: 30px; color: var(--rw-black); }
.article-section a:not(.button, .visitor-action):not(.track-title), .source-heading a, .source-item > a { color: var(--rw-black); text-decoration-color: var(--rw-control-boundary); text-underline-offset: 4px; }
.article-section a:not(.button, .visitor-action):hover, .source-heading a:hover { color: var(--rw-red); }
.article-section p.section-sources, .venue-photo figcaption, .measurement-note, .compare-note, .fact-row dt, .fact-panel .fact-row dt { font-size: 14px; line-height: 21px; }
.fact-row dd, .fact-panel .fact-row dd { font-size: 14px; line-height: 21px; }
.country-card, .method-card, .download-card { border-radius: 0; box-shadow: none; background: var(--rw-white); }
.country-card { border-width: 0 0 1px; padding-inline: 0; }
.country-card:hover, .download-card:hover { border-color: var(--rw-black); }
.ranking-note, .directory-note, .research-gaps, .callout, .measurement-notes, .demand-feature { background: var(--rw-surface); color: var(--rw-muted); border-color: var(--rw-rule); }
.research-gaps h3, .research-gaps p, .research-gaps li { color: var(--rw-muted); }
.rank-bar > span, .score-bar > span { background: var(--rw-black); }
.compare-column-header { background: var(--rw-black); color: var(--rw-white); }
.compare-column-header h2, .compare-column-header h3, .compare-column-header a { color: var(--rw-white); }
.compare-column-header p, .compare-column-header .country-label, .compare-column-header .icon-button { color: var(--rw-muted-on-dark); }
.compare-column-header .icon-button:hover { background: var(--rw-surface-on-dark); color: var(--rw-white); }
.compare-column-header .is-saved { color: var(--rw-white); }
.compare-tray-inner, #toast { background: var(--rw-black); border-color: var(--rw-control-boundary); color: var(--rw-white); }
dialog { border-radius: var(--rw-radius-panel); background: var(--rw-white); }
.modal-search:focus-within { box-shadow: inset 0 -2px var(--rw-red); }
.search-result.active, .search-result:hover { border-color: var(--rw-control-boundary); background: var(--rw-surface); }
:focus-visible { outline: 2px solid var(--rw-red); outline-offset: 3px; }

/* An immersive black shell; small text stays white or light neutral. */
#topbar { background: var(--rw-black); border-color: var(--rw-surface-on-dark); }
.atlas-header { gap: 32px; }
.atlas-brand { min-height: 44px; font-size: 22px; font-weight: 650; color: var(--rw-white); letter-spacing: -.6px; }
.atlas-header .global-search-button { height: 44px; border-color: var(--rw-control-boundary); background: var(--rw-black); color: var(--rw-muted-on-dark); border-radius: 4px; font-size: 14px; }
.atlas-header .global-search-button:hover { color: var(--rw-white); }
.atlas-header .global-search-button kbd { color: var(--rw-muted-on-dark); border-color: var(--rw-control-boundary); }
.header-action, .menu-toggle, .atlas-header .unit-toggle { min-height: 44px; color: var(--rw-white); }
.header-action:hover, .menu-toggle:hover { background: var(--rw-surface-on-dark); }
.header-action small { background: var(--rw-surface-on-dark); color: var(--rw-white); }
.header-action.has-saved .icon { color: var(--rw-white); background: var(--rw-green); padding: 2px; border-radius: 4px; }
.atlas-header .unit-toggle { background: var(--rw-black); border-color: var(--rw-control-boundary); color: var(--rw-muted-on-dark); }
.atlas-header .selected-unit { color: var(--rw-white); }
.app-menu .nav-item.active { box-shadow: inset 3px 0 var(--rw-red); }
.atlas-view-switch { border-color: var(--rw-control-boundary); border-radius: 4px; }
.atlas-view-switch button { min-height: 44px; font-size: 14px; color: var(--rw-muted-on-dark); }
.atlas-view-switch button[aria-pressed="true"] { background: var(--rw-white); color: var(--rw-black); box-shadow: inset 0 -3px var(--rw-red); }
.atlas-filter-toggle { border-color: var(--rw-control-boundary); font-size: 14px; color: var(--rw-white); }
.atlas-result-count { color: var(--rw-muted-on-dark); }
.earth-stage { background: var(--rw-black); }

.map-empty {
 position:absolute; z-index:4; top:50%; left:50%; transform:translate(-50%,-50%);
 width:max-content; max-width:calc(100% - 2rem); text-align:center;
 padding:1rem 1.25rem; background:var(--rw-white); border-radius:.6rem; box-shadow:0 2px 12px #11131538;
}
.map-empty h2 { margin:0 0 .65rem; font-size:1.125rem; }
.earth-stage:has(.map-empty:not([hidden])) :is(.atlas-fallback,.atlas-discovery) { display:none; }
.earth-status[data-state="unavailable"] { top: 112px; }
.earth-status, .atlas-fallback, .atlas-map-meta, .earth-credit { color: var(--rw-muted-on-dark); background: var(--rw-black); }
.atlas-fallback p, .atlas-map-info > div { color: var(--rw-muted-on-dark); }
.atlas-fallback h2 { color: var(--rw-white); }
.atlas-fallback { top: 220px; }
.atlas-fallback-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.atlas-fallback .earth-retry { position: static; margin: 0; background: var(--rw-black); color: var(--rw-white); border-color: var(--rw-control-boundary); }
.atlas-fallback .earth-retry:hover { background: var(--rw-surface-on-dark); }
.earth-reset, .earth-retry { min-height: 44px; border-color: var(--rw-control-boundary); color: var(--rw-white); border-radius: 4px; }
.earth-reset { top: 172px; bottom: auto; }
.earth-stage .maplibregl-ctrl-group { border-radius: 4px; }
.earth-stage .maplibregl-ctrl-group button { width: 44px; height: 44px; }
.atlas-discovery > span { color: var(--rw-muted-on-dark); font-size: 12px; }
.atlas-discovery { bottom: 104px; }
.pilot-list { scrollbar-color: var(--rw-control-boundary) transparent; }
.pilot-button { min-height: 44px; border-color: var(--rw-control-boundary); background: var(--rw-black); color: var(--rw-white); font-size: 14px; }
.pilot-button:hover { background: var(--rw-surface-on-dark); color: var(--rw-white); border-color: var(--rw-white); }
.atlas-map-meta { bottom: 44px; font-size: 12px; align-items: center; }
.atlas-map-meta > span { display: inline-flex; align-items: center; min-height: 44px; }
.atlas-map-info summary { display: inline-flex; align-items: center; min-height: 44px; }
.atlas-map-info > div { background: var(--rw-black); border-color: var(--rw-control-boundary); }
.earth-credit { bottom: 0; max-width: calc(100% - 40px); display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; font-size: 12px; }
.earth-credit a { display: inline-flex; align-items: center; min-height: 44px; }
.earth-pin { width: 44px; height: 44px; }
.earth-pin-dot { background: var(--rw-white); border-color: var(--rw-black); box-shadow: 0 0 0 1px var(--rw-white); }
.earth-pin:hover .earth-pin-dot, .earth-pin[aria-pressed="true"] .earth-pin-dot { background: var(--rw-red); border-color: var(--rw-white); box-shadow: 0 0 0 5px #11131580; }
.earth-pin:focus-visible { outline: 2px solid var(--rw-white); box-shadow: 0 0 0 4px var(--rw-black); }
.earth-pin-label { background: var(--rw-black); color: var(--rw-white); border-color: var(--rw-control-boundary); font-size: 14px; }
/* MapLibre updates this class as the globe rotates. Hide the whole control,
   including its label and hit target, while its location is behind the Earth. */
.earth-pin.maplibregl-marker-covered { visibility: hidden; pointer-events: none; }

/* Evidence is neutral. Red identifies the selected route; gaps remain visible. */
.route-lines, .route-lines .bridge { stroke: var(--rw-red); }
.route-lines .bridge-underlay, .route-lines .estimated-underlay { stroke: var(--rw-surface); }
.route-lines .estimated-segment { stroke: var(--rw-black); }
.route-endpoints { fill: var(--rw-black); stroke: var(--rw-white); }
.atlas-list { background: var(--rw-white); }
.atlas-result-select[aria-pressed="true"] { background: var(--rw-surface); box-shadow: inset 3px 0 var(--rw-red); }
.atlas-list-options .chip { min-height: 44px; }
.atlas-result-select > div > span, .atlas-result-measure > small { font-size: 12px; }
.is-list-view .atlas-view-switch, .is-list-view .atlas-filter-toggle { border-color: var(--rw-control-boundary); }
.is-list-view .atlas-view-switch button[aria-pressed="true"] { background: var(--rw-black); color: var(--rw-white); }

/* Complete fixed artwork at a readable size. The canvas's horizontal blank
   margins may overflow this frame; all artwork and D/8 clear space remain. */
#footer { background: var(--rw-black); border-color: var(--rw-surface-on-dark); color: var(--rw-white); }
.footer-content { grid-template-columns: 320px minmax(0,1fr); gap: 24px 48px; padding: 48px; align-items: center; }
.footer-brand { grid-column: 1; grid-row: 1 / 4; display: block; position: relative; width: min(320px,100%); height: 360px; overflow: hidden; }
.footer-brand img { position: relative; left: 50%; transform: translateX(-50%); width: 360px; max-width: none; height: 360px; }
.footer-tagline { max-width: 20ch; margin: 0; font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -.03em; align-self: end; }
.footer-links { font-size: 14px; color: var(--rw-white); align-self: start; }
.footer-note { grid-column: 2; color: var(--rw-muted-on-dark); font-size: 14px; line-height: 21px; align-self: start; max-width: 55ch; }

@media (max-width: 1050px) {
 .atlas-header { gap: 16px; }
 .header-action, .menu-toggle { width: 44px; }
 .header-action.has-saved { width: auto; }
 .header-action.has-saved > span:not(.icon) { display: inline; }
 .page { padding-inline: 32px; }
}
@media (max-width: 760px) {
 .atlas-brand { font-size: 19px; }
 .atlas-header { padding-inline: 16px; gap: 8px; }
 .atlas-header .global-search-button { width: 44px; }
 .atlas-header .unit-toggle { min-width: 60px; }
 .atlas-view-switch button, .atlas-filter-toggle { font-size: 12px; }
 .atlas-toolbar { gap: 8px; }
 .earth-stage .maplibregl-ctrl-top-right { right: 8px; }
 .earth-status[data-state="unavailable"] { top: 104px; }
 .atlas-fallback { top: 176px; }
 .atlas-map-meta { font-size: 12px; }
 .atlas-list { padding-top: 96px; }
 .atlas-list-heading h2 { font-size: 24px; }
 .page { padding: 32px 16px 48px; }
 .footer-content { grid-template-columns: minmax(0,1fr); padding: 16px 16px 48px; gap: 24px; }
 .footer-brand { grid-column: 1; grid-row: auto; justify-self: center; }
 .footer-tagline { font-size: 28px; }
 .footer-note { grid-column: 1; }
}
@media (max-width: 380px) {
 .atlas-header { padding-inline: 12px; gap: 4px; }
 .atlas-brand { font-size: 17px; }
 .atlas-header .unit-toggle { min-width: 56px; }
}
@media (max-height: 560px) {
 .atlas-discovery > span { display: none; }
 .atlas-fallback { top: 72px; }
 .atlas-fallback h2 { font-size: 20px; margin-bottom: 12px; }
 .atlas-fallback p { display: none; }
 .earth-status { width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
@media print {
 body { background: white; color: black; }
 .article-section p, .article-section ul, .article-section ol { font-size: 10pt; line-height: 1.5; }
}

/* Vector lockups retain their own viewBox and clear space at every breakpoint. */
.atlas-brand { flex: 0 0 auto; }
.atlas-brand img { display: block; width: 270px; height: auto; object-fit: contain; }
.footer-content { grid-template-columns: minmax(230px, 320px) minmax(0,1fr); padding: 48px; }
.footer-brand { width: min(320px,100%); height: auto; overflow: visible; }
.footer-brand img { position: static; transform: none; width: 100%; max-width: 100%; height: auto; }
.footer-tagline { font-family: var(--rw-font-display); }
.measure, .metric-value { font-variant-numeric: tabular-nums; }
.measure, .source-id { font-family: var(--rw-font-mono); }
.map-outline.is-unavailable { min-height: 0; padding: 16px; text-align: left; }
.map-outline.is-unavailable p { margin: 8px 0 0; font-size: 14px; line-height: 21px; }
.profile-outline { margin-top: 24px; }
.profile-outline .badge { margin-top: 12px; }
.nearby-circuits { position: absolute; z-index: 8; top: 92px; left: 24px; width: min(340px,calc(100% - 48px)); max-height: calc(100% - 180px); overflow-y: auto; background: var(--rw-white); color: var(--rw-black); border: 1px solid var(--rw-control-boundary); border-radius: 8px; padding: 16px; box-shadow: 0 8px 32px #0005; }
.nearby-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nearby-heading h2 { font-size: 24px; margin: 0; }
.nearby-circuits ul { list-style: none; padding: 0; margin: 8px 0 0; }
.nearby-circuits li + li { border-top: 1px solid var(--rw-rule); }
.nearby-circuits li button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; width: 100%; padding: 12px 8px; text-align: left; background: transparent; color: inherit; }
.nearby-circuits li button:hover { background: var(--rw-surface); }
.nearby-circuits li span { font-size: 14px; color: var(--rw-muted); }
.earth-pin.is-group .earth-pin-dot { display: grid; place-items: center; width: 30px; height: 30px; color: var(--rw-black); font: 500 12px var(--rw-font-mono); border-width: 2px; }
.earth-pin.is-group:hover .earth-pin-dot, .earth-pin.is-group[aria-pressed="true"] .earth-pin-dot { color: var(--rw-white); }
.search-result { flex-wrap: wrap; }
.search-result > a { flex: 1 1 100%; }
.search-result-actions { width: 100%; justify-content: flex-end; gap: 8px; }
.search-result-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.search-result-actions .search-profile { margin-right: auto; }
.corner-matches { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.corner-matches a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.atlas-result.track-card:has(.corner-matches) { flex-wrap: wrap; }
.atlas-result .corner-matches { flex-basis: 100%; padding-inline: .75rem; }
.layout-comparison { max-width: 72ch; margin: .75rem 0; }
.layout-comparison strong { display: block; }
/* One scroll container keeps circuit names visible above aligned subgrid rows. */
.compare-grid { max-height: calc(100svh - 160px); overflow: auto; align-items: stretch; }
.compare-column { overflow: visible; }
.compare-column-header { position: sticky; top: 0; z-index: 2; min-height: 128px; padding: 16px; }
.compare-column-header h2 { font-family: var(--rw-font-display); font-size: 24px; margin-bottom: 8px; }
.compare-cell, .compare-column > :nth-child(6), .compare-column > :nth-child(15), .compare-column > :nth-child(18) { min-height: 76px; padding: 12px 16px; }
.compare-value { font-size: 16px; line-height: 24px; }
.compare-note { margin-top: 8px; }
.compare-note summary { min-height: 44px; display: list-item; align-content: center; cursor: pointer; color: var(--rw-muted); }
.compare-note p { margin: 0 0 8px; font-size: 14px; line-height: 21px; }
.static-navigation { display: flex; gap: 8px 24px; align-items: center; padding-inline: 24px; }
.static-navigation a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-size: 14px; }
@media (max-width: 1050px) { .atlas-header { gap: 16px; } .atlas-brand picture img { width: 52px; height: 52px; } }
@media (max-width: 760px) {
 .atlas-brand picture img { width: 48px; height: 48px; }
 .footer-content { grid-template-columns: minmax(0,1fr); padding: 32px 16px; }
 .footer-brand { justify-self: start; grid-row: auto; }
 .nearby-circuits { top: 72px; left: 16px; width: min(340px,calc(100% - 32px)); }
 .compare-grid { max-height: calc(100svh - 110px); }
 .static-navigation { gap: 8px 16px; padding-inline: 16px; flex-wrap: wrap; }
 .static-navigation .atlas-brand { flex-basis: 100%; }
 .static-navigation { height: auto; min-height: var(--atlas-header-height); padding-block: 12px; }
}
@media print {
 .compare-grid { max-height: none; overflow: visible; }
 .compare-column-header { position: static; }
 .article-section p, .article-section ul, .article-section ol { font-size: 10pt; }
}

/* Reveal the live surface once it has drawn a globe. */
.webgl-surface { width: 100%; height: 100%; }
.earth-stage:not([data-globe-state="ready"]) .earth-map { visibility: hidden; }
.flat-map {
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 width: min(calc(100% - 1.5rem), 72rem, max(15rem, calc((100svh - 13rem) * 2)));
 aspect-ratio: 2 / 1;
 border: 1px solid var(--rw-control-boundary);
 border-radius: var(--rw-radius-panel);
}
.flat-map img { display: block; width: 100%; height: 100%; border-radius: inherit; }
.flat-map-pins { position: absolute; inset: 0; }
.flat-map-pin { position: absolute; transform: translate(-50%, -50%); }
.flat-map-pin:is(:hover, :focus-visible, [aria-pressed="true"]) { z-index: 1; }
.earth-stage[data-globe-state="unavailable"] .atlas-fallback {
 top: 78px;
 z-index: 3;
 max-width: none;
}
.earth-stage[data-globe-state="unavailable"] .atlas-fallback h2 { font-size: 1rem; margin-bottom: .375rem; }
.earth-stage[data-globe-state="unavailable"] .earth-status {
 top: auto;
 bottom: 145px;
}
@media (max-height: 560px) {
 .earth-stage[data-globe-state="unavailable"] .atlas-fallback { top: 66px; }
 .earth-stage .atlas-fallback-actions .button { margin-block: 0; }
}

.software-earth,
.software-earth-markers { position: absolute; inset: 0; width: 100%; height: 100%; }
.software-earth { display: block; cursor: grab; touch-action: none; }
.software-earth:active { cursor: grabbing; }
.software-earth:focus-visible { outline: 2px solid var(--rw-white); outline-offset: -3px; }
.software-earth-markers { pointer-events: none; }
.software-earth-pin {
 position: absolute;
 transform: translate(-50%, -50%);
 pointer-events: auto;
}
.software-earth-pin:is(:hover, :focus-visible, [aria-pressed="true"]) { z-index: 1; }
.software-earth-controls {
 position: absolute;
 top: 1rem;
 right: 1rem;
 display: flex;
 flex-direction: column;
 gap: .375rem;
}
.software-earth-zoom {
 display: grid;
 place-items: center;
 min-height: 44px;
 border: 1px solid var(--rw-control-boundary);
 border-radius: var(--rw-radius-control);
 background: var(--rw-black);
 color: var(--rw-white);
 font: 600 1.375rem/1 var(--rw-font-ui);
}
.software-earth-zoom:hover { background: var(--rw-surface-on-dark); }
@media (max-width: 760px) {
 .software-earth-controls { top: .5rem; right: .5rem; }
}

/* Keep search and the map controls in the same space throughout startup. */
.home-search { display:flex; flex:1 1 22rem; max-width:28rem; min-width:0; align-items:center; margin-inline:auto; border:1px solid var(--rw-control-boundary); border-radius:var(--rw-radius-control); background:var(--rw-white); color:var(--rw-black); }
.home-search:focus-within { outline:2px solid var(--rw-red); outline-offset:2px; }
.home-search input[type="search"] { min-width:0; flex:1; border:0; padding:0 .75rem; background:transparent; font-size:1rem; }
.home-search button { display:grid; place-items:center; background:transparent; color:inherit; }
.home-search input:focus { outline:0; }
.home-static-header .menu-toggle,.home-static-header .unit-toggle { display:inline-flex; align-items:center; justify-content:center; }
.home-first-paint { display:flex; flex-direction:column; height:calc(100svh - var(--atlas-header-height)); background:var(--rw-black); }
.home-first-paint .earth-stage { flex:1; height:auto; }
.home-first-paint .atlas-toolbar,.atlas-page .atlas-toolbar { position:relative; inset:auto; flex:none; min-height:60px; gap:.5rem; padding:.375rem 1rem; background:var(--rw-black); border-bottom:1px solid var(--rw-surface-on-dark); }
.atlas-toolbar .atlas-filters {
 top:calc(100% + .25rem); left:.5rem; max-height:calc(100svh - var(--atlas-header-height) - 8rem);
}
.static-directory-mode .home-first-paint { height:auto; }
.static-directory-mode .home-first-paint :is(.atlas-workspace,.atlas-toolbar), .static-directory-mode .home-static-header :is(.home-search,.unit-toggle) { display:none; }
.atlas-page .atlas-toolbar .active-filters { order:5; min-width:0; }
.home-first-paint .atlas-view-switch a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 .8rem; color:var(--rw-muted-on-dark); font-weight:600; }
.home-first-paint .atlas-view-switch [aria-current] { background:white; color:var(--rw-black); border-bottom:3px solid var(--rw-red); }
.atlas-toolbar .atlas-result-count { display:inline-flex; align-items:center; justify-content:center; gap:.25rem; min-height:44px; margin-left:auto; padding:0 .5rem; color:var(--rw-white); background:transparent; font-size:.875rem; font-weight:600; text-decoration:underline; text-underline-offset:.2em; }
.is-list-view .atlas-page .atlas-toolbar { background:var(--rw-white); border-color:var(--rw-rule); }
.is-list-view .atlas-result-count { display:none; }
.atlas-list { padding-top:1.25rem; }
.atlas-list .atlas-result-select.atlas-result-profile { display:flex; width:100%; justify-content:space-between; text-align:left; text-decoration:none; color:var(--rw-black); }
.earth-pin.show-name .earth-pin-label { display:block; left:50%; transform:translateX(-50%); max-width:9rem; overflow:hidden; text-overflow:ellipsis; pointer-events:none; }
.circuit-page .profile-heading { display:block; }
.circuit-page .profile-heading .profile-hook { max-width:42ch; margin:.6rem 0 .7rem; color:var(--rw-black); font:600 clamp(1.35rem,3vw,2rem)/1.12 var(--rw-font-display); }
.profile-hook .wiki-citations,.signature-race .wiki-citations { margin-left:.25rem; color:var(--rw-muted); font:400 .75rem/1.4 var(--rw-font-ui); }
.circuit-page .signature-race { display:flex; align-items:baseline; flex-wrap:wrap; gap:.25rem .6rem; margin:.65rem 0; font-size:1rem; }
.signature-race strong { color:var(--rw-muted); font-size:.875rem; }
.circuit-page .profile-start { margin:0 0 .5rem; gap:0 1rem; }
.profile-start a, .track-detail-links a { display:inline-flex; align-items:center; min-height:44px; font-weight:600; text-decoration:underline; text-underline-offset:.18em; }
.track-detail-links { display:flex; flex-wrap:wrap; gap:0 1rem; }
.circuit-page a.profile-visit { display:inline-flex; min-height:44px; align-items:center; font-weight:600; text-decoration:underline; text-underline-offset:.18em; }
.circuit-page p.visit-status { margin:.5rem 0; color:var(--rw-muted); }
.matrix-section { display:grid; gap:.875rem; min-width:0; }
.matrix-section > .button { justify-self:start; }
.matrix-pair { display:none; }
.matrix-scroll { max-height:calc(100svh - var(--atlas-header-height) - 4rem); overflow:auto; border:1px solid var(--rw-rule); }
.comparison-matrix { width:100%; table-layout:fixed; border-spacing:0; }
.comparison-matrix th,.comparison-matrix td { padding:.7rem .8rem; text-align:left; vertical-align:top; overflow-wrap:anywhere; border-bottom:1px solid var(--rw-rule); }
.comparison-matrix thead th { position:sticky; top:0; z-index:1; background:var(--rw-black); color:white; font:600 clamp(1.05rem,2.5vw,1.5rem)/1.15 var(--rw-font-display); }
.comparison-matrix thead th:first-child { width:20%; }
.comparison-matrix thead small { display:block; font:400 .875rem/1.35 var(--rw-font-ui); color:var(--rw-muted-on-dark); margin:.3rem 0; }
.matrix-remove { padding:0; background:transparent; color:white; font:400 .875rem/1 var(--rw-font-ui); text-decoration:underline; }
.comparison-matrix tbody th { color:var(--rw-muted); background:var(--rw-surface); font-size:.9rem; }
.comparison-matrix td { font-weight:600; border-left:1px solid var(--rw-rule); }
.comparison-matrix .compare-note { font-weight:400; }
body:has(.compare-page) #compare-tray { display:none; }

@media (max-width:760px) {
 .atlas-header:has(.home-search) { gap:.375rem; padding-inline:.625rem; }
 .home-search { margin:0; flex:1; }
 .home-search input[type="search"] { padding:0 .5rem; width:1px; }
 .atlas-header:has(.home-search) .unit-toggle { min-width:52px; }
 .home-first-paint .atlas-toolbar,.atlas-page .atlas-toolbar { padding:.25rem .5rem; gap:.25rem; }
 .atlas-page .atlas-toolbar { flex-wrap:wrap; }
 .atlas-page .atlas-toolbar .active-filters { flex-basis:100%; max-width:100%; }
 .atlas-toolbar .atlas-view-switch button,.atlas-toolbar .atlas-filter-toggle,.home-first-paint .atlas-view-switch a { padding-inline:.5rem; font-size:.875rem; }
 .atlas-list .atlas-result-select.atlas-result-profile { grid-column:1; justify-self:stretch; }
 .atlas-list { padding-top:1rem; }
 .earth-stage[data-globe-state="unavailable"] .atlas-fallback { top:1rem; }
 .nearby-circuits { top:.75rem; }
 .matrix-pair:not(:empty) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; }
 .matrix-pair select { max-width:100%; width:100%; font-size:1rem; }
 .comparison-matrix [data-pair-visible="false"] { display:none; }
 .comparison-matrix thead th:first-child { width:26%; }
 .comparison-matrix th,.comparison-matrix td { padding:.55rem .45rem; }
 .comparison-matrix thead small { font-size:.8125rem; }
 .comparison-matrix .measure { white-space:normal; }
}
.flat-map-pins { overflow:hidden; border-radius:inherit; background-image:url('/assets/maps/world-flat.svg'); background-repeat:repeat-x; }
#flat-back { position:absolute; top:100%; right:0; margin-top:.25rem; }
.home-menu { position:relative; }
.home-menu summary { cursor:pointer; list-style:none; }
.home-menu > div { position:absolute; right:0; min-width:10rem; background:var(--rw-white); color:var(--rw-black); border:1px solid var(--rw-rule); }
.home-menu > div a { display:block; padding:.65rem 1rem; }

.earth-stage[data-globe-state="loading"] .earth-status {
 top: 50%; left: 50%; bottom: auto; transform: translate(-50%, -50%);
 width: auto; height: auto; margin: 0; clip: auto; overflow: visible;
 pointer-events: none;
}

.other-circuit h1 { margin-bottom: 0.5rem; }
.other-circuit figure { margin-top: 1rem; }
.other-circuit figcaption, .other-circuit .other-reviewed, .other-circuit .other-sources { color: var(--rw-muted); font-size: .91rem; line-height: 1.6; margin-top: .6rem; }
.other-location { margin: 1.5rem 0 .4rem; }

.other-circuit .profile-start { margin-block: 1rem; gap: .65rem 1.25rem; }
.other-circuit .profile-utilities, .other-circuit [data-other-actions] { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.other-circuit .profile-utilities .button { text-decoration: none; }
.other-circuit .other-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 1rem; padding: 1rem; }
.other-metrics dt { color: var(--rw-muted); }
.other-circuit .other-metrics dd { font: 600 1.55rem/1.3 var(--rw-font-display); }
.other-circuit h3, .other-circuit .other-evidence { margin-top: 1.4rem; }
.other-evidence summary { cursor: pointer; font-weight: 600; }


/* Keep the circuit in view; the links are useful, the promotional footer isn't. */
.site-frame:has(.circuit-page) #footer { background: var(--rw-white); border-color: var(--rw-rule); }
.site-frame:has(.circuit-page) .footer-content { display: block; max-width: 76rem; margin: auto; padding: .5rem clamp(1rem,3vw,2.5rem); }
.site-frame:has(.circuit-page) :is(.footer-brand,.footer-tagline) { display: none; }
.site-frame:has(.circuit-page) .footer-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.site-frame:has(.circuit-page) .footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--rw-muted); font-size: .875rem; }
.atlas-list .atlas-result.track-card { min-height: 4.5rem; }
.atlas-list .atlas-result-profile strong { font: 600 1.25rem/1.15 var(--rw-font-display); }
.atlas-list .atlas-result-profile > div > span { margin-top: .2rem; font-size: .875rem; }
@media (min-width: 35rem) {
  .atlas-discovery { bottom: 3.25rem; }
  .atlas-map-meta { right: auto; bottom: 0; }
  .earth-credit { left: auto; right: 1.25rem; }
}
@media (max-width: 47.5rem) {
  /* Saved and Compare remain in Menu. Leave the search field enough room to type. */
  #sidebar:has(.app-menu) + .site-frame .header-actions > .header-action { display: none; }
  .atlas-header .global-search-button { flex: 1; min-width: 0; }
}
