/* 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); }
/* Beside the map the rail must not bleed right, or its cards slide under the map. */
.split > :first-child { min-width: 0; }
.split .rail { margin-right: 0; padding-right: 0; scroll-padding-right: 0; }
.split .rail-btn.next { right: -10px; }
/* Empty rails (few live homes yet) are hidden; the rest of a trio closes up. */
.trio > [hidden], section.band[hidden] { display: none !important; }
.trio:has(> [hidden]) { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.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 .pic img.photo, .drawer-pic img.photo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .pic img.photo { transform: scale(1.05); }
.gallery { display: flex; gap: 6px; overflow-x: auto; padding: 6px; background: var(--soft); scrollbar-width: thin; }
.gallery img { height: 64px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; cursor: pointer; flex: none; }
.agent-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line, #e6e1d8); border-radius: 14px; padding: 12px 14px; margin-top: 16px; }
.agent-box small { display: block; color: var(--muted); font-size: 12px; }
.agent-box b { display: block; }
.agent-box a[href^="tel"] { font-size: 14px; }
.drawer-summary { margin: 14px 0 0; }
.features { margin: 10px 0 0; padding-left: 18px; columns: 2; column-gap: 24px; font-size: 14px; }
@media (max-width: 560px) { .features { columns: 1; } }
.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; }
.flag.offer { background: #1f3a5f; }
.card .pic:has(.flag.offer) img, .card .pic:has(.flag.offer) svg { filter: saturate(.75); }
.offer-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.offer-note .flag { position: static; flex: none; }
.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; }
/* On the home teaser the tools are a slim row along the top edge, so they don't sit on the pins. */
.map-teaser .map-tools { right: 14px; display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .92); }
.map-teaser .map-tools a { font-size: 12.5px; padding: 6px 9px; }
.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; }
}

/* ---------- agents: apply form + private agent area ---------- */
.muted { color: var(--muted); }
.apply { max-width: 760px; margin-top: 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.apply h2 { margin: 0 0 4px; }
.apply-done h2 { margin-top: 0; }
.agent-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 16px; }
.agent-form .f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.agent-form .f.wide, .agent-form fieldset, .agent-form .form-actions { grid-column: 1 / -1; }
.agent-form label { font-weight: 700; font-size: 14.5px; }
.agent-form label small { font-weight: 500; color: var(--muted); }
.agent-form input:not([type=file]), .agent-form textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 15.5px; color: var(--ink); min-width: 0; width: 100%; box-sizing: border-box; }
.agent-form input:focus, .agent-form textarea:focus, .agent-form select:focus { outline: 2px solid var(--coral); outline-offset: 1px; border-color: transparent; }
.agent-form textarea { resize: vertical; }
.f-err { color: #b3261e; font-size: 13.5px; font-weight: 600; margin: 0; }
.home-form fieldset { border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px 18px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; background: var(--paper); }
.home-form legend { font-weight: 800; font-size: 17px; padding: 0 6px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-actions [disabled] { opacity: .5; cursor: progress; }
.agent-wrap { max-width: 980px; padding-bottom: 60px; }
.agent-wrap h1 { font-size: clamp(28px, 4vw, 40px); margin: 6px 0 16px; letter-spacing: -.02em; }
.agent-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.agent-flash { background: #e9f6ec; border: 1px solid #bfe3c8; color: #1d5a2c; border-radius: 12px; padding: 10px 14px; }
.agent-flash.bad { background: #fdecea; border-color: #f5c2bd; color: #8a1f17; }
.agent-note { font-size: 14px; color: var(--muted); }
.agent-empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--line); border-radius: 20px; }
.agent-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.agent-list li { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.agent-list li.off { opacity: .6; }
.al-pic { width: 96px; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--soft); overflow: hidden; }
.al-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.al-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.al-meta .warn { color: #b3261e; font-weight: 600; }
.al-status { font-weight: 700; color: var(--ink-2); }
.al-status.s-available { color: #1d7a3a; }
.al-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.al-actions form { margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.photo-grid figure { margin: 0; position: relative; cursor: grab; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.photo-grid .first { position: absolute; left: 6px; top: 6px; background: var(--coral); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; }
.photo-grid button { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.photo-grid input { margin-top: 6px; padding: 7px 9px !important; font-size: 13px !important; }
.photo-add { cursor: pointer; }
@media (max-width: 640px) {
  .agent-form, .home-form fieldset { grid-template-columns: 1fr; }
  .agent-list li { grid-template-columns: 72px 1fr; }
  .al-pic { width: 72px; }
  .al-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- /agents landing ---------- */
.ag-hero { position: relative; isolation: isolate; color: #fff; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 96px); overflow: hidden; background: #16181c; }
.ag-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(900px 480px at 85% 10%, rgba(255, 74, 61, .28), transparent 60%), radial-gradient(700px 420px at 0% 110%, rgba(124, 196, 255, .14), transparent 60%), linear-gradient(90deg, rgba(14, 16, 22, .92), rgba(14, 16, 22, .7)), url('/img/hero-dundee.webp') center 40% / cover no-repeat; }
.ag-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 7.4vw, 104px); line-height: .92; margin: 0; text-transform: uppercase; }
.ag-hero h1 span { display: block; }
.ag-hero h1 .accent { color: var(--coral); }
.ag-sub { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; margin: 22px 0 0; max-width: 620px; color: #efe9e0; font-weight: 500; }
.ag-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.ag-ghost { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.ag-ghost:hover { background: rgba(255, 255, 255, .18); }
.ag-props { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ag-prop { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.ag-prop b { display: block; font-size: 17px; margin: 14px 0 6px; letter-spacing: -.01em; }
.ag-prop p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.onb-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff0ee; color: var(--coral); }
.onb-icon svg { width: 22px; height: 22px; }
.onb-icon.ok { background: #e7f5ec; color: var(--green); }
.ag-how { background: var(--soft); }
.ag-how h2 { font-size: clamp(36px, 4.6vw, 60px); margin: 0 0 24px; }
.ag-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.ag-steps li { background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: relative; }
.ag-steps li > span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; }
.ag-steps b { display: block; font-size: 19px; margin: 14px 0 6px; }
.ag-steps p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.ag-works { text-align: center; margin-top: 34px; }
.ag-works > p:first-child { font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; margin: 0 0 6px; }
.ag-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.ag-faq h2 { margin: 0 0 12px; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.02em; }
.ag-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.ag-faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.ag-faq summary::after { content: "+"; font-weight: 800; color: var(--coral); }
.ag-faq details[open] summary::after { content: "–"; }
.ag-faq details p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.55; }
.ag-split .apply { margin-top: 0; max-width: none; box-shadow: var(--shadow); position: sticky; top: 96px; }
.ag-lists { border: 0; padding: 0; margin: 0; }
.ag-lists legend { font-weight: 700; font-size: 14.5px; margin-bottom: 8px; padding: 0; }
.ag-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ag-tile { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--bg); font-weight: 700; font-size: 14px; min-height: 46px; transition: border-color .15s, background .15s; }
.ag-tile small { font-weight: 500; color: var(--muted); font-size: 12px; }
.ag-tile input { position: absolute; opacity: 0; pointer-events: none; }
.ag-tile:has(input:checked) { border-color: var(--coral); background: #fff4f2; box-shadow: 0 0 0 3px rgba(255, 74, 61, .12); }
.ag-tile:has(input:focus-visible) { outline: 2px solid var(--coral); outline-offset: 2px; }
.ag-submit { width: 100%; }
.apply-done { text-align: center; padding: 12px 4px; }
.apply-done h2 { margin: 12px 0 6px; }

/* ---------- agent page: onboarding ---------- */
.onb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 22px; }
.onb-stats > div { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.onb-stats b { display: block; font-size: 22px; letter-spacing: -.02em; }
.onb-stats b a { text-decoration: none; }
.onb-stats small { color: var(--muted); }
.state { font-size: 17px !important; display: inline-flex !important; align-items: center; gap: 8px; }
.state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #b9b1a6; }
.state-receiving::before { background: var(--green); box-shadow: 0 0 0 4px rgba(31, 138, 91, .15); }
.state-waiting::before, .state-preparing::before { background: #f0a020; animation: pulse 2s infinite; }
.onb-start { background: linear-gradient(135deg, #16181c, #2a2f38); color: #fff; border-radius: 24px; padding: clamp(22px, 3vw, 34px); margin-bottom: 26px; }
.onb-start h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 3.6vw, 44px); margin: 0; line-height: 1; }
.onb-start > p { margin: 8px 0 18px; color: #d9d2c7; }
.onb-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.onb-path { display: flex; flex-direction: column; gap: 6px; background: var(--paper); color: var(--ink); border-radius: 18px; padding: 20px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.onb-path:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.onb-path b { font-size: 19px; margin-top: 8px; }
.onb-path > span:not(.onb-icon):not(.onb-go) { color: var(--ink-2); line-height: 1.45; }
.onb-go { margin-top: auto; padding-top: 8px; font-weight: 800; color: var(--coral); }
.onb-h { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; margin: 30px 0 6px; }
.onb-problems { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.onb-connect { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
.lead-sm { color: var(--ink-2); margin: 0 0 14px; }
.onb-crms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.onb-crm { border: 1.5px solid var(--line); background: var(--paper); border-radius: 99px; padding: 9px 16px; font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; transition: border-color .15s, background .15s; }
.onb-crm:hover { border-color: var(--ink); }
.onb-crm.on { border-color: var(--coral); background: #fff4f2; color: var(--ink); }
.onb-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; counter-reset: st; }
.onb-steps li { counter-increment: st; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 14px 58px; }
.onb-steps li::before { content: counter(st); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-weight: 800; font-size: 14px; }
.onb-steps li.now { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255, 74, 61, .08); }
.onb-steps li.now::before { background: var(--coral); color: #fff; }
.onb-steps li.done::before { content: "✓"; background: var(--green); color: #fff; }
.onb-steps b { display: block; }
.onb-steps span { color: var(--ink-2); font-size: 14.5px; }
.onb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.onb-creds { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.cred { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.cred h3 { margin: 0 0 10px; font-size: 16px; }
.cred h3 small { font-weight: 500; color: var(--muted); }
.cred dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 10px; margin: 0; align-items: center; }
.cred dt { color: var(--muted); font-size: 13.5px; }
.cred dd { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; font-size: 14px; }
.cred code { background: var(--soft); border-radius: 8px; padding: 4px 8px; font-size: 13px; overflow-wrap: anywhere; }
.cred button { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 3px 9px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.cred button.ok, .onb-actions button.ok { border-color: var(--green); color: var(--green); }
.onb-done { background: #e9f6ec; border: 1px solid #bfe3c8; border-radius: 16px; padding: 18px; margin: 12px 0 20px; }
.onb-done h2 { margin: 0 0 6px; }
.onb-link code { display: block; background: #fff; border-radius: 10px; padding: 10px; overflow-wrap: anywhere; }
.onb-facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 12px 0 18px; }
.onb-facts dt { color: var(--muted); }
.onb-facts dd { margin: 0; overflow-wrap: anywhere; }
.onb-decide { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .ag-props { grid-template-columns: 1fr 1fr; }
  .ag-steps, .ag-split { grid-template-columns: 1fr; }
  .ag-split .apply { position: static; }
}
@media (max-width: 600px) {
  .ag-props, .onb-paths, .onb-stats { grid-template-columns: 1fr; }
  .onb-facts, .cred dl { grid-template-columns: 1fr; }
}

/* "coming soon" connection box on the agent page */
.onb-soon { background: var(--paper); border: 1px dashed var(--line); border-radius: 16px; padding: 16px 18px; }
.onb-soon b { display: block; margin-bottom: 4px; }
.onb-soon p { margin: 0; color: var(--ink-2); }

/* My Tayside account box (optional sign-in) and account alerts */
.acct { margin-top: 18px; max-width: 760px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.acct p { margin: 0 0 10px; }
.acct p:last-child { margin-bottom: 0; }
.acct p > svg { display: inline-block; vertical-align: -3px; margin-right: 4px; color: var(--coral); }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 6px; }
.acct-row input { border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 15.5px; min-width: 0; }
@media (max-width: 560px) { .acct-row { grid-template-columns: 1fr; } }
.acct .form-msg { min-height: 0; margin: 6px 0 0; }
.acct .form-msg.ok { color: #1d7a46; }
.acct .form-msg.err { color: #b3261e; }
.alert-item.off { opacity: .6; }
.alert-item select { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); }

/* launch pricing line under the agents / wordpress heroes */
.ag-free { display: inline-block; margin: 18px 0 0; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: 14.5px; }
.ag-free b { color: #fff; }

/* Expert Agent feed details form on the agent page */
.onb-feedform { margin-top: 10px; max-width: 640px; }
.onb-feedform .f label { font-size: 13.5px; }
