/* ============================================================
   SafeShelf — Global Design System
   Applies to: all pages (homepage, blog, articles, about,
               how-it-works, privacy, terms, etc.)

   Palette:   Deep Forest Green · Warm Cream · Gold
   Fonts:     Instrument Serif (display) + DM Sans (body)
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   0. GOOGLE FONTS IMPORT
   Add this to <head> before this stylesheet:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@300;400;500;600;700&display=swap" rel="stylesheet">
   ──────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ──────────────────────────────────────────────────────────── */
:root {
    /* Brand colours */
    --forest: #0A3D2E;
    --forest-mid: #155740;
    --forest-light: #1E7A55;
    --sage: #4CAF7D;
    --sage-light: #A8D5B8;
    --cream: #FAFAF5;
    --cream-dark: #F0EFE7;
    --gold: #C9A227;
    --gold-light: #E8C547;
    --charcoal: #1A1A1A;
    --slate: #4A5568;
    --muted: #8B9BB0;

    /* Semantic colours */
    --danger: #D4202A;
    --danger-bg: #FFF0F0;
    --warn: #E07B00;
    --warn-bg: #FFF8EC;
    --safe: #1E7A55;
    --safe-bg: #EDFAF3;

    /* Surfaces */
    --white: #FFFFFF;
    --border: #E2E8E4;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(10, 61, 46, .06), 0 1px 2px rgba(10, 61, 46, .04);
    --shadow-md: 0 4px 12px rgba(10, 61, 46, .08), 0 2px 6px rgba(10, 61, 46, .05);
    --shadow-lg: 0 10px 30px rgba(10, 61, 46, .12), 0 4px 12px rgba(10, 61, 46, .08);
    --shadow-xl: 0 20px 60px rgba(10, 61, 46, .16);

    /* Radii */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 999px;

    /* Layout */
    --max-w: 1200px;
    --max-w-text: 820px;
    --nav-h: 68px;
}

/* ────────────────────────────────────────────────────────────
     2. RESET & BASE
     ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
video {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

button {
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

/* ────────────────────────────────────────────────────────────
     3. TYPOGRAPHY
     ──────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
    font-family: 'Instrument Serif', Georgia, serif;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--charcoal);
}

h1 {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
}

h4 {
    font-size: 1.1rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    letter-spacing: 0;
}

h5 {
    font-size: .95rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    letter-spacing: 0;
}

p {
    line-height: 1.7;
    color: var(--slate);
}

strong {
    font-weight: 700;
    color: var(--charcoal);
}

/* Prose — long-form text in articles / legal pages */
.prose p {
    margin-bottom: 1.2em;
}

.prose h2 {
    margin: 2em 0 .6em;
    color: var(--forest);
}

.prose h3 {
    margin: 1.6em 0 .5em;
    color: var(--forest-mid);
}

.prose ul,
.prose ol {
    margin: 1em 0 1em 1.5em;
    list-style: revert;
    color: var(--slate);
}

.prose li {
    margin-bottom: .45em;
    line-height: 1.65;
}

.prose a {
    color: var(--forest-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose a:hover {
    color: var(--forest);
}

.prose blockquote {
    border-left: 4px solid var(--sage);
    padding: 12px 20px;
    margin: 1.5em 0;
    background: var(--safe-bg);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--forest-mid);
    font-style: italic;
}

.prose code {
    background: var(--cream-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .88em;
    color: var(--forest);
}

/* ────────────────────────────────────────────────────────────
     4. ACCESSIBILITY
     ──────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    background: var(--forest);
    color: white;
    padding: 10px 16px;
    border-radius: var(--r-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    z-index: 10001;
    transition: top .25s ease;
}

.skip-link:focus {
    top: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ────────────────────────────────────────────────────────────
     5. LAYOUT CONTAINERS
     ──────────────────────────────────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.container-text {
    max-width: var(--max-w-text);
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 72px 24px;
}

.section-sm {
    padding: 48px 24px;
}

.section-lg {
    padding: 96px 24px;
}

.section-tag {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--forest-light);
    margin-bottom: 10px;
}

.section-tag--light {
    color: var(--sage);
}

.section-title {
    font-family: 'Instrument Serif', serif;
    color: var(--forest);
    margin-bottom: 12px;
}

.section-title--white {
    color: white;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--slate);
    max-width: 560px;
    line-height: 1.65;
    margin-bottom: 0;
}

.section-sub--white {
    color: rgba(255, 255, 255, .68);
}

.text-center {
    text-align: center;
}

.text-center .section-sub {
    margin-left: auto;
    margin-right: auto;
}

/* ────────────────────────────────────────────────────────────
     6. NAVIGATION
     ──────────────────────────────────────────────────────────── */
.navbar {
    background: var(--forest);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .18);
    height: var(--nav-h);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    height: 36px;
    width: auto;
}

.nav-logo-text {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.35rem;
    color: var(--cream);
    letter-spacing: -.01em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-links a {
    color: rgba(250, 250, 245, .78);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    transition: background .2s, color .2s;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, .13);
    color: white;
}

.nav-links a.active {
    background: rgba(255, 255, 255, .15);
    color: white;
}

/* CTA button inside nav */
.btn-nav {
    background: var(--gold) !important;
    color: var(--forest) !important;
    font-weight: 700 !important;
    padding: 8px 18px !important;
}

.btn-nav:hover {
    background: var(--gold-light) !important;
    transform: translateY(-1px);
}
/* Auth nav items */
.nav-auth-guest { display: flex; align-items: center; gap: 6px; }
.nav-auth-user  { display: flex; align-items: center; gap: 8px; }
 
.btn-nav-ghost {
    color: rgba(250,250,245,.78) !important;
    font-size: .9rem !important;
    font-weight: 500 !important;
    padding: 8px 14px !important;
    border-radius: var(--r-pill) !important;
    text-decoration: none;
    transition: background .2s, color .2s;
    border: 1.5px solid rgba(255,255,255,.25) !important;
    background: transparent !important;
}
.btn-nav-ghost:hover {
    background: rgba(255,255,255,.12) !important;
    color: white !important;
    transform: none !important;
}
 
.nav-user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 6px;
    border-radius: var(--r-pill);
    background: rgba(255,255,255,.12);
    border: 1.5px solid rgba(255,255,255,.2);
    cursor: pointer; text-decoration: none;
    transition: background .2s;
}
.nav-user-chip:hover { background: rgba(255,255,255,.2); }
.nav-user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--gold); color: var(--forest);
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; font-weight: 700; flex-shrink: 0;
}
.nav-user-name {
    font-size: .84rem; font-weight: 600;
    color: white; max-width: 100px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* Hamburger */
.nav-mobile-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

/* Nav dropdown */
.nav-links li {
    position: relative;
}

.nav-tools-toggle {
    cursor: pointer;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: var(--r-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
    border: 1px solid var(--border);
    min-width: 220px;
    padding: 8px;
    list-style: none;
    z-index: 1000;
}

.nav-dropdown.open {
    display: block;
}

.nav-dropdown li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    text-decoration: none;
    color: var(--charcoal);
    transition: background .2s;
}

.nav-dropdown li a:hover {
    background: var(--cream);
}

.nav-dropdown .dropdown-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.nav-dropdown strong {
    display: block;
    font-size: .9rem;
    color: var(--charcoal);
}

.nav-dropdown small {
    font-size: .75rem;
    color: var(--muted);
}

/* Footer partner pills */
.footer-partner-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    transition: all .2s;
}

.footer-partner-pill:hover {
    background: rgba(255, 255, 255, .15);
    color: white;
}

/* ────────────────────────────────────────────────────────────
     7. PAGE HERO (inner pages — not homepage)
     ──────────────────────────────────────────────────────────── */
.page-hero {
    background: linear-gradient(160deg, var(--forest) 0%, var(--forest-mid) 60%, #0F2D24 100%);
    padding: 64px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 70% 30%, rgba(78, 175, 125, .15) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(201, 162, 39, .1) 0%, transparent 50%);
    pointer-events: none;
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-w-text);
    margin: 0 auto;
}

.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 162, 39, .18);
    border: 1px solid rgba(201, 162, 39, .4);
    color: var(--gold-light);
    font-size: .75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 18px;
}

.page-hero h1 {
    font-family: 'Instrument Serif', serif;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.page-hero p {
    color: rgba(250, 250, 245, .72);
    font-size: 1.1rem;
    max-width: 540px;
    margin: 0 auto 24px;
}

/* Breadcrumbs inside page-hero */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    font-size: .82rem;
    color: rgba(255, 255, 255, .55);
    margin-top: 20px;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    transition: color .2s;
}

.breadcrumbs a:hover {
    color: white;
}

.breadcrumbs-sep {
    color: rgba(255, 255, 255, .3);
}

/* Wave divider after hero */
.wave-divider {
    display: block;
    width: 100%;
    height: 52px;
    margin-top: -1px;
}

/* ────────────────────────────────────────────────────────────
     8. CONTENT CARD (white panel that lifts off background)
     ──────────────────────────────────────────────────────────── */
.content-card {
    background: white;
    border-radius: var(--r-xl);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.content-card--sm {
    padding: 28px 32px;
    border-radius: var(--r-lg);
}

/* Overlapping lift effect (overlap the bottom of page-hero) */
.card-lift {
    margin-top: -48px;
    position: relative;
    z-index: 2;
}

/* ────────────────────────────────────────────────────────────
     9. BUTTONS
     ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--r-pill);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all .25s ease;
    white-space: nowrap;
    line-height: 1;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--gold);
    color: var(--forest);
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 39, .35);
}

.btn-forest {
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(10, 61, 46, .28);
}

.btn-forest:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(10, 61, 46, .38);
}

.btn-ghost {
    background: rgba(255, 255, 255, .1);
    color: white;
    border: 1px solid rgba(255, 255, 255, .22);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .2);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--forest);
    border: 2px solid var(--forest);
}

.btn-outline:hover {
    background: var(--forest);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 9px 18px;
    font-size: .88rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ────────────────────────────────────────────────────────────
     10. FEATURE CARDS GRID
     ──────────────────────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: var(--r-lg);
    padding: 28px;
    transition: background .3s, transform .3s;
}

.feature-card:hover {
    background: rgba(255, 255, 255, .12);
    transform: translateY(-4px);
}

/* Light variant (on cream/white backgrounds) */
.feature-card--light {
    background: var(--cream);
    border: 1px solid var(--border);
}

.feature-card--light:hover {
    background: var(--cream-dark);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 14px;
    display: block;
}

.feature-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: .88rem;
    line-height: 1.55;
}

/* On dark section */
.section--dark .feature-title {
    color: white;
}

.section--dark .feature-desc {
    color: rgba(255, 255, 255, .6);
}

/* ────────────────────────────────────────────────────────────
     11. BLOG CARDS GRID
     ──────────────────────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.blog-card {
    background: white;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .3s, box-shadow .3s;
    display: flex;
    flex-direction: column;
}

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

.blog-card-thumb {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
    color: white;
    flex-shrink: 0;
}

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

.blog-card-meta {
    font-size: .78rem;
    color: var(--muted);
    font-weight: 500;
}

.blog-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.35;
}

.blog-card-excerpt {
    font-size: .88rem;
    color: var(--slate);
    line-height: 1.55;
    flex: 1;
}

.blog-card-cta {
    font-size: .85rem;
    font-weight: 700;
    color: var(--forest-light);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Category badge on blog card thumb */
.blog-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--gold);
    color: var(--forest);
    font-size: .7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ────────────────────────────────────────────────────────────
     12. ARTICLE LAYOUT (individual article/blog post pages)
     ──────────────────────────────────────────────────────────── */
.article-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.article-container {
    background: white;
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    margin-bottom: 32px;
}

.article-hero-img {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
    color: white;
    position: relative;
}

.article-badge {
    position: absolute;
    top: 22px;
    left: 22px;
    background: var(--gold);
    color: var(--forest);
    font-size: .72rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.article-body {
    padding: 48px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: .88rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    color: var(--charcoal);
    margin-bottom: 14px;
    line-height: 1.15;
}

.article-subtitle {
    font-size: 1.1rem;
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: 32px;
    font-style: italic;
}

/* Table of contents */
.toc {
    background: var(--cream);
    border-left: 4px solid var(--forest-light);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    padding: 24px 28px;
    margin: 32px 0;
}

.toc-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--forest-light);
    margin-bottom: 14px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-list a {
    font-size: .9rem;
    color: var(--slate);
    text-decoration: none;
    padding: 4px 0;
    display: block;
    transition: color .2s, padding-left .2s;
}

.toc-list a:hover {
    color: var(--forest);
    padding-left: 6px;
}

.toc-list .toc-sub {
    padding-left: 16px;
    font-size: .85rem;
}

/* Article section */
.article-section {
    margin-bottom: 40px;
}

.article-section h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.55rem;
    color: var(--forest);
    margin-bottom: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 28px;
    margin-top: 8px;
}

.article-section h3 {
    font-size: 1.15rem;
    color: var(--forest-mid);
    margin: 20px 0 10px;
}

.article-section p {
    color: var(--slate);
    margin-bottom: 14px;
    line-height: 1.7;
}

.article-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.article-section ul li {
    padding: 8px 12px 8px 14px;
    position: relative;
    color: var(--slate);
    font-size: .95rem;
    line-height: 1.55;
}

.article-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--forest-light);
}

/* Highlight / callout box */
.callout {
    border-radius: var(--r-md);
    padding: 18px 22px;
    margin: 24px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.callout--info {
    background: var(--safe-bg);
    border-left: 4px solid var(--safe);
}

.callout--warn {
    background: var(--warn-bg);
    border-left: 4px solid var(--warn);
}

.callout--danger {
    background: var(--danger-bg);
    border-left: 4px solid var(--danger);
}

.callout-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.callout p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.6;
}

.callout strong {
    display: block;
    margin-bottom: 4px;
}

/* Author bio */
.author-bio {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--cream);
    border-radius: var(--r-lg);
    padding: 28px;
    margin-top: 40px;
    border: 1px solid var(--border);
}

.author-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    background: var(--forest);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.author-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--forest);
    margin-bottom: 6px;
    font-family: 'DM Sans', sans-serif;
}

.author-info p {
    font-size: .88rem;
    color: var(--slate);
    line-height: 1.6;
    margin: 0;
}

.author-info a {
    color: var(--forest-light);
    font-weight: 600;
    text-decoration: none;
}

.author-info a:hover {
    text-decoration: underline;
}

/* Back navigation */
.back-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.back-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--forest-light);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--r-pill);
    background: white;
    border: 1px solid var(--border);
    transition: all .2s;
}

.back-nav a:hover {
    background: var(--forest);
    color: white;
    border-color: var(--forest);
}

/* ────────────────────────────────────────────────────────────
     13. FAQ ACCORDION
     ──────────────────────────────────────────────────────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: white;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: .97rem;
    font-weight: 600;
    color: var(--charcoal);
    transition: background .2s;
}

.faq-q:hover {
    background: var(--cream);
}

.faq-arrow {
    color: var(--forest-light);
    flex-shrink: 0;
    font-size: 1rem;
    transition: transform .3s ease;
    font-style: normal;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .3s ease;
    padding: 0 24px;
    font-size: .93rem;
    color: var(--slate);
    line-height: 1.7;
}

.faq-item.open .faq-a {
    max-height: 400px;
    padding: 0 24px 22px;
}

/* ────────────────────────────────────────────────────────────
     14. SCORE / ANALYSIS RESULTS (used on homepage + any result page)
     ──────────────────────────────────────────────────────────── */
.score-ring {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-family: 'Instrument Serif', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .15);
}

.score-ring.high {
    background: linear-gradient(135deg, #1E7A55, #4CAF7D);
}

.score-ring.medium {
    background: linear-gradient(135deg, #E07B00, #F5A623);
}

.score-ring.low {
    background: linear-gradient(135deg, #D4202A, #E85D5D);
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.result-card {
    background: white;
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.result-card.full {
    grid-column: 1 / -1;
}

.ing-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    margin-bottom: 6px;
}

.ing-item.high {
    background: var(--danger-bg);
}

.ing-item.medium {
    background: var(--warn-bg);
}

.ing-item.low {
    background: var(--safe-bg);
}

.ing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.high .ing-dot {
    background: var(--danger);
}

.medium .ing-dot {
    background: var(--warn);
}

.low .ing-dot {
    background: var(--safe);
}

.ing-badge {
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    margin-left: auto;
    align-self: flex-start;
    white-space: nowrap;
}

.high .ing-badge {
    background: var(--danger);
    color: white;
}

.medium .ing-badge {
    background: var(--warn);
    color: white;
}

.low .ing-badge {
    background: var(--safe);
    color: white;
}

/* ────────────────────────────────────────────────────────────
     15. TAGS / PILLS
     ──────────────────────────────────────────────────────────── */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: var(--cream-dark);
    color: var(--forest);
    font-size: .8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--r-pill);
}

.tag--green {
    background: var(--safe-bg);
    color: var(--safe);
}

.tag--orange {
    background: var(--warn-bg);
    color: var(--warn);
}

.tag--red {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ────────────────────────────────────────────────────────────
     16. DISCLAIMER / NOTICE STRIPS
     ──────────────────────────────────────────────────────────── */
.disclaimer {
    background: var(--warn-bg);
    border-left: 3px solid var(--warn);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    font-size: .82rem;
    color: #7A4500;
    line-height: 1.55;
}

.disclaimer strong {
    color: #7A4500;
}

.notice--safe {
    background: var(--safe-bg);
    border-left: 3px solid var(--safe);
    border-radius: var(--r-sm);
    padding: 14px 18px;
    font-size: .88rem;
    color: var(--forest);
}

/* ────────────────────────────────────────────────────────────
     17. STEP ITEMS (how-it-works, onboarding)
     ──────────────────────────────────────────────────────────── */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.step-item:last-child {
    border-bottom: none;
}

.step-num {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--forest);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-title {
    font-size: .97rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 5px;
}

.step-desc {
    font-size: .88rem;
    color: var(--slate);
    line-height: 1.55;
}

/* Numbered list variant */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.step-card {
    background: white;
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
}

.step-card-num {
    font-family: 'Instrument Serif', serif;
    font-size: 3rem;
    color: var(--cream-dark);
    line-height: 1;
    margin-bottom: 12px;
    font-weight: 700;
}

.step-card h4 {
    font-size: .97rem;
    color: var(--forest);
    margin-bottom: 8px;
}

.step-card p {
    font-size: .88rem;
    color: var(--slate);
    line-height: 1.55;
}

/* ────────────────────────────────────────────────────────────
     18. STAT COUNTERS
     ──────────────────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--r-md);
    padding: 20px;
    text-align: center;
}

.stat-card--light {
    background: var(--cream);
    border-color: var(--border);
}

.stat-num {
    font-family: 'Instrument Serif', serif;
    font-size: 2.4rem;
    color: white;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card--light .stat-num {
    color: var(--forest);
}

.stat-label {
    font-size: .78rem;
    color: rgba(255, 255, 255, .55);
    font-weight: 500;
}

.stat-card--light .stat-label {
    color: var(--muted);
}

/* ────────────────────────────────────────────────────────────
     19. LOADING SPINNER
     ──────────────────────────────────────────────────────────── */
.spinner-ring {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid var(--cream-dark);
    border-top-color: var(--forest);
    animation: spin .9s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ────────────────────────────────────────────────────────────
     20. DARK SECTION
     ──────────────────────────────────────────────────────────── */
.section--dark {
    background: var(--forest);
}

.section--dark .section-tag {
    color: var(--sage);
}

.section--dark .section-title {
    color: white;
}

.section--dark .section-sub {
    color: rgba(255, 255, 255, .65);
}

.section--dark p {
    color: rgba(255, 255, 255, .65);
}

/* ────────────────────────────────────────────────────────────
     21. CHARCOAL / FOOTER SECTION
     ──────────────────────────────────────────────────────────── */
footer,
.section--charcoal {
    background: var(--charcoal);
    color: rgba(255, 255, 255, .55);
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 52px 24px 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-brand-name {
    font-family: 'Instrument Serif', serif;
    font-size: 1.25rem;
    color: white;
}

.footer-about {
    font-size: .84rem;
    line-height: 1.65;
    max-width: 260px;
    color: rgba(255, 255, 255, .5);
}

.footer-col-title {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a {
    color: rgba(255, 255, 255, .48);
    text-decoration: none;
    font-size: .84rem;
    transition: color .2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    font-size: .8rem;
    color: rgba(255, 255, 255, .38);
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, .4);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
}

/* ────────────────────────────────────────────────────────────
     22. LEGAL / PRIVACY / TERMS PAGE LAYOUT
     ──────────────────────────────────────────────────────────── */
.legal-body {
    max-width: 780px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.legal-body h2 {
    font-family: 'Instrument Serif', serif;
    color: var(--forest);
    font-size: 1.45rem;
    margin: 2.4em 0 .6em;
    padding-top: .8em;
    border-top: 1px solid var(--border);
}

.legal-body h2:first-of-type {
    border-top: none;
    margin-top: .5em;
}

.legal-body h3 {
    color: var(--forest-mid);
    font-size: 1.1rem;
    margin: 1.6em 0 .5em;
}

.legal-body p {
    color: var(--slate);
    margin-bottom: 1em;
    line-height: 1.75;
}

.legal-body ul {
    list-style: disc;
    margin: .8em 0 .8em 1.5em;
    color: var(--slate);
}

.legal-body ul li {
    margin-bottom: .4em;
    line-height: 1.65;
}

.legal-body a {
    color: var(--forest-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-body strong {
    color: var(--charcoal);
}

.legal-last-updated {
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 32px;
    display: block;
}

.highlight-box {
    background: var(--safe-bg);
    border-left: 4px solid var(--safe);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 14px 18px;
    margin: 20px 0;
    font-size: .9rem;
    color: var(--forest);
}

/* ────────────────────────────────────────────────────────────
     23. ABOUT PAGE — MISSION, VALUES, TIMELINE
     ──────────────────────────────────────────────────────────── */
.mission-grid,
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.mission-card,
.value-card {
    background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
    border-radius: var(--r-lg);
    padding: 32px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform .3s, box-shadow .3s;
}

.mission-card:hover,
.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.mission-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
    display: block;
}

.mission-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--forest);
    margin-bottom: 10px;
}

.mission-text {
    font-size: .9rem;
    color: var(--slate);
    line-height: 1.6;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 36px;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--forest);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--forest);
}

.timeline-year {
    font-size: .78rem;
    font-weight: 700;
    color: var(--forest-light);
    letter-spacing: .06em;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 6px;
}

.timeline-desc {
    font-size: .88rem;
    color: var(--slate);
    line-height: 1.55;
}

/* ────────────────────────────────────────────────────────────
     24. HOW-IT-WORKS — TECH GRID
     ──────────────────────────────────────────────────────────── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 36px;
}

.tech-card {
    background: white;
    border-radius: var(--r-lg);
    padding: 28px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform .3s, box-shadow .3s;
}

.tech-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.tech-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
}

.tech-card h4 {
    font-size: .97rem;
    color: var(--forest);
    margin-bottom: 8px;
}

.tech-card p {
    font-size: .86rem;
    color: var(--slate);
    line-height: 1.55;
}

/* ────────────────────────────────────────────────────────────
     25. UPLOAD ZONE (homepage + any analysis page)
     ──────────────────────────────────────────────────────────── */
.upload-zone {
    border: 2.5px dashed var(--sage-light);
    border-radius: var(--r-lg);
    padding: 44px 24px;
    text-align: center;
    cursor: pointer;
    background: var(--cream);
    transition: all .3s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--forest-light);
    background: rgba(30, 122, 85, .04);
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-zone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.upload-zone-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 6px;
}

.upload-zone-sub {
    font-size: .84rem;
    color: var(--muted);
}

/* ────────────────────────────────────────────────────────────
     26. ANIMATIONS
     ──────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

.anim-fade-up {
    animation: fadeInUp .7s ease both;
}

.anim-fade-in {
    animation: fadeIn .6s ease both;
}

.anim-delay-1 {
    animation-delay: .1s;
}

.anim-delay-2 {
    animation-delay: .2s;
}

.anim-delay-3 {
    animation-delay: .35s;
}

/* ────────────────────────────────────────────────────────────
     27. RESPONSIVE — TABLET  (≤ 1024px)
     ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .footer-grid>*:last-child {
        display: none;
    }

    /* hide 4th col on tablet */
    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* ────────────────────────────────────────────────────────────
     28. RESPONSIVE — MOBILE  (≤ 768px)
     ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Nav */
    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--forest);
        padding: 12px 16px 20px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
        z-index: 899;
    }

    .nav-links.open a {
        width: 100%;
        padding: 12px 16px;
        border-radius: var(--r-sm);
    }

    .nav-mobile-btn {
        display: block;
    }

    /* Hero */
    .page-hero {
        padding: 48px 20px 60px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    /* Content card */
    .content-card {
        padding: 28px 20px;
        border-radius: var(--r-lg);
    }

    .card-lift {
        margin-top: -28px;
    }

    /* Article */
    .article-body {
        padding: 28px 20px;
    }

    .article-title {
        font-size: 1.7rem;
    }

    .article-hero-img {
        height: 180px;
        font-size: 3.5rem;
    }

    /* Grids */
    .features-grid,
    .blog-grid,
    .mission-grid,
    .values-grid,
    .tech-grid {
        grid-template-columns: 1fr;
    }

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

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

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

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    /* Legal */
    .legal-body {
        padding: 40px 20px 64px;
    }

    /* Sections */
    .section {
        padding: 52px 20px;
    }

    .section-sm {
        padding: 36px 20px;
    }

    .section-lg {
        padding: 64px 20px;
    }
}

/* ────────────────────────────────────────────────────────────
     29. RESPONSIVE — SMALL MOBILE  (≤ 480px)
     ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .step-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .author-bio {
        flex-direction: column;
    }

    .back-nav {
        flex-direction: column;
    }

    .score-ring {
        width: 110px;
        height: 110px;
        font-size: 2.2rem;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .content-card {
        padding: 22px 16px;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ────────────────────────────────────────────────────────────
     30. CONTACT PAGE
     ──────────────────────────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

.contact-card {
    text-align: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--charcoal);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    background: var(--cream);
    transition: border-color .2s;
    outline: none;
    color: var(--charcoal);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--forest-light);
}

.form-textarea {
    resize: vertical;
}

/* ────────────────────────────────────────────────────────────
     31. INLINE PAGE OVERRIDES
     (for old templates that set their own body background)
     ──────────────────────────────────────────────────────────── */

/* Reset any inline gradient backgrounds on body that old templates set */
body.page-old {
    background: var(--cream) !important;
}

/* ────────────────────────────────────────────────────────────
     32. HOW-IT-WORKS PAGE SPECIFICS
     ──────────────────────────────────────────────────────────── */
.hiw-section {
    background: white;
    border-radius: var(--r-xl);
    padding: 48px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 28px;
}

.hiw-section h2 {
    font-family: 'Instrument Serif', serif;
    color: var(--forest);
    font-size: 1.7rem;
    margin-bottom: 14px;
}

.hiw-section h3 {
    color: var(--forest-mid);
    font-size: 1.1rem;
    margin: 20px 0 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
}

.hiw-section p {
    color: var(--slate);
    line-height: 1.7;
    margin-bottom: 10px;
}

.hiw-section ul {
    list-style: disc;
    margin: 8px 0 8px 20px;
    color: var(--slate);
}

.hiw-section ul li {
    margin-bottom: 4px;
    line-height: 1.6;
}

.score-factor {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    background: var(--cream);
    border-radius: var(--r-md);
    margin-bottom: 10px;
}

.score-factor-pct {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    color: var(--forest);
    min-width: 60px;
    font-weight: 700;
}

.score-factor-title {
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.score-factor-desc {
    font-size: .87rem;
    color: var(--slate);
    line-height: 1.5;
}

.score-band {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    margin-bottom: 8px;
    font-size: .9rem;
}

.score-band-range {
    font-family: 'Instrument Serif', serif;
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 70px;
}

.score-band.excellent {
    background: var(--safe-bg);
}

.score-band.good {
    background: #EAF8EF;
}

.score-band.fair {
    background: var(--warn-bg);
}

.score-band.poor {
    background: #FFF3E0;
}

.score-band.very-poor {
    background: var(--danger-bg);
}

.score-band.excellent .score-band-range {
    color: var(--safe);
}

.score-band.good .score-band-range {
    color: #2E9D5E;
}

.score-band.fair .score-band-range {
    color: var(--warn);
}

.score-band.poor .score-band-range {
    color: #D4620A;
}

.score-band.very-poor .score-band-range {
    color: var(--danger);
}

/* ────────────────────────────────────────────────────────────
     33. ABOUT PAGE SPECIFICS
     ──────────────────────────────────────────────────────────── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 36px;
}

.team-member {
    background: white;
    border-radius: var(--r-lg);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform .3s, box-shadow .3s;
}

.team-member:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--forest), var(--forest-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 14px;
}

.team-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.team-role {
    font-size: .82rem;
    color: var(--forest-light);
    font-weight: 600;
    margin-bottom: 8px;
}

.team-bio {
    font-size: .84rem;
    color: var(--slate);
    line-height: 1.55;
}

/* ────────────────────────────────────────────────────────────
     34. BLOG PAGE SPECIFICS
     ──────────────────────────────────────────────────────────── */
.blog-featured {
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
    border-radius: var(--r-xl);
    padding: 48px;
    margin-bottom: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-featured::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, .08) 0%, transparent 60%);
}

.blog-featured-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.blog-featured-cat {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 12px;
}

.blog-featured-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: white;
    line-height: 1.2;
    margin-bottom: 14px;
}

.blog-featured-desc {
    color: rgba(255, 255, 255, .78);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.blog-featured-meta {
    font-size: .82rem;
    color: rgba(255, 255, 255, .55);
    margin-bottom: 24px;
}

.blog-featured-emoji {
    font-size: 4rem;
    position: absolute;
    right: 48px;
    bottom: 32px;
    opacity: .3;
}

/* Blog listing intro */
.blog-intro {
    background: white;
    border-radius: var(--r-xl);
    padding: 36px 40px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
}

.blog-intro h2 {
    color: var(--forest);
    margin-bottom: 12px;
}

.blog-intro p {
    color: var(--slate);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ────────────────────────────────────────────────────────────
     35. PRIVACY / TERMS PAGES
     ──────────────────────────────────────────────────────────── */
.legal-toc {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.legal-toc-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--forest-light);
    margin-bottom: 12px;
}

.legal-toc ol {
    margin: 0;
    padding-left: 18px;
}

.legal-toc li {
    margin-bottom: 6px;
    font-size: .88rem;
}

.legal-toc a {
    color: var(--slate);
    text-decoration: none;
    transition: color .2s;
}

.legal-toc a:hover {
    color: var(--forest);
}

/* ────────────────────────────────────────────────────────────
     36. NAVBAR ACTIVE STATE HELPER
     (JS sets this via data-page matching)
     ──────────────────────────────────────────────────────────── */
.nav-links a[data-active="true"] {
    background: rgba(255, 255, 255, .15);
    color: white;
}

/* ────────────────────────────────────────────────────────────
     37. CTA BANNER (reusable across pages)
     ──────────────────────────────────────────────────────────── */
.cta-banner {
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
    border-radius: var(--r-xl);
    padding: 56px 48px;
    text-align: center;
    margin: 60px 0;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .1) 0%, transparent 60%);
}

.cta-banner>* {
    position: relative;
    z-index: 1;
}

.cta-banner h2 {
    font-family: 'Instrument Serif', serif;
    color: white;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: 12px;
}

.cta-banner p {
    color: rgba(255, 255, 255, .75);
    font-size: 1.05rem;
    margin-bottom: 28px;
}

.cta-banner .btn-primary {
    font-size: 1.05rem;
    padding: 15px 32px;
}

@media (max-width: 768px) {
    .cta-banner {
        padding: 40px 24px;
        margin: 40px 0;
    }

    .hiw-section {
        padding: 28px 20px;
        border-radius: var(--r-lg);
    }

    .blog-featured {
        padding: 28px 24px;
    }

    .blog-featured-emoji {
        display: none;
    }

    .blog-intro {
        padding: 24px 20px;
        border-radius: var(--r-lg);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}
/* Premium, Elegant Cards */
.elegant-feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border);
}
.elegant-feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.elegant-feature-card h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    color: var(--charcoal);
    margin-bottom: 12px;
}
.elegant-feature-card p {
    color: var(--slate);
    font-size: 0.95rem;
    line-height: 1.6;
}
/* Subtle borders instead of harsh bright colors */
.border-red { border-top: 3px solid var(--danger); }
.border-green { border-top: 3px solid var(--safe); }
.border-gold { border-top: 3px solid var(--gold); }

.elegant-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.danger-icon { background: var(--danger-bg); color: var(--danger); }
.safe-icon { background: var(--safe-bg); color: var(--safe); }
/* ────────────────────────────────────────────────────────────
   39. PREMIUM EDITORIAL ARTICLE STYLING
   ──────────────────────────────────────────────────────────── */
   .article-wrap {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 24px;
}

.article-container {
    background: var(--white);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.article-header {
    text-align: center;
    padding: 60px 40px 30px;
    background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--border);
}

.article-header h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    color: var(--forest);
    margin: 20px 0;
    line-height: 1.1;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--slate);
    font-size: 0.9rem;
    font-weight: 500;
}

.article-body {
    padding: 50px 60px;
}

/* Beautiful Editorial Images */
.editorial-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--r-md);
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
}

/* Enhancing the Typography */
.prose h2 {
    font-size: 2rem;
    color: var(--forest);
    margin: 2em 0 0.8em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--cream-dark);
}

.prose p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 1.5em;
}

@media (max-width: 768px) {
    .article-header { padding: 40px 20px 20px; }
    .article-body { padding: 30px 20px; }
    .prose p { font-size: 1.05rem; }
}
/* ────────────────────────────────────────────────────────────
   38. DISCOVER / LOOKBOOK GALLERY  ← FULL REPLACEMENT
   (/discover page — community scan gallery)
   ──────────────────────────────────────────────────────────── */

/* ── Filter bar ───────────────────────────────────────────── */
.discover-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    margin-bottom: 20px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 18px;
    border-radius: var(--r-pill);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .01em;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--slate);
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.filter-chip:hover {
    border-color: var(--forest-light);
    color: var(--forest-light);
    box-shadow: 0 0 0 3px rgba(30, 122, 85, .08);
}

.filter-chip:focus-visible {
    outline: 2px solid var(--forest-light);
    outline-offset: 2px;
}

.filter-chip--active {
    background: var(--forest);
    color: var(--cream);
    border-color: var(--forest);
    box-shadow: 0 2px 8px rgba(10, 61, 46, .2);
}

/* ── Scan count line ──────────────────────────────────────── */
.discover-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 20px;
    padding: 6px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
}

.discover-count strong {
    color: var(--forest);
    font-weight: 700;
}

/* ── Gallery grid ─────────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 4px;
}

/* ── Gallery card ─────────────────────────────────────────── */
.gallery-card {
    background: var(--white);
    border: 1px solid var(--border);       /* ← was truncated, now complete */
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
    -webkit-tap-highlight-color: transparent;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ── Image area ───────────────────────────────────────────── */
.gallery-img-wrapper {
    width: 100%;
    height: 200px;
    min-height: 200px;          /* prevents collapse when image fails */
    background: var(--cream-dark);
    position: relative;         /* ← CRITICAL: anchors the score badge */
    overflow: hidden;
    flex-shrink: 0;
}

/* Subtle gradient overlay so the score badge is always readable */
.gallery-img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.0) 50%,
        rgba(0,0,0,.18) 100%
    );
    pointer-events: none;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.03);
}

/* ── Score badge ──────────────────────────────────────────── */
.gallery-score {
    position: absolute;         /* ← must be inside position:relative wrapper */
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .88rem;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.28);
    z-index: 2;                 /* above image and gradient overlay */
    line-height: 1;
    border: 2px solid rgba(255,255,255,.35);
}

.score-excellent { background: var(--safe);         }
.score-good      { background: var(--forest-light); }
.score-fair      { background: var(--warn);         }
.score-poor      { background: var(--danger);       }

/* ── Card content area ────────────────────────────────────── */
.gallery-content {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gallery-cat {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    color: var(--forest-light);
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.gallery-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.35;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CTA styled as a small pill-link, not a bare underline */
.gallery-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--forest-light);
    padding: 5px 0;
    border-top: 1px solid var(--border);
    transition: color .18s, gap .18s;
}

.gallery-card:hover .gallery-cta {
    color: var(--forest);
    gap: 8px;
}

/* ── Mobile adjustments ───────────────────────────────────── */
@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);  /* force 2-col on phones */
        gap: 12px;
    }

    .gallery-img-wrapper {
        height: 140px;
        min-height: 140px;
    }

    .gallery-score {
        width: 36px;
        height: 36px;
        font-size: .78rem;
        top: 8px;
        right: 8px;
    }

    .gallery-content {
        padding: 10px 12px 12px;
    }

    .gallery-title {
        font-size: .88rem;
    }

    .gallery-cat {
        font-size: .62rem;
    }

    .gallery-cta {
        font-size: .72rem;
    }

    .discover-filters {
        margin-top: 24px;
        gap: 6px;
    }

    .filter-chip {
        padding: 7px 14px;
        font-size: .76rem;
    }
}
/* ── Fallback state when Cloudinary image fails to load ─────
   Added by onerror: this.classList.add('gallery-img--fallback')
   ──────────────────────────────────────────────────────────── */
   .gallery-img--fallback {
    object-fit: contain;
    padding: 24px;
    background: var(--cream-dark);
    opacity: .6;
}
 /* ────────────────────────────────────────────────────────────
   SECTION 39 — MOBILE NAV AUTH ITEMS
   ──────────────────────────────────────────────────────────── */

/* Mobile nav uses .active (not .open) — already in CSS but ensure it's here */
@media (max-width: 768px) {
    .nav-links.active {
      display: flex;
      flex-direction: column;
      position: absolute;
      top: var(--nav-h);
      left: 0;
      right: 0;
      background: var(--forest);
      padding: 12px 16px 24px;
      box-shadow: 0 8px 24px rgba(0,0,0,.22);
      z-index: 899;
    }
    .nav-links.active li,
    .nav-links.active #navAuthArea,
    .nav-links.active #navCta {
      width: 100%;
    }
  
    /* Auth guest: stack Sign In + Register vertically, full width */
    .nav-auth-guest {
      flex-direction: column;
      gap: 8px;
      width: 100%;
    }
    .nav-auth-guest .btn-nav-ghost,
    .nav-auth-guest .btn-nav {
      display: block !important;
      width: 100% !important;
      text-align: center !important;
      padding: 11px 16px !important;
      border-radius: var(--r-sm) !important;
      font-size: .92rem !important;
      box-sizing: border-box;
    }
  
    /* Auth user: stack avatar chip + sign out vertically */
    .nav-auth-user {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      width: 100%;
    }
    .nav-user-chip {
      width: 100%;
      padding: 10px 14px;
      border-radius: var(--r-sm);
      box-sizing: border-box;
    }
    .nav-user-name { max-width: none; }
    .nav-auth-user > button {
      width: 100% !important;
      text-align: left !important;
      padding: 9px 14px !important;
      font-size: .88rem !important;
      border-radius: var(--r-sm) !important;
      background: rgba(255,255,255,.08) !important;
      color: rgba(255,255,255,.65) !important;
    }
    #navAuthArea { width: 100%; }
  }
  
  /* ────────────────────────────────────────────────────────────
     SECTION 40 — REGISTER PAGE MOBILE
     ──────────────────────────────────────────────────────────── */
  @media (max-width: 768px) {
    /* Single column layout */
    .auth-layout {
      grid-template-columns: 1fr !important;
    }
    .auth-left {
      padding: 32px 22px !important;
      /* Compact the left panel — just show title + 3 icon bullets */
    }
    .auth-right {
      padding: 32px 22px !important;
    }
    /* Hide long description text — keep icon + title only */
    .auth-benefit-desc {
      display: none;
    }
    .auth-benefit {
      margin-bottom: 10px;
      gap: 10px;
    }
    .auth-benefit-icon {
      width: 34px;
      height: 34px;
      font-size: .95rem;
      flex-shrink: 0;
    }
    .auth-benefit-title {
      font-size: .88rem;
    }
    /* Hide the padlock note on mobile */
    .auth-left > div:last-child {
      display: none;
    }
  }
  
  /* ────────────────────────────────────────────────────────────
     SECTION 41 — HOW-IT-WORKS MOBILE
     ──────────────────────────────────────────────────────────── */
  @media (max-width: 768px) {
    .hiw-section {
      padding: 24px 16px !important;
      margin-bottom: 20px;
    }
    .hiw-section h2 {
      font-size: 1.35rem !important;
    }
  
    /* All 2-col grids inside hiw-section → 1 col */
    .hiw-section > div[style*="grid-template-columns: 1fr 1fr"],
    .hiw-section > div[style*="grid-template-columns:1fr 1fr"] {
      grid-template-columns: 1fr !important;
      gap: 12px !important;
    }
  
    /* Step grid → 1 col */
    .step-grid {
      grid-template-columns: 1fr !important;
      gap: 16px;
    }
    .step-card {
      padding: 20px 18px !important;
    }
  
    /* Score bands — tighter on small screen */
    .score-band {
      padding: 8px 10px;
      font-size: .85rem;
    }
    .score-band-range {
      min-width: 58px !important;
      font-size: 1rem;
    }
  
    /* Data handling flex items */
    .hiw-section > div[style*="flex-direction:column"] > div {
      flex-direction: column;
      gap: 8px;
    }
  
    /* CTA banner buttons */
    .cta-banner div[style*="display:flex"] {
      flex-direction: column;
      align-items: center;
    }
  
    /* Privacy grid inside hiw-section → 1 col */
    .hiw-section ul {
      padding-left: 14px;
    }
  }
  
  /* ────────────────────────────────────────────────────────────
     SECTION 42 — HOMEPAGE COMPARISON TABLE MOBILE
     ──────────────────────────────────────────────────────────── */
  @media (max-width: 600px) {
    /* The without/with account comparison grid */
    div[style*="grid-template-columns: 1fr 1fr"][style*="max-width: 900px"],
    div[style*="grid-template-columns:1fr 1fr"][style*="gap: 24px"] {
      grid-template-columns: 1fr !important;
    }
    /* The 3 real-examples callout grid */
    div[style*="minmax(260px, 1fr)"] {
      grid-template-columns: 1fr !important;
    }
  }
  
  /* ────────────────────────────────────────────────────────────
     SECTION 43 — FOOTER LOGO RATIO
     ──────────────────────────────────────────────────────────── */
  .footer-brand img {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    min-height: 28px;
    object-fit: contain !important;
    flex-shrink: 0;
  }
  
  /* ────────────────────────────────────────────────────────────
     SECTION 44 — HOW-IT-WORKS 2-COL GRID CLASS (mobile collapse)
     ──────────────────────────────────────────────────────────── */
  @media (max-width: 640px) {
    .hiw-2col-grid {
      grid-template-columns: 1fr !important;
      gap: 10px !important;
    }
  }