/* Tayside Property Centre */
:root {
  --bg: #fbf8f3;
  --paper: #ffffff;
  --soft: #f3eee6;
  --soft-2: #ece5da;
  --ink: #17140f;
  --ink-2: #3a352e;
  --muted: #6f675d;
  --line: #e8e0d4;
  --coral: #ff4a3d;
  --coral-2: #e8372b;
  --coral-soft: #ffe9e5;
  --green: #1f8a5b;
  --amber: #f2a93b;
  --sky: #e6f0f5;
  --night: #16181c;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(23, 20, 15, .06), 0 8px 28px rgba(23, 20, 15, .08);
  --shadow-lg: 0 2px 4px rgba(23, 20, 15, .06), 0 24px 60px rgba(23, 20, 15, .16);
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Bradley Hand', cursive;
  --wrap: 1280px;
  --gutter: clamp(16px, 3vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand { font-family: var(--hand); font-weight: 600; line-height: 1.05; }

/* ---------- preview ribbon ---------- */
.ribbon { background: var(--ink); color: #f6f1e9; font-size: 13.5px; }
.ribbon .wrap { display: flex; gap: 10px; align-items: center; justify-content: center; padding-block: 8px; text-align: center; flex-wrap: wrap; }
.ribbon b { background: var(--coral); color: #fff; border-radius: 99px; padding: 1px 9px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.ribbon a { color: #fff; font-weight: 600; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 900; background: rgba(251, 248, 243, .9); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand svg { width: 46px; height: 40px; }
.brand-word { display: grid; line-height: 1; }
.brand-word strong { font-family: var(--display); font-weight: 400; font-size: 27px; letter-spacing: .04em; }
.brand-word span { font-size: 9.5px; letter-spacing: .32em; font-weight: 700; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 99px; color: var(--ink-2); position: relative; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 2px; border-radius: 2px; background: var(--coral); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 9px 12px; border-radius: 99px; font-weight: 600; font-size: 14.5px; text-decoration: none; color: var(--ink-2); }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 20px; height: 20px; }
.heart-count { min-width: 1ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px; padding: 13px 20px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 6px 18px rgba(255, 74, 61, .32); }
.btn-coral:hover { background: var(--coral-2); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.menu-btn { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; padding: clamp(40px, 6vw, 72px) 0 150px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: #28303a url('/img/hero-dundee.webp') center 38% / cover no-repeat; transform: scale(1.04); }
@media (max-width: 700px) { .hero-bg { background-image: url('/img/hero-dundee-sm.webp'); background-position: 62% 40%; } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 16, 22, .82) 0%, rgba(14, 16, 22, .55) 38%, rgba(14, 16, 22, .08) 70%), linear-gradient(0deg, rgba(14, 16, 22, .55), rgba(14, 16, 22, 0) 45%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; z-index: -1; background: var(--bg); clip-path: polygon(0 62%, 100% 18%, 100% 100%, 0 100%); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(58px, 9.4vw, 128px); line-height: .9; letter-spacing: -.005em; margin: 0; text-transform: uppercase; text-shadow: 0 4px 30px rgba(0, 0, 0, .25); }
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--coral); }
.hero-sub { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; margin: 22px 0 0; max-width: 600px; font-weight: 500; color: #f5f1ea; }
.hero-sub strong { color: #fff; }
.hero-note { position: absolute; right: clamp(16px, 6vw, 90px); top: 40px; font-size: clamp(28px, 3.1vw, 44px); transform: rotate(-9deg); text-align: left; color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.hero-note svg { width: 170px; margin: 2px 0 0 40px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); padding: 6px 12px; border-radius: 99px; margin-bottom: 20px; backdrop-filter: blur(6px); }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 74, 61, .3); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255, 74, 61, 0); } }

/* ---------- the search surface ---------- */
.finder { position: relative; z-index: 5; margin-top: -118px; }
.finder-card { background: var(--paper); border-radius: 28px; box-shadow: var(--shadow-lg); padding: 22px; max-width: 1040px; margin: 0 auto; color: var(--ink); }
.finder-q { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(22px, 2.3vw, 30px); letter-spacing: .01em; margin: 2px 4px 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.finder-q small { font-family: var(--sans); text-transform: none; font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.bigsearch { display: flex; align-items: center; gap: 12px; border: 2px solid var(--ink); border-radius: 18px; padding: 8px 8px 8px 14px; background: var(--paper); transition: box-shadow .2s, border-color .2s; }
.bigsearch:focus-within { box-shadow: 0 0 0 6px rgba(255, 74, 61, .16); border-color: var(--coral); }
.ai-chip { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em; position: relative; }
.ai-chip::after { content: ""; position: absolute; inset: -3px; border-radius: 12px; background: conic-gradient(from 0deg, var(--coral), #ffb36b, #7cc4ff, var(--coral)); z-index: -1; animation: spin 6s linear infinite; }
.ai-chip-wrap { position: relative; isolation: isolate; }
@keyframes spin { to { transform: rotate(1turn); } }
.bigsearch input, .bigsearch textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: clamp(16px, 1.5vw, 19px); padding: 12px 0; font-weight: 500; }
.bigsearch input::placeholder { color: #8f877c; }
.bigsearch .btn { padding: 15px 24px; font-size: 16px; }
.filters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 13px 38px 13px 14px; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.select select:hover { border-color: #cbbfae; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.finder-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.try { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.try button { border: 1px dashed #cdbfae; background: none; border-radius: 99px; padding: 6px 12px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.try button:hover { border-style: solid; border-color: var(--coral); color: var(--coral-2); background: var(--coral-soft); }
.count-line { text-align: center; margin: 18px 0 8px; font-weight: 600; color: var(--ink-2); }
.count-line b { font-variant-numeric: tabular-nums; }
.sources { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 0; margin: 4px auto 0; max-width: 900px; }
.sources span { padding: 4px 18px; font-weight: 800; font-size: clamp(16px, 1.8vw, 22px); letter-spacing: -.02em; color: #9d9489; border-left: 1px solid var(--line); line-height: 1.1; }
.sources span:first-child { border-left: 0; }
.sources span.sm { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.sources-note { text-align: center; font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.side-note { position: absolute; font-size: 28px; color: var(--ink-2); transform: rotate(-12deg); }
.side-note svg { width: 70px; }
.side-note.left { left: clamp(4px, 2vw, 40px); top: 120px; }
@media (max-width: 1380px) { .side-note, .alerts-note { display: none; } }

/* ---------- sections ---------- */
section { position: relative; }
.band { padding: clamp(40px, 5vw, 64px) 0; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.head h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.05; margin: 0; letter-spacing: -.02em; font-weight: 800; }
.head p { margin: 5px 0 0; color: var(--muted); }
.head .more { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14.5px; text-decoration: none; white-space: nowrap; padding: 8px 4px; }
.head .more svg { width: 16px; height: 16px; transition: transform .2s; }
.head .more:hover svg { transform: translateX(3px); }
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .005em; line-height: .95; }

/* ---------- rails ---------- */
.rail-wrap { position: relative; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w, 290px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); padding: 4px var(--gutter) 18px; margin: 0 calc(var(--gutter) * -1); scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail.big { --card-w: clamp(260px, 30vw, 360px); }
.rail.small { --card-w: 200px; gap: 12px; }
.split .rail.big { --card-w: clamp(230px, 22vw, 270px); }
.rail-btn { position: absolute; top: calc(50% - 32px); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 3; transition: opacity .2s, transform .2s; }
.rail-btn:hover { transform: scale(1.08); }
.rail-btn svg { width: 18px; height: 18px; }
.rail-btn.prev { left: -14px; }
.rail-btn.next { right: -14px; }
.rail-btn[hidden] { display: grid; opacity: 0; pointer-events: none; }
[hidden] { display: none !important; }
.rail-btn[hidden] { display: grid !important; }
.rail-empty { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; color: var(--muted); text-align: center; font-weight: 500; }

/* ---------- home card ---------- */
.card { position: relative; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(23, 20, 15, .05); border: 1px solid var(--line); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; cursor: pointer; display: flex; flex-direction: column; text-align: left; padding: 0; width: 100%; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card.hl { box-shadow: 0 0 0 3px var(--coral), var(--shadow-lg); }
.card .pic { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.card .pic svg { width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .pic svg { transform: scale(1.05); }
.card .body { padding: 12px 14px 14px; display: grid; gap: 3px; }
.price { font-weight: 800; font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price .drop { font-size: 12px; font-weight: 700; color: var(--green); background: #e3f4ec; padding: 1px 7px; border-radius: 99px; letter-spacing: 0; }
.meta { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.meta i { font-style: normal; color: #bfb4a6; padding: 0 5px; }
.where { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.chip.warn { background: #fdf0d9; color: #8a5a10; }
.chip.good { background: #e3f4ec; color: #17693f; }
.save { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); z-index: 2; transition: transform .15s; }
.save:hover { transform: scale(1.1); }
.save svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; transition: fill .2s, stroke .2s; }
.save[aria-pressed="true"] svg { fill: var(--coral); stroke: var(--coral); }
.save.pop svg { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { 30% { transform: scale(1.45); } }
.badge { position: absolute; left: 10px; bottom: 10px; background: rgba(255, 255, 255, .95); border-radius: 8px; padding: 3px 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.flag { position: absolute; left: 10px; top: 10px; background: var(--coral); color: #fff; border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.flag.dark { background: var(--ink); }
.flag.amber { background: var(--amber); color: #2a1d06; }
.small .card .body { padding: 9px 11px 11px; }
.small .price { font-size: 16px; }
.small .meta, .small .where { font-size: 12.5px; }
.small .save { width: 32px; height: 32px; top: 8px; right: 8px; }
.small .save svg { width: 16px; height: 16px; }

/* ---------- split: just added + map ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.map-teaser { position: relative; border-radius: 24px; overflow: hidden; min-height: 420px; box-shadow: var(--shadow); background: var(--sky); }
.map-teaser .leaflet-container, .mapbox .leaflet-container { width: 100%; height: 100%; font: inherit; background: #e8eef0; }
.map-tools { position: absolute; left: 14px; top: 14px; z-index: 500; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; }
.map-tools a, .map-tools button { display: flex; gap: 9px; align-items: center; text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 7px 10px; border-radius: 9px; border: 0; background: none; text-align: left; }
.map-tools a:hover, .map-tools button:hover { background: var(--soft); }
.map-tools svg { width: 16px; height: 16px; }
.map-toggle { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; background: var(--paper); padding: 4px; border-radius: 12px; box-shadow: var(--shadow); }
.map-toggle a { white-space: nowrap; padding: 8px 18px; border-radius: 9px; font-weight: 700; font-size: 13.5px; text-decoration: none; }
.map-toggle a.on { background: var(--ink); color: #fff; }
.pin { background: var(--paper); color: var(--ink); border-radius: 99px; padding: 4px 9px; font-weight: 800; font-size: 12.5px; box-shadow: 0 2px 8px rgba(0, 0, 0, .22); white-space: nowrap; transform: translate(-50%, -50%); position: absolute; left: 0; top: 0; border: 1.5px solid transparent; transition: transform .15s, background .15s; font-family: var(--sans); }
.pin:hover, .pin.on { background: var(--ink); color: #fff; transform: translate(-50%, -50%) scale(1.12); z-index: 1000; }
.pin.saved { border-color: var(--coral); }
.pin.saved::before { content: "♥ "; color: var(--coral); }
.drawing .leaflet-marker-icon { pointer-events: none !important; }
.dot.saved { background: var(--ink); border-color: var(--coral); }
.leaflet-marker-icon .dot { position: static; transform: none; cursor: pointer; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--coral); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transform: translate(-50%, -50%); position: absolute; }
.poi { background: var(--ink); color: #fff; font-weight: 700; font-size: 12px; border-radius: 8px; padding: 4px 8px; white-space: nowrap; transform: translate(-50%, -130%); position: absolute; box-shadow: var(--shadow); }
.poi::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.leaflet-div-icon { background: none; border: 0; }
.leaflet-tile-pane { filter: saturate(.45) contrast(.92) brightness(1.04) sepia(.08); }
.leaflet-control-attribution { font-size: 10px; }

/* ---------- compact trio ---------- */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.trio .head h2 { font-size: 22px; }
.trio .rail { margin: 0; padding-inline: 0; scroll-padding: 0; }
.trio .rail-btn.next { right: -12px; }
.trio .rail-btn.prev { left: -12px; }

/* ---------- AI band ---------- */
.ai-band { background: linear-gradient(120deg, #f4efe7 0%, #f7f2ea 50%, #efe7db 100%); border-radius: 28px; padding: clamp(22px, 3.5vw, 40px); position: relative; overflow: hidden; }
.ai-band::before { content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 74, 61, .16), transparent 70%); }
.ai-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; position: relative; }
.ai-mark { width: 54px; height: 54px; border-radius: 16px; background: var(--night); color: #fff; font-weight: 800; font-size: 20px; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(255, 255, 255, .7), 0 10px 30px rgba(22, 24, 28, .25); }
.ai-band h2 { margin: 0; font-size: clamp(34px, 4.6vw, 60px); }
.ai-band h2 + p { margin: 8px 0 18px; color: var(--ink-2); font-size: 17px; max-width: 700px; }
.ai-box { background: var(--paper); border-radius: 18px; border: 1px solid var(--line); padding: 6px; box-shadow: var(--shadow); }
.ai-box textarea { width: 100%; border: 0; outline: 0; resize: none; padding: 14px 16px 6px; min-height: 92px; font-size: 17px; line-height: 1.45; background: none; }
.ai-box-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 4px; font-weight: 600; color: var(--coral-2); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.ai-note { position: absolute; right: clamp(16px, 4vw, 60px); top: 22px; font-size: 32px; transform: rotate(-8deg); color: var(--ink-2); }
.ai-answer { margin-top: 22px; display: none; }
.ai-answer.on { display: block; animation: rise .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.ai-says { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.ai-says .ai-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 14px; flex-shrink: 0; box-shadow: none; }
.bubble { background: var(--paper); border-radius: 4px 18px 18px 18px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 17px; }
.bubble b { font-size: 22px; letter-spacing: -.02em; }
.bubble .understood { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bubble .understood span { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--sky); color: #214155; }
.bubble .understood span.x { background: #fde8e6; color: #9c2a20; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #b9ae9f; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; transform: translateY(-2px); } }
.why-card { display: grid; grid-template-rows: auto 1fr; }
.why { list-style: none; padding: 10px 0 0; margin: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 3px; font-size: 13.5px; }
.why li { display: flex; gap: 7px; align-items: baseline; }
.why li::before { content: "✓"; color: var(--green); font-weight: 800; }
.why li.no::before { content: "–"; color: #b0a595; }
.why li.no { color: var(--muted); }
.why-title { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.strong-tag { position: absolute; left: 10px; top: 10px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 8px; z-index: 2; }

/* ---------- alerts band ---------- */
.alerts { background: var(--night) center / cover; color: #fff; overflow: hidden; position: relative; isolation: isolate; }
.alerts::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(900px 400px at 20% 110%, rgba(255, 74, 61, .22), transparent 60%), linear-gradient(90deg, rgba(18, 20, 24, .88), rgba(18, 20, 24, .78)); }
.alerts-grid { display: grid; grid-template-columns: 380px 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; padding: 56px 0 0; }
.phone { width: 300px; height: 470px; margin: 0 auto -6px; border-radius: 48px 48px 0 0; background: #0c0d0f; padding: 12px 12px 0; box-shadow: 0 0 0 2px #3a3d44, 0 30px 80px rgba(0, 0, 0, .5); position: relative; align-self: end; }
.phone-screen { height: 100%; border-radius: 38px 38px 0 0; overflow: hidden; background: linear-gradient(160deg, #6d7f95, #2e3848 60%, #1d232d); position: relative; padding: 54px 14px 0; }
.phone-screen::before { content: ""; position: absolute; top: 12px; left: 50%; width: 96px; height: 28px; margin-left: -48px; border-radius: 20px; background: #000; }
.phone-time { text-align: center; font-size: 62px; font-weight: 300; letter-spacing: -.02em; line-height: 1; margin: 6px 0 2px; }
.phone-date { text-align: center; font-size: 14px; opacity: .8; margin-bottom: 22px; }
.notif { background: rgba(245, 243, 240, .92); color: var(--ink); border-radius: 20px; padding: 12px 14px; font-size: 13px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); margin-bottom: 8px; animation: drop .7s cubic-bezier(.2, 1.3, .4, 1) both; }
.notif:nth-child(2) { animation-delay: .5s; }
.notif-app { display: flex; gap: 8px; align-items: center; font-weight: 700; margin-bottom: 4px; }
.notif-app i { width: 22px; height: 22px; border-radius: 6px; background: var(--coral); display: grid; place-items: center; }
.notif-app i svg { width: 14px; height: 14px; }
.notif-app small { margin-left: auto; font-weight: 500; color: #7a7268; }
.notif b { display: block; }
.notif .go { display: inline-flex; margin-top: 5px; font-weight: 700; color: var(--coral-2); }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) scale(.96); } }
.alerts h2 { font-size: clamp(38px, 5vw, 68px); margin: 0; }
.alerts .lead { font-size: 19px; color: #e7e2da; margin: 12px 0 24px; max-width: 560px; }
.freq { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; border: 0; padding: 0; }
.freq label { position: relative; cursor: pointer; }
.freq input { position: absolute; opacity: 0; }
.freq span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; border: 1.5px solid rgba(255, 255, 255, .25); font-weight: 600; font-size: 15px; transition: all .15s; }
.freq span svg { width: 18px; height: 18px; }
.freq input:checked + span { background: #fff; color: var(--ink); border-color: #fff; }
.freq input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }
.alert-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; max-width: 760px; }
.alert-form input { border: 1.5px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 12px; padding: 14px 16px; font-size: 15.5px; outline: 0; min-width: 0; }
.alert-form input::placeholder { color: #b8b1a7; }
.alert-form input:focus { border-color: var(--coral); background: rgba(255, 255, 255, .12); }
.form-msg { min-height: 24px; margin: 10px 0 0; font-weight: 600; }
.form-msg.ok { color: #7fe0b0; }
.form-msg.err { color: #ffb0a8; }
.hp { position: absolute; left: -9999px; }
.alerts-note { position: absolute; right: clamp(16px, 5vw, 70px); bottom: 40px; margin: 0; font-size: 38px; transform: rotate(-10deg); }
.alerts-note svg { width: 110px; margin-left: 30px; }
.fine { font-size: 13px; color: #aaa298; margin: 8px 0 0; }

/* ---------- my tayside teaser ---------- */
.mt-grid { display: grid; grid-template-columns: 1.1fr 2fr; gap: 28px; align-items: center; }
.mt-grid h2 { font-size: clamp(40px, 5vw, 68px); margin: 0; }
.mt-grid .lead { font-size: 18px; color: var(--ink-2); margin: 12px 0 20px; }
.mt-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mt-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px; text-decoration: none; display: grid; gap: 4px; transition: transform .2s, box-shadow .2s; min-height: 118px; align-content: start; }
.mt-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mt-tile svg { width: 26px; height: 26px; color: var(--coral); margin-bottom: 6px; }
.mt-tile b { font-size: 15px; }
.mt-tile small { color: var(--muted); font-size: 13px; }
.mt-tile .n { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.mt-tile.feature { grid-column: span 2; background: var(--ink); color: #fff; border-color: var(--ink); }
.mt-tile.feature small { color: #cfc8be; }
.mt-tile.feature .display { font-size: 30px; }

/* ---------- areas ---------- */
.areas { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 170px; gap: 12px; }
.area { position: relative; border-radius: 20px; overflow: hidden; color: #fff; text-decoration: none; background: #333 center / cover; display: flex; align-items: flex-end; padding: 16px; isolation: isolate; }
.area::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0) 60%); transition: background .3s; }
.area:hover::before { background: linear-gradient(0deg, rgba(0, 0, 0, .75), rgba(255, 74, 61, .15)); }
.area b { display: block; font-size: 22px; letter-spacing: -.02em; line-height: 1.1; }
.area small { font-weight: 600; opacity: .9; }
.area.a1 { grid-column: span 3; grid-row: span 2; }
.area.a1 b { font-size: 34px; }
.area.a2, .area.a3 { grid-column: span 3; }
.area.a4, .area.a5, .area.a6 { grid-column: span 2; }
.near-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.near-row a { display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); padding: 10px 16px; border-radius: 99px; font-weight: 600; text-decoration: none; font-size: 14.5px; }
.near-row a:hover { border-color: var(--ink); }
.near-row svg { width: 16px; height: 16px; color: var(--coral); }

/* ---------- features strip ---------- */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.perk { display: flex; gap: 16px; align-items: center; padding: 26px 22px; }
.perk + .perk { border-left: 1px solid var(--line); }
.perk svg { width: 42px; height: 42px; color: var(--coral); flex-shrink: 0; }
.perk b { display: block; }
.perk small { color: var(--muted); font-size: 14px; }

/* ---------- footer ---------- */
.foot { padding: 40px 0 28px; }
.foot-top { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.foot-nav { display: flex; gap: 22px; flex-wrap: wrap; margin-right: auto; }
.foot-nav a { text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.foot-nav a:hover { color: var(--coral-2); }
.foot-note { font-size: 26px; transform: rotate(-8deg); color: var(--ink-2); }
.legal { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.legal a { color: var(--ink-2); }
.credits { font-size: 12px; }

/* ---------- search page ---------- */
.s-bar { position: sticky; top: 74px; z-index: 800; background: var(--bg); border-bottom: 1px solid var(--line); }
.s-bar .wrap { display: grid; gap: 10px; padding-block: 12px; max-width: none; }
.s-bar .bigsearch { border-width: 1.5px; padding: 5px 5px 5px 12px; border-radius: 14px; }
.s-bar .bigsearch input { padding: 8px 0; font-size: 16px; }
.s-bar .bigsearch .btn { padding: 11px 18px; }
.s-row { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.s-row::-webkit-scrollbar { display: none; }
.s-row .select { flex-shrink: 0; }
.s-row .select select { padding: 9px 34px 9px 12px; font-size: 14px; background: var(--paper); border-radius: 99px; }
.s-row .select::after { right: 14px; width: 7px; height: 7px; }
.pill { flex-shrink: 0; border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 8px 14px; font-size: 14px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.pill:hover { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill svg { width: 15px; height: 15px; }
.pill .x { margin-left: 2px; opacity: .7; }
.s-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 44vw); }
.s-list { padding: 18px var(--gutter) 60px; min-width: 0; }
.s-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.s-summary h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.s-summary p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.s-map { position: sticky; top: calc(74px + var(--sbar, 118px)); height: calc(100vh - 74px - var(--sbar, 118px)); }
.mapbox { position: absolute; inset: 0; }
.map-ctl { position: absolute; z-index: 600; top: 14px; left: 14px; right: 14px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.map-ctl > * { pointer-events: auto; box-shadow: var(--shadow); }
.map-ctl .pill { border-color: transparent; }
.map-hint { position: absolute; z-index: 600; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.map-hint[hidden] { display: none; }
.map-hint button { background: var(--coral); color: #fff; border: 0; border-radius: 8px; padding: 5px 10px; font-weight: 700; }
.near-panel { position: absolute; z-index: 650; top: 62px; left: 14px; width: min(340px, calc(100% - 28px)); background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; display: none; }
.near-panel.on { display: block; animation: rise .25s; }
.near-panel h3 { margin: 0 0 10px; font-size: 16px; }
.near-panel label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 10px 0 4px; }
.near-panel .select select { background: var(--bg); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--soft); padding: 4px; border-radius: 11px; }
.seg button { border: 0; background: none; padding: 7px 4px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--paper); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
input[type=range] { width: 100%; accent-color: var(--coral); }
.range-val { font-weight: 800; font-size: 18px; }
.near-panel .row { display: flex; gap: 8px; margin-top: 14px; }
.mobile-switch { display: none; }
.no-results { grid-column: 1 / -1; background: var(--paper); border: 1px dashed var(--line); border-radius: 20px; padding: 40px 24px; text-align: center; }
.no-results h3 { margin: 0 0 6px; font-size: 20px; }
.sortsel select { padding: 8px 32px 8px 12px; font-size: 14px; background: var(--paper); }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 2000; display: none; }
.drawer.on { display: block; }
.drawer-shade { position: absolute; inset: 0; background: rgba(15, 14, 12, .5); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--bg); overflow-y: auto; box-shadow: var(--shadow-lg); animation: slide .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-pic { position: relative; aspect-ratio: 4 / 3; background: var(--soft); }
.drawer-pic svg { width: 100%; height: 100%; }
.drawer-close { position: absolute; top: 14px; left: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); display: grid; place-items: center; box-shadow: var(--shadow); z-index: 3; }
.drawer-close svg { width: 18px; height: 18px; }
.drawer-body { padding: 22px 26px 40px; }
.drawer-body h2 { font-size: 34px; margin: 0; letter-spacing: -.03em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.drawer-body h2 small { font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.drawer-addr { font-size: 17px; font-weight: 600; margin: 4px 0 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.fact { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.fact b { display: block; font-size: 18px; }
.fact small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.drawer-map { height: 220px; border-radius: 16px; overflow: hidden; margin-top: 16px; }
.sample-box { background: #fff7e8; border: 1px solid #f3dcae; color: #6d4a0f; border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-top: 16px; }
.hist { font-size: 14px; color: var(--ink-2); margin: 10px 0 0; }
.closing { display: inline-flex; gap: 6px; align-items: center; background: #fdf0d9; color: #8a5a10; border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: 14px; margin-top: 10px; }

/* ---------- my tayside page ---------- */
.my-hero { padding: 40px 0 10px; }
.my-hero h1 { font-size: clamp(48px, 7vw, 96px); margin: 0; }
.my-hero p { font-size: 19px; color: var(--ink-2); margin: 10px 0 0; max-width: 680px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 20px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; border: 0; background: none; padding: 10px 14px; border-radius: 12px 12px 0 0; font-weight: 700; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; position: relative; }
.tab .n { background: var(--soft); color: var(--ink-2); border-radius: 99px; font-size: 12px; padding: 1px 8px; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px; background: var(--coral); }
.tab[aria-selected="true"] .n { background: var(--coral); color: #fff; }
.empty { text-align: center; padding: 50px 20px; background: var(--paper); border: 1px dashed var(--line); border-radius: 22px; }
.empty .hand { font-size: 34px; color: var(--coral-2); }
.empty p { color: var(--muted); max-width: 440px; margin: 8px auto 18px; }
.alert-list { display: grid; gap: 10px; }
.alert-item { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; flex-wrap: wrap; }
.alert-item b { display: block; }
.alert-item small { color: var(--muted); }
.alert-item .grow { flex: 1; min-width: 200px; }
.unhide { position: absolute; left: 10px; top: 10px; z-index: 3; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow-lg); z-index: 3000; opacity: 0; transition: all .3s cubic-bezier(.2, .8, .2, 1); pointer-events: none; display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { background: none; border: 0; color: var(--coral); font-weight: 700; }

/* ---------- about / credits ---------- */
.prose { max-width: 760px; font-size: 17px; }
.prose h1 { font-size: clamp(44px, 6vw, 80px); margin: 30px 0 10px; }
.prose h2 { margin-top: 34px; }
.prose li { margin: 6px 0; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .nav.open { display: grid; position: absolute; top: 74px; left: 0; right: 0; background: var(--bg); padding: 10px var(--gutter) 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .map-teaser { min-height: 360px; }
  .trio { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .alerts-grid { grid-template-columns: minmax(0, 1fr); padding-top: 44px; }
  .alerts-grid .phone { order: 2; }
  .mt-grid { grid-template-columns: minmax(0, 1fr); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .perk:nth-child(3) { border-left: 0; }
  .perk:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero-note { display: none; }
}
@media (max-width: 900px) {
  .filters { grid-template-columns: repeat(2, 1fr); }
  .filters .select:last-child { grid-column: span 2; }
  .s-layout { grid-template-columns: minmax(0, 1fr); }
  .s-map { display: none; position: fixed; inset: auto 0 0 0; top: calc(74px + var(--sbar, 118px)); height: auto; z-index: 700; }
  body.show-map .s-map { display: block; }
  body.show-map .s-list { display: none; }
  .mobile-switch { display: flex; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1500; }
  .mt-tiles { grid-template-columns: repeat(2, 1fr); }
  .areas { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .area.a1 { grid-column: span 2; grid-row: span 1; }
  .area.a1 b { font-size: 26px; }
  .area.a2, .area.a3, .area.a4, .area.a5, .area.a6 { grid-column: span 1; }
  .alert-form { grid-template-columns: 1fr; }
  .side-note, .ai-note, .alerts-note { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ribbon .wrap { font-size: 12.5px; padding-block: 6px; gap: 6px; }
  .ribbon .long { display: none; }
  .top .wrap { height: 64px; gap: 10px; }
  .s-bar { top: 64px; }
  .nav.open { top: 64px; }
  .brand svg { width: 38px; height: 34px; }
  .brand-word strong { font-size: 22px; }
  .brand-word span { font-size: 8px; letter-spacing: .24em; }
  .top-actions .hide-sm { display: none; }
  .hero { padding-bottom: 130px; }
  .finder-card { padding: 14px; border-radius: 22px; }
  .bigsearch { flex-wrap: wrap; padding: 8px; }
  .bigsearch input { flex-basis: calc(100% - 50px); }
  .bigsearch .btn { width: 100%; }
  .s-bar .bigsearch { flex-wrap: nowrap; }
  .s-bar .bigsearch .btn { width: auto; }
  .s-bar .bigsearch .btn span { display: none; }
  .sources span { padding: 4px 10px; font-size: 15px; }
  .perks { grid-template-columns: 1fr; }
  .perk + .perk { border-left: 0; border-top: 1px solid var(--line); }
  .ai-grid { grid-template-columns: minmax(0, 1fr); }
  .ai-mark { width: 44px; height: 44px; }
  .phone { width: 270px; height: 420px; }
  .rail-btn { display: none !important; }
  .map-teaser .map-tools { display: none; }
  .mt-tile.feature { grid-column: span 2; }
  .drawer-body { padding: 18px 18px 40px; }
  .s-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
