/* Shared light palette. The body scope also overrides older page-specific colors. */
html[data-theme="light"] body {
    --bg: #eef5f7;
    --panel: #fff;
    --panel-2: #f3f7f9;
    --text: #162e39;
    --muted: #4f6470;
    --line: #cedde3;
    --air: #096d88;
    --thermal: #496b0c;
    --danger: #ac2941;
    --xc-panel: #fff;
    --xc-ink: #162e39;
    --xc-border: #cedde3;
    --light-accent-ink: #496b0c;
    color: var(--text);
    background-color: var(--bg);
    color-scheme: light;
}

html[data-theme="light"] body :is(.fd-brand-app-name, .fd-brand-xcbrief) {
    color: var(--text) !important;
}
html[data-theme="light"] body :is(.fd-brand-app-name strong, .fd-brand-xcbrief span) {
    color: var(--light-accent-ink) !important;
}

html[data-theme="light"] body :is(.fd-topbar, .fd-landing-nav, .fd-mobile-menu-panel, .fd-nav-resources-menu) {
    background: rgba(255,255,255,.98);
    border-color: var(--line);
    color: var(--text);
}
html[data-theme="light"] body :is(.fd-nav a, .fd-nav-resources>summary, .fd-mobile-resources-grid a, .fd-resource-page-nav a, .fd-top-legal, .fd-link-button, .fd-back) {
    color: var(--muted);
}
html[data-theme="light"] body :is(.fd-nav a.is-active, .fd-nav a:hover, .fd-nav-resources[open]>summary, .fd-nav-resources.is-active>summary) {
    color: var(--text);
    background: #edf5e3;
}
html[data-theme="light"] body :is(.fd-nav-resources-menu a span, .fd-mobile-resources-title) {
    color: var(--muted);
}
html[data-theme="light"] body .fd-language-switcher {
    background: #edf3f6;
    border-color: #becfd6;
}
html[data-theme="light"] body .fd-language-switcher a {
    color: #425c69;
}
html[data-theme="light"] body .fd-language-switcher a:is(.is-active, :hover) {
    background: #cee89b;
    color: #1c350b;
}
html[data-theme="light"] body .fd-theme-button {
    color: #425c69;
}
html[data-theme="light"] body .fd-theme-button.is-active {
    color: #1c350b;
    background: #cee89b !important;
}

html[data-theme="light"] body :is(.fd-card, .fd-sidebar, .fd-auth-card, .fd-team-feed, .fd-team-shell>aside, .fd-compare-picker, .fd-compare-table, .fd-connect-panel, .fd-profile-card, .fd-plan-card, .fd-usage-hero, .fd-preview-card, .fd-api-usage-card, .fd-support-topic, .fd-support-checklist, .fd-support-safety, .fd-docs-shell pre) {
    color: var(--text);
    background: #fff;
    border-color: var(--line);
}
html[data-theme="light"] body :is(.fd-dashboard-hero, .fd-flight-hero, .fd-weather-hero, .fd-landing-feature, .fd-landing-plan, .fd-landing-final-cta, .fd-support-contact-card) {
    background: linear-gradient(135deg, #fff, #edf5f7);
    color: var(--text);
    border-color: var(--line);
}
html[data-theme="light"] body .fd-flight-hero::before {
    opacity: .12;
}
html[data-theme="light"] body .fd-flight-hero-tags span {
    background: #edf4f7;
    border-color: #bed1da;
    color: #315566;
}
html[data-theme="light"] body .fd-flight-hero-tags span:first-child {
    color: var(--light-accent-ink);
    background: #edf5df;
}

html[data-theme="light"] body.fd-page :is(main, footer, .xci-cookie-card) :is(p, li, small, dt, legend) {
    color: var(--muted);
}
html[data-theme="light"] body.fd-page :is(.fd-muted, .fd-page-heading p, .fd-dashboard-hero p, .fd-last-flight-copy>p, .fd-mini-flight span, .fd-flight-row div>span, .fd-dashboard-stats span, .fd-profile-complete span, .fd-input-unit i, .fd-api-usage-number span, .fd-preview-count span, .fd-usage-ring small, .fd-plan-price small, .fd-weather-location-wrap small, .fd-weather-attribution, .fd-weather-search label>span, .fd-progress-kpis span, .fd-progress-deltas span, .fd-progress-table span, .fd-progress-best-flight small, .fd-team-flight-pilot span, .fd-team-flight-table-head span, .fd-team-flight-metric::before, .fd-team-flight-score::before) {
    color: var(--muted);
}
html[data-theme="light"] body.fd-page :is(h1, h2, h3, h4, .fd-progress-best-flight span, .fd-team-flight-site, .fd-team-flight-metric, .fd-team-leaderboard .pilot) {
    color: var(--text);
}
html[data-theme="light"] body.fd-page :is(.fd-eyebrow, .fd-section-title>span, .fd-section-title>a, .fd-step, .fd-form-grid label>span, .fd-upload label>span, .fd-upload-wizard-kicker, .fd-landing-feature-icon, .fd-landing-steps article>b, .fd-landing-plan>a, .fd-support-email, .fd-team-flight-score, .fd-team-flight-row strong) {
    color: var(--light-accent-ink);
}

html[data-theme="light"] body :is(.fd-button-dark, .fd-button-secondary, .fd-mini-button, .fd-review-jump, .fd-upload-wizard-close) {
    color: #294653;
    background: #edf4f7;
    border-color: #bacdd5;
}
html[data-theme="light"] body .fd-button:not(.fd-button-dark):not(.fd-button-secondary):not(.fd-google-auth-button) {
    background: #b8e966;
    color: #162e19;
}
html[data-theme="light"] body :is(.fd-button-dark, .fd-button-secondary, .fd-mini-button):hover {
    color: #162e39;
    background: #e0edf2;
}
html[data-theme="light"] body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
    color: var(--text);
    background: #fff;
    border-color: #829ba7;
}
html[data-theme="light"] body :is(input, textarea)::placeholder {
    color: #566c78;
    opacity: 1;
}
html[data-theme="light"] body :is(input[type="checkbox"], input[type="radio"], input[type="range"]) {
    accent-color: #577d16;
}
html[data-theme="light"] body :is(a, button, input, textarea, select, summary):focus-visible {
    outline: 3px solid #096d88;
    outline-offset: 3px;
}
html[data-theme="light"] body :is(.fd-upload-step.is-active span, .fd-plan-current, .fd-pro-pill, .fd-badge, .fd-weather-usage, .fd-weather-usage>span) {
    color: #3e5e0b !important;
    background-color: #edf5df;
    border-color: #9ebd6b;
}
html[data-theme="light"] body :is(.fd-error, .fd-alert-error, .fd-error-text, .fd-link-danger, .fd-mini-button.danger, .fd-flight-delete span, .fd-priority-high, .is-down) {
    color: #a32640 !important;
}
html[data-theme="light"] body :is(.fd-alert, .fd-alert-success, .is-up) {
    color: #3e5e0b;
}
html[data-theme="light"] body .fd-priority-medium {
    color: #8b4c05;
}

/* Legal, account and preference pages also load the theme before their first paint. */
html[data-theme="light"] body :is(.fd-legal-document>h1, .fd-legal-section h2, .fd-legal-company h2) {
    color: var(--text);
}
html[data-theme="light"] body :is(.fd-legal-lead, .fd-legal-section p, .fd-legal-sidebar a, .fd-legal-company dt, .fd-legal-version-row, .fd-auth-google-note, .fd-auth-divider span, .xci-cookie-card p, .xci-cookie-categories small) {
    color: var(--muted);
}
html[data-theme="light"] body :is(.fd-legal-meta span, .fd-legal-company dl>div, .xci-cookie-categories label) {
    color: var(--muted);
    background: #f4f8fa;
    border-color: var(--line);
}
html[data-theme="light"] body .fd-legal-company dd {
    color: var(--text);
}
html[data-theme="light"] body :is(.fd-legal-sidebar a.is-active, .fd-legal-sidebar a:hover) {
    background: #e5f0df;
    color: #294412;
}
html[data-theme="light"] body :is(.fd-legal-company a, .fd-legal-section a, .fd-legal-check a, .fd-auth-switch a) {
    color: #09677f;
}
html[data-theme="light"] body .fd-legal-check span {
    color: var(--muted) !important;
}
html[data-theme="light"] body .xc-login-forgot a {
    color: #09677f !important;
}

html[data-theme="light"] body :is(.fd-legal-footer, .fd-landing-footer, .fd-legal-footer-brand span, .fd-developer-credit a, .fd-footer-link-group>strong) {
    color: var(--muted);
}
html[data-theme="light"] body :is(.fd-footer-link-group>a, .fd-footer-link-group>button.xci-cookie-settings-button) {
    color: var(--muted) !important;
}
html[data-theme="light"] body :is(.fd-footer-link-group>a:hover, .fd-footer-link-group>button.xci-cookie-settings-button:hover) {
    color: #162e39 !important;
}

html[data-theme="light"] body .fd-track-preview {
    background: #e8f2f3;
}
html[data-theme="light"] body .fd-track-preview svg polyline {
    stroke: #4d7313;
}
html[data-theme="light"] body .fd-track-preview>span {
    color: #425d69;
}
html[data-theme="light"] body :is(.fd-progress-deltas>div, .fd-progress-table>div, .fd-team-flight-table-head, .fd-team-members-table .avatar, .fd-team-member-chips span, .fd-team-join-code code) {
    background: #f3f7f9;
    border-color: var(--line);
    color: var(--text);
}
html[data-theme="light"] body :is(.fd-team-privacy-note, .fd-shared-flight-banner, .fd-weather-models, .fd-weather-sources) {
    background: #edf5f8;
    border-color: #bed4de;
    color: #355767;
}
html[data-theme="light"] body :is(.fd-weather-attribution a, .fd-docs-shell a, .fd-docs-grid code, .fd-docs-shell pre, .fd-api-token-reveal code) {
    color: #09677f;
}
html[data-theme="light"] body :is(.fd-map-tool-group, .fd-map-hud, .fd-map-popover, .fd-map-hint, .fd-replay-bar, .fd-track-color-legend, .fd-mobile-map-settings-panel) {
    color: var(--text);
    background: rgba(255,255,255,.97);
    border-color: var(--line);
}
html[data-theme="light"] body :is(.fd-map-tool-group button, .fd-map-tool-group label, .fd-map-hud span, .fd-map-popover span, .fd-map-popover small, .fd-track-color-legend-item, .fd-track-legend-quality) {
    color: var(--muted);
}
html[data-theme="light"] body .fd-track-color-legend-head b {
    color: var(--text);
}

html[data-theme="light"] body .fd-landing-copy h1 {
    background: none;
    -webkit-text-fill-color: var(--text);
    color: var(--text);
}
html[data-theme="light"] body :is(.fd-landing-telemetry span, .fd-landing-plan>span, .fd-api-endpoint span, .fd-support-resource-links a, .fd-capabilities-header>div) {
    color: var(--muted);
}
html[data-theme="light"] body .fd-landing-telemetry span {
    background: rgba(255,255,255,.97);
    border-color: var(--line);
}
html[data-theme="light"] body :is(.fd-landing-telemetry b, .fd-api-endpoint code, .fd-capability-plan) {
    color: var(--text);
}
html[data-theme="light"] body .fd-capabilities-group>div {
    color: var(--light-accent-ink);
    background: #edf5e4;
}
html[data-theme="light"] body :is(.fd-capability-status.is-live, .fd-capabilities-legend .is-live) {
    background: #edf5df;
    border-color: #b4cb8c;
    color: #3e5e0b;
}
html[data-theme="light"] body :is(.fd-capability-status.is-beta, .fd-capabilities-legend .is-beta, .fd-support-security-note) {
    background: #fff3df;
    border-color: #d5b881;
    color: #81500f;
}
html[data-theme="light"] body :is(.fd-capability-status.is-planned, .fd-capabilities-legend .is-planned) {
    background: #edf4f7;
    border-color: #b8cfd9;
    color: #395b6a;
}

html[data-theme="light"] body main.c {
    color: var(--text);
}
html[data-theme="light"] body main.c h1 {
    color: var(--light-accent-ink);
}
html[data-theme="light"] body main.c p {
    color: var(--muted);
}
html[data-theme="light"] body main.c a {
    color: #09677f;
}

html[data-theme="light"] body .xc-auth-shell {
    background: linear-gradient(135deg, #f8fcfd, #eaf3f6);
    color: var(--text);
}
html[data-theme="light"] body .xc-auth-card {
    background: #fff;
    border-color: var(--line);
    box-shadow: 0 22px 60px rgba(31,67,89,.1);
}
html[data-theme="light"] body :is(.xc-auth-lead, .xc-auth-card label) {
    color: var(--muted);
}
html[data-theme="light"] body .xc-auth-back {
    color: #09677f;
}
html[data-theme="light"] body .xc-auth-status {
    background: #edf5df;
    border-color: #b4cb8c;
    color: #3e5e0b;
}
html[data-theme="light"] body .xc-auth-error {
    color: #a32640;
}
html[data-theme="light"] body .fd-flight-chart {
    background: #fff;
    border-color: var(--line);
}
html[data-theme="light"] body .fd-chart-head b {
    color: var(--text);
}
html[data-theme="light"] body :is(.fd-chart-head span, .fd-chart-legend, .fd-chart-legend span, .fd-chart-live span) {
    color: var(--muted) !important;
}
html[data-theme="light"] body .fd-chart-legend .terrain::before {
    background: #52723a;
}

html[data-theme="light"] body .fd-nav a {
    color: var(--muted) !important;
}
html[data-theme="light"] body .fd-nav a:is(:hover, .is-active) {
    color: var(--text) !important;
}
html[data-theme="light"] body :is(.fd-dashboard-hero p, .fd-flight-row div>span, .fd-mini-flight span, .fd-last-flight-copy>p, .fd-last-kpis span, .fd-weather-form label>span, .fd-admin-user-head span, .fd-admin-user-row>div>span:not([class])) {
    color: var(--muted) !important;
}
html[data-theme="light"] body :is(.fd-compare-picker label>span, .fd-vs, .fd-compare-head>.same, .fd-compare-insight span) {
    color: var(--light-accent-ink);
}
html[data-theme="light"] body :is(.fd-status-pill.is-ok, .fd-plan-pill-pro) {
    background: #edf5df !important;
    border-color: #b4cb8c !important;
    color: #3e5e0b !important;
}
html[data-theme="light"] body .fd-plan-pill-free {
    background: #edf4f7 !important;
    border-color: #b8cfd9 !important;
    color: #395b6a !important;
}
html[data-theme="light"] body .fd-status-pill.is-warn {
    background: #fff3df;
    border-color: #d5b881;
    color: #81500f;
}
html[data-theme="light"] body :is(.fd-status-pill.is-bad, .fd-status-pill.is-off) {
    background: #fff0ef;
    border-color: #d9aaa9;
    color: #a32640;
}

html[data-theme="light"] body :is(.fd-flight-share-trigger, .fd-flight-share-trigger:hover, .fd-share-modal-close, .fd-replay-restart, .fd-env-refresh, .fd-play) {
    color: #355767;
}
html[data-theme="light"] body :is(.fd-stat-grid span, .fd-score-grid span, .fd-ai-usage-line span, .fd-env-grid span, .fd-share-modal-label, .fd-share-media-form label>span) {
    color: var(--muted);
}
html[data-theme="light"] body :is(.fd-pro-preview-active span, .fd-takeoff-card span, .fd-share-media-head>span) {
    color: var(--light-accent-ink);
}
html[data-theme="light"] body .fd-score-ring {
    background: radial-gradient(circle at center, #fff 0 56%, transparent 57%), conic-gradient(#64871d calc(var(--score) * 1%), #dce7e0 0);
}
html[data-theme="light"] body .fd-score-grid>div {
    background: #f3f7f9;
}
html[data-theme="light"] body :is(.fd-score-ring strong, .fd-score-grid b, .fd-share-reactions-option b) {
    color: var(--text);
}
html[data-theme="light"] body :is(.fd-env-relation, .fd-share-reactions-option) {
    background: #edf4f7;
    border-color: #bed1da;
    color: var(--muted);
}
html[data-theme="light"] body :is(.fd-takeoff-card a, .fd-env-links a, .fd-env-links a:hover, .fd-share-export-icon, .fd-share-export-card>i, .fd-share-integrations-head span) {
    color: #09677f;
}
html[data-theme="light"] body .fd-share-export-card:nth-child(2) .fd-share-export-icon {
    color: var(--light-accent-ink);
}
html[data-theme="light"] body :is(.fd-map-tool-group button.is-active, .fd-mobile-map-settings-mapmode button.is-active) {
    color: #1c350b;
    background: #cee89b;
}
html[data-theme="light"] body #hud-vario[data-state="strong-climb"],
html[data-theme="light"] body #hud-vario[data-state="climb"] {
    color: #426812;
}
html[data-theme="light"] body #hud-vario[data-state="neutral"] {
    color: #745d0b;
}
html[data-theme="light"] body #hud-vario[data-state="sink"] {
    color: #9a4b10;
}
html[data-theme="light"] body #hud-vario[data-state="strong-sink"] {
    color: #b02643;
}

html[data-theme="light"] body :is(.fd-team-flight-pilot span, .fd-team-form label>span) {
    color: var(--muted) !important;
}
html[data-theme="light"] body :is(.fd-team-flight-metric, .fd-team-form .fd-check b) {
    color: var(--text) !important;
}
html[data-theme="light"] body .fd-team-flight-score {
    color: var(--light-accent-ink) !important;
}
html[data-theme="light"] body .fd-team-card-wing {
    color: #56753e;
}

html[data-theme="light"] body .fd-weather-ai {
    background: linear-gradient(135deg, #fff, #f3f8f9) !important;
}
html[data-theme="light"] body :is(.fd-weather-ai-grid article, .fd-weather-brief-grid article, .fd-weather-chronology>article, .fd-weather-hour-grid>div, .fd-weather-hour-main>div, .fd-weather-hour-layers>div, .fd-weather-hour-air>div, .fd-weather-hour-meta>span) {
    color: var(--text);
    background: #f3f7f9;
    border-color: var(--line);
}
html[data-theme="light"] body :is(.fd-weather-section-kicker, .fd-weather-day-character span, .fd-weather-brief-grid article>span, .fd-weather-subhead>span, .fd-weather-ai-grid span, .fd-weather-sources a, .fd-weather-models a) {
    color: #09677f;
}
html[data-theme="light"] body :is(.fd-weather-best span, .fd-weather-best b, .fd-weather-best-copy span, .fd-weather-best-narrative>span, .fd-weather-chronology b, .fd-weather-chronology>article b) {
    color: var(--light-accent-ink);
}
html[data-theme="light"] body :is(.fd-weather-quick-card>span, .fd-weather-quick-card strong small, .fd-weather-quick-card em, .fd-weather-hour-title span, .fd-weather-hour-main span, .fd-weather-hour-main em, .fd-weather-hour-main strong small, .fd-weather-hour-grid span, .fd-weather-hour-grid em, .fd-weather-hour-grid strong small, .fd-weather-hour-meta b, .fd-weather-vertical-note>span, .fd-weather-section-head>div:last-child, .fd-weather-hour>header span, .fd-weather-models summary, .fd-weather-models p span) {
    color: var(--muted);
}
html[data-theme="light"] body :is(.fd-weather-confidence.is-high, .fd-weather-agreement.is-good) {
    color: #3e5e0b;
    background: #edf5df;
    border-color: #b4cb8c;
}
html[data-theme="light"] body :is(.fd-weather-confidence.is-medium, .fd-weather-agreement.is-moderate, .fd-weather-watch>span) {
    color: #81500f;
    background: #fff3df;
    border-color: #d5b881;
}
html[data-theme="light"] body :is(.fd-weather-confidence.is-low, .fd-weather-agreement.is-weak) {
    color: #a32640;
    background: #fff0ef;
    border-color: #d9aaa9;
}
html[data-theme="light"] body .fd-weather-agreement.is-limited {
    color: #395b6a;
    background: #edf4f7;
    border-color: #b8cfd9;
}

html[data-theme="light"] body .fd-public-community-shell {
    background: linear-gradient(180deg, #f4f9fb, #eaf3f6);
    color: var(--text);
    border-color: var(--line);
}
html[data-theme="light"] body :is(.fd-community-counts span, .fd-community-like, .fd-community-comment-form, .fd-community-comment) {
    background: #fff;
    color: var(--text);
    border-color: #b8ccd5;
}
html[data-theme="light"] body :is(.fd-public-community-heading h2, .fd-community-counts b, .fd-community-like>b) {
    color: var(--text);
}
html[data-theme="light"] body :is(.fd-community-counts small, .fd-community-like>span, .fd-community-comment-form>div>span, .fd-community-comment-body time, .fd-community-comment-body form button, .fd-community-empty) {
    color: var(--muted);
}
html[data-theme="light"] body .fd-community-avatar {
    background: #e9f3f7;
    color: #09677f;
}
html[data-theme="light"] body :is(.fd-community-auth-cta, .fd-community-like.is-liked>em, .fd-community-comment-body header span) {
    color: #3e5e0b;
    background: #edf5df;
    border-color: #b4cb8c;
}
html[data-theme="light"] body .fd-community-like.is-liked>span {
    color: var(--light-accent-ink);
    text-shadow: none;
}
html[data-theme="light"] body .fd-community-like>em {
    background: #edf4f7;
    color: #395b6a;
}
html[data-theme="light"] body :is(.fd-community-status, .fd-public-story-card>span, .fd-public-media-subhead span) {
    color: var(--light-accent-ink) !important;
}
html[data-theme="light"] body .fd-community-errors {
    color: #a32640;
    background: #fff0ef;
    border-color: #d9aaa9;
}

html[data-theme="light"] body .fd-share-modal-close,
html[data-theme="light"] body .fd-share-modal-close:hover {
    color: #355767 !important;
}
html[data-theme="light"] body .fd-share-mode-option>input:checked+span {
    border-color: #88a853 !important;
    background: #f1f7e8 !important;
}
html[data-theme="light"] body .fd-share-mode-option>input:checked+span i {
    border-color: #577b1c;
}
html[data-theme="light"] body .fd-share-mode-option>input:checked+span i::after {
    background: #577b1c;
}
html[data-theme="light"] body .fd-share-modal-close:focus-visible,
html[data-theme="light"] body .fd-share-mode-option>input:focus-visible+span {
    outline: 3px solid #096d88 !important;
    outline-offset: 3px;
}
html[data-theme="light"] body :is(.fd-mobile-map-settings-panel>header span, .fd-mobile-map-settings-field>span, .fd-mobile-map-settings-mapmode>span) {
    color: var(--muted);
}
html[data-theme="light"] body .fd-mobile-map-settings-close {
    color: #355767;
    background: #edf4f7;
    border-color: #bacdd5;
}
