/*
 * legal.css — page-specific styles for the legal pages (Terms, Privacy,
 * Copyright/DMCA). The shared chrome (tokens, reset, header, nav, hamburger
 * menu, footer) lives in chrome.css, loaded first. This sheet adds the
 * prose reading column and legal-only tweaks.
 */
:root {
  --prose-max: 780px;
  --surface: #ffffff;
  --surface-border: rgba(24, 32, 25, 0.1);
  --radius-md: 18px;
}

.legal-shell {
  padding: 20px 24px 40px;
}

/* Header, reading column, and footer share one width so they line up. */
.topbar,
.legal-main,
.site-footer {
  max-width: var(--prose-max);
  margin: 0 auto;
}

/* Separate the footer from the prose card (the marketing page gets this gap
   from its section spacing; the legal layout needs it explicitly). */
.site-footer {
  margin-top: 36px;
}

/* Current-page highlight in the header nav (the marketing nav has none). */
.nav-pill.is-active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.nav-pill.nav-home {
  color: var(--green-deep);
}

/* Active page in the collapsed mobile dropdown — subtle, matching the other
   rows rather than a loud solid fill. */
.mobile-menu a.is-active {
  background: var(--green-pale);
  color: var(--green-deep);
}

/* Prose card */
.legal-main {
  margin-top: 28px;
}

.legal-card {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  line-height: 1.62;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.legal-card h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  font-weight: 700;
}

.legal-effective {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-deep);
}

.legal-card h2 {
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  margin: 2.2em 0 0.55em;
  padding-top: 0.4em;
  font-weight: 660;
}

.legal-card h3 {
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  margin: 1.6em 0 0.4em;
  font-weight: 640;
}

.legal-card p {
  margin: 0 0 1.05em;
}

.legal-card ul,
.legal-card ol {
  margin: 0 0 1.15em;
  padding-left: 1.4em;
}

.legal-card li {
  margin: 0 0 0.5em;
}

.legal-card li::marker {
  color: var(--green);
}

.legal-card strong {
  font-weight: 660;
}

.legal-card hr {
  border: none;
  border-top: 1px solid var(--surface-border);
  margin: 2em 0;
}

/* Prose links are green (the shared reset leaves <a> inheriting). */
.legal-card a {
  color: var(--green-deep);
}

.legal-card a:hover {
  text-decoration: underline;
}

/* External links in the prose get a trailing external-link glyph. Only absolute
   http(s) URLs match — internal cross-document/nav links use relative paths. */
.legal-card a[href^="http"]::after {
  content: "";
  display: inline-block;
  width: 0.66em;
  height: 0.66em;
  margin-left: 0.15em;
  vertical-align: -0.02em;
  background-color: currentColor;
  opacity: 0.72;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E")
    no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E")
    no-repeat center / contain;
}

/* Callout blockquotes (e.g. the DMCA agent block) */
.legal-card blockquote {
  margin: 1.4em 0;
  padding: 16px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(224, 161, 92, 0.1);
  color: var(--text-soft);
}

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

.legal-card blockquote strong {
  color: var(--gold-deep);
}

@media (max-width: 760px) {
  .legal-shell {
    padding: 16px 14px 32px;
  }
}
