/* ==========================================================================
   Banglarbhumi · Land Records Workspace
   Design system: teal-green civic theme (matches the mouza map record style)
   ========================================================================== */

:root {
  /* brand */
  --teal-950: #0e3d34;
  --teal-900: #145248;
  --teal-800: #1a6558;
  --teal-700: #1f7a6a;
  --teal-600: #2a8f7c;
  --teal-500: #3aa48f;
  --teal-300: #8fcbbc;
  --teal-200: #c5e5dc;
  --teal-100: #e3f1ec;
  --teal-50:  #f1f8f5;
  --gold-600: #b7791f;
  --gold-100: #fdf3dc;
  --red-600:  #b42318;
  --red-100:  #fee4e2;
  --blue-700: #1d4ed8;
  --blue-100: #dbeafe;
  --violet-700:#6d28d9;
  --violet-100:#ede9fe;

  /* neutrals */
  --ink:      #172420;
  --ink-2:    #33433d;
  --muted:    #5f7069;
  --muted-2:  #8a9891;
  --line:     #d9e4df;
  --line-2:   #e8efeb;
  --bg:       #f2f6f4;
  --surface:  #ffffff;
  --surface-2:#f8fbf9;

  /* effects */
  --shadow-xs: 0 1px 2px rgba(14, 61, 52, .06);
  --shadow-sm: 0 2px 6px rgba(14, 61, 52, .08), 0 1px 2px rgba(14, 61, 52, .04);
  --shadow-md: 0 8px 24px rgba(14, 61, 52, .10);
  --shadow-lg: 0 24px 64px rgba(14, 61, 52, .22);
  --ring: 0 0 0 3px rgba(42, 143, 124, .22);

  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Inter", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  --content-w: 1280px;
}

[hidden] { display: none !important; }
.local-tool { display:flex; flex-wrap:wrap; gap:18px; }
.local-tool .field { min-width:170px; flex:1 1 180px; }
.tool-note, .tool-output, .local-tool > p, #share-result, #boundary-preview, #corner-list { flex-basis:100%; width:100%; }
.tool-note, .result-note { color:var(--muted); line-height:1.65; padding:12px 0; }
.tool-output { display:block; padding:18px; background:var(--teal-50); border-radius:12px; font-size:20px; font-weight:600; }
.tool-actions { display:flex; flex-wrap:wrap; gap:8px; }
.contact-card { margin-top:12px; }
.contact-card p { margin:10px 0; }
.contact-card a { display:inline-block; margin:8px 20px 0 0; overflow-wrap:anywhere; }
.save-result { margin:14px 0; }
.saved-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; width:100%; padding:12px 0; border-bottom:1px solid var(--line); }
.saved-row strong { flex:1 1 180px; }
.saved-row small { color:var(--muted); }
.captcha-extra { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.captcha-extra img { max-width:200px; }
.captcha-extra img:not([src]) { display:none; }
.operator-page { max-width:800px; display:grid; gap:20px; padding-bottom:60px; }
.operator-page h1 { margin-top:16px; }
#boundary-preview svg { width:100%; max-height:300px; background:var(--surface-2); border-radius:12px; }
:root[data-theme="dark"] { color-scheme:dark; --ink:#e4f0e9; --ink-2:#c3d4ca; --muted:#a6bfb1; --muted-2:#8ea597; --line:#3b5348; --line-2:#2c4539; --bg:#14231c; --surface:#1c3026; --surface-2:#22392d; --teal-50:#28483a; --teal-100:#284f3e; --teal-700:#8bd0b5; }
:root[data-theme="dark"] .rec-card { color:var(--ink); background:var(--surface); }

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--teal-700); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
img, svg { display: block; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ui-icon { width: 20px; height: 20px; flex-shrink: 0; }

button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--teal-500); outline-offset: 2px;
}

.skip-link {
  position: absolute; left: 16px; top: 12px; z-index: 200; padding: 10px 14px;
  background: #fff; color: var(--teal-800); border-radius: var(--r-sm); font-weight: 600;
  box-shadow: var(--shadow-md); transform: translateY(-160%); opacity: 0;
}
.skip-link:focus { transform: none; opacity: 1; }

/* --------------------------------------------------------------------------
   Top bar (teal masthead)
   -------------------------------------------------------------------------- */
.topbar {
  background: linear-gradient(180deg, var(--teal-800) 0%, var(--teal-900) 100%);
  color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, var(--shadow-sm);
}
.topbar-inner {
  max-width: var(--content-w); margin: 0 auto; padding: 0 32px; min-height: 72px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex-shrink: 0; }
.logo {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff;
}
.logo .ui-icon { width: 24px; height: 24px; }
.brand-txt strong { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.4px; line-height: 1.1; }
.brand-txt small { display: block; margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; color: var(--teal-200); }
.header-region { border-left: 1px solid rgba(255,255,255,.18); padding-left: 24px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.header-region span { display: block; font-size: 11.5px; font-weight: 400; color: var(--teal-200); }

.auth-box { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.auth-state {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
  font-size: 12px; font-weight: 500; color: #fff; white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #f2c14e; box-shadow: 0 0 0 3px rgba(242,193,78,.25); }
.auth-state.self .dot { background: #7be0c3; box-shadow: 0 0 0 3px rgba(123,224,195,.25); }
.topbar .btn.primary { background: #fff; color: var(--teal-900); border-color: #fff; }
.topbar .btn.primary:hover { background: var(--teal-50); }
.topbar .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.topbar .btn.ghost:hover { background: rgba(255,255,255,.10); }

/* --------------------------------------------------------------------------
   Page layout
   -------------------------------------------------------------------------- */
.wrap { max-width: var(--content-w); margin: 0 auto; padding: 36px 32px 0; outline: none; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; font-weight: 700; color: var(--teal-700); margin-bottom: 8px; }
h1 { font-size: 30px; letter-spacing: -.8px; font-weight: 700; color: var(--ink); }
.page-heading p:last-child { color: var(--muted); margin-top: 8px; font-size: 15px; }
.page-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: 12px; color: var(--muted); box-shadow: var(--shadow-xs); white-space: nowrap;
}
.page-badge .ui-icon { width: 18px; height: 18px; color: var(--teal-600); }
.page-badge strong { color: var(--ink); font-weight: 600; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.search-column { min-width: 0; }

/* --------------------------------------------------------------------------
   Panels & forms
   -------------------------------------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-heading { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.heading-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-100); color: var(--teal-800); flex-shrink: 0; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.panel-heading p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.step-badge {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--teal-800);
  background: var(--teal-100); padding: 6px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.form-body { padding: 22px 24px 26px; }
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-label > span {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 700;
  color: #fff; background: var(--teal-700);
}
.section-label h3 { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.record-label { margin-top: 24px; padding-top: 22px; border-top: 1px dashed var(--line); }

.loc-row, .svc-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; flex: 1 1 160px; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
select, input:not([type="range"]) {
  width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-sm); color: var(--ink); font-size: 14px; font-weight: 400; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s, background .15s; box-shadow: var(--shadow-xs);
}
select { padding-right: 36px; cursor: pointer; }
select:disabled { background: var(--surface-2); color: var(--muted-2); cursor: not-allowed; box-shadow: none; }
input::placeholder { color: var(--muted-2); }
input:hover:not(:disabled), select:hover:not(:disabled) { border-color: #b9cbc4; }
input:focus, select:focus { border-color: var(--teal-600); box-shadow: var(--ring); outline: none; }

.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 24px; background: var(--surface-2); border-top: 1px solid var(--line-2); }
.action-note { margin-left: auto; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.action-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal-500); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal-700); color: #fff; border-color: var(--teal-700); box-shadow: 0 1px 2px rgba(14,61,52,.2); }
.btn.primary:hover { background: var(--teal-800); border-color: var(--teal-800); }
.btn.ghost, .btn.gold { background: var(--surface); border-color: var(--line); color: var(--teal-800); box-shadow: var(--shadow-xs); }
.btn.ghost:hover, .btn.gold:hover { background: var(--teal-50); border-color: var(--teal-300); }
.btn.gold { color: var(--gold-600); }
.btn.gold:hover { background: var(--gold-100); border-color: #e7c990; }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.btn.icon { width: 44px; padding: 0; font-size: 20px; }
.btn .ui-icon { width: 18px; height: 18px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading .ui-icon { visibility: hidden; }
.btn.loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn.ghost.loading::after, .btn.gold.loading::after { border-color: rgba(31,122,106,.25); border-top-color: var(--teal-700); }

/* --------------------------------------------------------------------------
   Guide column
   -------------------------------------------------------------------------- */
.guide-card {
  position: relative; overflow: hidden; padding: 24px 22px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--teal-900), var(--teal-700)); color: #fff; box-shadow: var(--shadow-md);
}
.guide-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.14), transparent 70%); pointer-events: none;
}
.guide-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; color: var(--teal-200); }
.guide-card h2 { font-size: 20px; margin-top: 10px; letter-spacing: -.4px; color: #fff; }
.guide-card > p { font-size: 13px; color: rgba(255,255,255,.82); line-height: 1.65; margin: 8px 0 20px; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.guide-steps li { display: flex; gap: 12px; }
.guide-steps li > span {
  display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); font-size: 12px; font-weight: 700;
}
.guide-steps strong { display: block; font-size: 13px; font-weight: 600; }
.guide-steps p { font-size: 12.5px; color: rgba(255,255,255,.78); line-height: 1.6; margin-top: 3px; }

.source-note { display: flex; gap: 12px; padding: 18px; margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.source-note > .ui-icon { width: 20px; height: 20px; color: var(--teal-600); margin-top: 1px; }
.source-note h3 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.source-note p { font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */
.result { margin-top: 20px; }
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 190px;
  border: 1.5px dashed var(--line); border-radius: var(--r-lg); text-align: center; padding: 28px; background: var(--surface-2);
}
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--teal-100); color: var(--teal-700); margin-bottom: 14px; }
.empty-state h2 { font-size: 14.5px; font-weight: 600; }
.empty-state p { font-size: 13px; color: var(--muted); margin-top: 6px; max-width: 340px; }

.rec-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rec-meta .rec-title { font-size: 14px; font-weight: 600; margin-right: auto; display: inline-flex; align-items: center; gap: 8px; }
.rec-meta .rec-title .ui-icon { width: 18px; height: 18px; color: var(--teal-700); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill); background: var(--teal-100); color: var(--teal-900); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.chip.live { background: var(--teal-100); color: var(--teal-900); }
.chip.self { background: var(--blue-100); color: var(--blue-700); }
.chip.pool { background: var(--gold-100); color: var(--gold-600); }
.chip.cache { background: var(--violet-100); color: var(--violet-700); }

.rec-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; overflow-x: auto; box-shadow: var(--shadow-sm); animation: reveal .45s var(--ease) both; }
.rec-card table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; margin: 8px 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.rec-card table + br { display: none; }
.rec-card th, .rec-card td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.rec-card th:last-child, .rec-card td:last-child { border-right: 0; }
.rec-card tr:last-child td { border-bottom: 0; }
.rec-card th { background: var(--teal-800); color: #fff; font-weight: 600; font-size: 12.5px; letter-spacing: .2px; border-color: rgba(255,255,255,.12); }
.rec-card tbody tr:nth-child(even) td { background: var(--surface-2); }
.rec-card tbody tr:hover td { background: var(--teal-50); }
.rec-card p, .rec-card div:not([class]) { padding: 8px 12px; color: var(--muted); font-size: 12.5px; }

.err, .record-error {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; color: var(--red-600);
  background: #fff7f6; border: 1px solid #f5c6c2; border-radius: var(--r-md); font-weight: 500; animation: reveal .35s var(--ease) both;
}
.err::before { content: "!"; flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red-100); font-weight: 700; font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.55; }

/* skeleton */
.skeleton { display: grid; gap: 12px; padding: 18px; }
.skeleton .row { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #edf3f0 25%, #dfe9e4 37%, #edf3f0 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.skeleton .row.w1 { width: 35%; } .skeleton .row.w2 { width: 85%; } .skeleton .row.w3 { width: 60%; } .skeleton .row.big { height: 140px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* --------------------------------------------------------------------------
   Mouza map
   -------------------------------------------------------------------------- */
.map-loader { flex: 1 1 100%; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.map-loader-hint { font-size: 12.5px; color: var(--muted); }
.map-view { flex: 1 1 100%; min-width: 0; }
.map-empty {
  display: grid; place-items: center; text-align: center; gap: 8px; padding: 44px 20px; color: var(--muted);
  border: 1.5px dashed var(--line); border-radius: var(--r-lg); background: var(--surface-2);
}
.map-empty .big { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--teal-100); color: var(--teal-700); }
.map-empty .big svg { width: 24px; height: 24px; }
.map-empty p { font-size: 13px; max-width: 360px; }

.map-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.map-sheet { flex: 0 1 190px; min-width: 150px; }
.map-sheet select, .map-search input { min-height: 42px; border-radius: var(--r-pill); }
.map-sheet select { padding-left: 16px; font-weight: 600; color: var(--teal-800); }
.map-search { flex: 1 1 240px; display: flex; align-items: center; position: relative; min-width: 0; }
.map-search .ui-icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted-2); pointer-events: none; }
.map-search input { padding-left: 40px; padding-right: 76px; }
.map-search .btn { position: absolute; right: 4px; min-height: 34px; padding: 6px 14px; border-radius: var(--r-pill); font-size: 12.5px; }
.map-tools { display: flex; gap: 8px; margin-left: auto; }
.map-tools .btn { border-radius: var(--r-pill); }
.map-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; display: flex; gap: 6px; align-items: center; }

.map-stage {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: #e9f1ee;
  background-image: linear-gradient(rgba(31,122,106,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(31,122,106,.06) 1px, transparent 1px);
  background-size: 40px 40px; box-shadow: var(--shadow-sm); overflow: hidden; touch-action: none;
  height: min(68vh, 680px); min-height: 360px;
}
.map-stage svg { width: 100%; height: 100%; display: block; cursor: grab; }
.map-stage svg:active { cursor: grabbing; }
.plot { fill: #eef5f2; stroke: #2b8a76; stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .15s; }
.plot:hover { fill: #cfe8df; }
.plot.hit { fill: #f6d36b; stroke: #a56b00; stroke-width: 2.2; }
.plot.sel { fill: #bfe0d5; }
.plot-label { fill: #1b3630; font-family: var(--font); font-weight: 600; pointer-events: none; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: rgba(238,245,242,.85); stroke-width: .25em; stroke-linejoin: round; }

.map-tooltip {
  position: absolute; pointer-events: none; background: var(--teal-950); color: #fff; font-size: 12.5px; font-weight: 500;
  padding: 7px 11px; border-radius: 8px; transform: translate(-50%, -140%); white-space: nowrap; opacity: 0;
  transition: opacity .12s; box-shadow: var(--shadow-md); z-index: 3;
}
.map-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; z-index: 2; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.map-zoom button { width: 44px; height: 44px; border: 0; border-bottom: 1px solid var(--line-2); background: #fff; font-size: 22px; font-weight: 500; color: var(--ink); display: grid; place-items: center; transition: background .12s; }
.map-zoom button:last-child { border-bottom: 0; }
.map-zoom button:hover { background: var(--teal-50); color: var(--teal-800); }
.map-zoom button .ui-icon { width: 18px; height: 18px; }

.map-labelsize {
  position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
}
.map-labelsize .tt { font-size: 13px; font-weight: 800; color: var(--ink); letter-spacing: -1px; }
.map-labelsize .auto { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.map-labelsize input[type="range"] {
  writing-mode: vertical-lr; direction: rtl; width: 28px; height: 120px; margin: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none; background: transparent;
}
.map-labelsize input[type="range"]::-webkit-slider-runnable-track { width: 6px; background: var(--line); border-radius: 3px; }
.map-labelsize input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--teal-700); border: 2px solid #fff; box-shadow: var(--shadow-sm); margin-left: -6px; }
.map-labelsize input[type="range"]::-moz-range-track { width: 6px; background: var(--line); border-radius: 3px; }
.map-labelsize input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--teal-700); border: 2px solid #fff; }

.map-info {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; min-width: 200px; max-width: calc(100% - 90px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 12px 14px;
  animation: reveal .25s var(--ease) both;
}
.map-info strong { display: block; font-size: 15px; color: var(--teal-900); }
.map-info small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.map-info .row { display: flex; gap: 8px; margin-top: 10px; }
.map-info .btn { min-height: 34px; padding: 6px 12px; font-size: 12.5px; flex: 1; }
.map-info .close { position: absolute; top: 4px; right: 6px; width: 28px; height: 28px; border: 0; background: none; color: var(--muted-2); font-size: 18px; }
.map-info .close:hover { color: var(--ink); }

.map-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.leg { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; text-transform: capitalize; }
.leg .sw { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.map-progress { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.map-progress .bar { width: 90px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.map-progress .bar i { display: block; height: 100%; background: var(--teal-500); width: 0; transition: width .3s var(--ease); }
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--teal-800); cursor: pointer; user-select: none; position: relative; }
.switch input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; padding: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: #cdd8d2; position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--teal-600); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--teal-500); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Quick links & footer
   -------------------------------------------------------------------------- */
.quick-section { margin-top: 36px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-heading h2 { font-size: 16px; }
.section-heading > span { font-size: 12.5px; color: var(--muted); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: left; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.quick-card:hover { border-color: var(--teal-300); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.quick-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--teal-100); color: var(--teal-800); flex-shrink: 0; }
.quick-card strong { display: block; font-size: 13.5px; font-weight: 600; }
.quick-card small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.quick-card > .ui-icon { margin-left: auto; width: 18px; color: var(--muted-2); transition: transform .15s, color .15s; }
.quick-card:hover > .ui-icon { transform: translateX(3px); color: var(--teal-700); }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 28px; font-size: 12px; color: var(--muted); }
.footer-separator { margin: 0 8px; color: var(--muted-2); }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(14,61,52,.55); backdrop-filter: blur(4px); animation: fade .2s var(--ease); }
.modal.hidden { display: none; }
.modal-card { position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; background: #fff; border-radius: var(--r-lg); padding: 28px 28px 24px; box-shadow: var(--shadow-lg); animation: modalIn .3s var(--ease) both; }
.modal-card h2 { font-size: 20px; letter-spacing: -.4px; color: var(--ink); margin: 6px 40px 8px 0; }
.modal-card .hint { margin-bottom: 20px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 24px; line-height: 1; color: var(--muted-2); transition: background .15s, color .15s; }
.modal-x:hover { background: var(--teal-50); color: var(--ink); }
.login-step { display: flex; flex-direction: column; gap: 14px; }
.login-step .field { flex: 0 0 auto; }
.login-step .btn { margin-top: 4px; }
.captcha-row { display: flex; align-items: stretch; gap: 10px; }
.captcha-img { flex: 1; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; min-height: 56px; max-height: 72px; }
.captcha-img img { max-width: 100%; max-height: 64px; object-fit: contain; }
.captcha-img img:not([src]), .captcha-img img[src=""] { display: none; }
.li-msg { font-size: 13px; color: var(--muted); min-height: 18px; margin-top: 12px; }
.li-msg.error { color: var(--red-600); }
.li-msg.ok { color: var(--teal-800); }

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 24px); z-index: 60; opacity: 0; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .t { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; }
.toast .t.error { background: var(--red-600); }
.toast .t.ok { background: var(--teal-700); }

/* --------------------------------------------------------------------------
   Animation
   -------------------------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.card-in { animation: reveal .4s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
  .step-badge, .action-note { display: none; }
  .quick-card > .ui-icon { display: none; }
}
@media (max-width: 860px) {
  .header-region { display: none; }
  .workspace-grid { grid-template-columns: 1fr; }
  .guide-column { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
  .source-note { margin-top: 0; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 0 16px; min-height: 64px; gap: 12px; }
  .logo { width: 38px; height: 38px; }
  .brand-txt strong { font-size: 17px; }
  .brand-txt small { font-size: 9px; letter-spacing: 1.1px; }
  .auth-state { padding: 5px 9px; font-size: 11px; }
  .topbar .btn { padding: 8px 12px; min-height: 38px; font-size: 13px; }
  .tabs { padding: 0 8px; }
  .tabs button { min-height: 50px; padding: 0 12px; font-size: 12.5px; }
  .wrap { padding: 24px 16px 0; }
  h1 { font-size: 25px; }
  .page-heading p:last-child { font-size: 14px; }
  .page-badge { display: none; }
  .panel-heading { padding: 18px 16px; gap: 12px; }
  .heading-icon { width: 36px; height: 36px; }
  .form-body { padding: 18px 16px 22px; }
  .field { flex: 1 1 100%; }
  input:not([type="range"]), select { font-size: 16px; }
  .actions { padding: 14px 16px; }
  .actions .btn { flex: 1; }
  .guide-column { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .rec-card th, .rec-card td { padding: 10px 12px; font-size: 13px; }
  .map-stage { height: 70vh; min-height: 420px; border-radius: var(--r-md); }
  .map-tools { margin-left: 0; width: 100%; }
  .map-tools .btn { flex: 1; }
  .map-sheet { flex: 1 1 100%; }
  .map-labelsize input[type="range"] { height: 96px; }
  .modal-card { padding: 24px 20px 20px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 28px; }
}

/* --------------------------------------------------------------------------
   Mobile app shell: bottom navigation + services sheet
   -------------------------------------------------------------------------- */
.bottom-nav { display: none; }
.sheet { position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; background: rgba(14,61,52,.5); backdrop-filter: blur(3px); animation: fade .2s var(--ease); }
.sheet.hidden { display: none; }
.sheet-card {
  width: 100%; max-height: 82vh; overflow: auto; background: #fff; border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: sheetIn .3s var(--ease) both;
}
.sheet-grip { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 14px; }
.sheet-card h2 { font-size: 16px; margin-bottom: 10px; }
.sheet-list { display: grid; gap: 4px; }
.sheet-list button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 10px; border: 0; border-radius: 12px;
  background: none; text-align: left; color: var(--ink); transition: background .12s;
}
.sheet-list button:hover, .sheet-list button:active { background: var(--teal-50); }
.sheet-list button.active { background: var(--teal-100); }
.sheet-list .ui-icon { width: 22px; height: 22px; color: var(--teal-700); }
.sheet-list strong { display: block; font-size: 14px; font-weight: 600; }
.sheet-list small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 600px) {
  body { background: var(--bg); padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .topbar { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); box-shadow: var(--shadow-md); }
  .topbar-inner { min-height: 60px; }
  .brand-txt small { display: none; }
  .brand-txt strong { font-size: 18px; }
  .auth-state { display: none; }
  .topbar .btn.primary { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.28); border-radius: var(--r-pill); }
  .topbar .btn.primary:hover { background: rgba(255,255,255,.22); }
  .topbar .btn .ui-icon { width: 18px; height: 18px; }
  .navigation-bar { display: none; }

  .wrap { padding: 18px 16px 0; }
  .eyebrow { display: none; }
  .page-heading { margin-bottom: 14px; gap: 6px; }
  h1 { font-size: 22px; letter-spacing: -.5px; }
  .page-heading p:last-child { font-size: 13.5px; margin-top: 4px; }

  .panel { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
  .panel-heading { display: none; }
  .form-body { padding: 18px 16px 20px; }
  .section-label { margin-bottom: 12px; }
  .record-label { margin-top: 20px; padding-top: 18px; }
  .loc-row, .svc-fields { gap: 14px; }
  .actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .actions .btn { width: 100%; min-height: 48px; font-size: 15px; border-radius: var(--r-md); }
  .result { margin-top: 16px; }
  .empty-state { min-height: 150px; padding: 22px; }
  .rec-card { padding: 4px; }
  .rec-meta { gap: 6px; }
  .rec-meta .rec-title { flex: 1 1 100%; }

  .guide-column .guide-card { display: none; }
  .source-note { margin-top: 20px; }
  .foot { margin-top: 20px; padding: 16px 0 20px; font-size: 11.5px; }

  .map-loader .btn { width: 100%; min-height: 46px; }
  .map-toolbar { gap: 8px; }
  .map-search { flex: 1 1 100%; }
  .map-tools { gap: 8px; }
  .map-stage { height: calc(100vh - 300px); min-height: 440px; }
  .map-hint { font-size: 12px; }

  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(14,61,52,.06);
  }
  .bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px;
    border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 12px; transition: color .15s, background .15s;
  }
  .bottom-nav button .ui-icon { width: 24px; height: 24px; padding: 3px 0; border-radius: 12px; transition: background .15s; }
  .bottom-nav button.active { color: var(--teal-800); }
  .bottom-nav button.active .ui-icon { background: var(--teal-100); width: 52px; padding: 3px 14px; box-sizing: content-box; height: 18px; }
  .bottom-nav button:active { background: var(--teal-50); }

  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: sheetIn .3s var(--ease) both; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (display-mode: standalone) and (max-width: 600px) {
  .topbar-inner { min-height: 56px; }
}

/* --------------------------------------------------------------------------
   Fullscreen map mode
   -------------------------------------------------------------------------- */
.map-view.fullscreen {
  position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg); padding: calc(10px + env(safe-area-inset-top)) 12px calc(10px + env(safe-area-inset-bottom));
}
.map-view.fullscreen .map-toolbar { margin: 0; }
.map-view.fullscreen .map-stage { flex: 1; height: auto; min-height: 0; border-radius: var(--r-md); }
.map-view.fullscreen .map-hint { display: none; }
body.map-fullscreen .bottom-nav, body.map-fullscreen .navigation-bar { display: none; }
body.map-fullscreen .panel { animation: none; transform: none; }
@media (max-width: 600px) {
  .map-view.fullscreen { padding-left: 8px; padding-right: 8px; }
  .map-view.fullscreen .map-sheet { flex: 0 1 46%; }
  .map-view.fullscreen .map-search { flex: 1 1 50%; }
  .map-view.fullscreen .map-tools { display: none; }
}

/* ==========================================================================
   App shell v7: sticky header with primary nav, "All services" mega menu,
   home screen (hero + service catalog), breadcrumbs, related services.
   ========================================================================== */

/* ---- Header nav ---- */
.topbar { position: sticky; top: 0; z-index: 30; transition: box-shadow .25s var(--ease); }
.topbar.scrolled { box-shadow: 0 6px 24px rgba(14,61,52,.22); }
.top-nav { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.top-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-pill);
  background: none; color: rgba(255,255,255,.82); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.top-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.top-link.active, .top-link[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; }
.top-link .ui-icon { width: 18px; height: 18px; }
.top-link .chev { width: 16px; height: 16px; margin-left: -2px; transition: transform .2s var(--ease); }
#services-btn[aria-expanded="true"] { background: #fff; color: var(--teal-900); }
#services-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ---- Mega menu (desktop) ---- */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 25; background: var(--surface); color: var(--ink);
  border-bottom: 1px solid var(--line); box-shadow: 0 28px 56px rgba(14,61,52,.2); animation: menuIn .22s var(--ease) both;
  max-height: calc(100vh - 80px); overflow: auto;
}
.mega.hidden { display: none; }
.mega-inner { max-width: var(--content-w); margin: 0 auto; padding: 22px 32px 26px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.mega-col h3 { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal-700); font-weight: 700; margin: 0 0 8px 10px; }
.mega-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--ink); transition: background .12s; }
.mega-item:hover, .mega-item.active { background: var(--teal-50); }
.mega-item .svc-icon { width: 34px; height: 34px; border-radius: 9px; }
.mega-item .svc-icon .ui-icon { width: 18px; height: 18px; }
.mega-item strong { display: block; font-size: 13px; font-weight: 600; }
.mega-item small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.mega-item > .ui-icon:last-child { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
body.menu-open::before { content: ""; position: fixed; inset: 0; z-index: 24; background: rgba(14,61,52,.28); backdrop-filter: blur(2px); animation: fade .2s; }

/* ---- Shared service tile pieces ---- */
.svc-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--teal-100); color: var(--teal-800);
  flex-shrink: 0; transition: background .2s, color .2s, transform .25s var(--ease);
}
.svc-icon .ui-icon { width: 22px; height: 22px; }
.svc-text { min-width: 0; }

/* ---- View transitions ---- */
.view-in { animation: viewIn .38s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(160deg, var(--teal-950) 0%, var(--teal-900) 42%, var(--teal-700) 100%); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: drift 18s ease-in-out infinite alternate; will-change: transform; }
.blob.b1 { width: 560px; height: 560px; left: -160px; top: -240px; background: #3aa48f; }
.blob.b2 { width: 460px; height: 460px; right: -140px; top: -120px; background: #2b8fd6; opacity: .3; animation-duration: 24s; animation-delay: -7s; }
.blob.b3 { width: 420px; height: 420px; right: 22%; bottom: -260px; background: #f2c14e; opacity: .22; animation-duration: 28s; animation-delay: -13s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(70px, 50px) scale(1.15); } }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 25%, #000 15%, transparent 70%); mask-image: radial-gradient(ellipse at 30% 25%, #000 15%, transparent 70%);
}
.hero-inner {
  position: relative; max-width: var(--content-w); margin: 0 auto; padding: 68px 32px 64px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--teal-100);
  animation: rise .6s var(--ease) both;
}
.hero-kicker .ui-icon { width: 16px; height: 16px; color: #f2c14e; }
.hero-title { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -1.8px; font-weight: 800; margin-top: 22px; color: #fff; animation: rise .6s .08s var(--ease) both; }
.hero-title em { font-style: normal; background: linear-gradient(90deg, #a8f0d8 0%, #f2e394 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(15px, 1.4vw, 17px); line-height: 1.65; color: rgba(255,255,255,.8); max-width: 540px; margin-top: 18px; animation: rise .6s .16s var(--ease) both; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; animation: rise .6s .24s var(--ease) both; }
.btn.hero-primary { background: #fff; color: var(--teal-900); border-color: #fff; min-height: 50px; padding: 12px 24px; font-size: 15px; border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.22); transition: transform .2s var(--ease), box-shadow .2s, background .15s; }
.btn.hero-primary:hover { background: var(--teal-50); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.28); }
.btn.hero-secondary { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.32); min-height: 50px; padding: 12px 22px; font-size: 15px; border-radius: 14px; backdrop-filter: blur(6px); transition: background .15s, transform .2s var(--ease); }
.btn.hero-secondary:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
.hero-stats { list-style: none; margin: 36px 0 0; padding: 0; display: flex; gap: 10px 32px; flex-wrap: wrap; animation: rise .6s .32s var(--ease) both; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 24px; font-weight: 800; letter-spacing: -.6px; line-height: 1.1; }
.hero-stats span { font-size: 11.5px; color: rgba(255,255,255,.62); text-transform: uppercase; letter-spacing: .9px; font-weight: 600; margin-top: 2px; }

/* hero artwork: floating map card */
.hero-art { position: relative; min-height: 340px; animation: rise .7s .2s var(--ease) both; }
.art-card {
  position: relative; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 22px; padding: 14px;
  backdrop-filter: blur(12px); box-shadow: 0 34px 90px rgba(0,0,0,.32); animation: floatCard 8s ease-in-out infinite;
}
@keyframes floatCard {
  0%, 100% { transform: perspective(1200px) rotateY(-9deg) rotateX(4deg) translateY(0); }
  50% { transform: perspective(1200px) rotateY(-9deg) rotateX(4deg) translateY(-12px); }
}
.art-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.art-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); }
.art-title { margin-left: 8px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75); }
.art-map { width: 100%; height: auto; display: block; border-radius: 12px; background: rgba(255,255,255,.05); }
.art-map .plots polygon {
  fill: rgba(255,255,255,.06); stroke: #a8f0d8; stroke-width: 1.6; stroke-linejoin: round;
  stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.5s var(--ease) forwards, fillIn .6s 1.5s ease forwards;
}
.art-map .plots polygon:nth-child(2) { animation-delay: .1s, 1.6s; }
.art-map .plots polygon:nth-child(3) { animation-delay: .2s, 1.7s; }
.art-map .plots polygon:nth-child(4) { animation-delay: .3s, 1.8s; }
.art-map .plots polygon:nth-child(6) { animation-delay: .5s, 2s; }
.art-map .plots polygon:nth-child(7) { animation-delay: .6s, 2.1s; }
.art-map .plots polygon:nth-child(8) { animation-delay: .7s, 2.2s; }
.art-map .plots polygon:nth-child(9) { animation-delay: .8s, 2.3s; }
.art-map .plots polygon:nth-child(5) { animation: draw 1.5s .4s var(--ease) forwards, fillHit .7s 2.2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillIn { to { fill: rgba(255,255,255,.12); } }
@keyframes fillHit { to { fill: rgba(242,193,78,.55); } }
.art-map .plot-nos text { fill: #fff; font: 600 12px var(--font); text-anchor: middle; opacity: 0; animation: fade .5s 1.9s forwards; }
.art-pin circle { fill: #f2c14e; }
.art-pin .pulse { fill: rgba(242,193,78,.28); transform-origin: 172px 104px; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.art-foot { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.art-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-pill); background: rgba(255,255,255,.12); font-size: 12px; font-weight: 600; }
.art-chip i { width: 8px; height: 8px; border-radius: 50%; background: #f2c14e; }
.art-chip.ok { background: rgba(123,224,195,.2); color: #a8f0d8; }
.art-float {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: #fff; color: var(--teal-900);
  font-size: 12.5px; font-weight: 600; box-shadow: 0 18px 44px rgba(0,0,0,.28); animation: floatY 6s ease-in-out infinite;
}
.art-float .ui-icon { width: 18px; height: 18px; color: var(--teal-700); }
.art-float.f1 { left: -28px; top: 62%; animation-delay: -2s; }
.art-float.f2 { right: -18px; bottom: 12%; animation-delay: -4s; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---- Home body ---- */
.home-body { padding-bottom: 8px; }
.home-section { margin-top: 44px; }
.home-section:first-child { margin-top: 36px; }
.services-heading { align-items: center; flex-wrap: wrap; gap: 14px; }
.services-heading > div span { display: block; margin-top: 4px; }
.svc-filter { position: relative; display: flex; align-items: center; flex: 0 1 320px; min-width: 200px; margin-left: auto; }
.svc-filter .ui-icon { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted-2); pointer-events: none; }
.svc-filter input { padding-left: 40px; border-radius: var(--r-pill); min-height: 42px; }
.filter-empty { color: var(--muted); padding: 24px 0; }
.svc-group { margin-top: 26px; }
.group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.group-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.group-head p { font-size: 12.5px; color: var(--muted); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.svc-card {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); overflow: hidden;
  transition: border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease), opacity .5s var(--ease);
}
.svc-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--teal-50), transparent 60%); opacity: 0; transition: opacity .25s; }
.svc-card > * { position: relative; }
.svc-card:hover { border-color: var(--teal-300); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.svc-card:hover::before { opacity: 1; }
.svc-card:hover .svc-icon { background: var(--teal-700); color: #fff; transform: scale(1.06) rotate(-4deg); }
.svc-card strong { display: block; font-size: 14px; font-weight: 600; }
.svc-card small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.svc-card > .ui-icon:last-child { margin-left: auto; width: 18px; color: var(--muted-2); transition: transform .2s, color .2s; }
.svc-card:hover > .ui-icon:last-child { transform: translateX(3px); color: var(--teal-700); }
.svc-card.active { border-color: var(--teal-600); }
/* staggered reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal .svc-card { opacity: 0; transform: translateY(12px); transition-delay: calc(var(--i, 0) * 55ms); }
.reveal.in .svc-card { opacity: 1; transform: none; }
.reveal.in .svc-card:hover { transform: translateY(-3px); }
.reveal.done .svc-card { transition-delay: 0s; }

.recent-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.recent-row::-webkit-scrollbar { display: none; }
.recent-chip {
  display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; padding: 7px 16px 7px 8px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 13px; box-shadow: var(--shadow-xs); animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms);
  transition: border-color .15s, box-shadow .15s;
}
.recent-chip:hover { border-color: var(--teal-300); box-shadow: var(--shadow-sm); }
.recent-chip .svc-icon { width: 30px; height: 30px; border-radius: 50%; }
.recent-chip .svc-icon .ui-icon { width: 16px; height: 16px; }
.recent-chip strong { font-weight: 600; white-space: nowrap; }
.recent-chip small, .recent-chip > .ui-icon:last-child { display: none; }

.steps-section { margin-bottom: 8px; }
.steps-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps-strip li { display: flex; gap: 14px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.step-no { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(160deg, var(--teal-700), var(--teal-500)); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 6px 16px rgba(31,122,106,.3); }
.steps-strip strong { display: block; font-size: 14px; font-weight: 600; }
.steps-strip p { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.55; }

/* ---- Service view extras ---- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--teal-700); text-decoration: none; font-weight: 600; padding: 4px 10px 4px 6px; margin-left: -6px; border-radius: var(--r-pill); transition: background .15s; }
.crumbs a:hover { background: var(--teal-50); }
.crumbs .ui-icon { width: 16px; height: 16px; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--teal-700); text-decoration: none; }
.see-all .ui-icon { width: 16px; height: 16px; transition: transform .15s; }
.see-all:hover .ui-icon { transform: translateX(3px); }
.quick-card .svc-icon { width: 42px; height: 42px; border-radius: 10px; }
.quick-card:hover .svc-icon { background: var(--teal-700); color: #fff; }
.foot-wrap { padding-top: 0; }

/* ---- Mobile sheet groups ---- */
.sheet-group { margin-bottom: 6px; }
.sheet-group h3 { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--teal-700); margin: 12px 10px 6px; }
.sheet-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: none; text-align: left; color: var(--ink); transition: background .12s; }
.sheet-item:hover, .sheet-item:active { background: var(--teal-50); }
.sheet-item.active { background: var(--teal-100); }
.sheet-item .svc-icon { width: 38px; height: 38px; border-radius: 10px; }
.sheet-item .svc-icon .ui-icon { width: 19px; height: 19px; }
.sheet-item strong { display: block; font-size: 14px; font-weight: 600; }
.sheet-item small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.sheet-item > .ui-icon:last-child { margin-left: auto; width: 16px; color: var(--muted-2); }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .mega-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .top-link span { display: none; }
  .top-link .chev { display: none; }
  .top-link { padding: 0 11px; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 32px 44px; }
  .hero-art { display: none; }
}
@media (max-width: 860px) {
  .top-nav, .mega { display: none; }
  .steps-strip { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-inner { padding: 34px 16px 30px; }
  .hero-title { font-size: 31px; letter-spacing: -1px; margin-top: 16px; }
  .hero-sub { font-size: 14.5px; margin-top: 12px; }
  .hero-actions { margin-top: 22px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; min-height: 48px; }
  .hero-stats { margin-top: 26px; gap: 6px 20px; }
  .hero-stats strong { font-size: 19px; }
  .home-section, .home-section:first-child { margin-top: 28px; }
  .svc-group { margin-top: 20px; }
  .svc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .svc-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 14px; }
  .svc-card > .ui-icon:last-child { display: none; }
  .svc-card strong { font-size: 13.5px; }
  .svc-card small { font-size: 11.5px; }
  .services-heading .svc-filter { flex: 1 1 100%; margin-left: 0; }
  .quick-section { display: block; margin-top: 28px; }
  .quick-grid { grid-template-columns: 1fr; }
  .crumbs { margin-bottom: 8px; }
}

/* --------------------------------------------------------------------------
   Per-account search history (shown between the form and the results)
   -------------------------------------------------------------------------- */
.history { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); overflow: hidden; animation: reveal .35s var(--ease) both; }
.history.hint-only { background: var(--surface-2); box-shadow: none; border-style: dashed; }
.history-hint { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.history-hint > .ui-icon { width: 20px; height: 20px; color: var(--teal-600); flex-shrink: 0; }
.history-hint .btn { margin-left: auto; flex-shrink: 0; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.history-head h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.history-head h2 .ui-icon { width: 18px; height: 18px; color: var(--teal-700); }
.history-head .count { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: var(--teal-100); color: var(--teal-900); }
.history-list { display: grid; max-height: 320px; overflow: auto; }
.history-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-2); animation: rise .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); transition: opacity .2s; }
.history-row:last-child { border-bottom: 0; }
.history-row.removing { opacity: .35; pointer-events: none; }
.history-open { flex: 1; display: flex; align-items: center; gap: 12px; padding: 11px 18px; border: 0; background: none; text-align: left; color: var(--ink); min-width: 0; transition: background .12s; }
.history-open:hover { background: var(--teal-50); }
.history-txt { min-width: 0; flex: 1; }
.history-txt strong { display: block; font-size: 13.5px; font-weight: 600; }
.history-txt small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-cta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--teal-700); white-space: nowrap; }
.history-cta .ui-icon { width: 16px; height: 16px; transition: transform .15s; }
.history-open:hover .history-cta .ui-icon { transform: translateX(3px); }
.history-del { width: 44px; flex-shrink: 0; border: 0; border-left: 1px solid var(--line-2); background: none; color: var(--muted-2); display: grid; place-items: center; transition: background .12s, color .12s; }
.history-del .ui-icon { width: 16px; height: 16px; }
.history-del:hover { background: #fff7f6; color: var(--red-600); }
@media (max-width: 600px) {
  .history-cta > span { display: none; }
  .history-head, .history-open, .history-hint { padding-left: 14px; padding-right: 14px; }
  .history-hint { flex-wrap: wrap; }
  .history-hint .btn { margin-left: 32px; }
}

/* --------------------------------------------------------------------------
   Mouza map: "mark my plots" (yellow highlight, carried into the PDF)
   -------------------------------------------------------------------------- */
.plot.mine { fill: #ffd633 !important; stroke: #b87800; stroke-width: 2; }
.plot.mine:hover { fill: #ffc800 !important; }
.plot.mine.sel { fill: #ffbf00 !important; }
.mark-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -2px 0 12px; padding: 8px 8px 8px 12px; background: #fffbea; border: 1px solid #f1dc8f; border-radius: var(--r-md); }
.mark-swatch { width: 16px; height: 16px; border-radius: 4px; background: #ffd633; box-shadow: inset 0 0 0 1.5px #b87800; flex-shrink: 0; display: inline-block; }
.mark-swatch.sm { width: 12px; height: 12px; }
.mark-input { flex: 1 1 220px; min-width: 0; }
.mark-input input { min-height: 38px; border-radius: var(--r-pill); background: #fff; }
.mark-bar .btn { border-radius: var(--r-pill); }
.mark-chips { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.mark-chips:empty { display: none; }
.mark-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; border: 1px solid #e5c55a; border-radius: var(--r-pill); background: #ffd633; color: #4a3500; font-size: 12.5px; font-weight: 700; animation: rise .25s var(--ease) both; }
.mark-chip .ui-icon { width: 13px; height: 13px; opacity: .7; }
.mark-chip:hover .ui-icon { opacity: 1; }
.mark-chip.off { background: #fff; color: var(--muted); border-style: dashed; }
.map-info .row { flex-wrap: wrap; }
:root[data-theme="dark"] .mark-bar { background: #3a3419; border-color: #6b5a1f; }
@media (max-width: 600px) { .mark-bar .btn { flex: 1 1 auto; } }
