/* The Practical Byte — editorial preview */
:root {
    --bg: #f6f8f5;
    --paper: #fff;
    --ink: #102b2a;
    --muted: #536b65;
    --line: #d9e6df;
    --accent: #146d5f;
    --accent-dark: #0f5148;
    --peach: #ffe6cd;
    --mint: #dff3e9;
    --lav: #e9e9ff;
    --blue: #deebf8;
    --shadow: 0 12px 36px rgba(20,45,41,.065);
    --max: 1170px;
    --radius: 20px
}

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

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased
}

a {
    color: var(--accent);
    text-underline-offset: 3px
}

    a:hover {
        color: var(--accent-dark)
    }

img, svg {
    max-width: 100%
}

img {
    display: block;
    max-width: 100%;
    height: auto
}

p {
    margin: 0 0 1.15em
}

h1, h2, h3, h4 {
    line-height: 1.15;
    letter-spacing: -.035em;
    margin: 0 0 .65em;
    font-weight: 790
}

h1 {
    font-size: clamp(2.5rem,5.5vw,5.2rem)
}

h2 {
    font-size: clamp(1.65rem,2.6vw,2.4rem)
}

h3 {
    font-size: 1.24rem
}

ul, ol {
    padding-left: 1.5rem
}

li {
    margin-bottom: .38rem
}

button, input {
    font: inherit
}

::selection {
    background: #c2e5d7;
    color: #07382e
}

.container {
    width: min(var(--max),calc(100% - 44px));
    margin-inline: auto
}

.skip-link {
    position: absolute;
    top: -90px;
    left: 15px;
    background: var(--ink);
    color: #fff;
    padding: 12px;
    z-index: 20
}

    .skip-link:focus {
        top: 10px
    }

.site-header {
    background: rgba(255,255,255,.95);
    border-bottom: 1px solid var(--line)
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 91px
}

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

    .brand:hover {
        color: var(--ink)
    }

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #102b2a;
    color: #54d8b2;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 1.35rem;
    letter-spacing: -.08em
}

.brand-name {
    font-size: 1.15rem;
    letter-spacing: -.055em;
    font-weight: 840
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap
}

    .nav a {
        font-size: .88rem;
        text-decoration: none;
        color: #475851;
        font-weight: 670
    }

        .nav a:hover, .nav a[aria-current="page"] {
            color: var(--accent)
        }

.nav-cta {
    background: var(--ink);
    border-radius: 999px;
    padding: 10px 17px !important;
    color: #fff !important
}

.preview-banner {
    background: #e9efe9;
    border-bottom: 1px solid #cdddcf;
    padding: 10px 0;
    color: #33584a;
    font-size: .76rem;
    font-weight: 710;
    letter-spacing: .035em;
    text-align: center
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .13em;
    font-weight: 800;
    font-size: .72rem;
    color: var(--accent)
}

.section {
    padding-block: 78px
}

.section-tight {
    padding-block: 45px
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px
}

    .section-header h2 {
        margin: 0
    }

    .section-header p {
        color: var(--muted);
        max-width: 610px;
        margin: 8px 0 0
    }

.text-link {
    text-decoration: none;
    font-weight: 770;
    white-space: nowrap
}

.hero {
    padding-block: 74px 66px
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .85fr;
    gap: 36px;
    align-items: stretch
}

.hero-copy {
    padding: 30px 15px 28px 0
}

    .hero-copy h1 {
        max-width: 720px;
        margin: 18px 0 22px
    }

        .hero-copy h1 em {
            color: var(--accent);
            font-style: normal
        }

.lead {
    font-size: 1.16rem;
    color: var(--muted);
    max-width: 610px;
    line-height: 1.77
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 780;
    padding: 13px 22px;
    border-radius: 11px;
    border: 1px solid transparent;
    background: var(--accent);
    color: white;
    font-size: .9rem
}

    .button:hover {
        background: var(--accent-dark);
        color: white
    }

.button-light {
    color: var(--ink);
    background: #fff;
    border-color: var(--line)
}

    .button-light:hover {
        color: var(--accent);
        background: #f1f9f5
    }

.hero-art {
    border-radius: 25px;
    background: #e9efe8;
    overflow: hidden;
    min-height: 430px;
    position: relative;
    display: grid;
    place-items: center
}

    .hero-art img {
        width: 100%;
        height: 100%;
        object-fit: cover
    }

.hero-note {
    position: absolute;
    left: 25px;
    bottom: 25px;
    right: 25px;
    background: #fffefbe8;
    padding: 14px 19px;
    border: 1px solid #fff;
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-weight: 750;
    font-size: .94rem
}

.editorial-row {
    border-block: 1px solid var(--line);
    background: #fff
}

    .editorial-row .container {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        align-items: center;
        padding-block: 17px;
        flex-wrap: wrap
    }

    .editorial-row span {
        font-size: .84rem;
        color: #4f5f5b;
        font-weight: 690
    }

    .editorial-row strong {
        color: var(--ink)
    }

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

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 3px 13px rgba(20,45,41,.018);
    transition: transform .18s ease,border-color .18s ease
}

    .card:hover {
        transform: translateY(-3px);
        border-color: #abcbbd
    }

.card-image {
    background: #e8ece8;
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden
}

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .2s
    }

.card:hover .card-image img {
    transform: scale(1.02)
}

.card-body {
    padding: 24px 24px 23px;
    display: flex;
    flex-direction: column;
    flex: 1
}

    .card-body h3 {
        font-size: 1.35rem;
        margin: .58em 0 .65em;
        line-height: 1.25
    }

        .card-body h3 a {
            color: var(--ink);
            text-decoration: none
        }

            .card-body h3 a:hover {
                color: var(--accent)
            }

    .card-body p {
        color: var(--muted);
        font-size: .91rem;
        line-height: 1.66
    }

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 720
}

    .card-meta .dot {
        opacity: .5
    }

.card-bottom {
    margin-top: auto;
    padding-top: 7px;
    color: var(--accent);
    font-weight: 800;
    font-size: .84rem
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 17px
}

.category-card {
    padding: 26px 23px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    text-decoration: none;
    color: var(--ink);
    min-height: 197px;
    display: flex;
    flex-direction: column;
    align-items: flex-start
}

    .category-card:hover {
        color: var(--ink);
        border-color: #8fbbaa
    }

.category-symbol {
    display: grid;
    place-items: center;
    height: 48px;
    width: 48px;
    border-radius: 13px;
    background: var(--mint);
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 22px
}

.category-card:nth-child(2) .category-symbol {
    background: var(--peach)
}

.category-card:nth-child(3) .category-symbol {
    background: var(--lav)
}

.category-card:nth-child(4) .category-symbol {
    background: var(--blue)
}

.category-card strong {
    font-size: 1.04rem;
    letter-spacing: -.025em
}

.category-card span:last-child {
    font-size: .83rem;
    color: var(--muted);
    margin-top: 7px;
    line-height: 1.5
}

.feature-band {
    background: var(--ink);
    color: white;
    border-radius: 24px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1.1fr .8fr;
    gap: 35px;
    align-items: center
}

    .feature-band .eyebrow {
        color: #99dcc5
    }

    .feature-band h2 {
        max-width: 570px
    }

    .feature-band p {
        color: #c0cfca;
        margin: 0
    }

    .feature-band .button {
        background: #f1e5c9;
        color: var(--ink);
        justify-self: start
    }

        .feature-band .button:hover {
            background: #fff
        }

.site-footer {
    margin-top: 65px;
    background: #102b2a;
    color: #c4cfca;
    padding-block: 52px 25px
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr .7fr;
    gap: 35px
}

.site-footer .brand {
    color: white
}

.site-footer .brand-mark {
    background: #54d8b2;
    color: #102b2a
}

.site-footer p {
    max-width: 420px;
    font-size: .9rem;
    margin-top: 18px
}

.footer-links {
    display: grid;
    gap: 8px
}

    .footer-links a {
        color: #cbdad4;
        text-decoration: none;
        font-size: .87rem
    }

        .footer-links a:hover {
            color: #fff
        }

.site-footer h3 {
    color: white;
    font-size: .9rem;
    letter-spacing: 0
}

.footer-bottom {
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid #38524a;
    font-size: .78rem;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap
}

.page-hero {
    padding-top: 61px;
    padding-bottom: 37px
}

    .page-hero h1 {
        max-width: 850px;
        font-size: clamp(2.5rem,4.5vw,4.4rem);
        margin: 14px 0 18px
    }

    .page-hero p {
        font-size: 1.12rem;
        max-width: 720px;
        color: var(--muted)
    }

.list-with-intro {
    border-top: 1px solid var(--line)
}

    .list-with-intro .cards {
        padding-top: 28px
    }

.article-header {
    padding: 63px 0 35px
}

    .article-header h1 {
        font-size: clamp(2.45rem,4.7vw,4.7rem);
        max-width: 940px;
        margin: 14px 0 18px
    }

.article-deck {
    max-width: 800px;
    color: #586963;
    font-size: 1.2rem;
    line-height: 1.7
}

.article-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-size: .82rem;
    color: #53625f;
    font-weight: 680;
    margin-top: 22px
}

.article-figure {
    border-radius: 22px;
    overflow: hidden;
    background: #e9f3ec;
    margin-bottom: 42px
}

.article-chart {
    margin: 32px 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f0f5f2
}

    .article-chart img {
        display: block;
        width: 100%;
        height: auto
    }

.ppi-chart {
    padding: 22px
}

    .ppi-chart figcaption {
        padding: 0 0 18px;
        color: #2c3d38;
        font-size: 1rem;
        font-weight: 760
    }

.ppi-bars {
    display: grid;
    gap: 16px
}

.ppi-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
    color: #2c3d38;
    font-size: .88rem;
    font-weight: 700
}

.ppi-bar-track {
    height: 18px;
    overflow: hidden;
    border: 1px solid #c8d7cf;
    border-radius: 999px;
    background: #fff
}

.ppi-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent)
}

.article-photo-credit,
.article-image-credits {
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.55
}

.article-photo-credit {
    margin: -28px 4px 42px
}

.article-author {
    margin-top: 18px
}

    .article-figure img {
        width: 100%;
        height: auto;
        max-height: 450px;
        object-fit: cover
    }

    .article-copy .article-figure {
        margin: 32px 0;
        background: #f0f5f2
    }

    .article-copy .article-figure img {
        display: block;
        max-height: none;
        object-fit: contain
    }

    .article-copy figcaption {
        padding: 12px 15px;
        color: var(--muted);
        font-size: .82rem;
        line-height: 1.5
    }

.article-layout {
    display: grid;
    grid-template-columns: 230px minmax(0,735px);
    gap: 70px;
    align-items: start
}

    .article-layout > div {
        min-width: 0
    }

.article-aside {
    position: sticky;
    top: 30px;
    border-top: 3px solid var(--accent);
    padding-top: 18px
}

    .article-aside h2 {
        font-size: .86rem;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--muted);
        margin-bottom: 16px
    }

    .article-aside nav {
        display: grid;
        gap: 11px
    }

    .article-aside a {
        text-decoration: none;
        color: #4e635c;
        font-size: .86rem;
        line-height: 1.4
    }

        .article-aside a:hover {
            color: var(--accent)
        }

.article-copy {
    font-size: 1.04rem;
    color: #2c3d38;
    line-height: 1.84
}

    .article-copy h2 {
        margin-top: 2em;
        font-size: 1.87rem
    }

    .article-copy h3 {
        margin-top: 1.7em
    }

    .article-copy > p:first-child {
        font-size: 1.09rem
    }

    .article-copy a {
        overflow-wrap: anywhere
    }

.takeaway {
    background: #e8f4ec;
    border-left: 4px solid var(--accent);
    padding: 23px 26px;
    border-radius: 0 14px 14px 0;
    margin: 24px 0 35px
}

    .takeaway p {
        margin: 8px 0 0
    }

.table-wrap {
    overflow-x: auto;
    margin: 20px 0 31px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff
}

.article-copy table {
    border-collapse: collapse;
    width: 100%;
    font-size: .91rem;
    line-height: 1.48;
    text-align: left
}

.article-copy caption {
    text-align: left;
    padding: 15px 17px;
    font-weight: 740;
    color: var(--muted);
    font-size: .8rem
}

.article-copy th, .article-copy td {
    padding: 13px 17px;
    border-top: 1px solid var(--line);
    vertical-align: top
}

.article-copy th {
    font-weight: 760
}

.article-copy thead {
    background: #f0f5f2
}

.source-note {
    margin: 45px 0 25px;
    background: #f0f2ed;
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid var(--line);
    font-size: .89rem
}

    .source-note h2 {
        font-size: 1.15rem !important;
        margin: 0 0 12px !important
    }

    .source-note p:last-child {
        margin: 0
    }

.article-end {
    margin: 35px 0;
    padding: 25px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 18px
}

    .article-end h3 {
        margin-bottom: 10px
    }

    .article-end p {
        color: var(--muted);
        font-size: .9rem
    }

.content-page {
    padding: 68px 0 18px
}

    .content-page h1 {
        font-size: clamp(2.6rem,4.5vw,4.15rem);
        margin: 14px 0 20px
    }

.prose {
    max-width: 790px;
    font-size: 1.03rem;
    color: #30433b
}

    .prose h2 {
        margin-top: 40px;
        font-size: 1.65rem
    }

    .prose p, .prose li {
        line-height: 1.82
    }

.info-notice {
    padding: 17px 20px;
    border: 1px solid #d6e2d6;
    background: #ebf3e8;
    border-radius: 13px;
    font-size: .9rem
}

.empty-state {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 20px;
    padding: 36px
}

    .empty-state p {
        color: var(--muted)
    }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    font-size: .8rem;
    color: var(--muted)
}

    .breadcrumbs a {
        text-decoration: none
    }

.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 100px;
    padding: 6px 12px;
    background: #e4f2ec;
    color: #146654;
    font-size: .74rem;
    font-weight: 800
}

.divider {
    height: 1px;
    background: var(--line);
    margin-block: 30px
}

.related {
    margin-top: 68px;
    border-top: 1px solid var(--line);
    padding-top: 40px
}

    .related .cards {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

.notfound {
    text-align: center;
    padding: 110px 0
}

    .notfound h1 {
        margin-bottom: 14px
    }

    .notfound p {
        color: var(--muted);
        font-size: 1.1rem
    }

    .notfound .button {
        margin-top: 12px
    }

a:focus-visible {
    outline: 3px solid #f59d5a;
    outline-offset: 4px;
    border-radius: 3px
}

@media(max-width:1050px) {
    .hero-grid {
        grid-template-columns: 1fr 0.9fr
    }

    .nav {
        gap: 13px
    }

    .cards {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .categories-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .article-layout {
        grid-template-columns: 175px minmax(0,1fr);
        gap: 40px
    }
}

@media(max-width:760px) {
    .container {
        width: min(var(--max),calc(100% - 30px))
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 16px;
        gap: 14px
    }

    .nav {
        gap: 15px
    }

        .nav a {
            font-size: .8rem
        }

    .nav-cta {
        display: none
    }

    .hero {
        padding: 38px 0
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .hero-copy {
        padding: 0
    }

    .hero-art {
        min-height: 250px
    }

    .hero-note {
        bottom: 15px;
        left: 15px;
        right: 15px
    }

    .section {
        padding-block: 52px
    }

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

    .feature-band {
        grid-template-columns: 1fr;
        padding: 32px
    }

    .article-layout {
        display: block;
        width: 100%;
        min-width: 0
    }

    .article-layout > *,
    .article-copy,
    .article-copy .table-wrap,
    .article-copy .article-figure {
        width: 100%;
        max-width: 100%;
        min-width: 0
    }

    .article-copy .cards {
        grid-template-columns: minmax(0,1fr)
    }

    .article-aside {
        position: static;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        padding: 16px 0;
        margin-bottom: 12px
    }

        .article-aside nav {
            display: flex;
            overflow-x: auto;
            white-space: nowrap;
            gap: 16px;
            padding-bottom: 8px
        }

    .article-header {
        padding: 35px 0 25px
    }

    .article-figure {
        margin-bottom: 27px
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr
    }

        .footer-grid > div:first-child {
            grid-column: 1/-1
        }
}

@media(max-width:540px) {
    .cards, .related .cards, .categories-grid {
        grid-template-columns: minmax(0,1fr)
    }

    .card-body {
        padding: 21px
    }

    .category-card {
        min-height: 160px
    }

    .hero-copy h1 {
        font-size: 2.7rem
    }

    .hero-art {
        min-height: 225px
    }

    .editorial-row .container {
        gap: 8px
    }

    .section-header h2 {
        font-size: 1.7rem
    }

    .article-copy {
        font-size: 1rem
    }

        .article-copy h2 {
            font-size: 1.55rem
        }

    .footer-grid {
        grid-template-columns: 1fr
    }

        .footer-grid > div:first-child {
            grid-column: auto
        }

    .site-footer {
        margin-top: 40px
    }

    .feature-band {
        padding: 26px
    }

    .button {
        width: 100%
    }

    .hero-actions {
        flex-direction: column
    }

    .page-hero {
        padding: 38px 0 20px
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    *, *::before, *::after {
        transition: none !important;
        animation: none !important
    }
}

/* Approved-logo candidate: transparent monogram with legible live-text wordmark. */
.brand-icon {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex: none
}

.site-footer .brand-icon {
    background: #f6f8f5;
    border-radius: 10px;
    padding: 4px
}

@media(max-width:540px) {
    .brand-icon {
        width: 40px;
        height: 40px
    }
}

.consent-panel {
    position: fixed;
    z-index: 1000;
    right: 20px;
    bottom: 20px;
    left: 20px;
    max-width: 920px;
    margin: auto;
    padding: 20px;
    border: 1px solid #bfd6cc;
    border-radius: 18px;
    background: #fffdf7;
    box-shadow: 0 18px 55px rgba(16,43,42,.22)
}

    .consent-panel[hidden] {
        display: none
    }

.consent-panel__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px
}

.consent-panel h2 {
    margin: 0 0 8px;
    font-size: 22px
}

.consent-panel p {
    margin: 0;
    max-width: 650px;
    color: #35524d
}

.consent-panel__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px
}

.consent-panel button {
    font: inherit;
    cursor: pointer
}

.consent-decline, .privacy-choices {
    padding: 10px 14px;
    border: 1px solid #0b695b;
    border-radius: 999px;
    background: #fff;
    color: #0b695b;
    font-weight: 700
}

.privacy-choices {
    position: fixed;
    z-index: 999;
    right: 16px;
    bottom: 16px;
    background: #fffdf7;
    box-shadow: 0 6px 20px rgba(16,43,42,.16)
}

@media(max-width:720px) {
    .consent-panel__inner {
        align-items: stretch;
        flex-direction: column
    }

    .consent-panel__actions {
        flex-direction: column
    }

        .consent-panel__actions .button, .consent-panel__actions button {
            width: 100%;
            text-align: center
        }
}
