/* Base layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #f4f6fb;
  color: #122044;
}

/* Container */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

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

.hero.hero-compact {
  min-height: 260px !important;      /* small banner height */
  padding: 120px 0 80px !important;  /* spacing under sticky header */
  color: #e5ecff;
  display: flex;
  align-items: center;
}


/* Logo */
.logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #122044;
  text-decoration: none;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.main-nav a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.15s ease;
}

.main-nav a:hover {
  color: #2563eb;
  transform: translateY(-1px);
}

.btn-nav {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #2563eb;
  color: #2563eb;
}

.btn-nav:hover {
  background: #2563eb;
  color: #ffffff;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

/* Hero */
.hero {
  padding: 64px 0 40px;
  background: radial-gradient(circle at top left, #2563eb 0, #0f172a 55%);
  color: #e5ecff;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: #c7d2fe;
  margin: 0 0 0.75rem;
}

.breadcrumb a {
  color: #e5ecff;
  text-decoration: none;
}

.breadcrumb span {
  margin: 0 0.3rem;
}

.hero h1 {
  font-size: 2.25rem;
  margin: 0 0 0.25rem;
}

.hero-subtitle {
  max-width: 540px;
  margin: 0;
  font-size: 0.98rem;
  color: #dbeafe;
}

/* Main layout */
.page-main {
  padding: 32px 0 56px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: flex-start;
}

/* Table of contents */
.toc {
  position: sticky;
  top: 96px;
  align-self: flex-start;
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.toc li {
  margin-bottom: 0.25rem;
}

.toc a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #4b5563;
  display: block;
  padding: 0.15rem 0;
  border-radius: 6px;
  line-height: 1.4;
}

.toc a:hover {
  color: #2563eb;
}

/* Terms card */
.terms-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.75rem 1.8rem 2rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.last-updated {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0;
}

.note {
  margin: 0.75rem 0 1.5rem;
  padding: 0.85rem 1rem;
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1f2937;
}

.terms-card section + section {
  margin-top: 1.5rem;
}

.terms-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: #111827;
}

.terms-card p {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1f2937;
}

.terms-card ul,
.terms-card ol {
  margin: 0.35rem 0 0.75rem 1.15rem;
  font-size: 0.95rem;
  color: #1f2937;
}

.terms-card li {
  margin-bottom: 0.25rem;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  opacity: 0;
}

.back-to-top.show {
  display: flex;
  opacity: 1;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.4);
}

/* Responsive */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 56px;
  }

  .main-nav {
    position: absolute;
    inset: 56px 0 auto;
    margin: 0;
    padding: 0.75rem 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .btn-nav {
    margin-top: 0.25rem;
  }

  .nav-toggle {
    display: flex;
  }
}

/* Make section headings clearly bold */
.terms-card h2 {
  font-weight: 700;          /* stronger than main.css / bootstrap defaults */
}

/* Make any <strong> inside the terms really bold and dark */
.terms-card strong {
  font-weight: 700;
  color: #0f172a;            /* slightly darker for contrast */
}

/* Optional: slightly tighter text color for normal paragraphs */
.terms-card p {
  color: #111827;
}
.terms-card section + section {
  margin-top: 1rem;          /* was 1.5rem */
}

/* pull the heading closer to the first line (1.1 ...) */
.terms-card h2 {
  margin: 0 0 0.25rem;       /* was 0 0 0.5rem */
}

/* slightly tighter paragraph spacing (1.1, 1.2, 1.3 ...) */
.terms-card p {
  margin: 0.2rem 0;          /* was 0.35rem 0 */
}

/* also tighten bullet-list spacing a bit */
.terms-card ul,
.terms-card ol {
  margin: 0.2rem 0 0.5rem 1.15rem;
}

.terms-card section {
  margin: 0;
  padding: 0;
}

/* small gap between numbered sections (1., 2., 3., ...) */
.terms-card section + section {
  margin-top: 0.5rem;           /* was ~1.5rem+ effectively */
}

/* heading sits close to the content above and below */
.terms-card h2 {
  margin-top: 0;                /* no extra space above */
  margin-bottom: 0.15rem;       /* just a tiny space below */
}

/* paragraphs (1.1, 1.2, 1.3...) closer together */
.terms-card p {
  margin-top: 0.1rem;
  margin-bottom: 1rem;
}

/* lists a bit tighter as well */
.terms-card ul,
.terms-card ol {
  margin-top: 0.1rem;
  margin-bottom: 0.35rem;
}

