/**
 * The Equity Builder — global dark theme (serif + monospace, sage accent, grain).
 * Loads after milligram + cake.css
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,600&display=swap');

:root {
    color-scheme: dark;
    --eq-bg: #121212;
    --eq-bg-elevated: #1a1a1a;
    --eq-bg-card: #1e1e1e;
    --eq-border: rgba(255, 255, 255, 0.12);
    --eq-border-subtle: rgba(255, 255, 255, 0.06);
    --eq-text: #d1d1d1;
    --eq-text-muted: #8a8a8a;
    --eq-text-dim: #6b6b6b;
    --eq-white: #f5f5f5;
    --eq-accent: #a8c69f;
    --eq-accent-hover: #b8d6ae;
    --eq-accent-text: #1a1f18;
    --eq-focus: var(--eq-accent);

    --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    --radius: 0;
    --nav-pad: 0.85rem 1.4rem;
}

/* ---- Noise overlay ---- */
body.equity-app {
    position: relative;
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--eq-text);
    background-color: var(--eq-bg);
    min-height: 100vh;
}

body.equity-app::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Typography ---- */
body.equity-app h1,
body.equity-app h2,
body.equity-app h3,
body.equity-app .heading-serif {
    font-family: var(--font-serif);
    font-weight: 400;
    color: var(--eq-white);
    letter-spacing: 0.01em;
}

body.equity-app h1 { font-size: 2.75rem; }
body.equity-app h2 { font-size: 2.2rem; }
body.equity-app h3 { font-size: 1.9rem; }
body.equity-app h4,
body.equity-app h5,
body.equity-app h6 {
    font-family: var(--font-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.82rem;
    color: var(--eq-text-muted);
}

body.equity-app .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--eq-text-muted);
    margin-bottom: 0.75rem;
}

body.equity-app label,
body.equity-app th,
body.equity-app .side-nav .heading,
body.equity-app .input label {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    color: var(--eq-text-muted);
}

body.equity-app a {
    color: var(--eq-text);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

body.equity-app a:hover,
body.equity-app a:focus {
    color: var(--eq-white);
}

/* ---- Layout ---- */
body.equity-app .main {
    padding-bottom: 4rem;
}

body.equity-app .container {
    max-width: 120rem;
}

/* ---- Top nav ---- */
body.equity-app .top-nav {
    max-width: 120rem;
    padding: 1.95rem 2.5rem;
    border-bottom: 1px solid var(--eq-border-subtle);
}

body.equity-app .logo {
    font-family: var(--font-serif);
    font-size: 2.15rem;
    font-weight: 400;
    font-style: normal;
    color: var(--eq-white);
    text-decoration: none;
    letter-spacing: 0.02em;
}

body.equity-app .logo:hover {
    color: var(--eq-white);
}

body.equity-app .logo-equity {
    font-style: italic;
    color: var(--eq-accent);
    font-weight: 400;
}

body.equity-app .top-nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.equity-app .top-nav-links > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

body.equity-app .nav-link-text {
    font-family: var(--font-mono);
    font-size: 0.93rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: var(--nav-pad);
    color: var(--eq-text-muted);
    text-decoration: none;
    border: 1px solid transparent;
}

body.equity-app .nav-link-text:hover {
    color: var(--eq-white);
}

body.equity-app .nav-btn-ghost {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: var(--nav-pad);
    border: 1px solid var(--eq-border);
    color: var(--eq-text);
    text-decoration: none;
    background: transparent;
    border-radius: var(--radius);
}

body.equity-app .nav-btn-ghost:hover {
    border-color: var(--eq-text-muted);
    color: var(--eq-white);
}

body.equity-app .nav-btn-ghost.is-active {
    border-color: var(--eq-accent);
    color: var(--eq-accent);
}

body.equity-app .nav-btn-signup {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: var(--nav-pad);
    background: var(--eq-accent);
    color: var(--eq-accent-text);
    border: 1px solid var(--eq-accent);
    text-decoration: none;
    border-radius: var(--radius);
}

body.equity-app .nav-btn-signup:hover {
    background: var(--eq-accent-hover);
    border-color: var(--eq-accent-hover);
    color: var(--eq-accent-text);
}

body.equity-app .logout-button {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: var(--nav-pad);
    border: 1px solid var(--eq-border);
    color: var(--eq-text);
    text-decoration: none;
    background: transparent;
    border-radius: var(--radius);
}

/* ---- Content panels ---- */
body.equity-app .content {
    padding: 2rem 2.5rem;
    background: var(--eq-bg-elevated);
    border: 1px solid var(--eq-border-subtle);
    border-radius: var(--radius);
    box-shadow: none;
}

body.equity-app .users.view.content h3,
body.equity-app .users.form.content h3 {
    font-family: var(--font-serif);
    font-size: 2.45rem;
    margin-top: 0;
}

body.equity-app .users.view.content .eyebrow-title {
    margin-bottom: 0.25rem;
}

/* Sign up (add user) — wider panel, readable fields */
body.equity-app .signup-page {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    align-items: flex-start;
}

body.equity-app .signup-page aside.column {
    flex: 0 0 14rem;
    max-width: 14rem;
}

body.equity-app .signup-page .column-80 {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
}

body.equity-app .signup-page .users.form.content {
    padding: 2.75rem 3.25rem;
    font-size: 1.12rem;
}

body.equity-app .signup-page .users.form.content legend {
    font-size: 0.98rem;
    letter-spacing: 0.1em;
}

body.equity-app .signup-page .input label {
    font-size: 0.72rem;
}

body.equity-app .signup-page input[type='email'],
body.equity-app .signup-page input[type='password'],
body.equity-app .signup-page input[type='text'] {
    font-size: 1.1rem !important;
    padding: 0.85rem 1rem !important;
    min-height: 3rem;
}

body.equity-app .signup-page select,
body.equity-app .signup-page textarea {
    font-size: 1.05rem !important;
    padding: 0.75rem 0.85rem !important;
}

body.equity-app .signup-page .users.form.content .button {
    font-size: 0.8rem !important;
    padding: 1rem 1.5rem !important;
}

/* ---- Tables ---- */
body.equity-app table {
    border-collapse: collapse;
    width: 100%;
}

body.equity-app th,
body.equity-app td {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--eq-border-subtle);
    color: var(--eq-text);
}

body.equity-app thead th {
    color: var(--eq-text-muted);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

body.equity-app tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ---- Forms ---- */
body.equity-app .input input,
body.equity-app .input select,
body.equity-app .input textarea,
body.equity-app input[type='email'],
body.equity-app input[type='password'],
body.equity-app input[type='text'],
body.equity-app input[type='number'],
body.equity-app input[type='date'],
body.equity-app input[type='file'],
body.equity-app select,
body.equity-app textarea {
    background: var(--eq-bg-card) !important;
    border: 1px solid var(--eq-border) !important;
    border-radius: var(--radius) !important;
    color: var(--eq-white) !important;
    box-shadow: none !important;
}

body.equity-app .input input:focus,
body.equity-app .input textarea:focus,
body.equity-app input:focus,
body.equity-app select:focus {
    border-color: var(--eq-accent) !important;
    outline: none !important;
}

body.equity-app input::placeholder,
body.equity-app textarea::placeholder {
    color: var(--eq-text-dim);
}

/* ---- Buttons (milligram override) ---- */
body.equity-app .button,
body.equity-app button:not(.role-tab):not(.nav-theme-toggle),
body.equity-app input[type='submit'],
body.equity-app input[type='button'] {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: var(--eq-accent) !important;
    border: 1px solid var(--eq-accent) !important;
    color: var(--eq-accent-text) !important;
    border-radius: var(--radius) !important;
    padding: 0.85rem 1.5rem;
    height: auto;
}

body.equity-app .button:hover,
body.equity-app button:not(.role-tab):not(.nav-theme-toggle):hover,
body.equity-app input[type='submit']:hover {
    background: var(--eq-accent-hover) !important;
    border-color: var(--eq-accent-hover) !important;
    color: var(--eq-accent-text) !important;
}

body.equity-app .button.button-outline,
body.equity-app a.button.button-outline {
    background: transparent !important;
    color: var(--eq-text) !important;
    border-color: var(--eq-border) !important;
}

body.equity-app .button.button-outline:hover {
    border-color: var(--eq-accent) !important;
    color: var(--eq-accent) !important;
    background: transparent !important;
}

body.equity-app .float-right {
    float: right;
    margin-bottom: 1rem;
}

/* ---- Side nav ---- */
body.equity-app .side-nav {
    border-right: 1px solid var(--eq-border-subtle);
    padding-right: 1.5rem;
}

body.equity-app .side-nav-item {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--eq-border-subtle);
    color: var(--eq-text-muted);
}

body.equity-app .side-nav-item:hover {
    color: var(--eq-accent);
}

/* ---- Flash ---- */
body.equity-app .message {
    border-radius: var(--radius);
    border-width: 1px;
    font-family: var(--font-mono);
    font-size: 0.92rem;
}

body.equity-app .message.success {
    background: rgba(168, 198, 159, 0.12);
    color: var(--eq-accent);
    border-color: rgba(168, 198, 159, 0.35);
}

body.equity-app .message.error {
    background: rgba(200, 80, 80, 0.12);
    color: #e8a0a0;
    border-color: rgba(200, 80, 80, 0.35);
}

body.equity-app .message.warning {
    background: rgba(200, 180, 100, 0.1);
    color: #d4c090;
    border-color: rgba(200, 180, 100, 0.3);
}

body.equity-app .message,
body.equity-app .message.message {
    background: rgba(100, 150, 200, 0.1);
    color: #a0c0e0;
    border-color: rgba(100, 150, 200, 0.25);
}

/* ---- Paginator ---- */
body.equity-app .paginator {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--eq-text-muted);
}

body.equity-app .pagination a {
    color: var(--eq-text);
}

body.equity-app .pagination a:hover {
    color: var(--eq-accent);
}

/* ---- Notification badge ---- */
body.equity-app .notification-badge {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(168, 198, 159, 0.2);
    color: var(--eq-accent);
    border-radius: var(--radius);
    border: 1px solid rgba(168, 198, 159, 0.35);
}

/* ---- Auth card (login) ---- */
body.equity-app .auth-wrap {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

body.equity-app .auth-card {
    width: 100%;
    max-width: 580px;
    padding: 3rem 3.25rem;
    background: var(--eq-bg-card);
    border: 1px solid var(--eq-border);
    font-size: 1.12rem;
}

body.equity-app .auth-card .eyebrow {
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

body.equity-app .auth-card .input label {
    font-size: 0.72rem;
}

body.equity-app .auth-card input[type='email'],
body.equity-app .auth-card input[type='password'],
body.equity-app .auth-card input[type='text'] {
    font-size: 1.1rem !important;
    padding: 0.85rem 1rem !important;
    min-height: 3rem;
}

body.equity-app .auth-card .button,
body.equity-app .auth-card input[type='submit'] {
    font-size: 0.88rem !important;
    padding: 1rem 1.5rem !important;
    margin-top: 0.5rem;
}

body.equity-app .auth-title {
    font-family: var(--font-serif);
    font-size: 2.65rem;
    color: var(--eq-white);
    margin: 0.25rem 0 1.75rem;
    line-height: 1.2;
}

body.equity-app .auth-title em {
    font-style: italic;
    color: var(--eq-accent);
}

body.equity-app .auth-footer-links {
    text-align: center;
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--eq-text-muted);
}

body.equity-app .auth-footer-links a {
    color: var(--eq-text-muted);
}

body.equity-app .auth-footer-links a:hover {
    color: var(--eq-accent);
}

/* Signup split card */
body.equity-app .auth-split-wrap {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

body.equity-app .auth-split-card {
    width: min(1280px, 96vw);
    min-height: 760px;
    background: #f3f0de;
    border-radius: 2.2rem;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

body.equity-app .auth-split-left {
    background: #f7f4e8;
    color: #1b1f1f;
    padding: 2rem 2.2rem 1.75rem;
    overflow-y: auto;
}

body.equity-app .auth-brand-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border: 1px solid rgba(19, 24, 24, 0.25);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    margin-bottom: 2rem;
}

body.equity-app .auth-split-title {
    font-family: var(--font-serif);
    color: #131818;
    margin: 0 0 0.4rem;
    font-size: 2.35rem;
}

body.equity-app .auth-split-subtitle {
    color: #596060;
    margin-bottom: 1.3rem;
}

body.equity-app .auth-split-form-fields {
    border: 0;
    padding: 0;
}

body.equity-app .auth-split-left .input label,
body.equity-app .auth-split-left label {
    color: #445050;
    font-size: 0.62rem;
}

body.equity-app .auth-split-left input,
body.equity-app .auth-split-left select {
    background: #ffffff !important;
    color: #111 !important;
    border-color: rgba(0, 0, 0, 0.13) !important;
    border-radius: 999px !important;
}

body.equity-app .auth-split-left input[type="checkbox"] {
    border-radius: 0 !important;
}

body.equity-app .auth-split-left .button {
    border-radius: 999px !important;
    background: #ffd84f !important;
    border-color: #ffd84f !important;
    color: #1b1f1f !important;
}

body.equity-app .auth-split-footer {
    margin-top: 1rem;
    text-align: center;
    color: #4f5858;
}

body.equity-app .auth-split-footer a {
    color: #111;
    text-decoration: underline;
}

body.equity-app .auth-split-right {
    position: relative;
    background: #222 url("https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=1600&q=80")
        center/cover no-repeat;
}

body.equity-app .auth-split-right-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45));
    color: #fff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

body.equity-app .auth-right-chip {
    align-self: flex-start;
    background: #ffe064;
    color: #101414;
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

body.equity-app .auth-split-right-overlay h2 {
    margin: 0;
    font-size: 1.8rem;
}

body.equity-app .auth-split-right-overlay p {
    margin-top: 0.55rem;
    color: #f0f0f0;
}

@media (max-width: 980px) {
    body.equity-app .auth-split-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    body.equity-app .auth-split-right {
        min-height: 280px;
    }
}

/* ---- Landing (home) ---- */
body.equity-app .landing {
    padding: 2rem 0 4rem;
}

body.equity-app .landing-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    padding: 2rem 0 4rem;
}

@media (max-width: 900px) {
    body.equity-app .landing-hero {
        grid-template-columns: 1fr;
    }
}

body.equity-app .landing h1 {
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    line-height: 1.15;
    margin: 0 0 1.25rem;
}

body.equity-app .landing h1 .accent-italic {
    font-style: italic;
    color: var(--eq-accent);
}

body.equity-app .landing-lede {
    font-size: 0.95rem;
    color: var(--eq-text-muted);
    max-width: 36rem;
    margin-bottom: 2rem;
    line-height: 1.65;
}

body.equity-app .landing-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

body.equity-app .landing-cta .button-outline {
    padding-left: 0;
    padding-right: 0;
    border: none !important;
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

body.equity-app .landing-cta .button-outline:hover {
    color: var(--eq-accent) !important;
}

body.equity-app .landing-card {
    background: var(--eq-bg-card);
    border: 1px solid var(--eq-border);
    padding: 1.75rem 2rem;
}

body.equity-app .landing-card h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin: 0 0 1.5rem;
}

body.equity-app .landing-stat {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--eq-border-subtle);
    font-size: 0.8rem;
}

body.equity-app .landing-stat span:first-child {
    color: var(--eq-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
}

body.equity-app .landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 3rem 2rem;
    margin-top: 2rem;
    background: var(--eq-bg-elevated);
    border: 1px solid var(--eq-border-subtle);
}

@media (max-width: 900px) {
    body.equity-app .landing-features {
        grid-template-columns: 1fr;
    }
}

body.equity-app .landing-feature-num {
    font-size: 3rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.08);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--font-serif);
}

body.equity-app .landing-feature h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--eq-white);
    margin: 0 0 0.75rem;
}

body.equity-app .landing-feature p {
    font-size: 0.82rem;
    color: var(--eq-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ---- Dashboard ---- */
body.equity-app .dashboard.content {
    font-size: 0.95rem;
    background: transparent;
    border: none;
    padding: 1rem 0;
}

body.equity-app .dashboard.content > h3 {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

body.equity-app .dashboard-tabs {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--eq-border-subtle);
}

body.equity-app .dashboard-tabs .role-tab {
    padding: 0.5rem 0 !important;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    cursor: pointer;
    color: var(--eq-text-muted) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.equity-app .dashboard-tabs .role-tab:hover {
    color: var(--eq-text) !important;
    background: transparent !important;
}

body.equity-app .dashboard-tabs .role-tab.is-active {
    color: var(--eq-white) !important;
    font-weight: 600;
    border-bottom-color: rgba(255, 255, 255, 0.45) !important;
    background: transparent !important;
}

html.equity-light body.equity-app .dashboard-tabs .role-tab.is-active {
    color: var(--eq-accent) !important;
    border-bottom-color: var(--eq-accent) !important;
}

body.equity-app .role-panel {
    display: none;
    padding-top: 1.5rem;
}

body.equity-app .role-panel.is-active {
    display: block !important;
}

/* Investor layout */
body.equity-app .investor-dashboard-wrap {
    display: flex;
    flex-direction: row;
    min-height: 70vh;
    margin: 0 -1rem;
    font-size: 0.9rem;
    gap: 0;
    border: 1px solid var(--eq-border-subtle);
}

@media (max-width: 1024px) {
    body.equity-app .investor-dashboard-wrap {
        flex-direction: column;
    }
    body.equity-app .investor-sidebar-left,
    body.equity-app .investor-sidebar-right {
        width: 100%;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid var(--eq-border-subtle);
    }
}

body.equity-app .investor-sidebar-left {
    width: 280px;
    flex-shrink: 0;
    background: var(--eq-bg-elevated);
    color: var(--eq-text);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--eq-border-subtle);
}

body.equity-app .investor-sidebar-left .portfolio-title {
    color: var(--eq-accent);
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-mono);
}

body.equity-app .investor-sidebar-left .wallet-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--eq-text-muted);
    margin-bottom: 0.35rem;
}

body.equity-app .investor-sidebar-left .wallet-balance {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--eq-white);
}

body.equity-app .investor-sidebar-left .wallet-usd {
    font-size: 0.8rem;
    color: var(--eq-text-muted);
    margin-bottom: 1rem;
}

body.equity-app .investor-sidebar-left .metamask-connect {
    margin-top: auto;
}

body.equity-app .investor-sidebar-left .metamask-connect .button {
    width: 100%;
    margin-bottom: 0.75rem;
}

body.equity-app .investor-sidebar-left .metamask-address {
    font-size: 0.75rem;
    word-break: break-all;
    color: var(--eq-text-muted);
}

body.equity-app .investor-sidebar-left .logout-link {
    display: block;
    margin-top: 1.5rem;
    color: var(--eq-text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

body.equity-app .investor-sidebar-left .logout-link:hover {
    color: var(--eq-accent);
}

body.equity-app .investor-main {
    flex: 1;
    padding: 1.75rem 2rem;
    background: var(--eq-bg);
    overflow: auto;
}

body.equity-app .investor-main .property-address {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 400;
    color: var(--eq-white);
    margin: 0 0 0.35rem;
}

body.equity-app .investor-main .property-location {
    color: var(--eq-text-muted);
    font-size: 0.93rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

body.equity-app .investor-main .property-metrics {
    margin: 1.5rem 0;
    font-size: 0.93rem;
}

body.equity-app .investor-main .property-metrics p {
    margin: 0.4rem 0;
    color: var(--eq-text);
}

body.equity-app .investor-main .property-metrics strong {
    color: var(--eq-text-muted);
    font-weight: 500;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.equity-app .investor-main .buy-sell-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--eq-border-subtle);
}

body.equity-app .investor-main .buy-sell-tabs .tab {
    padding: 0.6rem 1.25rem;
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--eq-text-muted);
}

body.equity-app .investor-main .buy-sell-tabs .tab.buy-tab.active {
    color: var(--eq-accent);
    border-bottom-color: var(--eq-accent);
}

body.equity-app .investor-main .buy-sell-tabs .tab.sell-tab.active {
    color: #c9906e;
    border-bottom-color: #c9906e;
}

body.equity-app .investor-main .buy-panel,
body.equity-app .investor-main .sell-panel {
    display: none;
}

body.equity-app .investor-main .buy-panel.is-active,
body.equity-app .investor-main .sell-panel.is-active {
    display: block;
}

body.equity-app .investor-main .btn-confirm-sell {
    background: #8b5340 !important;
    border-color: #8b5340 !important;
    color: var(--eq-white) !important;
}

body.equity-app .investor-main .btn-confirm-sell:hover {
    filter: brightness(1.1);
}

body.equity-app .investor-main .btn-max {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    background: transparent;
    color: #d4a574;
    border: 1px solid var(--eq-border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

body.equity-app .investor-main .btn-confirm-buy {
    background: var(--eq-accent) !important;
    border-color: var(--eq-accent) !important;
    color: var(--eq-accent-text) !important;
}

body.equity-app .chart-placeholder {
    height: 280px;
    font-size: 0.85rem;
    background: var(--eq-bg-card);
    border: 1px solid var(--eq-border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eq-text-muted);
    margin-top: 2rem;
}

body.equity-app .investor-sidebar-right {
    width: 300px;
    flex-shrink: 0;
    padding: 1.75rem;
    border-left: 1px solid var(--eq-border-subtle);
    background: var(--eq-bg-elevated);
}

body.equity-app .investor-sidebar-right .sidebar-title {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--eq-white);
}

body.equity-app .investor-sidebar-right .sidebar-hint {
    font-size: 0.75rem;
    color: var(--eq-text-muted);
    margin-bottom: 1rem;
}

body.equity-app .investor-sidebar-right .property-search {
    width: 100%;
    padding: 0.65rem 0.9rem;
    margin-bottom: 1rem;
}

body.equity-app .investor-sidebar-right .filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: var(--eq-text-muted);
}

body.equity-app .investor-sidebar-right .filter-tabs span.active {
    color: var(--eq-accent);
    font-weight: 600;
}

body.equity-app .investor-sidebar-right .property-list-vertical {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 420px;
    overflow-y: auto;
}

body.equity-app .investor-sidebar-right .property-list-vertical li {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--eq-border-subtle);
}

body.equity-app .investor-sidebar-right .property-list-vertical li a {
    text-decoration: none;
    color: var(--eq-text);
}

body.equity-app .investor-sidebar-right .property-list-vertical li.is-active {
    background: var(--eq-accent);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

body.equity-app .investor-sidebar-right .property-list-vertical li.is-active a {
    color: var(--eq-accent-text);
    font-weight: 600;
}

body.equity-app .wallet-panel {
    padding: 1rem;
    border: 1px solid var(--eq-border-subtle);
    background: var(--eq-bg-card);
    margin-bottom: 1rem;
}

body.equity-app .dashboard .help,
body.equity-app .dashboard .role-panel p.help {
    color: var(--eq-text-muted);
    font-size: 0.82rem;
}

body.equity-app .dashboard h4,
body.equity-app .dashboard h5 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--eq-white);
    margin-top: 1.5rem;
}

body.equity-app .dashboard .role-panel h4:first-child {
    margin-top: 0;
}

body.equity-app hr {
    border: none;
    border-top: 1px solid var(--eq-border-subtle);
}

/* Error layout */
body.equity-app .error-container {
    min-height: calc(100vh - 4rem);
    padding: 2rem;
    color: var(--eq-text);
    font-family: var(--font-mono);
}

body.equity-app .error-container a {
    margin-top: 1rem;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
}

/* Checkbox / role controls */
body.equity-app fieldset {
    border: 1px solid var(--eq-border-subtle);
    padding: 1rem 1.25rem;
}

body.equity-app legend {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--eq-text-muted);
    padding: 0 0.5rem;
}

/* ========== Dashboard reference layout (participant / investor) ========== */
body.equity-app--dashboard {
    background-color: #0a0e0b;
    background-image:
        radial-gradient(ellipse 120% 80% at 45% 35%, rgba(90, 118, 88, 0.09) 0%, transparent 55%),
        radial-gradient(ellipse 80% 60% at 70% 80%, rgba(60, 82, 58, 0.06) 0%, transparent 45%);
}

body.equity-app--dashboard::before {
    opacity: 0.22;
}

body.equity-app .dashboard-back-link--screen {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.equity-app .container--dashboard-full {
    max-width: 100% !important;
    width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    position: relative;
}

body.equity-app .top-nav--dashboard {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
    align-items: center;
    gap: 1rem;
    max-width: 100%;
    padding: 1.55rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 10, 9, 0.92);
    backdrop-filter: blur(8px);
}

body.equity-app .top-nav--dashboard .top-nav-title {
    justify-self: start;
}

body.equity-app .dashboard-role-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 1.75rem;
}

body.equity-app .dashboard-role-tabs .role-tab {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--eq-text-muted) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 0.5rem 0 0.45rem !important;
    margin: 0;
    cursor: pointer;
    height: auto;
    line-height: 1.2;
    box-shadow: none !important;
}

body.equity-app .dashboard-role-tabs .role-tab:hover {
    color: var(--eq-text) !important;
    background: transparent !important;
    border-color: transparent !important;
    border-bottom-color: transparent !important;
}

body.equity-app .dashboard-role-tabs .role-tab.is-active {
    color: var(--eq-white) !important;
    background: transparent !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.45) !important;
}

html.equity-light body.equity-app .dashboard-role-tabs .role-tab.is-active {
    color: var(--eq-accent) !important;
    border-bottom-color: var(--eq-accent) !important;
}

body.equity-app .top-nav-dashboard-right {
    justify-self: end;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

body.equity-app .nav-eth-pill {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    color: var(--eq-text-muted);
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--eq-border-subtle);
}

body.equity-app .dashboard-back-link {
    margin: 0 0 0.75rem;
}

body.equity-app .dashboard-back {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--eq-text-muted);
    text-decoration: none;
}

body.equity-app .dashboard-back:hover {
    color: var(--eq-accent);
}

body.equity-app .dashboard--v2 {
    padding-bottom: 2rem;
}

body.equity-app .dashboard-investor-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.38fr) minmax(260px, 0.42fr);
    gap: 0;
    min-height: calc(100vh - 100px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(165deg, #0d100e 0%, #080a09 100%);
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(168, 198, 159, 0.04);
}

body.equity-app .dashboard-investor-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.11;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 1200px) {
    body.equity-app .dashboard-investor-shell {
        grid-template-columns: minmax(0, 1fr) minmax(200px, 0.42fr);
        grid-template-rows: auto auto;
    }
    body.equity-app .dashboard-hero-column {
        grid-column: 1 / -1;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    body.equity-app .dashboard-properties-panel {
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 700px) {
    body.equity-app .dashboard-investor-shell {
        grid-template-columns: 1fr;
    }
    body.equity-app .dashboard-properties-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        max-height: 320px;
    }
}

body.equity-app .dashboard-hero-column {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-self: start;
    width: 100%;
    max-height: min(720px, 74vh);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

body.equity-app .dashboard-hero {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    /* Definite height so inner layout can fill space and pin metrics to bottom band */
    min-height: min(440px, 52vh);
    height: min(720px, 74vh);
    max-height: min(720px, 74vh);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

body.equity-app .dashboard-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.equity-app .hero-ring {
    position: absolute;
    left: 50%;
    top: 38%;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    aspect-ratio: 1;
}

body.equity-app .hero-ring--a {
    width: min(92%, 640px);
    opacity: 1;
}

body.equity-app .hero-ring--b {
    width: min(68%, 460px);
    border-color: rgba(168, 198, 159, 0.1);
    opacity: 0.9;
}

body.equity-app .hero-ring--c {
    width: min(44%, 300px);
    border-color: rgba(255, 255, 255, 0.05);
    opacity: 0.85;
}

body.equity-app .hero-watermark {
    position: absolute;
    right: 2%;
    bottom: 6%;
    font-family: var(--font-serif);
    font-size: clamp(6rem, 21vw, 14rem);
    font-weight: 400;
    line-height: 1;
    color: rgba(255, 255, 255, 0.045);
    user-select: none;
    pointer-events: none;
    z-index: 1;
}

body.equity-app .dashboard-hero-inner {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    height: 100%;
    padding: 2.35rem 2.75rem 2.25rem;
    box-sizing: border-box;
}

body.equity-app .hero-top-block {
    flex: 0 0 auto;
    align-self: stretch;
}

/* Space above the stats divider (line sits lower in the hero) */
body.equity-app .hero-top-block:has(+ .hero-bottom-block) {
    margin-bottom: clamp(4.5rem, 20vh, 9.5rem);
}

body.equity-app .dashboard-hero-inner > .hero-top-block:only-child {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

body.equity-app .hero-bottom-block {
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.4rem;
    box-sizing: border-box;
}

body.equity-app .hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.35rem;
    align-items: center;
}

body.equity-app .hero-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--eq-text-muted);
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.35);
    line-height: 1.2;
}

body.equity-app .hero-property-title {
    font-family: var(--font-serif);
    font-size: clamp(2.35rem, 4.2vw, 3.55rem);
    font-weight: 400;
    color: var(--eq-white);
    margin: 0 0 0.55rem;
    line-height: 1.08;
    max-width: 44rem;
}

body.equity-app .hero-property-title .hero-title-accent {
    font-style: italic;
    font-weight: 400;
    color: var(--eq-accent);
}

body.equity-app .hero-top-block .hero-property-region {
    margin-bottom: 0;
}

body.equity-app .hero-property-region {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--eq-text-muted);
    margin: 0.45rem 0 0;
    max-width: 44rem;
}

body.equity-app .hero-stats-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: clamp(0.75rem, 1.5vw, 1.45rem);
    row-gap: 0.85rem;
    width: 100%;
    min-width: 0;
    margin-top: 0;
}

@media (max-width: 900px) {
    body.equity-app .hero-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    body.equity-app .hero-stats-row {
        grid-template-columns: 1fr;
    }
}

body.equity-app .hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

body.equity-app .hero-stat-label {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--eq-text-dim);
}

body.equity-app .hero-stat-value {
    font-family: var(--font-mono);
    font-size: 1.28rem;
    color: var(--eq-white);
}

body.equity-app .hero-stat-value--accent {
    color: var(--eq-accent);
}

body.equity-app .hero-stat-sublabel {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--eq-text-dim);
    line-height: 1.35;
    max-width: 12rem;
}

body.equity-app .dashboard-properties-panel {
    position: relative;
    z-index: 1;
    background: #0f1311;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
}

body.equity-app .dashboard-panel-inner {
    padding: 1.25rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

body.equity-app .dashboard-properties-panel .side-rail-heading {
    margin-bottom: 0.85rem;
}

body.equity-app .dashboard-properties-panel .side-rail-search {
    flex-shrink: 0;
}

body.equity-app .dashboard-properties-panel .side-rail-property-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    margin-top: 0.25rem;
}

body.equity-app .dashboard-wallet-column {
    position: relative;
    z-index: 1;
    background: #0f1311;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

@media (max-width: 1200px) {
    body.equity-app .dashboard-properties-panel,
    body.equity-app .dashboard-wallet-column {
        min-height: 0;
        max-height: 70vh;
    }
}

@media (max-width: 700px) {
    body.equity-app .dashboard-properties-panel,
    body.equity-app .dashboard-wallet-column {
        max-height: none;
    }
}

body.equity-app .side-rail-section {
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

body.equity-app .side-rail-section--wallet-deposit {
    padding-top: 1.35rem;
}

body.equity-app .side-rail-heading--sub {
    margin-top: 0.5rem;
}

body.equity-app .side-rail-rule {
    height: 0;
    margin: 1.15rem 0 0.25rem;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.equity-app .side-rail-wallet-eth-line {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--eq-text-muted);
    margin: 0.35rem 0 0.85rem;
    letter-spacing: 0.04em;
}

body.equity-app .side-rail-wallet-eth-line--usd {
    font-size: 0.68rem;
    margin-top: -0.35rem;
}

body.equity-app .side-rail-connected-label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--eq-accent);
    margin: 0.75rem 0 0.35rem;
}

body.equity-app .button-metamask-secondary {
    margin-top: 0.65rem;
    border-color: var(--eq-accent) !important;
    color: var(--eq-accent) !important;
    background: transparent !important;
}

body.equity-app .button-metamask-secondary:hover {
    background: rgba(168, 198, 159, 0.1) !important;
    color: var(--eq-accent-hover) !important;
    border-color: var(--eq-accent-hover) !important;
}

body.equity-app .side-rail-heading {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--eq-text-muted);
    margin: 0 0 1rem;
}

body.equity-app .side-rail-search {
    width: 100%;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.75rem;
    background: var(--eq-bg-card) !important;
    border: 1px solid var(--eq-border) !important;
    color: var(--eq-white) !important;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

body.equity-app .side-rail-property-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

body.equity-app .side-rail-property-item a {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem 0.5rem;
    text-decoration: none;
    border-bottom: 1px solid var(--eq-border-subtle);
    color: var(--eq-text);
}

body.equity-app .side-rail-property-item.is-active a {
    background: var(--eq-accent);
    color: var(--eq-accent-text);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.equity-app .side-rail-prop-name {
    font-size: 0.88rem;
    font-weight: 500;
}

body.equity-app .side-rail-prop-meta {
    font-size: 0.78rem;
    opacity: 0.85;
}

body.equity-app .side-rail-property-item:not(.is-active) .side-rail-prop-meta {
    color: var(--eq-text-muted);
}

body.equity-app .side-rail-muted {
    font-size: 0.82rem;
    color: var(--eq-text-muted);
    margin: 0.25rem 0;
}

body.equity-app .side-rail-wallet-balance {
    font-family: var(--font-mono);
    font-size: 1.95rem;
    color: var(--eq-white);
    margin-bottom: 0.35rem;
}

body.equity-app .side-rail-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--eq-text-muted);
    margin: 0.75rem 0 0.35rem;
}

body.equity-app .side-rail-select {
    width: 100%;
    padding: 0.45rem 0.5rem;
    background: var(--eq-bg-card) !important;
    border: 1px solid var(--eq-border) !important;
    color: var(--eq-text) !important;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

body.equity-app .side-rail-input {
    width: 100%;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.35rem;
    background: var(--eq-bg-card) !important;
    border: 1px solid var(--eq-border) !important;
    color: var(--eq-white) !important;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

body.equity-app .side-rail-hint {
    font-size: 0.68rem;
    color: var(--eq-text-dim);
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

body.equity-app .button-block {
    width: 100%;
    display: block;
    text-align: center;
}

body.equity-app .side-rail-metamask {
    margin-top: 0.75rem;
}

body.equity-app .side-rail-address {
    word-break: break-all;
    font-size: 0.68rem !important;
}

body.equity-app .side-rail-tabs {
    margin-bottom: 1rem;
}

body.equity-app .dashboard-investor-shell .buy-sell-tabs {
    border-bottom-color: var(--eq-border-subtle);
}

body.equity-app .dashboard-investor-shell .buy-sell-tabs .tab {
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
}

body.equity-app .dashboard-investor-shell .sell-tab.inactive {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

body.equity-app .side-rail-amount-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

body.equity-app .side-rail-amount-row .side-rail-input {
    flex: 1;
    margin-bottom: 0;
}

body.equity-app .dashboard-investor-shell .btn-max {
    flex-shrink: 0;
    padding: 0.5rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    background: transparent !important;
    color: #d4a85c !important;
    border: 1px solid rgba(212, 168, 92, 0.45) !important;
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

body.equity-app .dashboard-investor-shell .btn-max:hover {
    color: #e8c078 !important;
    border-color: rgba(232, 192, 120, 0.65) !important;
    background: rgba(212, 168, 92, 0.08) !important;
}

body.equity-app .performance-placeholder {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--eq-text-muted);
    margin: 0.25rem 0 0;
    padding: 1rem 0.5rem;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

body.equity-app .side-rail-footer {
    margin-top: auto;
    padding: 1rem 1.35rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--eq-border-subtle);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

body.equity-app .side-rail-footer-link {
    color: var(--eq-text-muted);
    text-decoration: none;
}

body.equity-app .side-rail-footer-link:hover {
    color: var(--eq-accent);
}

body.equity-app .side-rail-footer-meta {
    color: var(--eq-text-dim);
}

/* Renter: property listings sidebar + rental contract form */
body.equity-app .renter-setup-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    body.equity-app .renter-setup-layout {
        grid-template-columns: 1fr;
    }
}

body.equity-app .renter-setup-listings {
    padding: 1.1rem 1.15rem;
    background: var(--eq-bg-card);
    border: 1px solid var(--eq-border-subtle);
}

body.equity-app .renter-setup-listings-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--eq-text-muted);
    margin: 0 0 0.85rem;
}

body.equity-app .renter-listing-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(320px, 50vh);
    overflow-y: auto;
}

body.equity-app .renter-listing-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--eq-border-subtle);
}

body.equity-app .renter-listing-list li:last-child {
    border-bottom: none;
}

body.equity-app .renter-listing-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    margin: 0;
    padding: 0.75rem 0.5rem;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--eq-text);
    background: transparent;
    border: none;
    border-radius: 0;
    transition: background 0.12s ease, color 0.12s ease;
}

body.equity-app .renter-listing-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--eq-white);
}

html.equity-light body.equity-app .renter-listing-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.equity-app .renter-listing-item.is-selected {
    background: rgba(168, 198, 159, 0.12);
    color: var(--eq-accent);
    box-shadow: inset 3px 0 0 var(--eq-accent);
}

html.equity-light body.equity-app .renter-listing-item.is-selected {
    background: rgba(90, 125, 82, 0.12);
}

body.equity-app .renter-listing-title {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.35;
}

body.equity-app .renter-listing-meta {
    font-size: 0.72rem;
    color: var(--eq-text-muted);
}

body.equity-app .renter-listing-item.is-selected .renter-listing-meta {
    color: inherit;
    opacity: 0.85;
}

body.equity-app .renter-setup-listings-empty,
body.equity-app .renter-setup-listings-hint {
    font-size: 0.78rem;
    margin-top: 0.5rem;
}

body.equity-app .renter-setup-form {
    min-width: 0;
}

body.equity-app--dashboard .role-panel.dashboard-section:not([data-role="Investor"]) {
    padding: 2rem;
    background: var(--eq-bg-elevated);
    border: 1px solid var(--eq-border-subtle);
    margin-top: 1rem;
}

@media (max-width: 900px) {
    body.equity-app .top-nav--dashboard {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    body.equity-app .dashboard-role-tabs {
        order: 3;
        justify-content: flex-start;
    }
    body.equity-app .top-nav-dashboard-right {
        justify-self: stretch;
        justify-content: flex-end;
    }
}

/* ---- Theme switch (pill + sun / moon) — not a primary green button ---- */
body.equity-app .nav-theme-toggle.theme-switch {
    font: inherit;
    cursor: pointer;
    margin: 0;
    padding: 0.15rem 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 0;
    vertical-align: middle;
    align-self: center;
}

body.equity-app .theme-switch__track {
    position: relative;
    display: block;
    width: 3.375rem;
    height: 1.875rem;
    border-radius: 999px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-sizing: border-box;
    transition: background 0.25s ease, border-color 0.25s ease;
}

html.equity-light body.equity-app .theme-switch__track {
    background: #e8e2d8;
    border: 1px solid rgba(0, 0, 0, 0.14);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.65);
}

body.equity-app .theme-switch__knob {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #faf8f5;
    color: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition:
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
}

html.equity-light body.equity-app .theme-switch__knob {
    transform: translateX(1.625rem);
    background: #1c1c1c;
    color: #f2f0eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

body.equity-app .theme-switch__icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

body.equity-app .theme-switch__icon--sun {
    opacity: 1;
}

body.equity-app .theme-switch__icon--moon {
    opacity: 0;
}

html.equity-light body.equity-app .theme-switch__icon--sun {
    opacity: 0;
}

html.equity-light body.equity-app .theme-switch__icon--moon {
    opacity: 1;
}

body.equity-app .theme-switch--guest .theme-switch__track {
    width: 3rem;
    height: 1.65rem;
}

body.equity-app .theme-switch--guest .theme-switch__knob {
    width: 1.35rem;
    height: 1.35rem;
}

html.equity-light body.equity-app .theme-switch--guest .theme-switch__knob {
    transform: translateX(1.4rem);
}

body.equity-app .theme-switch:focus-visible {
    outline: 2px solid var(--eq-focus);
    outline-offset: 3px;
}

body.equity-app .theme-switch:focus:not(:focus-visible) {
    outline: none;
}

/* ---- Light theme (warm grain, not pure white) ---- */
html.equity-light {
    color-scheme: light;
}

html.equity-light {
    --eq-bg: #ddd8cf;
    --eq-bg-elevated: #e8e3d9;
    --eq-bg-card: #ebe5db;
    --eq-border: rgba(0, 0, 0, 0.13);
    --eq-border-subtle: rgba(0, 0, 0, 0.085);
    --eq-text: #252525;
    --eq-text-muted: #555555;
    --eq-text-dim: #666666;
    --eq-white: #111111;
    --eq-accent: #5a7d52;
    --eq-accent-hover: #4d6d46;
    --eq-accent-text: #f8faf6;
    --eq-focus: var(--eq-accent);
}

html.equity-light body.equity-app::before {
    opacity: 0.16;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html.equity-light body.equity-app::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.09;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

html.equity-light body.equity-app .top-nav--dashboard {
    background: rgba(232, 226, 216, 0.94);
    border-bottom-color: var(--eq-border-subtle);
    backdrop-filter: blur(8px);
}

html.equity-light body.equity-app .dashboard-investor-shell {
    background: linear-gradient(165deg, #e5dfd4 0%, #d9d3c8 100%);
    border-color: var(--eq-border-subtle);
    box-shadow: inset 0 0 0 1px rgba(90, 125, 82, 0.08);
}

html.equity-light body.equity-app .dashboard-properties-panel,
html.equity-light body.equity-app .dashboard-wallet-column {
    background: var(--eq-bg-elevated);
    border-color: var(--eq-border-subtle);
}

html.equity-light body.equity-app .hero-tag {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--eq-text-muted);
}

html.equity-light body.equity-app .hero-watermark {
    color: rgba(0, 0, 0, 0.06);
}

html.equity-light body.equity-app .hero-ring {
    border-color: rgba(0, 0, 0, 0.09);
}

html.equity-light body.equity-app .hero-ring--b {
    border-color: rgba(90, 125, 82, 0.18);
}
