/* ==========================================================
   Legal sections  —  templates/partials/privacy.html
                      templates/partials/terms.html
   ========================================================== */

.legal-section {
  padding: 40px 0;
  border-top: 1px solid var(--line-accent);
  background:
    radial-gradient(35% 60% at 0% 0%, rgba(255, 23, 68, 0.10), transparent 70%),
    radial-gradient(25% 40% at 100% 0%, rgba(255, 176, 0, 0.05), transparent 70%);
}

.legal-section svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Collapsible blocks (click the arrow to open) ---------- */

.legal-stack {
  display: grid;
  gap: 12px;
}

.legal-fold {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  scroll-margin-top: calc(var(--header-height) + 16px);
  transition: border-color 0.2s ease;
}

.legal-fold[open] {
  border-color: var(--line-accent);
}

.legal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  list-style: none;
  cursor: pointer;
}

.legal-summary::-webkit-details-marker {
  display: none;
}

.legal-summary .eyebrow {
  display: block;
  margin: 0 0 2px;
}

.legal-summary:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.legal-chevron {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  color: var(--gold);
  transition: transform 0.25s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.legal-chevron svg {
  width: 18px;
  height: 18px;
}

.legal-summary:hover .legal-chevron {
  border-color: var(--gold);
}

.legal-fold[open] .legal-chevron {
  transform: rotate(180deg);
  background: var(--gold-soft);
}

.legal-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.draft-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.draft-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.legal-body {
  padding: 0 24px 24px;
}

/* ---------- Content card ---------- */

.legal-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.legal-card p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 28px;
  color: var(--text-soft);
}

.legal-card > p:last-child {
  margin-bottom: 0;
}

.legal-card code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.875em;
  line-height: 1;
  color: var(--text);
}

.legal-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.legal-contact-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.legal-contact-icon svg {
  width: 18px;
  height: 18px;
}

.legal-contact p {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}

.legal-contact a {
  color: var(--gold-light);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(255, 211, 106, 0.4);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-contact a:hover {
  text-decoration-color: currentColor;
}

.legal-contact a:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- "Information still needed" callout ---------- */

.legal-todo {
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 176, 0, 0.07) 0%, rgba(255, 176, 0, 0.02) 100%);
}

.legal-todo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.legal-todo-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
}

.legal-todo-icon svg {
  width: 18px;
  height: 18px;
}

.legal-todo h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  color: var(--gold-light);
}

.legal-todo ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-todo li {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-soft);
}

/* Dashed circle = "still to do" */
.legal-todo li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 14px;
  height: 14px;
  border: 1.5px dashed var(--gold);
  border-radius: 50%;
}

.legal-todo-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-gold);
  font-size: 13px;
  line-height: 20px;
  color: var(--gold-light);
}

.legal-todo-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--gold);
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .legal-section {
    padding: 32px 0;
  }

  .legal-summary {
    padding: 14px 16px;
  }

  .legal-body {
    padding: 0 16px 16px;
  }

  .legal-card {
    padding: 24px 20px;
  }

  .legal-todo {
    padding: 20px;
  }
}
