
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
        }

        h1, h2 {
            color: #007bff;
            text-align: center;
            font-weight: 700;
        }

        h1 {
            font-size: 2.5em;
            margin-top: 50px;
        }

        h2 {
            font-size: 2em;
            margin-top: 40px;
        }

        .page-title {
            color: #333;
            font-size: 1.5em;
            text-align: center;
            margin-bottom: 20px;
            font-weight: 600;
        }

        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            margin-top: 50px;
            width: 100%;
            margin-left: auto;
            margin-right: auto;
        }

        .authenticated-user-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .broker-accounts-page .authenticated-user-actions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            align-items: stretch;
            gap: 18px;
            width: min(960px, calc(100vw - 32px));
        }

        .broker-enrollment-card {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
            min-height: 170px;
            padding: 20px;
            background: #fff;
            border: 1px solid #d9e2f2;
            border-radius: 12px;
            box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
            box-sizing: border-box;
        }

        .broker-enrollment-card h3 {
            margin: 0;
            color: #1e3a5f;
            font-size: 1.2rem;
        }

        .broker-enrollment-card .login-button {
            margin: 0;
        }

        .broker-option {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #334155;
            cursor: pointer;
        }

        .broker-option input {
            width: 16px;
            height: 16px;
            margin: 0;
        }

        .broker-enrollment-note {
            margin: auto 0 0;
            color: #64748b;
            font-size: 0.88rem;
            line-height: 1.45;
        }

        .login-button-secondary {
            background-color: #64748b;
        }

        .login-button-secondary:hover {
            background-color: #475569;
        }

        .login-button {
            display: inline-block;
            padding: 10px 20px;
            font-size: 16px;
            color: #fff;
            background-color: #4285F4;
            border: none;
            border-radius: 5px;
            text-decoration: none;
            cursor: pointer;
            transition: background-color 0.3s ease;
            margin-bottom: 20px;
        }

        .login-button:hover {
            background-color: #357ae8;
        }

        .mobile-app-links {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 12px;
            margin: 0 auto 24px;
            padding: 0 16px;
        }

        .mobile-app-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 190px;
            padding: 10px 18px;
            color: #fff;
            background-color: #111827;
            border-radius: 8px;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
            font-size: 15px;
            font-weight: 700;
            text-decoration: none;
            transition: background-color 0.2s ease, transform 0.2s ease;
        }

        .mobile-app-link:hover {
            background-color: #1f2937;
            transform: translateY(-1px);
        }

        table {
            width: 80%;
            margin: 20px auto;
            border-collapse: collapse;
        }

        th, td {
            padding: 10px;
            text-align: center;
            border: 1px solid #ddd;
        }

        th {
            background-color: #007bff;
            color: white;
        }

        .positive {
            color: green;
        }

        .negative {
            color: red;
        }

        .highlight {
            font-weight: bold;
        }

        .alert {
            padding: 15px;
            margin-bottom: 20px;
            border: 1px solid transparent;
            border-radius: 4px;
            text-align: center;
        }

        .alert-success {
            color: #155724;
            background-color: #d4edda;
            border-color: #c3e6cb;
        }

        .alert-danger {
            color: #721c24;
            background-color: #f8d7da;
            border-color: #f5c6cb;
        }

        .account-summary {
            width: 80%;
            margin: 20px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }

        /* Modal Styles */
        .modal {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            z-index: 9999; /* HIGHER than anything else */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            background-color: rgba(0,0,0,0.7); /* DARKER overlay */
            pointer-events: auto; /* Ensure it blocks background clicks */
        }

        .modal-content {
            background-color: #fefefe;
            margin: 5% auto; /* Higher on screen */
            padding: 25px;
            border: 1px solid #888;
            width: 90%;
            max-width: 550px;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            position: relative;
            z-index: 10000;
        }

        /* Ensure the body or main container doesn't have a stacking context that traps the modal */
        /* If headers are z-index 10, then 9999 is plenty, but we must ensure nothing else is higher */
        .table-scroll-container thead th {
            position: sticky;
            top: 0;
            background-color: #e5e7eb !important;
            color: #111 !important;
            z-index: 10;
        }

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

footer a {
    margin: 0 10px;
    text-decoration: none;
    color: #007bff;
}

/* Broker Accounts page inline edit fields */
.broker-accounts-table input.account-edit-input {
    width: 95%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
}

.broker-accounts-table td {
    vertical-align: middle;
}

.save-account-button {
    margin-bottom: 0; /* override button spacing in table rows */
}


/* ==============================
   Click-to-sort table headers
   ============================== */
th.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

th.sortable-th::after {
    content: " ↕";
    font-size: 12px;
    opacity: 0.7;
}

th.sortable-th.sort-asc::after {
    content: " ↑";
}

th.sortable-th.sort-desc::after {
    content: " ↓";
}


/* 1) Give the card more room (optional but helps a lot) */
.account-summary {
  width: 95%;
  max-width: 95%;
}

/* 2) Stop forcing a big min-width, and force columns to fit */
.orders-wrapper table {
  min-width: 0 !important;     /* overrides min-width: 1200px */
  width: 100%;
  table-layout: fixed;          /* forces all columns to fit */
}

/* 3) Allow text to wrap inside cells (prevents horizontal overflow) */
.orders-wrapper th,
.orders-wrapper td {
  white-space: normal;
  overflow-wrap: anywhere;      /* breaks long text if needed */
  word-break: break-word;
}

/* Optional: tighten spacing so everything fits nicer */
.orders-wrapper th,
.orders-wrapper td {
  padding: 6px 8px;
  font-size: 13px;
}
.orders-wrapper th,
.orders-wrapper td {
  font-size: 1.05em;     /* +5% */
  line-height: 1.25;     /* makes rows feel taller + improves readability */
  padding-top: 9px;      /* adjust up/down if you want more/less height */
  padding-bottom: 9px;
}

/* Public landing page */
:root {
    --landing-ink: #10233f;
    --landing-muted: #5d6b80;
    --landing-blue: #1565d8;
    --landing-blue-dark: #0b3f91;
    --landing-mint: #22a06b;
    --landing-line: #dce5ef;
    --landing-soft: #f4f8fc;
    --landing-white: #ffffff;
}

.landing-page,
.landing-section,
.site-footer {
    box-sizing: border-box;
    color: var(--landing-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.landing-page {
    background:
        radial-gradient(circle at 78% 16%, rgba(45, 132, 255, 0.18), transparent 28%),
        linear-gradient(145deg, #f7fbff 0%, #eef5fc 46%, #ffffff 100%);
    border-bottom: 1px solid var(--landing-line);
}

.landing-hero {
    margin: 0 auto;
    max-width: 1280px;
    padding: 0 38px 72px;
}

.landing-nav {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 76px;
}

.brand-lockup {
    align-items: center;
    color: var(--landing-ink);
    display: inline-flex;
    font-size: 18px;
    font-weight: 800;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(145deg, var(--landing-blue), var(--landing-blue-dark));
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    height: 36px;
    justify-content: center;
    letter-spacing: .04em;
    width: 36px;
}

.landing-nav-links {
    align-items: center;
    display: flex;
    gap: 28px;
}

.landing-nav-links a {
    color: #3e526e;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.landing-nav-links a:hover { color: var(--landing-blue); }

.hero-grid {
    align-items: center;
    display: grid;
    gap: 70px;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    padding-top: 58px;
}

.eyebrow {
    color: var(--landing-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    margin: 0 0 13px;
    text-transform: uppercase;
}

.hero-copy h1,
.landing-section h2,
.hero-panel h2 {
    color: var(--landing-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
}

.hero-copy h1 {
    font-size: clamp(42px, 5vw, 68px);
    letter-spacing: -.045em;
    line-height: 1.03;
    margin: 0;
    max-width: 780px;
}

.hero-copy h1 span { color: var(--landing-blue); }

.hero-lede {
    color: var(--landing-muted);
    font-size: 18px;
    line-height: 1.7;
    margin: 25px 0 22px;
    max-width: 700px;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 28px;
}

.hero-proof span {
    color: #344a66;
    font-size: 13px;
    font-weight: 700;
}

.hero-proof span::before {
    color: var(--landing-mint);
    content: "✓";
    margin-right: 7px;
}

.landing-page .mobile-app-links {
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

.landing-page .mobile-app-link {
    background: #111d31;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    box-shadow: none;
    font-size: 13px;
    min-width: 170px;
    padding: 11px 15px;
}

.hero-panel {
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(191, 207, 225, .9);
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(24, 61, 105, .16);
    padding: 30px;
}

.hero-panel h2 {
    font-size: 25px;
    line-height: 1.25;
    margin: 0 0 12px;
}

.hero-panel-header > p:last-child,
.hero-fine-print {
    color: var(--landing-muted);
    line-height: 1.55;
}

.hero-flow {
    border-bottom: 1px solid var(--landing-line);
    border-top: 1px solid var(--landing-line);
    display: grid;
    gap: 0;
    margin: 24px 0;
}

.hero-flow > div {
    align-items: center;
    border-bottom: 1px solid #eaf0f6;
    display: grid;
    gap: 14px;
    grid-template-columns: 34px 1fr;
    padding: 13px 0;
}
.hero-flow > div:last-child { border-bottom: 0; }
.hero-flow b { color: var(--landing-blue); font-size: 12px; }
.hero-flow span { color: #465b75; font-size: 14px; }
.hero-flow strong { color: var(--landing-ink); }

.hero-auth-actions { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.hero-auth-actions form { margin: 0; }
.hero-auth-actions .login-button {
    border-radius: 9px;
    font-size: 14px;
    font-weight: 750;
    margin: 0;
    min-height: 44px;
    padding: 10px 13px;
    width: 100%;
}
.hero-auth-actions .apple-login-button { background: #111d31; }
.hero-auth-actions .google-login-button { background: var(--landing-blue); }
.hero-fine-print { font-size: 11px; margin: 16px 0 0; }

.landing-section {
    margin: 0 auto;
    max-width: 1280px;
    padding: 86px 38px;
}

.section-heading { margin-bottom: 36px; max-width: 760px; }
.section-heading h2,
.asset-card h2,
.controls-copy h2,
.regulatory-note h2 {
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -.025em;
    line-height: 1.15;
    margin: 0 0 14px;
}
.section-heading > p:last-child,
.split-heading > p,
.asset-card > p,
.controls-copy > p,
.regulatory-note > p {
    color: var(--landing-muted);
    font-size: 16px;
    line-height: 1.65;
}

.split-heading {
    align-items: end;
    display: grid;
    gap: 50px;
    grid-template-columns: 1.1fr .9fr;
    max-width: none;
}

.market-preview { padding-bottom: 70px; }
.landing-market-table {
    border: 1px solid var(--landing-line);
    border-radius: 16px;
    box-shadow: 0 16px 45px rgba(28, 57, 91, .08);
    margin: 0;
    overflow: auto;
}
.landing-market-table table { margin: 0; width: 100%; }
.landing-market-table th { background: #eef4fa; color: #40536c; font-size: 12px; letter-spacing: .035em; text-transform: uppercase; }
.landing-market-table td { background: #fff; color: #273b55; padding: 15px; }

.capability-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.capability-grid article {
    background: #fff;
    border: 1px solid var(--landing-line);
    border-radius: 15px;
    min-height: 170px;
    padding: 24px;
}
.feature-number { color: var(--landing-blue); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.capability-grid h3, .automation-steps h3 { color: var(--landing-ink); font-size: 18px; margin: 22px 0 8px; }
.capability-grid p, .automation-steps p { color: var(--landing-muted); font-size: 14px; line-height: 1.6; margin: 0; }

.automation-section { background: #10233f; border-radius: 24px; color: #fff; max-width: 1204px; padding: 64px; }
.automation-section .eyebrow { color: #73aaff; }
.automation-section h2 { color: #fff; }
.automation-section .split-heading > p { color: #b9c7d9; }
.automation-steps { display: grid; gap: 1px; grid-template-columns: repeat(4, 1fr); margin-top: 40px; }
.automation-steps article { border-left: 1px solid #334966; padding: 8px 25px 10px; }
.automation-steps article:first-child { border-left: 0; padding-left: 0; }
.automation-steps b { color: #73aaff; font-size: 12px; }
.automation-steps h3 { color: #fff; }
.automation-steps p { color: #b9c7d9; }
.center-link { margin-top: 36px; }
.text-cta { color: #fff; font-size: 14px; font-weight: 750; text-decoration: none; }
.text-cta span { color: #73aaff; margin-left: 6px; }

.asset-automation-section { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.asset-card { border: 1px solid var(--landing-line); border-radius: 20px; overflow: hidden; padding: 38px; position: relative; }
.stock-card { background: linear-gradient(145deg, #eff7ff, #fff); }
.option-card { background: linear-gradient(145deg, #eefaf5, #fff); }
.asset-card h2 { font-size: 30px; }
.asset-card ul { display: grid; gap: 12px; list-style: none; margin: 25px 0 0; padding: 0; }
.asset-card li { color: #40536c; font-size: 14px; padding-left: 22px; position: relative; }
.asset-card li::before { color: var(--landing-mint); content: "●"; font-size: 8px; left: 0; position: absolute; top: 5px; }

.controls-section { align-items: start; display: grid; gap: 75px; grid-template-columns: .92fr 1.08fr; }
.control-list { border-top: 1px solid var(--landing-line); }
.control-list > div { border-bottom: 1px solid var(--landing-line); display: grid; gap: 24px; grid-template-columns: 150px 1fr; padding: 20px 0; }
.control-list strong { color: var(--landing-ink); font-size: 14px; }
.control-list span { color: var(--landing-muted); font-size: 14px; line-height: 1.5; }

.regulatory-note {
    align-items: center;
    background: #fff8e7;
    border: 1px solid #efd9a5;
    border-radius: 18px;
    display: grid;
    gap: 50px;
    grid-template-columns: .8fr 1.2fr;
    max-width: 1204px;
    padding: 34px 38px;
}
.regulatory-note h2 { font-size: 26px; margin: 0; }
.regulatory-note a { color: #8b5a00; font-weight: 750; }

.platform-disclaimer { border-top: 1px solid var(--landing-line); display: grid; gap: 36px; grid-template-columns: 260px 1fr; padding-bottom: 44px; padding-top: 44px; }
.platform-disclaimer strong { font-size: 17px; }
.platform-disclaimer p { color: var(--landing-muted); line-height: 1.6; margin: 0; }

.site-footer {
    align-items: center;
    background: #0d1b2f;
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
    margin-top: 0;
    padding: 28px 24px;
}
.site-footer span { color: #91a2b9; font-size: 13px; margin-right: 16px; }
.site-footer a { color: #d7e2ef; font-size: 13px; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.dashboard-title { margin-top: 28px; }

@media (max-width: 900px) {
    .landing-nav-links { display: none; }
    .hero-grid, .split-heading, .controls-section, .regulatory-note { grid-template-columns: 1fr; }
    .hero-grid { gap: 38px; padding-top: 30px; }
    .capability-grid { grid-template-columns: repeat(2, 1fr); }
    .automation-steps { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
    .automation-steps article:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 620px) {
    .landing-hero, .landing-section { padding-left: 20px; padding-right: 20px; }
    .landing-hero { padding-bottom: 48px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-copy h1 { font-size: 40px; }
    .hero-panel { padding: 23px; }
    .hero-auth-actions, .capability-grid, .automation-steps, .asset-automation-section, .platform-disclaimer { grid-template-columns: 1fr; }
    .automation-section { border-radius: 0; padding: 46px 22px; }
    .automation-steps article { border-left: 0; border-top: 1px solid #334966; padding: 22px 0 0; }
    .automation-steps article:first-child { border-top: 0; }
    .asset-card { padding: 28px 24px; }
    .control-list > div { gap: 8px; grid-template-columns: 1fr; }
    .regulatory-note { border-radius: 0; padding: 30px 22px; }
}

.orders-wrapper .clickable-symbol {
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
}

.orders-wrapper .clickable-symbol:hover {
  color: #551a8b;
}

/* CSP extracted from custom_login.html */

/* CSP inline-style replacements from custom_login.html */
.csp_custom_login_7ad02dbf35 { width:40px; height:40px; border-radius:50%; }
.csp_custom_login_d2c171b18b { margin-top:10px; }
.csp_custom_login_a2c9923759 { max-width:80%; margin:20px auto; text-align:left; }

/* Auto Trade Modal Grid */
.account-onboarding{background:#fff;border:1px solid #d6e1ee;border-radius:16px;box-shadow:0 8px 30px rgba(15,40,70,.08);margin:28px auto 46px;max-width:1180px;overflow:hidden;text-align:left}.account-onboarding-hero{align-items:center;background:linear-gradient(135deg,#f5f9ff,#eef8f5);display:flex;gap:30px;justify-content:space-between;padding:30px 34px}.account-onboarding-hero h2{color:#12304f;font-size:28px;margin:5px 0 8px}.account-onboarding-hero p:not(.eyebrow){color:#526579;line-height:1.55;margin:0;max-width:720px}.account-onboarding-primary-actions{display:flex;flex:0 0 auto;gap:10px}.onboarding-button{border-radius:8px;display:inline-flex;font-weight:700;justify-content:center;padding:12px 16px;text-decoration:none}.onboarding-button-primary{background:#087f5b;border:1px solid #087f5b;color:#fff}.onboarding-button-secondary{background:#fff;border:1px solid #9db0c5;color:#173b61}.account-onboarding-steps{display:grid;gap:0;grid-template-columns:repeat(3,1fr);padding:28px 26px}.account-onboarding-steps article{display:flex;gap:14px;padding:4px 22px}.account-onboarding-steps article+article{border-left:1px solid #e2e8f0}.onboarding-step-number{align-items:center;background:#e8f2ff;border-radius:50%;color:#1466b8;display:flex;flex:0 0 30px;font-size:13px;font-weight:800;height:30px;justify-content:center}.account-onboarding-steps h3{color:#172b43;font-size:16px;margin:5px 0 8px}.account-onboarding-steps p{color:#5a6b7e;font-size:13px;line-height:1.55;margin:0}.onboarding-links{display:flex;flex-direction:column;gap:6px;margin-top:13px}.onboarding-links a{color:#0867b2;font-size:13px;font-weight:700;text-decoration:none}.onboarding-links a:hover{text-decoration:underline}.account-onboarding-tip{background:#f8fafc;border-top:1px solid #e2e8f0;color:#42566c;padding:18px 34px}.account-onboarding-tip strong{color:#183b5d}.account-onboarding-tip p{display:inline;font-size:13px;line-height:1.5;margin:0 0 0 7px}
@media (max-width:900px){.account-onboarding-hero{align-items:stretch;flex-direction:column}.account-onboarding-primary-actions{align-self:flex-start}.account-onboarding-steps{grid-template-columns:1fr}.account-onboarding-steps article{padding:18px 6px}.account-onboarding-steps article+article{border-left:0;border-top:1px solid #e2e8f0}}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.form-grid label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-grid input[type="text"],
.form-grid input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .account-onboarding{border-radius:10px;margin-left:12px;margin-right:12px}.account-onboarding-hero{align-items:stretch;flex-direction:column;padding:24px 20px}.account-onboarding-primary-actions{flex-direction:column}.account-onboarding-steps{grid-template-columns:1fr;padding:16px 20px}.account-onboarding-steps article{padding:18px 0}.account-onboarding-steps article+article{border-left:0;border-top:1px solid #e2e8f0}.account-onboarding-tip{padding:18px 20px}.account-onboarding-tip p{display:block;margin:6px 0 0}
    .mobile-app-links {
        align-items: center;
        flex-direction: column;
    }

    .mobile-app-link {
        width: min(100%, 280px);
    }
}
