/* ==========================================================
   POLICIES PAGE
   ========================================================== */

.policies {
  padding: clamp(var(--space-12), 6vw, var(--space-20)) 0 clamp(var(--space-16), 8vw, var(--space-24));
}

.policies__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-16);
  align-items: start;
}

@media (max-width: 900px) {
  .policies__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ----- Sticky table of contents ----- */
.policies__toc {
  position: sticky;
  top: calc(var(--space-6) + 60px);
}

@media (max-width: 900px) {
  .policies__toc { position: static; }
}

.policies__toc-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.policies__toc-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sage-600);
  font-weight: 700;
  margin: 0 0 var(--space-4);
}

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

.policies__toc-list li {
  counter-increment: toc;
  margin: 0;
}

.policies__toc-list li + li { margin-top: var(--space-1); }

.policies__toc-list a {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.policies__toc-list a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--terracotta-500);
  flex-shrink: 0;
}

.policies__toc-list a:hover {
  background: var(--bg-alt);
  color: var(--navy-900);
}

.policies__toc-list a.is-active {
  background: color-mix(in srgb, var(--terracotta-500) 10%, transparent);
  color: var(--navy-900);
  font-weight: 600;
}

.policies__toc-list a.is-active::before {
  color: var(--terracotta-500);
}

/* ----- Policy articles ----- */
.policies__body {
  min-width: 0;
}

.policy {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(var(--space-8), 3.5vw, var(--space-12));
  margin-bottom: var(--space-10);
  scroll-margin-top: 100px;
  position: relative;
}

.policy:last-of-type { margin-bottom: 0; }

.policy__number {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--terracotta-500);
  margin-bottom: var(--space-3);
}

.policy__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.15;
  color: var(--navy-900);
  margin: 0 0 var(--space-2);
  font-weight: 500;
}

.policy__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--sage-600);
  margin: 0 0 var(--space-6);
  font-size: var(--text-lg);
}

.policy__content {
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.75;
}

.policy__content > *:first-child { margin-top: var(--space-6); }

.policy__content p {
  margin: 0 0 var(--space-4);
}

.policy__content h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--navy-800);
  margin: var(--space-8) 0 var(--space-3);
  font-weight: 600;
  line-height: 1.3;
}

.policy__content h3:first-child { margin-top: var(--space-4); }

.policy__content ul,
.policy__content ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.3em;
}

.policy__content li {
  margin-bottom: var(--space-2);
}

.policy__content li::marker {
  color: var(--terracotta-500);
}

.policy__content strong {
  color: var(--navy-900);
  font-weight: 700;
}

.policy__content em {
  font-style: italic;
  color: var(--navy-700);
}

/* ----- Back-to-top link ----- */
.policies__back-to-top {
  margin-top: var(--space-10);
  text-align: center;
}

.policies__back-to-top a {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--navy-700);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.policies__back-to-top a:hover {
  background: var(--navy-700);
  color: #fff;
}

/* ----- Smooth scroll anchor behaviour ----- */
html { scroll-behavior: smooth; }
