.utility-bar {
  min-height: 42px;
  padding: 7px clamp(24px, 6vw, 100px);
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: #eef5f3;
  color: #446366;
  font-size: .75rem;
}

.connection-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; }
.connection-status i { width: 8px; height: 8px; border-radius: 50%; background: #4d9b78; box-shadow: 0 0 0 3px rgba(77, 155, 120, .13); }
.connection-status.offline i { background: var(--coral); box-shadow: 0 0 0 3px rgba(223, 101, 79, .14); }
.reviewed-status { margin-right: auto; }
.utility-actions { display: flex; gap: 7px; }
.utility-actions button { padding: 7px 11px; border: 1px solid #bfcfca; border-radius: 7px; background: white; color: var(--ink); font-size: .72rem; font-weight: 800; }
.utility-actions button:hover { border-color: var(--coral); color: var(--coral-dark); }

.recent-services { padding: 58px clamp(24px, 8vw, 130px) 0; }
.recent-services[hidden] { display: none; }
.recent-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.recent-heading .eyebrow { margin-bottom: 5px; }
.recent-heading h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.recent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.recent-card { min-width: 0; padding: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.recent-card:hover { border-color: #deb1a7; box-shadow: 0 8px 24px rgba(18, 63, 70, .08); }
.recent-card .card-symbol { width: 36px; height: 36px; flex: 0 0 36px; font-size: .56rem; }
.recent-card > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.recent-card b { overflow: hidden; font: 700 .84rem/1.25 Georgia, serif; text-overflow: ellipsis; white-space: nowrap; }
.recent-card small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.recent-card > span:last-child { color: var(--coral-dark); }

.card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-actions .source-action { grid-column: 1 / -1; }
.freshness-notice.stale-warning, .freshness-box.stale-warning { border-color: #d9952d; background: #fff0cf; color: #694300; }
.freshness-notice.stale-critical, .freshness-box.stale-critical { border-color: #c34c3c; background: #fff0ed; color: #7c291e; }

.detail-page { background: var(--sand); }
.detail-topbar { background: white; }
.detail-main { width: min(900px, calc(100% - 48px)); margin: 0 auto; padding: 55px 0 80px; }
.back-link { display: inline-flex; margin-bottom: 22px; color: var(--coral-dark); font-size: .84rem; font-weight: 800; }
.detail-card { padding: clamp(25px, 5vw, 58px); border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.detail-heading { display: flex; align-items: flex-start; gap: 18px; }
.detail-heading .card-symbol { width: 58px; height: 58px; flex: 0 0 58px; }
.detail-heading .eyebrow { margin-bottom: 8px; }
.detail-heading h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.8rem); }
.detail-description { max-width: 700px; margin: 28px 0 22px; color: #4f6769; font-size: 1.08rem; line-height: 1.7; }
.detail-phone { display: inline-block; color: var(--ink-dark); font: 700 clamp(2.6rem, 8vw, 5rem)/1 Georgia, serif; letter-spacing: -.03em; }
.detail-phone:hover { color: var(--coral-dark); }
.detail-card > .phone-type { min-height: 0; margin: 9px 0 30px; font-size: .82rem; }
.detail-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-facts > div { min-width: 0; padding: 18px 14px; border-right: 1px solid var(--line); }
.detail-facts > div:first-child { padding-left: 0; }
.detail-facts > div:last-child { border-right: 0; }
.detail-facts dt { margin-bottom: 5px; color: var(--muted); font-size: .69rem; font-weight: 800; text-transform: uppercase; }
.detail-facts dd { margin: 0; font-size: .86rem; font-weight: 700; }
.detail-actions { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.detail-actions button.action { background: white; color: var(--ink); }
.freshness-box { margin-top: 25px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #b8d7cd; border-radius: 9px; background: #eef7f3; color: #315e52; font-size: .78rem; line-height: 1.5; }
.emergency-reminder { margin: 20px 10px 0; color: #566d70; font-size: .78rem; line-height: 1.6; }
.offline-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--sand); }
.offline-page main { width: min(620px, 100%); padding: clamp(28px, 6vw, 60px); border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.offline-page .brand-mark { margin-bottom: 25px; }
.offline-page .action { width: fit-content; margin-top: 25px; padding-inline: 20px; }

@media (max-width: 760px) {
  .utility-bar { align-items: flex-start; flex-wrap: wrap; gap: 7px 15px; }
  .reviewed-status { width: calc(100% - 120px); margin-right: 0; }
  .utility-actions { width: 100%; }
  .utility-actions button { flex: 1; }
  .recent-services { padding-top: 40px; }
  .recent-grid { grid-template-columns: 1fr 1fr; }
  .detail-main { width: min(100% - 28px, 900px); padding-top: 30px; }
  .detail-heading { flex-direction: column; }
  .detail-facts { grid-template-columns: 1fr; }
  .detail-facts > div, .detail-facts > div:first-child { padding: 13px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-facts > div:last-child { border-bottom: 0; }
  .detail-actions { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .recent-grid { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  :root { --ink: #111; --ink-dark: #000; --line: #bbb; }
  body { background: white !important; color: #000; font-size: 9pt; }
  .topbar, .utility-bar, .hero, .categories, .recent-services, .results-meta, .region-filter, .favorite-button, .toast, .about, footer, .back-link { display: none !important; }
  .directory { padding: 0; }
  .section-heading { display: block; }
  .section-heading .eyebrow { display: none; }
  .section-heading h2 { margin-bottom: 8mm; font-size: 22pt; }
  .cards-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 5mm; }
  .service-card { padding: 5mm; break-inside: avoid; border-color: #aaa; border-radius: 2mm; box-shadow: none !important; transform: none !important; }
  .service-description { min-height: 0; margin: 3mm 0; }
  .phone-number { font-size: 18pt; }
  .phone-type { min-height: 0; margin-bottom: 2mm; }
  .card-actions { display: block; margin-top: 2mm; }
  .card-actions .action { display: none; }
  .card-actions .source-action { min-height: 0; padding: 0; display: block; border: 0; text-align: left; }
  .detail-actions { display: block; margin-top: 5mm; }
  .detail-actions .primary, .detail-actions button { display: none; }
  .detail-actions .action { min-height: 0; padding: 0; border: 0; justify-content: flex-start; }
  .card-footer { margin-top: 3mm; padding-top: 2mm; }
  .card-footer button { display: none; }
  .notice { margin-top: 6mm; break-inside: avoid; background: white; color: #333; }
  .detail-main { width: 100%; padding: 0; }
  .detail-card { padding: 0; border: 0; box-shadow: none; }
  .detail-phone { font-size: 42pt; }
  .freshness-box { background: white; }
  .emergency-reminder { margin: 8mm 0 0; }
  a[href^="http"]::after { content: "  " attr(href); color: #555; font-size: 7pt; font-weight: 400; word-break: break-all; }
}
