/* Shared Web / desktop / embedded workspace icon contract. */
:root{--fd-icon-color:var(--text,#173049);--fd-icon-muted:var(--muted,#52677f);--fd-icon-active:var(--accent,#1769b0);--fd-icon-focus:var(--accent,#1769b0);--fd-icon-hover:var(--surface-hover,rgba(97,144,193,.12));--fd-icon-border:var(--border,rgba(110,141,173,.28));--fd-icon-radius:8px}
svg.fd-icon{display:inline-block!important;width:20px!important;height:20px!important;min-width:20px;flex:0 0 auto;vertical-align:middle;overflow:visible;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round;stroke-linejoin:round;color:inherit;pointer-events:none}
svg.fd-icon-16{width:16px!important;height:16px!important;min-width:16px}svg.fd-icon-24{width:24px!important;height:24px!important;min-width:24px}
svg.fd-icon>*{vector-effect:non-scaling-stroke;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fd-icon-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;min-width:44px;min-height:44px;padding:10px;line-height:1;border:1px solid var(--fd-icon-border);border-radius:var(--fd-icon-radius);background:transparent;color:var(--fd-icon-color);cursor:pointer;transition:background-color 120ms ease,color 120ms ease,border-color 120ms ease}
.fd-nav-item{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border-radius:var(--fd-icon-radius);color:var(--fd-icon-color);text-decoration:none}
.fd-icon-button:hover:not(:disabled),.fd-nav-item:hover{background:var(--fd-icon-hover)}
.fd-icon-button:focus-visible,.fd-nav-item:focus-visible{outline:2px solid var(--fd-icon-focus);outline-offset:3px}
.fd-icon-button:disabled,.fd-icon-button[aria-disabled="true"]{opacity:.45;cursor:not-allowed}
.fd-icon-button[aria-pressed="true"],.fd-nav-item[aria-current="page"]{color:var(--fd-icon-active);background:var(--fd-icon-hover);border-color:currentColor}
button:has(>.fd-icon),a:has(>.fd-icon){gap:8px;align-items:center}
@media(prefers-reduced-motion:reduce){.fd-icon-button,.fd-nav-item{transition:none}}
.maplibregl-ctrl-group button.fd-map-icon-button{width:44px;height:44px;min-height:44px;display:flex;align-items:center;justify-content:center;color:var(--fd-icon-color)}
.maplibregl-ctrl button.fd-map-icon-button .maplibregl-ctrl-icon{background-image:none!important;display:flex;align-items:center;justify-content:center}
.fd-list-check{display:inline-flex;align-items:center;justify-content:center;color:var(--fd-icon-active);margin-inline-end:8px;vertical-align:middle}
.check-list li>.fd-list-check,.planner-intro li>.fd-list-check,.reference-download-benefits li>.fd-list-check,.account-plan-card li>.fd-list-check{position:absolute;left:0;top:0}
:where(.home-page,.download-page,.account-page){--fd-icon-color:var(--ink,#102344);--fd-icon-active:var(--blue,#0758eb);--fd-icon-border:var(--line,#dbe5f3)}
:where([data-ui-scope="desktop"],[data-ui-scope="desktop-planning"]){--fd-icon-color:var(--text,var(--ink,#dce6f3));--fd-icon-active:var(--accent,#59cee7);--fd-icon-border:var(--line,#33465b)}
/* Legacy panel selectors cannot shrink the shared accessible hit area. */
html body button.fd-icon-button{min-width:44px!important;min-height:44px!important;align-items:center;justify-content:center}
body[data-ui-scope="desktop"] .chart-searchbar{position:relative}
body[data-ui-scope="desktop"] .chart-searchbar>span{position:absolute;left:12px;top:50%;transform:translateY(-50%);line-height:0;pointer-events:none}
body[data-ui-scope="desktop"] .chart-searchbar input{padding-left:40px!important}
.live-aircraft>svg{display:block;width:28px;height:32px;color:inherit}
.weather-category-swatch{display:inline-block;width:12px;height:12px;border-radius:50%;vertical-align:middle;background:var(--weather-category-color);outline:1px solid currentColor;outline-offset:1px}
.weather-category-swatch[data-category="VFR"]{--weather-category-color:#2daa62}.weather-category-swatch[data-category="MVFR"]{--weather-category-color:#328bd3}.weather-category-swatch[data-category="IFR"]{--weather-category-color:#d74848}.weather-category-swatch[data-category="LIFR"]{--weather-category-color:#a44ab9}
:where(.map-tools,.cruise-map-tools,.cruise-tools) button.fd-icon-button{color:var(--ink,#173049);background:var(--surface,#edf4fb);border-color:var(--line,#c5d4e5)}
.fd-nav-managed:focus-visible{outline:2px solid var(--fd-icon-focus);outline-offset:3px}
@media(max-width:640px){.home-page .reference-hero-copy{padding-top:128px}}
html body [data-theme-toggle]{min-height:44px}
/* Controls stay legible on either map palette, following the UI theme. */
html[data-theme] :is(.map-tools,.cruise-map-tools,.cruise-tools) button.fd-icon-button{color:var(--ink,#173049)!important;background:var(--surface,#fff)!important;border-color:var(--line,#c5d4e5)!important}
html[data-theme] :is(.map-tools,.cruise-map-tools,.cruise-tools) button.fd-icon-button:hover:not(:disabled){background:var(--surface2,#edf3fa)!important}
html[data-theme] :is(.map-tools,.cruise-map-tools,.cruise-tools) button.fd-icon-button[aria-pressed="true"]{color:var(--accent,#1769b0)!important;border-color:currentColor!important;background:var(--surface2,#edf3fa)!important}
html body [data-theme-toggle]{min-height:44px!important}
body.rail-collapsed #sidebar .workspace-theme-toggle{width:44px;padding:10px;justify-content:center}
body.rail-collapsed #sidebar .workspace-theme-toggle [data-theme-label]{display:none}

.fd-icon-button[hidden],.fd-nav-item[hidden],.fd-map-icon-button[hidden]{display:none!important}
@media(max-width:760px){html body .site-header .nav-links{top:calc(100% + 8px)}html[data-theme] body .site-header .nav-links{background:var(--surface,#fff);color:var(--ink,#173049);border-color:var(--line,#c5d4e5)}}
/* Third-party map controls retain one group frame, with separators, not nested button frames. */
.maplibregl-ctrl-group button.fd-icon-button{border:0;border-radius:0;box-shadow:none}
.maplibregl-ctrl-group button.fd-icon-button+button.fd-icon-button{border-top:1px solid var(--fd-icon-border)}

/* Map SDK controls share the software palette, independently of the basemap. */
.maplibregl-ctrl-group:has(.fd-map-icon-button){background:var(--panel,var(--surface,#fff));border-color:var(--fd-icon-border)}
.maplibregl-ctrl-group button.fd-map-icon-button{color:var(--fd-icon-color);background:var(--panel,var(--surface,#fff))}
.maplibregl-ctrl-group button.fd-map-icon-button:hover:not(:disabled){background:var(--surface-hover,var(--surface2,#edf3fa))}
/* Tablet navigation gets a full row instead of squeezing Chinese labels vertically. */
@media(min-width:761px) and (max-width:1100px){
  html body .site-header .nav-row{flex-wrap:wrap;gap:12px;padding-top:12px;padding-bottom:12px}
  html body .site-header .nav-links{order:5;flex:0 0 100%;justify-content:center;margin:0;gap:8px}
  html body .site-header .nav-links a{white-space:nowrap;padding:8px 12px}
  html body.home-page .reference-hero-copy{padding-top:152px}
}
/* User-approved route illustration: solid official Lucide Plane, pointing right.
   This is a 40px decorative diagram marker, not a navigation/control icon. */
.routebar .route-arc{position:relative!important;line-height:0}
.routebar .route-arc>svg:not(.fd-icon){display:block;width:100%;height:auto}
.routebar .route-arc>.route-arc-plane{position:absolute!important;display:flex;align-items:center;justify-content:center;left:50%!important;top:32.857142857%!important;width:40px;height:40px;transform:translate(-50%,-50%)!important;pointer-events:none}
:is(.route-arc-plane,.route-connection)>svg.fd-icon{display:block!important;width:40px!important;height:40px!important;min-width:40px;fill:currentColor!important;transform:rotate(45deg)!important;transform-origin:50% 50%}
:is(.route-arc-plane,.route-connection)>svg.fd-icon>path{fill:currentColor!important}
.flight-strip>.route-connection{display:flex;align-items:center;justify-content:center;flex:0 0 64px;min-height:48px;margin:0}
/* Desktop overlay geometry follows measured content, including accessible 44px controls. */
body[data-ui-scope="desktop"] .maparea{--fd-route-height:0px;--fd-toolbar-height:56px;--fd-dock-height:0px;--fd-weather-height:0px}
body[data-ui-scope="desktop"] .route-point-strip{height:60px;min-height:60px;padding:8px;gap:8px}
body[data-ui-scope="desktop"] .route-point-strip>button{flex:0 0 44px;width:44px;height:44px;max-width:44px;max-height:44px;padding:10px;border-radius:8px}
body[data-ui-scope="desktop"] .maparea .maptools{top:calc(var(--fd-route-height) + 12px)}
body[data-ui-scope="desktop"] .maparea .compact-map-layers{top:calc(var(--fd-route-height) + var(--fd-toolbar-height) + 24px)}
body[data-ui-scope="desktop"] .maparea .maplibregl-ctrl-top-right{top:calc(var(--fd-route-height) + 12px)!important;right:12px}
body[data-ui-scope="desktop"] .maparea .weather-bottom{bottom:var(--fd-dock-height);max-height:calc(100% - var(--fd-route-height) - var(--fd-dock-height) - 32px);overflow-y:auto;overscroll-behavior:contain}
body[data-ui-scope="desktop"] .maparea.weather-manager-open .chart-workspace{bottom:calc(var(--fd-dock-height) + var(--fd-weather-height) + 16px)!important}
body[data-ui-scope="desktop"] .maparea .wx-level-picker{bottom:calc(var(--fd-dock-height) + var(--fd-weather-height) + 20px);max-height:calc(100% - var(--fd-route-height) - var(--fd-dock-height) - var(--fd-weather-height) - 40px)}
/* One control surface for layer, theme and aircraft-follow actions. */
body[data-ui-scope="desktop"] .compact-map-layers>button,
body[data-ui-scope="desktop"] .compact-map-layers .aircraft-follow-box .aircraft-follow{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;max-height:44px!important;padding:10px!important;border:1px solid var(--fd-ui-line,#35485d);border-radius:8px!important;color:var(--fd-ui-text,#eaf0f8);background:var(--fd-ui-subtle,#172232)!important}
body[data-ui-scope="desktop"] .compact-map-layers .aircraft-follow-box{width:44px!important;min-width:44px!important;max-width:44px!important;margin:0!important;padding:0!important;overflow:visible;border:0!important;background:transparent!important}
body[data-ui-scope="desktop"] .compact-map-layers>button[aria-pressed="true"],
body[data-ui-scope="desktop"] .compact-map-layers .aircraft-follow-box .aircraft-follow[aria-pressed="true"]{color:var(--blue,#65b7ff)!important;background:var(--fd-ui-selected,#284d70)!important;border-color:currentColor}
/* Padding belongs to the icon container; the SVG remains a full 20px drawing. */
body[data-ui-scope="desktop"] .wx-modal #wx-list button{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-height:60px;padding:12px 16px}
body[data-ui-scope="desktop"] .wx-modal .wx-product-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;border:1px solid var(--fd-ui-line,#46546b);border-radius:8px;background:var(--fd-ui-subtle,#344155)}
body[data-ui-scope="desktop"] .wx-modal #wx-list button .wx-product-icon svg.fd-icon{width:20px!important;height:20px!important;min-width:20px;padding:0!important;border:0!important;border-radius:0;background:transparent!important}
body[data-ui-scope="desktop"] .wx-modal #wx-list button[aria-pressed="true"] .wx-product-icon{color:var(--blue,#65b7ff);border-color:currentColor}
body[data-ui-scope="desktop"] .wx-modal .wx-availability-note{margin:0;padding:12px 16px;border-top:1px solid var(--fd-ui-line,#34445b);font-size:12px;line-height:1.6;color:var(--fd-ui-muted,var(--muted,#a8b7cb))}
body[data-ui-scope="desktop"] .weather-bottom header button,
body[data-ui-scope="desktop"] .weather-bottom .wx-controls button{min-height:44px;min-width:44px;max-height:none;padding:10px;border:1px solid var(--fd-ui-line,#40516b);border-radius:8px;background:var(--fd-ui-subtle,#172232);color:var(--fd-ui-text,#eaf0f8)}
/* Dock height includes complete three-line cards and its horizontal scrollbar. */
body[data-ui-scope="desktop"] .chart-dock{height:auto;min-height:82px;padding:8px;align-items:center;overflow:visible}
body[data-ui-scope="desktop"] .chart-dock .chart-trail-scroll{min-height:66px;align-self:stretch;align-items:center;padding:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
body[data-ui-scope="desktop"] .chart-dock .chart-trail-scroll::-webkit-scrollbar{height:6px}
body[data-ui-scope="desktop"] .chart-dock .chart-trail-item{height:60px;min-height:60px;max-height:60px;grid-template-columns:minmax(0,1fr) 44px;gap:4px;align-items:center;box-sizing:border-box}
body[data-ui-scope="desktop"] .chart-dock .chart-trail-item>button:first-child{align-self:stretch;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:12px;line-height:15px;padding:4px 8px;min-height:0;max-height:none;max-width:100%;min-width:0;white-space:normal;overflow:hidden;text-overflow:ellipsis;text-align:left;box-sizing:border-box}
body[data-ui-scope="desktop"] .chart-dock .chart-trail-item>button:last-child{height:44px;min-height:44px;max-height:44px;width:44px;min-width:44px;padding:10px}
body[data-ui-scope="desktop"] .chart-dock .chart-trail-more{flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;padding:10px}
/* Reader and weather reserve the same measured dock edge in every mode. */
body[data-ui-scope="desktop"] .maparea .chart-workspace{bottom:var(--fd-dock-height)!important}
body[data-ui-scope="desktop"] .maparea .maplibregl-ctrl-bottom-left,body[data-ui-scope="desktop"] .maparea .maplibregl-ctrl-bottom-right{bottom:calc(var(--fd-dock-height) + var(--fd-weather-height) + 8px)!important}
body[data-ui-scope="desktop"] .weather-bottom header{flex-wrap:wrap;row-gap:8px}
body[data-ui-scope="desktop"] .weather-bottom header #wx-active{min-width:120px;line-height:1.4}
@media(max-width:1000px){
 body[data-ui-scope="desktop"] .weather-bottom .wx-controls{display:grid;grid-template-columns:44px 44px 44px minmax(70px,1fr) 44px;gap:8px}
 body[data-ui-scope="desktop"] .weather-bottom .wx-controls #wx-clock{grid-column:1/-1;grid-row:2;text-align:right}
 body[data-ui-scope="desktop"] .weather-bottom .wx-controls [data-weather-action="next"]{grid-column:5;grid-row:1}
 body[data-ui-scope="desktop"] .weather-bottom .wx-controls #wx-time{width:100%;min-width:0}
}
body[data-ui-scope="desktop"] .wx-modal #wx-list button[aria-pressed="true"]{background:var(--fd-ui-selected,#205b88);color:var(--fd-ui-text,#f5f8ff)}
body[data-ui-scope="desktop"] .maplibregl-ctrl-group:has(.fd-map-icon-button){display:flex;flex-direction:column}
body[data-ui-scope="desktop"] .chart-trail-item{overflow:hidden}
body[data-ui-scope="desktop"] .chart-trail-item>button.fd-icon-button{border:0;border-left:1px solid var(--fd-ui-line,#40516b);border-radius:0;background:transparent}
body[data-ui-scope="desktop"] .compact-map-layers>button:hover:not(:disabled),
body[data-ui-scope="desktop"] .compact-map-layers .aircraft-follow-box .aircraft-follow:hover:not(:disabled){background:var(--fd-ui-selected,#284158)!important}
body[data-ui-scope="desktop"] .wx-modal #wx-list button:hover:not(:disabled){background:var(--fd-ui-selected,#2b4965)}

/* Menus open above the entire measured dock, including its scrollbar. */
body[data-ui-scope="desktop"] .chart-dock .chart-trail-menu{bottom:calc(100% + 8px)}

/* The dock menu stays above reader/weather surfaces; reading hides weather. */
body[data-ui-scope="desktop"] .chart-dock{z-index:calc(var(--fd-layer-map-menu,25) + 2)}
body[data-ui-scope="desktop"].chart-reading .maparea.weather-manager-open .chart-workspace{bottom:var(--fd-dock-height)!important}

/* On short windows the weather tray must receive clicks over map controls. */
body[data-ui-scope="desktop"] .maparea .weather-bottom{z-index:calc(var(--fd-layer-map-menu,25) + 1)!important}
body[data-ui-scope="desktop"] .maparea .wx-level-picker{z-index:calc(var(--fd-layer-map-menu,25) + 2)}
