/* ============================================================
   Terms & Conditions — minimal custom CSS
   Layout, spacing, colors, borders & cards use Bootstrap utilities.
   This file holds only what Bootstrap utilities cannot express.
   ============================================================ */
.tc-page {
  --tc-primary: #6366f1;
  --tc-line: #e2e8f0;
  --tc-bg: #f8fafc;
  --tc-nav-h: 88px;
  background: var(--tc-bg);
  position: relative;
}

/* Soft fade strip below the sticky navbar */
.tc-page::after {
  content: "";
  position: fixed;
  top: var(--tc-nav-h);
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, rgba(248, 250, 252, .96) 0%, rgba(248, 250, 252, 0) 100%);
  z-index: 1015;
  pointer-events: none;
}

/* Reading progress bar */
.tc-progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 1080;
  pointer-events: none;
}

.tc-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  transition: width .12s linear;
}

/* ===== HERO ===== */
.tc-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 48px;
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(99, 102, 241, .12), transparent 60%),
    radial-gradient(900px 400px at 0% 0%, rgba(236, 72, 153, .08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--tc-line);
}

.tc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, .04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}

.tc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--tc-line);
  color: #0f172a;
}

.tc-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .15);
}

.tc-hero-title {
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.02em;
  line-height: 1.05;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
}

.tc-hero-title .grad {
  background: linear-gradient(90deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tc-hero-sub {
  color: #475569;
  font-size: 1.05rem;
  max-width: 720px;
}

/* ===== STICKY TOC SIDEBAR (counters + active state) ===== */
.tc-toc {
  position: sticky;
  top: 140px;
  max-height: calc(100vh - 130px);
  overflow: auto;
}

.tc-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: tc;
}

.tc-toc li {
  counter-increment: tc;
}

.tc-toc a {
  display: block;
  padding: 9px 12px 9px 38px;
  margin: 2px 0;
  border-radius: 10px;
  font-size: 13.5px;
  color: #475569;
  text-decoration: none;
  position: relative;
  transition: all .18s ease;
  line-height: 1.35;
}

.tc-toc a::before {
  content: counter(tc, decimal-leading-zero);
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 6px;
}

.tc-toc a:hover {
  background: #eef2ff;
  color: var(--tc-primary);
}

.tc-toc a.active {
  background: linear-gradient(90deg, #eef2ff, #fdf2f8);
  color: var(--tc-primary);
  font-weight: 600;
}

.tc-toc a.active::before {
  background: var(--tc-primary);
  color: #fff;
}

/* Active section highlight (JS-driven) */
.tc-section.is-active {
  border-color: #c7d2fe !important;
  box-shadow: 0 18px 40px -22px rgba(99, 102, 241, .35);
}

.tc-section { scroll-margin-top: 140px; }

/* Back-to-top button (animated show/hide) */
.tc-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--tc-primary);
  border: 1px solid var(--tc-line);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px -8px rgba(15, 23, 42, .25);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all .25s ease;
  z-index: 1030;
}

.tc-top.show {
  opacity: 1;
  transform: translateY(0);
}

.tc-top:hover {
  background: var(--tc-primary);
  color: #fff;
  border-color: var(--tc-primary);
}

/* Mobile TOC <details> chevron + visibility */
.tc-mobile-toc { display: none; }

@media (max-width: 991.98px) {
  .tc-mobile-toc { display: block; }
  .tc-mobile-toc summary { list-style: none; cursor: pointer; }
  .tc-mobile-toc summary::-webkit-details-marker { display: none; }
  .tc-toc-desktop { display: none !important; }
}
