/* LocalBook Swabi: one small stylesheet, no web fonts, no frameworks. Logical properties keep RTL working. */
:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --ink: #1b2624;
  --ink-2: #4a5754;
  --line: #ddd6ca;
  --brand: #0e4f4a;
  --brand-2: #0b3d39;
  --brand-tint: #e3efec;
  --accent: #c8752a;
  --accent-tint: #fbefe2;
  --call: #0e4f4a;
  --wa: #17703a;
  --ok: #1d6b39;
  --ok-tint: #e5f3e9;
  --warn: #8a5a00;
  --warn-tint: #fff4d9;
  --err: #a32a1f;
  --err-tint: #fde9e6;
  --demo: #6b3fa0;
  --demo-tint: #f1eafa;
  --ext: #3d4a8a;
  --ext-tint: #eceffa;
  --radius: 14px;
  --focus: 3px solid #c8752a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-ur: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); }
html[lang="ur"] body { font-family: var(--font-ur); font-size: 18px; line-height: 1.95; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3 { line-height: 1.7; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }
code { font-size: .9em; background: #efe9de; padding: 0 .3em; border-radius: 4px; }
.wrap { width: 100%; max-width: 960px; margin-inline: auto; padding-inline: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 8px; }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: .92rem; margin: .25em 0 .5em; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.ic-s { width: 1.05em; height: 1.05em; margin-inline-end: .3em; }
.ic-xl { width: 48px; height: 48px; color: var(--brand); }
html[dir="rtl"] .flip { transform: scaleX(-1); }
.js-only { display: none; }
.js .js-only { display: block; }
[hidden] { display: none !important; }

/* Header and footer */
.top { background: var(--brand); color: #fff; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand:hover { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); }
.brand-ic { width: 22px; height: 22px; color: #fff; }
.lang-link { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; padding: 8px 12px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; min-height: 44px; }
.lang-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.lang-link[lang="ur"] { font-family: var(--font-ur); }
.lang-link[lang="en"] { font-family: var(--font); }
.demo-banner { background: var(--demo-tint); color: var(--demo); border-bottom: 1px solid #dccdf0; font-size: .92rem; }
.demo-banner .wrap { display: flex; gap: 8px; align-items: flex-start; padding-block: 8px; }
main { padding-block: 20px 40px; }
main:focus { outline: none; }
.foot { border-top: 1px solid var(--line); background: #efe9de; padding-block: 20px; font-size: .92rem; }
.foot-note { color: var(--ink-2); }
.foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { display: inline-block; padding: 8px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn-lg { min-height: 56px; font-size: 1.08rem; }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: .9rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-secondary { background: var(--accent); color: #fff; }
.btn-secondary:hover { background: #a95f1f; color: #fff; }
.btn-ghost { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-link { background: none; border: none; color: var(--brand); text-decoration: underline; padding-inline: 4px; min-height: 44px; }
.btn-danger { background: var(--err); color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.btn-call { background: var(--call); color: #fff; flex: 1 1 0; }
.btn-call:hover { background: var(--brand-2); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; flex: 1 1 0; }
.btn-wa:hover { background: #115a2e; color: #fff; }
.btn-txt { display: flex; flex-direction: column; align-items: flex-start; }
.btn-txt .num { white-space: nowrap; font-weight: 500; font-size: .88rem; opacity: .92; font-family: var(--font); }

/* Home */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; margin-bottom: 24px; }
.lead { color: var(--ink-2); font-size: 1.05rem; }
.search { display: grid; gap: 14px; }
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.search .field { margin: 0; }
label, legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid #b9b0a2; border-radius: 10px; padding: 11px 12px; min-height: 50px; }
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-inline-end: 36px; }
html[dir="rtl"] select { background-position: 14px 50%, 20px 50%; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: var(--focus); outline-offset: 1px; }
input[type="file"] { padding: 10px; }
input[dir="ltr"] { text-align: left; }
html[dir="rtl"] input[dir="ltr"] { text-align: right; }
.req, .opt { font-weight: 400; color: var(--ink-2); font-size: .88rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 8px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; min-height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.check-strong { font-weight: 600; background: var(--accent-tint); padding: 12px; border-radius: 10px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 12px; }
.locate .hint { margin-top: 6px; }
.loc-status { font-size: .95rem; font-weight: 600; color: var(--brand); min-height: 1em; margin: 4px 0 0; }
.loc-status.is-error { color: var(--err); }
.cat-grid { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 104px; padding: 12px 8px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.3; }
.cat-tile:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
.ic-cat { width: 34px; height: 34px; color: var(--brand); }
.steps ol { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; flex: none; font-family: var(--font); }
.cta { background: var(--brand-tint); border-radius: var(--radius); padding: 20px 16px; text-align: center; }
.cta p { font-weight: 600; font-size: 1.1rem; }
.cta-small { margin-top: 28px; }
.cta-small p { font-size: 1rem; margin-bottom: 4px; }

/* Results */
.results-head h1 { margin-bottom: .2em; }
.count { color: var(--ink-2); }
.refine { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0 16px; }
.refine summary { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; cursor: pointer; font-weight: 600; color: var(--brand); list-style: none; }
.refine summary::-webkit-details-marker { display: none; }
.refine[open] summary { border-bottom: 1px solid var(--line); }
.refine form { padding: 16px; }
.src-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; color: var(--ink-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: 6px; }
.dot-dir { background: var(--brand); } .dot-demo { background: var(--demo); } .dot-ext { background: var(--ext); }
.cards { display: grid; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; border-inline-start: 5px solid var(--brand); }
.card-demo { border-inline-start-color: var(--demo); }
.card-google { border-inline-start-color: var(--ext); }
.card-head { display: flex; gap: 12px; align-items: flex-start; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; background: var(--line); }
.card-cat { margin: 0; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.card h2, .card h3 { font-size: 1.15rem; margin: 0; }
.card h3 a, .card h2 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.person { margin: 0; color: var(--ink-2); font-size: .95rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.badge { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #efe9de; color: var(--ink-2); line-height: 1.5; }
.badge-src { background: var(--brand-tint); color: var(--brand); }
.badge-ok { background: var(--ok-tint); color: var(--ok); }
.badge-muted { background: #f0ece4; color: var(--ink-2); }
.badge-area { background: var(--accent-tint); color: #8a4c13; }
.badge-demo { background: var(--demo-tint); color: var(--demo); }
.badge-ext { background: var(--ext-tint); color: var(--ext); }
.badge-pending { background: var(--warn-tint); color: var(--warn); }
.badge-approved { background: var(--ok-tint); color: var(--ok); }
.badge-rejected, .badge-removed { background: var(--err-tint); color: var(--err); }
.desc { margin: 6px 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.desc-full { white-space: pre-line; }
.avail { color: var(--ok); font-weight: 600; font-size: .95rem; }
.facts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; font-size: .95rem; }
.facts li { display: flex; align-items: flex-start; gap: 2px; }
.facts .ic-s { margin-top: .25em; color: var(--ink-2); }
.lbl { font-weight: 600; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-off { display: flex; align-items: center; gap: 4px; margin: 0; padding: 12px; border-radius: 10px; background: #f0ece4; color: var(--ink-2); font-size: .95rem; width: 100%; }
.more { margin: 10px 0 0; }
.more a { display: inline-block; padding: 8px 0; font-weight: 600; }
.ext-link { margin: 10px 0 0; }
.attr-3p { font-size: .8rem; color: var(--ink-2); margin: 6px 0 0; }
.empty { background: var(--surface); border: 1px dashed #b9b0a2; border-radius: var(--radius); padding: 20px; text-align: center; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 0; }
.ext-offer { margin-top: 22px; }
.ext { margin-top: 28px; background: var(--ext-tint); border: 2px solid #c9cfee; border-radius: var(--radius); padding: 16px; }
.ext-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.ext-head h2 { margin: 0; }
.gm-attr { margin: 0; font-size: .9rem; color: var(--ink-2); }
.gm { font-family: Roboto, Arial, sans-serif; font-weight: 500; color: #5e5e5e; white-space: nowrap; }
.ext .card { border-color: #c9cfee; }

/* Alerts */
.alert { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; padding-inline-start: 20px; }
.alert-error { background: var(--err-tint); border-color: #f2b8b0; color: #6e1c15; }
.alert-error a { color: #6e1c15; }
.alert-warn { background: var(--warn-tint); border-color: #f0d58f; color: #5a3b00; }
.alert-info { background: var(--brand-tint); border-color: #b9d6d0; }
.alert-ok { background: var(--ok-tint); border-color: #b5dcc0; color: #14492a; }
.loc-on { display: flex; gap: 10px; }
.loc-on p { margin: 0 0 4px; }
.draft { display: flex; gap: 8px; align-items: flex-start; }
.field-error { color: var(--err); font-weight: 600; margin: 0 0 6px; font-size: .95rem; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err); }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Detail */
.back a { display: inline-flex; align-items: center; padding: 8px 0; }
.detail-head h1 { margin-bottom: .1em; }
.photo { border-radius: var(--radius); margin: 8px 0 16px; width: 100%; max-height: 360px; object-fit: cover; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.panel-quiet { background: #fbf9f5; }
.chips { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--brand-tint); color: var(--brand); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .92rem; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.link-list a { display: inline-flex; align-items: center; padding: 6px 0; }

/* Forms and messages */
.form { max-width: 640px; }
.form-wide { max-width: none; }
.msg { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 18px; max-width: 560px; margin: 10px auto; }
.ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.4rem; font-weight: 700; letter-spacing: .08em; background: var(--accent-tint); border-radius: 10px; padding: 8px; }
.msg-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.num-big { font-size: 1.4rem; font-weight: 700; font-family: var(--font); }
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 2px 14px; padding-block: 6px 10px; }
.admin-nav a { color: #fff; padding: 6px 0; font-size: .95rem; }
.who { opacity: .85; font-size: .9rem; }
.top .btn-link { color: #fff; }
.inline { display: inline; }
.narrow { max-width: 420px; margin: 20px auto; }
.stat-grid { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.stat-grid a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); }
.stat-grid strong { display: block; font-size: 2rem; color: var(--brand); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .92rem; }
.tbl th, .tbl td { text-align: start; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl input, .tbl select { min-height: 38px; padding: 6px 8px; border-width: 1px; }
.tbl input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; }
.w-num { width: 80px; } .w-coord { width: 110px; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters label { font-weight: 600; }
.filters input, .filters select { min-height: 42px; }
.grid2 { display: grid; gap: 0 16px; }
.h-sm { font-size: 1.05rem; }
blockquote { margin: 8px 0; padding: 8px 12px; border-inline-start: 4px solid var(--line); background: #fbf9f5; white-space: pre-line; }

@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .hero { padding: 28px; }
  .search-home { grid-template-columns: 1fr 1fr; }
  .search-home .locate, .search-home .field:nth-of-type(3), .search-home .btn { grid-column: 1 / -1; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .steps ol { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .btn-call, .btn-wa { flex: 0 1 auto; min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .top, .foot, .actions, .demo-banner, .refine { display: none; } }

/* ---- v2: profiles, contact row, availability, owner area ---- */
.js .js-only-inline { display: inline-flex; }
.js-only-inline { display: none; }
.contact { display: grid; gap: 10px; }
.num-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.num-line .num { font-size: 1.2rem; font-weight: 700; font-family: var(--font); letter-spacing: .02em; }
.btn-copy { min-height: 40px; padding: 6px 12px; font-size: .9rem; background: var(--surface); color: var(--brand); border-color: #b9d6d0; }
.btn-copy:hover { background: var(--brand-tint); }
.copy-status { font-size: .9rem; color: var(--ok); font-weight: 600; }
.btn-sms { background: #33566f; color: #fff; flex: 1 1 0; }
.btn-sms:hover { background: #26435a; color: #fff; }
.actions .btn { min-width: 0; }
.avail { display: flex; align-items: flex-start; gap: 2px; font-size: .93rem; font-weight: 600; margin: 0 0 8px; }
.avail .ic-s { margin-top: .25em; }
.avail-yes { color: var(--ok); }
.avail-from { color: #23527a; }
.avail-stale { color: var(--warn); }
.avail-no { color: var(--err); }
.avail-unknown { color: var(--ink-2); font-weight: 500; }
.badge-kind { background: #eef2f1; color: var(--ink); }
.badge-individual { background: #f3ece2; color: #6b4513; }
.skills { margin: 6px 0 10px; color: var(--ink); }
.ext-extra { margin-top: 10px; font-size: .95rem; }
.ext-extra p { margin: 4px 0; }
.hours summary { cursor: pointer; color: var(--brand); padding: 6px 0; }
.hours ul { margin: 4px 0; padding-inline-start: 20px; font-size: .9rem; }
.small { font-size: .88rem; }
.ext-note { margin-top: 18px; }
.chips-filter { margin-top: 6px; }
.chips-filter li { background: var(--accent-tint); color: #8a4c13; }
.kind-choice { display: grid; gap: 14px; margin: 14px 0 20px; }
.kind-card { display: grid; gap: 6px; justify-items: start; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); text-decoration: none; }
.kind-card:hover, .kind-card:focus-visible { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
.kind-card strong { font-size: 1.15rem; }
.kind-card span { color: var(--ink-2); }
.form-h { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 1.15rem; }
.check.depth-1 { padding-inline-start: 0; }
.check.depth-2 { padding-inline-start: 16px; }
.check.depth-3 { padding-inline-start: 32px; }
.dl { display: grid; gap: 2px 14px; margin: 0; }
.dl dt { font-weight: 700; margin-top: 8px; }
.dl dd { margin: 0; }
.pre { white-space: pre-line; }
.samples { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.samples img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--line); }
.ref-code { letter-spacing: .12em; }
.owner-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.indent { padding-inline-start: 34px; margin-bottom: 8px; }
.mt { margin-top: 12px; }
.warn-text { color: var(--warn); }
.panel-warn { border-color: #f0d58f; background: var(--warn-tint); }
.cta-owner { margin: 12px 0 0; font-weight: 400; font-size: 1rem; }
@media (min-width: 640px) {
  .kind-choice { grid-template-columns: 1fr 1fr; }
  .dl { grid-template-columns: max-content 1fr; }
  .dl dt { margin-top: 0; }
}
.contact .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.contact .actions .btn { padding-inline: 10px; }
.num { white-space: nowrap; unicode-bidi: isolate; }
.card-public_web { border-inline-start-color: #7a5b2e; }
.dot-web { background: #7a5b2e; }
.choice-filter { margin-block: .5rem; }
.choice-filter label { font-size: .9rem; }
.choice-scroll { max-height: 22rem; overflow-y: auto; padding: .35rem; border: 1px solid #d4dedc; border-radius: .5rem; }
.groups { margin-top: 20px; }
.groups summary { cursor: pointer; font-weight: 600; }
