/* The same history controls remain available on every page. */
:root{--journey-height:52px}
body[data-palette] .journey-navigation{display:flex;align-items:center;flex:0 0 auto;gap:6px;margin:0 auto 0 0;padding:0;overflow:visible;background:none;border:0;letter-spacing:0}
body[data-palette] .journey-navigation :is(button,a){display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:40px;margin:0;padding:8px 10px;border:1px solid #789DC955;border-radius:7px;background:transparent;color:var(--ink,#173F78);font:600 13px/1.2 var(--font-ui,Inter,sans-serif);text-decoration:none;white-space:nowrap}
body[data-palette] .journey-navigation button span{font-size:17px;width:auto;margin:0;line-height:1}
body[data-palette] .journey-navigation :is(button,a):hover:not(:disabled){background:#407FC916;border-color:#789DC9}
body[data-palette] .journey-navigation button:disabled{opacity:.35;cursor:default}
html[data-theme=dark] body[data-palette] .journey-navigation :is(button,a){color:#EDF4FF}
body[data-palette] #main>header:has(.journey-navigation,.section-switcher:not([hidden])){display:flex!important;position:sticky;top:0;z-index:45;height:var(--journey-height)!important;min-height:var(--journey-height)!important;gap:12px;background:var(--bg,#F3F6FB);border:0}
.updated-short,.updated-label-short{display:none}
body[data-palette] .mobile-update-tools{display:flex;align-items:center;gap:6px;flex:0 0 auto;margin-left:auto;letter-spacing:0}
body[data-palette] .mobile-update-tools #site-last-updated{font-size:10px;line-height:1.3;font-weight:400;white-space:nowrap;text-align:right;margin:0}
body[data-palette] .mobile-update-tools #site-last-updated time{display:block}
body[data-palette] .mobile-update-tools #refresh-app{display:flex;align-items:center;justify-content:center;flex:none;width:32px;height:40px;margin:0;padding:0;border:0;background:transparent;color:var(--ink)}
.mobile-update-tools [data-refresh-label]{display:none}
html:is([data-current-page=welcome],[data-entry-page=welcome]) .mobile-update-tools{display:none!important}
body[data-palette] .page-navigation{display:none!important}
@media(min-width:761px) and (max-width:1350px){body[data-palette] #main>header .breadcrumb{display:none}}
body[data-palette] #main>header .breadcrumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:.04em}
#page-back,.page-back-floating{display:none!important}
#ratings .tabs{top:var(--journey-height)!important}
#ratings .table-shell :is(#strength-table,.snapshot-table) thead th{top:calc(var(--journey-height) + var(--league-tabs-height))!important}
#performance-toolbar{top:calc(var(--journey-height) + var(--league-tabs-height))!important}
@media(min-width:761px){#ratings .table-shell .snapshot-table.performance thead th{top:calc(var(--journey-height) + var(--league-tabs-height) + var(--performance-toolbar-height,0px))!important}}
body[data-palette] .feedback-header{flex-wrap:wrap;gap:16px}
body[data-palette] .feedback-header .journey-navigation{margin-left:auto;margin-right:0}
@media(max-width:760px){
 body[data-palette] #main>header:has(.journey-navigation){gap:4px}
 body[data-palette] .page-navigation{display:none!important}
 body[data-palette] .mobile-update-tools{display:flex;align-items:center;gap:3px;min-width:0;margin-left:auto}
 body[data-palette] .mobile-update-tools #site-last-updated{font-size:8px;line-height:1.3;white-space:nowrap;text-align:right;margin:0}
 .mobile-update-tools #site-last-updated time{display:block}
 .mobile-update-tools .updated-full{display:none}
 .mobile-update-tools .updated-short{display:inline;font-size:9px}
 body[data-palette] .mobile-update-tools #refresh-app{display:flex;align-items:center;justify-content:center;flex:none;width:30px;height:44px;margin:0;padding:0;border:0;background:transparent;color:var(--ink)}
 .mobile-update-tools [data-refresh-label]{display:none}
 html:is([data-current-page=welcome],[data-entry-page=welcome]) .mobile-update-tools{display:none!important}
 body[data-palette] #main>header .breadcrumb{display:none}
 body[data-palette] .journey-navigation{gap:4px}
 body[data-palette] .journey-navigation :is(button,a){min-height:36px;padding:6px;font-size:11px}
 body[data-palette] #main>header #theme{width:40px;min-width:40px;padding-inline:0;justify-content:center}
 #main>header #theme span{display:none!important}
 #main>header .install-app-top{display:none!important}
 #ratings .tabs{top:var(--journey-height)!important}
 #ratings .mobile-view-picker-title{font-size:12px!important}
 #performance-toolbar{top:calc(var(--journey-height) + var(--league-tabs-height))!important}
 #ratings .table-shell .snapshot-table.performance thead th{top:calc(var(--journey-height) + var(--league-tabs-height))!important}
 body[data-palette] .feedback-header .journey-navigation{margin:0;width:100%;justify-content:space-between}
 /* Give each branch comfortable space without stretching it to fill the phone. */
 #explore .explore-destination-tree{grid-template-rows:repeat(5,minmax(clamp(60px,10svh,82px),auto));gap:6px;margin-bottom:0}
 #explore .explore-destination-tree::before{bottom:calc((100% - 24px)/10)}
 body[data-palette] #explore .explore-destination-tree>a{align-items:center}
 #explore .explore-destination-arrow{top:50%;transform:translateY(-50%)}
 #explore .explore-destination-tree strong{font-size:clamp(16px,2.2svh,19px)}
 #explore .explore-destination-tree small{font-size:clamp(12px,1.7svh,14px);padding-right:18px}
}

/* History remains visible on entry pages and beside Explore on phone headers. */
html:is([data-current-page=welcome],[data-entry-page=welcome]) body[data-palette] #main>header:has(.journey-navigation){display:flex!important}
html:is([data-current-page=welcome],[data-entry-page=welcome]) body[data-palette] .journey-navigation{display:flex!important}
@media(max-width:760px){
 body[data-palette] #site-navigation:has(>.journey-navigation){grid-template-columns:max-content minmax(0,1fr) max-content;grid-template-rows:minmax(44px,auto) minmax(36px,auto);grid-auto-rows:auto;min-height:88px;gap:0 6px}
 body[data-palette] #site-navigation:has(>.journey-navigation)>.brand{align-self:center}
 body[data-palette] #site-navigation:has(>.journey-navigation)>.mobile-actions{grid-column:1/-1;grid-row:1;justify-self:end;align-self:center;gap:6px}
 body[data-palette] #site-navigation .mobile-actions #menu-toggle{width:auto;min-width:76px;padding:8px;gap:5px;white-space:nowrap}
 #site-navigation .mobile-actions #menu-toggle .icon{width:20px;height:20px;flex:none}
 body[data-palette] #site-navigation>.journey-navigation{grid-column:1;grid-row:2;justify-self:start;margin:0;gap:4px}
 body[data-palette] #site-navigation>.journey-navigation :is(button,a){color:#edf4ff;border-color:color-mix(in srgb,var(--section-dark) 55%,#091729);font-size:12px;padding:6px;min-height:36px;gap:4px}
 body[data-palette] #site-navigation>.journey-navigation button span{font-size:14px}
 body[data-palette] #site-navigation:has(>.journey-navigation)>.explore-nav-link{grid-column:3;grid-row:2;justify-self:end;min-width:0;min-height:36px;padding:6px 4px;gap:5px}
 body[data-palette] #site-navigation>.journey-navigation button:hover:not(:disabled){background:color-mix(in srgb,var(--section-light) 35%,#091729)}
 body[data-palette] #site-navigation>.journey-navigation :focus-visible{outline-color:var(--section-dark)}
 body[data-palette] .journey-navigation .journey-start{display:none}
 /* The joined controls sit inside one 1px panel edge and an 8px inset. */
 html[data-table-navigation] body[data-palette] #main>header:has(.section-switcher:not([hidden])){padding-inline:0}
 html[data-table-navigation][data-current-page=ratings] body[data-palette] #main>header:has(.section-switcher:not([hidden])),
 html[data-table-navigation][data-current-page=global] body[data-palette] #main>header:has(.section-switcher:not([hidden])){padding-inline:9px}
 /* The update time lives in the top bar, leaving no empty heading row. */
 :root{--journey-height:0px}
 html[data-current-page=welcome]{--journey-height:36px}
 body[data-palette] #main>header .section-switcher{display:none!important}
 html:not([data-current-page=welcome]) body[data-palette] #main>header{display:none!important}
 body[data-palette] #site-navigation>.mobile-update-tools{grid-column:1/-1;grid-row:3;justify-self:center;align-self:end;max-width:100%;margin:0;padding-top:2px;color:#bdcde0}
 body[data-palette] #site-navigation .mobile-update-tools #site-last-updated{font-size:9px;line-height:1.3;white-space:nowrap;text-align:center;color:inherit}
 body[data-palette] #site-navigation .mobile-update-tools #site-last-updated time{display:inline}
 #site-navigation .mobile-update-tools .updated-label-full{display:none}
 #site-navigation .mobile-update-tools .updated-label-short{display:inline}
 #site-navigation .mobile-update-tools .updated-short{font-size:9px}
 #site-navigation .mobile-update-tools .updated-short>span{display:inline}
 #site-navigation .mobile-update-tools .updated-short>span+span::before{content:' · '}
 #site-navigation .mobile-update-tools .updated-pending{display:inline;font-size:inherit;white-space:nowrap}
 body[data-palette] #site-navigation .mobile-actions #refresh-app{display:flex;align-items:center;justify-content:center;flex:none;width:28px;min-width:28px;height:36px;min-height:36px;margin:0;padding:0;border:0;background:transparent;color:#bdcde0}
 #site-navigation .mobile-actions [data-refresh-label]{display:none}
 html:is([data-current-page=welcome],[data-entry-page=welcome]) #site-navigation .mobile-actions #refresh-app{display:none}
}

/* Refresh travels with history navigation, including Enter and contact pages. */
body[data-palette] .journey-navigation [data-refresh-app] svg{width:16px;height:16px}
body[data-palette] .journey-navigation [data-refresh-label]{font:inherit}
@media(max-width:760px){
 body[data-palette] .journey-navigation [data-refresh-app]{min-width:36px;width:36px;padding:6px}
 body[data-palette] .journey-navigation [data-refresh-label]{display:none}
}

body[data-palette] .journey-navigation button .journey-label{font:inherit}
.journey-navigation .journey-arrow{display:block;width:18px;height:18px;flex:none}
#journey-forward .journey-arrow{transform:rotate(180deg)}
@media(max-width:760px){
 body[data-palette] .journey-navigation :is(#journey-back,#journey-forward){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;padding:0;gap:0}
 body[data-palette] .journey-navigation button .journey-label{display:none}
 body[data-palette] .journey-navigation .journey-arrow{width:20px;height:20px}
}
