/* ==========================================================================
         MANDATORY CSS RESET & ANTI-OVERFLOW RULES
         ========================================================================== */
* {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  background: #0b0f19;
  color: #a1a1aa;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
img,
svg,
canvas,
iframe,
textarea,
input,
select,
button {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
         DESIGN SYSTEM VARIABLES & CORE PALETTE
         ========================================================================== */
:root {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #0f172a;
  --bg-card-hover: #151f33;
  --primary-rose: #f43f5e;
  --secondary-amber: #fb923c;
  --sunset-gradient: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  --sunset-gradient-subtle: linear-gradient(
    135deg,
    rgba(244, 63, 94, 0.12) 0%,
    rgba(251, 146, 60, 0.12) 100%
  );
  --text-heading: #ffffff;
  --text-sub: #e2e8f0;
  --text-body: #a1a1aa;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(244, 63, 94, 0.4);
  --glow-sunset: 0 0 24px rgba(244, 63, 94, 0.25);
  --container-max: 1200px;
  --header-height: 72px;
}

/* Selection & Scrollbar */
::selection {
  background: rgba(244, 63, 94, 0.35);
  color: #ffffff;
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Global Layout Helpers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
a {
  color: inherit;
  text-decoration: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--sunset-gradient);
  z-index: 1000;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.8);
}

/* Gradient Text Utility */
.gradient-text {
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ==========================================================================
         SECTION 1: NAVBAR (HEADER)
         ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
  height: var(--header-height);
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}
.brand-logo .box-accent {
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: #ffffff;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--sunset-gradient);
  transition: width 0.25s ease;
  border-radius: 2px;
}
.nav-link:hover::after {
  width: 100%;
}

/* Hamburger Button (<992px) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text-heading);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--primary-rose);
}
.hamburger-icon {
  display: block;
  width: 24px;
  height: 24px;
}
.icon-bar {
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
  transform-origin: center;
}
.nav-toggle.active .bar-top {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.active .bar-mid {
  opacity: 0;
}
.nav-toggle.active .bar-bot {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: none;
  flex-direction: column;
  padding: 32px 24px;
  z-index: 899;
  overflow-y: auto;
}
.mobile-drawer.active {
  display: flex;
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mobile-nav-link {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.mobile-nav-link:hover {
  color: #ffffff;
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
         SECTION 2: LEGAL HEADER
         ========================================================================== */
.legal-header {
  position: relative;
  padding: 72px 0 48px 0;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(
    circle at 50% 0%,
    rgba(244, 63, 94, 0.12) 0%,
    rgba(11, 15, 25, 0) 70%
  );
  overflow: hidden;
}
.legal-header::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 240px;
  background: var(--sunset-gradient);
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
}
.header-inner {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.legal-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.legal-breadcrumb a {
  color: var(--text-body);
}
.legal-breadcrumb a:hover {
  color: #ffffff;
}
.header-title {
  font-size: 42px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  margin-bottom: 18px;
}
.header-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 720px;
  margin: 0 auto 28px auto;
}
.header-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.effective-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.28);
  color: #fda4af;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-rose);
  box-shadow: 0 0 8px var(--primary-rose);
}

/* ==========================================================================
         SECTION 3: IN-DEPTH DISCLAIMER DOCUMENTATION
         ========================================================================== */
.document-section {
  padding: 64px 0 80px 0;
}
.document-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* Sidebar Sticky Table of Contents */
.toc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px 20px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-heading);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-title svg {
  color: var(--secondary-amber);
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.toc-link {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-body);
  padding: 7px 10px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}
.toc-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}
.toc-link.active {
  color: #ffffff;
  background: rgba(244, 63, 94, 0.1);
  border-left-color: var(--primary-rose);
  font-weight: 600;
}
.toc-link-num {
  color: var(--text-muted);
  font-family: monospace;
  font-size: 11px;
  margin-right: 6px;
}

/* Legal Document Article */
.legal-article {
  background: transparent;
}
.article-notice-banner {
  background: var(--sunset-gradient-subtle);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 48px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.banner-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--primary-rose);
  margin-top: 2px;
}
.banner-content h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.banner-content p {
  color: var(--text-sub);
  font-size: 13.5px;
  line-height: 1.55;
}

/* Semantic Article Sections */
.policy-section {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--header-height) + 32px);
}
.section-num-tag {
  font-size: 12px;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--secondary-amber);
  margin-bottom: 6px;
  display: block;
}
.policy-section h2 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 18px;
  letter-spacing: -0.015em;
}
.policy-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-sub);
  margin: 24px 0 10px 0;
}
.policy-section p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 16px;
}
.policy-section strong {
  color: #ffffff;
  font-weight: 600;
}
.policy-section ul,
.policy-section ol {
  margin: 16px 0 20px 24px;
  color: var(--text-body);
}
.policy-section li {
  margin-bottom: 10px;
  line-height: 1.65;
  font-size: 14.5px;
}
.policy-section li strong {
  color: var(--text-sub);
}

/* Callout Block inside Sections */
.legal-callout {
  background: rgba(17, 24, 39, 0.85);
  border-left: 3px solid var(--secondary-amber);
  border-right: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.legal-callout p {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}
.legal-callout.warning {
  border-left-color: var(--primary-rose);
  background: rgba(244, 63, 94, 0.05);
}

/* Quote Box */
.legal-quote {
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  padding-left: 16px;
  margin: 18px 0;
  font-style: italic;
  color: #cbd5e1;
}

/* ==========================================================================
         SECTION 4: KEY DISCLAIMER SUMMARY GRID
         ========================================================================== */
.summary-section {
  padding: 64px 0 80px 0;
  background: rgba(15, 23, 42, 0.4);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.summary-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px auto;
}
.summary-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-rose);
  margin-bottom: 8px;
  display: block;
}
.summary-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.summary-desc {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.6;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.summary-card {
  background: #0e1424;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.summary-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(244, 63, 94, 0.1);
}
.card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--sunset-gradient-subtle);
  border: 1px solid rgba(244, 63, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-rose);
  flex-shrink: 0;
}
.card-icon-wrap svg {
  width: 22px;
  height: 22px;
}
.summary-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.summary-card p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-body);
}
.card-badge {
  margin-top: auto;
  padding-top: 18px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary-amber);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
         SECTION 5: MANDATORY FOOTER
         ========================================================================== */
.site-footer {
  background: #080c14;
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 0 0;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 48px;
  padding-bottom: 56px;
}

/* Column 1: Bio */
.footer-col-bio {
  max-width: 420px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
}
.footer-brand .box-accent {
  background: var(--sunset-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.footer-bio-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 20px;
}

/* Column 2 & 3: Links */
.footer-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-heading);
  margin-bottom: 20px;
}
.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-link {
  font-size: 13.5px;
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}
.footer-link:hover {
  color: #ffffff;
  transform: translateX(2px);
}
.footer-link.active-link {
  color: var(--primary-rose);
  font-weight: 600;
}
.footer-link.active-link::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-rose);
}

/* Bottom Bar */
.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 0;
  text-align: center;
}
.copyright-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* Back to Top Floating Button */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  color: #ffffff;
  border-color: var(--primary-rose);
  background: rgba(244, 63, 94, 0.15);
}

/* ==========================================================================
         RESPONSIVE BREAKPOINTS
         ========================================================================== */
@media (max-width: 1024px) {
  .document-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .toc-sidebar {
    position: relative;
    top: 0;
    margin-bottom: 16px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
  .footer-col-bio {
    grid-column: span 2;
    max-width: 100%;
  }
}

@media (max-width: 991px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .header-title {
    font-size: 32px;
  }
  .header-subtitle {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .legal-header {
    padding: 48px 0 36px 0;
  }
  .header-title {
    font-size: 27px;
  }
  .header-subtitle {
    font-size: 15px;
  }
  .header-meta-row {
    flex-direction: column;
    gap: 12px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-col-bio {
    grid-column: span 1;
  }
  .article-notice-banner {
    flex-direction: column;
    padding: 16px;
  }
  .policy-section h2 {
    font-size: 20px;
  }
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* Print Stylesheet for Compliance Archiving */
@media print {
  #reading-progress,
  .site-header,
  .toc-sidebar,
  .nav-toggle,
  .mobile-drawer,
  #back-to-top {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .document-layout {
    grid-template-columns: 1fr !important;
  }
  .policy-section h2,
  .policy-section h3,
  .policy-section strong {
    color: #000000 !important;
  }
  .legal-callout {
    background: #f8f9fa !important;
    border-color: #000000 !important;
  }
}
