.p-legal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.s-legal {
  flex: 1;
  padding-top: calc(var(--nav-h) + var(--space-12));
  padding-bottom: var(--space-24);
  background: var(--clr-bg-deep);
}

.s-legal__hero {
  max-width: 760px;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--clr-border);
}

.s-legal__hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--clr-text-primary);
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: 1.2;
}

.s-legal__meta {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  margin-bottom: var(--space-5);
}

.s-legal__intro {
  font-size: 1.05rem;
  color: var(--clr-text-secondary);
  line-height: 1.7;
  max-width: 680px;
}

.s-legal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 820px;
  margin-bottom: var(--space-12);
}

.c-legal-section {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-base);
}
.c-legal-section:hover { border-color: var(--clr-border-bright); }

.c-legal-section__summary {
  background: var(--clr-bg-card);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--clr-border);
}
.c-legal-section__summary strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--clr-secondary);
}

.c-legal-section__detail {
  background: rgba(13,18,32,0.6);
  padding: var(--space-6);
}
.c-legal-section__detail p {
  font-size: 0.92rem;
  color: var(--clr-text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}
.c-legal-section__detail p:last-child { margin-bottom: 0; }
.c-legal-section__detail address p { margin-bottom: var(--space-2); }
.c-legal-section__detail a {
  color: var(--clr-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}
.c-legal-section__detail a:hover { color: var(--clr-secondary); }

.c-legal-list {
  margin: var(--space-3) 0 var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.c-legal-list li {
  font-size: 0.9rem;
  color: var(--clr-text-secondary);
  line-height: 1.65;
  list-style: disc;
  padding-left: var(--space-2);
}

/* Terms lettered variant */
.c-legal-section--alt .c-legal-section__summary--alt {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.c-legal-letter {
  width: 32px; height: 32px;
  background: var(--grad-primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* Cookie page plain headings */
.c-legal-section--plain {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.c-legal-section__heading-plain {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text-primary);
  background: var(--clr-bg-card);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--clr-border);
}

.c-cookie-type { margin-bottom: var(--space-6); }
.c-cookie-type:last-child { margin-bottom: 0; }
.c-cookie-type__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.c-cookie-type__badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.c-cookie-type__badge--required { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.c-cookie-type__badge--analytics { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.c-cookie-type__badge--functional { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.c-cookie-type__note { font-size: 0.78rem; color: var(--clr-text-muted); }

.c-cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-4);
  font-size: 0.85rem;
}
.c-cookie-table th, .c-cookie-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--clr-border);
}
.c-cookie-table th {
  background: rgba(59,130,246,0.06);
  color: var(--clr-text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.c-cookie-table td { color: var(--clr-text-secondary); }
.c-cookie-table tr:hover td { background: rgba(255,255,255,0.02); }

.s-legal__back { padding-top: var(--space-4); }

@media (max-width: 640px) {
  .c-cookie-table { font-size: 0.78rem; }
  .c-cookie-table th, .c-cookie-table td { padding: var(--space-2) var(--space-3); }
}