  /* === Phase 2 layout fix — keep the classified inside the center column,
     never break out of the lookymart page chrome. The standalone page had
     its own topbar/footer/wide hero; on the embedded view we hide those
     and let the lookymart top header + footer dock handle chrome. === */
  #classifiedView {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    padding: 0 !important;
    box-sizing: border-box;
    /* Tall column — enough vertical room for hundreds of listings without
       feeling cramped. Background fills the empty space when fewer
       listings are present. */
    min-height: 3000px;
    background: var(--bg, #f4f4f4);
    border-radius: 18px;
  }
  /* All children stay inside the parent column — no element bleeds. */
  #classifiedView * {
    max-width: 100%;
    box-sizing: border-box;
  }
  #classifiedView .topbar,
  #classifiedView .category-nav,
  #classifiedView .main,
  #classifiedView .listings-section,
  #classifiedView .hero {
    width: 100%;
    max-width: 100%;
  }
  /* Hide the standalone-page footer; the lookymart footer-dock handles chrome.
     Keep the topbar but slim it down so the Sign In / + Post Ad buttons stay
     reachable inside the embedded view (lookymart's own header is above this). */
  #classifiedView .footer {
    display: none !important;
  }
  #classifiedView .topbar {
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: #fff;
    box-shadow: none;
    position: static;
  }
  #classifiedView .topbar .logo { font-size: 16px; }
  #classifiedView .category-nav,
  #classifiedView .main {
    max-width: 100%;
    box-sizing: border-box;
  }
  #classifiedView .main {
    padding-left: 16px;
    padding-right: 16px;
  }
  #classifiedView .search-card,
  #classifiedView .car-search-card,
  #classifiedView .listings-section {
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Live-search status banner — appears above listings while the
     aggregator is fetching, then updates with the result count. */
  #classifiedView .search-live-banner {
    margin: 12px 16px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(254,44,85,0.08), rgba(99,102,241,0.08));
    border: 1px solid rgba(254,44,85,0.22);
    border-radius: 10px;
    color: #f1f5f9;
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 13px;
    letter-spacing: 0.02em;
    transition: background 200ms;
  }
  #classifiedView .search-live-banner--done {
    background: linear-gradient(90deg, rgba(126,217,87,0.10), rgba(99,102,241,0.06));
    border-color: rgba(126,217,87,0.30);
    color: #a3d977;
  }
  #classifiedView .search-live-banner--err {
    background: rgba(254,44,85,0.10);
    border-color: rgba(254,44,85,0.30);
    color: #fda4af;
  }

  /* Source badge on aggregated listings — small chip in top-right of img */
  #classifiedView .listing-source-tag {
    position: absolute;
    top: 8px; right: 8px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 2;
  }
  #classifiedView .listing-img { position: relative; }
  #classifiedView .listing-img img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
  }
  #classifiedView .listing--external::after {
    content: '↗';
    position: absolute;
    top: 8px; left: 8px;
    width: 22px; height: 22px;
    background: rgba(99, 102, 241, 0.85);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
  }
  #classifiedView .listing { position: relative; }
  #classifiedView .hero-title,
  #classifiedView .car-search-title {
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    line-height: 1.15;
  }
  #classifiedView .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  #classifiedView {
    --header-cream: #fcebbf;
    --header-cream-soft: #fef4d8;
    --bg: #f4f4f4;
    --card: #ffffff;
    --ink: #1a1a1a;
    --ink-soft: #555;
    --ink-muted: #888;
    --accent-red: #e63946;
    --accent-blue: #1a4dff;
    --accent-blue-dark: #0f3acc;
    --border: #e5e5e5;
    --border-soft: #f0f0f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-lg: 20px;
  }

  #classifiedView * { box-sizing: border-box; margin: 0; padding: 0; }

  #classifiedView {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  
  #classifiedView .topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  #classifiedView .logo {
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }
  #classifiedView .logo .eye {
    width: 28px; height: 28px;
    background: var(--accent-blue);
    border-radius: 50%;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #classifiedView .logo .eye::after {
    content: '';
    width: 10px; height: 10px;
    background: #fff;
    border-radius: 50%;
  }
  #classifiedView .logo .red { color: var(--accent-red); }
  #classifiedView .topbar-actions { display: flex; gap: 10px; align-items: center; }
  #classifiedView .btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 999px;
    transition: all 0.15s ease;
  }
  #classifiedView .btn-ghost { background: transparent; color: var(--ink); }
  #classifiedView .btn-ghost:hover { background: var(--border-soft); }
  #classifiedView .btn-primary {
    background: var(--accent-blue);
    color: #fff;
  }
  #classifiedView .btn-primary:hover { background: var(--accent-blue-dark); }
  #classifiedView .btn-post {
    background: var(--accent-red);
    color: #fff;
  }
  #classifiedView .btn-post:hover { background: #c92e3b; }

  
  #classifiedView .category-nav {
    background: #fff;
    padding: 16px 16px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 80;
  }
  #classifiedView .category-nav-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    gap: 4px;
    min-width: 1100px;
    max-width: 1500px;
    margin: 0 auto;
  }
  #classifiedView .cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 10px;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.18s cubic-bezier(.34,1.56,.64,1);
    flex: 1;
    min-width: 80px;
    position: relative;
  }
  #classifiedView .cat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: var(--cat-color, var(--accent-blue));
    transition: width 0.2s ease;
  }
  #classifiedView .cat-item:hover { transform: translateY(-3px); }
  #classifiedView .cat-item:hover .cat-icon { box-shadow: 0 8px 20px var(--cat-shadow, rgba(0,0,0,.15)); }
  #classifiedView .cat-item.active::after { width: 28px; }
  #classifiedView .cat-item.active .cat-label { color: var(--cat-color, var(--accent-red)); font-weight: 800; }
  #classifiedView .cat-icon {
    width: 46px; height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--cat-color, var(--accent-blue));
    border-radius: 13px;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    box-shadow: 0 2px 6px var(--cat-shadow, rgba(0,0,0,.08));
  }
  #classifiedView .cat-icon svg { width: 22px; height: 22px; }
  #classifiedView .cat-label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: var(--ink-soft);
    letter-spacing: -0.01em;
  }

  
  #classifiedView .main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 24px 60px;
  }

  
  #classifiedView .hero {
    max-width: 900px;
    margin: 0 auto 32px;
  }

  #classifiedView .search-card {
    background: var(--card);
    background-image:
      radial-gradient(circle at 10% 20%, rgba(26, 77, 255, 0.03) 0%, transparent 30%),
      radial-gradient(circle at 90% 80%, rgba(230, 57, 70, 0.03) 0%, transparent 30%);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
  }
  #classifiedView .hero-title {
    font-size: 44px;
    font-weight: 900;
    letter-spacing: -0.025em;
    margin-bottom: 32px;
    line-height: 1.1;
  }
  #classifiedView .hero-title .red { color: var(--accent-red); }
  @media (max-width: 700px) {
    #classifiedView .hero-title { font-size: 28px; }
    #classifiedView .search-card { padding: 32px 20px; }
  }

  #classifiedView .search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 640px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px;
    box-shadow: var(--shadow-sm);
  }
  #classifiedView .search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 18px;
  }
  #classifiedView .search-input-wrap svg { width: 16px; height: 16px; color: var(--ink-muted); flex-shrink: 0;}
  #classifiedView .search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    padding: 12px 0;
    background: transparent;
    color: var(--ink);
  }
  #classifiedView .search-input::placeholder { color: var(--ink-muted); }
  #classifiedView .search-btn {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 800;
    letter-spacing: 0.05em;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
  }
  #classifiedView .search-btn:hover { background: var(--accent-blue-dark); }

  #classifiedView .filter-row {
    display: flex;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
  #classifiedView .filter-pill {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    color: var(--ink);
    transition: all 0.15s ease;
  }
  #classifiedView .filter-pill:hover { border-color: var(--ink-muted); }
  #classifiedView .filter-pill svg { width: 14px; height: 14px; color: var(--ink-soft); }

  #classifiedView .suggested {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 13px;
  }
  #classifiedView .suggested-label { color: var(--ink-soft); font-weight: 600; }
  #classifiedView .sug-tag {
    background: var(--border-soft);
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    color: var(--ink);
    border: none;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.15s ease;
  }
  #classifiedView .sug-tag:hover { background: #e2e2e2; }

  
  #classifiedView .listings-section {
    margin-top: 16px;
  }
  #classifiedView .listings-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
  }
  #classifiedView .listings-header h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  #classifiedView .listings-count {
    color: var(--ink-muted);
    font-size: 14px;
  }

  #classifiedView .listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
  }

  #classifiedView .listing {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-soft);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
  }
  #classifiedView .listing:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
  }
  #classifiedView .listing-img {
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
  }
  #classifiedView .listing-img.grad-1 { background: linear-gradient(135deg,#fa709a,#fee140); }
  #classifiedView .listing-img.grad-2 { background: linear-gradient(135deg,#30cfd0,#330867); }
  #classifiedView .listing-img.grad-3 { background: linear-gradient(135deg,#a8edea,#fed6e3); }
  #classifiedView .listing-img.grad-4 { background: linear-gradient(135deg,#ff9a9e,#fad0c4); }
  #classifiedView .listing-img.grad-5 { background: linear-gradient(135deg,#84fab0,#8fd3f4); }
  #classifiedView .listing-img.grad-6 { background: linear-gradient(135deg,#fccb90,#d57eeb); }
  #classifiedView .listing-img.grad-7 { background: linear-gradient(135deg,#667eea,#764ba2); }
  #classifiedView .listing-img.grad-8 { background: linear-gradient(135deg,#f093fb,#f5576c); }
  #classifiedView .listing-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  #classifiedView .listing-fav {
    position: absolute;
    top: 10px; right: 10px;
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    font-size: 16px;
    transition: transform 0.15s ease;
  }
  #classifiedView .listing-fav:hover { transform: scale(1.1); }
  #classifiedView .listing-fav.faved { color: var(--accent-red); }
  #classifiedView .listing-body { padding: 14px; flex: 1; display: flex; flex-direction: column;}
  #classifiedView .listing-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
  }
  #classifiedView .listing-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
  }
  #classifiedView .listing-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ink-muted);
  }

  #classifiedView .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-muted);
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
  }
  #classifiedView .empty-state h3 { color: var(--ink); margin-bottom: 8px; font-size: 18px;}

  
  #classifiedView .car-search-card {
    background: var(--card);
    background-image:
      radial-gradient(circle at 10% 20%, rgba(26, 77, 255, 0.04) 0%, transparent 30%),
      radial-gradient(circle at 90% 80%, rgba(230, 57, 70, 0.04) 0%, transparent 30%);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
    position: relative;
  }
  #classifiedView .car-search-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  #classifiedView .car-search-title svg { width: 38px; height: 38px; flex-shrink: 0; }
  #classifiedView .car-search-title .red { color: var(--accent-red); }
  #classifiedView .car-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  @media (max-width: 700px) {
    #classifiedView .car-form-grid { grid-template-columns: 1fr 1fr; }
    #classifiedView .car-search-title { font-size: 26px; }
    #classifiedView .car-search-card { padding: 24px 18px; }
  }
  @media (max-width: 420px) {
    #classifiedView .car-form-grid { grid-template-columns: 1fr; }
  }
  #classifiedView .car-form-grid select {
    width: 100%;
    padding: 12px 38px 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23555' d='M5 6L0 0h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
    appearance: none;
    -webkit-appearance: none;
    color: var(--ink);
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease;
  }
  #classifiedView .car-form-grid select:focus { outline: none; border-color: var(--accent-blue); }
  #classifiedView .car-checkboxes {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: var(--border-soft);
    border-radius: 12px;
  }
  #classifiedView .car-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    color: var(--ink);
  }
  #classifiedView .car-check input {
    width: 16px; height: 16px;
    cursor: pointer;
    accent-color: var(--accent-blue);
  }
  #classifiedView .car-keyword-row {
    margin-bottom: 14px;
  }
  #classifiedView .car-keyword-input {
    width: 100%;
    padding: 13px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--ink);
  }
  #classifiedView .car-keyword-input:focus { outline: none; border-color: var(--accent-blue); }
  #classifiedView .car-action-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }
  #classifiedView .car-search-btn {
    flex: 1;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 28px;
    font-weight: 800;
    letter-spacing: 0.05em;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
  }
  #classifiedView .car-search-btn:hover { background: var(--accent-blue-dark); }
  #classifiedView .car-back-btn {
    background: var(--border-soft);
    color: var(--ink);
    border: none;
    border-radius: 999px;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
  }
  #classifiedView .car-back-btn:hover { background: #e2e2e2; }
  #classifiedView .car-quick-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
    justify-content: center;
  }
  #classifiedView .car-quick-link {
    color: var(--accent-red);
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
  }
  #classifiedView .car-quick-link:hover { color: #c92e3b; }

  
  #classifiedView .listing-specs {
    font-size: 11px;
    color: var(--ink-soft);
    margin-bottom: 6px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
  }
  #classifiedView .listing-specs span {
    background: var(--border-soft);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
  }

  
  #classifiedView .footer-tagline {
    text-align: center;
    padding: 30px 20px;
    color: var(--ink-soft);
    font-size: 14px;
  }
  #classifiedView .footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 30px 24px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 13px;
  }
  #classifiedView .footer a { color: var(--accent-blue); text-decoration: none; margin: 0 6px; }

  
  #classifiedView .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    backdrop-filter: blur(4px);
  }
  #classifiedView .modal-overlay.open { display: flex; }
  #classifiedView .modal {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
  }
  @keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  #classifiedView .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  #classifiedView .modal-header h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em;}
  #classifiedView .modal-close {
    background: var(--border-soft);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
  }
  #classifiedView .modal-close:hover { background: #e2e2e2; }
  #classifiedView .modal-body { padding: 24px; }
  #classifiedView .modal-img {
    aspect-ratio: 16/9;
    border-radius: 12px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
  }
  #classifiedView .modal-price {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
  }
  #classifiedView .modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
  }
  #classifiedView .modal-desc {
    color: var(--ink-soft);
    line-height: 1.6;
    margin-bottom: 20px;
  }
  #classifiedView .modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    background: var(--border-soft);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
  }
  #classifiedView .modal-meta-grid div { font-size: 14px; }
  #classifiedView .modal-meta-grid strong { display: block; color: var(--ink); font-weight: 700; margin-bottom: 2px; font-size: 13px;}
  #classifiedView .modal-meta-grid span { color: var(--ink-soft); font-size: 13px;}
  #classifiedView .modal-actions { display: flex; gap: 10px; }
  #classifiedView .modal-actions button { flex: 1; }

  #classifiedView .form-group {
    margin-bottom: 16px;
  }
  #classifiedView .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--ink);
  }
  #classifiedView .form-group input, #classifiedView .form-group select, #classifiedView .form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--ink);
    transition: border-color 0.15s ease;
  }
  #classifiedView .form-group input:focus, #classifiedView .form-group select:focus, #classifiedView .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
  }
  #classifiedView .form-group textarea { resize: vertical; min-height: 90px; }
  #classifiedView .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

  
  #classifiedView .dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-width: 240px;
    max-height: 340px;
    overflow-y: auto;
    display: none;
    z-index: 90;
  }
  #classifiedView .dropdown-search-wrap {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--border-soft);
    z-index: 1;
  }
  #classifiedView .dropdown-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
  }
  #classifiedView .dropdown-search:focus { border-color: var(--accent-blue); }
  #classifiedView .dropdown-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-muted);
  }
  #classifiedView .dropdown-menu.open { display: block; }
  #classifiedView .dropdown-item {
    padding: 11px 16px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-soft);
  }
  #classifiedView .dropdown-item:last-child { border-bottom: none; }
  #classifiedView .dropdown-item:hover { background: var(--border-soft); }
  #classifiedView .dropdown-wrap { position: relative; }

  
  @media (max-width: 700px) {
    #classifiedView .topbar { padding: 10px 14px; }
    #classifiedView .logo { font-size: 18px; }
    #classifiedView .main { padding: 16px 14px 40px; }
    #classifiedView .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 12px;}
    #classifiedView .listing-price { font-size: 16px;}
    #classifiedView .listing-title { font-size: 13px;}
  }


  /* === Embedded-view sizing — the parent .container grid + overflow-x:clip
     on .container > .view now enforces the column boundary, so we only
     need to RELAX the standalone page's hard 1400/900px max-widths and
     tighten oversize hero text. No !important needed; cascade does the rest. === */
  #classifiedView .main {
    max-width: none;
    margin: 0;
    padding: 16px 16px 40px;
  }
  #classifiedView .hero {
    max-width: 100%;
    margin: 0 0 20px;
  }
  #classifiedView .search-card,
  #classifiedView .car-search-card {
    padding: 24px 20px;
    max-width: 100%;
  }
  #classifiedView .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  #classifiedView .hero-title {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    line-height: 1.15;
    margin: 0 0 18px;
  }

  /* ════════════════════════════════════════════════════════════════════
   * CLASSIFIED MAN'S USED-CAR INSPECTOR
   * Topbar button + search-area CTA + modal with form/loading/report.
   * ════════════════════════════════════════════════════════════════════ */
  #classifiedView .btn-inspect {
    background: linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%);
    color: #fff;
    border: 0;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(20, 184, 166, 0.25);
    transition: filter 120ms, transform 120ms, box-shadow 120ms;
  }
  #classifiedView .btn-inspect:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.45);
  }

  /* Hero CTA — full-width pill underneath the suggested chips */
  #classifiedView .inspect-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    border: 1px solid rgba(20, 184, 166, 0.35);
    background:
      linear-gradient(135deg, rgba(20, 184, 166, 0.10) 0%, rgba(14, 165, 233, 0.08) 100%),
      var(--surface, #0f172a);
    color: inherit;
    font: inherit;
    transition: border-color 160ms, transform 160ms, box-shadow 160ms;
  }
  #classifiedView .inspect-cta:hover {
    border-color: rgba(20, 184, 166, 0.65);
    transform: translateY(-1px);
    box-shadow: 0 4px 22px rgba(20, 184, 166, 0.18);
  }
  #classifiedView .inspect-cta-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.5));
  }
  #classifiedView .inspect-cta-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
  }
  #classifiedView .inspect-cta-text strong {
    font-size: 15px;
    font-weight: 700;
    color: #5eead4;
  }
  #classifiedView .inspect-cta-text span {
    font-size: 13px;
    opacity: 0.85;
  }
  #classifiedView .inspect-cta-arrow {
    font-size: 20px;
    color: #5eead4;
    font-weight: 700;
  }

  /* Modal — wider than post-ad to fit the report comfortably */
  #inspectModal .modal-inspect {
    max-width: 720px;
    width: 92%;
    max-height: 92vh;
    overflow-y: auto;
  }
  #inspectModal .inspect-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }
  #inspectModal .inspect-header-text { flex: 1; }
  #inspectModal .inspect-header-text h3 {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 800;
  }
  #inspectModal .inspect-header-tag {
    font-size: 12px;
    font-style: italic;
    opacity: 0.75;
  }

  /* Form view */
  #inspectModal .form-hint-inline {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.6;
    margin-left: 4px;
    letter-spacing: 0;
    text-transform: none;
  }
  #inspectModal .form-hint {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.65;
    line-height: 1.4;
  }
  #inspectModal #inspectVin {
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  #inspectModal .inspect-error {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(254, 44, 85, 0.12);
    border: 1px solid rgba(254, 44, 85, 0.4);
    color: #fecaca;
    font-size: 13px;
  }
  #inspectModal .inspect-footnote {
    margin-top: 12px;
    font-size: 11.5px;
    text-align: center;
    opacity: 0.55;
    line-height: 1.5;
  }

  /* Loading view */
  #inspectModal .inspect-loading {
    padding: 36px 12px;
    text-align: center;
  }
  #inspectModal .inspect-spinner {
    width: 44px; height: 44px;
    margin: 0 auto 18px;
    border: 3px solid rgba(20, 184, 166, 0.2);
    border-top-color: #14b8a6;
    border-radius: 50%;
    animation: inspectSpin 800ms linear infinite;
  }
  @keyframes inspectSpin { to { transform: rotate(360deg); } }
  #inspectModal .inspect-loading-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #5eead4;
  }
  #inspectModal .inspect-loading-steps {
    font-size: 12.5px;
    opacity: 0.7;
    line-height: 1.9;
  }

  /* Report — vehicle ID strip */
  #inspectModal .inspect-vehicle-id {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 1px solid rgba(20, 184, 166, 0.3);
  }
  #inspectModal .inspect-vehicle-label {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
  }
  #inspectModal .inspect-vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  #inspectModal .inspect-meta-chip {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.02em;
  }
  #inspectModal .inspect-meta-vin {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.05em;
  }

  /* Report — generic section */
  #inspectModal .inspect-section {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  #inspectModal .inspect-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #cbd5e1;
  }
  #inspectModal .inspect-section-title.inspect-warn { color: #fca5a5; }
  #inspectModal .inspect-section-title.inspect-good { color: #86efac; }

  /* Recalls */
  #inspectModal .inspect-recalls {
    background: rgba(254, 44, 85, 0.06);
    border-color: rgba(254, 44, 85, 0.35);
  }
  #inspectModal .inspect-recall-list {
    display: flex; flex-direction: column; gap: 10px;
  }
  #inspectModal .inspect-recall-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid #fe2c55;
  }
  #inspectModal .inspect-recall-component {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fecaca;
  }
  #inspectModal .inspect-recall-summary { font-size: 12.5px; line-height: 1.5; opacity: 0.92; }
  #inspectModal .inspect-recall-remedy  { font-size: 12px; margin-top: 6px; opacity: 0.85; }
  #inspectModal .inspect-recall-campaign{ font-size: 11px; margin-top: 6px; opacity: 0.55; font-family: 'JetBrains Mono', monospace; }
  #inspectModal .inspect-recall-note    { margin-top: 10px; font-size: 12px; opacity: 0.78; }
  #inspectModal .inspect-no-recalls {
    background: rgba(34, 197, 94, 0.07);
    border-color: rgba(34, 197, 94, 0.3);
    font-size: 13px;
    font-weight: 600;
    color: #86efac;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.3);
  }

  /* Price gauge */
  #inspectModal .inspect-price-gauge {
    position: relative;
    height: 50px;
    margin: 8px 0 6px;
  }
  #inspectModal .inspect-gauge-track {
    position: absolute; left: 0; right: 0; top: 22px; height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 50%, #ef4444 100%);
    opacity: 0.65;
  }
  #inspectModal .inspect-gauge-marker {
    position: absolute; top: 16px;
    width: 18px; height: 18px;
    border-radius: 50%;
    transform: translateX(-50%);
    border: 3px solid #0f172a;
    box-shadow: 0 0 0 1px currentColor, 0 0 12px rgba(255, 255, 255, 0.4);
  }
  #inspectModal .inspect-gauge-bubble {
    position: absolute; top: -6px;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  #inspectModal .inspect-gauge-scale {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    opacity: 0.75;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 6px;
  }
  #inspectModal .inspect-gauge-median {
    color: #93c5fd;
    font-weight: 700;
    opacity: 0.95;
  }
  #inspectModal .inspect-position-line {
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.92;
  }

  /* Lists */
  #inspectModal .inspect-list {
    margin: 0; padding-left: 22px;
    display: flex; flex-direction: column; gap: 6px;
    font-size: 13px; line-height: 1.5;
  }
  #inspectModal .inspect-list li::marker { color: #64748b; }
  #inspectModal .inspect-list-pos li::marker  { color: #34d399; }
  #inspectModal .inspect-list-warn li::marker { color: #fb7185; }

  #inspectModal .inspect-scam-flags {
    background: rgba(254, 44, 85, 0.07);
    border-color: rgba(254, 44, 85, 0.3);
  }

  /* Verdict — Classified Man's punchline */
  #inspectModal .inspect-verdict {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18) 0%, rgba(99, 102, 241, 0.12) 100%);
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.15);
  }
  #inspectModal .inspect-verdict-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #c4b5fd;
    margin-bottom: 8px;
  }
  #inspectModal .inspect-verdict-text {
    font-size: 14.5px;
    line-height: 1.65;
    font-style: italic;
    white-space: pre-wrap;
  }
  #inspectModal .inspect-verdict-fallback { opacity: 0.85; }

  #inspectModal .inspect-actions {
    margin-top: 16px;
    justify-content: space-between;
  }

  /* Mobile */
  @media (max-width: 640px) {
    #inspectModal .modal-inspect { width: 96%; }
    #inspectModal .inspect-vehicle-label { font-size: 16px; }
    #inspectModal .inspect-gauge-bubble { font-size: 11px; padding: 3px 8px; }
    #classifiedView .inspect-cta-icon { font-size: 22px; }
    #classifiedView .inspect-cta-text strong { font-size: 14px; }
    #classifiedView .inspect-cta-text span { font-size: 12px; }
  }
