:root {
  --radius: 0.875rem;
  --background: #F8FAFC;
  --foreground: #1E293B;
  --surface: #EEF3F9;
  --card: #FFFFFF;
  --card-foreground: #1E293B;
  --popover: #FFFFFF;
  --popover-foreground: #1E293B;
  --primary: #0F4C81;
  --primary-foreground: #FFFFFF;
  --primary-deep: #0A3760;
  --secondary: #E6EEF6;
  --secondary-foreground: #0F4C81;
  --muted: #F1F5F9;
  --muted-foreground: #64748B;
  --accent: #F6A623;
  --accent-foreground: #1E293B;
  --teal: #3AB7A5;
  --teal-foreground: #06302B;
  --destructive: #DC2626;
  --destructive-foreground: #FFFFFF;
  --border: #E2E8F0;
  --input: #E2E8F0;
  --ring: #0F4C81;
  --gradient-hero: linear-gradient(135deg, #0A3760 0%, #0F4C81 55%, #1864A8 100%);
  --gradient-soft: linear-gradient(180deg, #F8FAFC 0%, #EEF3F9 100%);
  --shadow-elegant: 0 24px 60px -24px rgba(15, 76, 129, 0.35);
  --shadow-card: 0 12px 32px -16px rgba(15, 76, 129, 0.20);
  --hero-overlay: linear-gradient(135deg, rgba(10, 55, 96, 0.85) 0%, rgba(15, 76, 129, 0.65) 100%);
  --font-display: "Poppins", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --site-header-h: 4rem;
}
@media (min-width: 640px) {
  :root { --site-header-h: 4.5rem; }
}
@media (min-width: 768px) {
  :root { --site-header-h: 5rem; }
}

* { border-color: var(--border); }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-top: calc(var(--site-header-h) + env(safe-area-inset-top, 0px));
}
@media (max-width: 767px) {
  main {
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }
  #site-footer footer {
    margin-top: 2.5rem;
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
  #site-footer footer > .container-x:first-child {
    padding-top: 2rem;
    padding-bottom: 2rem;
    gap: 1.5rem;
  }
  #site-footer footer .border-t .container-x {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.container-x {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1rem;
  max-width: 80rem;
}
@media (min-width: 640px) {
  .container-x { padding-inline: 1.25rem; }
}

/* Fixed site header — stays on top while scrolling */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  width: 100%;
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header-bar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background-color: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header-bar .container-x {
  height: var(--site-header-h);
}

/* Property page section nav sits below fixed header */
main > nav.sticky.top-0 {
  top: calc(var(--site-header-h) + env(safe-area-inset-top, 0px));
  z-index: 40;
}

.bg-background { background-color: var(--background); }
.bg-surface { background-color: var(--surface); }
.bg-card { background-color: var(--card); }
.bg-primary { background-color: var(--primary); }
.bg-primary-deep { background-color: var(--primary-deep); }
.bg-accent { background-color: var(--accent); }
.text-foreground { color: var(--foreground); }
.text-primary { color: var(--primary); }
.text-primary-deep { color: var(--primary-deep); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-accent { color: var(--accent); }
.text-accent-foreground { color: var(--accent-foreground); }
.text-primary-foreground { color: var(--primary-foreground); }
.border-border { border-color: var(--border); }
.border-input { border-color: var(--input); }

.hero-overlay { background-image: var(--hero-overlay); }
.gradient-hero { background-image: var(--gradient-hero); }
.shadow-elegant { box-shadow: var(--shadow-elegant); }
.shadow-card { box-shadow: var(--shadow-card); }

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .lg\:sticky.lg\:top-20 {
    top: calc(var(--site-header-h) + 1rem + env(safe-area-inset-top, 0px)) !important;
  }
  .lg\:sticky.lg\:top-28 {
    top: calc(var(--site-header-h) + 2rem + env(safe-area-inset-top, 0px)) !important;
  }
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--secondary);
}

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* FAQ section */
.faq-section {
  position: relative;
  overflow: hidden;
}
.faq-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 20% 0%, rgba(15, 76, 129, 0.06), transparent 60%),
              radial-gradient(ellipse 60% 40% at 90% 100%, rgba(246, 166, 35, 0.08), transparent 55%);
  pointer-events: none;
}
.faq-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}
.faq-mosaic__hero {
  grid-column: 1 / -1;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.faq-mosaic__thumb {
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: var(--shadow-card);
}
.faq-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.faq-mosaic figure:hover img {
  transform: scale(1.05);
}
.faq-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.1), rgba(246, 166, 35, 0.15));
  border: 1px solid rgba(15, 76, 129, 0.15);
  padding: 0.375rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--primary);
}
.faq-cta-card {
  background: var(--gradient-hero);
  border-radius: 1.25rem;
  padding: 1.5rem;
  color: #fff;
  box-shadow: var(--shadow-elegant);
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.faq-item {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.faq-item:hover {
  border-color: rgba(15, 76, 129, 0.25);
  box-shadow: var(--shadow-card);
}
.faq-item[open] {
  border-color: rgba(15, 76, 129, 0.35);
  box-shadow: var(--shadow-elegant);
  background: linear-gradient(135deg, #fff 0%, rgba(230, 238, 246, 0.5) 100%);
}
.faq-item__summary {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  list-style: none;
}
.faq-item__num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(246, 166, 35, 0.15);
  color: var(--primary-deep);
  font-size: 0.6875rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 0.125rem;
  transition: background 0.25s, color 0.25s;
}
.faq-item[open] .faq-item__num {
  background: var(--primary);
  color: #fff;
}
.faq-item__question {
  flex: 1;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.45;
  padding-right: 0.5rem;
}
.faq-item__toggle {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--primary);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform 0.3s ease, background 0.25s, color 0.25s;
}
.faq-item[open] .faq-item__toggle {
  transform: rotate(45deg);
  background: var(--accent);
  color: var(--accent-foreground);
}
.faq-item__answer {
  padding: 0 1.25rem 1.25rem 3.75rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted-foreground);
  border-top: 1px solid transparent;
}
.faq-item[open] .faq-item__answer {
  border-top-color: var(--border);
  padding-top: 0.875rem;
  animation: faqReveal 0.35s ease-out;
}
@keyframes faqReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.faq-trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.faq-trust-pill {
  text-align: center;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.75rem 0.5rem;
}
.faq-trust-pill strong {
  display: block;
  font-size: 1.125rem;
  color: var(--primary);
  font-family: var(--font-display);
}
.faq-trust-pill span {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media print {
  .print\:hidden { display: none !important; }
}

/* AI Chat Assistant — left side */
.ia-chat-root {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 45;
  font-family: var(--font-sans);
}
.ia-chat-launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem 0.625rem 0.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: var(--shadow-elegant);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.25s;
  max-width: calc(100vw - 2rem);
}
.ia-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 64px -20px rgba(15, 76, 129, 0.45);
}
.ia-chat-launcher--hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}
.ia-chat-launcher__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.ia-chat-launcher__text {
  text-align: left;
  line-height: 1.2;
  padding-right: 0.25rem;
}
.ia-chat-launcher__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: var(--font-display);
}
.ia-chat-launcher__sub {
  display: block;
  font-size: 0.6875rem;
  opacity: 0.85;
  margin-top: 0.125rem;
}
.ia-chat-launcher__pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: var(--accent);
  border: 2px solid #fff;
  animation: chatPulse 2s ease-in-out infinite;
}
@keyframes chatPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}
.ia-chat-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 6rem));
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elegant);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom left;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.ia-chat-panel--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.ia-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 1rem 1.125rem;
  color: #fff;
  flex-shrink: 0;
}
.ia-chat-header__info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ia-chat-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.ia-chat-header__title {
  font-weight: 700;
  font-size: 0.9375rem;
  font-family: var(--font-display);
}
.ia-chat-header__status {
  font-size: 0.6875rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.125rem;
}
.ia-chat-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #4ade80;
  animation: chatPulse 2s ease-in-out infinite;
}
.ia-chat-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.ia-chat-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.ia-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 12rem;
  max-height: 20rem;
  background: var(--background);
}
.ia-chat-msg {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  max-width: 92%;
}
.ia-chat-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.ia-chat-msg--bot {
  align-self: flex-start;
}
.ia-chat-msg__avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: rgba(15, 76, 129, 0.1);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ia-chat-msg__bubble {
  padding: 0.625rem 0.875rem;
  border-radius: 1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
}
.ia-chat-msg--bot .ia-chat-msg__bubble {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
  border-bottom-left-radius: 0.25rem;
}
.ia-chat-msg--user .ia-chat-msg__bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}
.ia-chat-msg__bubble .chat-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}
.ia-chat-msg--user .ia-chat-msg__bubble .chat-link {
  color: var(--accent);
}
.ia-chat-typing {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  padding: 0.25rem 0;
}
.ia-chat-typing span {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--muted-foreground);
  animation: chatTyping 1.2s ease-in-out infinite;
}
.ia-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.ia-chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.ia-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0 1rem 0.75rem;
  background: var(--background);
  flex-shrink: 0;
}
.ia-chat-chip {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--primary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.ia-chat-chip:hover {
  background: var(--secondary);
  border-color: rgba(15, 76, 129, 0.25);
}
.ia-chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
}
.ia-chat-input {
  flex: 1;
  border: 1px solid var(--input);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  background: var(--background);
  outline: none;
}
.ia-chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15, 76, 129, 0.15);
}
.ia-chat-send {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.ia-chat-send:hover {
  opacity: 0.9;
}
.ia-chat-disclaimer {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  text-align: center;
  padding: 0.5rem 1rem 0.75rem;
  background: var(--card);
  line-height: 1.4;
  flex-shrink: 0;
}
.ia-chat-disclaimer a {
  color: var(--primary);
  font-weight: 600;
}
@media (max-width: 480px) {
  .ia-chat-root {
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    left: calc(0.75rem + env(safe-area-inset-left, 0px));
  }
  .ia-chat-launcher__text { display: none; }
  .ia-chat-launcher { padding: 0.75rem; border-radius: 9999px; }
  .ia-chat-panel {
    width: calc(100vw - 1.5rem);
    max-height: min(34rem, calc(100dvh - 5rem));
  }
  .ia-chat-messages { max-height: min(20rem, calc(100dvh - 16rem)); }
}

/* ── Mobile responsive (site-wide) ── */
@media (max-width: 639px) {
  .faq-section { padding-block: 3rem; }
  .faq-item__summary { padding: 0.875rem 1rem; gap: 0.75rem; }
  .faq-item__question { font-size: 0.875rem; padding-right: 0; }
  .faq-item__answer { padding: 0.75rem 1rem 1rem; }
  .faq-trust-row { grid-template-columns: 1fr; }
  .faq-cta-card { padding: 1.25rem; }
  .faq-mosaic { gap: 0.5rem; }
}

.prop-hero {
  height: 50vh !important;
  min-height: 17.5rem !important;
}
@media (min-width: 640px) {
  .prop-hero { height: 55vh !important; min-height: 22.5rem !important; }
}
@media (min-width: 768px) {
  .prop-hero { height: 58vh !important; min-height: 26.25rem !important; }
}
@media (max-width: 639px) {
  .prop-hero .flex.flex-wrap.items-end { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .prop-hero .text-right { text-align: left; width: 100%; }
  .prop-hero #prop-name { font-size: 1.75rem; line-height: 1.15; }
}

.prop-subnav-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.prop-subnav-wrap::-webkit-scrollbar { display: none; }
.prop-subnav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.75rem;
  min-width: min-content;
}
.prop-subnav a {
  flex-shrink: 0;
  white-space: nowrap;
}
.prop-subnav a[href="#enquiry"] {
  margin-left: auto;
}

.filter-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
  margin-inline: -0.25rem;
  padding-inline: 0.25rem;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-scroll > * { flex-shrink: 0; }

.sticky-cta-cluster {
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
}
@media (max-width: 480px) {
  .sticky-cta-cluster {
    flex-direction: row;
    gap: 0.5rem;
    max-width: calc(100vw - 5.5rem);
  }
  .sticky-cta-cluster .sticky-cta-btn {
    padding: 0.625rem 0.875rem;
    font-size: 0.6875rem;
    gap: 0.375rem;
  }
  .sticky-cta-cluster .sticky-cta-btn svg { width: 0.875rem; height: 0.875rem; }
}

.newsletter-row {
  flex-direction: column;
}
.newsletter-row input,
.newsletter-row button {
  width: 100%;
}
@media (min-width: 480px) {
  .newsletter-row { flex-direction: row; }
  .newsletter-row input { width: auto; flex: 1; }
  .newsletter-row button { width: auto; }
}

.mobile-nav-backdrop {
  position: fixed;
  top: calc(var(--site-header-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background: rgba(10, 55, 96, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.mobile-nav-panel {
  position: fixed;
  top: calc(var(--site-header-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background-color: var(--background);
  border-top: 1px solid var(--border);
  box-shadow: 0 12px 32px -12px rgba(15, 76, 129, 0.2);
}

body.mobile-nav-open .sticky-cta-cluster,
body.mobile-nav-open .ia-chat-root {
  visibility: hidden;
  pointer-events: none;
}

/* Stat grids & large numerals on small screens */
@media (max-width: 639px) {
  .impact-stat-num {
    font-size: 2.25rem !important;
    line-height: 1.1;
  }
  .impact-stat-cell {
    padding: 1.25rem 1rem !important;
  }
}

/* Forms & cards — tighter padding on phones */
@media (max-width: 639px) {
  .form-panel-compact { padding: 1.25rem !important; }
  .form-header-compact { padding: 1.25rem 1.5rem !important; }
}

/* Property zone explorer controls */
@media (max-width: 639px) {
  .zone-nav-row,
  #zone-panel .zone-nav-row {
    flex-direction: column;
    align-items: stretch;
  }
  .zone-nav-row > *,
  #zone-panel .zone-nav-row > * {
    width: 100%;
    justify-content: center;
  }
}

/* Embedded maps */
.map-embed {
  width: 100%;
  min-height: 14rem;
  aspect-ratio: 16 / 10;
}

/* Prevent long strings from breaking layout */
a, p, li, td, th { overflow-wrap: anywhere; word-break: break-word; }

/* Touch-friendly tap targets */
@media (pointer: coarse) {
  .mobile-nav-link { min-height: 2.75rem; display: flex; align-items: center; }
  #mobile-menu-btn { min-width: 2.75rem; min-height: 2.75rem; }
}

/* Tighter section rhythm on phones */
@media (max-width: 639px) {
  main > section[class~="py-20"],
  main > section[class*="py-20"] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  main > section[class*="md:py-28"] {
    padding-bottom: 3.5rem !important;
  }
  .container-x.py-6.grid { gap: 1rem; }
  .container-x.py-6.grid .text-sm { font-size: 0.75rem; }
}

/* ── Resources page ── */
.resources-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
  max-width: 28rem;
}
.resources-hero__stat {
  text-align: center;
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 0.5rem;
  backdrop-filter: blur(6px);
}
.resources-hero__stat strong {
  display: block;
  font-size: 1.25rem;
  font-family: var(--font-display);
  color: #fff;
}
.resources-hero__stat span {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.resource-featured {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-elegant);
}
.resource-featured__media {
  position: relative;
  overflow: hidden;
}
.resource-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.resource-featured:hover .resource-featured__media img {
  transform: scale(1.04);
}
.resource-featured__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 0.375rem 0.875rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.resource-featured__body {
  padding: 2rem;
}
@media (min-width: 768px) {
  .resource-featured__body { padding: 2.5rem; }
}

.resource-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) {
  .resource-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
  }
}
.resource-search {
  position: relative;
  flex: 1;
  max-width: 100%;
}
@media (min-width: 768px) {
  .resource-search { max-width: 22rem; }
}
.resource-search__icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}
.resource-search__input {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: 9999px;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  font-size: 0.875rem;
  background: var(--background);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.resource-search__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.resource-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.125rem;
}
.resource-filters::-webkit-scrollbar { display: none; }

.resource-filter-btn {
  flex-shrink: 0;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.resource-filter-btn:hover {
  border-color: rgba(15, 76, 129, 0.35);
  color: var(--primary);
}
.resource-filter-btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(15, 76, 129, 0.45);
}
.resource-filter-btn--active:hover {
  color: #fff;
}

.resource-count {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.resource-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .resource-grid { grid-template-columns: repeat(3, 1fr); }
}

.resource-card {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.resource-card:hover {
  border-color: rgba(15, 76, 129, 0.25);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.resource-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.resource-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.resource-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.resource-card:hover .resource-card__img {
  transform: scale(1.05);
}
.resource-card__cat {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.625rem;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--primary-deep);
}
.resource-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.25rem 1.5rem;
}
.resource-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  transition: color 0.2s;
}
.resource-card:hover .resource-card__title {
  color: var(--primary);
}
.resource-card__excerpt {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted-foreground);
  flex: 1;
}
.resource-card__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.resource-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
}

.resource-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 1.25rem;
  border: 1px dashed var(--border);
  background: var(--surface);
}
.resource-empty__icon {
  width: 3rem;
  height: 3rem;
  margin-inline: auto;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.resource-guide {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: var(--shadow-elegant);
}
.resource-guide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 100% 0%, rgba(246, 166, 35, 0.2), transparent 55%);
  pointer-events: none;
}
.resource-guide__inner {
  position: relative;
  display: grid;
  gap: 2rem;
  padding: 2rem;
}
@media (min-width: 768px) {
  .resource-guide__inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 2.5rem 3rem;
    gap: 3rem;
  }
}
.resource-guide__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .resource-guide__form { flex-direction: row; }
}
.resource-guide__input {
  flex: 1;
  min-width: 0;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: #fff;
  outline: none;
}
.resource-guide__input::placeholder { color: rgba(255, 255, 255, 0.55); }
.resource-guide__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(246, 166, 35, 0.25);
}
.resource-guide__btn {
  border-radius: 9999px;
  border: none;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.resource-guide__btn:hover { opacity: 0.92; }

.resource-quick-links {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .resource-quick-links { grid-template-columns: repeat(3, 1fr); }
}
.resource-quick-link {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.resource-quick-link:hover {
  border-color: rgba(246, 166, 35, 0.45);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.resource-quick-link__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: rgba(246, 166, 35, 0.15);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ── Legal pages (Privacy, Terms) ── */
.legal-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.legal-breadcrumb a:hover {
  color: var(--primary);
}
.legal-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .legal-layout {
    grid-template-columns: 14rem 1fr;
    gap: 3.5rem;
  }
}
.legal-toc {
  position: sticky;
  top: calc(var(--site-header-h) + 1.5rem + env(safe-area-inset-top, 0px));
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}
.legal-toc__title {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}
.legal-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.legal-toc__list li + li {
  margin-top: 0.5rem;
}
.legal-toc__list a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}
.legal-toc__list a:hover {
  color: var(--primary);
}
.legal-content {
  max-width: 48rem;
}
.legal-section {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.legal-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
  scroll-margin-top: calc(var(--site-header-h) + 1.5rem);
}
.legal-content h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  color: var(--foreground);
}
.legal-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}
.legal-content ul,
.legal-content ol {
  margin: 0 0 1rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted-foreground);
}
.legal-content li + li {
  margin-top: 0.375rem;
}
.legal-content a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover {
  opacity: 0.85;
}
.legal-content strong {
  color: var(--foreground);
  font-weight: 600;
}
.legal-contact-card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}
.legal-contact-card p {
  margin-bottom: 0.375rem;
  color: var(--foreground);
}
.legal-contact-card p:last-child {
  margin-bottom: 0;
}
/* SEO — breadcrumbs & related links */
.seo-breadcrumbs {
  padding: 0.75rem 0 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.seo-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0;
  list-style: none;
  margin: 0;
  padding: 0.625rem 0;
  max-width: var(--container-max, 80rem);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.seo-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}
.seo-breadcrumbs__item a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}
.seo-breadcrumbs__item a:hover {
  text-decoration: underline;
}
.seo-breadcrumbs__item span[aria-current="page"] {
  color: var(--muted-foreground, #64748b);
  font-weight: 500;
}
.seo-breadcrumbs__sep {
  margin: 0 0.5rem;
  color: var(--muted-foreground, #64748b);
  user-select: none;
}
.seo-related-links h2 {
  letter-spacing: -0.02em;
}

/* Eligibility split section */
.eligibility-split__panel {
  background: var(--card);
}
.eligibility-split__criterion {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.125rem;
  border-radius: 0.875rem;
  border: 1px solid var(--border);
  background: var(--background);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.eligibility-split__criterion:hover {
  border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
  box-shadow: 0 4px 16px rgba(15, 76, 129, 0.06);
}
.eligibility-split__criterion-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--accent) 18%, white);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
}
.eligibility-split__figure img {
  display: block;
}
.eligibility-split__doc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.eligibility-split__doc li {
  position: relative;
  padding-left: 1rem;
}
.eligibility-split__doc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 9999px;
  background: var(--accent);
}
@media (max-width: 1023px) {
  .eligibility-split__panel {
    padding: 1.5rem;
  }
}

@media (max-width: 1023px) {
  .legal-toc {
    position: static;
  }
  .legal-toc__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .legal-toc__list li + li {
    margin-top: 0;
  }
}
