/* Shared preference, with an appearance control fitted to each existing public header. */
.hf-public-appearance .hf-public-tools[hidden] { display: none; }
.hf-public-appearance .hf-public-tools #hf-portal-appearance { margin: 0; }
.hf-public-appearance #hit-fire-homepage .hfh-header,
html[data-hf-public="guide"] .bar .shell { flex-wrap: wrap; }
html[data-hf-public="guide"] .bar .shell { padding-block: 9px; gap: 9px 20px; }
html[data-hf-public="guide"] .toplinks { margin-left: auto; }
html[data-hf-public="apps"] .hf-public-tools { width: min(1200px,92%); margin: 0 auto; padding-top: 14px; }
@media(max-width: 800px) {
    .hf-public-appearance #hit-fire-homepage .hf-public-tools {
        order: 4;
        flex-basis: 100%;
    }
    .hf-public-appearance #hit-fire-homepage .hf-public-tools #hf-portal-appearance { justify-content: flex-start; }
}
@media(max-width: 590px) {
    html[data-hf-public="guide"] .hf-public-tools { flex-basis: 100%; }
    html[data-hf-public="guide"] .hf-public-tools #hf-portal-appearance { justify-content: flex-start; }
}

html[data-hf-public][data-hf-portal-theme="light"] {
    color-scheme: light;
    --site-base: #f5f5f2;
    --site-paper: #fff;
    --site-text: #20241f;
    --site-muted: #52584f;
    --site-line: #d5d5cd;
    --site-warm: #fff0ce;
    --site-gold: #794708;
    --site-button: #ffd16f;
    --site-button-text: #2c200a;
    background: var(--site-base);
    color: var(--site-text);
}
html[data-hf-portal-theme="light"] body.hf-public-appearance {
    background: var(--site-base);
    color: var(--site-text);
}
html[data-hf-public][data-hf-portal-theme="light"] :is(a,button,summary):focus-visible {
    outline: 2px solid var(--site-gold);
    outline-offset: 3px;
}

/* The PHP homepage and public policies share the same Ember shell. */
html[data-hf-portal-theme="light"] #hit-fire-homepage { color-scheme: light; }
html[data-hf-portal-theme="light"] #hit-fire-homepage .hfh-site {
    --hfh-bg: var(--site-base);
    --hfh-header: var(--site-paper);
    --hfh-surface: var(--site-paper);
    --hfh-ink: var(--site-text);
    --hfh-muted: var(--site-muted);
    --hfh-line: var(--site-line);
    --hfh-accent: var(--site-button);
    --hfh-gold: var(--site-gold);
    --hfh-soft: #f0f1ed;
    --hfh-warm: var(--site-warm);
}
html[data-hf-portal-theme="light"] #hit-fire-homepage .hfh-hero {
    background: radial-gradient(ellipse at 88% 35%, #ffe8bf, var(--site-base) 66%);
}
html[data-hf-portal-theme="light"] #hit-fire-homepage .hfh-welcome-back { border-color: #d9bc7f; }
html[data-hf-portal-theme="light"] #hit-fire-homepage :is(.hfh-primary,.hfh-plan:last-child a) {
    background: var(--site-button);
    color: var(--site-button-text);
    border-color: #ba924f;
}
html[data-hf-portal-theme="light"] #hit-fire-homepage :is(.hfh-primary,.hfh-plan:last-child a):hover {
    background: #ffbe44;
    color: var(--site-button-text);
}
html[data-hf-portal-theme="light"] #hit-fire-homepage :is(.hfh-plan-features,.hfh-review-grid blockquote) { color: var(--site-muted); }
/* Preserve the dark illustrative TV and phone artwork independently of the page. */
html[data-hf-portal-theme="light"] #hit-fire-homepage :is(.hfh-tv,.hfh-phone) {
    --hfh-bg: #101114;
    --hfh-ink: #f5f6f8;
    --hfh-gold: #ffd43b;
    --hfh-muted: #c6c8ce;
    --hfh-accent: #ffac3c;
    --hfh-line: #575954;
    color: var(--hfh-ink);
}
html[data-hf-portal-theme="light"] #hit-fire-homepage .hfh-legacy-page .bg-night-light {
    background: var(--site-paper);
    border-color: var(--site-line);
    box-shadow: 0 6px 24px rgb(50 40 25 / 7%);
}
html[data-hf-portal-theme="light"] #hit-fire-homepage .hfh-legacy-page :is(.text-white,.text-gray-300) { color: var(--site-text); }
html[data-hf-portal-theme="light"] #hit-fire-homepage .hfh-legacy-page .text-red-500 { color: #8b282e; }
html[data-hf-portal-theme="light"] #hit-fire-homepage .hfh-legacy-page :is(.border-gray-600,.border-gray-700) { border-color: var(--site-line); }

/* Apps directory. Legacy cards and their download links are still in use. */
html[data-hf-public="apps"][data-hf-portal-theme="light"] .logo-badge {
    background: var(--site-button);
    color: var(--site-button-text);
    box-shadow: none;
}
html[data-hf-public="apps"][data-hf-portal-theme="light"] :is(.setup-section,.app-card,.support-box,.hf-preview-card) {
    color: var(--site-text);
    background: var(--site-paper);
    border-color: var(--site-line);
    box-shadow: 0 4px 18px rgb(50 40 25 / 7%);
}
html[data-hf-public="apps"][data-hf-portal-theme="light"] :is(.steps,.app-image,footer) {
    color: var(--site-muted);
    background: #eaece6;
}
html[data-hf-public="apps"][data-hf-portal-theme="light"] :is(.hero p,.setup-section p,.setup-section ol,.app-content p,.steps ol,.support-box p,.hf-preview-card p) {
    color: var(--site-muted);
}
html[data-hf-public="apps"][data-hf-portal-theme="light"] :is(.setup-section h2,.app-content h2,.support-box h2,.hf-preview-label) { color: var(--site-gold); }
html[data-hf-public="apps"][data-hf-portal-theme="light"] .steps h3 { color: var(--site-text); }
html[data-hf-public="apps"][data-hf-portal-theme="light"] .hf-preview-card h3 { color: var(--site-text) !important; }
html[data-hf-public="apps"][data-hf-portal-theme="light"] :is(.hf-preview-help,.setup-section p > a) { color: var(--site-gold) !important; }
html[data-hf-public="apps"][data-hf-portal-theme="light"] :is(.btn,.hf-preview-button) {
    color: var(--site-button-text);
    background: var(--site-button);
}
html[data-hf-public="apps"][data-hf-portal-theme="light"] .btn.secondary {
    color: var(--site-gold);
    background: var(--site-paper);
    border-color: #ac9e84;
}
html[data-hf-public="apps"][data-hf-portal-theme="light"] :is(.btn,.hf-preview-button):hover { background: #ffbe44; }

/* Fire TV installation guide, including the screenshot viewer and service-login box. */
html[data-hf-public="guide"][data-hf-portal-theme="light"] {
    --base: var(--site-base);
    --panel: var(--site-paper);
    --text: var(--site-text);
    --muted: var(--site-muted);
    --line: var(--site-line);
    --gold: var(--site-gold);
}
html[data-hf-public="guide"][data-hf-portal-theme="light"] .hero {
    background: radial-gradient(ellipse at 85% 30%, #ffebc7, transparent 62%), #fffbf3;
}
html[data-hf-public="guide"][data-hf-portal-theme="light"] :is(.bar,.setup-wrap,.box,dialog) {
    background: var(--site-paper);
    border-color: var(--site-line);
}
html[data-hf-public="guide"][data-hf-portal-theme="light"] :is(.lead,.hero figcaption,.hero-meta .version,li,p.instruction) { color: var(--site-muted); }
html[data-hf-public="guide"][data-hf-portal-theme="light"] :is(.install-code,.box .button:hover) { background: var(--site-warm); }
html[data-hf-public="guide"][data-hf-portal-theme="light"] .install-code span { color: var(--site-text); }
html[data-hf-public="guide"][data-hf-portal-theme="light"] :is(.button,.skip,.dialog-bar button) {
    color: var(--site-button-text);
    background: var(--site-button);
    border-color: #ae8c54;
}
html[data-hf-public="guide"][data-hf-portal-theme="light"] .button:hover { background: #ffbe44; }
html[data-hf-public="guide"][data-hf-portal-theme="light"] .box .button {
    color: var(--site-gold);
    background: var(--site-paper);
}
