/* The dealer program page (views/dealers.ejs).
 *
 * THE PALETTE IS THE "WHY LIST WITH US" SCHEME, not a new one. The section is a
 * white panel, the things inside it are #f8f9fa cards with a hairline border and
 * a soft shadow, headings are the flag navy #032350, body copy is #6b7280, and a
 * feature card hovers to navy with a gold heading — public/css/whyListWithUs.css.
 * Dark mode: the SECTION goes to the page gradient as theme.css does for that
 * section, but the CARDS follow the home page's PRICING section — the same dark
 * surface as the calculator's --aal-surface — with the antique-gold outline
 * kept. They were white with a gold outline (the Why-List rule) until UAT #56
 * on 2026-09-26 found white boxes reading as glare on this page's gradient.
 *
 * Every value below is stated once as a --dp- token on .dp-main, with the dark
 * set redefined in one block. Still not built on the --aal-* tokens directly:
 * the calculator keeps those, and this page's card text has its own contrast
 * needs. Load AFTER aalPricing.css.
 *
 * The page ground is .PageContainer — #f4f4f4 in light (sitewide.css), the
 * sitewide --bg-gradient in dark (theme.css) — identical to the homepage.
 */

.dp-main {
    /* Light — the literal whyListWithUs.css values. */
    --dp-section-bg:    #ffffff;
    --dp-section-line:  #e5e7eb;
    --dp-panel-bg:      #f8f9fa;
    --dp-panel-border:  #e5e7eb;
    --dp-table-line:    #e5e7eb;
    --dp-panel-shadow:  0 2px 4px rgba(0, 0, 0, .06);
    --dp-heading:       #032350;   /* flag navy (canton) */
    --dp-body:          #6b7280;
    --dp-ink:           #0d1526;
    --dp-eyebrow:       #da1515;   /* theme.css --danger */
    --dp-gold:          #C5A76C;
    --dp-primary:       #1e40af;   /* theme.css --primary-hover: what actually paints */
    --dp-radius:        12px;
    --dp-radius-sm:     8px;
    --dp-mono:          ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Text that sits directly ON the section rather than on a card — the only
     * thing whose ground actually changes between modes. */
    --dp-on-section:        #032350;
    --dp-on-section-body:   #6b7280;
    --dp-on-section-strong: #0d1526;
    --dp-code-bg:           #f8f9fa;
    --dp-code-border:       #e5e7eb;
    --dp-code-fg:           #0d1526;

    /* .aal-pricing paints its own --bg-page ground, which in dark mode is a FLAT
     * navy inside a page painted with a GRADIENT — a visible 1080px-wide seam.
     * The page container's ground is the right one in both modes. Same
     * specificity as the rule it overrides; this file is linked after it. */
    background: transparent;
    padding: clamp(22px, 3.5vw, 34px) 20px 8px;
}

/* Dark — the section wrapper takes the gradient like .whyListWithUs, but the
 * cards follow the home page's PRICING section (aalPricing.css dark
 * --aal-surface), not the white Why-List cards: /dealers is a pricing page,
 * and its white boxes read as glare on the gradient (UAT #56, 2026-09-26).
 * The antique-gold outline stays; the hover (navy, gold heading) is unchanged.
 * Card-borne colours ARE redefined now, because the card is dark. */
[data-theme="dark"] .dp-main {
    --dp-section-bg:    var(--bg-gradient);
    --dp-section-line:  rgba(255, 255, 255, .14);
    --dp-panel-bg:      #1e2f52;
    --dp-panel-border:  #C5A76C;
    --dp-panel-shadow:  0 2px 6px rgba(0, 0, 0, .35);
    --dp-heading:       #e8edf5;
    --dp-body:          #9fb0c9;
    --dp-ink:           #e8edf5;
    --dp-table-line:    rgba(255, 255, 255, .14);
    --dp-eyebrow:       #f87171;   /* theme.css .section-eyebrow on dark */

    --dp-on-section:        var(--primary);   /* theme.css .SectionTitle on dark */
    --dp-on-section-body:   #94a3b8;
    --dp-on-section-strong: #ffffff;
    --dp-code-bg:           rgba(255, 255, 255, .10);
    --dp-code-border:       rgba(255, 255, 255, .20);
    --dp-code-fg:           #e8edf5;
}

/* ─── banner ─── */
/* Full-bleed, so it sits outside .dp-main's max-width. The navy is the promo
 * ticket gradient (promotions.css .offer-ticket) that the calculator below uses,
 * which is why the calculator is NOT inside the banner — navy on navy. */
.dp-banner {
    background: linear-gradient(135deg, #0d1526 0%, #1e3a8a 100%);
    color: #fff;
    padding: clamp(44px, 7vw, 76px) 20px clamp(40px, 6vw, 64px);
}
.dp-banner-inner { max-width: 1080px; margin: 0 auto; }
.dp-eyebrow {
    font-size: 0.7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: #C5A76C; margin: 0 0 14px;
}
.dp-banner h1 {
    font-size: clamp(2rem, 5.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em;
    line-height: 1.05; margin: 0; max-width: 17ch; text-wrap: balance;
}
.dp-banner-sub {
    margin: 20px 0 0; max-width: 56ch; line-height: 1.6;
    font-size: clamp(1rem, 1.9vw, 1.15rem); color: rgba(255, 255, 255, .78);
}
.dp-banner-sub b { color: #fff; font-weight: 600; }

/* ─── section panels ─── */
/* .whyListWithUs is a white section with padding; this adds the border and
 * radius, because on a page this long a section with no edge left the copy
 * columns floating beside cards that had one. */
.dp-sec {
    background: var(--dp-section-bg);
    border: 1px solid var(--dp-section-line);
    border-radius: var(--dp-radius);
    padding: clamp(24px, 4vw, 38px);
    margin-bottom: 18px;
}
.dp-sec-eyebrow {
    font-size: 0.68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--dp-eyebrow); margin: 0 0 10px;
}
.dp-sec h2 {
    font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; letter-spacing: -0.015em;
    line-height: 1.12; color: var(--dp-on-section); margin: 0; text-wrap: balance;
}
.dp-lede { margin: 14px 0 0; max-width: 62ch; color: var(--dp-on-section-body); font-size: 1rem; line-height: 1.6; }
.dp-sec-head { margin-bottom: 30px; }

/* ─── cards ─── */
.dp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dp-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .dp-grid2, .dp-grid3 { grid-template-columns: 1fr; } }

/* .whyList-feature, to the value. */
.dp-card {
    background-color: var(--dp-panel-bg);
    border: 1px solid var(--dp-panel-border);
    border-radius: var(--dp-radius);
    padding: 24px;
    box-shadow: var(--dp-panel-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.dp-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--dp-heading); margin: 0 0 10px; }
.dp-card p { margin: 0; color: var(--dp-body); font-size: 0.95rem; line-height: 1.6; }
/* The hover is whyList's: lift to navy, heading to antique gold, body to a
 * translucent white. In dark the gold outline stays, exactly as theme.css keeps
 * it on .whyList-feature:hover and the heroes cards. */
.dp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    background: #0d1526;
    border-color: #0d1526;
}
[data-theme="dark"] .dp-card:hover { border-color: #C5A76C; }
.dp-card:hover h3 { color: #C5A76C; }
.dp-card:hover p { color: rgba(255, 255, 255, .75); }
.dp-card:hover .dp-tag { color: rgba(255, 255, 255, .6); border-color: rgba(255, 255, 255, .3); }
.dp-card:hover .dp-metric { color: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .25); }
.dp-card.is-accent { border-left: 3px solid var(--dp-gold); }

.dp-tag {
    display: inline-block; font-family: var(--dp-mono);
    font-size: 0.66rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--dp-body); border: 1px solid var(--dp-panel-border);
    border-radius: 5px; padding: 3px 8px; margin: 0 0 12px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

/* ─── the three headline facts under the ladder ─── */
.dp-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
@media (max-width: 760px) { .dp-facts { grid-template-columns: 1fr; } }
.dp-fact {
    background-color: var(--dp-panel-bg);
    border: 1px solid var(--dp-panel-border);
    border-radius: var(--dp-radius);
    padding: 24px;
    box-shadow: var(--dp-panel-shadow);
}
.dp-fact-n {
    font-family: var(--dp-mono); font-size: 1.4rem; font-weight: 600;
    color: var(--dp-heading); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.dp-fact h4 { font-size: 1.05rem; font-weight: 700; color: var(--dp-heading); margin: 10px 0 6px; }
.dp-fact p { margin: 0; font-size: 0.95rem; color: var(--dp-body); line-height: 1.6; }

/* ─── tables (ladder + roles) ─── */
/* A card by the same rules; no hover, because a reference table is read, not
 * chosen. */
.dp-tablewrap {
    overflow-x: auto;
    background-color: var(--dp-panel-bg);
    border: 1px solid var(--dp-panel-border);
    border-radius: var(--dp-radius);
    box-shadow: var(--dp-panel-shadow);
    padding: 6px;
}
.dp-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.dp-table th {
    text-align: left; font-size: 0.66rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--dp-body); font-weight: 700; padding: 12px 14px;
    border-bottom: 1px solid var(--dp-table-line); white-space: nowrap;
}
.dp-table td { padding: 12px 14px; border-bottom: 1px solid var(--dp-table-line); color: var(--dp-ink); }
.dp-table tbody tr:last-child td { border-bottom: 0; }
.dp-table .num {
    text-align: right; font-family: var(--dp-mono); font-variant-numeric: tabular-nums;
}
.dp-table .mid { text-align: center; font-weight: 700; color: var(--dp-heading); }
.dp-table .no { color: var(--dp-body); font-weight: 400; }

/* ─── tick lists (directly on the section) ─── */
.dp-ticks { list-style: none; margin: 20px 0 0; padding: 0; }
.dp-ticks li {
    position: relative; padding: 7px 0 7px 22px;
    font-size: 0.95rem; color: var(--dp-on-section-body); line-height: 1.6;
}
.dp-ticks li::before {
    content: ""; position: absolute; left: 0; top: 15px;
    width: 8px; height: 8px; border-radius: 2px; background: var(--dp-gold);
}
.dp-ticks li b { color: var(--dp-on-section-strong); font-weight: 600; }
/* Field names quoted from a dealer's own export. */
.dp-ticks code {
    font-family: var(--dp-mono); font-size: 0.86em;
    background: var(--dp-code-bg); color: var(--dp-code-fg);
    border: 1px solid var(--dp-code-border); border-radius: 4px; padding: 1px 5px;
}

/* ─── split (copy beside a card) ─── */
.dp-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 34px; align-items: start; }
@media (max-width: 860px) { .dp-split { grid-template-columns: 1fr; gap: 22px; } }

/* ─── metric chips (inside a card, so border-only in both modes) ─── */
.dp-metrics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.dp-metric {
    font-family: var(--dp-mono); font-size: 0.74rem; color: var(--dp-body);
    background: transparent; border: 1px solid var(--dp-panel-border);
    border-radius: 6px; padding: 5px 9px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

/* ─── closer ─── */
/* The navy block is identical in both modes, like the banner. */
.dp-closer {
    background: linear-gradient(135deg, #0d1526 0%, #1e3a8a 100%);
    color: #fff; text-align: center; padding: clamp(44px, 6vw, 64px) 20px;
    border-radius: var(--dp-radius); margin: 0 0 clamp(28px, 4vw, 40px);
}
.dp-closer h2 {
    font-size: clamp(1.5rem, 3.6vw, 2.2rem); font-weight: 800; letter-spacing: -0.015em;
    margin: 0; color: #fff; text-wrap: balance;
}
.dp-closer p { margin: 14px auto 26px; max-width: 52ch; color: rgba(255, 255, 255, .78); line-height: 1.6; }

/* Matches .aal-cta (aalPricing.css) — the same gold button the calculator uses. */
.dp-cta {
    background-color: var(--dp-gold); color: #2A1F04; text-decoration: none;
    font-size: 0.92rem; font-weight: 600; padding: 12px 26px;
    border-radius: var(--dp-radius-sm); display: inline-block; border: none;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.dp-cta:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); color: #2A1F04; }
.dp-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Sits on the page ground, outside every section. */
.dp-backlink { margin: 0 0 4px; font-size: 0.9rem; color: var(--dp-on-section-body); text-align: center; }
.dp-backlink a { color: var(--dp-primary); font-weight: 600; }
[data-theme="dark"] .dp-backlink a { color: #93b4f5; }

@media (prefers-reduced-motion: reduce) {
    .dp-card, .dp-tag, .dp-metric, .dp-cta { transition: none; }
    .dp-card:hover, .dp-cta:hover { transform: none; }
}
