/* Teletrack Marketplace — public site chrome (hire.teletrack.au + /hire/).
   Standalone LIGHT theme only: the public pages never load the 3-theme app
   stylesheet, so everything is self-contained here. Mobile-first. */

:root {
    --mp-accent: #007EA3;
    --mp-accent-hover: #00647f;
    --mp-navy: #1E1C54;
    --mp-ink: #1f2933;
    --mp-muted: #52606d;
    --mp-faint: #7b8794;
    --mp-line: #e4e7eb;
    --mp-line-strong: #cbd2d9;
    --mp-bg: #f5f7fa;
    --mp-surface: #ffffff;
    --mp-surface-alt: #eef2f6;
    --mp-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --mp-shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.10);
    --mp-radius: 12px;
    --mp-radius-sm: 8px;
    --mp-maxw: 1160px;
    --mp-gold: #f0b429;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--mp-ink);
    background: var(--mp-bg);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--mp-accent); text-decoration: none; }
a:hover { color: var(--mp-accent-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; }

h1, h2, h3 { color: var(--mp-navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.5rem, 4vw, 2.15rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h3 { font-size: 1.1rem; }

.mp-container {
    max-width: var(--mp-maxw);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* ---- Header ---- */
.mp-header {
    background: var(--mp-surface);
    border-bottom: 1px solid var(--mp-line);
    position: sticky;
    top: 0;
    z-index: 40;
}
.mp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
    flex-wrap: wrap;
}
.mp-logo { display: inline-flex; align-items: center; gap: .55rem; }
.mp-logo img { height: 34px; width: auto; display: block; }
.mp-logo:hover { text-decoration: none; }
/* Theme-aware logo: dark-on-transparent for light, white for dark/glass.
   Selectors carry `img` so they out-specify the base `.mp-logo img` rule
   (which also sets display) — otherwise both logos render at once. */
.mp-logo img.mp-logo-dark { display: none; }
html[data-theme="dark"] .mp-logo img.mp-logo-light,
html[data-theme="glass"] .mp-logo img.mp-logo-light { display: none; }
html[data-theme="dark"] .mp-logo img.mp-logo-dark,
html[data-theme="glass"] .mp-logo img.mp-logo-dark { display: block; }
/* Wordmark: the brand name is hidden (the logo carries it); "Marketplace"
   shows in Oswald. Flex + line-height:1 so its box matches the logo's height
   and its optical centre lines up with the logo (no inherited 1.5 line box). */
.mp-logo-brand { display: none; }
.mp-logo-word { display: inline-flex; align-items: center; line-height: 1; }
.mp-logo-market {
    display: block;
    font-family: 'Oswald', system-ui, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--mp-ink);
}
html[data-theme="dark"] .mp-logo-market,
html[data-theme="glass"] .mp-logo-market { color: #fff; }
.mp-header-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.mp-header-nav a { color: var(--mp-muted); font-weight: 500; font-size: .95rem; }
.mp-header-nav a:hover { color: var(--mp-accent); text-decoration: none; }

/* ---- Seller logo (a rental company's logo on their listings) ----
   Rendered by marketplace/_seller_logo.html. Mirrors the header .mp-logo
   theme-toggle: when both variants are supplied they swap by html[data-theme]
   (light shows the light-background logo, dark/glass the dark-background one);
   a single supplied variant sits on a contrasting chip so it stays legible in
   every theme. Works in all three themes: the toggle keys off data-theme and
   the chips are fixed light/dark backgrounds independent of the page theme. */
.mp-slogo {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.mp-slogo-img {
    display: block;
    max-height: 34px;
    max-width: 150px;
    width: auto;
    height: auto;
}
/* Dual-variant theme toggle. Selectors carry `.mp-slogo-img` so they
   out-specify the base rule above — otherwise both logos would show at once
   (same gotcha the header .mp-logo rules note). */
.mp-slogo-img.mp-slogo-dark { display: none; }
html[data-theme="dark"] .mp-slogo-img.mp-slogo-light,
html[data-theme="glass"] .mp-slogo-img.mp-slogo-light { display: none; }
html[data-theme="dark"] .mp-slogo-img.mp-slogo-dark,
html[data-theme="glass"] .mp-slogo-img.mp-slogo-dark { display: block; }
/* Single-variant chips — a contrasting pad so the one logo reads on any
   surface/theme. Fixed colours on purpose (not the --mp-* vars). */
.mp-slogo-chip-light,
.mp-slogo-chip-dark {
    padding: 3px 6px;
    border-radius: 6px;
}
.mp-slogo-chip-light { background: #fff; }
.mp-slogo-chip-dark { background: #1a1a1a; }

/* ---- Buttons ---- */
.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font: inherit;
    font-weight: 600;
    line-height: 1.1;
    padding: .6rem 1.1rem;
    border-radius: var(--mp-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.mp-btn:hover { text-decoration: none; }
.mp-btn-primary { background: var(--mp-accent); color: #fff; }
.mp-btn-primary:hover { background: var(--mp-accent-hover); color: #fff; }
.mp-btn-ghost { background: transparent; color: var(--mp-accent); border-color: var(--mp-line-strong); }
.mp-btn-ghost:hover { background: var(--mp-surface-alt); color: var(--mp-accent-hover); }
.mp-btn-block { width: 100%; }
.mp-btn-sm { padding: .4rem .8rem; font-size: .9rem; }

/* ---- Hero ---- */
.mp-hero {
    background: linear-gradient(135deg, var(--mp-navy) 0%, #2b2a6b 55%, var(--mp-accent) 140%);
    color: #fff;
    padding: clamp(2rem, 6vw, 3.75rem) 0;
}
.mp-hero h1 { color: #fff; margin-bottom: .4rem; }
.mp-hero-sub {
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    max-width: 46rem;
    margin: 0 0 1.5rem;
}
.mp-hero-stat { color: rgba(255,255,255,.7); font-size: .9rem; margin-top: 1rem; }

.mp-search {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    background: rgba(255, 255, 255, 0.12);
    padding: .6rem;
    border-radius: var(--mp-radius);
    max-width: 40rem;
}
.mp-search select,
.mp-search input {
    flex: 1 1 12rem;
    min-width: 0;
    border: none;
    border-radius: var(--mp-radius-sm);
    padding: .7rem .8rem;
    font: inherit;
    background: #fff;
    color: var(--mp-ink);
}
.mp-search .mp-btn { flex: 0 0 auto; }

/* "Ask our AI" prompt under the hero search — prominent, gold-accented. */
.mp-search-ai {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-top: .9rem;
    max-width: 40rem;
    width: 100%;
    text-align: left;
    font: inherit;
    color: #fff;
    background: rgba(240, 180, 41, 0.14);
    border: 1px solid rgba(240, 180, 41, 0.55);
    border-radius: var(--mp-radius);
    padding: .7rem .9rem;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.mp-search-ai:hover {
    background: rgba(240, 180, 41, 0.24);
    border-color: var(--mp-gold);
    transform: translateY(-1px);
}
.mp-search-ai strong { color: var(--mp-gold); font-weight: 700; }
.mp-search-ai-ico {
    flex: 0 0 auto;
    font-size: 1.15rem;
    line-height: 1;
}

/* ---- Sections ---- */
.mp-section { padding: clamp(1.75rem, 4vw, 2.75rem) 0; margin-top: 20px;}
.mp-section-head { margin-bottom: 1.25rem; }
.mp-section-head p { color: var(--mp-muted); margin: .25rem 0 0; }
.mp-lead { color: var(--mp-muted); }

/* ---- Category tiles ---- */
.mp-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.mp-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .5rem;
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    padding: 1.1rem 1rem;
    box-shadow: var(--mp-shadow);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    color: var(--mp-ink);
}
.mp-tile:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--mp-shadow-lg);
    border-color: var(--mp-accent);
    color: var(--mp-ink);
}
.mp-tile-label { font-weight: 700; color: var(--mp-navy); font-size: 1.02rem; }
.mp-tile-count { color: var(--mp-muted); font-size: .88rem; }
.mp-tile-count strong { color: var(--mp-accent); }

/* ---- Region chips ---- */
.mp-chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.mp-chip {
    display: inline-flex;
    align-items: baseline;
    gap: .4rem;
    background: var(--mp-surface);
    border: 1px solid var(--mp-line-strong);
    border-radius: 999px;
    padding: .4rem .9rem;
    font-size: .9rem;
    color: var(--mp-ink);
}
.mp-chip:hover { border-color: var(--mp-accent); color: var(--mp-accent); text-decoration: none; }
.mp-chip .mp-chip-count { color: var(--mp-faint); font-size: .8rem; }
.mp-chip .mp-chip-state { color: var(--mp-faint); font-size: .78rem; text-transform: uppercase; }

/* ---- Breadcrumbs ---- */
.mp-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
    font-size: .85rem;
    color: var(--mp-faint);
    padding: 1rem 0 .25rem;
    list-style: none;
    margin: 0;
}
.mp-crumbs li { display: inline-flex; align-items: center; gap: .35rem; }
.mp-crumbs li::after { content: "\203A"; color: var(--mp-line-strong); }
.mp-crumbs li:last-child::after { content: ""; }
.mp-crumbs a { color: var(--mp-muted); }
.mp-crumbs span[aria-current] { color: var(--mp-ink); }

/* ---- Card grid + card ---- */
.mp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.1rem;
}
.mp-card {
    display: flex;
    flex-direction: column;
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    overflow: hidden;
    box-shadow: var(--mp-shadow);
    transition: transform .12s ease, box-shadow .12s ease;
}
.mp-card:hover { transform: translateY(-2px); box-shadow: var(--mp-shadow-lg); }
.mp-card-img-link { display: block; aspect-ratio: 4 / 3; background: var(--mp-surface-alt); }
.mp-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e7edf3, #d3dde6);
    color: #9aa8b5;
}
.mp-placeholder svg { width: 44px; height: 44px; opacity: .7; }
.mp-card-body { display: flex; flex-direction: column; gap: .45rem; padding: .9rem 1rem 1rem; flex: 1 1 auto; }
.mp-card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.mp-card-title { font-weight: 700; color: var(--mp-navy); font-size: 1rem; line-height: 1.25; }
.mp-card-title:hover { color: var(--mp-accent); text-decoration: none; }
.mp-card-meta { display: flex; flex-wrap: wrap; gap: .4rem .6rem; font-size: .82rem; color: var(--mp-muted); }
.mp-card-cat {
    display: inline-block;
    background: var(--mp-surface-alt);
    color: var(--mp-muted);
    border-radius: 4px;
    padding: .1rem .45rem;
    font-size: .78rem;
    font-weight: 600;
}
.mp-card-hero { font-size: .88rem; color: var(--mp-ink); }
.mp-card-hero strong { color: var(--mp-navy); }
.mp-card-seller { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: .8rem; color: var(--mp-faint); margin-top: auto; }
/* The card is dense — cap the seller logo a little smaller than the ~34px
   contract default it gets on the listing/seller pages. */
.mp-card-seller .mp-slogo-img { max-height: 24px; max-width: 118px; }
.mp-card-rates {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .1rem .55rem;
    padding-top: .35rem;
    border-top: 1px solid var(--mp-line);
    margin-top: .35rem;
}
.mp-rate-value { font-weight: 700; color: var(--mp-navy); }
.mp-rate-unit { color: var(--mp-faint); font-size: .78rem; }
.mp-rate-note { flex-basis: 100%; color: var(--mp-faint); font-size: .74rem; }
.mp-poa { font-weight: 700; color: var(--mp-accent); }

/* Prostart badge */
.mp-prostart {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0;
    background: rgba(0, 126, 163, 0.12);
    color: var(--mp-accent);
    border: 1px solid rgba(0, 126, 163, 0.3);
    border-radius: 6px;
    padding: .12rem .4rem;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.mp-instant {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    flex-shrink: 0;
    background: rgba(240, 180, 41, 0.16);
    color: #9a6a00;
    border: 1px solid rgba(240, 180, 41, 0.5);
    border-radius: 6px;
    padding: .12rem .4rem;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
html[data-theme="dark"] .mp-instant,
html[data-theme="glass"] .mp-instant { color: var(--mp-gold); }

/* ---- List-your-equipment page ---- */
.mp-le-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.mp-le-cta-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.mp-le-cta-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.mp-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.mp-steps li {
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    padding: 1.4rem 1.25rem 1.25rem;
    box-shadow: var(--mp-shadow);
    position: relative;
}
.mp-steps h3 { margin: .6rem 0 .35rem; }
.mp-steps p { color: var(--mp-muted); margin: 0; }
.mp-step-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem; height: 2rem;
    border-radius: 999px;
    background: var(--mp-accent);
    color: #fff;
    font-weight: 700;
}
.mp-le-why { background: var(--mp-surface-alt); }
.mp-le-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.mp-le-point {
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    padding: 1.1rem 1rem;
}
.mp-le-point h3 { font-size: 1rem; margin: 0 0 .35rem; }
.mp-le-point p { color: var(--mp-muted); margin: 0; font-size: .95rem; }

/* ---- Facet bar ---- */
.mp-facets {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: flex-end;
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    padding: 1rem;
    box-shadow: var(--mp-shadow);
    margin-bottom: 1.25rem;
}
.mp-field { display: flex; flex-direction: column; gap: .25rem; }
.mp-field-grow { flex: 1 1 12rem; min-width: 0; }
.mp-field label { font-size: .78rem; font-weight: 600; color: var(--mp-muted); }
.mp-input, .mp-select, .mp-textarea {
    font: inherit;
    line-height: 1.4;
    color: var(--mp-ink);
    background: #fff;
    border: 1px solid var(--mp-line-strong);
    border-radius: var(--mp-radius-sm);
    padding: .55rem .7rem;
    width: 100%;
    box-sizing: border-box;
}
/* Inputs and selects share one height so a facet row lines up; the textarea
   is excluded (it grows via min-height). */
.mp-input, .mp-select { height: 2.75rem; }
.mp-input:focus, .mp-select:focus, .mp-textarea:focus {
    outline: none;
    border-color: var(--mp-accent);
    box-shadow: 0 0 0 3px rgba(0, 126, 163, 0.15);
}
.mp-textarea { min-height: 6rem; resize: vertical; }
.mp-facet-actions { display: flex; gap: .5rem; }
.mp-facet-soon { font-size: .72rem; color: var(--mp-faint); }
.mp-count-note { color: var(--mp-muted); font-size: .9rem; margin: 0 0 1rem; }

/* ---- Empty state ---- */
.mp-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--mp-muted);
    background: var(--mp-surface);
    border: 1px dashed var(--mp-line-strong);
    border-radius: var(--mp-radius);
}

/* ---- Editorial + mesh blocks ---- */
.mp-editorial {
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    padding: 1.5rem;
    color: var(--mp-muted);
    box-shadow: var(--mp-shadow);
}
.mp-editorial p { margin: 0; max-width: 62rem; }

/* ---- Listing detail ---- */
.mp-detail-grid { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 900px) {
    .mp-detail-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; }
    .mp-detail-aside { position: sticky; top: 84px; }
}
.mp-gallery-main {
    aspect-ratio: 16 / 10;
    background: var(--mp-surface-alt);
    border-radius: var(--mp-radius);
    overflow: hidden;
    border: 1px solid var(--mp-line);
}
.mp-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.mp-gallery-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.mp-gallery-thumbs img {
    width: 74px; height: 56px; object-fit: cover;
    border-radius: 6px; border: 1px solid var(--mp-line-strong);
}
.mp-panel {
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    padding: 1.25rem;
    box-shadow: var(--mp-shadow);
    margin-bottom: 1.25rem;
}
.mp-panel h2, .mp-panel h3 { margin-top: 0; }
.mp-spec-table { width: 100%; border-collapse: collapse; }
.mp-spec-table th, .mp-spec-table td { text-align: left; padding: .5rem .25rem; border-bottom: 1px solid var(--mp-line); font-size: .92rem; }
.mp-spec-table th { color: var(--mp-muted); font-weight: 600; width: 45%; }
.mp-spec-table td { color: var(--mp-ink); }
.mp-spec-table tr:last-child th, .mp-spec-table tr:last-child td { border-bottom: none; }

.mp-rate-list { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.mp-rate-block { }
.mp-rate-block .mp-rate-big { font-size: 1.4rem; font-weight: 800; color: var(--mp-navy); }
.mp-rate-block .mp-rate-lbl { display: block; color: var(--mp-faint); font-size: .8rem; }
.mp-exgst { display: inline-block; margin-top: .4rem; font-size: .8rem; color: var(--mp-faint); }

.mp-kv { display: flex; gap: .5rem; font-size: .92rem; margin: .3rem 0; }
.mp-kv dt { color: var(--mp-muted); min-width: 8rem; }
.mp-kv dd { margin: 0; color: var(--mp-ink); }

.mp-note-box {
    background: rgba(0, 126, 163, 0.06);
    border: 1px solid rgba(0, 126, 163, 0.22);
    border-radius: var(--mp-radius-sm);
    padding: .9rem 1rem;
    font-size: .9rem;
    color: var(--mp-muted);
}
.mp-note-box strong { color: var(--mp-accent); }

.mp-seller-card { display: flex; flex-direction: column; gap: .35rem; }
.mp-seller-name { font-weight: 700; color: var(--mp-navy); font-size: 1.05rem; }
.mp-seller-meta { color: var(--mp-muted); font-size: .88rem; }

/* Enquiry form */
.mp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.mp-form-grid .mp-col-full { grid-column: 1 / -1; }
@media (max-width: 560px) { .mp-form-grid { grid-template-columns: 1fr; } }
.mp-req { color: #c0392b; }

/* Honeypot — visually hidden but not display:none (bots skip display:none) */
.mp-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* Flash / thank-you */
.mp-flash {
    border-radius: var(--mp-radius-sm);
    padding: .85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .95rem;
}
.mp-flash-ok { background: #e3f6ea; border: 1px solid #9fd8b4; color: #1e6b3f; }
.mp-flash-err { background: #fdecea; border: 1px solid #f2b8b2; color: #a32118; }
.mp-flash-ok strong, .mp-flash-ok a { color: #14532d; }
.mp-reveal-phone { font-size: 1.15rem; font-weight: 700; }

/* Report link/modal */
.mp-report { margin-top: 1rem; }
.mp-report > summary {
    cursor: pointer;
    color: var(--mp-faint);
    font-size: .82rem;
    list-style: none;
}
.mp-report > summary::-webkit-details-marker { display: none; }
.mp-report[open] > summary { color: var(--mp-muted); }
.mp-report-body {
    margin-top: .75rem;
    padding: 1rem;
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-sm);
    background: var(--mp-surface-alt);
}

/* How it works */
.mp-how {
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--mp-shadow);
    margin: 1rem 0 0;
}
.mp-how > summary { cursor: pointer; font-weight: 600; color: var(--mp-navy); }
.mp-how ol { margin: .75rem 0 0; padding-left: 1.25rem; color: var(--mp-muted); }
.mp-how li { margin-bottom: .4rem; }

/* ---- Footer ---- */
.mp-footer {
    background: var(--mp-navy);
    color: rgba(255, 255, 255, 0.75);
    margin-top: 3rem;
    padding: 2.25rem 0 2rem;
    font-size: .9rem;
}
.mp-footer a { color: rgba(255, 255, 255, 0.85); }
.mp-footer a:hover { color: #fff; }
.mp-footer-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    justify-content: space-between;
}
.mp-footer-brand { max-width: 22rem; }
.mp-footer-brand img { height: 30px; margin-bottom: .6rem; }
.mp-footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.mp-footer-links a { white-space: nowrap; }
.mp-footer-legal {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.55);
    font-size: .82rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    justify-content: space-between;
}

.mp-main { min-height: 50vh; }
.mp-mt { margin-top: 1.5rem; }
.mp-mb { margin-bottom: 1.5rem; }
.mp-muted { color: var(--mp-muted); }
.mp-small { font-size: .85rem; }

@media (max-width: 640px) {
    .mp-header { position: static; }
    .mp-detail-aside { position: static !important; }
}

/* =====================================================================
   VISITOR THEME PICKER (segmented control in the header)
   The public site has no logged-in user, so the picker persists to
   localStorage ('mkt_public_theme'); see base_public.html. Built on the
   --mp-* custom properties so it re-themes for free in dark/glass, with a
   couple of per-theme active-state tweaks below.
   ===================================================================== */
.mp-theme-picker {
    display: inline-flex;
    align-items: stretch;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--mp-line-strong);
    border-radius: 999px;
    background: var(--mp-surface-alt);
}
.mp-theme-btn {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    font: inherit;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    padding: .38rem .72rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--mp-muted);
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.mp-theme-btn:hover { color: var(--mp-ink); }
.mp-theme-btn[aria-pressed="true"] {
    background: var(--mp-surface);
    color: var(--mp-accent);
    box-shadow: var(--mp-shadow);
}
.mp-theme-ico { font-size: .95rem; line-height: 1; }
/* Icon-only on narrow screens; the label stays in the a11y tree (sr-only). */
@media (max-width: 720px) {
    .mp-theme-lbl {
        position: absolute;
        width: 1px; height: 1px;
        padding: 0; margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }
    .mp-theme-btn { padding: .4rem .55rem; }
}

/* =====================================================================
   DARK THEME  —  html[data-theme="dark"]
   Most components read the --mp-* custom properties, so re-pointing them
   here re-themes the bulk automatically. The explicit rules that follow
   cover the components that hard-code colours (hero, footer, form inputs,
   flashes, tinted note/badge boxes, image placeholders) and the primary
   button, whose fill flips to the light-blue accent + dark ink for contrast.
   ===================================================================== */
html[data-theme="dark"] {
    --mp-accent: #6ea8fe;
    --mp-accent-hover: #8bb9ff;
    --mp-navy: #e9ecef;            /* heading / value "ink" (was deep navy) */
    --mp-ink: #e0e0e0;
    --mp-muted: #adb5bd;
    --mp-faint: #8a929b;
    --mp-line: #444444;
    --mp-line-strong: #555555;
    --mp-bg: #1a1a1a;
    --mp-surface: #2c2c2c;
    --mp-surface-alt: #242424;
    --mp-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.30);
    --mp-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .mp-hero {
    background: linear-gradient(135deg, #14202c 0%, #1b2c3d 55%, #1e3d55 140%);
}
html[data-theme="dark"] .mp-search { background: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .mp-search select,
html[data-theme="dark"] .mp-search input {
    background: #2c2c2c;
    color: #e0e0e0;
}
html[data-theme="dark"] .mp-btn-primary { background: var(--mp-accent); color: #0b1a2b; }
html[data-theme="dark"] .mp-btn-primary:hover { background: var(--mp-accent-hover); color: #0b1a2b; }
html[data-theme="dark"] .mp-placeholder {
    background: linear-gradient(135deg, #2f2f2f, #262626);
    color: #5a5a5a;
}
html[data-theme="dark"] .mp-input,
html[data-theme="dark"] .mp-select,
html[data-theme="dark"] .mp-textarea {
    background: #242424;
    color: #e0e0e0;
    border-color: #555555;
}
html[data-theme="dark"] .mp-input:focus,
html[data-theme="dark"] .mp-select:focus,
html[data-theme="dark"] .mp-textarea:focus {
    border-color: var(--mp-accent);
    box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.25);
}
html[data-theme="dark"] .mp-input::placeholder,
html[data-theme="dark"] .mp-textarea::placeholder { color: #7b8794; }
/* Keep the native <select> dropdown list readable where the OS honours it. */
html[data-theme="dark"] .mp-select option,
html[data-theme="dark"] .mp-search select option {
    background: #2c2c2c;
    color: #e0e0e0;
}
html[data-theme="dark"] .mp-req { color: #f1948a; }
html[data-theme="dark"] .mp-note-box {
    background: rgba(110, 168, 254, 0.10);
    border-color: rgba(110, 168, 254, 0.28);
}
html[data-theme="dark"] .mp-prostart {
    background: rgba(110, 168, 254, 0.14);
    color: var(--mp-accent);
    border-color: rgba(110, 168, 254, 0.35);
}
html[data-theme="dark"] .mp-flash-ok {
    background: rgba(40, 167, 69, 0.16);
    border-color: rgba(40, 167, 69, 0.40);
    color: #7ee2a0;
}
html[data-theme="dark"] .mp-flash-ok strong,
html[data-theme="dark"] .mp-flash-ok a { color: #a6e9c1; }
html[data-theme="dark"] .mp-flash-err {
    background: rgba(220, 53, 69, 0.16);
    border-color: rgba(220, 53, 69, 0.40);
    color: #f1a7a0;
}
/* --mp-navy is now light ink, so the footer needs its own dark surface. */
html[data-theme="dark"] .mp-footer {
    background: #141414;
    border-top: 1px solid var(--mp-line);
}
html[data-theme="dark"] .mp-theme-btn[aria-pressed="true"] { background: #3a3a3a; }

/* =====================================================================
   GLASS THEME  —  html[data-theme="glass"]
   Frosted translucent panels over a fixed dark gradient page. As with dark,
   the --mp-* vars carry the surface/border/ink colours (translucent white),
   and the grouped rule below adds the backdrop-filter the vars can't. White
   text throughout; muted = rgba(255,255,255,.62).
   NOTE (CLAUDE.md gotcha): backdrop-filter establishes a containing block for
   absolutely-positioned descendants — the only one on these pages is the
   off-screen honeypot (left:-9999px), which stays hidden; .mp-detail-aside's
   position:sticky has no filtered ancestor, so it is unaffected.
   ===================================================================== */
html[data-theme="glass"] {
    --mp-accent: #8bd0ff;
    --mp-accent-hover: #b3e2ff;
    --mp-navy: #ffffff;
    --mp-ink: #ffffff;
    --mp-muted: rgba(255, 255, 255, 0.62);
    --mp-faint: rgba(255, 255, 255, 0.46);
    --mp-line: rgba(255, 255, 255, 0.22);
    --mp-line-strong: rgba(255, 255, 255, 0.38);
    --mp-bg: #16213e;
    --mp-surface: rgba(255, 255, 255, 0.13);
    --mp-surface-alt: rgba(255, 255, 255, 0.08);
    --mp-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    --mp-shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.40);
}
/* Page background: a fixed dark gradient so the frosted panels have something
   to blur. background-color + background-image (not the shorthand) so nothing
   accidentally wipes the image. */
html[data-theme="glass"] body {
    background-color: #0f1020;
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
    background-attachment: fixed;
    background-size: cover;
    color: #ffffff;
}
/* Add the frost. Fill + border come from the --mp-surface/-line vars above. */
html[data-theme="glass"] .mp-header,
html[data-theme="glass"] .mp-tile,
html[data-theme="glass"] .mp-chip,
html[data-theme="glass"] .mp-card,
html[data-theme="glass"] .mp-panel,
html[data-theme="glass"] .mp-facets,
html[data-theme="glass"] .mp-editorial,
html[data-theme="glass"] .mp-empty,
html[data-theme="glass"] .mp-how,
html[data-theme="glass"] .mp-report-body,
html[data-theme="glass"] .mp-theme-picker {
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}
html[data-theme="glass"] .mp-hero {
    background: linear-gradient(135deg, rgba(20, 22, 48, 0.55) 0%, rgba(15, 52, 96, 0.55) 100%);
}
html[data-theme="glass"] .mp-search {
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
}
html[data-theme="glass"] .mp-search select,
html[data-theme="glass"] .mp-search input {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}
html[data-theme="glass"] .mp-search input::placeholder { color: rgba(255, 255, 255, 0.60); }
html[data-theme="glass"] .mp-btn-primary {
    background: rgba(110, 168, 254, 0.40);
    border-color: rgba(140, 208, 255, 0.50);
    color: #fff;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
html[data-theme="glass"] .mp-btn-primary:hover {
    background: rgba(110, 168, 254, 0.60);
    color: #fff;
}
html[data-theme="glass"] .mp-btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.40);
    color: #fff;
}
html[data-theme="glass"] .mp-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
html[data-theme="glass"] .mp-input,
html[data-theme="glass"] .mp-select,
html[data-theme="glass"] .mp-textarea {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.30);
}
html[data-theme="glass"] .mp-input::placeholder,
html[data-theme="glass"] .mp-textarea::placeholder { color: rgba(255, 255, 255, 0.55); }
html[data-theme="glass"] .mp-input:focus,
html[data-theme="glass"] .mp-select:focus,
html[data-theme="glass"] .mp-textarea:focus {
    border-color: rgba(255, 255, 255, 0.70);
    box-shadow: 0 0 0 3px rgba(139, 208, 255, 0.25);
}
html[data-theme="glass"] .mp-select option,
html[data-theme="glass"] .mp-search select option {
    background: #16213e;
    color: #fff;
}
html[data-theme="glass"] .mp-req { color: #ffb3ab; }
html[data-theme="glass"] .mp-placeholder {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
    color: rgba(255, 255, 255, 0.40);
}
html[data-theme="glass"] .mp-note-box {
    background: rgba(139, 208, 255, 0.12);
    border-color: rgba(139, 208, 255, 0.30);
}
html[data-theme="glass"] .mp-prostart {
    background: rgba(139, 208, 255, 0.16);
    color: #cfeaff;
    border-color: rgba(139, 208, 255, 0.40);
}
html[data-theme="glass"] .mp-flash-ok {
    background: rgba(46, 204, 113, 0.18);
    border-color: rgba(46, 204, 113, 0.40);
    color: #c9f7dc;
}
html[data-theme="glass"] .mp-flash-ok strong,
html[data-theme="glass"] .mp-flash-ok a { color: #fff; }
html[data-theme="glass"] .mp-flash-err {
    background: rgba(231, 76, 60, 0.18);
    border-color: rgba(231, 76, 60, 0.40);
    color: #ffd6d1;
}
html[data-theme="glass"] .mp-footer {
    background: rgba(8, 10, 24, 0.35);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
html[data-theme="glass"] .mp-theme-btn { color: rgba(255, 255, 255, 0.70); }
html[data-theme="glass"] .mp-theme-btn:hover { color: #fff; }
html[data-theme="glass"] .mp-theme-btn[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

/* =====================================================================
   PUBLIC AI ASSISTANT WIDGET  (_chat_widget.html)
   Floating launcher + chat panel. Colours read the --mp-* custom
   properties so light/dark inherit automatically; the dark/glass blocks
   at the end cover the few hard-coded contrast cases (accent bubbles) and
   glass gives the panel a readable dark-translucent surface + frost.
   ===================================================================== */
.mp-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
/* Honeypot: off-screen, never focusable/visible to humans. */
.mp-chat-hp {
    position: absolute !important;
    left: -9999px; top: auto;
    width: 1px; height: 1px;
    opacity: 0;
}

.mp-chat { font-size: 16px; }

/* ---- Launcher (FAB) ---- */
.mp-chat-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.05rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--mp-accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--mp-shadow-lg);
    transition: background .12s ease, transform .12s ease;
}
.mp-chat-launcher:hover { background: var(--mp-accent-hover); transform: translateY(-1px); }
.mp-chat-launcher:focus-visible { outline: 3px solid var(--mp-accent); outline-offset: 2px; }
.mp-chat-launcher-ico { font-size: 1.15rem; line-height: 1; }
.mp-chat-is-open .mp-chat-launcher { display: none; }

/* ---- Panel ---- */
.mp-chat-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1001;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow-lg);
    overflow: hidden;
    color: var(--mp-ink);
}
.mp-chat-panel[hidden] { display: none; }

.mp-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--mp-line);
    background: var(--mp-surface-alt);
}
.mp-chat-head-title {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: var(--mp-navy);
}
.mp-chat-head-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.20);
}
.mp-chat-close {
    border: 0;
    background: transparent;
    color: var(--mp-muted);
    font-size: 1rem;
    line-height: 1;
    padding: .35rem .5rem;
    cursor: pointer;
    border-radius: var(--mp-radius-sm);
}
.mp-chat-close:hover { background: var(--mp-surface); color: var(--mp-ink); }
.mp-chat-close:focus-visible { outline: 2px solid var(--mp-accent); outline-offset: 1px; }

/* ---- Message log ---- */
.mp-chat-log {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .85rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.mp-chat-log:focus-visible { outline: none; }
.mp-chat-msg { display: flex; }
.mp-chat-msg-user { justify-content: flex-end; }
.mp-chat-msg-assistant { justify-content: flex-start; }
.mp-chat-bubble {
    max-width: 84%;
    padding: .55rem .75rem;
    border-radius: 14px;
    line-height: 1.4;
    font-size: .93rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.mp-chat-msg-assistant .mp-chat-bubble {
    background: var(--mp-surface-alt);
    color: var(--mp-ink);
    border: 1px solid var(--mp-line);
    border-bottom-left-radius: 4px;
}
.mp-chat-msg-user .mp-chat-bubble {
    background: var(--mp-accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Typing dots */
.mp-chat-dots { display: inline-flex; gap: 3px; padding: .1rem 0; }
.mp-chat-dots i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--mp-faint);
    display: inline-block;
    animation: mp-chat-blink 1.2s infinite ease-in-out both;
}
.mp-chat-dots i:nth-child(2) { animation-delay: .18s; }
.mp-chat-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes mp-chat-blink {
    0%, 80%, 100% { opacity: .25; }
    40% { opacity: 1; }
}

/* ---- Listing cards surfaced by the model ---- */
.mp-chat-cards {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 92%;
}
.mp-chat-card {
    display: flex;
    gap: .6rem;
    padding: .5rem;
    background: var(--mp-surface);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-sm);
    color: var(--mp-ink);
    text-decoration: none;
    transition: border-color .12s ease, box-shadow .12s ease;
}
a.mp-chat-card:hover { border-color: var(--mp-accent); box-shadow: var(--mp-shadow); text-decoration: none; }
.mp-chat-card-img {
    width: 66px; height: 66px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 6px;
    background: var(--mp-surface-alt);
}
.mp-chat-card-body { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.mp-chat-card-title { font-weight: 700; color: var(--mp-navy); font-size: .9rem; line-height: 1.2; }
.mp-chat-card-meta { font-size: .78rem; color: var(--mp-muted); }
.mp-chat-card-rate { font-size: .82rem; font-weight: 600; color: var(--mp-accent); }
.mp-chat-card-seller { font-size: .74rem; color: var(--mp-faint); }

/* ---- Status line ---- */
.mp-chat-status {
    margin: 0;
    padding: 0 .85rem;
    min-height: 1rem;
    font-size: .78rem;
    color: var(--mp-faint);
}
.mp-chat-status:empty { display: none; }

/* ---- Lead mini-form ---- */
.mp-chat-leadform {
    border-top: 1px solid var(--mp-line);
    padding: .75rem .85rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: 60%;
    overflow-y: auto;
    background: var(--mp-surface-alt);
}
.mp-chat-leadform[hidden] { display: none; }
.mp-chat-leadform-intro { margin: 0; font-size: .85rem; color: var(--mp-muted); }
.mp-chat-field { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--mp-muted); }
.mp-chat-field > span { font-weight: 600; }
.mp-chat-field input,
.mp-chat-field textarea {
    font: inherit;
    font-size: .9rem;
    padding: .45rem .55rem;
    border: 1px solid var(--mp-line-strong);
    border-radius: var(--mp-radius-sm);
    background: var(--mp-surface);
    color: var(--mp-ink);
    width: 100%;
}
.mp-chat-field input:focus,
.mp-chat-field textarea:focus {
    outline: none;
    border-color: var(--mp-accent);
    box-shadow: 0 0 0 3px rgba(0, 126, 163, 0.18);
}
.mp-chat-field input::placeholder,
.mp-chat-field textarea::placeholder { color: var(--mp-faint); }
.mp-chat-leaderror { margin: 0; font-size: .82rem; color: #c0392b; }
.mp-chat-leaderror[hidden] { display: none; }
.mp-chat-leadactions { display: flex; justify-content: flex-end; gap: .5rem; }

/* ---- Composer ---- */
.mp-chat-composer {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    padding: .6rem .7rem .3rem;
    border-top: 1px solid var(--mp-line);
}
.mp-chat-input {
    flex: 1 1 auto;
    resize: none;
    font: inherit;
    font-size: .93rem;
    line-height: 1.4;
    max-height: 120px;
    padding: .5rem .6rem;
    border: 1px solid var(--mp-line-strong);
    border-radius: var(--mp-radius-sm);
    background: var(--mp-surface);
    color: var(--mp-ink);
}
.mp-chat-input:focus {
    outline: none;
    border-color: var(--mp-accent);
    box-shadow: 0 0 0 3px rgba(0, 126, 163, 0.18);
}
.mp-chat-input::placeholder { color: var(--mp-faint); }
.mp-chat-input:disabled { opacity: .6; }
.mp-chat-send,
.mp-chat-stop {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.mp-chat-send { background: var(--mp-accent); color: #fff; }
.mp-chat-send:hover { background: var(--mp-accent-hover); }
.mp-chat-send:disabled { opacity: .5; cursor: default; }
.mp-chat-stop { background: var(--mp-surface-alt); color: var(--mp-ink); border: 1px solid var(--mp-line-strong); }
.mp-chat-send:focus-visible,
.mp-chat-stop:focus-visible { outline: 2px solid var(--mp-accent); outline-offset: 2px; }

.mp-chat-footrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: 0 .85rem .6rem;
}
.mp-chat-leadopen {
    border: 0;
    background: transparent;
    color: var(--mp-accent);
    font: inherit;
    font-size: .78rem;
    padding: .1rem 0;
    cursor: pointer;
    text-decoration: underline;
}
.mp-chat-leadopen:hover { color: var(--mp-accent-hover); }
.mp-chat-count { font-size: .72rem; color: var(--mp-faint); }

/* ---- Mobile: bottom sheet ---- */
@media (max-width: 480px) {
    .mp-chat-panel {
        right: 0; bottom: 0; left: 0;
        width: 100%;
        max-width: 100%;
        height: 82vh;
        border-radius: var(--mp-radius) var(--mp-radius) 0 0;
    }
    .mp-chat-launcher { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .mp-chat-launcher { transition: none; }
    .mp-chat-dots i { animation: none; opacity: .6; }
}

/* ---- DARK ---- */
html[data-theme="dark"] .mp-chat-msg-user .mp-chat-bubble {
    /* accent flips to light-blue in dark → dark ink for contrast (mirrors .mp-btn-primary) */
    color: #0b1a2b;
}
html[data-theme="dark"] .mp-chat-input:focus,
html[data-theme="dark"] .mp-chat-field input:focus,
html[data-theme="dark"] .mp-chat-field textarea:focus {
    box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.25);
}
html[data-theme="dark"] .mp-chat-launcher { color: #0b1a2b; }
html[data-theme="dark"] .mp-chat-send { color: #0b1a2b; }
html[data-theme="dark"] .mp-chat-leaderror { color: #f1948a; }

/* ---- GLASS ---- */
/* A chat panel needs a readable surface, so (per the CLAUDE.md popup guidance)
   use a DARK translucent fill under the frost rather than the near-clear
   --mp-surface white. White text throughout. */
html[data-theme="glass"] .mp-chat-panel {
    background: rgba(15, 15, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    color: #fff;
}
html[data-theme="glass"] .mp-chat-head { background: rgba(255, 255, 255, 0.06); }
html[data-theme="glass"] .mp-chat-launcher {
    background: rgba(110, 168, 254, 0.55);
    border-color: rgba(140, 208, 255, 0.55);
    color: #fff;
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    backdrop-filter: blur(10px) saturate(180%);
}
html[data-theme="glass"] .mp-chat-launcher:hover { background: rgba(110, 168, 254, 0.72); }
html[data-theme="glass"] .mp-chat-msg-assistant .mp-chat-bubble {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}
html[data-theme="glass"] .mp-chat-msg-user .mp-chat-bubble {
    background: rgba(110, 168, 254, 0.42);
    border: 1px solid rgba(140, 208, 255, 0.5);
    color: #fff;
}
html[data-theme="glass"] .mp-chat-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}
html[data-theme="glass"] .mp-chat-leadform { background: rgba(255, 255, 255, 0.05); }
html[data-theme="glass"] .mp-chat-field input,
html[data-theme="glass"] .mp-chat-field textarea,
html[data-theme="glass"] .mp-chat-input {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.30);
    color: #fff;
}
html[data-theme="glass"] .mp-chat-field input::placeholder,
html[data-theme="glass"] .mp-chat-field textarea::placeholder,
html[data-theme="glass"] .mp-chat-input::placeholder { color: rgba(255, 255, 255, 0.55); }
html[data-theme="glass"] .mp-chat-input:focus,
html[data-theme="glass"] .mp-chat-field input:focus,
html[data-theme="glass"] .mp-chat-field textarea:focus {
    border-color: rgba(255, 255, 255, 0.70);
    box-shadow: 0 0 0 3px rgba(139, 208, 255, 0.25);
}
html[data-theme="glass"] .mp-chat-send { background: rgba(110, 168, 254, 0.55); color: #fff; }
html[data-theme="glass"] .mp-chat-send:hover { background: rgba(110, 168, 254, 0.72); }
html[data-theme="glass"] .mp-chat-stop { background: rgba(255, 255, 255, 0.10); color: #fff; border-color: rgba(255, 255, 255, 0.30); }
html[data-theme="glass"] .mp-chat-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
html[data-theme="glass"] .mp-chat-leaderror { color: #ffb3ab; }
