/* ═══════════════════════════════════════════════════════════════════════════
   Ecomflow Legal Pages — legal.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:          #0284C7;
  --primary-light:    #38BDF8;
  --primary-dark:     #0369A1;
  --primary-xdark:    #075985;
  --gradient-mid:     #06B6D4;
  --gradient-end:     #14B8A6;

  /* Neutrals */
  --bg:               #F8FAFC;
  --surface:          #FFFFFF;
  --surface-2:        #F1F5F9;
  --border:           #E2E8F0;
  --border-strong:    #CBD5E1;

  /* Text */
  --text-primary:     #0F172A;
  --text-secondary:   #475569;
  --text-muted:       #94A3B8;
  --text-placeholder: #CBD5E1;

  /* Semantic */
  --success:          #16A34A;
  --success-bg:       rgba(22,163,74,.10);
  --warning:          #D97706;
  --warning-bg:       rgba(217,119,6,.10);
  --info-bg:          rgba(56,189,248,.10);
  --info-border:      rgba(56,189,248,.25);

  /* Shadows */
  --shadow-xs:        0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:        0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:        0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:        0 10px 30px rgba(2,132,199,.12);
  --shadow-primary:   0 4px 20px rgba(2,132,199,.25);

  /* Radii */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-2xl: 32px;

  /* Spacing */
  --section-gap: 16px;

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-base:   0.22s ease;
  --t-slow:   0.35s ease;

  /* Typography */
  --font-ar: 'Tajawal', 'Segoe UI', sans-serif;
  --font-en: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', monospace;
}

/* ── Base ────────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: font-family var(--t-base);
}

body.lang-ar { font-family: var(--font-ar); font-size: 15.5px; }
body.lang-en { font-family: var(--font-en); font-size: 15px; }

/* ── Reading progress bar ────────────────────────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--gradient-end));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding: 52px 0 96px; }

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 28px;
}

.container-wide {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Sticky header ───────────────────────────────────────────────────────────── */
.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-xs);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 143px;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 127px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Header right group */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
  white-space: nowrap;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  padding: 5px 14px;
  border-radius: 100px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
  line-height: 1;
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(2,132,199,.30);
}

.lang-btn:not(.active):hover { color: var(--primary); }

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg,
    var(--primary-xdark)  0%,
    var(--primary-dark)  30%,
    var(--primary)       65%,
    var(--primary-light) 100%);
  padding: 72px 0 60px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  background: rgba(255,255,255,.06);
  top: -120px;
  inset-inline-end: -80px;
}

.hero::after {
  width: 260px;
  height: 260px;
  background: rgba(255,255,255,.04);
  bottom: -100px;
  inset-inline-start: -60px;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 100px;
  padding: 6px 16px 6px 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(6px);
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px #4ADE80;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 16px);
  opacity: 0.85;
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  transition: background var(--t-fast);
}

.meta-pill:hover { background: rgba(255,255,255,.20); }

.meta-pill-icon { font-size: 14px; }

/* ── Split lang layout for hero ──────────────────────────────────────────────── */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-top: 40px;
  backdrop-filter: blur(6px);
}

.hero-split-panel {
  padding: 24px 28px;
  background: rgba(255,255,255,.07);
}

.hero-split-panel:first-child {
  border-inline-end: 1px solid rgba(255,255,255,.15);
}

.hero-split-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-split-flag { font-size: 16px; }

.hero-split-text {
  font-size: 14px;
  opacity: 0.88;
  line-height: 1.65;
}

/* ── Content grid ────────────────────────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Sticky TOC sidebar ──────────────────────────────────────────────────────── */
.toc-sidebar {
  position: sticky;
  top: 90px;
}

.toc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.toc-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.toc-header-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.18);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.toc-header-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.toc-nav { padding: 10px 0; }

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--t-fast);
  border-inline-start: 2px solid transparent;
  position: relative;
}

.toc-link:hover {
  color: var(--primary);
  background: var(--info-bg);
}

.toc-link.active {
  color: var(--primary-dark);
  font-weight: 700;
  background: var(--info-bg);
  border-inline-start-color: var(--primary);
}

.toc-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--t-fast);
  font-family: 'Inter', sans-serif;
}

.toc-link.active .toc-num,
.toc-link:hover .toc-num {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Sections ────────────────────────────────────────────────────────────────── */
.sections-list {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 90px;
  transition: box-shadow var(--t-base), border-color var(--t-base);
}

.section-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.section-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--surface), var(--bg));
}

.section-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
  font-family: 'Inter', sans-serif;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.section-body {
  padding: 26px 28px;
}

.section-body p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.section-body p:last-child { margin-bottom: 0; }

/* ── Bilingual pair ──────────────────────────────────────────────────────────── */
.bi-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 20px 0;
}

.bi-col {
  padding: 20px 22px;
}

.bi-col:first-child {
  border-inline-end: 1px solid var(--border);
  background: rgba(248,250,252,.6);
}

.bi-col-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
}

.bi-col-flag { font-size: 15px; }

.bi-col-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.bi-col:first-child .bi-col-text { font-family: var(--font-ar); direction: rtl; text-align: right; }
.bi-col:last-child .bi-col-text  { font-family: var(--font-en); direction: ltr; text-align: left; }

/* ── Check list ──────────────────────────────────────────────────────────────── */
.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
  font-family: 'Inter', sans-serif;
}

/* ── Info / warning callout ──────────────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.7;
}

.callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.callout-body { flex: 1; }
.callout-body p { margin: 0 !important; }

.callout-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.callout.info   { background: var(--info-bg);    border: 1px solid var(--info-border); }
.callout.info .callout-title   { color: var(--primary-dark); }
.callout.info .callout-body p  { color: var(--primary-dark); opacity: 0.85; }

.callout.warning { background: var(--warning-bg); border: 1px solid rgba(217,119,6,.20); }
.callout.warning .callout-title  { color: var(--warning); }
.callout.warning .callout-body p { color: #92400E; opacity: 0.85; }

/* ── Rights grid ─────────────────────────────────────────────────────────────── */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.right-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  transition: all var(--t-fast);
}

.right-card:hover {
  border-color: var(--primary-light);
  background: var(--info-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.right-card-icon { font-size: 24px; margin-bottom: 10px; }

.right-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.right-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Retention timeline ──────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-inline-start: 24px;
  margin: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  inset-inline-start: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 22px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  inset-inline-start: -21px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary-light);
  flex-shrink: 0;
}

.timeline-content-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.timeline-content-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Security badges ─────────────────────────────────────────────────────────── */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 16px;
  transition: all var(--t-fast);
}

.security-badge:hover {
  border-color: var(--primary-light);
  background: var(--info-bg);
}

.security-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.security-badge-text { font-size: 13px; color: var(--text-secondary); font-weight: 500; line-height: 1.4; }
.security-badge-text strong { display: block; color: var(--text-primary); font-size: 13.5px; }

/* ── Contact section ─────────────────────────────────────────────────────────── */
.contact-hero {
  background: linear-gradient(135deg, var(--primary-xdark), var(--primary-dark), var(--primary));
  border-radius: var(--r-2xl);
  padding: 52px 44px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  box-shadow: var(--shadow-lg);
}

.contact-hero::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -100px;
  inset-inline-end: -60px;
  pointer-events: none;
}

.contact-hero-icon {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}

.contact-hero h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.contact-hero p {
  font-size: 15px;
  opacity: 0.85;
  max-width: 460px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.contact-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 26px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--t-base);
  font-family: inherit;
}

.contact-btn.primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.contact-btn.secondary {
  background: rgba(255,255,255,.13);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.28);
}

.contact-btn:hover { transform: translateY(-2px); opacity: 0.93; }

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.contact-info-item {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-lg);
  padding: 16px;
  text-align: center;
}

.contact-info-item-icon { font-size: 22px; margin-bottom: 8px; }
.contact-info-item-label { font-size: 11px; opacity: 0.65; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.contact-info-item-value { font-size: 13px; font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.footer-divider { width: 1px; height: 24px; background: var(--border); }

.footer-copy { font-size: 13px; color: var(--text-muted); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--t-fast);
}

.footer-links a:hover { color: var(--primary); }
.footer-links a.current { color: var(--primary); font-weight: 700; }

/* ── Back to top ─────────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  inset-inline-end: 32px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-primary);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  transition: opacity var(--t-slow), transform var(--t-slow);
  pointer-events: none;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ── Language visibility ─────────────────────────────────────────────────────── */
[data-lang] { display: none !important; }
.lang-ar [data-lang="ar"],
.lang-en [data-lang="en"] { display: revert !important; }

/* Inline spans need inline display */
span[data-lang] { display: none !important; }
.lang-ar span[data-lang="ar"],
.lang-en span[data-lang="en"] { display: inline !important; }

/* ── Fade transition on lang switch ─────────────────────────────────────────── */
.lang-fade { animation: langFadeIn 0.3s ease forwards; }

@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Entrance animations ─────────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .toc-sidebar { position: static; }
  .toc-card { margin-bottom: 20px; }
  .toc-nav { display: grid; grid-template-columns: repeat(2, 1fr); }
  .hero-split { grid-template-columns: 1fr; }
  .hero-split-panel:first-child { border-inline-end: none; border-bottom: 1px solid rgba(255,255,255,.15); }
  .contact-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container, .container-wide { padding: 0 18px; }
  .header-badge { display: none; }
  .hero { padding: 48px 0 44px; }
  .section-card-header { padding: 18px 20px; }
  .section-body { padding: 20px; }
  .bi-pair { grid-template-columns: 1fr; }
  .bi-col:first-child { border-inline-end: none; border-bottom: 1px solid var(--border); }
  .rights-grid { grid-template-columns: 1fr 1fr; }
  .contact-hero { padding: 36px 22px; }
  .back-to-top { bottom: 20px; inset-inline-end: 20px; }
  .toc-nav { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .rights-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}

/* ── Print ───────────────────────────────────────────────────────────────────── */
@media print {
  .site-header, .toc-sidebar, .back-to-top, #progress-bar, .lang-switcher { display: none !important; }
  .content-grid { grid-template-columns: 1fr; }
  .section-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .hero { background: #0284C7 !important; -webkit-print-color-adjust: exact; }
}
