/* AgentsProp public site. "Live Earth" design: theme colours from data/theme.json, Anybody + Hanken Grotesk. */

/* Fallback colours. The live values come from data/theme.json (admin → Design) via <style id="ap-theme">. */
:root {
	--bg: #03060d; --surface: #0b1426; --soft: #111d33; --text: #e9eef7; --muted: #97a7bf; --heading: #ffffff;
	--line: #1d2a41; --accent: #ffb25a; --on-accent: #221100; --info: #7fd4ff; --deep: #02040a;
	--accent-rgb: 255, 178, 90; --info-rgb: 127, 212, 255; --bg-rgb: 3, 6, 13;
	--display: "Anybody", "Hanken Grotesk", system-ui, sans-serif;
	--display-width: 122%;
	--text-font: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--wrap: 1280px;
	--gutter: clamp(16px, 3.4vw, 36px);
	--r-card: 18px;
	--r-input: 12px;
}
:root, :root[data-theme] {
	/* Names used by every component, all derived from the theme colours. */
	--sail: var(--bg);
	--paper: var(--surface);
	--ink: var(--text);
	--harbour: var(--heading);
	--link: color-mix(in srgb, var(--info) 55%, var(--heading));
	--mist: var(--soft);
	--mist-2: color-mix(in srgb, var(--soft) 55%, var(--line));
	--line-2: color-mix(in srgb, var(--line) 55%, var(--muted));
	--sun: var(--accent);
	--sun-2: color-mix(in srgb, var(--accent) 82%, #fff);
	--sun-ink: var(--on-accent);
	--glass: color-mix(in srgb, var(--surface) 64%, transparent);
	--glass-line: color-mix(in srgb, var(--info) 22%, transparent);
	--warn: #ff7a62;
	--ok: #4cc38a;
	--shadow: 0 1px 0 color-mix(in srgb, var(--line) 60%, transparent), 0 24px 48px -30px rgba(0, 0, 0, .65);
}
:root[data-theme="light"] { --warn: #b3261e; --ok: #1f7a4a; --shadow: 0 1px 0 rgba(10, 30, 70, .05), 0 22px 44px -30px rgba(10, 30, 70, .35); }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --warn: #b3261e; --ok: #1f7a4a; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--sail); color: var(--ink); font-family: var(--text-font); font-size: 17px; line-height: 1.58; font-feature-settings: "kern"; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--harbour); margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.012em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.ico { flex: none; vertical-align: middle; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--sun-2); border-color: var(--sun-2); }
.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }
.btn-sun:hover { background: var(--sun-2); border-color: var(--sun-2); }
.btn-line { background: transparent; color: var(--harbour); }
.btn-line:hover { background: var(--paper); }
.btn-small { padding: 8px 15px; font-size: 15px; }
.btn-plain { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 4px; font: inherit; font-size: 15px; font-weight: 600; color: var(--harbour); cursor: pointer; }
.more { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.more:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-head { position: relative; z-index: 20; background: var(--sail); }
.head-row { display: flex; align-items: center; gap: 28px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 25px; color: var(--harbour); text-decoration: none; margin-right: auto; }
.brand svg { flex: none; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; }
.main-nav a:hover { background: var(--mist); }
.main-nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.head-tools { display: flex; align-items: center; gap: 8px; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--harbour); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary { background: var(--paper); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; list-style: none; margin: 0; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.lang-menu a { display: block; padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); }
.lang-menu a:hover { background: var(--mist); }
.lang-menu a[aria-current] { font-weight: 700; color: var(--harbour); }
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--harbour); cursor: pointer; }

@media (max-width: 1080px) {
	.head-row { gap: 12px; }
	.nav-toggle { display: inline-flex; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--sail); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 2px; }
	.main-nav a { font-size: 19px; padding: 12px 14px; border-radius: 12px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }
.section-mist { background: var(--mist); }
.section-paper { background: var(--paper); }
.section-deep { background: var(--deep); color: #c9d4e6; }
.section-deep h2, .section-deep h3 { color: #fff; }
.section-deep a { color: #fff; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: clamp(24px, 3vw, 36px); }
.sec-head h2 { font-size: clamp(31px, 3.6vw, 48px); line-height: 1.04; max-width: 22ch; }
.sec-head p { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }
.section-deep .sec-head p { color: #a3b1c6; }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 58ch; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(28px, 4.4vw, 64px) 0 clamp(20px, 3vw, 40px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 40px; align-items: start; }
.hero h1 { font-size: clamp(46px, 7.4vw, 104px); line-height: .95; letter-spacing: -.02em; max-width: 12ch; margin-bottom: 22px; }
.hero .lead { margin-bottom: 30px; }
.hero-places { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font-size: 15px; color: var(--muted); }
.hero-places a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--harbour); text-decoration: none; font-weight: 500; background: var(--sail); }
.hero-places a:hover { background: var(--paper); border-color: var(--harbour); }
.has-results ~ .hero-places, .ap-mount.has-results + .hero-places { display: none; }

/* The signal hoist: real International Code flags spelling "home". */
.hoist { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 0 0 0 0; margin-top: -8px; }
.hoist::before { content: ""; position: absolute; left: 0; top: -120px; bottom: 30px; width: 2px; background: linear-gradient(var(--line-2), var(--harbour) 30%, var(--harbour)); border-radius: 2px; }
.hoist-flags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.hoist-flags li { position: relative; padding-left: 2px; animation: hoist .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 110ms + 250ms); }
.hoist-flags li::before { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--accent); }
.hoist-flags svg { display: block; width: 104px; height: auto; transform-origin: 0 50%; animation: flutter 6s ease-in-out infinite; animation-delay: calc(var(--i) * -900ms); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.hoist-cap { margin: 16px 0 0 16px; font-size: 13.5px; line-height: 1.4; color: var(--muted); max-width: 18ch; }
.hoist-cap strong { color: var(--harbour); letter-spacing: .12em; white-space: nowrap; }
@keyframes hoist { from { transform: translateY(-46px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flutter { 0%, 100% { transform: skewY(0) scaleX(1); } 30% { transform: skewY(-3deg) scaleX(.96); } 65% { transform: skewY(2deg) scaleX(.98); } }

@media (max-width: 900px) {
	.hero-grid { grid-template-columns: 1fr; gap: 0; }
	.hoist { order: -1; flex-direction: row; align-items: center; gap: 12px; margin: 0 0 22px; }
	.hoist::before { display: none; }
	.hoist-flags { flex-direction: row; gap: 6px; }
	.hoist-flags li::before { display: none; }
	.hoist-flags svg { width: 46px; }
	.hoist-cap { margin: 0; max-width: none; }
}

/* Buy / rent switch above the search box */
.deal-switch { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 999px; background: var(--mist); }
.deal-switch label { position: relative; }
.deal-switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.deal-switch span { display: block; padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--muted); }
.deal-switch input:checked + span { background: var(--paper); color: var(--harbour); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.deal-switch input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 1px; }
.noscript { padding: 16px; background: var(--paper); border-radius: var(--r-input); }

/* Page hero for inner pages */
.page-hero { padding: clamp(24px, 4vw, 56px) 0 clamp(20px, 3vw, 40px); }
.page-hero h1 { font-size: clamp(40px, 5.8vw, 78px); line-height: 1; max-width: 16ch; margin-bottom: 16px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 14.5px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); }

/* ---------- Listing cards ---------- */
.homes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 22px 18px; }
.rail-wrap { position: relative; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 23.5%); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail > * { scroll-snap-align: start; }
.rail-nav { display: flex; gap: 8px; }
.rail-nav button { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); color: var(--harbour); cursor: pointer; }
.rail-nav button:hover { border-color: var(--harbour); }
@media (max-width: 1080px) { .rail { grid-auto-columns: minmax(250px, 31%); } }
@media (max-width: 760px) { .rail { grid-auto-columns: 78%; } .rail-nav { display: none; } }

.home-card { position: relative; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; }
.home-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.home-photo { position: relative; aspect-ratio: 4 / 3; background: var(--mist); overflow: hidden; }
.home-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.home-link:hover .home-photo img { transform: scale(1.035); }
.home-nophoto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--line-2); }
.home-badge { position: absolute; left: 12px; top: 12px; padding: 4px 11px; border-radius: 999px; background: var(--paper); color: var(--harbour); font-size: 13px; font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.home-badge.is-rent { background: var(--sun); color: var(--sun-ink); }
.home-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; }
.home-price { margin: 0; font-family: var(--display); font-size: 25px; line-height: 1.1; color: var(--harbour); font-variant-numeric: tabular-nums; }
.home-price small { font-family: var(--text-font); font-size: 14px; color: var(--muted); margin-left: 4px; }
.home-title { margin: 0; font-size: 15.5px; font-weight: 500; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-link:hover .home-title { text-decoration: underline; text-underline-offset: .15em; }
.home-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.home-facts > span { display: inline-flex; align-items: center; gap: 5px; }
.home-place { display: flex; align-items: flex-start; gap: 5px; margin: 0; font-size: 14px; color: var(--muted); }
.home-place .ico { margin-top: 3px; color: var(--harbour); }
.home-agency { margin: 0; padding: 9px 16px 12px; border-top: 1px solid var(--mist); font-size: 13px; color: var(--muted); }
.homes-empty { padding: 28px; border: 1.5px dashed var(--line-2); border-radius: var(--r-card); background: var(--paper); }
.homes-empty h3 { font-family: var(--display); font-weight: 400; font-size: 26px; margin-bottom: 8px; }

/* ---------- Postcards (city guides) ---------- */
.postcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 22px; }
@media (max-width: 980px) { .postcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .postcards { grid-template-columns: 1fr; } }
.postcard { position: relative; display: flex; flex-direction: column; background: var(--paper); border-radius: 6px; padding: 10px; box-shadow: var(--shadow); }
.postcard-art { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 3px; overflow: hidden; }
.postcard-art svg { display: block; width: 100%; height: 100%; }
.postcard-stamp { position: absolute; right: 10px; top: 10px; padding: 4px; background: radial-gradient(circle, transparent 2.4px, #fff 2.9px) -4px -4px / 8px 8px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.postcard-stamp b { display: block; min-width: 54px; padding: 6px 7px 5px; background: #fff; border: 1px solid var(--line); text-align: center; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1; color: var(--harbour); }
.postcard-stamp small { display: block; margin-top: 3px; font-family: var(--text-font); font-size: 9.5px; font-weight: 700; line-height: 1.1; letter-spacing: .02em; color: var(--muted); }
.postcard-body { padding: 14px 8px 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.postcard h3 { font-family: var(--display); font-weight: 400; font-size: 31px; line-height: 1; }
.postcard h3 a { color: inherit; text-decoration: none; }
.postcard h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.postcard h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.postcard-coords { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.postcard-line { margin: 0; color: var(--muted); font-size: 15.5px; }
.postcard-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.postcard-facts div { display: flex; flex-direction: column; }
.postcard-facts dt { font-size: 12.5px; color: var(--muted); }
.postcard-facts dd { margin: 0; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.postcard-links { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: auto; padding-top: 10px; font-size: 15px; font-weight: 700; }

/* ---------- How it works (a real sequence) ---------- */
.route { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: route; }
.route li { position: relative; padding: 52px 28px 0 0; counter-increment: route; }
.route li::before { content: counter(route); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; z-index: 1; }
.route li::after { content: ""; position: absolute; left: 36px; right: 0; top: 17px; border-top: 2px dashed var(--line-2); }
.route li:last-child::after { display: none; }
.route h3 { font-size: 19px; margin-bottom: 6px; }
.route p { margin: 0; color: var(--muted); font-size: 16px; max-width: 34ch; }
@media (max-width: 820px) { .route { grid-template-columns: 1fr; gap: 26px; } .route li { padding: 0 0 0 54px; } .route li::after { display: none; } }

/* ---------- Advice columns ---------- */
.advice-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--harbour); }
.advice-col { padding: 26px 28px 8px 0; }
.advice-col + .advice-col { padding-left: 28px; border-left: 1px solid var(--line); }
.advice-col h3 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; margin-bottom: 8px; }
.advice-col > p { color: var(--muted); font-size: 16px; }
.link-list { list-style: none; margin: 0 0 18px; padding: 0; }
.link-list li { border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; text-decoration: none; color: var(--ink); font-weight: 500; }
.link-list a:hover { color: var(--harbour); }
.link-list a:hover span:first-child { text-decoration: underline; text-underline-offset: .15em; }
.link-list .min { flex: none; color: var(--muted); font-size: 14px; font-weight: 400; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .advice-cols { grid-template-columns: 1fr; } .advice-col, .advice-col + .advice-col { padding: 22px 0 6px; border-left: 0; } .advice-col + .advice-col { border-top: 1px solid var(--line); } }

/* ---------- Tools ---------- */
.tool { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); }
.tool + .tool { margin-top: 28px; }
.tool-h { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.tool-h h2, .tool-h h3 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; }
.tool > p { color: var(--muted); max-width: 64ch; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 3vw, 40px); align-items: start; margin-top: 18px; }
@media (max-width: 860px) { .tool-grid { grid-template-columns: 1fr; } }
.fields { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field legend { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.field small { color: var(--muted); font-size: 13px; }
.field input[type=number], .field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea, .input { width: 100%; font: inherit; font-size: 16px; padding: 11px 13px; border: 1.5px solid var(--line-2); border-radius: var(--r-input); background: var(--paper); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--harbour); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.is-wide2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
@media (max-width: 480px) { .field-row, .field-row.is-wide2 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--mist); border: 0; margin: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 13px; border-radius: 9px; font-size: 14.5px; font-weight: 700; color: var(--muted); }
.seg input:checked + span { background: var(--paper); color: var(--harbour); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.seg input:focus-visible + span { outline: 3px solid var(--sun); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--harbour); }

.result { background: var(--sail); border-radius: 14px; padding: clamp(18px, 2.4vw, 26px); }
.result-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 4px; }
.result-total strong { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 2.9vw, 40px); line-height: 1.05; color: var(--harbour); font-variant-numeric: tabular-nums; }
.result-total span { color: var(--muted); }
.result-sub { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.costbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--mist-2); margin: 14px 0; }
.costbar span { display: block; height: 100%; }
.costbar span + span { box-shadow: inset 2px 0 0 var(--paper); }
.result-lines { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.result-lines li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.result-lines i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.result-lines b { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-lines small { display: block; color: var(--muted); font-size: 13px; }
.result-note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }
.rangebar { position: relative; height: 10px; border-radius: 999px; background: var(--mist-2); margin: 22px 0 8px; }
.rangebar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); }
.range-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.tool-teaser h2 { font-size: clamp(31px, 3.6vw, 48px); line-height: 1.04; margin-bottom: 14px; }
.tool-teaser { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 900px) { .tool-teaser { grid-template-columns: 1fr; } }
.tool-index { list-style: none; margin: 18px 0 0; padding: 0; }
.tool-index li { border-top: 1px solid var(--line); }
.tool-index a { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--ink); font-weight: 500; }
.tool-index a:hover { color: var(--harbour); text-decoration: underline; }
.tool-index .ico { color: var(--harbour); }

/* ---------- Agencies ---------- */
.agencies-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: end; }
.agencies-grid h2 { font-size: clamp(31px, 3.6vw, 48px); line-height: 1.04; margin-bottom: 18px; max-width: 18ch; }
.terms { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.terms li { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.terms b { color: #fff; }
@media (max-width: 820px) { .agencies-grid { grid-template-columns: 1fr; } }

/* ---------- Expert form ---------- */
.expert { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.expert h2 { font-size: clamp(31px, 3.6vw, 48px); line-height: 1.04; margin: 14px 0 14px; max-width: 16ch; }
.expert-flag { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.expert-form { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 30px); display: grid; gap: 14px; }
.expert-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.3em; margin: 0; font-weight: 600; }
.form-msg.is-err { color: var(--warn); }
.form-msg.is-ok { color: var(--ok); }
@media (max-width: 860px) { .expert { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-foot { background: var(--deep); color: #a3b1c6; border-top: 1px solid rgba(160, 200, 255, .1); padding: 64px 0 28px; font-size: 15.5px; }
.site-foot a { color: #e6ecf5; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.brand-light { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-brand p { max-width: 38ch; margin-top: 16px; }
.foot-h { color: #fff; font-weight: 700; margin-bottom: 12px; }
.foot-h-lang { margin-top: 24px; }
.foot-langs { grid-template-columns: 1fr 1fr; }
.foot-langs a[aria-current] { color: var(--accent); }
.flag-legend { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.flag-legend-h { color: #fff; font-weight: 700; margin-bottom: 10px; }
.flag-legend ul { gap: 10px; }
.flag-legend li { display: flex; gap: 12px; align-items: center; font-size: 14.5px; }
.flag-legend b { color: #fff; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13.5px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Listing pages (buy / rent) ---------- */
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) auto; gap: 10px; align-items: end; padding: 16px; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); }
.filters .field > span { font-size: 13px; }
.filters .field input, .filters .field select { height: 44px; padding: 0 11px; font-size: 15px; }
.filters .field > span { min-height: 1.4em; }
@media (max-width: 1080px) { .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr 1fr; } .filters .btn { grid-column: 1 / -1; justify-content: center; } }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 26px 0 16px; }
.results-bar h2 { font-size: clamp(26px, 2.6vw, 34px); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 36px; }
.pager a, .pager span { min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; font-weight: 700; color: var(--harbour); background: var(--paper); }
.pager [aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pager span.gap { border: 0; background: none; }
.hub-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 1000px) { .hub-split { grid-template-columns: 1fr; } }

/* ---------- Article (guides and city guides) ---------- */
.article-head { padding: clamp(24px, 4vw, 56px) 0 clamp(20px, 3vw, 32px); }
.article-head h1 { font-size: clamp(40px, 5.6vw, 74px); line-height: 1; max-width: 18ch; margin-bottom: 18px; }
.article-head .dek { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.45; color: var(--muted); max-width: 52ch; margin-bottom: 18px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 14.5px; color: var(--muted); }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.topic-tag { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.topic-tag:hover { background: var(--sun-2); color: var(--on-accent); }
.article-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; padding-bottom: 72px; }
.toc { position: sticky; top: 24px; font-size: 15px; }
.toc-h { font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc ol a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc ol a:hover { color: var(--harbour); }
.toc a.is-on { color: var(--harbour); border-left-color: var(--harbour); font-weight: 700; }
.toc-tools { margin-top: 22px; display: grid; gap: 10px; }
@media (max-width: 960px) { .article-grid { grid-template-columns: 1fr; } .toc { position: static; } .toc ol { display: none; } .toc.is-open ol { display: block; } .toc-h { display: flex; justify-content: space-between; cursor: pointer; padding: 12px 14px; background: var(--paper); border-radius: 12px; } }
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; background: var(--sun); z-index: 40; }

.prose { max-width: 72ch; font-size: 18px; line-height: 1.66; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: clamp(29px, 2.8vw, 38px); line-height: 1.08; margin: 1.9em 0 .55em; scroll-margin-top: 20px; }
.prose h3 { font-size: 21px; line-height: 1.3; margin: 1.6em 0 .45em; scroll-margin-top: 20px; }
.prose h4 { font-size: 18px; margin: 1.4em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--harbour); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose > :first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; margin: 1.4em 0 1.6em; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.prose table, .table-wrap table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.table-wrap thead th { background: var(--mist); font-size: 14px; color: var(--harbour); }
.table-wrap tbody th { font-weight: 700; }
.table-wrap tr:last-child th, .table-wrap tr:last-child td { border-bottom: 0; }

.callout { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; margin: 1.6em 0; padding: 18px 20px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); font-size: 16.5px; line-height: 1.55; }
.callout-flag { display: block; padding-top: 3px; }
.callout-flag svg { display: block; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.callout-h { font-weight: 700; color: var(--ink); margin-bottom: .35em; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-warn { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.callout-warn .callout-h { color: var(--warn); }
.callout-tip { background: color-mix(in srgb, var(--info) 8%, var(--surface)); border-color: color-mix(in srgb, var(--info) 30%, var(--line)); }
.callout-expert { background: var(--mist); border-color: var(--mist-2); }

.facts { margin: 0 0 2em; padding: 22px 24px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); }
.facts-h, .prose .facts-h { font-family: var(--text-font); font-weight: 700; font-size: 15px; color: var(--muted); margin: 0 0 12px; }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.facts dl div { padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 13.5px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 16px; line-height: 1.4; }
@media (max-width: 600px) { .facts dl { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 1.4em 0 1.8em; padding: 0; counter-reset: st; }
.steps li { position: relative; padding: 0 0 22px 56px; counter-increment: st; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: 2px solid var(--harbour); color: var(--harbour); font-weight: 700; font-size: 16px; }
.steps li::after { content: ""; position: absolute; left: 18px; top: 40px; bottom: 2px; border-left: 2px dashed var(--line-2); }
.steps li:last-child::after { display: none; }
.steps .step-h { font-weight: 700; color: var(--ink); margin-bottom: .2em; }
.steps p { margin: 0 0 .3em; }

.checklist { margin: 1.8em 0; padding: 20px 22px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.checklist-head { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: start; margin-bottom: 10px; }
.checklist-h { font-size: 20px; line-height: 1.25; margin: 0 0 2px !important; }
.checklist-count { margin: 0 !important; font-size: 14px; color: var(--muted); }
.checklist ul { list-style: none; padding: 0 !important; margin: 0 !important; }
.checklist li { margin: 0; border-top: 1px solid var(--mist); }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; cursor: pointer; font-size: 16.5px; line-height: 1.45; }
.checklist input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--harbour); }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.checklist-group { font-weight: 700; margin: 14px 0 4px !important; color: var(--harbour); }

.faq { margin: 1em 0 1.6em; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 16px 40px 16px 0; font-weight: 700; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 2px solid var(--harbour); border-bottom: 2px solid var(--harbour); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 16px; }
.faq details > div p { margin: 0; }

.ask-agent a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.ask-agent a:hover { border-color: var(--harbour); }
.ask-agent q { font-weight: 400; color: var(--muted); }

.fallback-note { padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); font-size: 15px; margin-bottom: 18px; }

/* ---------- City guide ---------- */
.place-hero { position: relative; padding: clamp(24px, 4vw, 48px) 0 0; }
.place-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
.place-hero h1 { font-size: clamp(52px, 8vw, 116px); line-height: .92; letter-spacing: -.02em; margin-bottom: 18px; }
.place-art { border-radius: 6px; padding: 10px; background: var(--paper); box-shadow: var(--shadow); transform: rotate(1.2deg); }
.place-art svg { display: block; width: 100%; height: auto; border-radius: 3px; }
@media (max-width: 860px) { .place-hero-grid { grid-template-columns: 1fr; } .place-art { transform: none; } }
.place-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.place-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; font-size: 15px; font-weight: 600; color: var(--harbour); background: var(--sail); }
.place-tabs a:hover { background: var(--paper); border-color: var(--harbour); }

.hood { margin: 1.4em 0; padding: 18px 20px 6px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); scroll-margin-top: 20px; }
.hood-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; align-items: baseline; margin-bottom: 8px; }
.hood h3 { margin: 0 !important; font-family: var(--display); font-weight: 400; font-size: 27px; }
.hood-rent { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hood-rent b { color: var(--ink); }
.hood-tags, .prose .hood-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.hood-tags li { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--mist); color: var(--harbour); font-weight: 600; margin: 0; }
.hood-tags li.is-x { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--text); }
.hood p { font-size: 16.5px; }
.hood-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 0 12px; border-top: 1px solid var(--mist); font-size: 14.5px; }
.hood-foot a { font-weight: 700; }
.hood-bars { margin: 1.6em 0 2em; padding: 20px 22px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); }
.hood-bars h3 { margin-top: 0 !important; font-size: 19px; }
.hood-bars p { font-size: 14.5px; color: var(--muted); }
.hbar { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 128px; gap: 12px; align-items: center; padding: 7px 0; font-size: 14.5px; border-top: 1px solid var(--mist); }
.hbar a { color: var(--ink); text-decoration: none; font-weight: 600; }
.hbar a:hover { color: var(--harbour); text-decoration: underline; }
.hbar-track { position: relative; height: 10px; border-radius: 999px; background: var(--mist); }
.hbar-track span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); }
.hbar-track span.is-x { background: var(--sun); }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) { .hbar { grid-template-columns: 1fr 108px; } .hbar-track { grid-column: 1 / -1; order: 3; } }

/* ---------- Guides index ---------- */
.topic-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.topic-filter a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; font-weight: 600; color: var(--harbour); background: var(--sail); }
.topic-filter a[aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.guide-group { margin-bottom: 56px; }
.guide-group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 2px solid var(--harbour); }
.guide-group-h h2 { font-size: clamp(28px, 3vw, 40px); }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.guide-list li { border-bottom: 1px solid var(--line); }
.guide-list a { display: block; padding: 18px 0; text-decoration: none; color: var(--ink); }
.guide-list a:hover h3 { text-decoration: underline; text-underline-offset: .15em; }
.guide-list h3 { font-size: 20px; line-height: 1.3; margin-bottom: 4px; }
.guide-list p { margin: 0; color: var(--muted); font-size: 15.5px; }
.guide-list .min { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 760px) { .guide-list { grid-template-columns: 1fr; } }

/* ---------- Glossary ---------- */
.glossary-search { max-width: 520px; margin-bottom: 26px; }
.glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.term { padding: 16px 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); scroll-margin-top: 20px; }
.term:target { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .35); }
.term h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin-bottom: 2px; }
.term .where { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.term p { margin: 0; font-size: 16px; }
@media (max-width: 760px) { .glossary { grid-template-columns: 1fr; } }

/* ---------- Relocation timeline ---------- */
.timeline { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: tl; }
.timeline > li { list-style: none; position: relative; padding: 22px 20px; background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow); }
.timeline .when { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13.5px; font-weight: 700; margin-bottom: 12px; }
.timeline h3 { font-size: 19px; margin-bottom: 8px; }
.timeline ul { margin: 0; padding-left: 1.1em; font-size: 15.5px; }
.timeline ul li { margin-bottom: 6px; }
@media (max-width: 1000px) { .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .timeline { grid-template-columns: 1fr; } }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; }
.topic-grid > div { padding: 22px 0; border-top: 1px solid var(--line); }
.topic-grid h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 8px; }
.topic-grid p { color: var(--muted); font-size: 16px; }
@media (max-width: 900px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .topic-grid { grid-template-columns: 1fr; } }

/* ---------- Country table ---------- */
.ctable td small { display: block; color: var(--muted); font-size: 13px; }
.ctable td.big { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Listing detail (feed listings without their own page) ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 160px; gap: 8px; margin: 0 0 28px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.gallery img:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; } }
.listing-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: 72px; }
@media (max-width: 960px) { .listing-grid { grid-template-columns: 1fr; } }
.desc { white-space: pre-line; }

/* ---------- Print: checklists and guides ---------- */
@media print {
	.site-head, .site-foot, .toc, .progress, .js-print, .expert-sec, .callout-expert, .hero-places, .deal-switch, .ap-mount { display: none !important; }
	body { background: #fff; font-size: 12pt; }
	.article-grid { display: block; }
	.checklist, .facts, .callout { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
	a { color: #000; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hoist-flags li, .hoist-flags svg { animation: none !important; }
	.home-photo img { transition: none; }
}

/* Search box on the site pages */
.ap-hero .ap-status:empty { margin: 8px 0 0; min-height: 0; }
.ap-mount.has-results { margin-bottom: 10px; }

/* ---------- Added components ---------- */
.hub-search { max-width: 980px; margin-top: 8px; }
.tools-stack { display: grid; gap: 28px; }
.tools-stack .tool + .tool { margin-top: 0; }
.tool { scroll-margin-top: 20px; }
.related { margin-top: 56px; padding-top: 24px; border-top: 2px solid var(--harbour); max-width: 72ch; }
.related-h { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: 4px; }
.related .guide-list { grid-template-columns: 1fr; }
.country-facts summary { font-size: 17px; }
.cf-dl { margin: 0; display: grid; gap: 10px; }
.cf-dl div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding-top: 10px; border-top: 1px solid var(--mist); }
.cf-dl dt { font-weight: 700; font-size: 15px; color: var(--harbour); }
.cf-dl dd { margin: 0; font-size: 16px; }
@media (max-width: 640px) { .cf-dl div { grid-template-columns: 1fr; gap: 2px; } }
.prose code, .prose pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--mist); border-radius: 6px; }
.prose code { padding: 2px 6px; }
.prose pre { padding: 14px 16px; overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose .tool { margin: 2em 0; }
.prose .tool .tool-grid { grid-template-columns: 1fr; }
.ctable th small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.article-grid > div { min-width: 0; }

/* =====================================================================
   LIVE EARTH DESIGN LAYER
   Everything below reads the theme colours, so admin → Design changes it.
   ===================================================================== */

body { background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--display); font-stretch: var(--display-width); font-weight: 300; letter-spacing: -.03em; }
h1 b, h2 b { font-weight: 640; }
h3 { color: var(--heading); }
.hud { font-family: var(--display); font-stretch: 72%; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
::selection { background: rgba(var(--accent-rgb), .35); }
:focus-visible { outline-color: var(--accent); }

/* Buttons */
.btn { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 28px -10px rgba(var(--accent-rgb), .7); }
.btn:hover { background: var(--sun-2); border-color: var(--sun-2); }
.btn-line { background: transparent; color: var(--heading); border-color: var(--line-2); box-shadow: none; }
.btn-line:hover { background: var(--soft); border-color: var(--heading); }
.btn-plain, .more { color: var(--heading); }
.more .ico { color: var(--accent); }

/* Header: glass bar; floats over the globe on pages with one */
.site-head { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); position: sticky; top: 0; }
.has-globe .site-head { position: absolute; left: 0; right: 0; top: 0; background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.head-row { padding: 16px 0; gap: 20px; }
.brand { font-family: var(--display); font-stretch: 125%; font-weight: 600; font-size: 21px; letter-spacing: -.02em; color: var(--heading); gap: 11px; }
:root[data-theme="light"] .logo { --logo-fill: #0a1628; }
.main-nav ul { padding: 5px; border: 1px solid var(--glass-line); border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); gap: 2px; }
.main-nav a { color: color-mix(in srgb, var(--text) 85%, var(--muted)); font-size: 15px; padding: 7px 14px; }
.main-nav a:hover { background: color-mix(in srgb, var(--heading) 8%, transparent); color: var(--heading); }
.main-nav a[aria-current="page"] { background: color-mix(in srgb, var(--heading) 12%, transparent); color: var(--heading); }
.lang-menu summary, .theme-toggle, .nav-toggle { border: 1px solid var(--glass-line); background: var(--glass); color: var(--heading); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lang-menu ul { background: var(--surface); border-color: var(--line); }
.lang-menu a { color: var(--text); }
.lang-menu a:hover { background: var(--soft); }
.lang-menu[open] summary { background: var(--surface); }
.theme-toggle { width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.theme-toggle .ico { grid-area: 1 / 1; transition: opacity .25s, transform .4s; }
.theme-toggle .i-sun, .theme-toggle svg:has(.i-sun) { }
:root:not([data-theme="light"]) .theme-toggle svg:last-child, :root[data-theme="light"] .theme-toggle svg:first-child { opacity: 0; transform: rotate(-60deg) scale(.6); }
@media (max-width: 1080px) {
	.main-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
	.main-nav ul { background: none; border: 0; backdrop-filter: none; }
	.has-globe .main-nav { top: 72px; }
}

/* Sections */
.section-mist { background: color-mix(in srgb, var(--soft) 55%, var(--bg)); }
.section-paper { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.sec-head h2 { font-size: clamp(30px, 3.3vw, 46px); max-width: 24ch; }
.eyebrow { display: block; color: var(--accent); margin-bottom: 12px; }

/* ---------- Hero with the live Earth ---------- */
.hero-globe { position: relative; min-height: max(760px, 100svh); padding: 0; overflow: hidden; isolation: isolate; background: radial-gradient(1000px 700px at 75% 60%, rgba(var(--info-rgb), .09), transparent 65%), var(--bg); }
.hero-globe::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(var(--bg-rgb), .92) 0%, rgba(var(--bg-rgb), .55) 34%, rgba(var(--bg-rgb), 0) 52%); }
.globe { position: absolute; inset: 0; z-index: -1; }
.globe-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity 1.2s ease; cursor: grab; }
.globe.is-ready .globe-canvas { opacity: 1; }
.globe.is-dragging .globe-canvas { cursor: grabbing; }
.globe-poster { position: absolute; inset: 0; background: var(--poster, none) no-repeat 100% 100% / cover; transition: opacity 1.2s ease; }
.globe.is-ready .globe-poster { opacity: 0; }
.hero-in { position: relative; padding-top: 118px; padding-bottom: 96px; }
.hero-globe h1 { font-size: clamp(40px, 4.7vw, 72px); line-height: .97; letter-spacing: -.035em; margin: 20px 0 18px; max-width: 10.5ch; font-weight: 250; }
.hero-globe .lead { max-width: 52ch; color: color-mix(in srgb, var(--text) 82%, var(--muted)); font-size: clamp(17px, 1.3vw, 18.5px); margin-bottom: 28px; }
.live { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 7px 14px 7px 11px; border: 1px solid var(--glass-line); border-radius: 999px; background: var(--glass); color: color-mix(in srgb, var(--text) 85%, var(--muted)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.live .sep { width: 1px; height: 12px; background: var(--line-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ap-ping 2s infinite; }
@keyframes ap-ping { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); } 80%, 100% { box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0); } }
.hero-globe .ap-mount { max-width: 620px; }
.hero-places { gap: 7px; margin-top: 18px; color: var(--muted); }
.hero-places .hud { margin-right: 4px; }
.hero-places a { padding: 6px 13px; border: 1px solid var(--glass-line); color: var(--text); background: var(--glass); font-size: 14.5px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-places a:hover, .hero-places a:focus-visible { border-color: rgba(var(--accent-rgb), .7); background: var(--glass); color: var(--heading); }

.callouts { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.leaders line { stroke: rgba(var(--accent-rgb), .55); stroke-width: 1; transition: opacity .3s; }
.leaders circle { fill: none; stroke: rgba(var(--accent-rgb), .8); stroke-width: 1.2; }
.co { position: absolute; left: -999px; top: 0; pointer-events: auto; text-decoration: none; padding: 8px 12px 9px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; color: var(--text); transition: opacity .35s, border-color .2s; opacity: 0; }
.co:hover, .co.hot { border-color: rgba(var(--accent-rgb), .75); text-decoration: none; }
.co b { display: block; font-family: var(--display); font-stretch: 115%; font-weight: 560; font-size: 15.5px; letter-spacing: -.01em; color: var(--heading); line-height: 1.2; }
.co .r { display: block; color: color-mix(in srgb, var(--accent) 75%, var(--heading)); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.co .t { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--muted); font-size: 11px; min-height: 13px; }
.co .t svg { flex: none; color: var(--info); }
.hud-corner { position: absolute; right: 24px; bottom: 70px; margin: 0; text-align: right; color: color-mix(in srgb, var(--text) 75%, transparent); line-height: 1.7; padding: 8px 12px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 11px; }
.js-sunline { color: var(--info); }

.ticker { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--glass-line); background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; }
.ticker-in { display: flex; gap: 46px; padding: 14px 0; width: max-content; animation: ap-marquee 80s linear infinite; }
.ticker:hover .ticker-in, .ticker:focus-within .ticker-in { animation-play-state: paused; }
.ticker a { white-space: nowrap; color: var(--muted); font-size: 14.5px; text-decoration: none; }
.ticker a:hover b { text-decoration: underline; }
.ticker .hud { color: var(--accent); margin-right: 8px; font-size: 11.5px; }
.ticker b { color: var(--heading); font-weight: 500; }
@keyframes ap-marquee { to { transform: translateX(-50%); } }

@media (max-width: 900px) {
	.hero-globe { min-height: 0; }
	.hero-globe::after { background: linear-gradient(180deg, rgba(var(--bg-rgb), 0) 0, rgba(var(--bg-rgb), .15) 200px, rgba(var(--bg-rgb), .9) 360px, var(--bg) 470px); }
	.hero-in { padding-top: 320px; padding-bottom: 86px; }
	.hero-globe h1 { font-size: clamp(38px, 11vw, 52px); }
	.co, .leaders line, .hud-corner { display: none; }
	.globe-poster { background-position: 70% 0; background-size: 160% auto; }
}

/* Without the globe (switched off in admin) the hero is a plain band */
.hero-globe:not(:has(.globe)) .hero-in { padding-top: 120px; }

/* ---------- Listing cards ---------- */
.home-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s, border-color .25s; }
.home-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.home-photo { background: radial-gradient(120% 90% at 70% 15%, color-mix(in srgb, var(--info) 22%, var(--soft)), var(--soft) 72%); }
.home-nophoto { color: color-mix(in srgb, var(--info) 45%, transparent); }
.home-badge { background: var(--glass); color: var(--heading); border: 1px solid var(--glass-line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: none; }
.home-badge.is-rent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.home-price { font-stretch: 112%; font-weight: 560; font-size: 24px; letter-spacing: -.01em; color: var(--heading); }
.home-title { color: var(--text); }
.home-place .ico { color: var(--info); }
.home-agency { border-top-color: var(--line); }
.rail-nav button, .pager a, .pager span { background: var(--surface); color: var(--heading); border-color: var(--line-2); }
.homes-empty { background: var(--surface); }
.homes-empty h3 { font-stretch: var(--display-width); font-weight: 400; }

/* ---------- Place cards (orbital view of each city) ---------- */
.postcards { gap: 20px; }
.postcard { padding: 0; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .25s, border-color .25s; }
.postcard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.postcard-art { border-radius: 0; aspect-ratio: 16 / 10; background: #02040a var(--art-n, none) center / cover no-repeat; transition: background-size .6s; }
:root[data-theme="light"] .postcard-art { background-image: var(--art-d, none); }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .postcard-art { background-image: var(--art-d, none); } }
.postcard-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(2, 4, 10, .55)); }
.postcard-art svg { display: none; }
.postcard-art .pin { display: none; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 1.5px solid rgb(var(--accent-rgb)); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); animation: ap-ping 2.4s infinite; z-index: 1; }
.postcard-stamp { right: 12px; top: 12px; padding: 0; background: none; filter: none; z-index: 1; }
.postcard-stamp b { min-width: 0; padding: 5px 9px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 999px; font-family: var(--display); font-stretch: 72%; font-weight: 500; font-size: 11.5px; letter-spacing: .14em; color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.postcard-stamp small { display: inline; margin: 0 0 0 6px; font-family: inherit; font-size: inherit; color: rgba(255, 255, 255, .7); }
.postcard-body { padding: 16px 18px 18px; }
.postcard h3 { font-family: var(--display); font-stretch: var(--display-width); font-weight: 400; font-size: 27px; letter-spacing: -.02em; }
.postcard-coords { font-family: var(--display); font-stretch: 72%; text-transform: uppercase; letter-spacing: .12em; font-size: 11.5px; color: var(--info); }
.postcard-facts { border-top: 1px solid var(--line); }
.postcard-facts dd { color: var(--heading); }

/* ---------- Route, advice, tools ---------- */
.route li::before { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); font-family: var(--display); font-stretch: 100%; }
.route li::after { border-top: 1px dashed var(--line-2); }
.advice-cols { border-top: 1px solid var(--line-2); }
.advice-col h3, .tool-h h2, .tool-h h3, .hood h3, .term h3, .postcard h3, .homes-empty h3 { font-family: var(--display); font-stretch: var(--display-width); font-weight: 400; letter-spacing: -.02em; }
.advice-col h3 { font-size: 26px; }
.link-list a { color: var(--text); }
.link-list a:hover { color: var(--heading); }
.tool, .expert-form, .facts, .checklist, .hood-bars, .timeline > li, .filters { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.result { background: color-mix(in srgb, var(--soft) 60%, var(--bg)); border: 1px solid var(--line); }
.result-total strong { font-stretch: 112%; font-weight: 500; color: var(--heading); }
.rangebar span, .hbar-track span { background: var(--info); }
.hbar-track span.is-x { background: var(--accent); }
.field input[type=number], .field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea, .input { background: color-mix(in srgb, var(--bg) 55%, var(--surface)); border-color: var(--line-2); color: var(--text); }
.seg input:checked + span, .deal-switch input:checked + span { background: var(--surface); color: var(--heading); }
.check input, .checklist input { accent-color: var(--accent); }
.tool-index a { color: var(--text); }
.tool-index .ico { color: var(--accent); }

/* Agencies band and footer stay dark in both themes */
.section-deep { background: radial-gradient(800px 400px at 85% 0%, rgba(var(--accent-rgb), .08), transparent 60%), var(--deep); }
.section-deep h2 { color: #fff; }
.terms { border-top-color: rgba(160, 200, 255, .14); }
.terms li { border-bottom-color: rgba(160, 200, 255, .14); }
.site-foot .logo { --logo-fill: #06101f; --logo-roof: #fff; }
.flag-legend, .foot-base { border-top-color: rgba(160, 200, 255, .12); }

/* ---------- Inner pages ---------- */
.page-hero h1, .article-head h1 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.02; }
.page-hero, .article-head { position: relative; }
.page-hero::before, .article-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 100%; z-index: -1; background: radial-gradient(700px 300px at 85% 0%, rgba(var(--info-rgb), .08), transparent 70%); pointer-events: none; }
.crumbs a { color: var(--muted); }
.topic-tag { background: var(--accent); color: var(--on-accent); }
.toc a.is-on { color: var(--heading); border-left-color: var(--accent); }
.progress { background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .7); }
.prose h2 { font-size: clamp(26px, 2.5vw, 34px); }
.prose li::marker { color: var(--accent); }
.table-wrap { background: var(--surface); }
.table-wrap thead th { background: var(--soft); color: var(--heading); }
.callout { background: var(--surface); }
.callout-expert { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.steps li::before { background: var(--bg); border: 1.5px solid var(--accent); color: var(--accent); }
.faq summary::after { border-color: var(--accent); }
.hood { background: var(--surface); }
.hood-tags li { background: var(--soft); color: var(--text); }
.term:target { border-color: var(--accent); }
.topic-filter a, .place-tabs a { background: var(--glass); color: var(--text); border-color: var(--line-2); }
.topic-filter a[aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.place-tabs a:hover, .topic-filter a:hover { border-color: var(--heading); background: var(--soft); }
.timeline .when { background: transparent; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .6); }
.ask-agent a { background: var(--surface); color: var(--text); }
.cf-dl dt { color: var(--heading); }

/* ---------- City guide header with the globe turned to the city ---------- */
.place-hero.has-globe-hero { min-height: 560px; padding: 120px 0 40px; overflow: hidden; isolation: isolate; }
.place-hero.has-globe-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(var(--bg-rgb), .92) 0%, rgba(var(--bg-rgb), .6) 38%, rgba(var(--bg-rgb), 0) 60%), linear-gradient(0deg, var(--bg) 0, rgba(var(--bg-rgb), 0) 120px); }
.place-hero h1 { font-size: clamp(44px, 6.2vw, 96px); font-weight: 300; }
.place-hero .co { opacity: 1; }
@media (max-width: 900px) { .place-hero.has-globe-hero { padding-top: 300px; min-height: 0; } .place-hero.has-globe-hero::after { background: linear-gradient(180deg, rgba(var(--bg-rgb), 0) 120px, var(--bg) 320px); } }

@media (prefers-reduced-motion: reduce) {
	.ticker-in { animation: none; }
	.dot, .postcard-art .pin { display: none; animation: none; }
	.home-card, .postcard { transition: none; }
}

/* The search widget on our own pages takes the site theme */
html .ap, html .ap-floating {
	--ap-accent: var(--accent); --ap-accent-ink: var(--on-accent); --ap-sun: var(--accent); --ap-info: var(--info);
	--ap-ink: var(--text); --ap-heading: var(--heading); --ap-muted: var(--muted); --ap-line: var(--line-2); --ap-bg: var(--surface);
	--ap-soft: var(--soft); --ap-field: color-mix(in srgb, var(--bg) 55%, var(--surface)); --ap-warn: var(--warn);
	--ap-display: var(--display); --ap-radius: var(--r-card);
}
.place-hero .globe-poster { background: #02040a var(--art-n, none) center / cover no-repeat; left: 40%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
:root[data-theme="light"] .place-hero .globe-poster { background-image: var(--art-d, none); background-color: transparent; }
.place-hero-grid { grid-template-columns: minmax(0, 1fr); }
.place-hero-grid > div { max-width: 680px; }
.place-hero .lead { color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
@media (max-width: 520px) {
	.head-row { gap: 8px; }
	.brand { font-size: 18px; gap: 8px; }
	.brand .logo { width: 28px; height: 28px; }
	.head-tools { gap: 6px; }
	.lang-menu summary { padding: 7px 10px; }
	.lang-menu summary .ico { display: none; }
	.theme-toggle, .nav-toggle { width: 38px; height: 38px; }
}
@media (max-width: 900px) {
	.has-globe .site-head { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
