.weather-flight-profile-panel, .profile-widget.is-flight-profile {
  --flight-view-space: 12px;
  --flight-view-border: var(--profile-widget-line, #304355);
  --flight-view-surface: var(--profile-widget-surface, #102238);
  --flight-view-text: var(--profile-widget-text, #e6f2ff);
  --flight-view-muted: var(--profile-widget-muted, #9fb0c4);
  --flight-view-focus: #22a3c6;
}
.flight-profile-view-bar { display:flex; align-items:start; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:8px 12px; border-bottom:1px solid var(--flight-view-border); }
.flight-profile-view-control { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:12px; font-weight:600; }
.flight-profile-view-control select { min-height:32px; max-width:100%; padding:4px 8px; border:1px solid var(--flight-view-border); border-radius:4px; color:var(--flight-view-text); background:var(--flight-view-surface); font:inherit; cursor:pointer; }
.flight-profile-view-control select:hover { border-color:var(--flight-view-muted); }
.flight-profile-view-control select:focus-visible, .flight-profile-calculations>summary:focus-visible, .flight-profile-terminal-details>summary:focus-visible { outline:2px solid var(--flight-view-focus); outline-offset:2px; }
.flight-profile-view-control select:disabled { opacity:.5; cursor:default; }
.flight-profile-view-surface { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; }
.weather-flight-profile-panel[data-flight-profile-view="columns"] .flight-profile-view-surface,
.profile-widget[data-flight-profile-view="columns"] .flight-profile-view-surface { grid-template-columns:minmax(0,1fr) 232px; }
.weather-flight-profile-panel[data-flight-profile-view="columns"] .weather-flight-profile-readout,
.profile-widget[data-flight-profile-view="columns"] .profile-widget-readout { grid-template-columns:minmax(0,1fr); align-content:start; border-left:1px solid var(--flight-view-border); }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-header { grid-template-columns:minmax(0,1fr); }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-title { font-weight:600; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-controls { justify-content:start; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-meta { max-height:36px; overflow:auto; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-scroll { min-height:240px; max-height:none; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-chart svg { min-width:900px; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-layers { padding:4px 8px; border:0; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-readout { grid-template-columns:repeat(5,minmax(0,1fr)); }
.weather-flight-profile-panel[data-flight-profile-view="columns"] .weather-flight-profile-readout { grid-template-columns:minmax(0,1fr); }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-readout-item strong { white-space:normal; overflow-wrap:anywhere; }
.flight-profile-readout-details { grid-column:1/-1; padding:8px 12px; border-top:1px solid var(--flight-view-border); font-size:12px; }
.flight-profile-readout-details>summary { cursor:pointer; color:var(--flight-view-muted); }
.flight-profile-readout-details-content { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); padding-top:8px; }
[data-flight-profile-view="columns"] .flight-profile-readout-details-content { grid-template-columns:minmax(0,1fr); }
.flight-profile-calculations, .flight-profile-terminal-details { border-top:1px solid var(--flight-view-border); }
.flight-profile-calculations>summary, .flight-profile-terminal-details>summary { padding:12px; cursor:pointer; font-size:12px; font-weight:600; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-footer { max-height:112px; overflow:auto; padding:8px 12px; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-warning { margin-top:4px; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-terminals { background:transparent; }
.profile-widget.is-flight-profile .profile-widget-header-actions { flex-wrap:wrap; }
.profile-widget.is-flight-profile .profile-widget-readout { grid-template-columns:repeat(5,minmax(0,1fr)); }
.profile-widget.is-flight-profile[data-flight-profile-view="columns"] .profile-widget-readout { grid-template-columns:minmax(0,1fr); }
.profile-widget.is-flight-profile .profile-widget-heading-copy h1 { margin:0; font-size:15px; line-height:1.4; font-weight:600; }
.profile-widget.is-flight-profile .profile-widget-readout-item strong { white-space:normal; overflow-wrap:anywhere; }
.profile-widget.is-flight-profile [hidden] { display:none; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-chart { min-width:0; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-chart-page-body>.weather-profile-chart-shell,
.profile-widget[data-flight-profile-view] .weather-flight-profile-chart-page-body>.weather-profile-chart-shell { height:auto; min-height:0; aspect-ratio:auto; }
[data-flight-profile-view] .weather-profile-chart-viewport { overflow-x:auto; overflow-y:hidden; }
.weather-flight-profile-panel[data-flight-profile-view] .weather-profile-chart-viewport>.weather-profile-chart-zoom-svg,
.profile-widget[data-flight-profile-view] .weather-profile-chart-viewport>.weather-profile-chart-zoom-svg { width:100%; min-width:900px; height:auto; }
@media(max-width:800px) {
  .weather-flight-profile-panel[data-flight-profile-view="columns"] .flight-profile-view-surface,
  .profile-widget[data-flight-profile-view="columns"] .flight-profile-view-surface { grid-template-columns:minmax(0,1fr); }
  .weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-readout,
  .profile-widget.is-flight-profile .profile-widget-readout { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profile-widget.is-flight-profile[data-flight-profile-view="columns"] .profile-widget-readout { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .flight-profile-view-control select { min-height:44px; }
  .weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-footer { max-height:88px; }
  .weather-flight-profile-panel[data-flight-profile-view] .weather-flight-profile-header { padding:8px; }
  .flight-profile-view-bar { gap:8px; }
}

.weather-flight-profile-panel[data-flight-profile-view] { height:calc(100dvh - 32px); }

/* Chart-first route workspace. Keep embedded widget themes independent. */
.weather-flight-profile-panel.is-chart-first {
  --flight-view-border:#dce5ef; --flight-view-surface:#fff; --flight-view-text:#203449;
  --flight-view-muted:#60758c; --flight-view-focus:#2563eb;
  color:#203449; background:#fff; border-color:#dce5ef;
  width:calc(100vw - 32px); max-width:1920px; font-family:Arial,sans-serif;
  box-shadow:0 16px 64px #10223840;
}
.is-chart-first *, .is-chart-first *::before, .is-chart-first *::after { box-sizing:border-box; }
.is-chart-first [hidden] { display:none !important; }
.weather-flight-profile-panel.is-chart-first .weather-flight-profile-header {
  grid-template-columns:minmax(0,1fr) auto; padding:18px 24px; background:#fff; border-color:var(--flight-view-border);
}
.is-chart-first .weather-flight-profile-title { color:#203449; font-size:20px; font-weight:700; }
.weather-flight-profile-panel.is-chart-first .weather-flight-profile-meta { color:#60758c; font-size:12px; font-weight:400; line-height:1.6; max-height:none; }
.is-chart-first button, .is-chart-first select, .is-chart-first input:not([type=checkbox]) {
  color:#203449; background:#fff; border:1px solid #d5dfeb; border-radius:6px; min-height:36px; font:500 12px/1.3 Arial,sans-serif; padding:8px 12px;
}
.is-chart-first button { cursor:pointer; }
.is-chart-first button:hover:not(:disabled), .is-chart-first select:hover { background:#f1f6fc; border-color:#a9bdd5; }
.is-chart-first button:disabled { opacity:.45; cursor:default; }
.is-chart-first :is(button,select,input,summary):focus-visible { outline:2px solid #2563eb; outline-offset:2px; box-shadow:none; }
.is-chart-first button.is-primary { background:#245de7; border-color:#245de7; color:#fff; padding-inline:24px; font-weight:700; }
.is-chart-first button.is-primary:hover:not(:disabled) { background:#1d4ed8; }
.is-chart-first .weather-flight-profile-controls { flex-wrap:nowrap; gap:8px; }
.is-chart-first .flight-profile-presentation { display:flex; gap:0; }
.is-chart-first .flight-profile-presentation button { border-radius:0; white-space:nowrap; }
.is-chart-first .flight-profile-presentation button:first-child { border-radius:6px 0 0 6px; }
.is-chart-first .flight-profile-presentation button:last-child { border-radius:0 6px 6px 0; margin-left:-1px; }
.is-chart-first .flight-profile-presentation button[aria-pressed=true] { position:relative; background:#edf3ff; border-color:#8fb0ff; color:#245fcd; }
.is-chart-first .weather-flight-profile-close { width:36px; font-size:20px; padding:0; }
.is-chart-first .weather-flight-profile-body { scrollbar-color:#b9c8d9 #fff; }
.is-chart-first .flight-profile-view-bar { align-items:center; padding:12px 24px 4px; border:0; gap:10px; }
.flight-profile-quick-layers, .flight-profile-range-tools { display:flex; align-items:center; gap:6px; }
.is-chart-first .flight-profile-quick-layer { display:flex; align-items:center; gap:7px; }
.is-chart-first .flight-profile-quick-layer::before { content:''; width:6px; height:6px; border-radius:50%; background:#91ccea; }
.is-chart-first .flight-profile-quick-layer[data-layer=wind]::before { background:#17202c; }
.is-chart-first .flight-profile-quick-layer[data-layer=temperature]::before { background:#357ee7; }
.is-chart-first .flight-profile-quick-layer[aria-pressed=true] { background:#eff5fb; border-color:#d5e3f2; }
.is-chart-first .flight-profile-quick-layer[aria-pressed=false] { color:#687a8f; }
.is-chart-first .flight-profile-quick-layer[aria-pressed=false]::before { background:#cbd5e1; }
.is-chart-first .weather-flight-profile-control { color:#60758c; font-size:11px; font-weight:600; }
.is-chart-first .flight-profile-range-tools .weather-flight-profile-control { display:flex; flex-direction:row; align-items:center; gap:8px; }
.is-chart-first .flight-profile-range-tools .weather-flight-profile-control>span { font-size:11px; text-transform:none; }
.weather-flight-profile-panel.is-chart-first .weather-flight-profile-layers { position:relative; margin:0; padding:0; background:#fff; }
.is-chart-first .weather-flight-profile-layers>summary { color:#203449; padding:9px 12px; border:1px solid #d5dfeb; border-radius:6px; font:500 12px/1.3 Arial,sans-serif; background:#fff; }
.is-chart-first .weather-flight-profile-layer-grid { position:absolute; z-index:5; top:calc(100% + 6px); left:0; width:300px; max-height:60vh; overflow:auto; display:grid; grid-template-columns:1fr; padding:12px; border:1px solid #dce5ef; border-radius:8px; box-shadow:0 12px 36px #20344926; background:#fff; }
.is-chart-first .weather-flight-profile-layer-toggle { color:#203449; font-size:12px; padding:5px; background:transparent; }
.is-chart-first .weather-profile-chart-toolbar { padding:0; border:0; background:transparent; gap:4px; }
.is-chart-first .weather-profile-chart-zoom-button { height:36px; min-width:36px; padding:6px; }
.is-chart-first .weather-profile-chart-shell { grid-template-rows:minmax(0,1fr); background:#fff; border:0; }
.is-chart-first .weather-flight-profile-chart-page { border:0; margin:0; }
.is-chart-first .weather-flight-profile-chart-page-title { display:none; }
.weather-flight-profile-panel.is-chart-first .flight-profile-view-surface { grid-template-columns:minmax(0,1fr); }
.weather-flight-profile-panel.is-chart-first .weather-flight-profile-scroll { background:#fff; min-height:260px; }
.is-chart-first .weather-flight-profile-chart { background:#fff; }
.is-chart-first .weather-flight-profile-status { display:none; }
.is-chart-first .weather-flight-profile-status.is-error, .is-chart-first .weather-flight-profile-status.is-partial { display:block; background:#fff6e5; color:#8b5108; margin:8px 24px; border:1px solid #f1dcac; border-radius:6px; padding:10px 12px; font-size:12px; }
.is-chart-first .weather-flight-profile-status.is-error { color:#9d2738; background:#fff1f2; border-color:#fecdd3; }
.is-chart-first .weather-flight-profile-legend { padding:8px 24px; gap:8px 16px; color:#60758c; font-size:10px; font-weight:400; }
.is-chart-first .weather-flight-profile-legend-item { font-size:10px; }
.is-chart-first .weather-flight-profile-legend-mark.is-cloud { background:#a8d6ef; }
.is-chart-first .weather-flight-profile-legend-mark.is-temperature { border-color:#3479e7; background:#3479e7; }
.is-chart-first .weather-flight-profile-legend-mark.is-wind { border-color:#182c40; }
.weather-flight-profile-panel.is-chart-first .weather-flight-profile-readout { margin:0 24px 8px; grid-template-columns:repeat(5,minmax(0,1fr)); border:0; border-radius:8px; background:#f2f6fa; color:#203449; }
.is-chart-first .weather-flight-profile-readout-item { background:transparent; border-color:#e1e8f1; padding:12px 16px; }
.is-chart-first .weather-flight-profile-readout-item span { color:#60758c; font-size:9px; }
.is-chart-first .weather-flight-profile-readout-item strong { color:#203449; font-size:13px; }
.is-chart-first .flight-profile-readout-details { padding:6px 16px; border:0; font-size:11px; }
.weather-flight-profile-panel.is-chart-first .weather-flight-profile-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 16px; padding:6px 24px 10px; max-height:none; border:0; background:#fff; }
.flight-profile-source-info { color:#60758c; font-size:11px; }
.flight-profile-footer-actions { display:flex; flex-wrap:wrap; gap:4px; }
.is-chart-first .flight-profile-footer-actions button { color:#60758c; min-height:30px; padding:4px 8px; border-color:transparent; font-size:11px; }
.flight-profile-workspace { position:absolute; z-index:6; top:82px; bottom:12px; right:12px; width:min(440px,calc(100% - 24px)); display:grid; grid-template-rows:auto minmax(0,1fr); background:#fff; border:1px solid #dce5ef; border-radius:10px; box-shadow:0 16px 64px #20344938; }
.flight-profile-workspace[data-workspace=calculations], .flight-profile-workspace[data-workspace=conditions] { width:min(1000px,calc(100% - 24px)); }
.flight-profile-workspace-header { display:flex; align-items:center; justify-content:space-between; padding:16px; border-bottom:1px solid #dce5ef; }
.flight-profile-workspace-header h3 { margin:0; font-size:16px; }
.flight-profile-workspace-header button { width:32px; padding:0; font-size:22px; }
.flight-profile-workspace-body { overflow:auto; padding:20px; font-size:13px; line-height:1.5; }
.flight-profile-settings { display:grid; gap:20px; }
.is-chart-first .flight-profile-settings .weather-flight-profile-control { display:grid; gap:6px; }
.is-chart-first .flight-profile-settings .weather-flight-profile-control>span { font-size:12px; text-transform:none; }
.is-chart-first .flight-profile-settings .weather-flight-profile-input, .is-chart-first .flight-profile-settings select { width:100%; }
.is-chart-first .weather-flight-profile-route-wind-toggle { color:#203449; background:#f2f6fa; border-color:#dce5ef; font-size:12px; padding:10px; }
.flight-profile-pdf-settings { display:grid; gap:12px; margin:0; padding:16px; border:1px solid #dce5ef; border-radius:8px; }
.flight-profile-pdf-settings legend { font-weight:600; padding:0 4px; }
.flight-profile-pdf-settings label { display:flex; align-items:start; gap:8px; }
.is-chart-first input[type=checkbox] { accent-color:#2563eb; }
.is-chart-first .flight-profile-workspace-body>details { border:0; }
.is-chart-first .flight-profile-workspace-body>details>summary { display:none; }
.is-chart-first .weather-flight-profile-warning { font-size:12px; color:#60758c; font-weight:400; line-height:1.6; }
.is-chart-first .flight-profile-data p { padding-bottom:12px; border-bottom:1px solid #dce5ef; }
.is-chart-first .weather-flight-profile-loading { background:#ffffffeb; color:#203449; }
.is-chart-first .weather-flight-profile-loading-action { color:#203449; }
.is-chart-first .weather-flight-profile-loading-progress { background:conic-gradient(#2563eb var(--flight-profile-progress-angle,0deg),#e1eaf5 0); }
.is-chart-first .weather-flight-profile-loading-percent { background:#fff; color:#203449; }
.flight-profile-export-progress { position:absolute; z-index:8; inset:0; display:flex; align-items:center; justify-content:center; gap:16px; background:#ffffffed; color:#203449; }
.is-chart-first .weather-flight-profile-terminal-card, .is-chart-first .weather-flight-profile-report-text, .is-chart-first .weather-flight-profile-wind-planning, .is-chart-first .weather-flight-profile-table th, .is-chart-first .weather-flight-profile-table td { background:#f7f9fc; color:#203449; border-color:#dce5ef; }
.is-chart-first .weather-flight-profile-terminal-message, .is-chart-first .weather-flight-profile-wind-message, .is-chart-first .weather-flight-profile-wind-summary { color:#60758c; }
@media(max-width:800px) {
  .weather-flight-profile-panel.is-chart-first { width:100vw; height:100dvh; border-radius:0; }
  .weather-flight-profile-panel.is-chart-first .weather-flight-profile-header { grid-template-columns:1fr; padding:12px 16px; gap:10px; }
  .is-chart-first .weather-flight-profile-title { font-size:18px; padding-right:32px; }
  .is-chart-first .weather-flight-profile-meta { font-size:11px; }
  .is-chart-first .weather-flight-profile-close { position:absolute; right:12px; top:10px; }
  .is-chart-first button, .is-chart-first select { min-height:40px; }
  .is-chart-first .weather-flight-profile-controls { flex-wrap:wrap; }
  .is-chart-first .flight-profile-presentation { flex-basis:100%; }
  .is-chart-first .flight-profile-presentation button { min-height:44px; }
  .is-chart-first .flight-profile-view-bar { padding:8px 12px; }
  .flight-profile-quick-layers { width:100%; justify-content:space-between; gap:4px; }
  .is-chart-first .flight-profile-quick-layer { padding:8px; font-size:11px; }
  .flight-profile-range-tools { width:100%; justify-content:space-between; }
  .is-chart-first .weather-flight-profile-layer-grid { left:auto; right:0; width:min(300px,calc(100vw - 24px)); }
  .weather-flight-profile-panel.is-chart-first .weather-flight-profile-readout { margin:0 12px 8px; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .is-chart-first .weather-flight-profile-legend { padding:8px 12px; }
  .weather-flight-profile-panel.is-chart-first .weather-flight-profile-footer { padding:6px 12px; }
  .flight-profile-workspace { top:8px; bottom:8px; right:8px; width:calc(100% - 16px); }
  .is-chart-first .weather-flight-profile-status.is-partial, .is-chart-first .weather-flight-profile-status.is-error { margin:8px 12px; }
}
.is-chart-first .weather-flight-profile-legend-item { color:#60758c; font-weight:400; }
.is-chart-first .weather-flight-profile-legend-mark.is-flight { background:#248a6e; }
.is-chart-first .weather-flight-profile-legend-mark.is-freezing { background:#2563eb; }
.is-chart-first .weather-flight-profile-legend-mark.is-terrain { background:#b49b83; border-color:#a17e5c; }
.is-chart-first .weather-flight-profile-legend-mark.is-wind::before, .is-chart-first .weather-flight-profile-legend-mark.is-wind::after { border-color:#182c40; }
.is-chart-first .weather-flight-profile-legend-mark.is-wind::after { background:linear-gradient(90deg,#182c40 50%,#fff 50%); }
.is-chart-first .weather-flight-profile-variable-tools .profile-widget-progress-ring span { background:#fff; color:#203449; }
.is-chart-first .weather-flight-profile-table td.is-unavailable { background:#fff5e5; color:#8b5108; }
.is-chart-first .weather-flight-profile-terminals { grid-template-columns:1fr; padding:0; }
.is-chart-first { color-scheme:light; }
@media(max-width:360px) {
  .is-chart-first .flight-profile-quick-layer { padding:8px 5px; gap:4px; }
  .is-chart-first .weather-flight-profile-layers>summary { padding:11px 6px; font-size:11px; }
  .is-chart-first .flight-profile-range-tools .weather-flight-profile-control { gap:4px; }
  .is-chart-first .weather-flight-profile-select { padding-inline:6px; }
}
.weather-flight-profile-panel.is-chart-first {
  --profile-widget-background:#fff; --profile-widget-surface:#f7f9fc;
  --profile-widget-text:#203449; --profile-widget-muted:#60758c; --profile-widget-line:#dce5ef;
  --profile-widget-accent:#2563eb; --profile-widget-danger:#9d2738; --profile-widget-danger-soft:#fff1f2;
  --profile-widget-warning:#8b5108; --profile-widget-warning-soft:#fff6e5;
}
.is-chart-first .weather-flight-profile-variable-tools p { color:#60758c; }
.is-chart-first .weather-flight-profile-variable-tools { padding:0 0 16px; border-color:#dce5ef; }
.is-chart-first .weather-flight-profile-variable-tools label { align-items:start; text-align:left; }
.is-chart-first .weather-flight-profile-variable-tools label input[type=checkbox] { align-self:start; }
.is-chart-first .weather-flight-profile-wind-facts span, .is-chart-first .weather-flight-profile-altitude-row span { color:#60758c; }
.is-chart-first .flight-profile-data p { white-space:pre-line; }
.is-chart-first .weather-flight-profile-header[data-panel-window-header=true] { grid-template-columns:minmax(0,1fr) auto auto; padding-inline-end:24px !important; }
.is-chart-first .weather-flight-profile-header>.panel-window-actions { position:static; gap:4px; }
@media(max-width:800px) {
  .is-chart-first .weather-flight-profile-header[data-panel-window-header=true] { grid-template-columns:1fr; padding-inline-end:16px !important; }
  .is-chart-first .weather-flight-profile-header>.panel-window-actions { position:absolute; top:10px; right:12px; }
  .is-chart-first [data-panel-window-header=true] .weather-flight-profile-title-wrap { padding-right:76px; }
  .is-chart-first [data-panel-window-header=true] .weather-flight-profile-title { padding-right:0; }
}

/* Contour coverage keeps the chart white and distinguishes model and proxy outlines. */
.is-chart-first .weather-flight-profile-legend-mark.is-cloud { background:transparent; border:0; border-top:1px solid #add9ef; border-bottom:3px solid #3487b4; height:8px; }
.is-chart-first .weather-flight-profile-legend-mark.is-precipitation { background:#edf6ff; border:1px solid #80b9e0; }

/* A4 paper workspace: scale changes the entire sheet, never its data or viewport. */
.weather-flight-profile-panel.is-paper-preview { height:calc(100dvh - 32px); max-height:none; border-radius:8px; }
.is-paper-preview .weather-flight-profile-body { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; min-height:0; overflow:hidden; padding:0; gap:0; }
.is-paper-preview .flight-profile-view-bar { display:flex; flex-wrap:wrap; margin:0; padding:12px 24px; border-bottom:1px solid #d6dfe6; gap:12px; }
.is-paper-preview .flight-profile-range-tools { flex:none; }
.is-paper-preview .flight-profile-zoom-slot { margin-left:auto; display:flex; gap:8px; }
.is-paper-preview .flight-profile-paper-orientation { display:flex; }
.is-paper-preview .flight-profile-paper-orientation button { border-radius:0; }
.is-paper-preview .flight-profile-paper-orientation button:first-child { border-radius:4px 0 0 4px; }
.is-paper-preview .flight-profile-paper-orientation button:last-child { border-radius:0 4px 4px 0; margin-left:-1px; }
.is-paper-preview .flight-profile-paper-orientation button[aria-pressed=true] { position:relative; background:#edf3ff; border-color:#8fb0ff; color:#245fcd; }
.is-paper-preview .flight-profile-view-surface { min-height:0; display:block; overflow:hidden; }
.weather-flight-profile-panel.is-paper-preview .weather-flight-profile-scroll { height:100%; min-height:0; overflow:auto; position:relative; background:#e9eef2; padding:24px 24px 12px; }
.weather-flight-profile-panel.is-paper-preview .weather-flight-profile-chart { display:flex; flex-direction:column; align-items:center; min-width:100%; width:max-content; gap:24px; background:transparent; }
.is-paper-preview .flight-profile-sheet-wrap { position:relative; flex:none; background:#fff; outline:1px solid #d6dfe6; box-shadow:0 3px 15px #263e591a; }
.is-paper-preview svg.flight-profile-paper { display:block; position:absolute; top:0; left:0; max-width:none; max-height:none; min-width:0; transform-origin:top left; }
.is-paper-preview .flight-profile-paper-chart { position:static; min-width:0; max-width:none; }
.is-paper-preview .flight-profile-paper-caption { text-align:center; font-size:11px; color:#677d8d; margin:16px 0 4px; }
.is-paper-preview .flight-profile-paper-status { display:flex; align-items:center; gap:20px; min-height:32px; padding:6px 24px; border-top:1px solid #d6dfe6; color:#4e667b; font-size:11px; }
.is-paper-preview .flight-profile-paper-ready::before { content:'●'; color:#19896f; font-size:9px; margin-right:10px; }
.is-paper-preview .flight-profile-paper-scale { margin-left:auto; }
.is-paper-preview .flight-profile-point-details .weather-flight-profile-readout { margin:0; grid-template-columns:repeat(2,minmax(0,1fr)); }
.is-paper-preview .flight-profile-workspace[data-workspace=point] { width:min(650px,calc(100% - 24px)); }
.is-paper-preview .weather-flight-profile-status.is-partial,.is-paper-preview .weather-flight-profile-status.is-error { margin:0; border-radius:0; border-width:0 0 1px; padding:7px 24px; }
.is-paper-preview .weather-flight-profile-status:not(.is-partial):not(.is-error) { display:block; height:0; min-height:0; overflow:hidden; padding:0; margin:0; border:0; background:transparent; }
.is-paper-preview .weather-flight-profile-loading { position:absolute; inset:0; z-index:3; }
.is-paper-preview .flight-profile-settings .flight-profile-quick-layers { flex-wrap:wrap; }
.is-paper-preview .weather-flight-profile-footer { border-top:1px solid #e4eaf0; }
.is-paper-preview .flight-profile-paper-chart:focus-visible { outline:2px solid #245fcd; outline-offset:2px; }
@media(max-width:800px) {
  .weather-flight-profile-panel.is-paper-preview { width:100vw; height:100dvh; border-radius:0; }
  .is-paper-preview .flight-profile-view-bar { padding:8px 12px; gap:8px; }
  .is-paper-preview .flight-profile-range-tools { width:auto; gap:8px; }
  .is-paper-preview .flight-profile-range-tools .weather-flight-profile-control>span { display:none; }
  .is-paper-preview .weather-flight-profile-layer-grid { left:auto; right:0; }
  .is-paper-preview .flight-profile-paper-status { padding:6px 12px; gap:8px; }
  .is-paper-preview .flight-profile-paper-caption { font-size:10px; }
}

.is-chart-first .weather-flight-profile-loading.is-hidden { display:none; }

.is-paper-preview .weather-flight-profile-layers>summary { white-space:nowrap; }

/* The active layer list also explains every chart mark. */
.is-chart-first {
  --flight-layer-accent:#16788f;
  --flight-layer-active:#edf6fa;
  --flight-layer-border:#dce6ee;
  --flight-layer-muted:#607c90;
}
.is-chart-first .flight-profile-view-bar { padding:12px 24px; border-bottom:1px solid var(--flight-layer-border); flex-wrap:wrap; }
.is-chart-first .flight-profile-view-bar>.weather-flight-profile-control { display:flex; flex-direction:row; align-items:center; gap:8px; }
.is-chart-first .flight-profile-range-tools { margin-left:auto; }
.weather-flight-profile-panel.is-chart-first .flight-profile-unified-layers { border-top:1px solid var(--flight-layer-border); border-bottom:1px solid var(--flight-layer-border); padding:0; }
.profile-widget.is-chart-first .flight-profile-unified-layers { background:white; color:#203449; border-block:1px solid var(--flight-layer-border); }
.profile-widget.is-chart-first .flight-profile-view-surface { display:block; }
.is-chart-first .flight-profile-unified-layers>summary { border:0; border-radius:0; padding:8px 24px; font-size:14px; font-weight:600; text-transform:none; }
.is-chart-first .flight-profile-unified-layers .weather-flight-profile-layer-grid,
.is-chart-first .flight-profile-extra-layer-grid { position:static; width:auto; max-height:none; overflow:visible; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; padding:0 24px; border:0; border-radius:0; box-shadow:none; }
.flight-profile-layer-row { display:flex; align-items:center; min-width:0; min-height:48px; padding:4px 12px; border-bottom:1px solid var(--flight-layer-border); gap:8px; }
.flight-profile-layer-row:not(:nth-child(4n+1)) { border-left:1px solid var(--flight-layer-border); }
.flight-profile-layer-row.is-selected { background:var(--flight-layer-active); box-shadow:inset 0 -2px var(--flight-layer-accent); }
.is-chart-first .flight-profile-layer-row .weather-flight-profile-layer-toggle { display:flex; align-items:center; flex:1; min-width:0; padding:0; gap:12px; cursor:pointer; }
.is-chart-first .flight-profile-layer-row input[type=checkbox] { width:16px; height:16px; flex:0 0 16px; margin:0; accent-color:var(--flight-layer-accent); }
.flight-profile-layer-symbol { display:block; width:36px; height:28px; flex:0 0 36px; overflow:visible; }
.flight-profile-layer-copy { display:flex; flex-direction:column; gap:6px; min-width:0; }
.flight-profile-layer-copy strong { font-size:12px; line-height:1.25; font-weight:600; }
.flight-profile-layer-copy small { font-size:10px; line-height:1.3; color:var(--flight-layer-muted); }
.flight-profile-layer-row.is-off .flight-profile-layer-symbol { opacity:.4; }
.flight-profile-layer-row.is-missing { padding-left:40px; }
.is-chart-first .flight-profile-layer-row.is-missing .weather-flight-profile-layer-toggle { cursor:default; }
.is-chart-first .flight-profile-layer-settings-button { min-width:28px; min-height:28px; width:28px; padding:4px; border:0; background:transparent; color:var(--flight-layer-muted); font-size:18px; }
.is-chart-first .flight-profile-layer-settings-button[aria-expanded=true] { color:var(--flight-layer-accent); background:#dceef4; }
.flight-profile-layer-settings { display:flex; align-items:center; flex-wrap:wrap; gap:12px 20px; margin:0 24px; padding:4px 12px; min-height:44px; background:var(--flight-layer-active); }
.flight-profile-layer-settings>strong { font-size:12px; font-weight:600; color:var(--flight-layer-accent); }
.flight-profile-flow-mode { display:flex; gap:0; }
.is-chart-first .flight-profile-flow-mode button { min-height:32px; padding:6px 12px; border-radius:0; }
.is-chart-first .flight-profile-flow-mode button:first-child { border-radius:4px 0 0 4px; }
.is-chart-first .flight-profile-flow-mode button:last-child { border-radius:0 4px 4px 0; margin-left:-1px; }
.is-chart-first .flight-profile-flow-mode button[aria-pressed=true] { position:relative; border-color:var(--flight-layer-accent); background:var(--flight-layer-accent); color:white; }
.is-chart-first .flight-profile-layer-settings-close { margin-left:auto; min-height:28px; width:28px; padding:2px; border:0; background:transparent; }
.flight-profile-extra-layers>summary { padding:4px 24px; color:var(--flight-layer-muted); font-size:11px; cursor:pointer; }
.flight-profile-layer-footer { display:flex; align-items:center; justify-content:space-between; padding:4px 24px 8px; gap:16px; color:var(--flight-layer-muted); font-size:10px; }
.is-chart-first .flight-profile-layer-footer .is-all { display:flex; gap:8px; align-items:center; font-size:11px; margin:0; }
.is-chart-first .flight-profile-extra-layers .flight-profile-layer-row { border-top:1px solid var(--flight-layer-border); }
.is-paper-preview .flight-profile-unified-layers .flight-profile-layer-contents { position:absolute; z-index:8; top:calc(100% + 8px); right:0; width:min(1040px,calc(100vw - 64px)); max-height:60vh; overflow:auto; background:white; border:1px solid var(--flight-layer-border); box-shadow:0 12px 32px #20344926; }
.is-paper-preview .flight-profile-unified-layers>summary { padding:8px 12px; border:1px solid var(--flight-layer-border); border-radius:4px; font-size:12px; }
@media(max-width:1100px) {
  .is-chart-first .flight-profile-unified-layers .weather-flight-profile-layer-grid,
  .is-chart-first .flight-profile-extra-layer-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .flight-profile-layer-row:not(:nth-child(4n+1)) { border-left:0; }
  .flight-profile-layer-row:nth-child(2n) { border-left:1px solid var(--flight-layer-border); }
}
@media(max-width:600px) {
  .is-chart-first .flight-profile-view-bar { padding:8px 12px; gap:12px; }
  .is-chart-first .flight-profile-view-bar>.weather-flight-profile-control { flex-direction:column; align-items:start; gap:4px; }
  .is-chart-first .flight-profile-range-tools { margin:0; width:100%; justify-content:space-between; }
  .is-chart-first .flight-profile-unified-layers .weather-flight-profile-layer-grid,
  .is-chart-first .flight-profile-extra-layer-grid { padding:0 8px; grid-template-columns:minmax(0,1fr); }
  .flight-profile-layer-row:nth-child(2n) { border-left:0; }
  .flight-profile-layer-row { min-height:56px; }
  .flight-profile-layer-settings { margin:0 8px; gap:8px; }
  .is-chart-first .flight-profile-flow-mode button { min-height:44px; }
  .flight-profile-layer-footer { padding:8px 12px; flex-wrap:wrap; }
}
