/* ============================================================
   Cred-it-data — V2 design system
   Direction: "Trust & Authority" (ui-ux-pro-max), adapted to the
   fixed Cred-it-data brand. Brand green retained as the accent;
   neutrals deepened for contrast; Montserrat (headings, Gotham
   stand-in) + Inter (body).
   ============================================================ */

/*
@font-face {
    font-family: "Gotham";
    src: url("/fonts/Gotham-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
*/

/* Self-hosted Montserrat (headings — Gotham stand-in) + Inter (body).
   latin + latin-ext subsets, woff2 only. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/montserrat-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/montserrat-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/montserrat-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/montserrat-800-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/montserrat-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/montserrat-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/montserrat-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/montserrat-800-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    /* Brand colours (fixed) */
    --cd-primary: #3DAE2B;
    --cd-primary-dark: #339324;
    --cd-primary-deep: #25711B;       /* AA-safe green for text on white */
    --cd-primary-light: #e8f6e4;
    --cd-primary-faint: #f3faf1;

    /* Neutrals — green-tinted ink scale */
    --cd-ink: #15211A;                /* headings, dark surfaces */
    --cd-ink-2: #0E1812;              /* footer / deep sections */
    --cd-body: #46524A;               /* body text — AA on white */
    --cd-muted: #6B766E;              /* secondary text */
    --cd-white: #ffffff;
    --cd-off-white: #f6f8f4;
    --cd-line: #e3e8e1;
    --cd-line-strong: #cfd6cd;

    /* Legacy aliases (content pages reference these) */
    --cd-grey-1: var(--cd-body);
    --cd-grey-2: var(--cd-muted);

    /* Typography */
    --cd-font-head: "Gotham", "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --cd-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --cd-weight-body: 400;
    --cd-weight-bold: 700;

    /* Type scale */
    --cd-fs-xs: 0.8125rem;
    --cd-fs-sm: 0.9375rem;
    --cd-fs-base: 1.0625rem;
    --cd-fs-lg: 1.25rem;
    --cd-fs-h3: 1.45rem;
    --cd-fs-h2: clamp(1.75rem, 3vw, 2.35rem);
    --cd-fs-h1: clamp(2.4rem, 5vw, 3.6rem);

    /* Spacing */
    --cd-space-1: 0.5rem;
    --cd-space-2: 1rem;
    --cd-space-3: 1.5rem;
    --cd-space-4: 2.5rem;
    --cd-space-5: 4rem;
    --cd-space-6: 6.5rem;

    /* Layout */
    --cd-container: 1200px;
    --cd-radius: 20px;
    --cd-radius-sm: 12px;
    /* Green-tinted layered shadows (premium, not grey) */
    --cd-shadow: 0 1px 2px rgba(21, 33, 26, 0.05), 0 12px 32px rgba(37, 113, 27, 0.10);
    --cd-shadow-sm: 0 1px 2px rgba(21, 33, 26, 0.04), 0 4px 14px rgba(37, 113, 27, 0.06);
    --cd-shadow-lift: 0 2px 4px rgba(21, 33, 26, 0.06), 0 24px 48px rgba(37, 113, 27, 0.16);
    --cd-grad-primary: linear-gradient(135deg, #4BC437 0%, var(--cd-primary) 45%, var(--cd-primary-dark) 100%);

    /* Midnight / fintech layer */
    --cd-neon: #4BC437;
    --cd-midnight: #0B140E;
    --cd-midnight-2: #101D14;
    --cd-on-dark: #c9d2cb;            /* body text on midnight — AA */
    --cd-on-dark-muted: #9fb0a4;
    --cd-glass-bg: rgba(255, 255, 255, 0.05);
    --cd-glass-line: rgba(255, 255, 255, 0.10);
    --cd-glow: 0 0 0 1px rgba(75, 196, 55, .25), 0 10px 40px rgba(61, 174, 43, .35), 0 0 80px rgba(75, 196, 55, .18);
    --cd-grad-border: linear-gradient(135deg, rgba(75, 196, 55, .9), rgba(75, 196, 55, .05) 40%, rgba(75, 196, 55, .05) 60%, rgba(75, 196, 55, .7));
    --cd-grad-text: linear-gradient(100deg, #ffffff 0%, #d9f5d2 35%, #4BC437 70%, #8BE07A 100%);

    --cd-header-h: 76px;

    /* Motion */
    --cd-ease: cubic-bezier(.22, .68, .35, 1);
    --cd-dur: .2s;
}

/* --- Reset / base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--cd-font-body);
    font-weight: var(--cd-weight-body);
    font-size: var(--cd-fs-base);
    line-height: 1.7;
    color: var(--cd-body);
    background: var(--cd-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
    font-family: var(--cd-font-head);
    font-weight: var(--cd-weight-bold);
    color: var(--cd-ink);
    line-height: 1.12;
    margin: 0 0 var(--cd-space-2);
}

h1 { font-size: var(--cd-fs-h1); letter-spacing: -0.025em; }
h2 { font-size: var(--cd-fs-h2); letter-spacing: -0.015em; }
h3 { font-size: var(--cd-fs-h3); letter-spacing: -0.01em; }

p { margin: 0 0 var(--cd-space-2); }

a { color: var(--cd-primary-deep); text-decoration: none; transition: color var(--cd-dur) var(--cd-ease); }
a:hover { color: var(--cd-primary-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 var(--cd-space-2); padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

h1:focus, h2:focus { outline: none; }

:focus-visible {
    outline: 3px solid var(--cd-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--cd-primary-light); color: var(--cd-ink); }

/* --- Layout helpers --------------------------------------- */
.cd-container {
    width: 100%;
    max-width: var(--cd-container);
    margin-inline: auto;
    padding-inline: var(--cd-space-3);
}

.cd-section { padding-block: var(--cd-space-6); }
.cd-section--tight { padding-block: var(--cd-space-4); }
.cd-section--alt { background: var(--cd-off-white); }

/* Dark "authority" section */
.cd-section--dark {
    background:
        radial-gradient(90% 120% at 85% -10%, rgba(61, 174, 43, 0.18) 0%, transparent 55%),
        var(--cd-ink-2);
    color: #c9d2cb;
}
.cd-section--dark h2, .cd-section--dark h3 { color: #fff; }

.cd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-family: var(--cd-font-head);
    font-size: var(--cd-fs-xs);
    font-weight: var(--cd-weight-bold);
    color: var(--cd-primary-deep);
    margin-bottom: var(--cd-space-2);
}
.cd-eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--cd-primary);
    border-radius: 2px;
}

.cd-lead { font-size: var(--cd-fs-lg); line-height: 1.6; color: var(--cd-body); }

.cd-text-center { text-align: center; }
.cd-text-muted { color: var(--cd-muted); font-size: var(--cd-fs-sm); }
.cd-text-center .cd-eyebrow::before { display: none; }
.cd-text-center .cd-eyebrow::after { display: none; }
.cd-mx-auto { margin-inline: auto; }
.cd-measure { max-width: 62ch; }

.cd-section-head { margin-bottom: var(--cd-space-4); }

.cd-grid { display: grid; gap: var(--cd-space-3); }
.cd-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cd-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cd-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Buttons ---------------------------------------------- */
.cd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--cd-font-head);
    font-weight: var(--cd-weight-bold);
    font-size: var(--cd-fs-sm);
    line-height: 1;
    padding: 0.95rem 1.7rem;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--cd-dur) var(--cd-ease),
                box-shadow var(--cd-dur) var(--cd-ease),
                background var(--cd-dur) var(--cd-ease),
                color var(--cd-dur) var(--cd-ease),
                border-color var(--cd-dur) var(--cd-ease);
    text-decoration: none;
}
.cd-btn:hover { text-decoration: none; transform: translateY(-2px); }
.cd-btn:active { transform: translateY(0) scale(.98); }
.cd-btn svg { width: 18px; height: 18px; flex: none; }

.cd-btn--primary {
    background: var(--cd-grad-primary);
    background-size: 150% 150%;
    background-position: 0% 0%;
    color: #fff;
    box-shadow: 0 1px 2px rgba(21, 33, 26, .12), 0 8px 22px rgba(61, 174, 43, 0.38), inset 0 1px 0 rgba(255,255,255,.22);
    transition: transform var(--cd-dur) var(--cd-ease),
                box-shadow var(--cd-dur) var(--cd-ease),
                background-position .35s var(--cd-ease);
}
.cd-btn--primary:hover { background-position: 100% 100%; color: #fff; box-shadow: 0 2px 4px rgba(21, 33, 26, .12), 0 14px 30px rgba(61, 174, 43, 0.46), inset 0 1px 0 rgba(255,255,255,.22); }

.cd-btn--outline { background: transparent; color: var(--cd-ink); border-color: var(--cd-line-strong); }
.cd-btn--outline:hover { border-color: var(--cd-primary); color: var(--cd-primary-deep); background: var(--cd-primary-faint); }

.cd-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.cd-btn--ghost:hover { background: #fff; color: var(--cd-ink); border-color: #fff; }

.cd-btn--lg { padding: 1.15rem 2.1rem; font-size: 1rem; }

/* --- Cards ------------------------------------------------- */
.cd-card {
    background: #fff;
    border: 1px solid var(--cd-line);
    border-radius: var(--cd-radius);
    padding: var(--cd-space-3);
    box-shadow: var(--cd-shadow-sm);
    transition: transform var(--cd-dur) var(--cd-ease),
                box-shadow var(--cd-dur) var(--cd-ease),
                border-color var(--cd-dur) var(--cd-ease);
}
.cd-card--hover:hover,
a.cd-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--cd-shadow-lift);
    border-color: rgba(61, 174, 43, 0.35);
    text-decoration: none;
}

/* Icon chip used at the top of feature cards */
.cd-icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--cd-primary-light);
    color: var(--cd-primary-deep);
    margin-bottom: var(--cd-space-2);
}
.cd-icon-chip svg { width: 24px; height: 24px; }

/* Stat block */
.cd-stat__value {
    font-family: var(--cd-font-head);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.9rem);
    letter-spacing: -0.02em;
    color: var(--cd-ink);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.cd-stat__label { font-size: var(--cd-fs-sm); color: var(--cd-muted); margin-top: .4rem; }
.cd-section--dark .cd-stat__value,
.cd-section--midnight .cd-stat__value { color: #fff; }
.cd-section--dark .cd-stat__label,
.cd-section--midnight .cd-stat__label { color: var(--cd-on-dark-muted); }

/* Oversized glowing stat numbers */
.cd-stat--glow .cd-stat__value {
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    background: linear-gradient(180deg, #fff 30%, #8BE07A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 24px rgba(75, 196, 55, .35));
}

/* Checklist */
.cd-checklist { list-style: none; padding: 0; margin: 0 0 var(--cd-space-3); }
.cd-checklist li {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    margin-bottom: .65rem;
}
.cd-checklist svg { width: 20px; height: 20px; flex: none; margin-top: .2rem; color: var(--cd-primary); }

/* --- Forms ------------------------------------------------- */
.cd-field { margin-bottom: var(--cd-space-2); }
.cd-field label { display: block; font-family: var(--cd-font-head); font-weight: 600; color: var(--cd-ink); margin-bottom: .35rem; font-size: var(--cd-fs-sm); }
.cd-input, .cd-textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid var(--cd-line-strong);
    border-radius: var(--cd-radius-sm);
    font: inherit;
    color: var(--cd-ink);
    background: #fff;
    transition: border-color var(--cd-dur) var(--cd-ease), box-shadow var(--cd-dur) var(--cd-ease);
}
.cd-input:focus, .cd-textarea:focus { outline: none; border-color: var(--cd-primary); box-shadow: 0 0 0 4px var(--cd-primary-light); }
.cd-textarea { min-height: 140px; resize: vertical; }
.cd-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.valid.modified:not([type=checkbox]) { outline: none; }
.invalid { border-color: #C62828 !important; }
.validation-message { color: #C62828; font-size: var(--cd-fs-sm); margin-top: .3rem; }

/* --- Blazor error UI (kept from template) ----------------- */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 960px) {
    .cd-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .cd-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .cd-section { padding-block: var(--cd-space-5); }
    .cd-grid--2, .cd-grid--3, .cd-grid--4 { grid-template-columns: 1fr; }
}

/* --- App shell (sticky footer) ---------------------------- */
.cd-app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}
.cd-main { flex: 1 0 auto; }

/* --- Shared: CTA panel (floating island) ------------------- */
.cd-cta-wrap { padding-block: var(--cd-space-5); }

.cd-cta {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--cd-radius) + 8px);
    background:
        radial-gradient(80% 160% at 15% -30%, rgba(255,255,255,.16) 0%, transparent 55%),
        linear-gradient(120deg, var(--cd-ink-2) 0%, #1A3A14 55%, var(--cd-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(14, 24, 18, .15), 0 28px 60px rgba(37, 113, 27, .25);
}
/* Rotating conic border */
.cd-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--cd-cta-angle, 0deg), rgba(255,255,255,.08), rgba(139, 224, 122, .95), rgba(255,255,255,.08) 30%, rgba(255,255,255,.08) 70%, rgba(139, 224, 122, .6), rgba(255,255,255,.08));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: cd-cta-spin 6s linear infinite;
    pointer-events: none;
}
@property --cd-cta-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes cd-cta-spin { to { --cd-cta-angle: 360deg; } }
.cd-cta::after {
    content: "";
    position: absolute;
    bottom: -200px;
    right: -100px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 174, 43, 0.45), transparent 65%);
    filter: blur(50px);
    animation: cd-aurora 16s ease-in-out infinite alternate;
    pointer-events: none;
}
.cd-cta__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--cd-space-3);
    padding: var(--cd-space-4) var(--cd-space-4);
}
.cd-cta__title { color: #fff; margin: 0; }
.cd-cta__subtitle { color: rgba(255,255,255,.85); margin: .45rem 0 0; }
.cd-cta .cd-btn--ghost { border-color: rgba(255,255,255,.45); }
@media (max-width: 640px) {
    .cd-cta__inner { flex-direction: column; align-items: flex-start; padding: var(--cd-space-3); }
    .cd-cta-wrap { padding-block: var(--cd-space-4); }
}

/* --- Shared: latest articles ------------------------------ */
.cd-latest { display: flex; flex-direction: column; gap: var(--cd-space-2); }
.cd-latest__item { display: flex; flex-direction: column; gap: .15rem; text-decoration: none; }
.cd-latest__item:hover { text-decoration: none; }
.cd-latest__title { font-family: var(--cd-font-head); font-weight: var(--cd-weight-bold); color: inherit; transition: color var(--cd-dur) var(--cd-ease); }
.cd-latest__item:hover .cd-latest__title { color: var(--cd-primary); }
.cd-latest__excerpt { font-size: var(--cd-fs-sm); color: var(--cd-muted); }

/* --- Form result messages (shared by contact & signup) ---- */
.contact-result--ok h2, .contact-result--ok h3 { color: var(--cd-primary-deep); }
.contact-result--info {
    color: var(--cd-body);
    background: var(--cd-primary-light);
    border: 1px solid rgba(61, 174, 43, .25);
    border-radius: var(--cd-radius-sm);
    padding: var(--cd-space-2);
    font-size: var(--cd-fs-sm);
    margin-bottom: var(--cd-space-2);
}

/* --- Legal "content pending" notice ----------------------- */
.legal-pending {
    border: 1px dashed var(--cd-line-strong);
    background: var(--cd-off-white);
    border-radius: var(--cd-radius);
    padding: var(--cd-space-3);
    color: var(--cd-body);
    font-size: var(--cd-fs-sm);
}
.legal-pending strong { color: var(--cd-ink); }

/* --- Long-form article ------------------------------------ */
.cd-article { max-width: 760px; }
.cd-article h2 { margin-top: var(--cd-space-4); }
.cd-article__author { margin-top: var(--cd-space-3); color: var(--cd-ink); }

/* --- Shared: compliance badges ---------------------------- */
.cd-compliance__text { font-size: var(--cd-fs-sm); margin: 0 0 var(--cd-space-2); }
.cd-compliance__logos { display: flex; gap: .75rem; }
.cd-compliance__logos a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 56px; padding: .45rem .75rem;
    background: #fff;
    border: 1px solid rgba(255,255,255,.25); border-radius: var(--cd-radius-sm);
    text-decoration: none;
    transition: border-color var(--cd-dur) var(--cd-ease), transform var(--cd-dur) var(--cd-ease);
}
.cd-compliance__logos a:hover { border-color: var(--cd-primary); transform: translateY(-2px); text-decoration: none; }
.cd-compliance__logos img { height: 32px; width: auto; display: block; }

/* --- Page hero (inner pages) — midnight with aurora --------- */
.cd-page-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(60% 90% at 85% -10%, rgba(61, 174, 43, .32) 0%, transparent 60%),
        radial-gradient(50% 80% at 0% 110%, rgba(75, 196, 55, .14) 0%, transparent 60%),
        var(--cd-midnight);
    color: var(--cd-on-dark);
    padding-block: var(--cd-space-6) var(--cd-space-5);
}
/* Fading grid */
.cd-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(80% 100% at 70% 0%, #000 20%, transparent 85%);
    -webkit-mask-image: radial-gradient(80% 100% at 70% 0%, #000 20%, transparent 85%);
    pointer-events: none;
}
/* Slow aurora */
.cd-page-hero::after {
    content: "";
    position: absolute;
    top: -220px;
    right: -160px;
    z-index: -1;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(75, 196, 55, .35), transparent 65%);
    filter: blur(70px);
    animation: cd-aurora 18s ease-in-out infinite alternate;
    pointer-events: none;
}
.cd-page-hero > .cd-container { position: relative; z-index: 1; }
.cd-page-hero h1 {
    margin-bottom: var(--cd-space-2);
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.cd-page-hero h2, .cd-page-hero h3, .cd-page-hero strong { color: #fff; }
.cd-page-hero .cd-lead, .cd-page-hero p { color: var(--cd-on-dark); }
.cd-page-hero .cd-eyebrow, .cd-page-hero .cd-eyebrow a { color: var(--cd-neon); }
.cd-page-hero .cd-eyebrow::before { background: var(--cd-neon); box-shadow: 0 0 12px var(--cd-neon); }
.cd-page-hero a:not(.cd-btn) { color: #8BE07A; }
.cd-page-hero .cd-btn--outline { color: #fff; border-color: rgba(255, 255, 255, .3); }
.cd-page-hero .cd-btn--outline:hover { color: #fff; border-color: var(--cd-neon); background: rgba(75, 196, 55, .12); }
.cd-page-hero .cd-checklist svg { color: var(--cd-neon); }
.cd-page-hero .cd-card { background: var(--cd-glass-bg); border-color: var(--cd-glass-line); color: var(--cd-on-dark); }

/* Photo variant — the brand banners are already green duotone; a midnight
   wash on the left keeps the copy readable. Set --hero-img inline. */
.cd-page-hero--image {
    background:
        linear-gradient(90deg, var(--cd-midnight) 0%, rgba(11, 20, 14, .95) 45%, rgba(11, 20, 14, .6) 72%, rgba(11, 20, 14, .3) 100%),
        var(--hero-img) center / cover no-repeat,
        var(--cd-midnight);
    padding-block: calc(var(--cd-space-6) + 1rem) var(--cd-space-6);
}
/* Keep copy left-aligned over the darkest part of the wash */
.cd-page-hero--image > .cd-container.cd-measure { max-width: var(--cd-container); }
.cd-page-hero--image > .cd-container > * { max-width: 60ch; }
.cd-page-hero--image h1 { max-width: 16ch; }
.cd-page-hero--image::before { mask-image: linear-gradient(90deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); }
@media (max-width: 760px) {
    .cd-page-hero--image {
        background:
            linear-gradient(180deg, rgba(11, 20, 14, .80) 0%, var(--cd-midnight) 85%),
            var(--hero-img) center / cover no-repeat,
            var(--cd-midnight);
    }
}

@keyframes cd-aurora {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(-80px, 40px, 0) scale(1.15); }
    100% { transform: translate3d(-160px, -20px, 0) scale(.95); }
}

/* --- Midnight section + glass / glow utilities ------------- */
.cd-section--midnight {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(60% 80% at 15% 0%, rgba(61, 174, 43, .20) 0%, transparent 60%),
        radial-gradient(50% 70% at 100% 100%, rgba(75, 196, 55, .12) 0%, transparent 60%),
        var(--cd-midnight);
    color: var(--cd-on-dark);
}
.cd-section--midnight h2, .cd-section--midnight h3 { color: #fff; }
.cd-section--midnight .cd-eyebrow { color: var(--cd-neon); }
.cd-section--midnight .cd-eyebrow::before { background: var(--cd-neon); }

/* Angled edges: overlaps its neighbours' padding so the slant reveals them. */
.cd-slant {
    --slant: clamp(24px, 4vw, 64px);
    position: relative;
    z-index: 1;
    margin-block: calc(var(--slant) * -1);
    padding-block: calc(var(--cd-space-6) + var(--slant));
    clip-path: polygon(0 var(--slant), 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}
.cd-slant--top { margin-bottom: 0; padding-bottom: var(--cd-space-6); clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%); }

.cd-glass {
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
    border: 1px solid var(--cd-glass-line);
    border-radius: var(--cd-radius);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 60px rgba(0, 0, 0, .35);
}

.cd-glow-text {
    background: var(--cd-grad-text);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: cd-shimmer 8s ease-in-out infinite alternate;
}
@keyframes cd-shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Gradient border via mask — works on any background. */
.cd-gradient-border { position: relative; }
.cd-gradient-border::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: var(--cd-grad-border);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: .55;
    transition: opacity .3s var(--cd-ease);
    pointer-events: none;
}
.cd-gradient-border:hover::before { opacity: 1; }

/* Cursor spotlight — site.js sets --mx/--my on [data-spotlight]. */
[data-spotlight] { position: relative; overflow: hidden; }
[data-spotlight]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, -200px), rgba(75, 196, 55, .16), transparent 45%);
    opacity: 0;
    transition: opacity .3s var(--cd-ease);
    pointer-events: none;
}
[data-spotlight]:hover::after { opacity: 1; }

/* Primary button shine sweep */
.cd-btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.cd-btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s var(--cd-ease);
}
.cd-btn--primary:hover::after { transform: translateX(120%); }
.cd-btn[data-magnetic] { transition: transform .25s var(--cd-ease), box-shadow var(--cd-dur) var(--cd-ease), background-position .35s var(--cd-ease); }

/* Ghost buttons on midnight */
.cd-section--midnight .cd-btn--outline { color: #fff; border-color: rgba(255, 255, 255, .3); }
.cd-section--midnight .cd-btn--outline:hover { color: #fff; border-color: var(--cd-neon); background: rgba(75, 196, 55, .12); }

/* Icon chip — neon variant for dark surfaces */
.cd-icon-chip--neon {
    background: linear-gradient(145deg, rgba(75, 196, 55, .22), rgba(75, 196, 55, .06));
    color: var(--cd-neon);
    border: 1px solid rgba(75, 196, 55, .35);
    box-shadow: 0 0 24px rgba(75, 196, 55, .25);
}

/* --- Feature card (shared FeatureCard component) ----------- */
.cd-feature {
    height: 100%;
    background: #fff;
    border-radius: var(--cd-radius);
    padding: var(--cd-space-3);
    box-shadow: var(--cd-shadow-sm);
    transition: transform .3s var(--cd-ease), box-shadow .3s var(--cd-ease);
}
.cd-feature:hover { transform: translateY(-6px); box-shadow: var(--cd-shadow-lift); }
.cd-feature h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.cd-feature p { margin: 0; font-size: var(--cd-fs-sm); }
.cd-feature .cd-icon-chip { transition: transform .35s var(--cd-ease), box-shadow .35s var(--cd-ease); }
.cd-feature:hover .cd-icon-chip { transform: translateY(-2px) rotate(-6deg) scale(1.06); box-shadow: 0 8px 24px rgba(61, 174, 43, .35); }
.cd-section--midnight .cd-feature { background: var(--cd-glass-bg); box-shadow: none; color: var(--cd-on-dark); }
.cd-section--midnight .cd-feature:hover { box-shadow: var(--cd-glow); }

/* --- Sticky in-page section nav ---------------------------- */
.cd-subnav {
    position: sticky;
    top: var(--cd-header-h);
    z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border-bottom: 1px solid var(--cd-line);
}
.cd-subnav__list {
    position: relative;
    display: flex;
    gap: .4rem;
    list-style: none;
    margin: 0;
    padding: .65rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.cd-subnav__list::-webkit-scrollbar { display: none; }
.cd-subnav__list li { margin: 0; flex: none; }
.cd-subnav__list a {
    display: inline-block;
    padding: .45rem .9rem;
    border-radius: 999px;
    font-family: var(--cd-font-head);
    font-weight: 600;
    font-size: var(--cd-fs-xs);
    color: var(--cd-body);
    white-space: nowrap;
    transition: background var(--cd-dur) var(--cd-ease), color var(--cd-dur) var(--cd-ease);
}
.cd-subnav__list a:hover, .cd-subnav__list a.is-active {
    background: var(--cd-ink);
    color: #fff;
    text-decoration: none;
}
[id] { scroll-margin-top: calc(var(--cd-header-h) + 64px); }

/* --- Product section heading with icon --------------------- */
.cd-h-icon { display: flex; align-items: center; gap: .75rem; }
.cd-h-icon .cd-icon-chip { margin: 0; flex: none; width: 42px; height: 42px; border-radius: 12px; }
.cd-h-icon .cd-icon-chip svg { width: 20px; height: 20px; }

/* Panel used to give plain two-column copy some depth */
.cd-panel {
    height: 100%;
    background: #fff;
    border: 1px solid var(--cd-line);
    border-radius: var(--cd-radius);
    padding: var(--cd-space-4);
    box-shadow: var(--cd-shadow-sm);
}
.cd-section--alt .cd-panel { background: #fff; }
.cd-panel > :last-child { margin-bottom: 0; }
@media (max-width: 640px) { .cd-panel { padding: var(--cd-space-3); } }

/* --- Product pages ------------------------------------------ */
.product-split { align-items: stretch; gap: var(--cd-space-4); }
.product-split--wide { grid-template-columns: 1.1fr 1fr; align-items: start; }
.product-split__card { padding: var(--cd-space-4); }
.product-split__card > :last-child { margin-bottom: 0; }
.product-split .cd-h-icon { margin-bottom: var(--cd-space-2); }
.product-split .cd-h-icon h2, .product-split .cd-h-icon h3 { margin: 0; }
.product-split .cd-h-icon h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }

/* Check-mark bullets for product lists */
.product-split ul:not(.product-chips):not(.product-banks) { list-style: none; padding: 0; }
.product-split ul:not(.product-chips):not(.product-banks) li { position: relative; padding-left: 1.8rem; margin-bottom: .55rem; }
.product-split ul:not(.product-chips):not(.product-banks) li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .3rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--cd-primary-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2325711B' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 62% no-repeat;
}

.product-modules { position: relative; }
.product-modules > h2 {
    font-size: var(--cd-fs-xs);
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--cd-primary-deep);
    margin-bottom: .35rem;
}
.product-modules::before {
    content: "";
    position: absolute;
    top: 0; left: var(--cd-space-4); right: var(--cd-space-4);
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--cd-grad-primary);
}

.product-banks {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    list-style: none;
    padding: 0;
    margin-top: var(--cd-space-2);
}
.product-banks li {
    margin: 0;
    padding: .4rem .8rem;
    font-size: var(--cd-fs-sm);
    background: #fff;
    border: 1px solid var(--cd-line);
    border-radius: 999px;
    color: var(--cd-ink);
    transition: border-color var(--cd-dur) var(--cd-ease), background var(--cd-dur) var(--cd-ease);
}
.product-banks li:hover { border-color: var(--cd-primary); background: var(--cd-primary-faint); }

.product-chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: var(--cd-space-2) 0 0; }
.product-chips li {
    margin: 0;
    padding: .3rem .75rem;
    font-family: var(--cd-font-head);
    font-weight: 700;
    font-size: var(--cd-fs-xs);
    border-radius: 999px;
    background: var(--cd-midnight);
    color: var(--cd-neon);
}

.product-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    font-family: var(--cd-font-head);
    font-weight: 800;
    color: #fff;
    background: var(--cd-primary);
}
.product-code--D, .product-code--E { background: #F5A623; }
.product-code--F { background: var(--cd-muted); }
.product-code--G, .product-code--H { background: #E74C3C; }

.product-bignum {
    font-family: var(--cd-font-head);
    font-weight: 800;
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: var(--cd-space-2);
}
.product-bignum--light { color: var(--cd-primary-deep); }

.product-lights { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--cd-space-2); }
.product-lights__pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    font-family: var(--cd-font-head);
    font-weight: 700;
    font-size: var(--cd-fs-xs);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--cd-glass-line);
    color: #fff;
}
.product-lights__pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.product-lights__pill--green::before { background: var(--cd-neon); box-shadow: 0 0 12px var(--cd-neon); }
.product-lights__pill--amber::before { background: #F5A623; box-shadow: 0 0 12px #F5A623; }

.product-ai { display: flex; gap: var(--cd-space-4); align-items: flex-start; max-width: 900px; margin-inline: auto; }
.product-ai__icon { flex: none; width: 88px; height: 88px; border-radius: 24px; }
.product-ai__icon svg { width: 42px; height: 42px; }
.product-ai h2 { font-size: clamp(2rem, 4vw, 3rem); }
.product-ai p:last-child { font-size: var(--cd-fs-lg); margin: 0; }

.product-step { padding: var(--cd-space-3); border-radius: var(--cd-radius); border: 1px solid var(--cd-glass-line); background: var(--cd-glass-bg); transition: box-shadow .3s var(--cd-ease), transform .3s var(--cd-ease); }
.product-step:hover { box-shadow: var(--cd-glow); transform: translateY(-4px); }
.product-step p { margin: 0; }

.product-examples { display: grid; gap: var(--cd-space-2); }
.product-examples > h3 { margin: 0; font-size: var(--cd-fs-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--cd-primary-deep); }
.product-examples .cd-panel { padding: var(--cd-space-3); }

.product-features { grid-template-columns: repeat(6, 1fr); }
.product-features > * { grid-column: span 2; }
.product-features > :nth-child(4), .product-features > :nth-child(5) { grid-column: span 3; }

.product-note { display: flex; align-items: center; gap: .6rem; margin-top: var(--cd-space-3); font-weight: 600; color: var(--cd-ink); }

@media (max-width: 960px) {
    .product-split--wide { grid-template-columns: 1fr; }
    .product-features { grid-template-columns: 1fr 1fr; }
    .product-features > *, .product-features > :nth-child(4) { grid-column: auto; }
    .product-features > :nth-child(5) { grid-column: span 2; }
}
@media (max-width: 640px) {
    .product-split__card { padding: var(--cd-space-3); }
    .product-ai { flex-direction: column; gap: var(--cd-space-2); }
    .product-ai__icon { width: 64px; height: 64px; }
    .product-features { grid-template-columns: 1fr; }
    .product-features > :nth-child(5) { grid-column: auto; }
}

/* --- Quote cards -------------------------------------------- */
.cd-quote { margin: 0; display: flex; flex-direction: column; gap: var(--cd-space-2); }
.cd-quote blockquote {
    margin: 0;
    color: var(--cd-body);
    border-left: 3px solid var(--cd-primary);
    padding-left: var(--cd-space-2);
    font-size: var(--cd-fs-base);
    line-height: 1.7;
}
.cd-quote figcaption { font-size: var(--cd-fs-sm); color: var(--cd-muted); line-height: 1.6; }
.cd-quote figcaption strong { color: var(--cd-ink); font-family: var(--cd-font-head); }
.cd-quote__industry { color: var(--cd-primary-deep); font-weight: 500; }
.cd-quote--wide { grid-column: 1 / -1; }

/* --- Trust bar (logo strip) -------------------------------- */
.cd-trustbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--cd-space-2) var(--cd-space-4);
}
.cd-trustbar__label {
    width: 100%;
    text-align: center;
    font-size: var(--cd-fs-xs);
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--cd-muted);
    font-family: var(--cd-font-head);
    font-weight: 600;
    margin-bottom: var(--cd-space-1);
}
.cd-trustbar__logo {
    font-family: var(--cd-font-head);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: .02em;
    color: var(--cd-muted);
    opacity: .85;
    transition: color var(--cd-dur) var(--cd-ease), opacity var(--cd-dur) var(--cd-ease);
}
.cd-trustbar__logo:hover { color: var(--cd-ink); opacity: 1; }
.cd-trustbar__img {
    height: 80px;
    width: auto;
    filter: grayscale(1);
    opacity: .65;
    transition: filter var(--cd-dur) var(--cd-ease), opacity var(--cd-dur) var(--cd-ease);
}
.cd-trustbar__img:hover { filter: none; opacity: 1; }

/* --- Logo marquee (infinite, CSS-only; track is duplicated) - */
.cd-marquee {
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.cd-marquee__track {
    display: flex;
    width: max-content;
    gap: var(--cd-space-3);
    animation: cd-marquee 32s linear infinite;
}
.cd-marquee:hover .cd-marquee__track { animation-play-state: paused; }
.cd-marquee__item {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 88px;
    padding: .35rem .75rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--cd-line);
    border-radius: var(--cd-radius-sm);
    box-shadow: var(--cd-shadow-sm);
}
.cd-marquee__item img {
    /* Source PNGs carry generous whitespace — fill the tile and let
       object-fit keep proportions. */
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(var(--logo-zoom, 1.35));
    filter: grayscale(1);
    opacity: .7;
    transition: filter var(--cd-dur) var(--cd-ease), opacity var(--cd-dur) var(--cd-ease);
}
.cd-marquee__item:hover img { filter: none; opacity: 1; }
@keyframes cd-marquee { to { transform: translateX(calc(-50% - var(--cd-space-3) / 2)); } }
@media (prefers-reduced-motion: reduce) {
    .cd-marquee { mask-image: none; -webkit-mask-image: none; }
    .cd-marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
    .cd-marquee__track [aria-hidden="true"] { display: none; }
}

/* --- Entrance reveal (page load) --------------------------- */
@keyframes cd-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
.cd-reveal { animation: cd-fade-up .6s var(--cd-ease) both; }
.cd-reveal--d1 { animation-delay: .08s; }
.cd-reveal--d2 { animation-delay: .16s; }
.cd-reveal--d3 { animation-delay: .24s; }

/* --- Reveal on scroll (site.js IntersectionObserver) -------- */
[data-io] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .65s var(--cd-ease), transform .65s var(--cd-ease);
    transition-delay: calc(var(--io-d, 0) * 90ms);
}
[data-io].io-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-io] { opacity: 1; transform: none; }
}

/* --- Ambient hero blobs (static glow — continuous animation is
       distracting and keeps the compositor busy) ------------------ */
.cd-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

/* --- Star rating -------------------------------------------- */
.cd-stars { display: inline-flex; gap: 3px; color: #F5B400; }
.cd-stars svg { width: 18px; height: 18px; }

/* --- Section divider ----------------------------------------*/
.cd-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--cd-line-strong), transparent); border: 0; margin: 0; }

/* --- Article listing card (blog / category / search) -------- */
.cd-acard {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.cd-acard:hover { text-decoration: none; color: inherit; }

.cd-acard__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    background:
        radial-gradient(80% 120% at 85% -20%, rgba(61, 174, 43, 0.25) 0%, transparent 60%),
        linear-gradient(150deg, var(--cd-primary-faint), var(--cd-primary-light));
}
.cd-acard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--cd-ease);
}
.cd-acard:hover .cd-acard__media img { transform: scale(1.04); }
.cd-acard__media-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(37, 113, 27, 0.35);
}
.cd-acard__media-fallback svg { width: 52px; height: 52px; }

.cd-acard__category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    color: var(--cd-primary-deep);
    font-family: var(--cd-font-head);
    font-weight: 700;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .3rem .65rem;
    border-radius: 999px;
    box-shadow: var(--cd-shadow-sm);
}

.cd-acard__body {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: var(--cd-space-3);
    flex: 1;
}
.cd-acard__title { margin: 0; font-size: 1.2rem; }
.cd-acard__excerpt {
    color: var(--cd-body);
    font-size: var(--cd-fs-sm);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cd-acard__foot {
    margin-top: auto;
    padding-top: .6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cd-acard__date { color: var(--cd-muted); font-size: var(--cd-fs-xs); }
.cd-acard__more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-family: var(--cd-font-head);
    font-weight: 700;
    font-size: var(--cd-fs-xs);
    color: var(--cd-primary-deep);
    white-space: nowrap;
}
.cd-acard__more svg { width: 14px; height: 14px; transition: transform var(--cd-dur) var(--cd-ease); }
.cd-acard:hover .cd-acard__more svg { transform: translateX(3px); }

/* Featured (first) post spans the grid and goes horizontal on desktop */
.cd-acard--large { grid-column: 1 / -1; }
@media (min-width: 961px) {
    .cd-acard--large { flex-direction: row; }
    .cd-acard--large .cd-acard__media { flex: 0 0 46%; aspect-ratio: auto; min-height: 280px; }
    .cd-acard--large .cd-acard__body { padding: var(--cd-space-4); justify-content: center; }
    .cd-acard--large .cd-acard__title { font-size: 1.7rem; }
    .cd-acard--large .cd-acard__excerpt { -webkit-line-clamp: 4; font-size: var(--cd-fs-base); }
}

/* --- 404 / not-found hero ----------------------------------- */
.cd-nf { padding-block: var(--cd-space-5) var(--cd-space-6); }
.cd-nf__code {
    font-family: var(--cd-font-head);
    font-weight: 800;
    font-size: clamp(5rem, 16vw, 9rem);
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--cd-primary) 0%, var(--cd-primary-deep) 60%, var(--cd-ink) 110%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--cd-space-2);
}
.cd-nf__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    margin-top: var(--cd-space-3);
}

/* --- Admin area --------------------------------------------- */
.cd-admin-banner {
    background: #FFF6E5;
    border: 1px solid #F0D9A8;
    border-radius: var(--cd-radius-sm);
    color: #7A5A12;
    padding: var(--cd-space-2);
    font-size: var(--cd-fs-sm);
    margin-bottom: var(--cd-space-3);
}

.cd-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--cd-line);
    border-radius: var(--cd-radius-sm);
    overflow: hidden;
    font-size: var(--cd-fs-sm);
}
.cd-table th, .cd-table td {
    text-align: left;
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--cd-line);
    vertical-align: top;
}
.cd-table th {
    font-family: var(--cd-font-head);
    font-weight: 700;
    color: var(--cd-ink);
    background: var(--cd-off-white);
    font-size: var(--cd-fs-xs);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.cd-table tr:last-child td { border-bottom: 0; }
.cd-table tbody tr { transition: background var(--cd-dur) var(--cd-ease); }
.cd-table tbody tr:hover { background: var(--cd-primary-faint); }
.cd-table td:first-child { font-family: var(--cd-font-head); font-weight: 600; color: var(--cd-ink); }

/* Spec-sheet table: midnight header row */
.cd-table--spec { border: 0; box-shadow: var(--cd-shadow); border-radius: var(--cd-radius); }
.cd-table--spec th { background: var(--cd-midnight); color: #fff; padding-block: 1rem; }
.cd-table--spec th:first-child { color: var(--cd-neon); }
.cd-table--spec td { padding: .95rem 1.1rem; }

.cd-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-family: var(--cd-font-head);
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.cd-badge--green { background: var(--cd-primary-light); color: var(--cd-primary-deep); }
.cd-badge--grey { background: var(--cd-off-white); color: var(--cd-muted); border: 1px solid var(--cd-line); }
.cd-badge--blue { background: #E8F1FA; color: #1C5D99; }

.cd-btn--sm { padding: .45rem .9rem; font-size: var(--cd-fs-xs); }
.cd-btn--danger { background: transparent; color: #C62828; border-color: rgba(198, 40, 40, .35); }
.cd-btn--danger:hover { background: #FDECEC; color: #B71C1C; border-color: #C62828; }

.cd-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--cd-space-2);
    margin-bottom: var(--cd-space-3);
}
.cd-admin-toolbar .cd-input { max-width: 320px; }

.cd-checkbox-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: var(--cd-fs-sm); color: var(--cd-ink); }
.cd-checkbox-row input { width: 18px; height: 18px; accent-color: var(--cd-primary); }

.cd-textarea--code { font-family: Consolas, "Cascadia Code", monospace; font-size: .85rem; min-height: 320px; }

/* ── Financial Ratio Calculator — dynamically-injected card styles ──
   Cards are created via JS innerHTML so they never get Blazor's scoped
   CSS attribute. These styles must live here (global) to reach them.
   ─────────────────────────────────────────────────────────────────── */
.frc-ratio-card {
    background: var(--cd-white);
    border-radius: var(--cd-radius-sm);
    border-left: 4px solid var(--cd-line-strong);
    padding: 14px 16px;
    box-shadow: var(--cd-shadow-sm);
    transition: box-shadow var(--cd-dur) var(--cd-ease), transform var(--cd-dur) var(--cd-ease);
}
.frc-ratio-card:hover { box-shadow: var(--cd-shadow); transform: translateY(-1px); }
.frc-green { border-left-color: var(--cd-primary); }
.frc-amber { border-left-color: #F5A623; }
.frc-red   { border-left-color: #E74C3C; }
.frc-ratio-name { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--cd-muted); margin-bottom: 3px; }
.frc-ratio-value { font-family: var(--cd-font-head); font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 3px; }
.frc-green .frc-ratio-value { color: var(--cd-primary-deep); }
.frc-amber .frc-ratio-value { color: #c47f0a; }
.frc-red   .frc-ratio-value { color: #b93126; }
.frc-ratio-bmark { font-size: 10px; color: var(--cd-muted); margin-bottom: 6px; opacity: 0.8; }
.frc-status-pill { display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; padding: 2px 9px; border-radius: 100px; margin-bottom: 8px; letter-spacing: 0.3px; }
.frc-pill-green { background: var(--cd-primary-light); color: var(--cd-primary-deep); }
.frc-pill-amber { background: rgba(245,166,35,0.12); color: #a06a00; }
.frc-pill-red   { background: rgba(231,76,60,0.10);  color: #9b2518; }
.frc-ratio-interp { font-size: 11.5px; color: var(--cd-body); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
