/* RootZone Legal Centre — simplified */
:root {
  --lc-bg: #060912;
  --lc-panel: #0f1628;
  --lc-text: #f3f6ff;
  --lc-muted: #a8b4cf;
  --lc-accent: #e63946;
  --lc-border: #2a3852;
  --lc-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.legal-centre {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 85% 0%, rgba(230, 57, 70, 0.1), transparent 28rem),
    linear-gradient(180deg, #0b1220 0%, var(--lc-bg) 14rem);
  color: var(--lc-text);
  font-family: "Tajawal", "Cairo", system-ui, sans-serif;
  line-height: 1.8;
}

.lc-header {
  border-bottom: 1px solid var(--lc-border);
  background: rgba(6, 9, 18, 0.94);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.lc-header__inner {
  max-width: 1180px;
  margin: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
}

.lc-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lc-sections-toggle {
  display: none;
  border: 1px solid var(--lc-border);
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.12);
  color: #fff;
  min-height: 42px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.lc-brand {
  color: var(--lc-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
}

.lc-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e63946, #7f1d1d);
  color: #fff;
  font-size: 0.75rem;
}

.lc-back {
  color: var(--lc-text);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 8px 12px;
  border: 1px solid var(--lc-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.lc-shell {
  max-width: 1180px;
  margin: 20px auto 40px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(250px, 270px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.lc-sidebar {
  padding: 16px;
  background: linear-gradient(180deg, rgba(21, 31, 53, 0.96), rgba(15, 22, 40, 0.96));
  border: 1px solid var(--lc-border);
  border-radius: 18px;
  box-shadow: var(--lc-shadow);
}

.lc-sidebar__head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.lc-sidebar__sub,
.lc-drawer__sub {
  margin: 6px 0 12px;
  color: var(--lc-muted);
  font-size: 0.85rem;
}

.lc-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lc-nav button {
  width: 100%;
  text-align: right;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: var(--lc-muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  line-height: 1.45;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lc-nav button:hover,
.lc-nav button[aria-current="page"] {
  color: #fff;
  background: rgba(230, 57, 70, 0.12);
  border-color: rgba(230, 57, 70, 0.25);
}

.lc-nav-num {
  display: inline-block;
  min-width: 1.4em;
  margin-left: 6px;
  color: var(--lc-accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lc-content {
  padding: 22px 20px;
  background: linear-gradient(180deg, rgba(15, 22, 40, 0.98), rgba(12, 18, 32, 0.98));
  border: 1px solid var(--lc-border);
  border-radius: 18px;
  box-shadow: var(--lc-shadow);
  min-height: 0;
}

.lc-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--lc-muted);
}

.lc-meta-bar span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lc-content h1 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.4;
}

.lc-summary {
  margin: 0 0 18px;
  color: var(--lc-muted);
  font-size: 0.95rem;
}

.lc-content h2 {
  margin: 22px 0 10px;
  font-size: 1.08rem;
  color: #fff;
}

.lc-content p,
.lc-content li {
  color: #d8e0f0;
  font-size: 0.95rem;
}

.lc-content ul { padding-right: 1.2rem; }

.lc-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.88em;
}

.lc-ethical-alert,
.lc-note {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(230, 57, 70, 0.35);
  background: rgba(230, 57, 70, 0.08);
  font-size: 0.92rem;
}

.lc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.lc-button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(230, 57, 70, 0.45);
  background: linear-gradient(135deg, #e63946, #b91c1c);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.lc-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lc-button--secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--lc-border);
  color: #eee;
}

.lc-button--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--lc-muted);
}

.lc-final {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(230, 57, 70, 0.4);
  border-radius: 16px;
  background: rgba(230, 57, 70, 0.06);
}

.lc-final h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.lc-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  margin-bottom: 14px;
}

.lc-check input {
  margin-top: 0.35rem;
  width: 20px;
  height: 20px;
  accent-color: var(--lc-accent);
}

.lc-status {
  min-height: 1.5em;
  margin: 8px 0;
  color: var(--lc-muted);
  font-size: 0.9rem;
}

.lc-status.is-error { color: #ff8d96; }

.lc-login-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  font-size: 0.9rem;
  color: var(--lc-muted);
}

.lc-login-cta[hidden] { display: none; }

.lc-error-panel {
  text-align: center;
  padding: 24px 16px;
}

.lc-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.55);
}

.lc-drawer-backdrop.is-open { display: block; }

.lc-drawer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  max-height: 78vh;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #0f1628;
  border-top: 1px solid var(--lc-border);
  transform: translateY(105%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}

.lc-drawer.is-open { transform: translateY(0); }

.lc-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.lc-drawer__head h2 {
  margin: 0;
  font-size: 1rem;
}

.lc-drawer__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

body.lc-drawer-open { overflow: hidden; }

@media (max-width: 900px) {
  .lc-sidebar--desktop { display: none; }
  .lc-sections-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .lc-shell {
    grid-template-columns: 1fr;
    margin-top: 12px;
  }
  .lc-content {
    padding: 18px 16px;
    border-radius: 16px;
  }
  .lc-content h1 { font-size: clamp(1.25rem, 5.5vw, 1.6rem); }
  .lc-actions .lc-button {
    flex: 1 1 calc(50% - 6px);
    min-width: 130px;
  }
}

@media (max-width: 360px) {
  .lc-header__inner { flex-wrap: wrap; }
  .lc-back { width: 100%; text-align: center; }
}
