/* ================================================================
   GLOBAL SHELL — HEADER + FOOTER
   ================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #09090f;
    color: rgba(238,241,248,0.93);
    font-family: Nunito, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

#app {
    min-height: 100%;
}

/* Reset top-margin compensation since header is now 54px (was 66px) */
.site-content { margin-top: 0 !important; }

/* ---- Header ---- */
.tb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 54px;
    z-index: 200;
    background: #09090f;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
}

.tb-header-inner {
    max-width: 1216px;
    margin: 0 auto;
    padding: 0 28px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}

.tb-header-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none !important;
    flex-shrink: 0;
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.tb-header-logo:hover { text-decoration: none !important; }

.tb-logo-mark {
    width: 19px;
    height: 24px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    filter: invert(1);
    opacity: 0.88;
}

.tb-header-logo-text {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.88) !important;
    letter-spacing: 0.3px;
}

.tb-header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.tb-header-link {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.42) !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tb-header-link:hover { color: rgba(255,255,255,0.88) !important; text-decoration: none !important; }
.tb-header-about-icon { display: none; }

.tb-header-app {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(80,250,123,0.8) !important;
    text-decoration: none !important;
    border: 1px solid rgba(80,250,123,0.22);
    border-radius: 22px;
    padding: 5px 14px;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 0 !important;
}
.tb-header-app:hover {
    border-color: rgba(80,250,123,0.5);
    background: rgba(80,250,123,0.07);
    color: #50fa7b !important;
    text-decoration: none !important;
}

/* ---- Theme toggle: computer ⇄ garden ---- */
.tb-theme-toggle {
    position: relative;
    width: 58px;
    height: 26px;
    flex-shrink: 0;
    margin-left: 4px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.25s, border-color 0.25s;
}
.tb-theme-toggle:hover { border-color: rgba(255,255,255,0.3); }

.tb-theme-toggle svg {
    position: relative;
    z-index: 2;
    width: 13px;
    height: 13px;
    transition: color 0.25s;
}
.tb-ti--computer { margin-left: 6px; color: #50fa7b; }
.tb-ti--garden   { margin-right: 6px; color: rgba(255,255,255,0.32); }

.tb-theme-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(80,250,123,0.16);
    border: 1px solid rgba(80,250,123,0.55);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.4, 1), background 0.25s, border-color 0.25s;
}

/* ---- Footer ---- */
.tb-footer {
    background: #09090f;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 42px 28px 38px;
}

.tb-footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    gap: 42px;
    align-items: start;
}

.tb-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.tb-footer-wordmark {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.82) !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.tb-footer-wordmark:hover { color: rgba(255,255,255,0.8) !important; }

.tb-footer-tagline {
    max-width: 30ch;
    margin: 0;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,0.38);
}

.tb-footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,0.22);
}

.tb-footer-navs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 34px;
    align-items: start;
}

.tb-footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.tb-footer-heading {
    font-family: 'IBM Plex Mono', 'Cascadia Code', Consolas, monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 2px;
}

.tb-footer-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 9px 18px;
    width: 100%;
}

.tb-footer-section a {
    font-size: 12px;
    color: rgba(255,255,255,0.42) !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
    transition: color 0.2s;
    line-height: 1.35;
}
.tb-footer-section a:hover { color: rgba(255,255,255,0.78) !important; text-decoration: none !important; }

.tb-footer-category-grid a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tb-footer-category-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fc, #50fa7b);
    opacity: 0.9;
    flex-shrink: 0;
}

.tb-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.tb-footer-social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Garden shell */
html:not([data-theme="dark"]) {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html:not([data-theme="dark"]) body {
    background:
        radial-gradient(circle at 14% 0%, rgba(255,184,77,0.22), transparent 24rem),
        linear-gradient(180deg, #fff8eb 0%, #f6efe3 46%, #efe0c9 100%);
    color: #241b16;
}

html:not([data-theme="dark"]) .tb-header,
html:not([data-theme="dark"]) .tb-footer {
    background: rgba(255,250,239,0.86);
    border-color: rgba(71,57,45,0.14);
    backdrop-filter: blur(16px);
}

html:not([data-theme="dark"]) .tb-header-logo-text,
html:not([data-theme="dark"]) .tb-footer-wordmark {
    color: #241b16 !important;
}

html:not([data-theme="dark"]) .tb-logo-mark {
    filter: none;
    opacity: 1;
}

html:not([data-theme="dark"]) .tb-header-link,
html:not([data-theme="dark"]) .tb-footer-section a {
    color: #6f6255 !important;
}

html:not([data-theme="dark"]) .tb-header-link:hover,
html:not([data-theme="dark"]) .tb-footer-section a:hover {
    color: #2f7d56 !important;
}

html:not([data-theme="dark"]) .tb-header-app {
    color: #2f7d56 !important;
    border-color: rgba(47,125,86,0.28);
    background: #dff3df;
}

html:not([data-theme="dark"]) .tb-header-app:hover {
    color: #245f42 !important;
    border-color: rgba(47,125,86,0.5);
    background: #cfe9cf;
}

html:not([data-theme="dark"]) .tb-theme-thumb {
    transform: translateX(32px);
    background: #dff3df;
    border-color: #2f7d56;
}
html:not([data-theme="dark"]) .tb-theme-toggle {
    background: #fffaef;
    border-color: rgba(71,57,45,0.28);
}
html:not([data-theme="dark"]) .tb-theme-toggle:hover { border-color: rgba(71,57,45,0.5); }
html:not([data-theme="dark"]) .tb-ti--garden   { color: #2f7d56; }
html:not([data-theme="dark"]) .tb-ti--computer { color: rgba(60,47,36,0.35); }

html:not([data-theme="dark"]) .tb-avatar-computer {
    display: none;
}

html:not([data-theme="dark"]) .tb-avatar-garden {
    display: block;
}

.tb-avatar-garden {
    display: none;
}

html:not([data-theme="dark"]) .tb-footer-copy {
    color: #7b6d61;
}

html:not([data-theme="dark"]) .tb-footer-tagline {
    color: #6f6255;
}

html:not([data-theme="dark"]) .tb-footer-heading {
    color: #9a8875;
}

html:not([data-theme="dark"]) .tb-harm-badge.harm-severe .tb-harm-score { color: #b91c1c; }
html:not([data-theme="dark"]) .tb-harm-badge.harm-high .tb-harm-score { color: #c2410c; }
html:not([data-theme="dark"]) .tb-harm-badge.harm-moderate .tb-harm-score { color: #a16207; }
html:not([data-theme="dark"]) .tb-harm-badge.harm-mild .tb-harm-score { color: #4d7c0f; }
html:not([data-theme="dark"]) .tb-harm-badge.harm-low .tb-harm-score { color: #087a35; }

@media (max-width: 600px) {
    .tb-header-nav { gap: 8px; }
    .tb-header-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        flex-shrink: 0;
        border-radius: 50%;
        border: 1px solid rgba(255,255,255,0.14);
        background: rgba(255,255,255,0.05);
        color: rgba(255,255,255,0.7) !important;
    }
    .tb-header-link:hover {
        border-color: rgba(255,255,255,0.3);
        color: rgba(255,255,255,0.88) !important;
    }
    .tb-header-link-label { display: none; }
    .tb-header-about-icon {
        display: block;
        width: 15px;
        height: 15px;
    }
    .tb-header-app {
        white-space: nowrap;
        padding: 5px 11px;
    }
    .tb-header-app-arrow { display: none; }
    html:not([data-theme="dark"]) .tb-header-link {
        background: #fffaef;
        border-color: rgba(71,57,45,0.28);
        color: #6f6255 !important;
    }
    html:not([data-theme="dark"]) .tb-header-link:hover {
        border-color: rgba(71,57,45,0.5);
        color: #2f7d56 !important;
    }
    .tb-footer-inner,
    .tb-footer-navs,
    .tb-footer-category-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer menu styles for category navigation */
.footer-div {
    margin-right: 5px;
    text-align: center;
    font-size: 11px;
    cursor: pointer;
    float: left;
    width: 32px;
    height: 29px;
    border-radius: 50%;
    color: #000;
    display: inline-table;
    padding-top: 4px;
    padding-left: 3px;
    padding-right: 3px;
    background-color: #ffdada !important;
    border: 1px solid #faa !important;
    font-weight: 700;
}

.footer-div:hover + .footer-div-label {
    text-decoration: underline;
}

.footer-div-fixed {
    background-color: #c8ffaf !important;
    border: 1px solid #26e200 !important;
}

.footer-div-label {
    position: absolute;
    margin-left: 44px;
    margin-top: 2px;
    font-weight: 700;
}

.footer-div-description {
    margin-left: 44px;
    font-size: 15px;
    margin-top: 3px;
    padding-top: 24px;
    color: #555;
}

.footer-div-spacer-home {
    clear: both;
    height: 23px;
}

.footer-div-spacer {
    clear: both;
    height: 15px;
}

.footer-div-label:hover {
    text-decoration: underline;
}

.footer-div-label-inactive {
    text-decoration: none !important;
}

