/* CIMHost — Shared Legal + Page CSS V1 */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --navy: #1E3A8A;
  --navy-dark: #0F2057;
  --sky: #0EA5E9;
  --sky-light: #38BDF8;
  --green: #22C55E;
  --white: #ffffff;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-600: #475569;
  --gray-800: #1E293B;
  --text: #1E293B;
  --text-muted: #64748B;
  --bg: #ffffff;
  --bg-alt: #F8FAFC;
  --border: #E2E8F0;
  --card-bg: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

[data-theme="dark"] {
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --bg: #0F2057;
  --bg-alt: #0a1840;
  --border: rgba(255,255,255,0.1);
  --card-bg: rgba(255,255,255,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
  --gray-100: rgba(255,255,255,0.05);
  --gray-200: rgba(255,255,255,0.1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.2s;
}
[data-theme="dark"] .nav { background: rgba(15,32,87,0.92); }

.nav-logo {
  font-size: 20px; font-weight: 800; color: var(--navy);
  text-decoration: none; letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 6px;
}
[data-theme="dark"] .nav-logo { color: #fff; }
.nav-logo span { color: var(--sky); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: color 0.15s;
}
.nav-links a:hover { color: var(--sky); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn-nav-login {
  font-size: 13px; font-weight: 600;
  color: var(--navy); background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px; padding: 7px 16px;
  text-decoration: none; transition: border-color 0.15s, color 0.15s;
}
.btn-nav-login:hover { border-color: var(--sky); color: var(--sky); }

.btn-nav-cta {
  font-size: 13px; font-weight: 700;
  color: #fff; background: var(--sky);
  border: none; border-radius: 8px; padding: 8px 18px;
  text-decoration: none; transition: opacity 0.15s;
  cursor: pointer;
}
.btn-nav-cta:hover { opacity: 0.88; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--gray-100); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px;
  transition: background 0.15s;
}
.theme-toggle:hover { background: var(--gray-200); }

/* ── PAGE HERO ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 72px 40px 64px;
  text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(14,165,233,0.15) 0%, transparent 70%);
}
.page-hero-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 500;
  color: var(--sky); letter-spacing: 1.5px; text-transform: uppercase;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(14,165,233,0.25);
  border-radius: 20px; padding: 5px 14px;
  margin-bottom: 20px;
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800; color: #fff;
  letter-spacing: -1px; line-height: 1.1;
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 17px; color: rgba(255,255,255,0.65);
  max-width: 560px; margin: 0 auto;
}

/* ── LEGAL LAYOUT ── */
.legal-layout {
  max-width: 1100px; margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

/* ── SIDEBAR ── */
.legal-sidebar {
  position: sticky; top: 88px;
}
.sidebar-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  padding: 6px 12px; border-radius: 7px;
  transition: background 0.12s, color 0.12s;
  border-left: 2px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(14,165,233,0.08);
  color: var(--sky);
  border-left-color: var(--sky);
}

.sidebar-meta {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.sidebar-meta p {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 6px; line-height: 1.5;
}
.sidebar-meta a { color: var(--sky); text-decoration: none; }

/* ── LEGAL CONTENT ── */
.legal-content { min-width: 0; }

.legal-content h1 {
  font-size: 28px; font-weight: 800; color: var(--navy);
  letter-spacing: -0.5px; margin-bottom: 8px;
}
[data-theme="dark"] .legal-content h1 { color: #fff; }

.legal-content .effective-date {
  font-family: 'DM Mono', monospace;
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 32px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.legal-content .effective-date span {
  background: var(--gray-100);
  border-radius: 6px; padding: 3px 10px;
}

.legal-section {
  margin-bottom: 48px;
  scroll-margin-top: 88px;
}
.legal-section h2 {
  font-size: 20px; font-weight: 700; color: var(--navy);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--sky);
  display: inline-block;
}
[data-theme="dark"] .legal-section h2 { color: var(--sky-light); }

.legal-section h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin: 20px 0 10px;
}
.legal-section p {
  font-size: 15px; color: var(--text); line-height: 1.75;
  margin-bottom: 14px;
}
.legal-section ul {
  margin: 10px 0 16px 0; padding-left: 0; list-style: none;
}
.legal-section ul li {
  font-size: 15px; color: var(--text); line-height: 1.7;
  padding: 4px 0 4px 20px; position: relative;
}
.legal-section ul li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sky);
}

.legal-table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0; font-size: 14px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border);
}
.legal-table th {
  background: var(--navy); color: #fff;
  padding: 10px 14px; text-align: left;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.legal-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: top;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table tr:nth-child(even) td { background: var(--gray-50); }
[data-theme="dark"] .legal-table tr:nth-child(even) td { background: rgba(255,255,255,0.03); }

.highlight-box {
  background: rgba(14,165,233,0.08);
  border: 1px solid rgba(14,165,233,0.2);
  border-left: 4px solid var(--sky);
  border-radius: 8px; padding: 16px 20px;
  margin: 20px 0;
}
.highlight-box p { margin: 0; font-size: 15px; color: var(--text); }

.warning-box {
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.2);
  border-left: 4px solid #EF4444;
  border-radius: 8px; padding: 16px 20px;
  margin: 20px 0;
}
.warning-box p { margin: 0; font-size: 15px; }

/* ── LEGAL NAV CARDS ── */
.legal-nav-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 60px 40px;
}
.legal-nav-section h2 {
  font-size: 22px; font-weight: 800; color: var(--navy);
  text-align: center; margin-bottom: 32px;
}
[data-theme="dark"] .legal-nav-section h2 { color: #fff; }
.legal-cards {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.legal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: block;
}
.legal-card:hover {
  border-color: var(--sky);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.legal-card-icon { font-size: 24px; margin-bottom: 10px; }
.legal-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.legal-card p { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* ── FOOTER ── */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.55);
  padding: 48px 40px 32px;
}
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand p { font-size: 13px; line-height: 1.6; margin-top: 10px; max-width: 280px; }
.footer-col h4 { font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.5); text-decoration: none; margin-bottom: 8px; transition: color 0.15s; }
.footer-col a:hover { color: var(--sky); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 12px;
}
.footer-logo { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.footer-logo span { color: var(--sky); }
.status-indicator { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .page-hero { padding: 48px 20px 40px; }
  .legal-layout { grid-template-columns: 1fr; padding: 32px 20px; gap: 32px; }
  .legal-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal-nav-section { padding: 40px 20px; }
}
