/* =========================================================================
   REGISTRY.CO — POLICY LAYOUT STYLES
   Used by _LayoutPolicy.cshtml for all policy pages.
   ========================================================================= */

/* ── Policy body override ────────────────────────────────────────────────── */
body.policy-body {
  background: var(--co-cream);
  color: var(--co-purple);
}

/* ── Policy hero banner ──────────────────────────────────────────────────── */
.policy-hero {
  background: var(--co-purple);
  color: var(--co-lime);
  padding: 120px 0 64px;
  position: relative;
  overflow: hidden;
}
.policy-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1.5px solid rgba(219,255,0,0.12);
  pointer-events: none;
}
.policy-hero .kicker {
  color: rgba(219,255,0,0.7);
  margin-bottom: 16px;
  display: inline-flex;
}
.policy-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 80px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 16ch;
}

/* ── Policy page wrapper ─────────────────────────────────────────────────── */
.policy-page-wrapper {
  padding-bottom: 120px;
}
.policy-page-wrapper > .container {
  padding-top: 64px;
}

/* ── Policy layout (sidebar + content) ──────────────────────────────────── */
.policy-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.policy-sidebar {
  position: sticky;
  top: 100px;
}
.policy-sidebar-inner {
  background: white;
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-1);
  border: 1.5px solid rgba(107,57,255,0.08);
}
.policy-sidebar-label {
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 14px;
}
.policy-toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.policy-toc-link {
  display: block;
  padding: 8px 12px;
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 13.5px;
  color: var(--co-purple);
  text-decoration: none;
  border-radius: var(--r-sm);
  line-height: 1.4;
  transition: background var(--dur-fast), color var(--dur-fast);
  border-left: 2px solid transparent;
}
.policy-toc-link:hover {
  background: rgba(107,57,255,0.06);
  border-left-color: var(--co-purple);
}
.policy-toc-link.is-active {
  background: rgba(107,57,255,0.08);
  color: var(--co-purple);
  font-weight: 600;
  border-left-color: var(--co-purple);
}

/* ── Policy content area ─────────────────────────────────────────────────── */
.policy-content {
  min-width: 0;
}

/* Policy section blocks */
.policy-section {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid rgba(107,57,255,0.1);
  scroll-margin-top: 88px;
}
.policy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Headings */
.policy-content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.8vw, 36px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 20px;
  color: var(--co-purple);
  scroll-margin-top: 88px;
}
.policy-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 24px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 14px;
  margin-top: 28px;
  color: var(--co-purple);
  scroll-margin-top: 88px;
}

/* Body text */
.policy-content p {
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(107,57,255,0.85);
  margin-bottom: 16px;
}
.policy-content p:last-child { margin-bottom: 0; }

/* Lists */
.policy-content ul,
.policy-content ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.policy-content ul li,
.policy-content ol li {
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
  color: rgba(107,57,255,0.85);
}
.policy-content ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--co-purple);
  opacity: 0.4;
  font-weight: 600;
}
.policy-content ol {
  counter-reset: policy-counter;
}
.policy-content ol li {
  counter-increment: policy-counter;
}
.policy-content ol li::before {
  content: counter(policy-counter) ".";
  position: absolute;
  left: 0;
  color: var(--co-purple);
  opacity: 0.5;
  font-weight: 700;
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 13px;
}

/* Strong text */
.policy-content strong {
  font-weight: 700;
  color: var(--co-purple);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .policy-layout {
    grid-template-columns: 1fr;
  }
  .policy-sidebar {
    position: static;
    top: auto;
    min-width: 0;
  }
  /* Sidebar becomes a horizontal scrollable chip bar on mobile */
  .policy-sidebar-inner {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 14px 16px;
    max-width: 100%;
    /* Prevent sidebar scroll from interfering with page scroll */
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .policy-sidebar-label { display: none; }
  .policy-toc {
    flex-direction: row;
    flex-wrap: nowrap; /* single scrollable row */
    gap: 6px;
    min-width: max-content;
  }
  .policy-toc-link {
    padding: 7px 14px;
    font-size: 12.5px;
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--r-pill);
    flex-shrink: 0;
  }
  .policy-toc-link:hover {
    background: rgba(107,57,255,0.06);
    border-left-color: transparent;
    border-bottom-color: var(--co-purple);
  }
  .policy-toc-link.is-active {
    background: var(--co-purple);
    color: var(--co-lime);
    border-left-color: transparent;
    border-bottom-color: transparent;
    font-weight: 700;
  }
}

@media (max-width: 640px) {
  .policy-hero { padding: 96px 0 40px; }
  .policy-page-wrapper > .container { padding-top: 32px; }
  .policy-section { padding-bottom: 32px; margin-bottom: 32px; }
  .policy-content h2 { font-size: clamp(22px, 6vw, 32px); }
  .policy-content p,
  .policy-content li { font-size: 15px; }
}

@media (max-width: 400px) {
  .policy-toc-link { font-size: 11.5px; padding: 6px 12px; }
}
