/* =============================================================
   BrokerDefender brand stylesheet
   Palette tokens, typography, layout, components.
   ============================================================= */

:root {
    --bd-navy: #0A1D34;
    --bd-blue: #1E5FAE;
    --bd-blue-dark: #154480;
    --bd-grey: #6B7280;
    --bd-grey-light: #E5E7EB;
    --bd-bg: #F5F7FA;
    --bd-green: #16A34A;
    --bd-amber: #F59E0B;
    --bd-red: #DC2626;
    --bd-white: #FFFFFF;

    --bd-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bd-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    /* Display family used for the BROKERDEFENDER wordmark. Loaded from
       Google Fonts in _Layout.cshtml (weights 700 and 900). Stand-in
       for the Ethnocentric + Orbitron pairing the brand guidelines call
       for; Orbitron alone gives a single-family lockup that's free to
       host. If we later license Ethnocentric we add it to the front of
       this stack and the BROKER half will automatically prefer it. */
    --bd-font-display: 'Orbitron', 'Inter', system-ui, sans-serif;

    --bd-radius: 6px;
    --bd-radius-lg: 10px;

    --bd-shadow-sm: 0 1px 2px rgba(10,29,52,0.05);
    --bd-shadow: 0 4px 12px rgba(10,29,52,0.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--bd-font);
    color: var(--bd-navy);
    background: var(--bd-white);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--bd-blue);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

.bd-skip-link {
    position: fixed;
    left: 16px;
    top: 8px;
    z-index: 1000;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: var(--bd-radius);
    background: var(--bd-navy);
    color: var(--bd-white);
}
.bd-skip-link:focus { transform: translateY(0); }

/* ===== Layout ===== */
.bd-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}
.bd-narrow { max-width: 760px; }

.bd-section {
    padding: 64px 0;
}
.bd-section-tight { padding: 32px 0; }

.bd-section-alt {
    background: var(--bd-bg);
}

.bd-section-navy {
    background: var(--bd-navy);
    color: var(--bd-white);
}
.bd-section-navy a { color: #93C5FD; }

/* ===== Header ===== */
.bd-header {
    background: var(--bd-white);
    border-bottom: 1px solid var(--bd-grey-light);
    padding: 14px 0;                /* matched to 44px-tall lockup for a balanced ~72px header */
    position: sticky;
    top: 0;
    z-index: 100;
}
.bd-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.bd-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* Brand lockup PNG (truck + wordmark together). Setting height fixes
   the scale; width is auto so aspect ratio is preserved. With the
   source asset's ~5.5:1 ratio, height: 44px renders ~242px wide. */
.bd-brand-lockup {
    height: 44px;
    width: auto;
    display: block;
}

/* Legacy mark-only + text classes - kept for any pages that still use
   the old CSS lockup. Not referenced by _Layout.cshtml after the
   wordmark PNG was added. */
.bd-brand-mark {
    height: 32px;
    width: auto;
}
.bd-brand-text {
    font-weight: 800;
    font-size: 18px;
    color: var(--bd-navy);
    letter-spacing: 0.04em;
}
.bd-brand-text span { color: var(--bd-blue); }

.bd-nav {
    display: flex;
    align-items: center;
    gap: 24px;                       /* tightened from 28px to suit smaller header */
    font-weight: 500;
    font-size: 16px;                 /* tightened from 20px to better match the smaller lockup */
}
.bd-nav a {
    color: var(--bd-navy);
    text-decoration: none;
}
.bd-nav a:hover { color: var(--bd-blue); text-decoration: none; }
.bd-nav a,
.bd-nav .bd-btn-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.bd-nav-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius);
    background: var(--bd-white);
    color: var(--bd-navy);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.bd-nav-toggle-icon,
.bd-nav-toggle-icon::before,
.bd-nav-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    content: "";
}
.bd-nav-toggle-icon { position: relative; }
.bd-nav-toggle-icon::before { position: absolute; top: -6px; }
.bd-nav-toggle-icon::after { position: absolute; top: 6px; }

@media (max-width: 900px) {
    .bd-header { padding: 10px 0; }
    .bd-header-row { flex-wrap: wrap; gap: 8px 16px; }
    .bd-brand-lockup { width: min(198px, calc(100vw - 150px)); height: auto; max-height: 36px; }
    .bd-js .bd-nav-toggle { display: inline-flex; }
    .bd-nav {
        flex: 1 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 8px;
    }
    .bd-js .bd-nav { display: none; }
    .bd-js .bd-nav.is-open { display: flex; }
    .bd-nav a,
    .bd-nav .bd-inline-form,
    .bd-nav .bd-btn-link {
        width: 100%;
    }
    .bd-nav .bd-inline-form { display: block; }
    .bd-nav a,
    .bd-nav .bd-btn-link {
        justify-content: flex-start;
        padding: 10px 12px;
    }
    .bd-nav .bd-btn-primary { margin-top: 4px; justify-content: center; }
}

/* ===== Buttons ===== */
.bd-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: var(--bd-radius);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.15s ease;
    font-family: inherit;
}

/* Primary button rules.
   Specificity note: the selectors below are deliberately compound
   (`a.bd-btn-primary`, `.bd-nav .bd-btn-primary`) to win against
   the nav-scoped link rule `.bd-nav a { color: var(--bd-navy) }`,
   which would otherwise force navy text onto a blue button. */
.bd-btn-primary,
a.bd-btn-primary,
.bd-nav .bd-btn-primary {
    background: var(--bd-blue);
    color: var(--bd-white);
}
/* Hover state: background goes darker per usual; text shifts to
   grey instead of staying white. */
.bd-btn-primary:hover,
a.bd-btn-primary:hover,
.bd-nav .bd-btn-primary:hover {
    background: var(--bd-blue-dark);
    color: var(--bd-grey-light);
}

.bd-btn-secondary {
    background: var(--bd-white);
    color: var(--bd-navy);
    border-color: var(--bd-grey-light);
}
.bd-btn-secondary:hover {
    border-color: var(--bd-navy);
    color: var(--bd-navy);
}
.bd-btn-large {
    padding: 14px 28px;
    font-size: 16px;
}
.bd-btn-link {
    background: none;
    border: none;
    color: var(--bd-navy);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}
.bd-btn-link:hover { color: var(--bd-blue); }
.bd-inline-form { display: inline; }

/* ===== Typography ===== */
.bd-h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 16px 0;
}
.bd-h1-accent { color: var(--bd-blue); }
.bd-h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px 0;
}
.bd-h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}
.bd-lede {
    font-size: 18px;
    color: var(--bd-grey);
    margin: 0 0 24px 0;
    max-width: 680px;
}
.bd-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: 700;
    color: var(--bd-blue);
    margin-bottom: 12px;
}

/* ===== Hero ===== */
.bd-hero {
    padding: 80px 0 64px 0;
    background: linear-gradient(180deg, var(--bd-bg) 0%, var(--bd-white) 100%);
}
.bd-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
}
@media (max-width: 800px) {
    .bd-hero-grid { grid-template-columns: 1fr; }
}
.bd-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.bd-hero-quote {
    background: var(--bd-white);
    border-left: 4px solid var(--bd-blue);
    padding: 24px;
    border-radius: var(--bd-radius);
    box-shadow: var(--bd-shadow);
}
.bd-hero-quote-source {
    font-size: 13px;
    color: var(--bd-grey);
    margin-top: 12px;
}

/* ===== Cards ===== */
.bd-card {
    background: var(--bd-white);
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius-lg);
    padding: 24px;
    box-shadow: var(--bd-shadow-sm);
}
.bd-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* ===== Vetting page — two distinct cards =====
   The page has two visually-separate cards inside a single <form>:

     1. .bd-vet-form     - The primary action card (USDOT + Vet button).
                           White, prominent, full shadow.

     2. .bd-vet-extras   - The optional context card. Sits below with a
                           clear gap, has a tinted background and lighter
                           shadow so it reads as secondary.
*/

/* ---- Card 1: primary vetting action ---- */
.bd-vet-form {
    background: var(--bd-white);
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius-lg);
    padding: 32px;
    box-shadow: var(--bd-shadow);
}
.bd-vet-input-row {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;             /* with three children (DOT input + load-type select + Vet button) we need to wrap on narrow viewports */
}
.bd-vet-input-row input {
    flex: 1;
    font-size: 18px;
    padding: 14px 16px;
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius);
    font-family: var(--bd-font-mono);
    letter-spacing: 0.02em;
}
.bd-vet-input-row input:focus {
    outline: none;
    border-color: var(--bd-blue);
    box-shadow: 0 0 0 3px rgba(30,95,174,0.15);
}

/* Load-type dropdown - sits next to the USDOT input on the same row.
   Width is constrained so it doesn't crowd the DOT input; on mobile
   it'll stack via the existing flex-wrap on .bd-vet-input-row. */
.bd-vet-select {
    flex: 0 0 auto;
    min-width: 160px;
    font-size: 16px;
    padding: 14px 16px;
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius);
    font-family: inherit;
    background: var(--bd-white);
    color: var(--bd-navy);
    cursor: pointer;
}
.bd-vet-select:focus {
    outline: none;
    border-color: var(--bd-blue);
    box-shadow: 0 0 0 3px rgba(30,95,174,0.15);
}
/* The placeholder option (disabled "Load type…") renders grey when
   selected so it's visually distinguishable from a real choice. */
.bd-vet-select:invalid {
    color: var(--bd-grey);
}
.bd-vet-help {
    font-size: 13px;
    color: var(--bd-grey);
    margin: 0;
}

/* ---- Card 2: optional extras (load context + broker notes) ---- */
.bd-vet-extras {
    margin-top: 24px;                       /* clear gap between the two cards */
    background: var(--bd-bg);               /* tinted - signals "secondary" */
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius-lg);
    padding: 28px 32px;
    box-shadow: var(--bd-shadow-sm);        /* lighter shadow than card 1 */
}
.bd-vet-extras-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--bd-navy);
    letter-spacing: -0.01em;
    margin: 0 0 6px 0;
}
.bd-vet-extras-lede {
    font-size: 14px;
    color: var(--bd-grey);
    margin: 0 0 22px 0;
    line-height: 1.55;
}

/* ---- Sub-section headings used inside .bd-vet-extras ---- */
.bd-vet-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--bd-navy);
    margin: 0 0 4px 0;
}
.bd-vet-section-help {
    font-size: 13px;
    color: var(--bd-grey);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* Two-column grid for short text fields (load ref, origin, dest) */
.bd-vet-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .bd-vet-options { grid-template-columns: 1fr; }
}
.bd-vet-options input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius);
    font-family: inherit;
    font-size: 14px;
    background: var(--bd-white);            /* stay white against tinted card */
}
.bd-vet-options input:focus {
    outline: none;
    border-color: var(--bd-blue);
    box-shadow: 0 0 0 3px rgba(30,95,174,0.15);
}
.bd-vet-options label {
    font-size: 12px;
    color: var(--bd-grey);
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Broker notes textarea — bigger than the load-context fields */
.bd-vet-notes {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background: var(--bd-white);            /* stay white against tinted card */
}
.bd-vet-notes:focus {
    outline: none;
    border-color: var(--bd-blue);
    box-shadow: 0 0 0 3px rgba(30,95,174,0.15);
}

/* ===== Result page download gate =====
   The card on /Vet/Result/{id} shown to anonymous viewers that prompts
   them to sign in or create an account before downloading the packet.
   Two CTAs side by side (stack on mobile), with retention copy below. */
.bd-download-gate {
    background: var(--bd-bg);                /* same tint as .bd-vet-extras to feel like a 'secondary' card */
    border: 1px solid var(--bd-grey-light);
    padding: 32px;
}
.bd-download-gate-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.bd-result-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.bd-result-actions form { margin: 0; }
.bd-result-actions .bd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}
.bd-result-actions .bd-btn:disabled { opacity: 0.65; cursor: default; }
.bd-btn-watchlist { border-color: #D99100; background: var(--bd-amber); color: var(--bd-navy); }
.bd-btn-watchlist:hover { border-color: #B7791F; background: #E58D08; color: var(--bd-navy); }
.bd-btn-watchlist-action { min-width: 190px; }
.bd-btn-next { border-color: var(--bd-navy); background: var(--bd-navy); color: var(--bd-white); }
.bd-btn-next:hover { border-color: var(--bd-blue); background: var(--bd-blue); color: var(--bd-white); }
.bd-btn-success,
.bd-result-actions .bd-btn-success:disabled {
    border-color: var(--bd-green);
    background: var(--bd-green);
    color: var(--bd-white);
    opacity: 1;
}

/* ===== Decision banner ===== */
.bd-decision {
    border-radius: var(--bd-radius-lg);
    padding: 32px;
    color: var(--bd-white);
    margin-top: 24px;
}
.bd-decision-green  { background: var(--bd-green); }
.bd-decision-yellow { background: var(--bd-amber); }
.bd-decision-red    { background: var(--bd-red); }
.bd-decision-label {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.bd-decision-summary {
    font-size: 16px;
    line-height: 1.5;
}
.bd-decision-score {
    margin-top: 16px;
    font-size: 14px;
    opacity: 0.9;
}

/* ===== Reasons list ===== */
.bd-reasons { margin-top: 24px; }
.bd-reason {
    border-left: 4px solid var(--bd-grey);
    background: var(--bd-bg);
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 0 var(--bd-radius) var(--bd-radius) 0;
}
.bd-reason-critical { border-left-color: var(--bd-red); }
.bd-reason-warning  { border-left-color: var(--bd-amber); }
.bd-reason-pass     { border-left-color: var(--bd-green); }
.bd-reason-info     { border-left-color: var(--bd-blue); }
.bd-reason-factor {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
    font-weight: 700;
    color: var(--bd-grey);
}
.bd-reason-headline {
    font-size: 15px;
    font-weight: 700;
    margin: 4px 0;
}
.bd-reason-detail {
    font-size: 14px;
    color: var(--bd-grey);
}
.bd-reason-cite {
    margin-top: 8px;
    font-size: 12px;
    color: var(--bd-blue);
    font-style: italic;
}

/* ===== Carrier info table ===== */
.bd-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
.bd-info-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--bd-grey-light);
    font-size: 14px;
    vertical-align: top;
}
.bd-info-table td:first-child {
    color: var(--bd-grey);
    width: 35%;
    font-weight: 500;
}
.bd-info-table td:last-child {
    font-weight: 600;
}

/* ===== Pricing ===== */
.bd-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}
.bd-price-card {
    background: var(--bd-white);
    border: 1px solid var(--bd-grey-light);
    border-radius: var(--bd-radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
}
.bd-price-card-featured {
    border: 2px solid var(--bd-blue);
    box-shadow: var(--bd-shadow);
    position: relative;
}
.bd-price-card-featured::before {
    content: "Most popular";
    position: absolute;
    top: -12px;
    left: 24px;
    background: var(--bd-blue);
    color: var(--bd-white);
    padding: 4px 12px;
    border-radius: var(--bd-radius);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.bd-price-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.bd-price-amount {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    color: var(--bd-navy);
    margin: 8px 0;
}
.bd-price-amount small {
    font-size: 16px;
    font-weight: 500;
    color: var(--bd-grey);
}
.bd-price-desc {
    color: var(--bd-grey);
    font-size: 14px;
    margin-bottom: 16px;
    min-height: 40px;
}
.bd-price-features {
    list-style: none;
    padding: 0;
    margin: 16px 0 24px 0;
    flex: 1;
}
.bd-price-features li {
    padding: 6px 0;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.bd-price-features li::before {
    content: "✓";
    color: var(--bd-green);
    font-weight: 700;
    flex-shrink: 0;
}
.bd-price-features li.bd-feature-disabled {
    color: var(--bd-grey);
    text-decoration: line-through;
}
.bd-price-features li.bd-feature-disabled::before {
    content: "—";
    color: var(--bd-grey);
}

/* ===== Alerts ===== */
.bd-alert {
    padding: 14px 18px;
    border-radius: var(--bd-radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.bd-alert-info    { background: #DBEAFE; color: #1E40AF; border-left: 3px solid var(--bd-blue); }
.bd-alert-success { background: #DCFCE7; color: #14532D; border-left: 3px solid var(--bd-green); }
.bd-alert-warning { background: #FEF3C7; color: #78350F; border-left: 3px solid var(--bd-amber); }
.bd-alert-error   { background: #FEE2E2; color: #7F1D1D; border-left: 3px solid var(--bd-red); }

/* ===== Tables ===== */
.bd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.bd-table th, .bd-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--bd-grey-light);
}
.bd-table th {
    background: var(--bd-bg);
    font-weight: 600;
    color: var(--bd-grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
}
.bd-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.bd-pill-green  { background: #DCFCE7; color: #14532D; }
.bd-pill-yellow { background: #FEF3C7; color: #78350F; }
.bd-pill-red    { background: #FEE2E2; color: #7F1D1D; }
.bd-pill-grey   { background: var(--bd-grey-light); color: var(--bd-grey); }

/* ===== Footer =====
   Text-only brand block on the left, link group on the right.
   No image - the white-knockout truck mark looked rough without
   proper internal color separation, and footers don't need to
   repeat the brand mark from the header. */
.bd-footer {
    background: var(--bd-navy);
    color: var(--bd-white);
    padding: 56px 0 24px 0;
    margin-top: 64px;
}

/* ---------------------------------------------------------------
   Corporate-style footer: brand block + multi-column link groups.
   Grouped by INTENT (Product / Verification / Compliance / Company
   / Legal), not by feature. Reads as an institutional footer rather
   than a SaaS-startup one. The bottom strip carries copyright and
   the regulatory disclosure language - read like a regulated-entity
   footer (FDIC notice, etc.) rather than a marketing afterthought.
   --------------------------------------------------------------- */
.bd-footer-main {
    display: grid;
    grid-template-columns: 1.4fr repeat(5, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 1000px) {
    .bd-footer-main {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .bd-footer-brand-block {
        grid-column: 1 / -1;
    }
}
@media (max-width: 600px) {
    .bd-footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

/* One link group column. Each column has a small-caps heading
   followed by a vertical list of links. Heading uses the same
   eyebrow treatment as the rest of the site so the visual idiom
   carries through. */
.bd-footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bd-footer-col-heading {
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-size: 11px;
    font-weight: 700;
    color: #93C5FD;                 /* light-blue on navy, matches .bd-section-navy links */
    margin: 0 0 8px 0;
}
.bd-footer-col a {
    color: var(--bd-white);
    font-size: 13.5px;
    line-height: 1.5;
    text-decoration: none;
}
.bd-footer-col a:hover {
    color: #93C5FD;
    text-decoration: none;
}

/* Existing single-row footer styles. Kept for backward compatibility
   - the corporate footer above replaces them in _Layout.cshtml, but
   removing them would risk breaking any standalone page that still
   uses the old structure. */
.bd-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;        /* tagline can wrap, so anchor to top */
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* Brand block: stacks the wordmark above its tagline. */
.bd-footer-brand-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* The wordmark <p>. The font-family and weight defaults live on the
   child .bd-wordmark-* spans so the two halves can differ. */
.bd-footer-brand {
    font-size: 22px;
    margin: 0;
    color: var(--bd-white);
    line-height: 1;                 /* tight - display type doesn't need leading */
}

/* "BROKER" half: heaviest weight, normal tracking.
   This is the visual stand-in for Ethnocentric Bold. */
.bd-wordmark-broker {
    font-family: var(--bd-font-display);
    font-weight: 900;
    color: var(--bd-white);
    letter-spacing: 0.01em;
}

/* "DEFENDER" half: slightly lighter weight, wider tracking, blue
   accent. Matches the spec "Orbitron Bold with increased tracking". */
.bd-wordmark-defender {
    font-family: var(--bd-font-display);
    font-weight: 700;
    color: #93C5FD;
    letter-spacing: 0.08em;
    margin-left: 0.04em;            /* tiny optical gap from BROKER */
}

.bd-footer-tag {
    color: #B8C2D1;                 /* lighter than the previous #9CA3AF for better contrast on navy */
    font-size: 14px;
    margin: 6px 0 0 0;              /* small top spacing now that wordmark is tighter */
    max-width: 360px;
}

/* Link group: right side, vertically centered with the brand wordmark. */
.bd-footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 6px;              /* visually aligns with the wordmark baseline */
}
.bd-footer-links a {
    color: var(--bd-white);
    font-size: 14px;
}
.bd-footer-fine {
    border-top: 1px solid #1F2937;
    padding-top: 16px;
    font-size: 12px;
    color: #6B7280;
}

/* Bottom strip on the corporate footer: copyright on the left,
   regulatory/disclaimer language on the right. Stacks on narrow
   viewports. Type stays small and quiet - this isn't decoration,
   it's the kind of line a regulated-business footer carries. */
.bd-footer-bottom {
    border-top: 1px solid #1F2937;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #6B7280;
}
.bd-footer-bottom-disclosure {
    max-width: 640px;
    text-align: right;
}
@media (max-width: 700px) {
    .bd-footer-bottom-disclosure {
        text-align: left;
    }
}

/* ===== Loading ===== */
.bd-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--bd-white);
    border-radius: 50%;
    animation: bd-spin 0.6s linear infinite;
}
@keyframes bd-spin { to { transform: rotate(360deg); } }

/* ===== Utility ===== */
.bd-text-center { text-align: center; }
.bd-mt-1 { margin-top: 8px; }
.bd-mt-2 { margin-top: 16px; }
.bd-mt-3 { margin-top: 24px; }
.bd-mt-4 { margin-top: 32px; }
.bd-mb-2 { margin-bottom: 16px; }
.bd-mono {
    font-family: var(--bd-font-mono);
    /* No font-size override. Monospaced fonts have a smaller x-height than
       Inter at the same nominal size, so digits look slightly less tall -
       this is just how mono fonts work and is the right trade-off here.
       Trying to compensate with em scaling caused the mono cells to look
       comically large at 1.07em on the result page. Accept the mild
       visual difference; the mono font is doing its job either way by
       signaling "this is an identifier, not prose." */
}
.bd-grey { color: var(--bd-grey); }
.bd-small { font-size: 13px; }

/* ============================================================
   ACCOUNT + IDENTITY
   One shared shell covers the custom account pages and the stock
   ASP.NET Identity forms. Identity's Bootstrap-shaped class names are
   mapped here without loading Bootstrap.
   ============================================================ */

.bd-account-section { background: var(--bd-bg); min-height: 620px; }
.bd-account-header { margin-bottom: 28px; max-width: 760px; }
.bd-account-title {
    margin: 4px 0 6px;
    color: var(--bd-navy);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}
.bd-account-lead { margin: 0; color: var(--bd-grey); font-size: 16px; }

.bd-account-layout {
    display: grid;
    grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.bd-account-sidebar,
.bd-account-panel {
    background: var(--bd-white);
    border: 1px solid #DCE2EA;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(10, 29, 52, 0.05);
}
.bd-account-sidebar { padding: 12px; }
.bd-account-panel { padding: clamp(22px, 4vw, 38px); }
.bd-account-panel-heading { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--bd-grey-light); }
.bd-account-panel-heading h2,
.bd-account-panel > h3:first-child {
    margin: 0 0 6px;
    color: var(--bd-navy);
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.bd-account-panel-heading p { margin: 0; color: var(--bd-grey); font-size: 14px; }

.bd-account-nav-group + .bd-account-nav-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--bd-grey-light); }
.bd-account-nav-label {
    margin: 0 10px 6px;
    color: var(--bd-grey);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.bd-account-nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 2px 0;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--bd-navy);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
}
.bd-account-nav-link:hover { background: #EDF3FA; color: var(--bd-blue); text-decoration: none; }
.bd-account-nav-link.active { background: var(--bd-navy); color: var(--bd-white); }

.bd-account-overview-grid,
.bd-account-summary-grid,
.bd-account-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.bd-account-tile,
.bd-account-summary-card,
.bd-account-plan-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid #DCE2EA;
    border-radius: 10px;
    background: var(--bd-white);
}
.bd-account-tile {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.bd-account-tile:hover {
    border-color: #9CB8D8;
    box-shadow: 0 7px 18px rgba(10, 29, 52, 0.09);
    transform: translateY(-2px);
    text-decoration: none;
}
.bd-account-tile .bd-h3 { margin-bottom: 4px; font-size: 17px; }
.bd-account-tile p { margin: 0; line-height: 1.45; }
.bd-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: 9px;
    background: #EAF1F8;
    color: var(--bd-blue);
}
.bd-account-summary-card .bd-h3 { margin: 5px 0 10px; font-size: 24px; }
.bd-account-plans { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--bd-grey-light); scroll-margin-top: 96px; }
.bd-account-plan-grid { margin-top: 16px; }
.bd-account-plan-card { display: flex; flex-direction: column; }
.bd-account-plan-card.is-current { border: 2px solid var(--bd-blue); box-shadow: 0 0 0 3px rgba(30, 95, 174, 0.08); }

.bd-account-alert {
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid #BFDBFE;
    border-left: 4px solid var(--bd-blue);
    border-radius: 8px;
    background: #EFF6FF;
    color: #1E3A5F;
}
.bd-account-alert > :first-child { margin-top: 0; }
.bd-account-alert > :last-child { margin-bottom: 0; }
.bd-account-alert--success { border-color: #BBF7D0; border-left-color: var(--bd-green); background: #F0FDF4; color: #14532D; }
.bd-account-alert--warning { border-color: #FDE68A; border-left-color: #B7791F; background: #FFFBEB; color: #78350F; }
.bd-account-alert--error { border-color: #FECACA; border-left-color: var(--bd-red); background: #FEF2F2; color: #7F1D1D; }

.bd-field { margin-bottom: 24px; max-width: 560px; }
.bd-field label,
.bd-field-label {
    display: block;
    margin-bottom: 7px;
    color: var(--bd-navy);
    font-size: 14px;
    font-weight: 700;
}
.bd-field .bd-input { width: 100%; max-width: none; }
.bd-field-help { margin: 7px 0 0; color: var(--bd-grey); font-size: 13px; }
.bd-field-error,
.bd-form-errors { display: block; margin-top: 5px; color: #B42318; font-size: 13px; }
.bd-form-errors:empty,
.bd-field-error:empty { display: none; }
.bd-account-readonly { margin: 0; padding: 12px 14px; border: 1px solid var(--bd-grey-light); border-radius: 8px; background: var(--bd-bg); overflow-wrap: anywhere; }
.bd-form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bd-account-panel .bd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

/* Identity authentication cards */
.bd-identity {
    max-width: 520px;
    margin: 0 auto;
    padding: 32px;
    border: 1px solid #DCE2EA;
    border-radius: 12px;
    background: var(--bd-white);
    box-shadow: 0 2px 8px rgba(10, 29, 52, 0.05);
}
.bd-identity--manage { max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.bd-identity:not(.bd-identity--manage) .col-md-6:nth-child(2),
.bd-identity:not(.bd-identity--manage) .col-md-4:nth-child(2) { display: none; }
.bd-identity .row { display: block; }
.bd-identity .col-md-3,
.bd-identity .col-md-4,
.bd-identity .col-md-6,
.bd-identity .col-md-8,
.bd-identity .col-md-9 { width: 100%; max-width: none; }
.bd-identity:not(.bd-identity--manage) .col-md-6:first-child > h2 { display: none; }

.bd-identity h1 { margin: 0 0 8px; color: var(--bd-navy); font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; }
.bd-identity h2 { margin: 0 0 18px; color: var(--bd-grey); font-size: 15px; font-weight: 500; }
.bd-identity h3 { margin: 0 0 18px; color: var(--bd-navy); font-size: 25px; line-height: 1.2; letter-spacing: -0.02em; }
.bd-identity h4 { margin: 24px 0 9px; color: var(--bd-navy); font-size: 17px; line-height: 1.3; }
.bd-identity p,
.bd-identity li { color: #4B5563; font-size: 14px; }
.bd-identity hr { margin: 20px 0; border: 0; border-top: 1px solid var(--bd-grey-light); }

.bd-identity .form-floating,
.bd-account-form .form-floating { position: relative; margin-bottom: 16px; }
.bd-identity .form-control,
.bd-identity input.form-control,
.bd-account-form .form-control,
.bd-account-form input.form-control {
    width: 100%;
    min-height: 52px;
    padding: 22px 14px 8px;
    border: 1px solid #CBD3DE;
    border-radius: 8px;
    background: var(--bd-white);
    color: var(--bd-navy);
    font: inherit;
}
.bd-identity .form-control:focus,
.bd-account-form .form-control:focus { outline: none; border-color: var(--bd-blue); box-shadow: 0 0 0 3px rgba(30, 95, 174, 0.14); }
.bd-identity .form-control::placeholder,
.bd-account-form .form-control::placeholder { color: #8A94A3; }
.bd-identity .form-floating > label,
.bd-account-form .form-floating > label {
    position: absolute;
    top: 6px;
    left: 14px;
    margin: 0;
    color: #596579;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
}
.bd-account-form { width: 100%; }
.bd-account-form-field { margin-bottom: 24px; }
.bd-account-form-field .form-floating { margin-bottom: 0; }
.bd-account-form .bd-form-control-readonly {
    background: var(--bd-bg);
    color: #4B5563;
    cursor: default;
}
.bd-account-form .bd-form-control-readonly:focus {
    border-color: #CBD3DE;
    box-shadow: none;
}
.bd-account-form .bd-account-submit { width: 100%; }
.bd-watchlist-form-row {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(300px, 2fr) auto;
    gap: 12px;
    align-items: stretch;
}
.bd-watchlist-form-row .form-floating { margin-bottom: 0; }
.bd-watchlist-form-row .bd-btn { min-height: 52px; }
@media (max-width: 760px) {
    .bd-watchlist-form-row { grid-template-columns: 1fr; }
    .bd-watchlist-form-row .bd-btn { width: 100%; }
}
.bd-identity .form-check,
.bd-identity .checkbox { display: flex; align-items: center; gap: 9px; min-height: 44px; margin: 12px 0; }
.bd-identity .form-check-input { width: 18px; height: 18px; margin: 0; accent-color: var(--bd-blue); }
.bd-identity .form-check-label { margin: 0; color: var(--bd-navy); font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: normal; }

.bd-identity .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 19px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: 650 14px/1.2 var(--bd-font);
    cursor: pointer;
    text-decoration: none;
}
.bd-identity .btn:hover { text-decoration: none; }
.bd-identity .btn-primary { background: var(--bd-blue); color: var(--bd-white); }
.bd-identity .btn-primary:hover { background: var(--bd-blue-dark); }
.bd-identity .btn-secondary { border-color: #CBD3DE; background: var(--bd-white); color: var(--bd-navy); }
.bd-identity .btn-secondary:hover { border-color: var(--bd-blue); color: var(--bd-blue); }
.bd-identity .btn-danger { background: #B42318; color: var(--bd-white); }
.bd-identity .btn-warning { background: #B7791F; color: var(--bd-white); }
.bd-identity .btn-lg { padding: 12px 22px; font-size: 15px; }
.bd-identity .w-100 { width: 100%; }

.bd-identity .alert {
    margin: 0 0 18px;
    padding: 13px 15px;
    border: 1px solid #BFDBFE;
    border-left: 4px solid var(--bd-blue);
    border-radius: 8px;
    background: #EFF6FF;
    color: #1E3A5F;
    font-size: 14px;
}
.bd-identity .alert-success { border-color: #BBF7D0; border-left-color: var(--bd-green); background: #F0FDF4; color: #14532D; }
.bd-identity .alert-warning { border-color: #FDE68A; border-left-color: #B7791F; background: #FFFBEB; color: #78350F; }
.bd-identity .alert-danger { border-color: #FECACA; border-left-color: var(--bd-red); background: #FEF2F2; color: #7F1D1D; }
.bd-identity .text-danger,
.bd-identity .field-validation-error,
.bd-identity .validation-summary-errors { color: #B42318; font-size: 13px; }
.bd-identity .validation-summary-errors ul { margin: 0 0 18px; padding: 0; list-style: none; }
.bd-identity .validation-summary-errors li { margin-bottom: 6px; padding: 10px 12px; border-left: 3px solid var(--bd-red); border-radius: 6px; background: #FEF2F2; color: #7F1D1D; }

.bd-identity kbd,
.bd-identity code,
.bd-identity .recovery-code { font-family: var(--bd-font-mono); font-size: 13px; }
.bd-identity kbd { padding: 4px 7px; border: 1px solid #D5DCE5; border-radius: 6px; background: var(--bd-bg); color: var(--bd-navy); overflow-wrap: anywhere; }
.bd-identity #qrCode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 222px;
    min-height: 222px;
    margin: 14px 0 20px;
    padding: 14px;
    border: 1px solid #DCE2EA;
    border-radius: 10px;
    background: var(--bd-white);
}
.bd-identity #qrCode img,
.bd-identity #qrCode canvas { display: block; max-width: 100%; height: auto; }
.bd-identity #qrCode.bd-qr-unavailable { max-width: 360px; color: #7F1D1D; font-size: 13px; text-align: left; }

.bd-identity .mt-3 { margin-top: 16px; }
.bd-identity .mb-3 { margin-bottom: 16px; }
.bd-identity .my-3 { margin: 16px 0; }
.bd-identity .py-3 { padding: 16px 0; }
.bd-identity .text-center { text-align: center; }

@media (max-width: 760px) {
    .bd-account-section { min-height: auto; }
    .bd-account-layout { grid-template-columns: 1fr; gap: 18px; }
    .bd-account-sidebar { padding: 10px; }
    .bd-account-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .bd-account-nav-group + .bd-account-nav-group { margin: 0; padding: 0 0 0 10px; border-top: 0; border-left: 1px solid var(--bd-grey-light); }
    .bd-account-overview-grid,
    .bd-account-summary-grid,
    .bd-account-plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .bd-account-section { padding: 36px 0; }
    .bd-account-header { margin-bottom: 20px; }
    .bd-account-nav { grid-template-columns: 1fr; }
    .bd-account-nav-group + .bd-account-nav-group { margin-top: 10px; padding: 12px 0 0; border-top: 1px solid var(--bd-grey-light); border-left: 0; }
    .bd-account-panel,
    .bd-identity { padding: 20px; }
    .bd-account-tile,
    .bd-account-summary-card,
    .bd-account-plan-card { padding: 17px; }
}

/* Sample report link rows */
.bd-sample-links { display:flex; flex-wrap:wrap; gap:8px; }
.bd-sample-links .bd-btn { font-size: 13px; padding: 8px 14px; }

/* Hero report thumbnail */
.bd-hero-visual { align-self: center; }
.bd-hero-report-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(18, 42, 76, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}
.bd-hero-visual a:hover .bd-hero-report-img {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 16px 40px rgba(18, 42, 76, 0.24);
}

/* Keep the keyboard indicator after all component-specific :focus rules so
   legacy outline resets cannot suppress it. */
:where(a, button, input, select, textarea):focus-visible,
.bd-vet-input-row input:focus-visible,
.bd-vet-select:focus-visible,
.bd-vet-options input:focus-visible,
.bd-vet-notes:focus-visible,
.bd-identity .form-control:focus-visible,
.bd-identity input.form-control:focus-visible {
    outline: 3px solid #2563EB;
    outline-offset: 3px;
}
