/* --- VARIABLES & PALETTE --- */
:root {
  /* Base Colors */
  --bg-cream: #F8F8F4;
  --bg-white: #FFFFFF;
  --text-main: #303036;
  --text-muted: #6B6B74;
  --line: #E5E5E5;

  /* Branding Colors */
  --brand-blue: #305F82;       /* Base Branding */
  --brand-accent: #E05A47;     /* Livelier Color (Vibrant Clay/Orange) */
  --brand-highlight: #D4E4F0;  /* Soft Blue highlight */

  /* Footer */
  --bg-dark: #111114;
  --text-light: #F2F2EB;

  /* Spacing */
  --container-width: 1100px;
  --header-safe-top: 104px;

  /* Fonts */
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Libre Baskerville', serif;

  /* Page theme (defaults) */
  --page-color: var(--brand-blue);
  --page-soft: var(--brand-highlight);

  /* Dynamic Island tokens (header) */
  --surface: var(--bg-white);
  --brand-dark: var(--bg-dark);
  --radius-pill: 50px;
  --radius-card: 24px;
  --shadow-island: 0 8px 30px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
  --transition-spring: cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

/* --- PAGE THEMES (one color per section/subpage) --- */
body[data-page="home"]      { --page-color: var(--brand-blue);   --page-soft: var(--brand-highlight); }
body[data-page="about"]     { --page-color: #2F6B8D;             --page-soft: #E1EEF6; }
body[data-page="method"]    { --page-color: #274D6A;             --page-soft: #D7E6F1; }
body[data-page="books"]     { --page-color: var(--brand-accent); --page-soft: #FBE7E3; }
body[data-page="resources"] { --page-color: #2F7A78;             --page-soft: #E4F3F2; }
body[data-page="blog"]      { --page-color: #4A6B7A;             --page-soft: #E7EFF2; }
body[data-page="contact"]   { --page-color: #3C627A;             --page-soft: #E6EFF5; }
body[data-page="faq"]       { --page-color: #6B6B74;             --page-soft: #F2F2F4; }
body[data-page="legal"]     { --page-color: var(--brand-blue);   --page-soft: #E6EFF5; }

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background-color: var(--bg-cream);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
  border-radius: 10px;
}

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

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; }
.h1-hero { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; color: var(--brand-blue); }
.h2-section { font-size: 2rem; margin-bottom: 0.5rem; }
.pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--brand-highlight);
  color: var(--brand-blue);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Apply per-page theme accents (when data-page is present) */
body[data-page] .h1-hero { color: var(--page-color); }
body[data-page] .pill { background: var(--page-soft); color: var(--page-color); }
body[data-page] .hero-wrapper {
  background: linear-gradient(180deg, var(--page-soft) 0%, rgba(0,0,0,0) 75%);
}

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
section { padding: 4rem 0; }
.bg-white { background-color: var(--bg-white); }

/* --- SUBTLE ILLUSTRATION BACKGROUNDS --- */
.bg-illustrated {
  position: relative;
  overflow: hidden;
}
.bg-illustrated::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background-image: var(--bg-illu, none);
  background-repeat: no-repeat;
  background-position: var(--bg-illu-pos, right center);
  background-size: var(--bg-illu-size, 560px);
  opacity: var(--bg-illu-opacity, 0.10);
  filter: brightness(1.08) saturate(0.92) contrast(0.96);
  transform: rotate(var(--bg-illu-rot, 0deg));
  pointer-events: none;
  z-index: 0;
}
.bg-illustrated > .container {
  position: relative;
  z-index: 1;
}

/* Image mockups / previews */
.preview-mockup {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
  border: 1px solid var(--line);
}
.preview-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* --- HEADER & DYNAMIC ISLAND (SINGLE ISLAND) --- */
#siteHeader{
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  pointer-events: auto;
}

/* --- SCRIM (Fondo oscuro al abrir menú) --- */
.menu-scrim{
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.30);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.30s ease;
  z-index: 998;
}
.menu-scrim.is-visible{
  opacity: 1;
  pointer-events: auto;
}

/* --- CONTENEDOR DYNAMIC ISLAND --- */
.dynamic-island-container{
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 999;
  pointer-events: none; /* Permite clicks alrededor de la isla */
}

/* --- LA ISLA (Header) --- */
.dynamic-island{
  background: var(--surface);
  box-shadow: var(--shadow-island);
  border-radius: var(--radius-pill);
  pointer-events: auto;
  width: auto;
  max-width: 90%;
  height: 60px; /* Altura colapsada */
  overflow: hidden;
  transition:
    width 0.50s var(--transition-spring),
    height 0.50s var(--transition-spring),
    border-radius 0.40s ease;
  position: relative;
  will-change: width, height, border-radius;
}

/* Modificadores de Estado Expandido */
.dynamic-island.is-expanded{
  width: 600px; /* Ancho al abrir */
  height: auto;
  min-height: 400px;
  border-radius: 32px;
}

/* --- BARRA COLAPSADA (Header cerrado) --- */
.island-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 24px;
  height: 60px;
  width: 100%;
  transition: opacity 0.20s ease, transform 0.20s ease;
}

/* Ocultar barra colapsada al expandir */
.dynamic-island.is-expanded .island-bar{
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: scale(0.95);
}

/* Logo & Fallback */
.brand-logo{
  display: flex;
  align-items: center;
  height: 100%;
}

.brand-fallback{
  font-weight: 800;
  font-size: 18px;
  color: var(--brand-blue);
  letter-spacing: -0.5px;
}

/* Logo sizing */
.brand-mark{
  display: block;
  width: auto;
  height: auto;
}

.brand-mark--full{
  /* Calcula altura máxima: 60px (barra) - 16px (padding) = 44px */
  max-height: 44px;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
}

/* Estilo para logo en menú expandido */
.overlay-brand{
  display: flex;
  align-items: center;
}

.overlay-brand img{
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
}

/* Navegación Desktop (Visible solo en PC) */
.desktop-nav{
  display: none;
  gap: 24px;
  margin: 0 24px;
}
.desktop-nav a{
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  transition: color 0.20s ease;
}
.desktop-nav a:hover{ color: var(--brand-blue); }
.desktop-nav a.active{ color: var(--brand-blue); }

.separator{
  width: 1px;
  height: 24px;
  background: rgba(0,0,0,0.10);
  margin: 0 16px;
  display: none;
}

/* Botón Menú */
.menu-trigger{
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.05);
  padding: 8px 16px 8px 12px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--text-main);
  transition: background 0.20s ease, border-color 0.20s ease;
}
.menu-trigger:hover{
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.10);
}
.menu-label{ display: none; }

/* --- CONTENIDO EXPANDIDO (Overlay) --- */
.island-overlay{
  opacity: 0;
  pointer-events: none;
  padding: 24px;
  width: 100%;
  position: absolute;
  top: 0; left: 0;
  transition: opacity 0.30s ease 0.10s;
}

.dynamic-island.is-expanded .island-overlay{
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* Cabecera del Overlay */
.overlay-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.overlay-head-actions{
  display: flex;
  align-items: center;
  gap: 16px;
}

.link-sm{
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.link-sm:hover{ color: var(--text-main); }

.close-btn{
  background: rgba(0,0,0,0.04);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.20s ease;
  border: 1px solid rgba(0,0,0,0.08);
}
.close-btn:hover{ background: rgba(0,0,0,0.08); }

/* Grid del Overlay */
.overlay-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

/* Links Principales */
.main-links--overlay{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.menu-card{
  background: rgba(0,0,0,0.02);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(0,0,0,0.06);
  transition: background 0.20s ease, transform 0.10s ease, border-color 0.20s ease;
}
.menu-card:hover{
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
  transform: scale(1.01);
}

.menu-card__title{ font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.menu-card__meta{ font-size: 12px; color: var(--text-muted); line-height: 1.4; max-width: 90%; }
.menu-card__icon{
  position: absolute;
  top: 16px; right: 16px;
  opacity: 0.30;
  font-weight: 900;
}

/* --- DISEÑO NEWSLETTER (Brand highlight + borde azul) --- */
.sub-grid{
  height: 100%;
  display: flex;
  flex-direction: column;
}

.newsletter-cta{
  background: var(--brand-highlight);
  color: var(--text-main);
  padding: 24px;
  border-radius: 20px;
  margin-top: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  /* Brand border + soft depth */
  border: 1px solid rgba(48, 95, 130, 0.22); /* fallback si no hay color-mix */
  box-shadow: 0 10px 26px rgba(17, 17, 20, 0.06);
}

/* Badge en tono brand (en vez de blanco translúcido) */
.newsletter-badge{
  display: inline-block;
  background: rgba(48, 95, 130, 0.12);
  color: var(--brand-blue);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 800;
  margin-bottom: 16px;
  align-self: flex-start;

  border: 1px solid rgba(48, 95, 130, 0.18);
}

.newsletter-cta h4{
  margin: 0 0 8px 0;
  font-size: 20px;
  line-height: 1.2;
  font-family: var(--font-serif);
  color: var(--text-main);
}

.newsletter-cta p{
  font-size: 13px;
  color: var(--text-muted);
  opacity: 1; /* ya no necesitamos “fade” porque el fondo es claro */
  line-height: 1.5;
  margin: 0 0 16px 0;
  margin-bottom: auto;
}

/* Scoped: keep global .btn-trust untouched elsewhere */
.newsletter-cta .btn-trust{
  display: block;
  background: var(--brand-blue);
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 24px;

  border: 1px solid rgba(48, 95, 130, 0.22);
  box-shadow: 0 8px 18px rgba(48, 95, 130, 0.18);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.newsletter-cta .btn-trust:hover{
  transform: scale(1.02);
  filter: brightness(0.98);
}

.newsletter-fineprint{
  font-size: 11px;
  color: var(--text-muted);
  opacity: 1;
  margin-top: 12px;
  text-align: center;
  margin-bottom: 0;
}

/* --- MEDIA QUERIES --- */
@media (min-width: 768px){
  .desktop-nav{ display: flex; }
  .separator{ display: block; }
  .menu-label{ display: inline; }

  .overlay-grid{
    grid-template-columns: 2fr 1fr;
  }
  .main-links--overlay{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px){
  .dynamic-island.is-expanded{ width: 95%; }
  .main-links--overlay{ grid-template-columns: 1fr; }
  .brand-mark--full{ width: 140px; height: auto; }
}

/* --- FOOTER --- */
#siteFooter{
  /* Palette (scoped) */
  --footer-bg: #0B1620;          /* Navy editorial */
  --footer-text: #F8F8F4;        /* Cream */
  --footer-link-hover: #D4E4F0;  /* Soft highlight */
  --footer-container: 1200px;

  background-color: var(--footer-bg);
  color: var(--footer-text);
  width: 100%;
  margin-top: auto;
}

#siteFooter, #siteFooter *{ box-sizing: border-box; }

.footer-container{
  max-width: var(--footer-container);
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

.footer-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo{
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
  height: 34px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.footer-desc{
  opacity: 0.85;
  font-size: 0.92rem;
  max-width: 320px;
  line-height: 1.6;
  margin: 0;
}

.footer-col h4{
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: var(--footer-text);
  font-weight: 600;
}

.footer-col ul{
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li{ margin: 0; }

.footer-col ul li a{
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 0.92rem;
  opacity: 0.82;
  min-height: 36px;
}

.footer-col ul li a:hover{
  opacity: 1;
  color: var(--footer-link-hover);
}

@media (max-width: 768px){
  .footer-col ul li a{
    padding: 14px 0;
    border-bottom: 1px solid rgba(248, 248, 244, 0.06);
  }
}

/* --- SOCIAL ICONS --- */
.social-block{ margin-top: 1.5rem; }

.social-title{
  font-size: 0.9rem;
  margin: 0 0 0.8rem 0;
  opacity: 0.9;
  font-weight: 600;
  font-family: var(--font-serif);
}

.social-icons{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-icon-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background-color: rgba(248, 248, 244, 0.06);
  border: 1px solid rgba(248, 248, 244, 0.08);
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.social-icon-link:hover{
  background-color: rgba(212, 228, 240, 0.14);
  border-color: rgba(212, 228, 240, 0.22);
  transform: translateY(-1px);
}

.social-icon{
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: block;
}

.social-icon-link:hover .social-icon{
  opacity: 1;
  transform: scale(1.05);
}

/* --- BOTTOM --- */
.footer-bottom{
  border-top: 1px solid rgba(248, 248, 244, 0.12);
  padding-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  opacity: 0.78;
  flex-wrap: wrap;
}

.footer-copy{
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}

.footer-sep{
  margin: 0 10px;
  opacity: 0.4;
}

@media (max-width: 520px){
  .footer-bottom{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- GENERIC COMPONENTS --- */
.hero-wrapper { padding-top: var(--header-safe-top); padding-bottom: 4rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--brand-blue); color: #fff;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.18s ease, background 0.18s ease;
  border: 1px solid transparent;
}
.btn:hover { background: var(--brand-accent); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border-color: rgba(48, 48, 54, 0.35);
  color: var(--text-main);
}
.btn-outline:hover { background: var(--text-main); color: #fff; border-color: var(--text-main); transform: translateY(-2px); }

/* Optional: trust button variant used in Landing */
.btn-trust { background: var(--brand-accent); }
.btn-trust:hover { background: var(--brand-blue); transform: translateY(-2px); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.05); transform: translateY(-2px); }
.card-icon { color: var(--brand-accent); margin-bottom: 1rem; }

/* --- TEXT HELPERS --- */
.lead {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

/* --- FAQ (ESSENTIAL) --- */
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 800;
  font-family: var(--font-serif);
  list-style: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "＋";
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--brand-blue);
  flex: 0 0 auto;
}
.faq-list details[open] summary::after {
  content: "—";
  color: var(--brand-accent);
}
.faq-list details p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* --- TRUST ROADMAP (ESSENTIAL) --- */
.trust-roadmap {
  margin-top: 1.75rem;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.trust-step {
  flex: 1 1 220px;
  min-width: 220px;
  background: var(--bg-cream);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 18px;
  padding: 1.25rem 1.25rem;
  text-align: center;
}
.trust-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
}
.trust-connector {
  display: none;
  align-self: center;
  font-weight: 800;
  opacity: 0.55;
  color: var(--text-muted);
  padding: 0 0.25rem;
}
@media (min-width: 860px) {
  .trust-roadmap { flex-wrap: nowrap; gap: 1.25rem; }
  .trust-connector { display: block; }
}

/* --- GENERIC FORMS (SAFE DEFAULTS) --- */
.input, select.input, textarea.input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  outline: none;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: rgba(48,95,130,.55);
  box-shadow: 0 0 0 4px rgba(48,95,130,.12);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .h2-section { font-size: 1.7rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- LEGAL (VISUAL COHERENCE) --- */

/* Legal hub ( /legal/ ) */
main.legal-hub { /* spacing handled by sections */ }

.legal-hub .legal-hub-cards { padding: 3.5rem 0; }
.legal-hub .legal-hub-note { padding: 2.5rem 0 4.5rem; }

/* More orderly grid on the hub (2 columns on desktop) */
@media (min-width: 840px) {
  .legal-hub .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 839px) {
  .legal-hub .grid-cards { grid-template-columns: 1fr; }
}

/* Utility: disable hover lift on content cards */
.card-static:hover { box-shadow: none; transform: none; }

/* Back-to-legal button in hero */
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(48, 48, 54, 0.28);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.legal-back:hover {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
  transform: translateY(-2px);
}

/* Meta line (Last updated) */
.legal-meta {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Legal article wrapper inside the content card */
.legal-card { padding: 2rem; }
@media (max-width: 520px) {
  .legal-card { padding: 1.5rem; }
}

main.legal-page { /* relies on hero-wrapper safe-top padding */ }

.legal-article h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.legal-article h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  font-family: var(--font-sans);
  font-weight: 700;
}

.legal-article p {
  margin: 0.85rem 0;
  color: var(--text-main);
  line-height: 1.85;
}

.legal-article a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-article a:hover { color: var(--brand-accent); }

/* Bring back bullets only inside legal content */
.legal-article ul,
.legal-article ol {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.75rem 0 1rem;
}

.legal-article li {
  margin: 0.35rem 0;
  color: var(--text-muted);
  line-height: 1.75;
}

.legal-article code {
  background: rgba(0,0,0,0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 8px;
  font-size: 0.95em;
}

.legal-article hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}
/* --- DYNAMIC ISLAND POLISH (collapsed) --- */
.dynamic-island-container{ top: 16px; }

.dynamic-island{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
}

.island-bar{
  justify-content: flex-start;
  gap: 18px;
  padding: 8px 16px 8px 18px;
}

.brand-mark--full{
  max-height: 46px;
  max-width: 220px;
}

.desktop-nav{
  flex: 1;
  justify-content: center;
  gap: 34px;
  margin: 0;
}

.desktop-nav a{
  font-weight: 600;
  letter-spacing: -0.2px;
}

.separator{
  margin: 0 10px;
  opacity: 0.9;
}

.menu-trigger{
  border: 1px solid rgba(0,0,0,0.07);
  padding: 10px 18px 10px 14px;
}

.menu-trigger:hover{ background: #eceff3; }

.menu-trigger:focus-visible{
  outline: 3px solid rgba(48, 95, 130, 0.25);
  outline-offset: 2px;
}

.desktop-nav a:focus-visible{
  outline: 3px solid rgba(48, 95, 130, 0.25);
  outline-offset: 3px;
  border-radius: 10px;
}

/* --- DYNAMIC ISLAND (mobile scroll fix) --- */
@media (max-width: 767px){
  /* Keep the expanded menu inside the viewport on mobile */
  .dynamic-island.is-expanded{
    width: 95%;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    min-height: 0;
  }

  /* Allow scrolling inside the overlay while the page is locked */
  .dynamic-island.is-expanded .island-overlay{
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }

  .dynamic-island.is-expanded .overlay-inner{ min-height: 100%; }
}

/* --- COOKIE BANNER & SETTINGS (GA4 / META PIXEL) --- */
.aa-cookie-banner{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10000;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.aa-cookie-inner{
  max-width: var(--container-width);
  margin: 0 auto;
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 16px 44px rgba(0,0,0,0.14);
  padding: 1rem 1.1rem;
  display: flex;
  gap: 1.1rem;
  align-items: center;
  justify-content: space-between;
}

.aa-cookie-title{
  margin: 0 0 0.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.aa-cookie-desc{
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.aa-cookie-link{
  margin-left: 0.25rem;
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aa-cookie-actions{
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.aa-cookie-btn{
  appearance: none;
  border: 1px solid rgba(48,48,54,0.35);
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.65rem 1.05rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  min-width: 112px;
}

.aa-cookie-btn:hover{ transform: translateY(-1px); background: rgba(212,228,240,0.55); border-color: rgba(48,48,54,0.5); }
.aa-cookie-btn:focus-visible{ outline: 3px solid rgba(48,95,130,0.25); outline-offset: 2px; }

.aa-cookie-btn--accept{
  background: var(--brand-blue);
  color: #fff;
  border-color: transparent;
}
.aa-cookie-btn--accept:hover{ background: var(--brand-accent); }

.aa-cookie-btn--save{
  background: var(--brand-blue);
  color: #fff;
  border-color: transparent;
}
.aa-cookie-btn--save:hover{ background: var(--brand-accent); }

.aa-cookie-btn--settings{
  background: transparent;
}

@media (max-width: 720px){
  .aa-cookie-inner{
    flex-direction: column;
    align-items: stretch;
  }
  .aa-cookie-actions{
    justify-content: stretch;
  }
  .aa-cookie-btn{
    width: 100%;
    min-width: 0;
  }
}

/* Modal */
.aa-cookie-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(17,17,20,0.55);
  padding: 1rem;
  display: none;
}

.aa-cookie-modal-overlay[aria-hidden="false"]{
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 820px){
  .aa-cookie-modal-overlay[aria-hidden="false"]{ align-items: center; }
}

.aa-cookie-modal{
  width: min(760px, 100%);
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 22px 70px rgba(0,0,0,0.22);
  padding: 1.25rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.aa-cookie-modal-head{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.aa-cookie-modal-title{
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.aa-cookie-modal-sub{
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.aa-cookie-iconbtn{
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(48,48,54,0.25);
  background: transparent;
  color: var(--text-main);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.aa-cookie-iconbtn:hover{ background: rgba(212,228,240,0.55); }
.aa-cookie-iconbtn:focus-visible{ outline: 3px solid rgba(48,95,130,0.25); outline-offset: 2px; }

.aa-cookie-rows{
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
}

.aa-cookie-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248,248,244,0.55);
}

.aa-cookie-row--toggle{
  cursor: pointer;
}

.aa-cookie-row-text{
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.aa-cookie-row-title{
  margin: 0;
  font-weight: 800;
  color: var(--text-main);
}

.aa-cookie-row-desc{
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.aa-cookie-pill{
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(48,95,130,0.12);
  color: var(--brand-blue);
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid rgba(48,95,130,0.18);
}

/* Switch */
.aa-cookie-switch{
  position: relative;
  width: 46px;
  height: 28px;
  flex: 0 0 auto;
}

.aa-cookie-switch input{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.aa-cookie-slider{
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(48,48,54,0.12);
  border: 1px solid rgba(48,48,54,0.2);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.aa-cookie-slider::before{
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg-white);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transition: transform 0.16s ease;
}

.aa-cookie-switch input:checked + .aa-cookie-slider{
  background: var(--brand-blue);
  border-color: transparent;
}

.aa-cookie-switch input:checked + .aa-cookie-slider::before{
  transform: translateX(18px);
}

.aa-cookie-modal-actions{
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

@media (max-width: 560px){
  .aa-cookie-modal-actions .aa-cookie-btn{
    width: 100%;
  }
}

html.aa-cookie-modal-open,
body.aa-cookie-modal-open{
  overflow: hidden;
}

/* --- Market selector (footer) --- */
.aa-market-select{
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.aa-market-select label{
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
  opacity:.85;
}
.aa-market-select select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: inherit;
  padding:10px 40px 10px 12px;
  border-radius:999px;
  font-weight:600;
  line-height:1;
}
.aa-market-select select:focus{
  outline:2px solid rgba(255,255,255,.25);
  outline-offset:2px;
}
