/* Phone layout remains responsive; the shared appearance layer below applies everywhere. */
@media (max-width: 767px) and (pointer: coarse), (max-width: 1024px) and (max-height: 500px) and (pointer: coarse) {
  html[data-rm-mobile="true"][data-rm-theme] {
    --rm-mobile-bg: #f2f2f7;
    --rm-mobile-surface: #ffffff;
    --rm-mobile-raised: #e8e8ed;
    --rm-mobile-text: #19191d;
    --rm-mobile-muted: #63636d;
    --rm-mobile-line: #d9d9e1;
    --rm-mobile-blue: #006ee6;
    --rm-mobile-link: #0063cf;
    --rm-mobile-active: #e6f0ff;
    --rm-mobile-success: #17643d;
    --rm-mobile-success-bg: #e8f5ed;
    --rm-mobile-warning: #71501b;
    --rm-mobile-warning-bg: #fff4d8;
    --rm-mobile-error: #a12b35;
    --rm-mobile-error-bg: #fff0f1;
    --rm-mobile-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: light;
    font: 400 calc(17px * var(--rm-message-scale,1))/1.45 var(--rm-mobile-font);
    color: var(--rm-mobile-text);
    background: var(--rm-mobile-bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  html[data-rm-mobile="true"][data-rm-theme="night"] {
    --rm-mobile-bg: #09090b;
    --rm-mobile-surface: #1c1c1e;
    --rm-mobile-raised: #2c2c30;
    --rm-mobile-text: #f6f6f8;
    --rm-mobile-muted: #b1b1bb;
    --rm-mobile-line: #45454c;
    --rm-mobile-link: #76b4ff;
    --rm-mobile-active: #1a3453;
    --rm-mobile-success: #9ee0b8;
    --rm-mobile-success-bg: #173c2a;
    --rm-mobile-warning: #ffe0a1;
    --rm-mobile-warning-bg: #45361b;
    --rm-mobile-error: #ffb7bf;
    --rm-mobile-error-bg: #481f28;
    color-scheme: dark;
  }

  /* Existing page-specific tokens share the same phone palette. Semantic green
     and red remain status colors; message navigation uses separate blue tokens. */
  html[data-rm-mobile="true"][data-rm-theme],
  html[data-rm-mobile="true"][data-rm-theme] body {
    --op-bg: var(--rm-mobile-bg);
    --op-surface: var(--rm-mobile-surface);
    --op-text: var(--rm-mobile-text);
    --op-muted: var(--rm-mobile-muted);
    --op-border: var(--rm-mobile-line);
    --op-accent: var(--rm-mobile-link);
    --op-soft: var(--rm-mobile-active);
    --op-tag: var(--rm-mobile-raised);
    --op-ready: var(--rm-mobile-success);
    --op-ready-bg: var(--rm-mobile-success-bg);
    --ink: var(--rm-mobile-text);
    --muted: var(--rm-mobile-muted);
    --line: var(--rm-mobile-line);
    --surface: var(--rm-mobile-surface);
    --paper: var(--rm-mobile-surface);
    --page: var(--rm-mobile-bg);
    --background: var(--rm-mobile-bg);
    --blue: var(--rm-mobile-blue);
    --green: #17643d;
    --green-light: var(--rm-mobile-success-bg);
    --red: #a12b35;
  }

  html[data-rm-mobile="true"][data-rm-theme] body {
    margin: 0;
    background: var(--rm-mobile-bg);
    color: var(--rm-mobile-text);
    font-family: var(--rm-mobile-font);
    font-size: calc(17px * var(--rm-message-scale,1));
    line-height: 1.45;
    color-scheme: inherit;
  }

  html[data-rm-mobile="true"][data-rm-theme] :is(button, input, select, textarea) { font-family: var(--rm-mobile-font); }
  html[data-rm-mobile="true"][data-rm-theme] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select, textarea) {
    color: var(--rm-mobile-text);
    background-color: var(--rm-mobile-surface);
    border-color: var(--rm-mobile-line);
    color-scheme: inherit;
  }
  html[data-rm-mobile="true"][data-rm-theme] :is(.card, .filters, .search-toolbar, .field-grid, .form-grid, .title-review) :is(input, select, textarea) { font-size: max(16px, 1em); }
  html[data-rm-mobile="true"][data-rm-theme] :is(input, textarea)::placeholder { color: var(--rm-mobile-muted); opacity: 1; }
  html[data-rm-mobile="true"][data-rm-theme] :is(input[type="checkbox"], input[type="radio"], input[type="range"]) { accent-color: var(--rm-mobile-blue); }
  html[data-rm-mobile="true"][data-rm-theme] :is(button, a, input, select, textarea, summary):focus-visible { outline-color: var(--rm-mobile-link); outline-offset: 3px; }
  html[data-rm-mobile="true"][data-rm-theme] a { color: var(--rm-mobile-link); }

  html[data-rm-mobile="true"][data-rm-theme] :is(header, .topbar, .operations-header, .m-header, .mobile-view-nav, .navigation-bar) {
    color: var(--rm-mobile-text);
    background: var(--rm-mobile-surface);
    border-color: var(--rm-mobile-line);
  }
  html[data-rm-mobile="true"][data-rm-theme] :is(.brand, .brand span, .area-name, .back) { color: var(--rm-mobile-text); }
  html[data-rm-mobile="true"][data-rm-theme] :is(header a, .topbar a) { color: var(--rm-mobile-link); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.card, .hero, .record, .q-card, .q-review-summary, .rm-record-summary, .rm-summary-quote, .title-review, .transaction-test, .photo-grid label, .candidate, .summary-item, .policy, .popover, .rim-pricing-settings, .route-choice) {
    background: var(--rm-mobile-surface);
    color: var(--rm-mobile-text);
    border-color: var(--rm-mobile-line);
  }
  html[data-rm-mobile="true"][data-rm-theme] :is(.vehicle, .run, .transaction-step, .transaction-badge, .saved-offer, .lab-sms-launcher pre) {
    background: var(--rm-mobile-raised);
    color: var(--rm-mobile-text);
    border-color: var(--rm-mobile-line);
  }
  html[data-rm-mobile="true"][data-rm-theme] :is(.vin-start, .decoded, .result) { background: var(--rm-mobile-active); color: var(--rm-mobile-text); border-color: var(--rm-mobile-line); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.muted, .hint, .intro, .foot, .footnote, .record-id, .answer-source, .hero p, .vin-start p, .step-panel>p, .vehicle small, .run small, .brand span, .record-link span, .title-note, .transaction-note, .transaction-meta, .transaction-head p, .transaction-step small, .status-line small, .rm-summary-muted, .rm-summary-unknown, .rm-summary-provenance, .rm-summary-reference, .breakdown dt, .rm-summary-breakdown dt) { color: var(--rm-mobile-muted); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.rm-summary-total, .rate-prerequisites p) { color: var(--rm-mobile-text) !important; }
  html[data-rm-mobile="true"][data-rm-theme] :is(footer, .page-footer) { color: var(--rm-mobile-muted); background: var(--rm-mobile-bg); border-color: var(--rm-mobile-line); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.breakdown, .pricing-row, .pricing-breakdown-table td, .pricing-breakdown-table th, .title-review td, .title-review th, .rm-summary-breakdown, .rim-pricing-settings, .transaction-step, .record, .route-choice) { border-color: var(--rm-mobile-line); }

  /* Keep existing controls and validation behavior; only the primary visual
     treatment changes. Destructive/status/map controls retain their semantics. */
  html[data-rm-mobile="true"][data-rm-theme] :is(.q-primary, .button:not(.secondary):not(.text-button):not(.danger), .button-link:not(.secondary), .rm-summary-link, .primary-camera, button[type="submit"], .actions button:not(.secondary):not(.danger):not(.quiet), .save-bar button:not(.secondary):not(.danger), .heading>button, .page-heading>button) {
    color: #ffffff;
    background: var(--rm-mobile-blue);
    border-color: var(--rm-mobile-blue);
    font-size: calc(16px * var(--rm-message-scale,1));
    min-height: 44px;
  }
  html[data-rm-mobile="true"][data-rm-theme] :is(.secondary, .text-button, .quiet, .m-icon, .tabs button, .toolbar button, .map-view-controls button, .rim-count-buttons button) {
    color: var(--rm-mobile-link);
    background: var(--rm-mobile-surface);
    border-color: var(--rm-mobile-line);
  }
  html[data-rm-mobile="true"][data-rm-theme] :is(.tabs button[aria-current="page"], .map-view-controls button[aria-pressed="true"], .mobile-view-nav button.active, .steps button.active, .rim-count-buttons button[aria-pressed="true"]) {
    color: #ffffff;
    background: var(--rm-mobile-blue);
    border-color: var(--rm-mobile-blue);
  }
  html[data-rm-mobile="true"][data-rm-theme] :is(.steps button:not(.active):not(.complete), .mobile-view-nav button:not(.active)) { color: var(--rm-mobile-text); background: var(--rm-mobile-raised); }

  /* Regular portal navigation. The separate navigation web component requires
     the same inherited tokens in its own shadow stylesheet. */
  html[data-rm-mobile="true"][data-rm-theme] .operations-shell { margin: 0; width: 100%; max-width: 100%; border: 0; border-radius: 0; background: var(--rm-mobile-bg); box-shadow: none; }
  html[data-rm-mobile="true"][data-rm-theme] .operations-header { padding: 14px 16px; gap: 10px; }
  html[data-rm-mobile="true"][data-rm-theme] .operations-header .brand { min-width: 0; gap: 10px; flex: 1; flex-wrap: wrap; }
  html[data-rm-mobile="true"][data-rm-theme] .area-name { font-size: calc(14px * var(--rm-message-scale,1)); line-height: 1.3; padding-left: 10px; border-color: var(--rm-mobile-line); }
  html[data-rm-mobile="true"][data-rm-theme] .profile { width: 40px; min-width: 40px; height: 44px; font-size: calc(14px * var(--rm-message-scale,1)); color: var(--rm-mobile-text); background: var(--rm-mobile-raised); }
  html[data-rm-mobile="true"][data-rm-theme] .primary-nav { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 12px; padding: 0 16px; background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.primary-nav>a, .primary-nav>details>summary) { padding: 11px 0; font-size: calc(16px * var(--rm-message-scale,1)); min-height: 46px; color: var(--rm-mobile-muted); justify-content: flex-start; }
  html[data-rm-mobile="true"][data-rm-theme] .primary-nav>a[aria-current="page"] { color: var(--rm-mobile-link); border-bottom-color: var(--rm-mobile-link); font-weight: 600; }
  html[data-rm-mobile="true"][data-rm-theme] .primary-nav .test-lab { margin-left: 0; font-size: calc(14px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] .popover { font-size: calc(16px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.popover a, .account-popover strong) { color: var(--rm-mobile-text); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.account-popover>span, .health-popover p) { color: var(--rm-mobile-muted); font-size: calc(14px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] .health-menu[data-state="error"] .health-dot { background: var(--rm-mobile-error); }
  html[data-rm-mobile="true"][data-rm-theme] :is([data-rm-desktop-logo], [data-rm-desktop-wordmark]) { display: none !important; }
  html[data-rm-mobile="true"][data-rm-theme] .rm-mobile-logo,
  html[data-rm-mobile="true"][data-rm-theme] .rm-mobile-logo[hidden] { display: block !important; position: relative; width: 180px; height: 60px; max-width: 100%; flex: 0 0 auto; overflow: hidden; background: transparent; }
  html[data-rm-mobile="true"][data-rm-theme] .rm-mobile-logo img { position: absolute; display: block; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; object-fit: contain; background: transparent; }
  html[data-rm-mobile="true"][data-rm-theme] .rm-mobile-logo .rm-mobile-logo-day { width: 210px; left: -16px; top: -20px; }
  html[data-rm-mobile="true"][data-rm-theme] .rm-mobile-logo .rm-mobile-logo-night { width: 191px; left: -10px; top: -16px; }
  html[data-rm-mobile="true"][data-rm-theme="day"] .rm-mobile-logo-night,
  html[data-rm-mobile="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) .rm-mobile-logo-day { display: none !important; }

  /* Vehicle Quotes uses the same system font and generous reading scale as
     Messages while preserving the existing table data, links, and permissions. */
  html[data-rm-mobile="true"][data-rm-theme] :is(#quotes, #quote) { padding: 20px 16px 16px; }
  html[data-rm-mobile="true"][data-rm-theme] .search-toolbar { gap: 10px; margin-bottom: 16px; }
  html[data-rm-mobile="true"][data-rm-theme] .search-box { background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); border-radius: 12px; min-width: 0; }
  html[data-rm-mobile="true"][data-rm-theme] .search-box input { font-size: calc(17px * var(--rm-message-scale,1)); min-height: 48px; background: transparent; }
  html[data-rm-mobile="true"][data-rm-theme] #filters-toggle { font-size: calc(16px * var(--rm-message-scale,1)); border-radius: 12px; }
  html[data-rm-mobile="true"][data-rm-theme] :is(.filters label, .applied-filters, .pagination, .limit-note) { font-size: calc(14px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] .filters :is(input, select) { font-size: calc(16px * var(--rm-message-scale,1)); min-height: 44px; }
  html[data-rm-mobile="true"][data-rm-theme] :is(.quotes-table, .quotes-table tbody) { display: block; width: 100%; font-size: calc(17px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table thead { display: none; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(72px, 108px); gap: 8px 12px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--rm-mobile-line); border-radius: 14px; background: var(--rm-mobile-surface); }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td { display: block; border: 0; padding: 0; min-width: 0; font-size: calc(17px * var(--rm-message-scale,1)); color: var(--rm-mobile-text); overflow-wrap: anywhere; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; max-width: 108px; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td:nth-child(4) { display: none; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td:nth-child(5) { grid-column: 2; grid-row: 2; text-align: right; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td:nth-child(6) { grid-column: 1 / -1; grid-row: 3; text-align: left; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td[colspan] { grid-column: 1 / -1; grid-row: auto; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table .cell-title { font-size: calc(18px * var(--rm-message-scale, 1)); font-weight: 550; line-height: 1.4; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table td:first-child .cell-title { font-size: calc(20px * var(--rm-message-scale, 1)); font-weight: 550; }
  html[data-rm-mobile="true"][data-rm-theme] .quotes-table .cell-note { font-size: calc(14px * var(--rm-message-scale, 1)); line-height: 1.45; margin-top: 4px; color: var(--rm-mobile-muted); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.quotes-table .received, .quotes-table .status) { font-size: calc(13px * var(--rm-message-scale, 1)); line-height: 1.4; white-space: normal; }
  html[data-rm-mobile="true"][data-rm-theme] .row-link { min-height: 44px; font-size: calc(16px * var(--rm-message-scale,1)); padding: 6px 0 0; color: var(--rm-mobile-link); }
  html[data-rm-mobile="true"][data-rm-theme] .page-controls .text-button { min-height: 44px; font-size: calc(16px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] #quote h1 { font-size: calc(24px * var(--rm-message-scale,1)); line-height: 1.3; }
  html[data-rm-mobile="true"][data-rm-theme] :is(#quote h2, .q-dialog h2) { font-size: calc(20px * var(--rm-message-scale,1)); line-height: 1.3; }
  html[data-rm-mobile="true"][data-rm-theme] :is(#quote h3, .q-dialog h3, .q-support-title) { font-size: calc(17px * var(--rm-message-scale, 1)) !important; }
  html[data-rm-mobile="true"][data-rm-theme] :is(.q-customer-facts dd, .q-facts dd, .q-detail-list, .q-answers li, .q-support-title, .q-offer-line) { font-size: calc(16px * var(--rm-message-scale, 1)); line-height: 1.45; }
  html[data-rm-mobile="true"][data-rm-theme] :is(.q-muted, .q-meta, .q-contact, .q-location-note, .q-customer-facts dt, .q-facts dt, .q-price-label, .q-price-note, .q-policy, .q-answer-source, .q-support-detail, .q-timeline p, .q-card-status, .q-pickup-notice, .q-estimate-note) { font-size: calc(14px * var(--rm-message-scale, 1)); line-height: 1.45; }
  html[data-rm-mobile="true"][data-rm-theme] :is(.q-link, .q-message-launch, .q-answer-section summary) { min-height: 44px; font-size: calc(16px * var(--rm-message-scale, 1)); }
  html[data-rm-mobile="true"][data-rm-theme] .q-card { padding: 16px; border-radius: 14px; }
  html[data-rm-mobile="true"][data-rm-theme] .q-dialog:not(.q-message-dialog) { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }
  html[data-rm-mobile="true"][data-rm-theme] .q-dialog:not(.q-message-dialog)::backdrop { background: #0008; }

  /* Existing Messages body/dialog data-theme attributes cannot override the
     phone-wide preference established on html. Keep saved reading-size scaling. */
  html[data-rm-mobile="true"][data-rm-theme] .messages-page {
    --m-bg: var(--rm-mobile-bg); --m-surface: var(--rm-mobile-surface);
    --m-text: var(--rm-mobile-text); --m-muted: var(--rm-mobile-muted);
    --m-line: var(--rm-mobile-line); --m-green: var(--rm-mobile-link);
    --m-soft: var(--rm-mobile-active); --m-warning: var(--rm-mobile-warning-bg);
    color-scheme: inherit;
  }
  html[data-rm-mobile="true"][data-rm-theme] .q-message-dialog {
    --chat-bg: var(--rm-mobile-bg); --chat-surface: var(--rm-mobile-surface);
    --chat-header: var(--rm-mobile-surface); --chat-in: var(--rm-mobile-raised);
    --chat-out: var(--rm-mobile-blue); --chat-text: var(--rm-mobile-text);
    --chat-muted: var(--rm-mobile-muted); --chat-line: var(--rm-mobile-line);
    --chat-green: var(--rm-mobile-link); --chat-warning: var(--rm-mobile-warning-bg);
    --chat-warning-text: var(--rm-mobile-warning); --chat-notice: var(--rm-mobile-active);
    color-scheme: inherit;
  }
  html[data-rm-mobile="true"][data-rm-theme] :is(.q-message-out, .q-message-quote-preview) { color: #ffffff; background: var(--rm-mobile-blue); }
  html[data-rm-mobile="true"][data-rm-theme] .q-message-out :is(.q-message-meta, .q-message-quote, p, a) { color: #ffffff; }
  html[data-rm-mobile="true"][data-rm-theme] .q-message-out a { text-decoration: underline; }
  html[data-rm-mobile="true"][data-rm-theme] :is(.q-message-send:not(:disabled), .q-message-quote-primary:not(:disabled), .q-message-reply-badge) { background: var(--rm-mobile-blue); color: #ffffff; }
  html[data-rm-mobile="true"][data-rm-theme] :is(.q-message-send:disabled, .q-message-quote-primary:disabled) { background: var(--rm-mobile-raised) !important; color: var(--rm-mobile-muted) !important; }
  html[data-rm-mobile="true"][data-rm-theme] .q-message-mic[aria-pressed="true"] { background: #bd303a; color: #ffffff; }
  html[data-rm-mobile="true"][data-rm-theme] .q-message-form textarea { background: transparent; color: var(--rm-mobile-text); }
  html[data-rm-mobile="true"][data-rm-theme] .m-alert-content button { color: var(--rm-mobile-link); background: var(--rm-mobile-active); }
  html[data-rm-mobile="true"][data-rm-theme] .m-notice { color: var(--rm-mobile-warning); }
  html[data-rm-mobile="true"][data-rm-theme] .m-header { padding: 14px 16px; }
  html[data-rm-mobile="true"][data-rm-theme] .m-main { grid-template-columns: minmax(0, 1fr); }
  html[data-rm-mobile="true"][data-rm-theme] .m-inbox { padding: 20px 16px 28px; }

  /* Other operational pages retain their fields and actions with readable phone
     surfaces. Documents, photos, signatures, and geographic map fills are not inverted. */
  html[data-rm-mobile="true"][data-rm-theme] :is(.layout, .workspace-grid, .editor-layout, .coverage-layout, .yard-picker, .side-panel) { grid-template-columns: minmax(0, 1fr); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.hint, .muted, .footnote, .record-id, .answer-source, .rm-summary-muted, .rm-summary-unknown) { font-size: calc(14px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.card label, .card legend, .record p, .rm-summary-answers, .breakdown, .pricing-breakdown-table) { font-size: calc(16px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.rm-summary-answers th, .rm-summary-answers td) { font-size: calc(14px * var(--rm-message-scale,1)); }
  html[data-rm-mobile="true"][data-rm-theme] .rm-summary-answers thead th { color: var(--rm-mobile-muted); background: var(--rm-mobile-raised); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.county-list button:not([data-coverage]), .county-list button[data-coverage="none"]) { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); }
  html[data-rm-mobile="true"][data-rm-theme] #service-map { background: var(--rm-mobile-bg); }
  html[data-rm-mobile="true"][data-rm-theme] .job { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); }
  html[data-rm-mobile="true"][data-rm-theme] .job[aria-pressed="true"] { background: var(--rm-mobile-active); box-shadow: inset 4px 0 var(--rm-mobile-blue); }
  html[data-rm-mobile="true"][data-rm-theme] .layout>section { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }

  /* Preserve distinct success, warning, and error meanings in both themes. */
  html[data-rm-mobile="true"][data-rm-theme] .notice:not(.error):not(.warning):not(.good) { color: var(--rm-mobile-text); background: var(--rm-mobile-active); border-color: var(--rm-mobile-line); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.notice.good, .address-candidate, .calculation:not(.error), .protections, .steps button.complete, .transaction-step.done, .transaction-check.done, .badge.good, .record.saved-location, .county-list button[data-coverage="full"], .pricing-breakdown-table tr:last-child) { color: var(--rm-mobile-success); background: var(--rm-mobile-success-bg); border-color: var(--rm-mobile-success); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.address-candidate p, .protections strong, .status-line.done, .status-line.done span, .status-line.done strong, .zip-list .check[data-coverage="full"] small, .transaction-message:not(.error)) { color: var(--rm-mobile-success); }
  html[data-rm-mobile="true"][data-rm-theme] .protections span { color: var(--rm-mobile-success); background: var(--rm-mobile-success-bg); border-color: var(--rm-mobile-success); }
  html[data-rm-mobile="true"][data-rm-theme] .status-line:not(.done) { color: var(--rm-mobile-link); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.warning, .notice.warning, .banner, .q-pickup-notice, .rm-summary-notice, .badge.warn, .badge.dirty, .transaction-step.active, .county-list button[data-coverage="partial"]) { color: var(--rm-mobile-warning); background: var(--rm-mobile-warning-bg); border-color: var(--rm-mobile-warning); }
  html[data-rm-mobile="true"][data-rm-theme] .q-warning { color: var(--rm-mobile-warning); }
  html[data-rm-mobile="true"][data-rm-theme] .lab-shortcuts { color: var(--rm-mobile-warning); background: var(--rm-mobile-warning-bg) !important; border-color: var(--rm-mobile-warning) !important; }
  html[data-rm-mobile="true"][data-rm-theme] :is(.notice.error, .calculation.error, .q-error, .danger, .transaction-actions .danger, input[aria-invalid="true"], select[aria-invalid="true"]) { color: var(--rm-mobile-error); background: var(--rm-mobile-error-bg); border-color: var(--rm-mobile-error); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.error, .field-error, .transaction-message.error) { color: var(--rm-mobile-error); }
  html[data-rm-mobile="true"][data-rm-theme] .county-list button[data-coverage="operating"] { background: var(--rm-mobile-active); }
  html[data-rm-mobile="true"][data-rm-theme] :is(.chip, .badge.off, .badge:not(.good):not(.warn):not(.dirty)) { background: var(--rm-mobile-raised); color: var(--rm-mobile-muted); border-color: var(--rm-mobile-line); }
  html[data-rm-mobile="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) .city-context-list button { background: #452638; color: #f3bdd1; border-color: #915f73; }

  /* Shared generated portal surfaces use these standard utility classes. */
  html[data-rm-mobile="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.bg-white, .bg-slate-50, .bg-gray-50, .bg-zinc-50) { background-color: var(--rm-mobile-surface); }
  html[data-rm-mobile="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.bg-slate-100, .bg-gray-100, .bg-zinc-100) { background-color: var(--rm-mobile-raised); }
  html[data-rm-mobile="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.text-black, .text-slate-900, .text-gray-900, .text-zinc-900, .text-slate-800, .text-gray-800, .text-zinc-800) { color: var(--rm-mobile-text); }
  html[data-rm-mobile="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.text-slate-500, .text-gray-500, .text-zinc-500, .text-slate-600, .text-gray-600, .text-zinc-600, .text-slate-700, .text-gray-700, .text-zinc-700) { color: var(--rm-mobile-muted); }
  html[data-rm-mobile="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.border-slate-200, .border-gray-200, .border-zinc-200, .border-slate-300, .border-gray-300, .border-zinc-300) { border-color: var(--rm-mobile-line); }
}


/* Shared colors. Desktop reading sizes and data layouts retain their existing rules. */
html[data-rm-appearance="true"][data-rm-theme],
  html[data-rm-appearance="true"][data-rm-theme] body { --op-bg: var(--rm-mobile-bg); --op-surface: var(--rm-mobile-surface); --op-text: var(--rm-mobile-text); --op-muted: var(--rm-mobile-muted); --op-border: var(--rm-mobile-line); --op-accent: var(--rm-mobile-link); --op-soft: var(--rm-mobile-active); --op-tag: var(--rm-mobile-raised); --op-ready: var(--rm-mobile-success); --op-ready-bg: var(--rm-mobile-success-bg); --ink: var(--rm-mobile-text); --muted: var(--rm-mobile-muted); --line: var(--rm-mobile-line); --surface: var(--rm-mobile-surface); --paper: var(--rm-mobile-surface); --page: var(--rm-mobile-bg); --background: var(--rm-mobile-bg); --blue: var(--rm-mobile-blue); --green: #17643d; --green-light: var(--rm-mobile-success-bg); --red: #a12b35; }
html[data-rm-appearance="true"][data-rm-theme] body { background: var(--rm-mobile-bg); color: var(--rm-mobile-text); font-family: var(--rm-mobile-font); color-scheme: inherit; }
html[data-rm-appearance="true"][data-rm-theme] :is(button, input, select, textarea) { font-family: var(--rm-mobile-font); }
html[data-rm-appearance="true"][data-rm-theme] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select, textarea) { color: var(--rm-mobile-text); background-color: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); color-scheme: inherit; }
html[data-rm-appearance="true"][data-rm-theme] :is(input, textarea)::placeholder { color: var(--rm-mobile-muted); }
html[data-rm-appearance="true"][data-rm-theme] :is(input[type="checkbox"], input[type="radio"], input[type="range"]) { accent-color: var(--rm-mobile-blue); }
html[data-rm-appearance="true"][data-rm-theme] :is(button, a, input, select, textarea, summary):focus-visible { outline-color: var(--rm-mobile-link); }
html[data-rm-appearance="true"][data-rm-theme] a { color: var(--rm-mobile-link); }
html[data-rm-appearance="true"][data-rm-theme] :is(header, .topbar, .operations-header, .m-header, .mobile-view-nav, .navigation-bar) { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.brand, .brand span, .area-name, .back) { color: var(--rm-mobile-text); }
html[data-rm-appearance="true"][data-rm-theme] :is(header a, .topbar a) { color: var(--rm-mobile-link); }
html[data-rm-appearance="true"][data-rm-theme] :is(.card, .hero, .record, .q-card, .q-review-summary, .rm-record-summary, .rm-summary-quote, .title-review, .transaction-test, .photo-grid label, .candidate, .summary-item, .policy, .popover, .rim-pricing-settings, .route-choice) { background: var(--rm-mobile-surface); color: var(--rm-mobile-text); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.vehicle, .run, .transaction-step, .transaction-badge, .saved-offer, .lab-sms-launcher pre) { background: var(--rm-mobile-raised); color: var(--rm-mobile-text); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.vin-start, .decoded, .result) { background: var(--rm-mobile-active); color: var(--rm-mobile-text); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.muted, .hint, .intro, .foot, .footnote, .record-id, .answer-source, .hero p, .vin-start p, .step-panel>p, .vehicle small, .run small, .brand span, .record-link span, .title-note, .transaction-note, .transaction-meta, .transaction-head p, .transaction-step small, .status-line small, .rm-summary-muted, .rm-summary-unknown, .rm-summary-provenance, .rm-summary-reference, .breakdown dt, .rm-summary-breakdown dt) { color: var(--rm-mobile-muted); }
html[data-rm-appearance="true"][data-rm-theme] :is(.rm-summary-total, .rate-prerequisites p) { color: var(--rm-mobile-text) !important; }
html[data-rm-appearance="true"][data-rm-theme] :is(footer, .page-footer) { color: var(--rm-mobile-muted); background: var(--rm-mobile-bg); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.breakdown, .pricing-row, .pricing-breakdown-table td, .pricing-breakdown-table th, .title-review td, .title-review th, .rm-summary-breakdown, .rim-pricing-settings, .transaction-step, .record, .route-choice) { border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.q-primary, .button:not(.secondary):not(.text-button):not(.danger), .button-link:not(.secondary), .rm-summary-link, .primary-camera, button[type="submit"], .actions button:not(.secondary):not(.danger):not(.quiet), .save-bar button:not(.secondary):not(.danger), .heading>button, .page-heading>button) { color: #ffffff; background: var(--rm-mobile-blue); border-color: var(--rm-mobile-blue); }
html[data-rm-appearance="true"][data-rm-theme] :is(.secondary, .text-button, .quiet, .m-icon, .tabs button, .toolbar button, .map-view-controls button, .rim-count-buttons button) { color: var(--rm-mobile-link); background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.tabs button[aria-current="page"], .map-view-controls button[aria-pressed="true"], .mobile-view-nav button.active, .steps button.active, .rim-count-buttons button[aria-pressed="true"]) { color: #ffffff; background: var(--rm-mobile-blue); border-color: var(--rm-mobile-blue); }
html[data-rm-appearance="true"][data-rm-theme] :is(.steps button:not(.active):not(.complete), .mobile-view-nav button:not(.active)) { color: var(--rm-mobile-text); background: var(--rm-mobile-raised); }
html[data-rm-appearance="true"][data-rm-theme] .operations-shell { background: var(--rm-mobile-bg); }
html[data-rm-appearance="true"][data-rm-theme] .area-name { border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] .profile { color: var(--rm-mobile-text); background: var(--rm-mobile-raised); }
html[data-rm-appearance="true"][data-rm-theme] .primary-nav { background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.primary-nav>a, .primary-nav>details>summary) { color: var(--rm-mobile-muted); }
html[data-rm-appearance="true"][data-rm-theme] .primary-nav>a[aria-current="page"] { color: var(--rm-mobile-link); border-bottom-color: var(--rm-mobile-link); }
html[data-rm-appearance="true"][data-rm-theme] :is(.popover a, .account-popover strong) { color: var(--rm-mobile-text); }
html[data-rm-appearance="true"][data-rm-theme] :is(.account-popover>span, .health-popover p) { color: var(--rm-mobile-muted); }
html[data-rm-appearance="true"][data-rm-theme] .health-menu[data-state="error"] .health-dot { background: var(--rm-mobile-error); }
html[data-rm-appearance="true"][data-rm-theme] .rm-mobile-logo,
  html[data-rm-appearance="true"][data-rm-theme] .rm-mobile-logo[hidden] { background: transparent; }
html[data-rm-appearance="true"][data-rm-theme] .rm-mobile-logo img { background: transparent; }
html[data-rm-appearance="true"][data-rm-theme] .search-box { background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] .search-box input { background: transparent; }
html[data-rm-appearance="true"][data-rm-theme] .quotes-table tr { background: var(--rm-mobile-surface); }
html[data-rm-appearance="true"][data-rm-theme] .quotes-table td { color: var(--rm-mobile-text); }
html[data-rm-appearance="true"][data-rm-theme] .quotes-table .cell-note { color: var(--rm-mobile-muted); }
html[data-rm-appearance="true"][data-rm-theme] .row-link { color: var(--rm-mobile-link); }
html[data-rm-appearance="true"][data-rm-theme] .q-dialog:not(.q-message-dialog) { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] .q-dialog:not(.q-message-dialog)::backdrop { background: #0008; }
html[data-rm-appearance="true"][data-rm-theme] .messages-page { --m-bg: var(--rm-mobile-bg); --m-surface: var(--rm-mobile-surface); --m-text: var(--rm-mobile-text); --m-muted: var(--rm-mobile-muted); --m-line: var(--rm-mobile-line); --m-green: var(--rm-mobile-link); --m-soft: var(--rm-mobile-active); --m-warning: var(--rm-mobile-warning-bg); color-scheme: inherit; }
html[data-rm-appearance="true"][data-rm-theme] .q-message-dialog { --chat-bg: var(--rm-mobile-bg); --chat-surface: var(--rm-mobile-surface); --chat-header: var(--rm-mobile-surface); --chat-in: var(--rm-mobile-raised); --chat-out: var(--rm-mobile-blue); --chat-text: var(--rm-mobile-text); --chat-muted: var(--rm-mobile-muted); --chat-line: var(--rm-mobile-line); --chat-green: var(--rm-mobile-link); --chat-warning: var(--rm-mobile-warning-bg); --chat-warning-text: var(--rm-mobile-warning); --chat-notice: var(--rm-mobile-active); color-scheme: inherit; }
html[data-rm-appearance="true"][data-rm-theme] :is(.q-message-out, .q-message-quote-preview) { color: #ffffff; background: var(--rm-mobile-blue); }
html[data-rm-appearance="true"][data-rm-theme] .q-message-out :is(.q-message-meta, .q-message-quote, p, a) { color: #ffffff; }
html[data-rm-appearance="true"][data-rm-theme] :is(.q-message-send:not(:disabled), .q-message-quote-primary:not(:disabled), .q-message-reply-badge) { background: var(--rm-mobile-blue); color: #ffffff; }
html[data-rm-appearance="true"][data-rm-theme] :is(.q-message-send:disabled, .q-message-quote-primary:disabled) { background: var(--rm-mobile-raised) !important; color: var(--rm-mobile-muted) !important; }
html[data-rm-appearance="true"][data-rm-theme] .q-message-mic[aria-pressed="true"] { background: #bd303a; color: #ffffff; }
html[data-rm-appearance="true"][data-rm-theme] .q-message-form textarea { background: transparent; color: var(--rm-mobile-text); }
html[data-rm-appearance="true"][data-rm-theme] .m-alert-content button { color: var(--rm-mobile-link); background: var(--rm-mobile-active); }
html[data-rm-appearance="true"][data-rm-theme] .m-notice { color: var(--rm-mobile-warning); }
html[data-rm-appearance="true"][data-rm-theme] .rm-summary-answers thead th { color: var(--rm-mobile-muted); background: var(--rm-mobile-raised); }
html[data-rm-appearance="true"][data-rm-theme] :is(.county-list button:not([data-coverage]), .county-list button[data-coverage="none"]) { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); }
html[data-rm-appearance="true"][data-rm-theme] #service-map { background: var(--rm-mobile-bg); }
html[data-rm-appearance="true"][data-rm-theme] .job { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); }
html[data-rm-appearance="true"][data-rm-theme] .job[aria-pressed="true"] { background: var(--rm-mobile-active); }
html[data-rm-appearance="true"][data-rm-theme] .layout>section { color: var(--rm-mobile-text); background: var(--rm-mobile-surface); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] .notice:not(.error):not(.warning):not(.good) { color: var(--rm-mobile-text); background: var(--rm-mobile-active); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"][data-rm-theme] :is(.notice.good, .address-candidate, .calculation:not(.error), .protections, .steps button.complete, .transaction-step.done, .transaction-check.done, .badge.good, .record.saved-location, .county-list button[data-coverage="full"], .pricing-breakdown-table tr:last-child) { color: var(--rm-mobile-success); background: var(--rm-mobile-success-bg); border-color: var(--rm-mobile-success); }
html[data-rm-appearance="true"][data-rm-theme] :is(.address-candidate p, .protections strong, .status-line.done, .status-line.done span, .status-line.done strong, .zip-list .check[data-coverage="full"] small, .transaction-message:not(.error)) { color: var(--rm-mobile-success); }
html[data-rm-appearance="true"][data-rm-theme] .protections span { color: var(--rm-mobile-success); background: var(--rm-mobile-success-bg); border-color: var(--rm-mobile-success); }
html[data-rm-appearance="true"][data-rm-theme] .status-line:not(.done) { color: var(--rm-mobile-link); }
html[data-rm-appearance="true"][data-rm-theme] :is(.warning, .notice.warning, .banner, .q-pickup-notice, .rm-summary-notice, .badge.warn, .badge.dirty, .transaction-step.active, .county-list button[data-coverage="partial"]) { color: var(--rm-mobile-warning); background: var(--rm-mobile-warning-bg); border-color: var(--rm-mobile-warning); }
html[data-rm-appearance="true"][data-rm-theme] .q-warning { color: var(--rm-mobile-warning); }
html[data-rm-appearance="true"][data-rm-theme] .lab-shortcuts { color: var(--rm-mobile-warning); background: var(--rm-mobile-warning-bg) !important; border-color: var(--rm-mobile-warning) !important; }
html[data-rm-appearance="true"][data-rm-theme] :is(.notice.error, .calculation.error, .q-error, .danger, .transaction-actions .danger, input[aria-invalid="true"], select[aria-invalid="true"]) { color: var(--rm-mobile-error); background: var(--rm-mobile-error-bg); border-color: var(--rm-mobile-error); }
html[data-rm-appearance="true"][data-rm-theme] :is(.error, .field-error, .transaction-message.error) { color: var(--rm-mobile-error); }
html[data-rm-appearance="true"][data-rm-theme] .county-list button[data-coverage="operating"] { background: var(--rm-mobile-active); }
html[data-rm-appearance="true"][data-rm-theme] :is(.chip, .badge.off, .badge:not(.good):not(.warn):not(.dirty)) { background: var(--rm-mobile-raised); color: var(--rm-mobile-muted); border-color: var(--rm-mobile-line); }
html[data-rm-appearance="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) .city-context-list button { background: #452638; color: #f3bdd1; border-color: #915f73; }
html[data-rm-appearance="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.bg-white, .bg-slate-50, .bg-gray-50, .bg-zinc-50) { background-color: var(--rm-mobile-surface); }
html[data-rm-appearance="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.bg-slate-100, .bg-gray-100, .bg-zinc-100) { background-color: var(--rm-mobile-raised); }
html[data-rm-appearance="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.text-black, .text-slate-900, .text-gray-900, .text-zinc-900, .text-slate-800, .text-gray-800, .text-zinc-800) { color: var(--rm-mobile-text); }
html[data-rm-appearance="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.text-slate-500, .text-gray-500, .text-zinc-500, .text-slate-600, .text-gray-600, .text-zinc-600, .text-slate-700, .text-gray-700, .text-zinc-700) { color: var(--rm-mobile-muted); }
html[data-rm-appearance="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) :is(.border-slate-200, .border-gray-200, .border-zinc-200, .border-slate-300, .border-gray-300, .border-zinc-300) { border-color: var(--rm-mobile-line); }

html[data-rm-appearance="true"][data-rm-theme] {
  --rm-mobile-bg: #f2f2f7; --rm-mobile-surface: #ffffff; --rm-mobile-raised: #e8e8ed;
  --rm-mobile-text: #19191d; --rm-mobile-muted: #63636d; --rm-mobile-line: #d9d9e1;
  --rm-mobile-blue: #006ee6; --rm-mobile-link: #0063cf; --rm-mobile-active: #e6f0ff;
  --rm-mobile-success: #17643d; --rm-mobile-success-bg: #e8f5ed;
  --rm-mobile-warning: #71501b; --rm-mobile-warning-bg: #fff4d8;
  --rm-mobile-error: #a12b35; --rm-mobile-error-bg: #fff0f1;
  --rm-mobile-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light; color: var(--rm-mobile-text); background: var(--rm-mobile-bg);
}
html[data-rm-appearance="true"][data-rm-theme="night"] {
  --rm-mobile-bg: #111b2b; --rm-mobile-surface: #1b293d; --rm-mobile-raised: #283950;
  --rm-mobile-text: #f2f6ff; --rm-mobile-muted: #b1bfd3; --rm-mobile-line: #43546e;
  --rm-mobile-link: #88bdff; --rm-mobile-active: #224366;
  --rm-mobile-success: #9ee0b8; --rm-mobile-success-bg: #193d35;
  --rm-mobile-warning: #ffe0a1; --rm-mobile-warning-bg: #473b24;
  --rm-mobile-error: #ffb7bf; --rm-mobile-error-bg: #492d3b;
  color-scheme: dark;
}
html[data-rm-appearance="true"][data-rm-theme="dark"] {
  --rm-mobile-bg: #09090b; --rm-mobile-surface: #1c1c1e; --rm-mobile-raised: #2c2c30;
  --rm-mobile-text: #f6f6f8; --rm-mobile-muted: #b1b1bb; --rm-mobile-line: #45454c;
  --rm-mobile-link: #76b4ff; --rm-mobile-active: #1a3453;
  --rm-mobile-success: #9ee0b8; --rm-mobile-success-bg: #173c2a;
  --rm-mobile-warning: #ffe0a1; --rm-mobile-warning-bg: #45361b;
  --rm-mobile-error: #ffb7bf; --rm-mobile-error-bg: #481f28;
  color-scheme: dark;
}
html[data-rm-appearance="true"][data-rm-theme],
html[data-rm-appearance="true"][data-rm-theme] body {
  --op-bg: var(--rm-mobile-bg); --op-surface: var(--rm-mobile-surface); --op-text: var(--rm-mobile-text);
  --op-muted: var(--rm-mobile-muted); --op-border: var(--rm-mobile-line); --op-accent: var(--rm-mobile-link);
  --op-soft: var(--rm-mobile-active); --op-tag: var(--rm-mobile-raised);
  --op-ready: var(--rm-mobile-success); --op-ready-bg: var(--rm-mobile-success-bg);
  --ink: var(--rm-mobile-text); --muted: var(--rm-mobile-muted); --line: var(--rm-mobile-line);
  --surface: var(--rm-mobile-surface); --paper: var(--rm-mobile-surface); --page: var(--rm-mobile-bg);
  --background: var(--rm-mobile-bg); --blue: var(--rm-mobile-blue);
  --green: var(--rm-mobile-success); --green-light: var(--rm-mobile-success-bg); --red: var(--rm-mobile-error);
}
html[data-rm-appearance="true"][data-rm-theme] :is([data-rm-desktop-logo], [data-rm-desktop-wordmark]) { display: none !important; }
html[data-rm-appearance="true"][data-rm-theme] .rm-mobile-logo,
html[data-rm-appearance="true"][data-rm-theme] .rm-mobile-logo[hidden] { display: block !important; position: relative; width: 180px; height: 60px; max-width: 100%; flex: 0 0 auto; overflow: hidden; background: transparent; }
html[data-rm-appearance="true"][data-rm-theme] .rm-mobile-logo img { position: absolute; display: block; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; object-fit: contain; background: transparent; }
html[data-rm-appearance="true"][data-rm-theme] .rm-mobile-logo .rm-mobile-logo-day { width: 210px; left: -16px; top: -20px; }
html[data-rm-appearance="true"][data-rm-theme] .rm-mobile-logo .rm-mobile-logo-night { width: 191px; left: -10px; top: -16px; }
html[data-rm-appearance="true"][data-rm-theme="day"] .rm-mobile-logo-night,
html[data-rm-appearance="true"]:is([data-rm-theme="night"], [data-rm-theme="dark"]) .rm-mobile-logo-day { display: none !important; }
html[data-rm-appearance="true"][data-rm-theme] .rm-appearance-control { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--rm-mobile-muted); font-size: calc(12px * var(--rm-message-scale,1)); line-height: 1.3; }
html[data-rm-appearance="true"][data-rm-theme] .rm-appearance-control select { width: auto; min-height: 40px; max-width: 145px; padding: 7px 10px; border: 1px solid var(--rm-mobile-line); border-radius: 10px; background: var(--rm-mobile-surface); color: var(--rm-mobile-text); font: inherit; cursor: pointer; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover { min-width: min(280px, calc(100vw - 32px)); }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-appearance-control { justify-content: space-between; margin: 9px 0 0; padding: 9px 10px 0; border-top: 1px solid var(--rm-mobile-line); gap: 12px; font-size: calc(13px * var(--rm-message-scale,1)); }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-appearance-control select { min-width: 0; max-width: 58%; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-account-menu { position: relative; flex: 0 0 auto; margin-left: auto; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-account-menu > summary { display: flex; align-items: center; justify-content: center; list-style: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--rm-mobile-line); border-radius: 50%; color: var(--rm-mobile-text); background: var(--rm-mobile-raised); font-size: calc(12px * var(--rm-message-scale,1)); cursor: pointer; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-account-menu > summary::-webkit-details-marker { display: none; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-account-menu .account-popover { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; max-width: calc(100vw - 32px); padding: 8px; border: 1px solid var(--rm-mobile-line); border-radius: 8px; background: var(--rm-mobile-surface); box-shadow: 0 10px 35px #0003; font-size: calc(13px * var(--rm-message-scale,1)); text-align: left; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-account-menu .account-popover > :is(strong, span) { display: block; padding: 3px 10px; overflow-wrap: anywhere; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-account-menu .account-popover > span { color: var(--rm-mobile-muted); font-size: calc(12px * var(--rm-message-scale,1)); }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-account-menu .account-popover > a { display: block; margin-top: 7px; padding: 9px 11px; border-top: 1px solid var(--rm-mobile-line); color: var(--rm-mobile-link); text-decoration: none; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-account-menu .account-popover > a:hover { background: var(--rm-mobile-active); }
html[data-rm-appearance="true"][data-rm-theme] :is(.operations-header, .m-header, body > header) { flex-wrap: wrap; }
html[data-rm-appearance="true"][data-rm-theme] .operations-shell { border-radius: 14px; box-shadow: 0 2px 8px #00000008; }
html[data-rm-appearance="true"][data-rm-theme] .account-tools { flex-wrap: wrap; }
html[data-rm-appearance="true"][data-rm-theme] :is(.card, .q-card, .m-conversations) { border-radius: 14px; }
html[data-rm-appearance="true"][data-rm-theme] :is(.search-box, #filters-toggle) { border-radius: 12px; }
html[data-rm-appearance="true"][data-rm-theme] #message-theme { display: none; }
html[data-rm-appearance="true"][data-rm-theme] .q-message-tools .rm-appearance-control { font-size: inherit; }
@media (max-width: 767px) and (pointer: coarse), (max-width: 1024px) and (max-height: 500px) and (pointer: coarse) {
  html[data-rm-appearance="true"] .rm-appearance-control { font-size: calc(14px * var(--rm-message-scale,1)); }
  html[data-rm-appearance="true"] .rm-appearance-control select { font-size: calc(16px * var(--rm-message-scale,1)); min-height: 44px; }
  html[data-rm-appearance="true"] .operations-shell { border-radius: 0; box-shadow: none; }
  html[data-rm-appearance="true"] .operations-header .account-tools { gap: 10px; }
  html[data-rm-appearance="true"] .rm-shared-account-menu > summary { min-width: 44px; min-height: 44px; }
  html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-appearance-control { font-size: calc(14px * var(--rm-message-scale,1)); }
  html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-appearance-control select { font-size: calc(16px * var(--rm-message-scale,1)); min-height: 44px; }
}

/* One header geometry on every Operations page, independent of page CSS,
   reading-size preference, input type, or theme. */
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .account-menu {
  position: relative; flex: 0 0 auto;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .account-menu > .profile {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  width: 44px; min-width: 44px; max-width: 44px;
  height: 44px; min-height: 44px; max-height: 44px;
  aspect-ratio: 1; flex: 0 0 44px; margin: 0; padding: 0; gap: 0;
  border: 1px solid var(--rm-mobile-line); border-radius: 50%;
  background: var(--rm-mobile-raised); color: var(--rm-mobile-text);
  font-family: var(--rm-mobile-font); font-size: calc(14px * var(--rm-message-scale,1)); font-weight: 400;
  line-height: 1; letter-spacing: 0; list-style: none; cursor: pointer;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .profile::-webkit-details-marker { display: none; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .profile > span {
  display: block; margin: 0; padding: 0; border: 0; font: inherit; color: inherit;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .rm-mobile-logo {
  box-sizing: border-box; width: 180px; min-width: 180px; max-width: 180px;
  height: 60px; min-height: 60px; max-height: 60px; flex: 0 0 180px;
  margin: 0; padding: 0; border: 0; border-radius: 0;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header :is(.logo-home, .m-brand) { flex-shrink: 0; }
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .account-popover {
  box-sizing: border-box; z-index: 100; width: min(360px, calc(100vw - 32px));
  min-width: 0; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px);
  overflow: auto; overscroll-behavior: contain; text-align: left;
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-account-setting {
  margin: 0; padding: 0 10px; border: 0; color: var(--rm-mobile-text); font-size: calc(14px * var(--rm-message-scale,1));
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-account-setting > summary {
  box-sizing: border-box; display: block; position: relative; min-height: 44px;
  margin: 0; padding: 12px 18px 10px 0; list-style: none; line-height: 1.4;
  color: var(--rm-mobile-text); font: inherit; cursor: pointer;
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-account-setting > summary::-webkit-details-marker { display: none; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-account-setting > summary::after {
  content: '›'; position: absolute; right: 0; top: 10px; font-size: calc(20px * var(--rm-message-scale,1)); line-height: 1;
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-account-setting[open] > summary::after { transform: rotate(90deg); }
html[data-rm-appearance="true"][data-rm-theme] .account-popover #message-alert-summary {
  display: block; margin: 3px 0 0; font-size: calc(12px * var(--rm-message-scale,1)); color: var(--rm-mobile-muted);
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-text-size label {
  display: flex; justify-content: space-between; gap: 12px; color: var(--rm-mobile-muted); font-size: calc(13px * var(--rm-message-scale,1));
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-text-size output { white-space: nowrap; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-text-size input { width: 100%; min-height: 44px; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-alert-content {
  padding: 0; margin: 0 0 10px; border: 0; border-radius: 0; font-size: calc(14px * var(--rm-message-scale,1));
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-alert-content :is(input, button) { box-sizing: border-box; max-width: 100%; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-quiet { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-quiet label { min-width: 0; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-quiet label:last-child { grid-column: 1 / -1; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .m-quiet input { min-width: 0; width: 100%; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover > .rm-account-settings-link {
  display: block; min-height: 44px; margin: 0; padding: 12px 10px; border: 0;
  color: var(--rm-mobile-text); font-size: calc(14px * var(--rm-message-scale,1)); line-height: 1.4; text-decoration: none;
}

/* Uniform Vehicle Operations header and primary navigation on every screen. */
html[data-rm-appearance="true"][data-rm-theme] :is(.operations-shell, .m-shell) {
  width: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header {
  box-sizing: border-box; display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: none; height: 88px; min-height: 88px; margin: 0; padding: 14px 16px;
  gap: 12px; flex-wrap: nowrap; position: relative; z-index: 100;
  border: 0; border-radius: 0; box-shadow: none; background: var(--rm-mobile-surface);
  color: var(--rm-mobile-text); font-family: var(--rm-mobile-font);
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header > .brand {
  box-sizing: border-box; display: flex; align-items: center; flex: 1 1 auto;
  min-width: 0; margin: 0; padding: 0; gap: 10px; flex-wrap: nowrap; text-decoration: none;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .logo-home {
  display: flex; align-items: center; flex: 0 0 auto; margin: 0; padding: 0; border: 0;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .area-name {
  box-sizing: border-box; display: flex; flex-direction: column; flex: 0 0 auto;
  align-items: flex-start; justify-content: center; gap: 0; margin: 0; padding: 0 0 0 10px;
  border: 0; border-left: 1px solid var(--rm-mobile-line); border-radius: 0;
  font: 400 calc(14px * var(--rm-message-scale,1))/calc(20px * var(--rm-message-scale,1)) var(--rm-mobile-font); letter-spacing: 0;
  color: var(--rm-mobile-muted); white-space: nowrap;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .area-name > span {
  display: block; margin: 0; padding: 0; border: 0; font: inherit; letter-spacing: inherit; color: inherit;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .account-tools {
  display: flex; align-items: center; flex: 0 0 auto; flex-wrap: nowrap; gap: 0; margin: 0; padding: 0;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header > .rm-shared-account-menu { margin: 0; }
html[data-rm-appearance="true"][data-rm-theme] .rm-uniform-nav {
  box-sizing: border-box; display: flex; flex-flow: row nowrap; align-items: stretch;
  width: 100%; max-width: none; height: 52px; min-height: 52px; margin: 0; padding: 0 16px;
  gap: 22px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: none; background: var(--rm-mobile-surface); border: 0;
  border-bottom: 1px solid var(--rm-mobile-line); border-radius: 0; box-shadow: none;
  font-family: var(--rm-mobile-font); -webkit-overflow-scrolling: touch;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-uniform-nav::-webkit-scrollbar { display: none; }
html[data-rm-appearance="true"][data-rm-theme] .rm-uniform-nav > a {
  box-sizing: border-box; display: flex; flex: 0 0 auto; align-items: center; justify-content: center;
  height: 51px; min-height: 51px; margin: 0; padding: 0; border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; background: transparent; box-shadow: none; color: var(--rm-mobile-muted);
  font: 400 calc(16px * var(--rm-message-scale,1))/calc(24px * var(--rm-message-scale,1)) var(--rm-mobile-font); letter-spacing: 0; text-decoration: none; white-space: nowrap;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-uniform-nav > a[aria-current="page"] {
  color: var(--rm-mobile-link); border-bottom-color: var(--rm-mobile-link); font-weight: 600;
}
html[data-rm-appearance="true"][data-rm-theme] .rm-uniform-nav > a[hidden] { display: none !important; }
html[data-rm-appearance="true"][data-rm-theme] .rm-uniform-nav > a:focus-visible { outline: 2px solid var(--rm-mobile-link); outline-offset: -3px; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-account-extra > .popover {
  position: static; box-sizing: border-box; width: auto; min-width: 0; max-width: 100%;
  margin: 0; padding: 0 0 8px; border: 0; box-shadow: none; font-size: calc(14px * var(--rm-message-scale,1));
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .rm-account-extra > .popover a {
  min-height: 44px; padding: 10px 0; color: var(--rm-mobile-link); font-size: calc(14px * var(--rm-message-scale,1));
}
html[data-rm-appearance="true"][data-rm-theme] .account-popover .health-menu { display: block; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .health-menu > summary .health-dot { display: inline-block; margin-right: 6px; }
html[data-rm-appearance="true"][data-rm-theme] .account-popover .test-lab .temporary { margin-left: 5px; font-size: calc(11px * var(--rm-message-scale,1)); }
@media (max-width: 360px) {
  html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .rm-mobile-logo {
    width: 150px; min-width: 150px; max-width: 150px; height: 50px; min-height: 50px; max-height: 50px; flex-basis: 150px;
  }
  html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .rm-mobile-logo-day { width: 175px; left: -13.333px; top: -16.667px; }
  html[data-rm-appearance="true"][data-rm-theme] .rm-shared-header .rm-mobile-logo-night { width: 159.167px; left: -8.333px; top: -13.333px; }
}
