:root {
    --primary: #192641;
    --secondary: #f49222;
    --ink: #222222;
    --muted: #666b70;
    --line: #e9e9e9;
    --soft: #f7f7f7;
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(25, 38, 65, .08);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--white);
}

body {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(18px, 5vw, 70px);
    border-bottom: 1px solid rgba(25, 38, 65, .07);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(18px);
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    background: var(--primary);
    font-weight: 900;
}

.site-brand strong,
.site-brand small {
    display: block;
}

.site-brand strong {
    color: var(--primary);
}

.site-brand small {
    color: var(--muted);
    font-size: 12px;
}

.site-nav {
    display: flex;
    gap: 18px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.hero {
    min-height: 560px;
    display: grid;
    align-items: center;
    padding: 72px clamp(18px, 5vw, 70px);
    background:
        linear-gradient(90deg, rgba(25, 38, 65, .80), rgba(25, 38, 65, .36)),
        url("/assets/img/prime-rehab-placeholder.svg") center / cover no-repeat;
    color: var(--white);
}

.hero-inner {
    width: min(780px, 100%);
}

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

.hero .eyebrow {
    color: #ffffff;
    opacity: .82;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 88px);
    line-height: .98;
    letter-spacing: 0;
    max-width: 880px;
}

.hero p {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .86);
    font-size: 18px;
    line-height: 1.7;
}

.hero-search {
    width: min(580px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 32px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 18px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(16px);
}

.hero-search input,
.hero-search button {
    border: 0;
    border-radius: 13px;
    padding: 14px 16px;
    font: inherit;
}

.hero-search input {
    min-width: 0;
    color: var(--primary);
    outline: none;
}

.hero-search button {
    color: var(--white);
    background: var(--secondary);
    cursor: pointer;
    font-weight: 900;
}

.featured-section,
.content-band,
.related-posts,
.site-footer {
    padding: 62px clamp(18px, 5vw, 70px);
}

.featured-post {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    padding: clamp(18px, 3vw, 34px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.featured-post img,
.card-image img,
.article-image {
    width: 100%;
    object-fit: cover;
    background: var(--soft);
}

.featured-post img {
    aspect-ratio: 16 / 11;
    border-radius: 22px;
}

.category-badge {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--secondary);
    background: rgba(244, 146, 34, .12);
    font-size: 12px;
    font-weight: 900;
}

.featured-post h2 {
    margin: 18px 0 14px;
    color: var(--primary);
    font-size: clamp(30px, 4.5vw, 56px);
    line-height: 1.04;
    letter-spacing: 0;
}

.featured-post p,
.blog-card p {
    color: var(--muted);
    line-height: 1.7;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.category-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.category-strip a {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    background: var(--white);
    font-size: 14px;
    font-weight: 900;
}

.category-strip a.active,
.category-strip a:hover {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
}

.content-band {
    background: var(--soft);
}

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

.blog-card {
    overflow: hidden;
    border: 1px solid rgba(25, 38, 65, .07);
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 16px 42px rgba(25, 38, 65, .05);
    transition: transform .22s ease, box-shadow .22s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.card-image {
    display: block;
}

.card-image img {
    display: block;
    aspect-ratio: 16 / 10;
}

.card-body {
    padding: 22px;
}

.card-body h2 {
    margin: 14px 0 10px;
    color: var(--primary);
    font-size: 24px;
    line-height: 1.16;
    letter-spacing: 0;
}

.card-body p {
    margin: 0;
}

.public-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.public-pagination a {
    min-width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-weight: 900;
}

.public-pagination a.active {
    color: #fff;
    background: var(--secondary);
    border-color: var(--secondary);
}

.article-page {
    background: #fff;
}

.article-hero {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
    gap: clamp(30px, 6vw, 80px);
    align-items: center;
    padding: 70px clamp(18px, 5vw, 70px) 52px;
}

.article-heading h1 {
    margin: 18px 0;
    color: var(--primary);
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1;
    letter-spacing: 0;
}

.article-heading p {
    color: var(--muted);
    font-size: 19px;
    line-height: 1.75;
}

.article-image {
    aspect-ratio: 16 / 11;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.article-shell {
    display: grid;
    grid-template-columns: minmax(0, 920px);
    justify-content: center;
    padding: 28px clamp(18px, 5vw, 70px) 80px;
}

.article-content {
    font-size: 18px;
    line-height: 1.85;
    color: #2f3337;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: 0;
}

.article-content h2 {
    margin-top: 44px;
    font-size: 36px;
}

.article-content h3 {
    margin-top: 34px;
    font-size: 28px;
}

.article-content a {
    color: var(--secondary);
    font-weight: 800;
}

.article-content pre {
    overflow-x: auto;
    margin: 30px 0;
    padding: 22px;
    border-radius: 12px;
    background: #101828;
    color: #f8fafc;
    font-size: 15px;
    line-height: 1.65;
}

.article-content code {
    padding: 3px 6px;
    border-radius: 6px;
    background: #f2f4f7;
    color: var(--primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .92em;
}

.article-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

.article-content blockquote {
    margin: 34px 0;
    padding: 24px 28px;
    border-left: 4px solid var(--secondary);
    border-radius: 0 18px 18px 0;
    background: var(--soft);
    color: var(--primary);
    font-size: 22px;
    line-height: 1.55;
}

.article-content img {
    border-radius: 22px;
    margin: 24px 0;
}

.tag-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 48px;
}

.tag-list span {
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.article-share {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    margin-top: 70px;
    padding-top: 56px;
    border-top: 1px solid var(--line);
}

.article-share h2 {
    margin: 0;
    color: #050505;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 950;
}

.share-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

.share-icons a {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #29313a;
    background: #ffffff;
    transition: color .18s ease, border-color .18s ease, transform .18s ease;
}

.share-icons a:hover {
    color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.share-icons svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.related-posts {
    background: var(--soft);
}

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

.empty-public,
.not-found {
    width: min(760px, calc(100% - 36px));
    margin: 0 auto;
    padding: 90px 0;
    text-align: center;
}

.empty-public h2,
.not-found h1 {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: 0;
}

.empty-public p,
.not-found p {
    color: var(--muted);
    line-height: 1.7;
}

.primary-link {
    display: inline-flex;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 14px;
    color: #fff;
    background: var(--secondary);
    font-weight: 900;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    color: rgba(255, 255, 255, .72);
    background: var(--primary);
}

.site-footer .site-brand strong,
.site-footer .site-brand small {
    color: #fff;
}

.site-footer p {
    max-width: 560px;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-content: start;
    font-weight: 900;
}

@media (max-width: 980px) {
    .featured-post,
    .article-hero {
        grid-template-columns: 1fr;
    }

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

    .article-share {
        grid-template-columns: 1fr;
        justify-items: start;
    }
}

@media (max-width: 680px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        min-height: 520px;
    }

    .hero-search {
        grid-template-columns: 1fr;
    }

    .post-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .featured-section,
    .content-band,
    .related-posts,
    .site-footer {
        padding-top: 44px;
        padding-bottom: 44px;
    }
}

/* BFP-style public blog homepage */
.site-header {
    position: static;
    justify-content: center;
    min-height: 96px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
    backdrop-filter: none;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-logo img {
    width: 213px;
    height: auto;
    display: block;
}

.site-brand,
.site-nav,
.brand-mark {
    display: none;
}

.hero {
    min-height: 430px;
    display: grid;
    place-items: center;
    padding: 68px 24px;
    background: #fffdf5;
    color: #050505;
    text-align: center;
}

.hero-inner {
    width: min(880px, 100%);
    margin: 0 auto;
}

.hero .eyebrow {
    margin-bottom: 22px;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .24em;
}

.hero h1 {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    color: #050505;
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.14;
    font-weight: 900;
    letter-spacing: 0;
}

.hero h1::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -.08em;
    width: min(320px, 44%);
    height: 10px;
    transform: translateX(-50%);
    background: rgba(244, 146, 34, .28);
    z-index: -1;
}

.hero p {
    max-width: 680px;
    margin: 24px auto 0;
    color: #6d747d;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.7;
}

.blog-controls {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 max(24px, calc((100vw - 1400px) / 2));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.blog-controls p {
    margin: 0;
    color: #303236;
    font-size: 16px;
}

.blog-controls strong {
    color: #050505;
}

.blog-controls select {
    min-width: 180px;
    height: 42px;
    padding: 0 40px 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #050505;
    font-size: 16px;
    font-weight: 800;
}

.content-band {
    background: #ffffff;
    padding: 72px 24px 110px;
}

.content-inner {
    width: min(1400px, 100%);
    margin: 0 auto;
}

.clear-filter {
    display: inline-flex;
    margin-bottom: 28px;
    color: var(--primary);
    font-weight: 800;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
    gap: 58px 48px;
    justify-content: center;
}

.blog-card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: none;
}

.blog-card:hover {
    transform: none;
    box-shadow: none;
}

.card-image {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: var(--soft);
}

.card-image img {
    width: 100%;
    aspect-ratio: 16 / 11;
    display: block;
    object-fit: cover;
}

.category-badge {
    position: static;
    padding: 9px 13px;
    border-radius: 5px;
    color: #050505;
    background: var(--secondary);
    font-size: 11px;
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
}

.card-image .category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
}

.card-body {
    padding: 26px 0 0;
}

.card-body time {
    display: block;
    margin-bottom: 14px;
    color: #76808a;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .12em;
}

.card-body h2 {
    margin: 0 0 16px;
    color: #050505;
    font-size: clamp(21px, 2.2vw, 26px);
    line-height: 1.22;
    font-weight: 900;
}

.card-body p {
    margin: 0;
    color: #666666;
    font-size: 16px;
    line-height: 1.68;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: #333333;
    font-size: 15px;
    font-weight: 900;
}

.read-more span {
    color: var(--secondary);
    font-size: 18px;
}

.public-pagination {
    margin-top: 52px;
}

.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 76px;
    padding: 24px;
    color: rgba(255, 255, 255, .82);
    background: #000000;
    text-align: center;
}

.site-footer p {
    max-width: none;
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

@media (max-width: 980px) {
    .hero {
        min-height: 390px;
    }

    .blog-controls {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 28px 24px;
    }

    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 46px 28px;
    }
}

@media (max-width: 680px) {
    .site-header {
        min-height: 84px;
        align-items: center;
    }

    .site-logo img {
        width: 180px;
    }

    .hero {
        min-height: 360px;
        padding: 52px 20px;
    }

    .hero .eyebrow {
        font-size: 12px;
        letter-spacing: .22em;
    }

    .hero p {
        font-size: 18px;
    }

    .content-band {
        padding: 44px 20px 76px;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .card-body h2 {
        font-size: 21px;
    }

    .card-body p {
        font-size: 16px;
    }
}
