/*
 * Single-item pages — classified ad, business, service provider and job.
 * One layout for all four: photo hero with a back button, soft contact
 * pills, a floating identity card, a rating strip, then a summary card with
 * feature tiles and check chips. Phones get the stacked mobile-app order;
 * from 1000px the identity/contact column becomes a sticky sidebar.
 */
:root {
  --dx-ink: #13302b;
  --dx-muted: #62776f;
  --dx-line: #e6ebe8;
  --dx-soft: #f4f6f5;
  --dx-strip: #eef1f4;
  --dx-green: #0f7a57;        /* back button, verified, check marks */
  --dx-green-soft: #e3f4ec;
  --dx-accent: #c94f06;       /* price text + primary CTA (4.5:1 on white) */
  --dx-accent-hover: #ad4204;
  --dx-accent-icon: #f26b1d;  /* icons only — always paired with a text label */
  --dx-accent-soft: #fff1e6;
  --dx-star: #f2a91d;
  --dx-radius: 22px;
  --dx-float: 0 14px 40px rgba(16, 40, 34, .11);
  --dx-lift: 0 3px 12px rgba(16, 40, 34, .08);
}

.dx { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "side" "main"; gap: 18px; margin-bottom: 36px; color: var(--dx-ink); }
.dx > .dx-hero, .dx-gallery { grid-area: hero; }
.dx-gallery { display: grid; gap: 10px; min-width: 0; }
.dx-side { grid-area: side; display: grid; gap: 14px; min-width: 0; align-content: start; }
.dx-main { grid-area: main; display: grid; gap: 18px; min-width: 0; align-content: start; }

/* ── Hero ── */
.dx-hero { position: relative; min-width: 0; overflow: hidden; border-radius: var(--dx-radius); background: #e9eeeb; }
.dx-hero-img { display: block; width: 100%; height: 440px; object-fit: cover; }
.dx-back { position: absolute; z-index: 3; top: 16px; left: 16px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--dx-green); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.dx-back:hover { background: #0b6647; }
.dx-back .ui-icon { width: 22px; height: 22px; stroke-width: 2.25; }
.dx-hero--art { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; min-height: 300px; padding: 84px 32px 30px; color: #fff; background: radial-gradient(ellipse at 85% 115%, #3b8a70 0, transparent 60%), linear-gradient(135deg, #0f5a45, #174f48); }
.dx-hero--warm { background: radial-gradient(ellipse at 85% 115%, #c18a4a 0, transparent 60%), linear-gradient(135deg, #6e5230, #4f3b22); }
.dx-hero--job { background: radial-gradient(ellipse at 90% 120%, #f08a3c 0, transparent 55%), linear-gradient(135deg, #174f48, #0f3b35); }
.dx-art-mark { position: absolute; right: 5%; top: -30px; color: rgba(255, 255, 255, .08); transform: rotate(-12deg); pointer-events: none; }
.dx-art-mark .ui-icon { width: 300px; height: 300px; }
.dx-art-label { position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 12px; border-radius: 8px; background: rgba(0, 0, 0, .22); font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.dx-art-label .ui-icon { width: 16px; height: 16px; }
.dx-art-title { position: relative; max-width: 30ch; margin: 0; font-size: clamp(22px, 3vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.dx-art-logo { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 18px; background: #fff; color: #1d5a47; font-size: 26px; font-weight: 800; overflow: hidden; }
.dx-art-logo img { width: 100%; height: 100%; object-fit: cover; }

/* Classified gallery inside the hero keeps its own controls. */
.dx-hero .listing-gallery { border-radius: 0; min-height: 0; background: #e9eeeb; }
.dx-hero .listing-gallery-stage img { height: 440px; min-height: 0; object-fit: cover; }
.dx-hero .listing-letter { min-height: 320px; }
.dx-thumbs .listing-thumbs { padding: 2px; gap: 9px; }
.dx-thumbs .listing-thumb { width: 68px; height: 54px; border: 2px solid transparent; border-radius: 10px; }
.dx-thumbs .listing-thumb.is-on { border-color: var(--dx-green); }

/* ── Contact pills (Call · WhatsApp · Chat) ── */
.dx-pills { display: flex; gap: 10px; }
.dx-pill { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 10px; border: 0; border-radius: 14px; background: var(--dx-accent-soft); color: var(--dx-ink); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgba(201, 79, 6, .08); cursor: pointer; }
.dx-pill:hover { background: #ffe3cc; }
.dx-pill .ui-icon { flex: none; width: 21px; height: 21px; color: var(--dx-accent-icon); }
.dx-pill.is-revealed { letter-spacing: .02em; }
.dx-pill span { overflow: hidden; text-overflow: ellipsis; }

/* ── Identity card ── */
.dx-who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 16px 16px 18px; background: #fff; border: 1px solid #edf0ee; border-radius: 20px; box-shadow: var(--dx-float); }
.dx-avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #f7e3d4; color: #8a4318; font-size: 22px; font-weight: 800; }
.dx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dx-avatar--square { border-radius: 16px; background: #e3f0ea; color: #1d5a47; }
.dx-who-text { min-width: 0; }
.dx-who-name { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--dx-ink); overflow-wrap: anywhere; }
h1.dx-who-name { font-size: clamp(20px, 2.2vw, 24px); letter-spacing: -.02em; }
.dx-who-name a { color: inherit; }
.dx-who-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.dx-tick { flex: none; display: inline-grid; color: #17a86b; }
.dx-tick .ui-icon { width: 21px; height: 21px; }
.dx-who-meta { display: flex; align-items: center; gap: 6px; margin: 5px 0 0; font-size: 14px; color: var(--dx-muted); overflow-wrap: anywhere; }
.dx-who-meta .ui-icon { flex: none; width: 17px; height: 17px; color: #17a86b; }
.dx-who-tools { display: flex; gap: 2px; align-self: start; }
.dx-icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--dx-ink); cursor: pointer; }
.dx-icon-btn:hover { background: var(--dx-soft); }
.dx-icon-btn .ui-icon { width: 22px; height: 22px; }
.dx-icon-btn:is([aria-pressed="true"], .is-on, .is-saved) { color: #e5383b; }
.dx-icon-btn:is([aria-pressed="true"], .is-on, .is-saved) .ui-icon { fill: currentColor; }
.dx-icon-btn.is-copied::after { content: "Link copied"; position: absolute; top: calc(100% + 6px); right: 0; padding: 5px 9px; border-radius: 7px; background: var(--dx-ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dx-who-note { grid-column: 1 / -1; margin: 0; padding-top: 12px; border-top: 1px solid var(--dx-line); font-size: 13px; color: var(--dx-muted); }
.dx-who-note a { color: var(--dx-green); font-weight: 700; }

/* ── Rating strip ── */
.dx-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-radius: 16px; background: var(--dx-strip); color: var(--dx-ink); font-size: 15px; font-weight: 600; }
a.dx-strip:hover { background: #e4e8ed; }
.dx-strip > span:last-child { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--dx-muted); text-align: right; }
.dx-strip .ui-icon { width: 17px; height: 17px; }
.dx-stars { display: inline-flex; gap: 3px; color: #b3bbc4; }
.dx-stars .ui-icon { width: 19px; height: 19px; }
.dx-stars .is-on { color: var(--dx-star); }

/* ── Primary action + side extras ── */
.dx-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--dx-accent); color: #fff; font: inherit; font-size: 16px; font-weight: 700; text-align: center; cursor: pointer; }
.dx-cta:hover { background: var(--dx-accent-hover); color: #fff; }
.dx-cta .ui-icon { width: 20px; height: 20px; }
.dx-cta--quiet { background: var(--dx-ink); }
.dx-cta--quiet:hover { background: #0a1f1b; }
.dx-note { margin: 0; font-size: 13px; line-height: 1.6; color: var(--dx-muted); overflow-wrap: anywhere; }
.dx-note .ui-icon { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.dx-panel { display: grid; gap: 14px; padding: 20px; background: #fff; border: 1px solid var(--dx-line); border-radius: 20px; }
.dx-panel h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.dx-report { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 18px; border: 1px dashed #efcfb7; border-radius: 16px; background: #fffaf6; }
.dx-report p { margin: 0; font-size: 14px; font-weight: 600; color: var(--dx-accent); }
.dx-report small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--dx-muted); }
.dx-report button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 10px; background: #fff; color: var(--dx-ink); font: inherit; font-size: 13px; font-weight: 700; box-shadow: var(--dx-lift); cursor: pointer; }
.dx-report button .ui-icon { width: 15px; height: 15px; color: var(--dx-accent-icon); }

/* ── Cards in the main column ── */
.dx-card, .dx-main > .dir-section, .dx-main > .detail-panel, .dx-main > .review-section, .dx-main > .job-block, .dx-main > section:not([class]) { margin: 0; padding: 24px; background: #fff; border: 1px solid var(--dx-line); border-radius: var(--dx-radius); box-shadow: 0 2px 10px rgba(16, 40, 34, .03); min-width: 0; }
.dx-main > :empty { display: none; }
.dx-main :is(h2, .category-section-head h2) { margin: 0 0 16px; font-size: 20px; letter-spacing: -.02em; color: var(--dx-ink); }
.dx-main .category-section-head { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.dx-main .category-section-head h2 { margin: 0; }
.dx-eyebrow { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dx-muted); }
.dx-eyebrow .ui-icon { width: 16px; height: 16px; }
.dx-title { margin: 0 0 12px; font-size: clamp(22px, 2.8vw, 30px); line-height: 1.2; letter-spacing: -.025em; color: var(--dx-ink); overflow-wrap: anywhere; }
.dx-lede { margin: -4px 0 14px; font-size: 16px; line-height: 1.55; color: #3f5a53; }
.dx-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.dx-price { margin: 0 8px 0 0; font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; color: var(--dx-accent); overflow-wrap: anywhere; }
.dx-price small { font-size: .6em; font-weight: 700; }
.dx-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #edf0ee; border-radius: 10px; background: #fff; font-size: 13px; font-weight: 600; color: var(--dx-ink); box-shadow: var(--dx-lift); }
.dx-tag .ui-icon { width: 15px; height: 15px; }
.dx-tag--hot { border-color: #ffdcc2; background: var(--dx-accent-soft); color: #9a3d05; }
.dx-tag--ok { border-color: #c9ead9; background: var(--dx-green-soft); color: #0c6446; }
.dx-tag--ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #17a86b; }
.dx-sub { margin: 24px 0 12px !important; font-size: 16px !important; font-weight: 700; letter-spacing: 0 !important; }
.dx-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--dx-line); font-size: 13px; color: var(--dx-muted); }
.dx-meta > * { display: inline-flex; align-items: center; gap: 6px; }
.dx-meta .ui-icon { width: 15px; height: 15px; }

/* Feature tiles: one bordered strip, cells split by hairlines, last row stretches. */
.dx-features { display: flex; flex-wrap: wrap; margin: 0; border: 1px solid var(--dx-line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--dx-lift); }
.dx-features > div { flex: 1 1 110px; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 14px 8px 13px; text-align: center; box-shadow: 1px 0 0 var(--dx-line), 0 1px 0 var(--dx-line); }
.dx-features .ui-icon { width: 26px; height: 26px; margin-bottom: 4px; color: var(--dx-accent-icon); stroke-width: 1.5; }
.dx-features dt { font-size: 12px; color: var(--dx-muted); }
.dx-features dd { margin: 0; max-width: 100%; font-size: 15px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }

.dx-checks { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dx-checks li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 14px 9px 11px; border: 1px solid #edf0ee; border-radius: 12px; background: #fff; font-size: 15px; font-weight: 500; box-shadow: var(--dx-lift); overflow-wrap: anywhere; }
.dx-checks .ui-icon { flex: none; width: 18px; height: 18px; color: #17a86b; stroke-width: 2.75; }

.dx-prose { font-size: 15px; line-height: 1.8; color: #3f5a53; overflow-wrap: anywhere; }
.dx-prose p { margin: 0 0 12px; }
.dx-prose p:last-child { margin-bottom: 0; }

/* Directory sections reused inside the main column. */
.dx-main > [data-business-jobs] > .dir-section { margin: 0; padding: 24px; background: #fff; border: 1px solid var(--dx-line); border-radius: var(--dx-radius); }
.dx-main .dir-services li { padding: 18px 0; }
.dx-main .dir-services li:first-child { padding-top: 4px; }
.dx-main .dir-service-price { color: var(--dx-accent); }
.dx-main .dir-gallery img { border-radius: 12px; }
.dx-main .dir-claim { margin: 0; padding: 22px 24px; border-radius: var(--dx-radius); background: #f4f0e5; border-color: #e8dfc7; }
.dx-main .dir-claim-panel { min-width: 0; }
.dx-main .dir-claim-field :is(input, select) { width: 100%; min-width: 0; }
.dx-card .dir-indicators, .dx-card .dir-badges { margin: 18px 0 0; }
.dx-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 32px; }
.dx-contact-card .dir-contact { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0; }
.dx-contact-card .dir-contact dt { margin-top: 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dx-muted); }
.dx-contact-card .dir-contact dt:first-child { margin-top: 0; }
.dx-contact-card .dir-contact dd { margin: 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.dx-contact-card .dir-contact a { color: var(--dx-green); font-weight: 600; }
.dx-contact-card .dir-hours :is(th, td) { padding: 7px 0; border-bottom: 1px solid #edf1ef; }
.dx-contact-card > .dx-note, .dx-contact-card > .dir-socials { margin-top: 18px; }
.dx-sub--flush { margin-top: 0 !important; }
.dx-note--gap { margin-top: 14px; }

/* Classified ad */
.dx--ad .detail-description { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.8; color: #3f5a53; }
.dx--ad .listing-seller-row > div { min-width: 0; overflow-wrap: anywhere; }
.dx--ad .detail-map iframe { display: block; width: 100%; height: 280px; margin: 0 0 12px; border: 1px solid var(--dx-line); border-radius: 14px; }
.dx--ad .detail-map > p { margin: -6px 0 14px; color: var(--dx-muted); }
.dx--ad .detail-map > a { font-size: 13px; font-weight: 700; color: var(--dx-green); }
.dx--ad .detail-map > small { display: block; margin-top: 8px; font-size: 12px; color: var(--dx-muted); }
.dx--ad .dx-who-name a:hover { text-decoration: underline; }
.has-listing .listing-more { margin-top: 8px; }
.detail-contactbar .btn-forest { background: var(--dx-accent); }
.detail-contactbar .btn-forest:hover { background: var(--dx-accent-hover); }

/* Jobs */
.dx-apply { display: grid; gap: 10px; }
.dx-apply .job-applied { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; color: var(--dx-green); }
.dx-apply .job-applied .ui-icon { width: 18px; height: 18px; }
.dx-main .job-list-card ul { margin: 0; padding-left: 20px; }
.dx-main .job-list-card li { margin-bottom: 8px; padding-left: 4px; font-size: 15px; line-height: 1.75; color: #3f5a53; }
.dx-main .job-list-card li::marker { color: var(--dx-accent-icon); }
.dx-main .job-employer a { color: var(--dx-green); font-weight: 700; }
.dx-safety { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 14px 18px; border-radius: 16px; background: #f5f2e6; color: #655f42; }
.dx-safety .ui-icon { margin-right: 6px; color: #8a7a3c; }

.dx-crumbs .category-crumbs, .dx-crumbs.listing-crumb { padding-top: 18px; }
.dx :is(a, button):focus-visible { outline: 3px solid #13836d; outline-offset: 3px; }
.dx [id] { scroll-margin-top: 150px; }

/* ── Report / problem dialogs (benchmarked on the "Any problem?" screen) ── */
.dx-dialog-title { margin: 6px 0 10px !important; text-align: center; font-size: 24px !important; font-weight: 600; line-height: 1.3; color: var(--dx-accent) !important; }
.dx-dialog-intro { margin: 0 auto 20px; max-width: 42ch; text-align: center; font-size: 14px; line-height: 1.6; color: var(--dx-muted); }
.is-report .report-symbol { margin-inline: auto; }
.is-report .report-intro { text-align: center; }
.is-report .report-submit { background: var(--dx-accent); color: #fff; }
.is-report .report-submit:hover { background: var(--dx-accent-hover); }
.dx-form { display: grid; gap: 16px; }
.dx-form label { display: grid; gap: 8px; font-size: 15px; font-weight: 600; color: var(--dx-ink); }
.dx-form :is(select, textarea, input) { width: 100%; min-height: 54px; padding: 14px 16px; border: 1px solid transparent; border-radius: 14px; background: #f4f5f7; font: inherit; font-size: 15px; font-weight: 400; color: var(--dx-ink); }
.dx-form textarea { min-height: 110px; resize: vertical; }
.dx-form :is(select, textarea, input):focus { outline: none; border-color: var(--dx-accent-icon); background: #fff; }
.dx-form-actions { display: grid; gap: 12px; margin-top: 6px; }
.dx-form-actions .dx-cta { min-height: 56px; }

/* ── Tablet / desktop ── */
@media (min-width: 1000px) {
  .dx { grid-template-columns: minmax(0, 1fr) 370px; grid-template-areas: "hero side" "main side"; gap: 24px 28px; align-items: start; }
  .dx-side { position: sticky; top: calc(88px + var(--vertical-nav-h, 44px)); }
}

/* ── Phones and tablets: one column, the side column's cards interleaved ── */
@media (max-width: 999px) {
  .dx { display: flex; flex-direction: column; }
  .dx-side { display: contents; }
  .dx-hero, .dx-gallery { order: 0; }
  .dx-side > * { order: 1; }
  .dx-main { order: 2; }
  .dx-side > .dx-report { order: 3; }
}

/* ── Phones: the mobile-app layout ── */
@media (max-width: 719px) {
  .dx-crumbs { display: none; }
  .dx { gap: 16px; margin-top: 0; }
  /* Bleed to the screen edge by the page gutter (16px directory, 14px marketplace). */
  .dx { --dx-bleed: 16px; }
  .has-listing .dx { --dx-bleed: 14px; }
  .dx-hero { margin-inline: calc(-1 * var(--dx-bleed)); border-radius: 0 0 28px 28px; }
  .dx-gallery .dx-hero { margin-top: -12px; }
  .dx-thumbs { padding: 0 2px; overflow-x: auto; }
  .dx-hero-img, .dx-hero .listing-gallery-stage img { height: 300px; }
  .dx-hero--art { min-height: 250px; padding: 80px 20px 24px; }
  .dx-art-mark .ui-icon { width: 220px; height: 220px; }
  .dx-thumbs { margin-top: -6px; }
  .dx-thumbs .listing-thumb { width: 56px; height: 46px; }
  .dx-pill { min-height: 46px; font-size: 14px; gap: 6px; padding: 0 8px; }
  .dx-pill .ui-icon { width: 19px; height: 19px; }
  .dx-who { gap: 12px; padding: 14px; }
  .dx-avatar { width: 56px; height: 56px; font-size: 19px; }
  .dx-card, .dx-main > .dir-section, .dx-main > .detail-panel, .dx-main > .review-section, .dx-main > .job-block, .dx-main > section:not([class]) { padding: 20px 18px; border-radius: 18px; }
  .dx-main :is(h2, .category-section-head h2) { font-size: 18px; }
  .dx-features > div { flex-basis: 76px; padding: 12px 4px; }
  .dx-features dd { font-size: 14px; }
  .dx-checks li { font-size: 14px; }
}
@media (max-width: 380px) {
  .dx-pills { gap: 8px; }
  .dx-pill { gap: 5px; padding: 0 6px; font-size: 13px; }
  .dx-pill .ui-icon { width: 17px; height: 17px; }
}
@media (max-width: 340px) {
  .dx-pill .ui-icon { display: none; }
}
