/*
    EPIC 60 (Ascend at Home) - parent shell tokens and the minimal shell layout.
    Look (user decision): forest-green header (#1E3B34 to #2A5547) with white tabs, plain light body
    (#F7F8F5 ground, white hairline cards), Fredoka display / Inter body. State colours never use red:
    secure green, getting there blue, needs a step back amber, not yet dashed grey.
    Desktop: tabs in the header. Phone (<= 640px): tabs fixed at the bottom.
*/

.home-shell {
    --home-header-from: #1E3B34;
    --home-header-to: #2A5547;
    --home-header-text: #FFFFFF;
    --home-tab-inactive: rgba(255, 255, 255, 0.72);
    --home-tab-active: #FFFFFF;

    --home-ground: #F7F8F5;
    --home-card: #FFFFFF;
    --home-hairline: #E3E6E0;
    --home-text: #1C2421;
    --home-text-muted: #5B6661;

    --home-state-secure: #2F9E6E;
    --home-state-getting-there: #1F66D6;
    --home-state-step-back: #E09A1C;
    --home-state-not-yet: #A7B0BF;
    --home-state-not-yet-border: 2px dashed #A7B0BF;

    --home-font-display: 'Fredoka', 'Inter', system-ui, sans-serif;
    --home-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --home-radius: 12px;
    --home-gutter: 16px;
    --home-max-width: 960px;
    --home-max-width-narrow: 560px;
    --home-bottom-bar-height: 64px;
    --home-phone-breakpoint: 640px;

    min-height: 100vh;
    background: var(--home-ground);
    color: var(--home-text);
    font-family: var(--home-font-body);
}

.home-header {
    background: linear-gradient(135deg, var(--home-header-from), var(--home-header-to));
    color: var(--home-header-text);
}

.home-header__inner {
    max-width: var(--home-max-width);
    margin: 0 auto;
    padding: 12px var(--home-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.home-brand {
    font-family: var(--home-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--home-header-text);
    text-decoration: none;
}

.home-tabs {
    display: flex;
    gap: 4px;
}

.home-tab {
    color: var(--home-tab-inactive);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
}

.home-tab:hover,
.home-tab:focus-visible {
    color: var(--home-tab-active);
    background: rgba(255, 255, 255, 0.10);
}

.home-tab.active {
    color: var(--home-tab-active);
    box-shadow: inset 0 -2px 0 var(--home-tab-active);
}

.home-main {
    max-width: var(--home-max-width);
    margin: 0 auto;
    padding: 24px var(--home-gutter);
}

.home-main--narrow {
    max-width: var(--home-max-width-narrow);
}

.home-card {
    background: var(--home-card);
    border: 1px solid var(--home-hairline);
    border-radius: var(--home-radius);
    padding: 16px;
}

.home-title {
    font-family: var(--home-font-display);
    font-weight: 600;
    margin: 0 0 12px;
}

.home-muted {
    color: var(--home-text-muted);
}

@media (max-width: 640px) {
    .home-shell:not(.home-shell--setup) .home-main {
        padding-bottom: calc(var(--home-bottom-bar-height) + 16px);
    }

    .home-shell:not(.home-shell--setup) .home-tabs {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--home-bottom-bar-height);
        justify-content: space-around;
        align-items: center;
        background: linear-gradient(135deg, var(--home-header-from), var(--home-header-to));
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 10;
    }

    .home-tab.active {
        box-shadow: inset 0 2px 0 var(--home-tab-active);
    }
}
/* FocusOnNavigate moves focus to the page h1 for screen readers; the h1 is not interactive, so no ring. */
.home-shell h1:focus,
.home-acc h1:focus {
    outline: none;
}
