/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */
/* ==========================================================================
   Qahera UI Kit — Design Tokens & Provençal Cezannian Palette
   Tokens Precede Styling (Invariant 2) & Thematic Topography (Invariant 10)
   ========================================================================== */

:root {
  /* Brand Color Palette: Provence Lavender & Light Blue Green */
  --bg: #F0EEF1;          /* LILAC: General ambient background */
  --surface: #D3DADA;     /* DOVE: Light blue-green / sage grey surfaces */
  --surface-card: #FFFFFF;/* COTTON: Pure white for cards & high legibility */
  --ink: #3E3842;          /* DUSK: Deep violet charcoal for high-contrast text */
  --muted: #7F6D8B;        /* HEATHER: Elegant muted slate violet */
  --line: #BAA7B9;         /* MAUVE: Delicate borders & separators */
  --cobalt: #7F6D8B;       /* HEATHER: Primary interactive accent */
  --cobalt-light: #BAA7B9; /* MAUVE: Soft interactive tint */
  --cobalt-dark: #3E3842;  /* DUSK: Deep button & section backgrounds */
  --ochre: #8D8B48;        /* GRASS: Deepened for text contrast */
  --grass: #C4C484;        /* GRASS: Herbaceous olive gold accent */
  --viri: #6C8279;         /* Sage Viridian: Harmonized with Dove */
  --gold: #C4C484;         /* GRASS: Badges & warm accents */
  --lavender: #F0E0F4;     /* LAVENDER: Micro-badges & hover glow */

  /* Qahera Compatibility Aliases */
  --qhr-bg: var(--bg);
  --qhr-surface: var(--surface);
  --qhr-surface-card: var(--surface-card);
  --qhr-ink: var(--ink);
  --qhr-muted: var(--muted);
  --qhr-line: var(--line);
  --qhr-cobalt: var(--cobalt);
  --qhr-cobalt-light: var(--cobalt-light);
  --qhr-cobalt-dark: var(--cobalt-dark);
  --qhr-ochre: var(--ochre);
  --qhr-ochre-light: var(--grass);
  --qhr-ochre-deep: #5E5B28;
  --qhr-viridian: var(--viri);
  --qhr-viridian-dark: #3E3842;
  --qhr-viridian-light: #D3DADA;
  --qhr-terracotta: #BAA7B9;

  /* Typography Scale (Brand Guideline: Playfair Display + Source Serif 4 for Latin; Aref Ruqaa + Alexandria for Arabic) */
  --qhr-font-ar-display: "Aref Ruqaa", Georgia, serif;
  --qhr-font-ar-body: "Alexandria", system-ui, sans-serif;
  --qhr-font-ar-lit: "Aref Ruqaa", Georgia, serif;
  
  --qhr-font-lat-display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --qhr-font-lat-body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --qhr-font-lat-ui: "Alexandria", system-ui, sans-serif;

  /* Active typography defaults (LTR) */
  --f-display: var(--qhr-font-lat-display);
  --f-text: var(--qhr-font-lat-body);
  --qhr-font-display: var(--f-display);
  --qhr-font-body: var(--f-text);
  --qhr-font-ui: var(--f-text);

  --qhr-text-xs: 0.75rem;
  --qhr-text-sm: 0.875rem;
  --qhr-text-base: 1.0625rem;
  --qhr-text-lg: 1.25rem;
  --qhr-text-xl: 1.5rem;
  --qhr-text-2xl: 1.875rem;
  --qhr-text-3xl: 2.25rem;
  --qhr-text-4xl: 3rem;

  --qhr-leading-tight: 1.15;
  --qhr-leading-snug: 1.35;
  --qhr-leading-normal: 1.65;
  --qhr-leading-relaxed: 1.85;

  /* Spacing System */
  --qhr-space-1: 0.25rem;
  --qhr-space-2: 0.5rem;
  --qhr-space-3: 0.75rem;
  --qhr-space-4: 1rem;
  --qhr-space-6: 1.5rem;
  --qhr-space-8: 2rem;
  --qhr-space-12: 3rem;
  --qhr-space-16: 4rem;
  --qhr-space-24: 6rem;

  /* Structural Radii & Shadows */
  --qhr-radius-sm: 3px;
  --qhr-radius-md: 6px;
  --qhr-radius-lg: 12px;
  --qhr-radius-full: 9999px;

  --qhr-shadow-sm: 0 1px 3px rgba(62, 56, 66, 0.05);
  --qhr-shadow-md: 0 4px 12px rgba(62, 56, 66, 0.08);
  --qhr-shadow-lg: 0 12px 28px rgba(62, 56, 66, 0.12);

  --qhr-transition: 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Light Theme Mode (Lavender & Light Blue-Green) — Purely Color Tokens, Never Overrides Fonts */
:root[data-theme="light"],
html[data-theme="light"] {
  --bg: #F0EEF1;
  --surface: #D3DADA;
  --surface-card: #FFFFFF;
  --ink: #3E3842;
  --muted: #7F6D8B;
  --line: #BAA7B9;
  --cobalt: #7F6D8B;
  --cobalt-light: #BAA7B9;
  --cobalt-dark: #3E3842;
  --ochre: #8D8B48;
  --grass: #C4C484;
  --viri: #6C8279;
  --gold: #C4C484;
  --lavender: #F0E0F4;

  --qhr-bg: var(--bg);
  --qhr-surface: var(--surface);
  --qhr-surface-card: var(--surface-card);
  --qhr-ink: var(--ink);
  --qhr-muted: var(--muted);
  --qhr-line: var(--line);
  --qhr-cobalt: var(--cobalt);
  --qhr-cobalt-light: var(--cobalt-light);
  --qhr-cobalt-dark: var(--cobalt-dark);
  --qhr-ochre: var(--ochre);
  --qhr-ochre-light: var(--grass);
  --qhr-viridian: var(--viri);
}

/* Arabic RTL Typography Discipline (Invariant 5) — Strictly Immune to Theme Overrides */
:root:lang(ar),
html[lang="ar"],
html[dir="rtl"],
html[lang="ar"][data-theme],
html[dir="rtl"][data-theme],
:root[data-theme]:lang(ar) {
  --f-display: "Aref Ruqaa", Georgia, serif !important;
  --f-text: "Alexandria", system-ui, sans-serif !important;
  --qhr-font-display: "Aref Ruqaa", Georgia, serif !important;
  --qhr-font-body: "Alexandria", system-ui, sans-serif !important;
  --qhr-font-ui: "Alexandria", system-ui, sans-serif !important;
  --qhr-text-base: 1.05rem;
  --qhr-leading-normal: 1.85;
}

/* Dark Mode (Literary Ink) */
:root[data-theme="dark"] {
  --bg: #131A21;
  --surface: #1B2530;
  --surface-card: #222E3C;
  --ink: #E7EDF0;
  --muted: #9BAAB6;
  --line: #2C3945;
  --cobalt: #86AEDB;
  --ochre: #E0A94A;
  --viri: #7DB59F;
  --gold: #F6D68E;

  --qhr-bg: var(--bg);
  --qhr-surface: var(--surface);
  --qhr-surface-card: var(--surface-card);
  --qhr-ink: var(--ink);
  --qhr-muted: var(--muted);
  --qhr-line: var(--line);
  --qhr-ochre: var(--ochre);
  --qhr-ochre-light: var(--gold);
  --qhr-cobalt: var(--cobalt);
  --qhr-cobalt-light: #B4CEEB;
  --qhr-cobalt-dark: #476E9B;
  --qhr-viridian: var(--viri);
  --qhr-viridian-light: #A4D1BF;
  --qhr-terracotta: #D97E66;

  --qhr-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --qhr-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Sepia Manuscript Mode */
:root[data-theme="sepia"] {
  --bg: #F4EFE6;
  --surface: #E8E0D2;
  --surface-card: #FAF6EF;
  --ink: #2C2219;
  --muted: #6E5F52;
  --line: #D8CEBD;
  --ochre: #9A6318;
  --cobalt: #2D4C6E;
  --viri: #3D614E;
  --gold: #E5B452;

  --qhr-bg: var(--bg);
  --qhr-surface: var(--surface);
  --qhr-surface-card: var(--surface-card);
  --qhr-ink: var(--ink);
  --qhr-muted: var(--muted);
  --qhr-line: var(--line);
  --qhr-ochre: var(--ochre);
  --qhr-ochre-light: var(--gold);
  --qhr-cobalt: var(--cobalt);
  --qhr-viridian: var(--viri);
}
/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */
/* ==========================================================================
   Qahera UI Kit — Canonical Component Styles (Invariants 1-17 Compliant)
   Strict Logical Properties (RTL/LTR Zero Drift) & Standard Icon Architecture
   ========================================================================== */

/* --- Buttons (8-State Complete) --- */
.qhr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--qhr-space-2);
  font-family: var(--qhr-font-ui);
  font-size: var(--qhr-text-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  padding-block: 0.75rem;
  padding-inline: 1.25rem;
  border-radius: var(--qhr-radius-sm);
  border: 1.5px solid transparent;
  transition: background-color var(--qhr-transition), border-color var(--qhr-transition), color var(--qhr-transition), transform 100ms ease;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

.qhr-btn:focus-visible {
  outline: 2px solid var(--qhr-cobalt);
  outline-offset: 3px;
}

.qhr-btn:active {
  transform: translateY(1px);
}

.qhr-btn:disabled,
.qhr-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.qhr-btn--primary {
  background-color: var(--qhr-ink);
  color: var(--qhr-bg);
  border-color: var(--qhr-ink);
}

.qhr-btn--primary:hover {
  background-color: var(--qhr-cobalt);
  border-color: var(--qhr-cobalt);
  color: #FFFFFF;
}

.qhr-btn--ghost {
  background-color: transparent;
  color: var(--qhr-ink);
  border-color: var(--qhr-ink);
}

.qhr-btn--ghost:hover {
  background-color: rgba(27, 39, 51, 0.08);
  border-color: var(--qhr-ink);
}

.qhr-btn--ochre {
  background-color: var(--qhr-ochre-light);
  color: #2A1D05;
  border-color: var(--qhr-ochre-light);
}

.qhr-btn--ochre:hover {
  background-color: #FFDD91;
  border-color: #FFDD91;
}

.qhr-btn--sm {
  padding-block: 0.4rem;
  padding-inline: 0.85rem;
  font-size: var(--qhr-text-xs);
}

/* --- Badges & Chips --- */
.qhr-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--qhr-space-1);
  padding-block: 0.25rem;
  padding-inline: 0.75rem;
  font-family: var(--qhr-font-ui);
  font-size: var(--qhr-text-xs);
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--qhr-radius-full);
  background-color: var(--qhr-surface);
  color: var(--qhr-muted);
  border: 1px solid var(--qhr-line);
}

.qhr-badge--ochre {
  background-color: rgba(169, 114, 26, 0.15);
  color: var(--qhr-ochre);
  border-color: rgba(169, 114, 26, 0.3);
}

.qhr-badge--cobalt {
  background-color: rgba(46, 90, 136, 0.15);
  color: var(--qhr-cobalt);
  border-color: rgba(46, 90, 136, 0.3);
}

.qhr-badge--viridian {
  background-color: rgba(62, 111, 92, 0.15);
  color: var(--qhr-viridian);
  border-color: rgba(62, 111, 92, 0.3);
}

/* --- Cards & Containers --- */
.qhr-card {
  position: relative;
  background-color: var(--qhr-surface-card);
  border: 1px solid var(--qhr-line);
  border-radius: var(--qhr-radius-sm);
  padding: var(--qhr-space-6);
  transition: transform var(--qhr-transition), box-shadow var(--qhr-transition), border-color var(--qhr-transition);
}

.qhr-card--elevated:hover {
  transform: translateY(-2px);
  box-shadow: var(--qhr-shadow-md);
  border-color: var(--qhr-ochre);
}

.qhr-card--viridian {
  background-color: var(--qhr-viridian);
  color: #F2F6F4;
  border-color: var(--qhr-viridian-dark);
}

.qhr-card--viridian h2,
.qhr-card--viridian h3,
.qhr-card--viridian p {
  color: #F2F6F4;
}

/* --- Form Controls (Inputs, Selects) --- */
.qhr-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--qhr-space-2);
  margin-block-end: var(--qhr-space-4);
}

.qhr-label {
  font-family: var(--qhr-font-ui);
  font-size: var(--qhr-text-sm);
  font-weight: 600;
  color: var(--qhr-ink);
}

.qhr-input,
.qhr-textarea,
.qhr-select {
  width: 100%;
  font-family: var(--qhr-font-ui);
  font-size: var(--qhr-text-base);
  padding-block: 0.75rem;
  padding-inline: 1rem;
  border-radius: var(--qhr-radius-sm);
  border: 1.5px solid var(--qhr-line);
  background-color: var(--qhr-bg);
  color: var(--qhr-ink);
  transition: border-color var(--qhr-transition), box-shadow var(--qhr-transition);
}

.qhr-input:focus,
.qhr-textarea:focus,
.qhr-select:focus {
  outline: none;
  border-color: var(--qhr-cobalt);
  box-shadow: 0 0 0 3px rgba(46, 90, 136, 0.15);
}

.qhr-input::placeholder,
.qhr-textarea::placeholder {
  color: var(--qhr-muted);
}

/* --- Ribbon (Invariant 14) --- */
.qhr-ribbon {
  background-color: var(--qhr-ink);
  color: var(--qhr-bg);
  font-family: var(--qhr-font-ui);
  font-size: var(--qhr-text-xs);
  text-align: center;
  padding-block: 0.45rem;
  padding-inline: 1rem;
  letter-spacing: 0.02em;
}

/* --- SVG Icons Architecture (QAHERA-VISUAL-001 & QAHERA-SVG-001) --- */
.qhr-icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  max-width: 100%;
  stroke-width: 1.75;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Directional Icon Mirroring in RTL (Invariant 4) */
[dir="rtl"] .qhr-icon-directional {
  transform: scaleX(-1);
}

/* --- Modal & Dialog System --- */
.qhr-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(19, 26, 33, 0.75);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--qhr-space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--qhr-transition);
}

.qhr-modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.qhr-modal-window {
  position: relative;
  background-color: var(--qhr-bg);
  color: var(--qhr-ink);
  border: 1.5px solid var(--qhr-line);
  border-radius: var(--qhr-radius-md);
  width: min(720px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--qhr-shadow-lg);
  transform: translateY(12px);
  transition: transform var(--qhr-transition);
  box-sizing: border-box;
}

.qhr-modal-overlay.is-active .qhr-modal-window {
  transform: translateY(0);
}

.qhr-modal-close {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-end: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--qhr-muted);
  padding: 0.5rem;
  border-radius: var(--qhr-radius-full);
}

.qhr-modal-close:hover {
  color: var(--qhr-ink);
  background-color: var(--qhr-surface);
}

/* Responsive Form Rows & Modal Action Bars */
.qhr-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--qhr-space-3, 0.75rem);
}

@media (min-width: 560px) {
  .qhr-form-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--qhr-space-4, 1rem);
  }
}

.qhr-modal-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .qhr-modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    width: 100%;
  }

  .qhr-modal-actions .qhr-btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
}
/* Pre-emit critique: P5 H5 E5 S5 R5 V5 D5 */
/* ==========================================================================
   SoulAix — Editorial & Architectural Stylesheet
   Hero Skyline Panorama (QAHERA-HERO-001), 17 Invariants Compliant
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  background-color: var(--qhr-bg);
  color: var(--qhr-ink);
  font-family: var(--qhr-font-body);
  font-size: var(--qhr-text-base);
  line-height: var(--qhr-leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Arabic Editorial Scaling & Typography (Aref Ruqaa + Alexandria Light) */
html[lang="ar"] body,
html[dir="rtl"] body {
  font-family: "Alexandria", system-ui, sans-serif !important;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.85;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] .brand b,
html[lang="ar"] .hero h1,
html[lang="ar"] .section-head h2,
html[lang="ar"] .row .t,
html[lang="ar"] .card-residence h3,
html[lang="ar"] .card-side h3 {
  font-family: "Aref Ruqaa", Georgia, serif !important;
  font-weight: 700;
}

html[lang="ar"] .hero h1 {
  line-height: 1.35;
  letter-spacing: 0;
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  margin-block-end: 1rem;
}

html[lang="ar"] p,
html[lang="ar"] a,
html[lang="ar"] span,
html[lang="ar"] li,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] button,
html[lang="ar"] .btn,
html[lang="ar"] .qhr-btn,
html[lang="ar"] nav.main a {
  font-family: "Alexandria", system-ui, sans-serif !important;
}

html[lang="ar"] .hero p {
  font-family: "Alexandria", system-ui, sans-serif !important;
  font-weight: 300;
  font-size: 1.12rem;
  line-height: 1.95;
  color: var(--ink);
  margin-block-end: 1.85rem;
  max-width: 48ch;
}

html[lang="ar"] h2 {
  line-height: 1.45;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
}

html[lang="ar"] .row .t {
  font-size: 1.35rem;
  line-height: 1.5;
}

html[lang="ar"] .card-residence h3,
html[lang="ar"] .card-side h3 {
  line-height: 1.4;
}

/* Brand Reference Button Compatibility */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--qhr-radius-sm);
  border: 1.5px solid var(--cobalt);
  background: var(--cobalt);
  color: #FFFFFF;
  cursor: pointer;
  font-family: var(--f-text);
  font-size: var(--qhr-text-sm);
  font-weight: 600;
  transition: background-color var(--qhr-transition), border-color var(--qhr-transition), color var(--qhr-transition);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn:hover {
  background: #6C5A78;
  border-color: #6C5A78;
  color: #FFFFFF;
}

.btn.ghost:hover {
  background: var(--lavender);
  color: var(--ink);
  border-color: var(--cobalt);
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* --- Header & Navigation Bar (Invariant 14) --- */
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--qhr-space-4);
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
  gap: 2px;
}

.brand-logo-pic {
  display: inline-flex;
  line-height: 1;
}

.brand-logo {
  height: 46px;
  width: auto;
  aspect-ratio: 1536 / 542;
  object-fit: contain;
  display: block;
  transition: transform 200ms ease;
}

.brand:hover .brand-logo {
  transform: scale(1.02);
}

.brand-sub {
  font-family: "Alexandria", var(--f-text);
  font-size: var(--qhr-text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  line-height: 1.2;
}

[data-theme="dark"] .brand-logo,
[data-theme="dark"] .footer-brand-logo {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

nav.main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  margin-inline-start: clamp(1rem, 3vw, 3rem);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 2rem);
  margin-inline-start: auto;
  margin-inline-end: auto;
}

.nav-links a {
  text-decoration: none;
  font-family: "Alexandria", var(--f-text);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: border-color var(--qhr-transition), color var(--qhr-transition);
  white-space: nowrap;
}

.nav-links a:hover {
  border-bottom-color: var(--cobalt);
  color: var(--cobalt);
}

html[lang="ar"] .nav-links a,
html[lang="ar"] .mobile-drawer-links a,
html[lang="ar"] .lang-btn {
  font-family: "Alexandria", system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

/* Latin Headings (French, English, etc.) — Playfair Display literary elegance */
html:not([lang="ar"]) h1,
html:not([lang="ar"]) h2,
html:not([lang="ar"]) h3,
html:not([lang="ar"]) .brand b,
html:not([lang="ar"]) .section-head h2 {
  font-family: "Playfair Display", "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}

html:not([lang="ar"]) .hero h1 {
  font-family: "Playfair Display", "Iowan Old Style", Georgia, serif;
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Theme Switcher Button */
.theme-btn {
  background: transparent;
  border: 1.5px solid var(--line);
  cursor: pointer;
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: var(--qhr-radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--qhr-transition), border-color var(--qhr-transition), color var(--qhr-transition);
}

.theme-btn:hover {
  background-color: var(--lavender);
  border-color: var(--cobalt);
  color: var(--cobalt);
}

/* Language Switcher Dropdown (7 Languages) (Invariant 13) */
.lang-dropdown-wrapper {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 0.85rem;
  font-weight: 700;
  padding-block: 0.38rem;
  padding-inline: 0.85rem;
  border-radius: var(--qhr-radius-full);
  cursor: pointer;
  transition: background-color var(--qhr-transition), border-color var(--qhr-transition), color var(--qhr-transition);
  white-space: nowrap;
}

.lang-btn:hover {
  background-color: var(--lavender);
  border-color: var(--cobalt);
  color: var(--ink);
}

.lang-menu {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  background-color: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--qhr-radius-sm);
  box-shadow: var(--qhr-shadow-md);
  padding: 0.5rem;
  min-width: 175px;
  max-inline-size: calc(100vw - 32px);
  display: none;
  z-index: 100;
  flex-direction: column;
  gap: 0.2rem;
}

.lang-menu.is-open {
  display: flex;
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--qhr-text-sm);
  font-weight: 600;
  border-radius: var(--qhr-radius-sm);
  transition: background-color var(--qhr-transition);
}

html[lang="ar"] .lang-menu a {
  font-family: "Alexandria", system-ui, sans-serif !important;
  font-weight: 600 !important;
}

.lang-menu a:hover {
  background-color: var(--surface);
}

.lang-menu a.is-active {
  font-weight: 700;
  color: var(--cobalt);
  background-color: var(--lavender);
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: var(--qhr-radius-sm);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color var(--qhr-transition), border-color var(--qhr-transition);
}

.mobile-menu-btn:hover {
  background-color: var(--lavender);
  border-color: var(--cobalt);
}

/* Mobile Slide-out Navigation Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.mobile-drawer.is-open {
  visibility: visible;
  opacity: 1;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(62, 56, 66, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-drawer-panel {
  position: absolute;
  inset-block-start: 0;
  inset-block-end: 0;
  inset-inline-end: 0;
  width: min(85vw, 320px);
  background-color: var(--bg);
  border-inline-start: 1.5px solid var(--line);
  box-shadow: -6px 0 24px rgba(62, 56, 66, 0.12);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow-y: auto;
}

[dir="rtl"] .mobile-drawer-panel {
  transform: translateX(-100%);
  box-shadow: 6px 0 24px rgba(62, 56, 66, 0.12);
}

.mobile-drawer.is-open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-end: 1rem;
  border-bottom: 1px solid var(--line);
  margin-block-end: 1.25rem;
}

.mobile-drawer-brand b {
  font-family: var(--f-display);
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.1;
  display: block;
}

.mobile-drawer-brand span {
  font-family: "Alexandria", sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.mobile-drawer-close {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--qhr-radius-sm);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: background-color var(--qhr-transition);
}

.mobile-drawer-close:hover {
  background-color: var(--lavender);
  color: var(--cobalt);
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-drawer-links a {
  display: block;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--ink);
  font-family: "Alexandria", system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.12rem;
  border-radius: var(--qhr-radius-sm);
  border-inline-start: 3px solid transparent;
  transition: background-color var(--qhr-transition), border-color var(--qhr-transition), color var(--qhr-transition);
}

.mobile-drawer-links a:hover {
  background-color: var(--surface);
  border-inline-start-color: var(--cobalt);
  color: var(--cobalt);
}

/* --- Hero Section & Cézanne Mountain Panorama (QAHERA-HERO-001) --- */
.hero {
  position: relative;
  background-color: var(--bg);
  color: var(--ink);
  overflow: hidden;
  height: clamp(520px, 62vh, 600px);
  max-height: 600px;
  display: flex;
  align-items: center;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
}

.hero-art picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-bg-painting {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
  filter: saturate(1.08) contrast(1.03);
}

/* Architectural Mirroring in RTL (QAHERA-HERO-001 & Invariant 16) */
[dir="rtl"] .hero-bg-painting {
  transform: scaleX(-1);
}

.hero-painting-credit {
  position: absolute;
  inset-block-end: 2.25rem;
  inset-inline-end: 1.5rem;
  z-index: 3;
  font-family: var(--f-text);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink);
  background: rgba(240, 238, 241, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--qhr-radius-sm);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(62, 56, 66, 0.12);
  opacity: 0.95;
}

[data-theme="dark"] .hero-painting-credit {
  background: rgba(19, 26, 33, 0.92);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
  .hero-painting-credit {
    display: none;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-text {
  max-width: min(100%, 550px);
  background: rgba(240, 238, 241, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border-radius: var(--qhr-radius-md);
  border: 1px solid var(--line);
  box-shadow: 0 10px 36px rgba(62, 56, 66, 0.08);
}

[data-theme="dark"] .hero-text {
  background: rgba(27, 37, 48, 0.92);
  border-color: var(--line);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
}

[data-theme="sepia"] .hero-text {
  background: rgba(232, 224, 210, 0.92);
  border-color: var(--line);
  box-shadow: 0 10px 36px rgba(44, 34, 25, 0.12);
}

.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 500;
  line-height: var(--qhr-leading-tight);
  margin-block-end: 1.15rem;
  color: var(--ink);
}

.hero p {
  font-size: var(--qhr-text-base);
  line-height: 1.8;
  color: var(--ink);
  margin-block-end: 1.85rem;
  max-width: 48ch;
}

.hero-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero-btns {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-btns .qhr-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    padding-inline: 1rem;
    box-sizing: border-box;
  }
}

/* --- Section Global Layout --- */
section.blk {
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
}

.blk--flush-top {
  padding-block-start: 0;
}

.blk--flush-bottom {
  padding-block-end: 0;
}

.section-head {
  margin-block-end: 2.5rem;
}

.section-head h2 {
  font-family: var(--qhr-font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  font-weight: 500;
  line-height: var(--qhr-leading-tight);
  margin-block-end: 0.5rem;
}

.section-head p.sub {
  color: var(--qhr-muted);
  max-width: 58ch;
  font-size: 1.05rem;
}

/* --- Agenda Table Rows --- */
.rows {
  border-block-start: 1.5px solid var(--qhr-ink);
}

.row {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr auto auto;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding-block: 1.25rem;
  border-block-end: 1px solid var(--qhr-line);
  transition: background-color var(--qhr-transition);
}

.row:hover {
  background-color: rgba(226, 232, 230, 0.4);
}

.row .d {
  color: var(--qhr-ochre);
  font-weight: 600;
  font-size: var(--qhr-text-sm);
  font-family: var(--qhr-font-ui);
}

.row .t {
  font-family: var(--qhr-font-display);
  font-size: 1.25rem;
  line-height: 1.35;
}

.row .loc {
  font-size: var(--qhr-text-xs);
  color: var(--qhr-muted);
  font-family: var(--qhr-font-ui);
}

/* --- Three Ways to Participate Grid --- */
.grid-participate {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.card-residence {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
}

.card-residence h3 {
  font-family: var(--qhr-font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.3rem);
  font-weight: 500;
  line-height: 1.18;
  margin-block: 1rem 0.85rem;
}

.card-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-side h3 {
  font-family: var(--qhr-font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.25;
  margin-block-end: 0.65rem;
}

.card-side p {
  color: var(--qhr-muted);
  margin-block-end: 1rem;
}

/* --- Facing Literary Fragment (Fragment en regard) --- */
.frag-section {
  background-color: var(--qhr-surface);
  border-block: 1px solid var(--qhr-line);
}

.pair-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background-color: var(--qhr-bg);
  border: 1px solid var(--qhr-line);
  border-radius: var(--qhr-radius-sm);
  overflow: hidden;
  margin-block-start: 1.5rem;
}

.pair-col {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.pair-col--left {
  border-inline-end: 2px solid var(--qhr-ochre);
}

.pair-text {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.7;
  font-style: normal;
}

.pair-text--fr {
  font-family: "Source Serif 4", Georgia, serif;
}

.pair-text--ar {
  font-family: "Amiri", "Cairo", serif;
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  line-height: 1.85;
}

.pair-author {
  margin-block-start: 1.25rem;
  font-size: var(--qhr-text-sm);
  color: var(--qhr-muted);
  font-family: var(--qhr-font-ui);
}

/* --- Aix Interactive Trail & Audio Guide --- */
.aix-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.trail-map {
  background-color: var(--qhr-surface);
  border: 1px solid var(--qhr-line);
  border-radius: var(--qhr-radius-sm);
  padding: 1.5rem;
}

.trail-map > svg.trail-route-svg {
  width: 100%;
  height: auto;
  display: block;
}

[dir="rtl"] .trail-map > svg.trail-route-svg {
  transform: scaleX(-1);
}

.trail-audio-box {
  margin-top: 1.25rem;
  text-align: center;
}

.trail-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--qhr-radius-full);
  cursor: pointer;
  transition: all var(--qhr-transition);
}

.trail-audio-btn:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  background-color: rgba(46, 90, 136, 0.08);
}

.trail-audio-btn .qhr-icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2;
  flex-shrink: 0;
}

.trail-audio-status {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
  min-height: 1.2em;
  font-family: var(--f-text);
}

.stops-list {
  display: flex;
  flex-direction: column;
  border-block-start: 1.5px solid var(--qhr-ink);
}

.stop-item {
  background: transparent;
  border: none;
  border-block-end: 1px solid var(--qhr-line);
  padding-block: 0.95rem;
  padding-inline: 0.5rem;
  text-align: start;
  font-family: var(--f-display);
  font-size: 1.15rem;
  color: var(--qhr-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--qhr-transition), background-color var(--qhr-transition);
}

.stop-item-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.stop-item-microbadge {
  font-family: var(--f-text);
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 8px;
  border-radius: var(--qhr-radius-full);
  margin-inline: auto 0.5rem;
  opacity: 0.85;
}

.stop-item.is-selected .stop-item-microbadge {
  background: rgba(46, 90, 136, 0.12);
  color: var(--cobalt);
  font-weight: 500;
  opacity: 1;
}

.stop-item:hover {
  color: var(--qhr-cobalt);
  background-color: rgba(46, 90, 136, 0.04);
}

.stop-item.is-selected {
  color: var(--qhr-cobalt);
  font-weight: 600;
  border-block-end: 2px solid var(--qhr-cobalt);
}

.stop-detail {
  margin-block-start: 1.25rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--qhr-surface);
  border-radius: var(--qhr-radius-sm);
  border: 1px solid var(--qhr-line);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stop-detail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stop-detail-header h3 {
  font-family: var(--f-display);
  font-size: 1.35rem;
  margin: 0;
  color: var(--qhr-ink);
}

.stop-detail-badge {
  display: inline-block;
  font-family: var(--f-text);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ochre);
  background-color: rgba(169, 114, 26, 0.1);
  padding: 2px 10px;
  border-radius: var(--qhr-radius-full);
  border: 1px solid rgba(169, 114, 26, 0.25);
}

.stop-detail-text {
  font-family: var(--f-text);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--qhr-ink);
  margin: 0;
}

.stop-detail-activity {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--f-text);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--viri);
  background: rgba(62, 111, 92, 0.08);
  padding: 5px 12px;
  border-radius: var(--qhr-radius-sm);
  border: 1px solid rgba(62, 111, 92, 0.2);
  align-self: flex-start;
}

/* --- Join / Action Hub (QAHERA-CTA) --- */
.join-block {
  background-color: var(--qhr-cobalt-dark);
  color: #EAF1F6;
  border-radius: var(--qhr-radius-md);
  padding: clamp(1.5rem, 5vw, 4.5rem);
  box-sizing: border-box;
}

.join-block h2 {
  color: #FFFFFF;
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  margin-bottom: 0.75rem;
}

.join-block p.sub {
  color: #C9D8E5;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 62ch;
  margin-bottom: 2rem;
}

.join-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2.25rem;
}

@media (max-width: 640px) {
  .join-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.75rem;
  }

  .join-actions .qhr-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    padding-inline: 1rem;
    box-sizing: border-box;
  }
}

.join-btn-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.join-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.join-invitation-box {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.75rem;
  max-width: 580px;
}

.join-invitation-hint {
  font-size: 0.95rem;
  color: #D6E3EE;
  margin-bottom: 0.75rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  max-width: 540px;
  margin-block: 0.75rem;
}

.newsletter-form input {
  flex: 1 1 240px;
  padding: 0.85rem 1rem;
  border: 1.5px solid #86AEDB;
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-radius: var(--qhr-radius-sm);
  font-family: var(--qhr-font-ui);
}

.newsletter-form input::placeholder {
  color: #A0B7CC;
}

/* --- Reader Modal Semantic Architecture --- */
.reader-modal-window {
  width: min(1080px, 96vw);
  max-height: 92vh;
}

.reader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--qhr-line);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.reader-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.reader-column {
  background-color: var(--qhr-surface);
  padding: 1.5rem;
  border-radius: var(--qhr-radius-sm);
  border: 1px solid var(--qhr-line);
}

.reader-column-title {
  font-family: var(--f-display);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.reader-column-body {
  line-height: 1.85;
  white-space: pre-line;
}

/* --- International Cultural Institution Footer --- */
footer.global-footer {
  border-block-start: 1px solid var(--qhr-line);
  padding-block: 4rem 2rem;
  font-family: var(--f-text);
  font-size: var(--qhr-text-sm);
  color: var(--qhr-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: 3rem;
}

.footer-brand-pic {
  display: inline-block;
  margin-bottom: 0.85rem;
}

.footer-brand-logo {
  height: 54px;
  width: auto;
  aspect-ratio: 1536 / 542;
  object-fit: contain;
  display: block;
}

.footer-tagline {
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: var(--qhr-ink);
}

.footer-address {
  font-size: 0.85rem;
  color: var(--qhr-muted);
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--qhr-ink);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--qhr-muted);
  transition: color var(--qhr-transition);
}

.footer-links a:hover {
  color: var(--qhr-ochre);
}

.footer-email {
  font-family: var(--f-text);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--qhr-cobalt);
  text-decoration: none;
  display: inline-block;
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--qhr-transition);
}

.footer-email:hover {
  border-bottom-color: var(--qhr-cobalt);
}

.footer-back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--qhr-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 4px 12px;
  border: 1px solid var(--qhr-line);
  border-radius: var(--qhr-radius-full);
  transition: all var(--qhr-transition);
}

.footer-back-top:hover {
  background-color: var(--qhr-surface);
  color: var(--qhr-ink);
  border-color: var(--qhr-ink);
}

.footer-bottom {
  border-top: 1px solid var(--qhr-line);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 860px) {
  header.top {
    padding-block: 0.85rem;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
  }
  nav.main {
    flex: initial;
    margin-inline-start: auto; /* Magnetically pins controls to opposite end */
    justify-content: flex-end;
  }
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
    width: 36px;
    height: 36px;
  }
  .nav-controls {
    gap: 0.45rem;
  }
  .brand-logo {
    height: 38px;
    width: auto;
    aspect-ratio: 1536 / 542;
  }
  .brand-sub {
    font-size: 0.68rem;
  }
  .lang-btn {
    padding-block: 0.32rem;
    padding-inline: 0.65rem;
    font-size: 0.78rem;
  }
  .theme-btn {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 820px) {
  .grid-participate {
    grid-template-columns: 1fr;
  }
  .card-residence {
    grid-row: auto;
    min-height: auto;
  }
  .pair-container {
    grid-template-columns: 1fr;
  }
  .pair-col--left {
    border-inline-end: none;
    border-block-end: 2px solid var(--qhr-ochre);
  }
  .aix-grid {
    grid-template-columns: 1fr;
  }
  .reader-columns {
    grid-template-columns: 1fr;
  }
  .row {
    grid-template-columns: 1fr auto;
  }
  .row .loc {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
