/* ==========================================================
   Directory styles
   Palette taken from building materials: lime plaster, emerald
   marble, saffron, and ink.
   ========================================================== */

:root {
  --paper: #f3f5f4;
  --surface: #ffffff;
  --ink: #16211e;
  --muted: #56645f;
  --line: #d6deda;
  --emerald: #0d5c48;
  --emerald-deep: #083f31;
  --emerald-tint: #e3efea;
  --saffron: #f2b229;
  --saffron-tint: #fdf3dc;
  --danger: #a3312a;
  --danger-tint: #f8e4e2;
  --wa: #25d366;

  --display: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;

  --radius: 8px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }
main { flex: 1 0 auto; }

a { color: var(--emerald); text-underline-offset: 0.18em; }
a:hover { color: var(--emerald-deep); }

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 760px; }
.page-pad { padding-block: 2.5rem 4rem; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10; border-radius: var(--radius);
}
.skip:focus { left: 0.5rem; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 44px; padding: 0.55rem 1.15rem;
  background: var(--emerald); color: #fff;
  border: 2px solid var(--emerald); border-radius: var(--radius);
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--emerald-deep); border-color: var(--emerald-deep); color: #fff; }
.btn-small { min-height: 36px; padding: 0.3rem 0.8rem; font-size: 0.93rem; }
.btn-lg { min-height: 52px; padding-inline: 1.6rem; font-size: 1.08rem; }
.btn-block { display: flex; width: 100%; margin-bottom: 0.6rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-light { background: #fff; color: var(--emerald-deep); border-color: #fff; }
.btn-light:hover { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: var(--ink); }
.btn-wa:hover { background: #1fb658; border-color: #1fb658; color: var(--ink); }
.btn-search { background: var(--saffron); border-color: var(--saffron); color: var(--ink); min-height: 52px; font-size: 1.05rem; }
.btn-search:hover { background: #e09f12; border-color: #e09f12; color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--emerald); cursor: pointer; text-decoration: underline; }
form.inline { display: inline; }

/* ---------- Header and footer ---------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; flex-wrap: wrap; padding-block: 0.6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-name { font: 800 1.35rem/1 var(--display); letter-spacing: -0.02em; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 12px); gap: 2px; }
.brand-mark i { width: 12px; height: 12px; border-radius: 2px; background: var(--emerald); }
.brand-mark i:nth-child(2) { background: var(--saffron); }
.brand-mark i:nth-child(3) { background: var(--ink); }
.brand-mark i:nth-child(4) { background: #b9c6c1; }
.main-nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.main-nav > a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; }
.main-nav > a:not(.btn):hover, .main-nav a[aria-current] { color: var(--emerald); text-decoration: underline; }

.site-footer { background: var(--ink); color: #c9d3cf; margin-top: 0; }
.site-footer a:not(.btn) { color: #fff; text-decoration: none; }
.site-footer a:not(.btn):hover { text-decoration: underline; color: #fff; }
.footer-linklike { color: #fff; text-decoration: none; font-size: inherit; }
.footer-linklike:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; padding-block: 3.5rem 2rem; }
.footer-brand { font: 800 1.4rem/1 var(--display); color: #fff; margin-bottom: 0.8rem; }
.footer-head { font: 700 1rem/1.2 var(--body); color: #fff; letter-spacing: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-base { border-top: 1px solid #2c3a36; padding-block: 1.2rem; font-size: 0.92rem; }
.footer-base { display: flex; justify-content: space-between; gap: 0.5rem 2rem; flex-wrap: wrap; }
.footer-base p { margin: 0; }
.powered { color: #9fb0aa; }

/* ---------- Material swatches ---------- */

.swatch { display: block; border-radius: 6px; background-color: #e8e6e1; }
.swatch-lg { width: 84px; height: 84px; flex: none; border-radius: 10px; }
.swatch-dot { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: -3px; margin-right: 0.45rem; flex: none; }

.swatch-panel { background: repeating-linear-gradient(90deg, #7a5638 0 9px, #5e412a 9px 11px, #8a6443 11px 12px); }
.swatch-marble {
  background:
    linear-gradient(118deg, transparent 38%, rgba(110, 118, 124, .55) 39%, transparent 41.5%),
    linear-gradient(62deg, transparent 58%, rgba(150, 156, 160, .45) 59%, transparent 60.5%),
    linear-gradient(150deg, transparent 70%, rgba(201, 168, 92, .5) 71%, transparent 72%),
    #f5f4f0;
}
.swatch-stone {
  background:
    radial-gradient(circle at 20% 30%, #c9c3b8 1.5px, transparent 2px) 0 0 / 11px 9px,
    radial-gradient(circle at 70% 60%, #1c1d1f 2px, transparent 2.5px) 0 0 / 14px 12px,
    radial-gradient(circle at 40% 80%, #8a6f5c 1.5px, transparent 2px) 0 0 / 9px 13px,
    #55585c;
}
.swatch-tile {
  background:
    linear-gradient(#f7f7f5 2px, transparent 2px) 0 0 / 22px 22px,
    linear-gradient(90deg, #f7f7f5 2px, transparent 2px) 0 0 / 22px 22px,
    #6f9fb0;
}
.swatch-porcelain {
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, .95), transparent 55%),
    linear-gradient(#dfe6ea, #c9d3d9);
}
.swatch-wood { background: repeating-linear-gradient(172deg, #a8703f 0 6px, #96612f 6px 8px, #b57d4b 8px 15px); }
.swatch-oak { background: repeating-linear-gradient(90deg, #d4a674 0 38px, #c4935f 38px 40px), repeating-linear-gradient(176deg, transparent 0 7px, rgba(120, 80, 40, .18) 7px 8px); background-blend-mode: multiply; }
.swatch-walnut { background: repeating-linear-gradient(165deg, #5b3a26 0 7px, #4a2e1d 7px 9px, #6a4630 9px 14px); }
.swatch-paint { background: linear-gradient(90deg, #e2b04a 0 34%, #3f7a85 34% 67%, #c4553e 67%); }
.swatch-pattern {
  background:
    radial-gradient(circle at 50% 50%, #0d5c48 22%, transparent 24%) 0 0 / 16px 16px,
    radial-gradient(circle at 50% 50%, #c9a24a 12%, transparent 14%) 8px 8px / 16px 16px,
    #ede4cf;
}
.swatch-plaster { background: linear-gradient(140deg, #ecebe6, #dcdad3 60%, #e6e4de); }
.swatch-light { background: radial-gradient(circle at 50% 38%, #fff3c4 0, #f2b229 22%, #6b5418 52%, #2a2414 80%); }
.swatch-frame {
  background:
    linear-gradient(90deg, transparent calc(50% - 3px), #f7f7f5 calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(transparent calc(50% - 3px), #f7f7f5 calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)),
    linear-gradient(160deg, #9cc2d2, #6e9db1);
  box-shadow: inset 0 0 0 6px #f7f7f5;
}
.swatch-fabric { background: repeating-linear-gradient(90deg, #8e3b52 0, #b9536b 7px, #8e3b52 14px); }
.swatch-glass { background: linear-gradient(135deg, #d6ecf1 0 45%, #a9d0da 45% 52%, #e9f6f8 52% 70%, #bcdde5 70%); }
.swatch-metal { background: repeating-linear-gradient(90deg, #9aa1a6 0 1px, #b9bfc3 1px 3px, #a9afb4 3px 4px); }
.swatch-solar {
  background:
    linear-gradient(#c6d1e6 1.5px, transparent 1.5px) 0 0 / 100% 16px,
    linear-gradient(90deg, #c6d1e6 1.5px, transparent 1.5px) 0 0 / 16px 100%,
    #1d3263;
}
.swatch-concrete {
  background:
    radial-gradient(circle at 30% 40%, rgba(60, 60, 58, .35) 1px, transparent 1.5px) 0 0 / 7px 7px,
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, .5) 1px, transparent 1.5px) 0 0 / 9px 11px,
    #a3a49f;
}
.swatch-sketch {
  background:
    linear-gradient(rgba(255, 255, 255, .22) 1px, transparent 1px) 0 0 / 10px 10px,
    linear-gradient(90deg, rgba(255, 255, 255, .22) 1px, transparent 1px) 0 0 / 10px 10px,
    #1f4e79;
}
.swatch-brick {
  background:
    linear-gradient(#e4d6cb 2px, transparent 2px) 0 0 / 100% 13px,
    linear-gradient(90deg, #e4d6cb 2px, transparent 2px) 0 0 / 26px 26px,
    linear-gradient(90deg, #e4d6cb 2px, transparent 2px) 13px 13px / 26px 26px,
    #a64b2a;
}

/* ---------- Home ---------- */

.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: end;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem);
}
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 16ch; margin-bottom: 0.35em; }
.urdu {
  font-family: var(--urdu); font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 2.3;
  color: var(--emerald); text-align: left; margin: 0 0 0.6rem;
}
.hero .lead { margin-bottom: 0; }

.search-box {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 12px;
  padding: 1.25rem; display: grid; gap: 0.9rem;
}
.search-field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.search-note { margin: 0; color: var(--muted); font-size: 0.95rem; }

.material-strip { display: flex; height: 22px; }
.material-strip .swatch { flex: 1; border-radius: 0; }

.section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-tint { background: var(--emerald-tint); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.section-link { font-weight: 600; }

.swatch-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.6rem 1.25rem;
}
.material-link { display: block; text-decoration: none; color: var(--ink); }
.material-link .swatch { aspect-ratio: 16 / 10; margin-bottom: 0.6rem; outline: 2px solid transparent; outline-offset: 3px; }
.material-link:hover .swatch { outline-color: var(--ink); }
.swatch-label { display: block; font-weight: 700; line-height: 1.25; }
.material-link:hover .swatch-label { text-decoration: underline; }
.swatch-count { display: block; color: var(--muted); font-size: 0.9rem; }

.province-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2rem 1.5rem; }
.province h3 { font-family: var(--body); font-size: 1rem; color: var(--muted); font-weight: 700; margin-bottom: 0.5rem; letter-spacing: 0; }
.province ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.province a { font-weight: 600; }
.count { display: inline-block; min-width: 1.6em; padding: 0 0.4em; border-radius: 99px; background: var(--paper); color: var(--muted); font-size: 0.82rem; text-align: center; }

.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.guide-list-stack { grid-template-columns: 1fr; gap: 0; }
.guide-list-stack .guide-item { border-bottom: 1px solid var(--line); padding-block: 1.4rem; }
.guide-item h2, .guide-item h3 { margin-bottom: 0.35rem; }
.guide-item h3 a, .guide-item h2 a { color: var(--ink); }
.guide-item p { margin-bottom: 0.4rem; }

.cta-band { background: var(--emerald); color: #e6f1ed; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; flex-wrap: wrap; padding-block: 2.75rem; }
.cta-band h2 { color: #fff; margin-bottom: 0.3rem; }
.cta-band p { margin: 0; }

/* ---------- Listing cards ---------- */

.card-list { display: grid; gap: 1rem; }
.card-list-2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

.card {
  display: grid; grid-template-columns: 56px 1fr; grid-template-rows: 1fr auto; gap: 0.25rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.2rem;
}
.card-featured { border-left: 5px solid var(--saffron); }
.card-logo { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.card-logo-letter { display: grid; place-items: center; border: 0; }
.card-logo-letter span {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink); font: 800 1.05rem/1 var(--display);
}
.card-body { min-width: 0; }
.card-title { margin: 0 0 0.15rem; font-size: 1.15rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; color: var(--emerald); }
.card-meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.45rem; }
.sep { margin-inline: 0.45rem; color: var(--line); }
.card-text { margin: 0 0 0.5rem; }
.card-actions { grid-column: 2; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.35rem; }
.card-more { margin-left: auto; font-weight: 600; }

.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge {
  display: inline-block; padding: 0.1rem 0.55rem; border-radius: 99px;
  background: var(--paper); border: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; color: var(--muted);
}
.badge-verified { background: var(--emerald-tint); border-color: #b9d6cb; color: var(--emerald-deep); }
.badge-warn { background: var(--saffron-tint); border-color: #f0d38c; color: #6b4d00; }

/* ---------- Page head, browse ---------- */

.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 1.5rem 2rem; }
.page-head-row { display: flex; gap: 1.25rem; align-items: flex-start; }
.page-head .lead { margin-bottom: 0; }

.crumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; font-size: 0.92rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.3rem; color: #a8b4af; }
.crumbs a { color: var(--muted); }

.browse-layout { display: grid; grid-template-columns: 270px 1fr; gap: 2.5rem; padding-block: 2rem 4rem; align-items: start; }
.filters { position: sticky; top: 1rem; }
.filters form { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem; }
.filters .btn { width: 100%; margin-top: 0.4rem; }
.filter-links { margin-top: 1.5rem; }
.filter-links h2 { font-family: var(--body); font-size: 1rem; letter-spacing: 0; margin-bottom: 0.5rem; }
.filter-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.97rem; }
.result-count { font-weight: 700; margin-bottom: 1rem; }
.also { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.also h2 { margin-bottom: 0.2rem; }

.empty { background: var(--surface); border: 1px dashed #b5c2bd; border-radius: 10px; padding: 2rem; }
.empty h2 { font-size: 1.3rem; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 2rem; font-weight: 600; }

/* ---------- Business page ---------- */

.biz-head { display: flex; gap: 1.25rem; align-items: center; }
.biz-head h1 { margin-bottom: 0.15rem; }
.biz-logo { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.biz-logo.card-logo-letter span { width: 52px; height: 52px; font-size: 1.5rem; }
.biz-place { color: var(--muted); font-size: 1.1rem; margin-bottom: 0.5rem; }
.biz-layout { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; padding-block: 2.5rem 3.5rem; align-items: start; }
.biz-main h2 { font-size: 1.3rem; margin-top: 2rem; }
.biz-main h2:first-child { margin-top: 0; }
.biz-desc { max-width: 68ch; }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list a {
  display: inline-flex; align-items: center; padding: 0.4rem 0.8rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600;
}
.tag-list a:hover { border-color: var(--ink); }
.contact-panel { background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 1.4rem; position: sticky; top: 1rem; }
.contact-panel h2 { font-size: 1.3rem; }
.contact-list { margin: 1rem 0 0; }
.contact-list dt { font-weight: 700; font-size: 0.9rem; color: var(--muted); margin-top: 0.8rem; }
.contact-list dd { margin: 0.1rem 0 0; overflow-wrap: anywhere; }
.contact-note { margin: 1.2rem 0 0; font-size: 0.92rem; color: var(--muted); }
.claim { padding-block: 1.5rem; color: var(--muted); font-size: 0.95rem; }

.badge-offer { padding-top: 2rem; }
.badge-offer details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.badge-offer summary { cursor: pointer; font-weight: 700; }
.badge-body { padding-top: 1rem; }
.badge-body img { display: block; margin-bottom: 0.8rem; }

/* ---------- Prose (guides) ---------- */

.prose { font-size: 1.1rem; line-height: 1.7; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 1rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; }
.prose th { background: var(--surface); }

/* ---------- Forms ---------- */

.form fieldset { border: 0; padding: 0; margin: 0 0 2.25rem; }
.form legend { font: 700 1.3rem/1.2 var(--display); margin-bottom: 1rem; padding: 0; }
.field { margin-bottom: 1.1rem; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.hint { color: var(--muted); font-size: 0.93rem; margin: -0.15rem 0 0.4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }

input[type="text"], input:not([type]), input[type="search"], input[type="email"], input[type="tel"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 46px; padding: 0.55rem 0.75rem;
  border: 1px solid #b9c5c0; border-radius: var(--radius); background: #fff; color: var(--ink);
  font: 400 1rem/1.4 var(--body);
}
textarea { min-height: 0; resize: vertical; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--saffron); outline-offset: 0; border-color: var(--ink); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
input[type="file"] { font: inherit; }

.check { display: flex; gap: 0.55rem; align-items: flex-start; margin-bottom: 0.6rem; font-weight: 400 !important; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 0.2rem; accent-color: var(--emerald); flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; padding: 0.8rem 1rem 0.3rem; background: #fff; border: 1px solid #b9c5c0; border-radius: var(--radius); }
.field-error { color: var(--danger); font-weight: 600; font-size: 0.95rem; margin: 0.35rem 0 0; }

.notice { padding: 0.9rem 1.1rem; border-radius: var(--radius); margin: 1rem auto; width: min(100% - 2.5rem, var(--wrap)); border: 1px solid; }
.page-pad .notice, main.wrap .notice { width: auto; }
.notice-ok { background: var(--emerald-tint); border-color: #b9d6cb; }
.notice-error { background: var(--danger-tint); border-color: #e6b8b4; color: #5e1a15; }
.notice-warn { background: var(--saffron-tint); border-color: #f0d38c; }
.notice .btn, .notice form { margin-left: 0.5rem; }

/* ---------- Admin ---------- */

.admin .page-pad { padding-top: 2rem; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-head h1 { margin: 0; }
.narrow-box { max-width: 440px; margin: 2rem auto; }
.tabs { display: flex; gap: 0.3rem; border-bottom: 1px solid var(--line); margin: 1rem 0; flex-wrap: wrap; }
.tabs a { padding: 0.6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--emerald); }
.admin-search { display: flex; gap: 0.5rem; max-width: 460px; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: 0.9rem; color: var(--muted); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .badge { margin-left: 0.3rem; }
.row-actions { white-space: nowrap; }
.row-actions .btn, .row-actions form { margin: 0 0.2rem 0.3rem 0; }
.form-admin { max-width: 880px; }
.current-logo { display: flex; align-items: center; gap: 1rem; margin: -1rem 0 2rem; }
.current-logo img { border-radius: 8px; border: 1px solid var(--line); }
.tax-list { display: grid; gap: 0.6rem; margin-bottom: 2.5rem; }
.tax-row {
  display: flex; gap: 0.8rem; align-items: flex-end; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem;
}
.tax-row .field { margin: 0; min-width: 170px; }
.tax-row .grow { flex: 1; min-width: 260px; }
.tax-row .small-field { min-width: 0; width: 80px; }
.tax-row label { font-size: 0.85rem; }
.tax-row .swatch-dot { width: 28px; height: 46px; margin: 0; }
.tax-actions { display: flex; flex-direction: column; gap: 0.25rem; }

/* ---------- Category photos ---------- */

.cat-img { display: block; width: 100%; object-fit: cover; border-radius: 6px; background: var(--line); }
.material-link .cat-img { aspect-ratio: 16 / 10; margin-bottom: 0.6rem; outline: 2px solid transparent; outline-offset: 3px; }
.material-link:hover .cat-img { outline-color: var(--ink); }
.cat-img.swatch-lg { width: 84px; height: 84px; border-radius: 10px; flex: none; }

/* ---------- Card photos ---------- */

.card-has-photo { grid-template-rows: auto 1fr auto; padding-top: 0; overflow: hidden; }
.card-photo { grid-column: 1 / -1; display: block; position: relative; margin: 0 -1.2rem 0.6rem; }
.card-photo img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

@media (min-width: 961px) {
  .results .card-has-photo { grid-template-columns: 230px 56px 1fr; grid-template-rows: 1fr auto; padding: 1.1rem 1.2rem 1.1rem 0; }
  .results .card-has-photo .card-photo { grid-column: 1; grid-row: 1 / span 2; margin: -1.1rem 0 -1.1rem 0; }
  .results .card-has-photo .card-photo img { height: 100%; aspect-ratio: auto; min-height: 170px; }
  .results .card-has-photo .card-logo { grid-column: 2; grid-row: 1; }
  .results .card-has-photo .card-body { grid-column: 3; grid-row: 1; }
  .results .card-has-photo .card-actions { grid-column: 3; grid-row: 2; }
}
.photo-count {
  position: absolute; right: 0.6rem; bottom: 0.6rem; background: rgba(22, 33, 30, .82); color: #fff;
  font-size: 0.82rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 99px;
}

/* ---------- Business gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 2rem; }
.gallery-item { display: block; border-radius: 8px; overflow: hidden; background: var(--line); }
.gallery-item img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-main { grid-column: span 4; }
.gallery-main img { aspect-ratio: 16 / 9; }

/* ---------- Landing page content ---------- */

.summary { background: var(--surface); border-left: 4px solid var(--emerald); padding: 0.8rem 1rem; border-radius: 0 8px 8px 0; }
.landing-content { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); max-width: 72ch; }
.landing-guides { margin-top: 2.5rem; }
.landing-guides ul { padding-left: 1.2em; }
.landing-guides li { margin-bottom: 0.5rem; }
.inline-links { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.faq { margin-top: 2.5rem; max-width: 72ch; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 0.5rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: 0.85rem 1rem; }
.faq details p { margin: 0; padding: 0 1rem 1rem; }

/* ---------- Guides ---------- */

.guide-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-top: 2rem; }
.guide-thumb img, .guide-item-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 0.8rem; }
.guide-item-img { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; align-items: start; }
.guide-item-img img { margin-bottom: 0; }

/* ---------- 404 ---------- */

.not-found h2 { margin-top: 2.5rem; font-size: 1.2rem; }
.inline-search { display: flex; gap: 0.5rem; max-width: 520px; margin-top: 1.5rem; }
.inline-search .btn { flex: none; }
.nf-home { margin-top: 2rem; font-weight: 600; }

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50;
  max-width: 520px; background: var(--surface); border: 2px solid var(--ink); border-radius: 12px;
  padding: 1.1rem 1.2rem; box-shadow: 0 10px 30px rgba(22, 33, 30, .18);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 0.6rem; font-size: 0.98rem; }
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.8rem; }
.cookie-actions .btn { flex: 1; }

/* ---------- Admin media ---------- */

.thumb-cell { width: 96px; }
.admin-thumb { width: 80px !important; height: 50px; aspect-ratio: auto; border-radius: 6px; display: block; }
img.admin-thumb { object-fit: cover; }
.photo-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; }
.photo-admin-item { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem; }
.photo-admin-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin-bottom: 0.4rem; }

/* ---------- Pricing ---------- */

.pricing-head { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; align-items: center; }
.price-card { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 1.5rem; }
.price { font: 800 3rem/1 var(--display); letter-spacing: -0.03em; margin: 0 0 0.3rem; }
.price-note { color: var(--muted); margin: 0 0 1.2rem; display: block; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.included { padding-left: 1.2em; }
.included li, .steps li { margin-bottom: 0.7rem; }
.steps { padding-left: 1.4em; }

/* ---------- Owner account ---------- */

.form-narrow { max-width: 480px; }
.form-foot { margin-top: 1.2rem; }
.state { display: inline-block; font-size: 0.85rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 99px; border: 1px solid; }
.state-ok { background: var(--emerald-tint); border-color: #b9d6cb; color: var(--emerald-deep); }
.state-wait { background: var(--paper); border-color: var(--line); color: var(--muted); }
.state-warn { background: var(--saffron-tint); border-color: #f0d38c; color: #6b4d00; }
.state-bad { background: var(--danger-tint); border-color: #e6b8b4; color: #5e1a15; }
.owner-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.owner-card {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem 1.4rem;
}
.owner-card h2 { margin: 0.5rem 0 0.2rem; font-size: 1.35rem; }
.owner-card-main p { margin-bottom: 0.4rem; }
.owner-card-stats { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.owner-card-stats p { width: 100%; margin: 0; }
.owner-card-stats div { display: grid; }
.owner-card-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; border-top: 1px solid var(--line); padding-top: 1rem; }
.account-foot { display: flex; gap: 1.5rem; margin-top: 2rem; }

.pay-box { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 1.3rem 1.4rem; margin: 1.5rem 0 2rem; }
.pay-amount .price { font-size: 2.4rem; }
.pay-ref { display: grid; gap: 0.2rem; text-align: right; }
.ref-code { font: 800 1.6rem/1.1 var(--display); letter-spacing: 0.02em; color: var(--emerald-deep); }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.method { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; }
.method h3 { margin-bottom: 0.4rem; }
.method p { margin: 0; font-size: 0.97rem; }

/* ---------- Analytics ---------- */

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.8rem; margin: 1.5rem 0 0.8rem; }
.stat-card { display: grid; gap: 0.15rem; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; }
.stat-main { border: 2px solid var(--emerald); }
.stat-num { font: 800 1.9rem/1.05 var(--display); letter-spacing: -0.02em; }
.stat-label { font-weight: 700; }
.stat-help { color: var(--muted); font-size: 0.85rem; }
.trend { font-size: 0.85rem; font-weight: 600; }
.trend.up { color: var(--emerald); }
.trend.down { color: var(--danger); }
.stats h2 { margin-top: 2.2rem; font-size: 1.25rem; }
.chart-legend { display: flex; align-items: center; gap: 0.4rem 0.5rem; flex-wrap: wrap; font-size: 0.92rem; color: var(--muted); margin-bottom: 0.6rem; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 0.6rem; }
.key:first-child { margin-left: 0; }
.key-views, .bar-views { background: #a9c7bd; }
.key-contacts, .bar-contacts { background: var(--emerald); }
.chart {
  display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; align-items: end;
  height: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 0.8rem 0;
}
.chart-col { height: 100%; display: flex; align-items: flex-end; gap: 1px; }
.bar { flex: 1; min-height: 1px; border-radius: 2px 2px 0 0; }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }

/* ---------- Admin payments ---------- */

.count-alert { background: var(--saffron); color: var(--ink); }
.pay-list { display: grid; gap: 1rem; }
.pay-item { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem; }
.pay-item h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.pay-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0.8rem 0 0; }
.pay-facts dt { color: var(--muted); font-size: 0.92rem; }
.pay-facts dd { margin: 0; }
.proof-thumb { display: block; width: 100%; max-height: 220px; object-fit: contain; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 0.8rem; }
.pay-actions { display: grid; gap: 0.5rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; align-items: start; }
  .browse-layout, .biz-layout { grid-template-columns: 1fr; }
  .filters, .contact-panel { position: static; }
  .biz-layout .contact-panel { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .pricing-head, .pricing-grid, .pay-item { grid-template-columns: 1fr; }
  .owner-card { grid-template-columns: 1fr; }
  .pay-ref { text-align: left; }
  .card-list-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .card { grid-template-columns: 44px 1fr; padding: 1rem; }
  .card-logo { width: 44px; height: 44px; }
  .card-logo-letter span { width: 28px; height: 28px; font-size: 0.95rem; }
  .card-actions { grid-column: 1 / -1; }
  .card-actions .btn { flex: 1; }
  .card-more { margin-left: 0; }
  .page-head-row .swatch-lg { width: 56px; height: 56px; }
  .biz-head { align-items: flex-start; }
  .biz-logo { width: 68px; height: 68px; }
  .main-nav { gap: 0.9rem; }
  .material-strip { height: 14px; }
  .card-photo { margin-inline: -1rem; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery-main { grid-column: span 3; }
  .guide-item-img { grid-template-columns: 1fr; }
  .inline-search { flex-direction: column; }
  .cookie-banner { left: 0.6rem; right: 0.6rem; bottom: 0.6rem; }
  .chart { gap: 1px; padding-inline: 0.4rem; height: 140px; }
  .owner-card-actions .btn { flex: 1 1 100%; }
  .swatch-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem 0.9rem; }
  .swatch-label { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.landing-content > :first-child, .prose > :first-child { margin-top: 0; }

/* ---------- Guide scheduling ---------- */
.schedule-box { background: var(--surface); border: 1px solid var(--line) !important; border-radius: 10px; padding: 1rem 1.2rem !important; }
.schedule-box legend { font-size: 1.1rem !important; padding: 0 0.3rem !important; }
.schedule-options { display: grid; gap: 0.2rem; margin-bottom: 0.8rem; }
.schedule-when { max-width: 320px; margin-bottom: 0; }
.schedule-when[hidden] { display: none; }
.schedule-summary { display: grid; gap: 0.25rem; background: var(--saffron-tint); border: 1px solid #f0d38c; border-radius: 10px; padding: 0.9rem 1.1rem; margin: 1rem 0 1.5rem; font-size: 0.95rem; }

/* ---------- Admin security ---------- */
.security-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem 1.5rem; margin: 1.5rem 0; max-width: 820px; }
.codes-box { border: 2px solid var(--saffron); }
.backup-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: 0.4rem 1.5rem; font: 600 1.1rem/1.4 ui-monospace, Consolas, monospace; }
.security-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.security-actions h3 { margin-top: 0; }
.setup-steps { padding-left: 1.3em; }
.setup-steps > li { margin-bottom: 1.5rem; }
.qr-wrap { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.8rem; }
#qr { background: #fff; padding: 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 220px; min-height: 220px; display: grid; place-items: center; }
.secret { font: 700 1.15rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: 0.05em; word-break: break-all; margin: 0.3rem 0; }
.code-input { font: 700 1.3rem/1 ui-monospace, Consolas, monospace !important; letter-spacing: 0.2em; max-width: 220px; }
.inline-confirm { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.6rem; flex-wrap: wrap; }
@media print { .site-header, .security-box:not(.codes-box), h1, .notice { display: none !important; } }
