/* BenSuet Stay website — same palette as the Android app (values/colors.xml). */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-semibold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-bold.woff2") format("woff2"); }

:root {
  --brand: #123DAD;
  --brand-hover: #0E3290;
  --on-brand: #FFFFFF;
  --brand-soft: #EEF4FF;
  --accent: #F2994A;
  --green: #2FA36B;
  --green-soft: #E5F7ED;
  --red: #D64545;
  --red-soft: #FBEAEA;
  /* Darker shades for small text on the soft backgrounds (WCAG AA contrast, 4.5:1 or more) */
  --green-text: #1A7348;
  --red-text: #B42F2F;
  --orange-text: #9A4D0B;
  --danger: #B83232;
  --on-danger: #FFFFFF;
  --bg: #F7F8FB;
  --surface: #FFFFFF;
  --surface-soft: #F0F3F9;
  --text: #1E2233;
  --muted: #5F6B92;
  --placeholder: #9CA3B8;
  --border: #E4E7F0;
  --shadow: 0 1px 2px rgba(18, 26, 61, .06), 0 8px 24px rgba(18, 26, 61, .06);
  --shadow-lg: 0 20px 50px rgba(18, 26, 61, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #7C9DFF;
    --brand-hover: #9BB4FF;
    --on-brand: #0D1220;
    --brand-soft: #1E2A47;
    --accent: #F5A764;
    --green: #4CC48A;
    --green-soft: #163527;
    --red: #FF8080;
    --red-soft: #3A1E22;
    --green-text: #4CC48A;
    --red-text: #FF8080;
    --orange-text: #F5A764;
    --danger: #FF8080;
    --on-danger: #0D1220;
    --bg: #0F1218;
    --surface: #181C25;
    --surface-soft: #20252F;
    --text: #E8EBF3;
    --muted: #A3ADC7;
    --placeholder: #6E7891;
    --border: #2A3040;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Links inside sentences are underlined, so they don't depend on colour alone */
:where(p, label, td, dd, .hint, .legal-doc li) a:not(.btn):not(.chip) { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: from-font; }
.legal-toc a:not(.btn):not(.chip) { text-decoration: none; }
.legal-toc a:not(.btn):not(.chip):hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--text); font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-soft); text-decoration: none; }
/* The Sign in / My account button in the menu keeps its button colours */
.nav a.btn-primary, .nav a.btn-primary:hover { background: var(--brand); color: var(--on-brand); }
.nav a.btn-primary:hover { background: var(--brand-hover); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 20px 20px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav .btn { margin-top: 8px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem/1 "Inter", system-ui, sans-serif; padding: 13px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: var(--shadow); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-whatsapp { background: #25D366; color: #08260F; }
.btn-whatsapp:hover { background: #1FBE5B; }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-sm { padding: 9px 16px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }

/* ---------- Hero + search ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 72px 0 120px;
  background: radial-gradient(1200px 500px at 85% -10%, #2E5BD6 0%, transparent 60%),
              linear-gradient(135deg, #0B2A7A 0%, #123DAD 55%, #1F4FCF 100%);
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -40px -10%; height: 120px; background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero h1 { color: #fff; max-width: 760px; }
.hero p.lead { font-size: 1.15rem; color: #DCE6FF; max-width: 620px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 500; margin-bottom: 18px;
}
.search-card {
  position: relative; z-index: 2; margin-top: -84px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg); padding: 20px;
  display: grid; grid-template-columns: 2fr 1.2fr 1fr auto; gap: 12px; align-items: end;
}
@media (max-width: 860px) { .search-card { grid-template-columns: 1fr 1fr; } .search-card .field-wide { grid-column: 1 / -1; } .search-card .btn { grid-column: 1 / -1; } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: .85rem; font-weight: 600; color: var(--text); }
.input, select.input, textarea.input {
  width: 100%; font: 400 1rem/1.4 "Inter", system-ui, sans-serif; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s; appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238891AA' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.input::placeholder { color: var(--placeholder); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input.invalid { border-color: var(--red); }
.hint { font-size: .8rem; color: var(--muted); }
.error-text { font-size: .85rem; color: var(--red-text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { text-align: center; padding: 10px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); }
.segmented input:checked + label { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Password box with an eye button */
.password-field { position: relative; }
.password-field .input { padding-right: 52px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
}
.password-toggle:hover { background: var(--surface-soft); color: var(--text); }
.password-toggle span { display: grid; place-items: center; }
.password-field input::-ms-reveal, .password-field input::-ms-clear { display: none; } /* Edge's own eye: avoid two */

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.container.section { padding-left: 20px; padding-right: 20px; } /* keep the side margin on phones */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head p { margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.panel-soft { background: var(--surface-soft); border-radius: var(--radius); padding: 24px; }

/* ---------- Listing cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; color: var(--text);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--surface-soft), var(--border)); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .placeholder, .gallery .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--placeholder); }
.card-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 1.05rem; font-weight: 600; margin: 0; }
.card-meta { color: var(--muted); font-size: .875rem; display: flex; gap: 6px; align-items: center; }
.card-foot { display: flex; align-items: end; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price { font-weight: 700; font-size: 1.1rem; }
.price small { font-weight: 500; color: var(--muted); font-size: .8rem; }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.badge-green { background: var(--green-soft); color: var(--green-text); box-shadow: none; }
.badge-blue { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.badge-orange { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--orange-text); box-shadow: none; }
.badge-red { background: var(--red-soft); color: var(--red-text); box-shadow: none; }
.badge-grey { background: var(--surface-soft); color: var(--muted); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: .875rem; font-weight: 500;
}
a.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip.active { background: var(--brand-soft); border-color: transparent; color: var(--brand); }

/* ---------- Search results ---------- */
.results-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: 88px; }
.filters .field + .field { margin-top: 14px; }
@media (max-width: 960px) { .results-layout { grid-template-columns: 1fr; } .filters { position: static; } }

/* ---------- Listing page ---------- */
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; border-radius: 20px; overflow: hidden; height: min(460px, 60vw); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery .main { grid-row: 1 / -1; position: relative; background: var(--surface-soft); }
.gallery .side { position: relative; background: var(--surface-soft); }
.gallery.single { grid-template-columns: 1fr; }
.gallery .more { position: absolute; right: 12px; bottom: 12px; }
@media (max-width: 700px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 280px; border-radius: 16px; }
  .gallery > div { flex: 0 0 88%; scroll-snap-align: center; }
}
.listing-layout { display: grid; grid-template-columns: 1fr 360px; gap: 36px; margin-top: 28px; align-items: start; }
.listing-side { position: sticky; top: 88px; }
@media (max-width: 960px) { .listing-layout { grid-template-columns: 1fr; } .listing-side { position: static; } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.fact { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: .9rem; font-weight: 500; }
.fact svg { flex: none; color: var(--brand); }
.rooms { display: grid; gap: 12px; }
.room { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.room-thumb { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--surface-soft); }
.room .price { text-align: right; }
.map-frame { width: 100%; height: 320px; border: 0; border-radius: 16px; background: var(--surface-soft); }
.landlord { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; }

/* ---------- Steps / features ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step::before {
  counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; margin-bottom: 14px;
}
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }

/* ---------- App promotion ---------- */
.app-cta {
  border-radius: 24px; padding: 36px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; color: #fff;
  background: linear-gradient(135deg, #0B2A7A, #1F4FCF);
}
.app-cta h2 { color: #fff; }
.app-cta p { color: #DCE6FF; }
.app-cta .btn-light { background: #fff; color: #123DAD; }
.app-cta ul { margin: 0; padding-left: 18px; color: #DCE6FF; }
@media (max-width: 760px) { .app-cta { grid-template-columns: 1fr; padding: 26px; } }
.app-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-lg);
}
.app-banner img { width: 42px; height: 42px; border-radius: 10px; }
.app-banner .text { flex: 1; font-size: .85rem; line-height: 1.35; }
.app-banner .close { background: none; border: 0; color: var(--muted); font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }

/* ---------- Auth & account ---------- */
.auth-wrap { max-width: 480px; margin: 48px auto; }
.auth-wrap.wide { max-width: 720px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button { background: none; border: 0; padding: 12px 6px; margin-right: 14px; font: 600 .95rem "Inter", sans-serif; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--brand); border-color: var(--brand); }
.item-row { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.item-row:last-child { border-bottom: 0; }

/* ---------- Dialogs, alerts, toasts ---------- */
dialog {
  border: 0; border-radius: 22px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(10, 14, 30, .55); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.dialog-head h3 { margin: 0; }
.dialog-body { padding: 16px 24px 24px; }
.icon-btn { background: var(--surface-soft); border: 0; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.alert { border-radius: 12px; padding: 12px 14px; font-size: .9rem; }
.alert-info { background: var(--brand-soft); color: var(--brand); }
.alert-success { background: var(--green-soft); color: var(--green-text); }
.alert-error { background: var(--red-soft); color: var(--red-text); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 100;
  background: #1E2233; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .9rem; transition: all .25s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty { text-align: center; padding: 48px 20px; }
.empty svg { color: var(--placeholder); margin: 0 auto 12px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.ref-code { font: 700 1.6rem/1 ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: .08em; color: var(--brand); }

/* ---------- Prose (policies) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; font-size: 1.3rem; scroll-margin-top: 88px; }
.prose h3 { margin-top: 1.4em; font-size: 1.05rem; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* ---------- Policy pages ---------- */
.container.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; padding: 48px 20px 24px; }
.legal-nav { position: sticky; top: 92px; }
.legal-doc { min-width: 0; } /* wide tables scroll inside .table-wrap instead of widening the page */
.legal-nav-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.legal-nav ul { list-style: none; margin: 0; padding: 0; }
.legal-nav a { display: block; padding: 7px 12px; border-radius: var(--radius-sm); color: var(--text); font-size: .92rem; }
.legal-nav a:hover { background: var(--surface-soft); text-decoration: none; }
.legal-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.legal-doc h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); margin-bottom: .3em; }
.legal-doc .eyebrow { font-size: .85rem; font-weight: 600; color: var(--brand); margin-bottom: 6px; }
.legal-meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.legal-summary { background: var(--brand-soft); border-radius: var(--radius); padding: 18px 22px; margin: 20px 0; }
.legal-summary ul { margin: 0; }
.legal-summary-title { font-weight: 700; margin-bottom: 6px; }
.legal-toc { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin: 20px 0 8px; background: var(--surface); }
.legal-toc summary { font-weight: 600; cursor: pointer; }
.legal-toc ul { list-style: none; padding: 0; margin: 10px 0 0; columns: 2; column-gap: 28px; font-size: .92rem; }
.legal-toc li { break-inside: avoid; margin-bottom: 4px; }
.callout { border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 18px 0; box-shadow: var(--shadow); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; margin-bottom: 6px; }
.table-wrap { overflow-x: auto; margin: 14px 0 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.legal-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.legal-table th { background: var(--surface-soft); font-weight: 600; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .92rem; }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 16px 0 8px; }
.policy-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; color: var(--text); }
.policy-card:hover { border-color: var(--brand); text-decoration: none; }
.policy-card strong { display: block; margin-bottom: 4px; color: var(--brand); }
.policy-card span { color: var(--muted); font-size: .88rem; line-height: 1.45; display: block; }
.details-list { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 0; margin: 14px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.details-list dt, .details-list dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.details-list dt { font-weight: 600; background: var(--surface-soft); font-size: .92rem; }
.details-list dt:last-of-type, .details-list dd:last-of-type { border-bottom: 0; }
mark.todo { background: #FFE58F; color: #3D2E00; padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.consent-note { font-size: .85rem; color: var(--muted); margin: 0; }
@media (max-width: 900px) {
  .container.legal-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 28px; }
  .legal-nav { position: static; order: 2; border-top: 1px solid var(--border); padding-top: 20px; }
  .legal-toc ul { columns: 1; }
}
@media (max-width: 560px) {
  .details-list { grid-template-columns: 1fr; }
  .details-list dt { border-bottom: 0; padding-bottom: 2px; }
}
@media print {
  .site-header, .site-footer, .legal-nav, .print-button, .app-banner, .toast, .legal-toc { display: none !important; }
  body { background: #fff; color: #000; }
  .legal-layout { display: block; }
  .legal-doc { max-width: none; }
  a { color: #000; text-decoration: underline; }
  .legal-summary, .callout, .legal-table, .details-list { background: #fff; box-shadow: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 44px 0 28px; margin-top: 64px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 28px; }
.site-footer .footer-title { margin: 0 0 10px; font-size: .85rem; font-weight: 600; line-height: 1.4; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text); }
.footer-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom a { color: var(--muted); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- Types of place and towns ---------- */
.card-type { display: flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.type-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.type-tabs label { cursor: pointer; }
.type-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.type-tabs span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .92rem; color: var(--text); transition: background .15s, color .15s, border-color .15s; }
.type-tabs input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.type-tabs input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Phones: the four choices as a tidy two-by-two grid */
@media (max-width: 560px) {
  .type-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .type-tabs span { display: flex; justify-content: center; text-align: center; height: 100%; min-height: 46px; padding: 8px 10px; font-size: .86rem; line-height: 1.2; border-radius: 14px; }
  .type-tabs span svg { display: none; }
}
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.type-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.type-card:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); }
.type-card h3 { margin: 0; font-size: 1.15rem; }
.type-card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.5; flex: 1; }
.type-card .type-count { font-weight: 600; color: var(--brand); font-size: .9rem; }
@media (max-width: 820px) { .type-grid { grid-template-columns: 1fr; } }
.search-card.search-typed { display: block; }
.search-card.search-typed .search-fields { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr auto; gap: 14px; align-items: end; }
.search-card.search-typed .search-fields[data-student] { grid-template-columns: 1.2fr 1.2fr 1fr auto; }
@media (max-width: 860px) { .search-card.search-typed .search-fields { grid-template-columns: 1fr 1fr; } .search-card.search-typed .search-fields .btn { grid-column: 1 / -1; } }
@media (max-width: 520px) { .search-card.search-typed .search-fields { grid-template-columns: 1fr; } }
