:root {
    --color-primary: #6b8e23;
    --color-secondary: #9acd32;
    --color-accent: #d4af37;
    --color-bg: #f7faf3;
    --color-text: #2a3328;
    --color-text-light: #5a6656;
    --color-border: #d5e0c8;
    --color-card: #eef4e6;
    --fg-header-h: 72px;
    --fg-page-w: 1120px;
    --fg-shadow: 6px 6px 14px rgba(42, 51, 40, 0.08), -4px -4px 12px rgba(255, 255, 255, 0.9);
    --fg-inset: inset 3px 3px 8px rgba(42, 51, 40, 0.06), inset -2px -2px 6px rgba(255, 255, 255, 0.7);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

html { scroll-padding-top: var(--fg-header-h); }

body {
    margin: 0;
    padding-top: var(--fg-header-h);
    font-family: "Cabin", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
}

body.fgCookie-open { padding-bottom: 88px; }

h1, h2, h3, h4 {
    font-family: "Bitter", Georgia, serif;
    line-height: 1.25;
    font-weight: 700;
    color: var(--color-text);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); }
a:hover { color: #55701c; }

.fgWrap {
    max-width: var(--fg-page-w);
    margin: 0 auto;
    padding: 0 20px;
}

.fgHeader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--fg-header-h);
    background: var(--color-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fgHeader a,
.fgHeader a:visited { color: var(--color-text); text-decoration: none; }

.fgHeader-row {
    display: flex;
    align-items: center;
    min-height: var(--fg-header-h);
    gap: 1rem;
}

.fgHeader-logo { order: 1; flex-shrink: 0; }
.fgHeader-logo img {
    width: 180px;
    height: auto;
    min-height: 36px;
}
.fgHeader-cta { order: 2; flex-shrink: 0; }
.fgNav {
    order: 3;
    display: flex;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.85rem;
}
.fgNav a {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}
.fgNav a.is-active { color: var(--color-primary); border-bottom: 2px solid var(--color-accent); }

.fgBurger {
    order: 4;
    flex-shrink: 0;
    display: none;
}
.fgOverlay,
.fgDrawer { display: none; }

.fgBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.55rem 1.15rem;
    border: 1.5px solid var(--color-primary);
    border-radius: 6px;
    background: transparent;
    color: var(--color-primary);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.fgBtn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.fgBtn-primary:hover { background: #55701c; color: #fff; }
.fgBtn-ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.fgBtn-compact {
    min-height: 38px;
    padding: 0.35rem 0.85rem;
    font-size: 0.9rem;
}
.fgBtn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    animation: fgRipple 0.55s ease-out;
    pointer-events: none;
}
@keyframes fgRipple {
    to { transform: scale(4); opacity: 0; }
}

.fgHero {
    background: linear-gradient(160deg, #e8f0dc 0%, var(--color-bg) 55%, #eef6e4 100%);
    padding: 3.5rem 0 3rem;
}
.fgHero-title {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    max-width: 18ch;
    margin: 0 0 1.5rem;
}
.fgHero-figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
    max-width: 640px;
}
.fgHero-figure {
    background: var(--color-card);
    box-shadow: var(--fg-shadow);
    border-radius: 12px 12px 4px 12px;
    padding: 1rem 1.1rem;
    position: relative;
}
.fgHero-figure::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 16px;
    width: 48px;
    height: 14px;
    background: var(--color-accent);
    border-radius: 4px 4px 0 0;
}
.fgHero-num {
    display: block;
    font-family: "Bitter", Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--color-primary);
}
.fgHero-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
}
.fgHero-text { max-width: 58ch; margin: 0 0 1.5rem; color: var(--color-text-light); }
.fgHero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.fgSection { padding: 3rem 0; }
.fgSection-title { font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin: 0 0 0.75rem; }
.fgSection-lead { color: var(--color-text-light); max-width: 60ch; margin: 0 0 1.5rem; }

.fgTabs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.75rem;
}
.fgTabs-tab {
    appearance: none;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    font: inherit;
    font-weight: 600;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
}
.fgTabs-tab.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.fgTabs-panel { display: block; margin-bottom: 1rem; }
.fgTabs[data-js] .fgTabs-panel { display: none; }
.fgTabs[data-js] .fgTabs-panel.is-active { display: block; }

.fgCard-tab {
    position: relative;
    background: var(--color-card);
    box-shadow: var(--fg-shadow);
    border-radius: 14px 14px 8px 14px;
    padding: 1.25rem 1.25rem 1.35rem;
}
.fgCard-tab::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 18px;
    width: 56px;
    height: 16px;
    background: var(--color-secondary);
    border-radius: 5px 5px 0 0;
}

.fgRank {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}
.fgRank-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 11rem);
    gap: 1.25rem;
    align-items: start;
}
.fgRank-badge {
    position: absolute;
    top: 12px;
    right: 16px;
    font-family: "Bitter", Georgia, serif;
    font-weight: 700;
    color: var(--color-accent);
}
.fgRank-main { display: flex; gap: 1rem; grid-column: 1; }
.fgRank-icon {
    width: 88px;
    height: 88px;
    border-radius: 22%;
    object-fit: contain;
    box-shadow: var(--fg-inset);
    background: #fff;
    flex-shrink: 0;
}
.fgRank-name { margin: 0 0 0.25rem; font-size: 1.35rem; }
.fgRank-dev { margin: 0 0 0.75rem; color: var(--color-text-light); font-size: 0.95rem; }
.fgRank-facts {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.fgRank-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.fgRank-still {
    margin: 0;
    grid-column: 2;
    justify-self: end;
}
.fgRank-still img {
    max-width: 180px;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--fg-shadow);
    background: #fff;
}

.fgTableWrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fgTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    background: #fff;
    box-shadow: var(--fg-shadow);
}
.fgTable th,
.fgTable td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}
.fgTable thead th {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.fgGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.fgCriteria h3 { margin-top: 0.25rem; }
.fgCriteria p { margin-bottom: 0; color: var(--color-text-light); }

.fgCta {
    background: linear-gradient(180deg, #dfe9d0, #cfdcb8);
    padding: 3rem 0;
    text-align: center;
}
.fgCta-title { margin-top: 0; }
.fgCta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.fgFooter {
    background: #e6eedc;
    padding: 2.75rem 0 2rem;
    margin-top: 2rem;
}
.fgFooter-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}
.fgFooter-lead { max-width: 46ch; margin: 0; color: var(--color-text-light); }
.fgFooter-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.1rem;
}
.fgFooter-links a,
.fgFooter-cookieBtn {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.fgFooter-disc {
    max-width: 62ch;
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}
.fgFooter-copy { margin: 0; font-size: 0.9rem; }

.fgCookie { display: none; }
.fgCookie:not([hidden]) {
    display: flex;
    position: fixed;
    z-index: 110;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 32px);
    border-radius: 999px;
    gap: 12px;
    align-items: center;
    padding: 0.55rem 0.75rem 0.55rem 1.1rem;
    background: var(--color-text);
    color: #f7faf3;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.fgCookie p { margin: 0; font-size: 0.9rem; white-space: nowrap; }
.fgCookie a { color: var(--color-secondary); }
.fgCookie-actions { display: flex; }
.fgCookie .fgBtn {
    box-shadow: none;
    border-radius: 999px;
    min-height: 36px;
    padding: 0.35rem 1rem;
}

.fgCrumb {
    margin: 0;
    padding: 1rem 0 0;
    font-size: 0.9rem;
}
.fgCrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.fgCrumb-item:not(:last-child)::after {
    content: "/";
    margin-left: 0.35rem;
    color: var(--color-text-light);
}
.fgCrumb a { text-decoration: none; }

.fgPage { padding: 2.5rem 0 3.5rem; }
.fgPage-title { margin: 0 0 1rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.fgProse { max-width: 68ch; }
.fgProse p { color: var(--color-text-light); }
.fgProse h2 { margin-top: 2rem; font-size: 1.35rem; }

.fgNoteLayout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
    gap: 1.75rem;
    align-items: start;
}
.fgSideFacts {
    background: var(--color-card);
    box-shadow: var(--fg-shadow);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    position: relative;
}
.fgSideFacts::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 14px;
    width: 44px;
    height: 14px;
    background: var(--color-accent);
    border-radius: 4px 4px 0 0;
}
.fgSideFacts h3 { margin: 0.2rem 0 0.75rem; font-size: 1.05rem; }
.fgSideFacts ul { margin: 0; padding-left: 1.1rem; color: var(--color-text-light); font-size: 0.92rem; }

.fgMagazine-lead {
    display: grid;
    gap: 1rem;
    background: var(--color-card);
    box-shadow: var(--fg-shadow);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.fgMagazine-band {
    height: 8px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}
.fgMagazine-leadBody { padding: 1.25rem 1.5rem 1.5rem; }
.fgMagazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.15rem;
}
.fgBriefCard {
    background: #fff;
    box-shadow: var(--fg-shadow);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.fgBriefCard-band { height: 6px; background: var(--color-secondary); }
.fgBriefCard-band-alt { background: var(--color-accent); }
.fgBriefCard-body { padding: 1rem 1.15rem 1.25rem; flex: 1; }
.fgBriefCard h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.fgBriefCard p { margin: 0 0 0.85rem; color: var(--color-text-light); font-size: 0.95rem; }

.fgForm {
    display: grid;
    gap: 0.85rem;
    max-width: 520px;
}
.fgForm label { font-weight: 600; display: grid; gap: 0.35rem; }
.fgForm input,
.fgForm textarea {
    font: inherit;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--fg-inset);
}
.fgForm textarea { min-height: 140px; resize: vertical; }

.fgFaq { display: grid; gap: 0.75rem; margin-bottom: 1.75rem; }
.fgFaq details {
    background: var(--color-card);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    box-shadow: var(--fg-inset);
}
.fgFaq summary { cursor: pointer; font-weight: 600; }

.fgGlossary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.fgGlossary-nav a {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--color-card);
    border-radius: 6px;
    color: var(--color-text);
    font-weight: 600;
}
.fgGlossary-term { margin-top: 1.5rem; }
.fgGlossary-term dt { font-family: "Bitter", Georgia, serif; font-weight: 700; }
.fgGlossary-term dd { margin: 0.25rem 0 0; color: var(--color-text-light); }

.fgAppPassport {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--color-card);
    box-shadow: var(--fg-shadow);
    border-radius: 14px;
    padding: 1.15rem;
    margin: 1.25rem 0 1.75rem;
}
.fgAppPassport img {
    width: 72px;
    height: 72px;
    border-radius: 22%;
    object-fit: contain;
    background: #fff;
}
.fgAppPassport ul { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--color-text-light); font-size: 0.92rem; }

@media (prefers-reduced-motion: no-preference) {
    .fgTilt {
        opacity: 0;
        transform: rotate(-1.2deg) translateY(12px);
        transition: opacity 0.45s ease, transform 0.45s ease;
    }
    .fgTilt.is-in {
        opacity: 1;
        transform: rotate(0) translateY(0);
    }
}

@media (max-width: 1100px) {
    .fgNav { gap: 0.55rem; }
    .fgNav a { font-size: 0.88rem; }
}

@media (max-width: 1024px) {
    .fgNav { display: none; }
    .fgHeader-row {
        justify-content: flex-start;
        width: 100%;
    }
    .fgHeader-cta { margin-left: auto; }
    .fgBurger {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-left: 0.5rem;
        border: none;
        background: transparent;
        cursor: pointer;
        padding: 10px;
        -webkit-tap-highlight-color: transparent;
    }
    .fgBurger span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 3px 0;
        background: var(--color-text);
        border-radius: 1px;
    }
    .fgOverlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s, visibility .25s;
    }
    .fgDrawer {
        display: block;
        position: fixed;
        z-index: 210;
        background: var(--color-bg);
        overflow-y: auto;
        visibility: hidden;
        transition: opacity .3s ease, visibility .3s;
    }
    .fgDrawer-sheet {
        inset: 0;
        height: 100vh;
        height: 100dvh;
        padding: 72px 24px 32px;
        opacity: 0;
    }
    .fgDrawer a {
        display: block;
        padding: 14px 8px;
        font-size: 1.35rem;
        color: var(--color-text);
        text-decoration: none;
        font-weight: 600;
    }
    .fgDrawer-close {
        position: absolute;
        top: 12px;
        right: 16px;
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
        font-size: 2rem;
        cursor: pointer;
        color: var(--color-text);
    }
    body.nav-open { overflow: hidden; }
    body.nav-open .fgOverlay { display: none; }
    body.nav-open .fgDrawer-sheet { opacity: 1; visibility: visible; }
}

@media (max-width: 768px) {
    :root { --fg-header-h: 64px; }
    .fgHeader-logo img { width: 120px; min-height: 28px; }
    .fgHeader-cta { display: none; }
    .fgBurger { margin-left: auto; }
    .fgHero { padding: 2.25rem 0 2rem; }
    .fgHero-figures { grid-template-columns: 1fr; max-width: none; }
    .fgHero-actions .fgBtn { width: 100%; }
    .fgRank-card { grid-template-columns: 1fr; }
    .fgRank-still { justify-self: start; }
    .fgRank-main { flex-direction: column; }
    .fgNoteLayout { grid-template-columns: 1fr; }
    .fgCookie:not([hidden]) {
        left: 12px;
        right: 12px;
        transform: none;
        width: auto;
        max-width: none;
        border-radius: 18px;
        flex-wrap: wrap;
    }
    .fgCookie p { white-space: normal; }
    .fgCookie .fgBtn { min-height: 44px; width: 100%; }
}

@media (max-width: 480px) {
    .fgGrid { grid-template-columns: 1fr; }
}
