/* ============================================================
   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%);

    --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 { color: #fff; }
.cd-section--dark .cd-stat__label { color: #9fb0a4; }

/* 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);
}
.cd-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}
.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);
    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) -------------------------------- */
.cd-page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(70% 120% at 90% -20%, var(--cd-primary-light) 0%, transparent 60%),
        linear-gradient(180deg, var(--cd-primary-faint) 0%, var(--cd-off-white) 100%);
    border-bottom: 1px solid var(--cd-line);
    padding-block: var(--cd-space-6) var(--cd-space-5);
}
.cd-page-hero::after {
    content: "";
    position: absolute;
    top: -180px;
    right: -120px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 174, 43, 0.18), transparent 65%);
    filter: blur(60px);
    pointer-events: none;
}
.cd-page-hero > .cd-container { position: relative; z-index: 1; }
.cd-page-hero h1 { margin-bottom: var(--cd-space-2); }

/* --- 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; }

/* --- 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:hover { background: var(--cd-primary-faint); }

.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; }

@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;
    }
}
