/* ════════════════════════════════════════════════════════════
   FINATEO — Shared stylesheet
   Design system: "The Ledger" v3
   · Warm paper, bottle-green ink, sealing-wax terracotta accent
   · Bands/bars: translucent bottle green (rgba(22,56,44,0.05))
   · Spectral (display) + Inter (body) + IBM Plex Mono (labels/figures)
   · Motifs: ruled ledger lines, wax margin rule, stamped buttons
   · Per-page accents: see [data-page] overrides below
   ════════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
    /* core palette — bottle green & sealing wax */
    --paper: #F4F1E8;
    --paper-2: #EEEADC;
    --ink: #20221C;
    --green: #16382C;
    --green-deep: #0E2A20;
    --seal: #B34A1F;
    --seal-bright: #D2702F;
    --muted-tone: #5C5E54;
    --rule: #E2DCCC;
    --card-tone: #FBF9F2;
    --status-green: #2E7D4F;

    /* translucent bottle-green bands */
    --band: rgba(22, 56, 44, 0.05);
    --band-border: rgba(22, 56, 44, 0.13);

    /* aliases kept so existing pages keep working */
    --bg: var(--paper);
    --text: var(--ink);
    --navy: var(--green);
    --navy-deep: var(--green-deep);
    --gold: var(--seal);
    --gold-light: var(--seal-bright);
    --muted: var(--muted-tone);
    --border: var(--rule);
    --card: var(--card-tone);
    --green-status: var(--status-green);
    --amber: var(--seal);

    /* type */
    --serif: 'Spectral', Georgia, serif;
    --sans: 'Inter', -apple-system, sans-serif;
    --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* ── PER-PAGE ACCENTS ──────────────────────────────────────────
   Base + type stay constant site-wide; only the accent shifts,
   driven off <body data-page="…"> so it lives in one place. */
body[data-page="north-macedonia"] { --seal: #C2622A; --seal-bright: #DD8A47; }   /* clay — destination warmth */
body[data-page="insights"],
body[data-page="insights-article"],
body[data-page="about"]            { --seal: #9A6E2A; --seal-bright: #C29A4E; }   /* brass — calm, reading-led */
body[data-page="services-ssc"],
body[data-page="portal"]           { --seal: #6E7314; --seal-bright: #A7AD33; }   /* warm olive — systems & ops */

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    font-feature-settings: 'tnum' 1; /* tabular numbers — it's a finance site */
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* faint paper grain — adds tactility without color noise */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

::selection { background: var(--seal); color: #fff; }

/* ── NAV ── */
nav.site-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.15rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(22, 56, 44, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--band-border);
    transition: box-shadow 0.3s;
}

nav.site-nav.scrolled { box-shadow: 0 2px 24px rgba(25,23,19,0.08); }

.logo {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--green);
    text-decoration: none;
    display: flex;
    align-items: baseline;
}

.logo .logo-dot { color: #B34A1F; }

.nav-links { display: flex; gap: 2.1rem; align-items: center; }

.nav-links > a, .nav-dropdown > a {
    font-family: var(--sans);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    position: relative;
}

.nav-links > a::after, .nav-dropdown > a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--seal);
    transition: width 0.3s;
}

.nav-links > a:hover::after, .nav-dropdown > a:hover::after { width: 100%; }
.nav-links > a.active::after, .nav-dropdown > a.active::after { width: 100%; }

.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: default; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-tone);
    border: 1px solid var(--rule);
    border-top: 2px solid var(--green);
    box-shadow: 0 8px 40px rgba(25,23,19,0.1);
    padding: 0.8rem 0;
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -16px; left: 0; right: 0; height: 16px;
}

.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; }

.dropdown-menu a {
    display: block;
    font-family: var(--sans);
    padding: 0.65rem 1.5rem;
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    text-transform: none;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.2s;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    color: var(--seal);
    background: var(--paper);
    padding-left: 2rem;
}

.dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--rule);
    margin: 0.5rem 1.5rem;
}

.dropdown-menu .dropdown-group-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.56rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--seal);
    padding: 0.5rem 1.5rem 0.2rem;
}

.nav-cta {
    padding: 0.55rem 1.3rem;
    background: var(--green);
    color: #fff !important;
    border: 1px solid var(--green);
    transition: all 0.25s;
}

.nav-cta:hover { background: var(--seal); border-color: var(--seal); }
.nav-cta::after { display: none !important; }

.nav-portal { color: #6E7314 !important; font-weight: 600 !important; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 0.5rem;
    z-index: 1100;
}

.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--green); transition: all 0.3s; }

/* ── SHARED TYPOGRAPHY / SECTIONS ── */
.section-tag {
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--seal);
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-tag::before {
    content: '';
    display: inline-block;
    width: 26px;
    height: 1px;
    background: var(--seal);
}

.section-title {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-size: clamp(2.4rem, 4.2vw, 3.9rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.022em;
    color: var(--green);
    max-width: 640px;
}

.section-title em { font-style: italic; font-weight: 500; color: var(--seal); }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4.5rem;
}

.section-count {
    font-family: var(--mono);
    font-size: 4.5rem;
    font-weight: 400;
    color: var(--green);
    opacity: 0.1;
    line-height: 1;
}

.lead {
    font-size: 0.97rem;
    line-height: 1.9;
    color: var(--muted-tone);
    max-width: 620px;
}

/* ── BUTTONS — stamped ── */
.btn-primary, .btn-outline, .btn-gold {
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    text-decoration: none;
    display: inline-block;
    padding: 0.9rem 2.2rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.25s, color 0.25s, border-color 0.25s;
    cursor: pointer;
}

.btn-primary { background: var(--green); color: #fff; border: 1px solid var(--green); }
.btn-outline { background: transparent; color: var(--green); border: 1px solid var(--green); font-weight: 500; }
.btn-gold { background: var(--seal); color: #fff; border: 1px solid var(--seal); }

.btn-primary:hover, .btn-outline:hover, .btn-gold:hover {
    transform: translate(-3px, -3px);
    box-shadow: 5px 5px 0 var(--seal);
}
.btn-primary:active, .btn-outline:active, .btn-gold:active {
    transform: translate(0, 0);
    box-shadow: 1px 1px 0 var(--seal);
}
.btn-outline:hover { box-shadow: 5px 5px 0 var(--green); }
.btn-gold:hover { box-shadow: 5px 5px 0 var(--green); }

/* variants on band sections */
.on-dark .btn-primary { background: var(--seal); border-color: var(--seal); color: #fff; }
.on-dark .btn-primary:hover { box-shadow: 3px 3px 0 rgba(22,56,44,0.25); }
.on-dark .btn-outline { color: var(--green); border-color: rgba(22,56,44,0.35); }
.on-dark .btn-outline:hover { border-color: var(--green); box-shadow: 3px 3px 0 rgba(22,56,44,0.18); }

/* ── PAGE HERO (interior pages) — ruled ledger paper ── */
.page-hero {
    padding: 11rem 4rem 5rem;
    position: relative;
    overflow: hidden;
}

.page-hero-grid {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 39px,
        rgba(25, 23, 19, 0.055) 39px,
        rgba(25, 23, 19, 0.055) 40px
    );
    mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
    pointer-events: none;
}

/* the accountant's red margin line */
.page-hero-grid::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: clamp(1.1rem, 2.2vw, 2.2rem);
    width: 1px;
    background: var(--seal);
    opacity: 0.3;
}

.page-hero > * { position: relative; }

.breadcrumb {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-tone);
    margin-bottom: 2rem;
}

.breadcrumb a { color: var(--muted-tone); text-decoration: none; }
.breadcrumb a:hover { color: var(--seal); }
.breadcrumb span { color: var(--seal); }

.page-hero h1 {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-size: clamp(2.9rem, 5.2vw, 5.2rem);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.028em;
    color: var(--green);
    max-width: 860px;
}

.page-hero h1 em { font-style: italic; font-weight: 500; color: var(--seal); }

.page-hero .lead { margin-top: 1.8rem; }

.page-hero-cta { display: flex; gap: 1.2rem; margin-top: 2.8rem; flex-wrap: wrap; }

/* ── BAND PAGE HERO (95% transparent navy) ── */
.page-hero.dark { background: var(--band); }
.page-hero.dark h1 { color: var(--green); }
.page-hero.dark h1 em { color: var(--seal); }
.page-hero.dark .lead { color: var(--muted-tone); }
.page-hero.dark .breadcrumb, .page-hero.dark .breadcrumb a { color: var(--muted-tone); }
.page-hero.dark .breadcrumb span { color: var(--seal); }
.page-hero.dark .page-hero-grid {
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 39px,
        rgba(22, 56, 44, 0.06) 39px,
        rgba(22, 56, 44, 0.06) 40px
    );
}
.page-hero.dark .page-hero-grid::after { background: var(--seal); opacity: 0.4; }

/* ── GENERIC SECTION SPACING ── */
.section { padding: 7rem 4rem; }
.section.tight { padding: 5rem 4rem; }
.section.white { background: var(--card-tone); }
.section.dark { background: var(--band); }
.section.dark .section-title { color: var(--green); }
.section.dark .section-title em { color: var(--seal); }
.section.dark .section-tag { color: var(--seal); }
.section.dark .section-tag::before { background: var(--seal); }
.section.dark .lead { color: var(--muted-tone); }
.section.deep { background: var(--band); }

/* ── DARK ANCHOR SECTION (.invert) — the premium contrast moment ── */
.section.invert {
    background: var(--green);
    color: #E7E1D3;
    position: relative;
    overflow: hidden;
}
.section.invert > * { position: relative; }
.section.invert .section-title,
.section.invert h2 { color: #F8F5EC; }
.section.invert .section-title em,
.section.invert h2 em { color: var(--seal-bright); }
.section.invert .section-tag { color: var(--seal-bright); }
.section.invert .section-tag::before { background: var(--seal-bright); }
.section.invert .section-count { color: #F4F1E8; opacity: 0.12; }
.section.invert .lead,
.section.invert .prose p { color: rgba(244, 241, 232, 0.74); }
.section.invert .prose strong { color: #F8F5EC; }
.section.invert .btn-primary { background: var(--seal); border-color: var(--seal); color: #fff; }
.section.invert .btn-primary:hover { box-shadow: 5px 5px 0 rgba(244, 241, 232, 0.28); }
.section.invert .btn-outline { color: #F4F1E8; border-color: rgba(244, 241, 232, 0.42); }
.section.invert .btn-outline:hover { border-color: #F4F1E8; box-shadow: 5px 5px 0 rgba(244, 241, 232, 0.2); }

/* ── CARD GRIDS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); }

.card {
    background: var(--card-tone);
    padding: 3rem 2.6rem;
    position: relative;
    overflow: hidden;
    transition: background 0.35s, transform 0.35s ease, box-shadow 0.35s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    z-index: 0;
}

/* journal margin: red rule grows down the left edge on hover */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: var(--seal);
    transition: height 0.4s ease;
}

.card:hover {
    background: #FFFEF9;
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -22px rgba(14, 42, 32, 0.45);
    z-index: 2;
}
.card:hover::after { height: 100%; }

.card-num {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--seal);
    margin-bottom: 1.3rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 1.1rem;
    color: var(--green);
}

.card p { font-size: 0.86rem; line-height: 1.8; color: var(--muted-tone); }

.card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.8rem;
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    transition: gap 0.3s, color 0.3s;
}

.card:hover .card-arrow { gap: 0.9rem; color: var(--seal); }

.card-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--seal);
    border: 1px solid var(--seal);
    padding: 0.3rem 0.7rem;
    margin-bottom: 1.2rem;
}

/* ── TWO-COLUMN CONTENT ── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.two-col .sticky-label { position: sticky; top: 8rem; }

.prose p {
    font-size: 0.95rem;
    line-height: 1.92;
    color: var(--muted-tone);
    margin-bottom: 1.5rem;
    max-width: 640px;
}

.prose strong { color: var(--green); font-weight: 600; }

.section.dark .prose p { color: var(--muted-tone); }
.section.dark .prose strong { color: var(--green); }

/* ── DELIVERABLES / CHECK LISTS ── */
.list-heading {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--seal);
    font-weight: 600;
    margin: 2.4rem 0 1.2rem;
}

.deliverables { list-style: none; display: flex; flex-direction: column; gap: 0; counter-reset: ledger; }

.deliverables li {
    font-size: 0.89rem;
    color: var(--muted-tone);
    line-height: 1.7;
    padding: 0.85rem 0 0.85rem 2.6rem;
    position: relative;
    border-bottom: 1px solid var(--rule);
    counter-increment: ledger;
}

.deliverables li:first-child { border-top: 1px solid var(--rule); }

/* ledger entry numbers instead of bullets */
.deliverables li::before {
    content: counter(ledger, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.95rem;
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--seal);
}

.deliverables li strong { color: var(--green); font-weight: 600; }

.section.dark .deliverables li { color: var(--muted-tone); border-color: var(--band-border); }
.section.dark .deliverables li::before { color: var(--seal); }
.section.dark .deliverables li strong { color: var(--green); }

/* ── STAT / AUTHORITY STRIP ── */
.authority-strip {
    background: var(--paper-2);
    border-top: 1px solid var(--band-border);
    border-bottom: 1px solid var(--band-border);
    padding: 3rem 4rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.authority-item {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    padding: 0 3.4rem;
    border-right: 1px solid var(--band-border);
}

.authority-item:last-child { border-right: none; }

.authority-num {
    font-family: var(--mono);
    font-size: 2.7rem;
    font-weight: 500;
    color: var(--green);
    line-height: 0.95;
    letter-spacing: -0.01em;
}

.authority-text {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-tone);
    line-height: 1.6;
}

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; position: relative; }

.timeline::before {
    content: '';
    position: absolute;
    left: 1.1rem;
    top: 1.1rem;
    bottom: 1.1rem;
    width: 1px;
    background: var(--rule);
}

.timeline-item { display: flex; gap: 1.8rem; align-items: flex-start; padding-bottom: 2.5rem; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    width: 2.2rem; height: 2.2rem; min-width: 2.2rem;
    border: 1px solid var(--rule);
    background: var(--paper);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--seal);
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.timeline-item:hover .timeline-dot { background: var(--green); border-color: var(--green); color: var(--paper); }

.timeline-content h4 {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--green);
    margin-bottom: 0.4rem;
    padding-top: 0.3rem;
}

.timeline-content p { font-size: 0.84rem; color: var(--muted-tone); line-height: 1.72; }

/* ── CTA BAND ── */
.cta-band {
    padding: 7rem 4rem;
    background: var(--band);
    border-top: 1px solid var(--band-border);
    text-align: center;
    position: relative;
    overflow: hidden;
}


.cta-band > * { position: relative; }

.cta-band .section-tag { color: var(--seal); justify-content: center; }
.cta-band .section-tag::before { background: var(--seal); }

.cta-band h2 {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-size: clamp(2.5rem, 4.8vw, 4.4rem);
    font-weight: 400;
    color: var(--green);
    margin: 1rem auto 1.5rem;
    max-width: 720px;
    line-height: 1.06;
    letter-spacing: -0.022em;
}

.cta-band h2 em { font-style: italic; font-weight: 500; color: var(--seal); }

.cta-band p {
    font-size: 0.95rem;
    color: var(--muted-tone);
    max-width: 520px;
    margin: 0 auto 3rem;
    line-height: 1.85;
}

.cta-band-buttons { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }

/* ── PILLS ── */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }

.pill {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--green);
    border: 1px solid var(--rule);
    background: var(--card-tone);
    padding: 0.5rem 0.9rem;
}

/* ── ARTICLES ── */
.article-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-tone);
    margin-bottom: 1.6rem;
}

.article-meta .pillar { color: var(--seal); font-weight: 600; }

.article-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 5rem 2rem 7rem;
}

.article-body p {
    font-size: 1rem;
    line-height: 1.95;
    color: #393530;
    margin-bottom: 1.7rem;
}

.article-body h2 {
    font-family: var(--serif);
    font-size: 1.85rem;
    font-weight: 500;
    color: var(--green);
    margin: 3.2rem 0 1.4rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.article-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
    margin: 2.4rem 0 1rem;
}

.article-body ul, .article-body ol { margin: 0 0 1.7rem 1.4rem; }

.article-body li {
    font-size: 0.97rem;
    line-height: 1.85;
    color: #393530;
    margin-bottom: 0.7rem;
}

.article-body blockquote {
    border-left: 2px solid var(--seal);
    padding: 0.4rem 0 0.4rem 1.8rem;
    margin: 2.5rem 0;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.55;
    color: var(--green);
}

.article-body .framework-box {
    background: var(--card-tone);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--seal);
    padding: 2.2rem 2.4rem;
    margin: 2.5rem 0;
}

.article-body .framework-box h4 {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--seal);
    margin-bottom: 1.2rem;
}

.article-body .framework-box p, .article-body .framework-box li { font-size: 0.92rem; }
.article-body .framework-box ol, .article-body .framework-box ul { margin-bottom: 0; }

.article-footer-cta {
    border-top: 1px solid var(--rule);
    margin-top: 3.5rem;
    padding-top: 2.5rem;
}

.article-footer-cta p { font-size: 0.92rem; color: var(--muted-tone); margin-bottom: 1.5rem; }

/* ── CASE CARDS ── */
.case-card {
    background: var(--card-tone);
    padding: 3rem 2.8rem;
    border-top: 2px solid var(--green);
}

.case-card .case-sector {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--seal);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.case-card h3 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--green);
    line-height: 1.3;
    margin-bottom: 1.2rem;
}

.case-card p { font-size: 0.86rem; line-height: 1.8; color: var(--muted-tone); margin-bottom: 1rem; }

.case-card .case-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 600;
    margin: 1.4rem 0 0.5rem;
}

/* ── FORMS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.form-grid .full { grid-column: 1 / -1; }

.form-field label {
    display: block;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 0.6rem;
}

.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--rule);
    background: var(--card-tone);
    font-family: var(--sans);
    font-size: 0.88rem;
    color: var(--ink);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--seal);
    box-shadow: 2px 2px 0 var(--rule);
}

.form-field textarea { resize: vertical; min-height: 140px; }

/* ── FOOTER ── */
footer.site-footer {
    background: var(--band);
    border-top: 1px solid var(--band-border);
    padding: 5rem 4rem 2.5rem;
    color: var(--muted-tone);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--band-border);
}

.footer-brand .logo { color: var(--green); font-size: 1.3rem; margin-bottom: 1.2rem; display: inline-flex; }

.footer-brand p { font-size: 0.8rem; line-height: 1.8; max-width: 300px; color: var(--muted-tone); }

.footer-col h5 {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--seal);
    font-weight: 600;
    margin-bottom: 1.4rem;
}

.footer-col a {
    display: block;
    font-size: 0.78rem;
    color: var(--muted-tone);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.25s;
}

.footer-col a:hover { color: var(--green); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2.5rem;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: rgba(35,39,46,0.45);
    flex-wrap: wrap;
    gap: 1rem;
}

/* ── PORTAL ── */
.portal-wrap { min-height: 100vh; padding: 9rem 4rem 6rem; }

.portal-login-card {
    max-width: 440px;
    margin: 3rem auto 0;
    background: var(--card-tone);
    border: 1px solid var(--rule);
    border-top: 3px solid var(--green);
    padding: 3rem;
}

.portal-login-card h2 {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--green);
    margin-bottom: 0.6rem;
}

.portal-login-card .login-sub { font-size: 0.82rem; color: var(--muted-tone); line-height: 1.7; margin-bottom: 2rem; }

.portal-notice {
    background: rgba(179,74,31,0.06);
    border: 1px solid rgba(179,74,31,0.3);
    padding: 1rem 1.2rem;
    font-size: 0.74rem;
    line-height: 1.7;
    color: #82381A;
    margin-bottom: 1.8rem;
}

.login-error {
    display: none;
    font-size: 0.76rem;
    color: #9b2c2c;
    background: rgba(155,44,44,0.06);
    border: 1px solid rgba(155,44,44,0.25);
    padding: 0.8rem 1rem;
    margin-bottom: 1.4rem;
}

/* dashboard */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
}

.portal-header h1 {
    font-family: var(--serif);
    font-size: 2.3rem;
    font-weight: 400;
    color: var(--green);
    line-height: 1.1;
}

.portal-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); margin-bottom: 3rem; }

.portal-kpi { background: var(--card-tone); padding: 1.8rem 1.6rem; }

.portal-kpi .kpi-value {
    font-family: var(--mono);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--green);
    line-height: 1;
}

.portal-kpi .kpi-label {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-tone);
    margin-top: 0.7rem;
    line-height: 1.6;
}

.portal-section-title {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--seal);
    font-weight: 600;
    margin: 3rem 0 1.4rem;
}

.portal-table-wrap { overflow-x: auto; background: var(--card-tone); border: 1px solid var(--rule); }

table.portal-table { width: 100%; border-collapse: collapse; }

table.portal-table th {
    text-align: left;
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-tone);
    font-weight: 600;
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    white-space: nowrap;
}

table.portal-table td {
    font-size: 0.82rem;
    color: var(--ink);
    padding: 1.05rem 1.4rem;
    border-bottom: 1px solid var(--rule);
    line-height: 1.6;
    vertical-align: top;
}

table.portal-table tr:last-child td { border-bottom: none; }
table.portal-table tr:hover td { background: #FFFEF9; }

.status {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.32rem 0.7rem;
    white-space: nowrap;
}

.status.on-track { color: var(--status-green); border: 1px solid rgba(46,125,79,0.4); background: rgba(46,125,79,0.06); }
.status.in-progress { color: var(--green); border: 1px solid rgba(22,56,44,0.3); background: rgba(22,56,44,0.05); }
.status.attention { color: var(--seal); border: 1px solid rgba(179,74,31,0.4); background: rgba(179,74,31,0.07); }
.status.done { color: var(--muted-tone); border: 1px solid var(--rule); background: var(--paper); }

.counterpart {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    white-space: nowrap;
}

.counterpart .avatar {
    width: 28px; height: 28px; min-width: 28px;
    background: var(--green);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 0.56rem;
    font-weight: 600;
}

.counterpart .loc { font-family: var(--mono); font-size: 0.6rem; color: var(--muted-tone); display: block; }

/* ── REVEAL ANIMATIONS ── */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.anim-1 { opacity: 0; animation: slideIn 0.9s ease forwards 0.2s; }
.anim-2 { opacity: 0; animation: slideIn 0.9s ease forwards 0.4s; }
.anim-3 { opacity: 0; animation: slideIn 0.9s ease forwards 0.6s; }
.anim-4 { opacity: 0; animation: slideIn 0.9s ease forwards 0.8s; }

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* staggered entrance for grid/timeline children inside a revealing section */
.reveal .grid-2 > *, .reveal .grid-3 > *, .reveal .grid-4 > *,
.reveal .timeline-item, .reveal .model-step {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible .grid-2 > *, .reveal.visible .grid-3 > *, .reveal.visible .grid-4 > *,
.reveal.visible .timeline-item, .reveal.visible .model-step {
    opacity: 1;
    transform: translateY(0);
}
.reveal.visible .grid-2 > *:nth-child(2), .reveal.visible .grid-3 > *:nth-child(2),
.reveal.visible .grid-4 > *:nth-child(2), .reveal.visible .timeline-item:nth-child(2),
.reveal.visible .model-step:nth-child(3) { transition-delay: 0.09s; }
.reveal.visible .grid-2 > *:nth-child(3), .reveal.visible .grid-3 > *:nth-child(3),
.reveal.visible .grid-4 > *:nth-child(3), .reveal.visible .timeline-item:nth-child(3),
.reveal.visible .model-step:nth-child(5) { transition-delay: 0.18s; }
.reveal.visible .grid-2 > *:nth-child(4), .reveal.visible .grid-3 > *:nth-child(4),
.reveal.visible .grid-4 > *:nth-child(4), .reveal.visible .timeline-item:nth-child(4) { transition-delay: 0.27s; }
.reveal.visible .grid-2 > *:nth-child(n+5), .reveal.visible .grid-4 > *:nth-child(n+5) { transition-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .anim-1, .anim-2, .anim-3, .anim-4, .reveal,
    .reveal .grid-2 > *, .reveal .grid-3 > *, .reveal .grid-4 > *,
    .reveal .timeline-item, .reveal .model-step { opacity: 1; transform: none; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    nav.site-nav { padding: 1.1rem 2rem; }
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0;
        background: rgba(247, 245, 240, 0.98);
        backdrop-filter: blur(30px);
        flex-direction: column;
        align-items: center;
        padding: 5rem 2rem 2.5rem;
        gap: 1.4rem;
        z-index: 1050;
        max-height: 100vh;
        overflow-y: auto;
        border-bottom: 1px solid var(--rule);
    }
    .nav-links.open { display: flex !important; }
    .nav-links > a, .nav-dropdown > a { font-size: 0.85rem; color: var(--green); }
    .nav-dropdown { text-align: center; }
    .dropdown-menu {
        position: static;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        padding: 0.4rem 0 0;
        min-width: auto;
    }
    .dropdown-menu::before { display: none; }
    .dropdown-menu a { color: var(--muted-tone); padding: 0.4rem 1rem; font-size: 0.72rem; }
    .dropdown-menu .dropdown-divider { display: none; }
    .dropdown-menu .dropdown-group-label { display: none; }

    .page-hero { padding: 8rem 2rem 3.5rem; }
    .section, .section.tight { padding: 4.5rem 2rem; }
    .cta-band { padding: 5rem 2rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; gap: 3rem; }
    .two-col .sticky-label { position: static; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .section-count { font-size: 3rem; }
    .authority-strip { padding: 2rem; gap: 1.5rem; }
    .authority-item { padding: 0 1.2rem; border-right: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    footer.site-footer { padding: 3.5rem 2rem 2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .portal-wrap { padding: 7rem 2rem 4rem; }
    .portal-kpis { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .portal-kpis { grid-template-columns: 1fr 1fr; }
    .authority-strip { flex-direction: column; align-items: center; }
    .page-hero-cta { flex-direction: column; }
    .page-hero-cta a { text-align: center; }
    .cta-band-buttons { flex-direction: column; align-items: center; }
}

/* ── Insights + Case Studies feed ───────────────────────────── */
.feed-band { background: var(--paper-2); }
.feed-intro { max-width: 640px; margin-bottom: 2.5rem; }
.feed-shell { position: relative; }
.feed-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--green); background: var(--paper);
    color: var(--green); font-size: 1.05rem; line-height: 1;
    font-family: var(--mono); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.feed-arrow--prev { left: -20px; }
.feed-arrow--next { right: -20px; }
.feed-arrow:hover:not(:disabled) { background: var(--green); color: var(--paper); }
.feed-arrow:disabled { opacity: 0.3; cursor: default; }
.feed-arrow:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }

.insights-feed {
    display: flex; align-items: flex-start; gap: 1.5rem;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 0.4rem 0 1.4rem; scrollbar-width: thin;
}
.insights-feed:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; }

.feed-card {
    flex: 0 0 340px; max-width: 340px; min-height: 300px;
    scroll-snap-align: start;
    display: flex; flex-direction: column;
    background: var(--card-tone); border: 1px solid var(--rule); border-radius: 4px;
    border-left: 2px solid transparent;
    padding: 2rem 1.9rem; text-decoration: none; color: inherit;
    transition: border-left-color 0.25s, transform 0.25s;
}
a.feed-card:hover { border-left-color: var(--seal); transform: translateY(-3px); }
.feed-tag {
    align-self: flex-start;
    font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
    padding: 0.25rem 0.6rem; border-radius: 2px; margin-bottom: 1rem;
    background: var(--band); color: var(--green); border: 1px solid var(--band-border);
}
.feed-tag--case { background: rgba(179,74,31,0.10); color: var(--seal); border-color: rgba(179,74,31,0.28); }
.feed-card .card-num { margin-bottom: 0.6rem; }
.feed-card h3 { font-size: 1.15rem; line-height: 1.25; margin-bottom: 0.8rem; }
.feed-card p { font-size: 0.9rem; line-height: 1.7; color: var(--muted-tone); }
.feed-card .card-arrow { margin-top: auto; padding-top: 1.2rem; }
.feed-card--case .card-arrow { color: #B34A1F; } /* case cue = fixed sealing-wax */
.feed-more .case-label { margin-top: 1.1rem; }
.feed-expand {
    background: none; border: none; padding: 0; cursor: pointer;
    color: #B34A1F; text-align: left; /* fixed sealing-wax, not the per-page accent */
}
.feed-expand:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .insights-feed { scroll-behavior: auto; }
    a.feed-card:hover { transform: none; }
}
@media (max-width: 768px) {
    .feed-arrow { display: none; }
    .feed-card { flex-basis: 82%; max-width: 82%; }
}
@media (min-width: 900px) {
    .insights-feed.feed--grid {
        display: grid; grid-template-columns: repeat(3, 1fr);
        overflow: visible; gap: 1.5rem; align-items: start;
    }
    .insights-feed.feed--grid .feed-card { flex: initial; max-width: none; }
    .feed-shell--insights .feed-arrow { display: none; }
}

/* ── Network grid: 5 cards across on desktop, single column on mobile ── */
@media (min-width: 1025px) {
    #network .grid-4 { grid-template-columns: repeat(5, 1fr); }
    #network .grid-4 .card { padding: 2.4rem 1.7rem; }
}

/* Anchor targets so #articles / #cases links land on the right scroller */
.feed-anchor { display: block; height: 0; scroll-margin-top: 90px; }

/* Two-scroller insights layout: Articles + Case Studies as separate scrollers */
.feed-group + .feed-group { margin-top: 3.2rem; }
.feed-group .section-tag { margin-bottom: 1.1rem; }
.feed-disclaimer { margin-top: 1rem; max-width: 760px; font-size: 0.7rem; line-height: 1.7; color: var(--muted-tone); }
