:root {
    --ink: #17201c;
    --muted: #60706a;
    --paper: #fbfaf6;
    --panel: #ffffff;
    --line: #e6e0d6;
    --teal: #12746a;
    --teal-dark: #0a4f49;
    --berry: #c83d5a;
    --amber: #f0b23d;
    --mint: #dff3ec;
    --shadow: 0 18px 60px rgba(23, 32, 28, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 54px);
    background: rgba(251, 250, 246, 0.88);
    border-bottom: 1px solid rgba(230, 224, 214, 0.9);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: var(--teal);
    color: #fff;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    background: var(--mint);
    color: var(--teal-dark);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
}

.hero {
    position: relative;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    align-items: center;
    gap: 36px;
    padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 70px) 44px;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 140px;
    background: linear-gradient(0deg, var(--paper), rgba(251, 250, 246, 0));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 710px;
}

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    opacity: 0.54;
}

.hero-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(251, 250, 246, 0.98) 0%, rgba(251, 250, 246, 0.82) 36%, rgba(251, 250, 246, 0.18) 100%);
    z-index: 1;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--berry);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    line-height: 1.08;
}

h1 {
    max-width: 760px;
    font-size: clamp(44px, 7vw, 88px);
}

h2 {
    font-size: clamp(24px, 3vw, 38px);
}

.lead {
    max-width: 680px;
    margin: 24px 0 0;
    color: #39453f;
    font-size: clamp(18px, 2vw, 23px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 1px solid var(--teal);
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
}

.button.primary {
    background: var(--teal);
    color: #fff;
}

.button.ghost {
    background: rgba(255, 255, 255, 0.72);
    color: var(--teal-dark);
}

.hero-stat {
    position: relative;
    z-index: 2;
    align-self: end;
    justify-self: end;
    width: min(320px, 100%);
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-stat strong {
    display: block;
    color: var(--teal-dark);
    font-size: 48px;
    line-height: 1;
}

.hero-stat span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 700;
}

.page-shell,
.tool-band,
.tips-section,
.sources,
.page-nav {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.page-shell {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 22px;
    padding: 34px 0 18px;
}

.side-panel,
.info-card,
.tool-band,
.tip-item,
.sources {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 26px rgba(23, 32, 28, 0.05);
}

.side-panel {
    position: sticky;
    top: 88px;
    height: fit-content;
    padding: 24px;
}

.panel-label {
    margin: 0 0 10px;
    color: var(--teal);
    font-weight: 900;
    text-transform: uppercase;
}

.meter {
    height: 10px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf0ea;
}

.meter span {
    display: block;
    width: var(--level);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), var(--amber), var(--berry));
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.info-card {
    min-height: 260px;
    padding: 24px;
}

.info-card h2 {
    margin-top: 18px;
    font-size: 24px;
}

.info-card p,
.side-panel p,
.tool-band p,
.tip-item p,
.sources li,
.site-footer {
    color: var(--muted);
}

.card-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 70% 30%, var(--amber) 0 18%, transparent 19%),
        linear-gradient(135deg, var(--teal), var(--berry));
}

.tool-band {
    display: grid;
    grid-template-columns: 1fr 360px;
    align-items: center;
    gap: 28px;
    margin-top: 42px;
    padding: clamp(24px, 4vw, 42px);
    background: linear-gradient(135deg, #ffffff 0%, #f3faf6 100%);
}

.sugar-tool {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.sugar-tool label {
    font-weight: 900;
}

.sugar-tool input {
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    font-size: 20px;
    font-weight: 800;
}

.sugar-tool output {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--mint);
    color: var(--teal-dark);
    font-weight: 900;
}

.tips-section {
    padding: 56px 0 22px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.tip-item {
    display: flex;
    gap: 14px;
    padding: 18px;
}

.tip-item span {
    flex: 0 0 auto;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-weight: 900;
}

.tip-item p {
    margin: 2px 0 0;
    font-weight: 700;
}

.sources {
    margin-top: 30px;
    padding: 24px;
}

.sources h2 {
    font-size: 26px;
}

.sources ul {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding-left: 20px;
}

.sources a {
    color: var(--teal-dark);
    font-weight: 800;
}

.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 0 54px;
}

.page-nav a {
    flex: 1;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--teal-dark);
    font-weight: 900;
    text-decoration: none;
}

.page-nav a:last-child {
    text-align: right;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 28px clamp(18px, 5vw, 70px);
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--teal-dark);
    font-weight: 900;
}

@media (max-width: 980px) {
    .site-header {
        align-items: flex-start;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 18px;
        right: 18px;
        top: 66px;
        display: none;
        flex-wrap: wrap;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .hero {
        min-height: 620px;
        grid-template-columns: 1fr;
    }

    .hero-stat {
        justify-self: start;
    }

    .page-shell,
    .tool-band {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }

    .article-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .brand span:last-child {
        white-space: normal;
    }

    .hero {
        min-height: 640px;
        padding-top: 44px;
    }

    .hero-media img {
        object-position: 66% center;
    }

    .hero-media::before {
        background: linear-gradient(90deg, rgba(251, 250, 246, 0.98) 0%, rgba(251, 250, 246, 0.9) 62%, rgba(251, 250, 246, 0.45) 100%);
    }

    h1 {
        font-size: 42px;
    }

    .hero-actions,
    .page-nav,
    .site-footer {
        flex-direction: column;
    }

    .button,
    .page-nav a,
    .page-nav a:last-child {
        width: 100%;
        text-align: left;
    }
}
