@import "shared-vars.css";

/* ── Legal pages (Terms of Service, Privacy Policy) ──────────
   Public, light-themed prose pages. Chrome (slim banner + navbar)
   comes from shared-vars.css; this file styles the document body,
   the section cards, and the shared site footer. */

body.legal-page {
  margin: 0;
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.legal {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 40px 0.75rem 64px;
}

/* ── Page header ── */
.legal-head {
  margin-bottom: 28px;
}

.legal-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.legal-head h1 {
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.legal-updated {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-default);
}

.legal-updated a {
  color: var(--accent);
  text-decoration: none;
}

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

/* ── Section cards ── */
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 26px 32px;
  margin-bottom: 16px;
}

.legal-card h2 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  scroll-margin-top: 24px;
}

.legal-card > p:last-child,
.legal-card ul:last-child,
.legal-card ol:last-child,
.legal-card table:last-child { margin-bottom: 0; }

.legal-card p,
.legal-card li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.legal-card p { margin: 0 0 0.85rem; }

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

.legal-card li { margin-bottom: 0.4rem; }

.legal-card a {
  color: var(--accent);
  text-decoration: none;
}

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

/* "Your Rights"-style two-column table. */
.legal-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.85rem;
  font-size: 0.95rem;
}

.legal-card th,
.legal-card td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--border-default);
  line-height: 1.55;
}

.legal-card thead th {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.legal-card tbody th {
  font-weight: 600;
  color: var(--text-primary);
  width: 38%;
}

.legal-card tbody td { color: var(--text-secondary); }

/* ── Amber callout (ToS non-affiliation disclaimer) ── */
.legal-callout {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 10px;
  padding: 26px 32px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
}

.legal-callout h2 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1rem;
}

.legal-callout p,
.legal-callout li {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #6b4f15;
}

.legal-callout p { margin: 0 0 0.85rem; }
.legal-callout p:last-child { margin-bottom: 0; }

.legal-callout ul {
  margin: 0 0 0.85rem;
  padding-left: 1.4rem;
}

.legal-callout strong { color: #6b4f15; }
.legal-callout a { color: #6b4f15; text-decoration: underline; }

/* ── Section divider (e.g. "// Attributions & Credits") ── */
.legal-rule-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 40px 0 8px;
  scroll-margin-top: 24px;
}

.legal-rule-head .legal-eyebrow { margin: 0; white-space: nowrap; }

.legal-rule-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

.attr-intro {
  margin: 0 0 20px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ── Attribution groups ── */
.attr-group {
  border: 1px solid var(--border-default);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-card);
}

.attr-group-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-default);
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.attr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
}

.attr-row:last-child { border-bottom: none; }

.attr-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.attr-name:hover { text-decoration: underline; }
.attr-name svg { width: 15px; height: 15px; flex: none; }

.attr-by {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.attr-license {
  flex: none;
  background: var(--bg-soft-2);
  border-radius: 6px;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .attr-row { flex-direction: column; align-items: flex-start; }
}

/* Shared site footer (.footer) is styled in shared-vars.css. */
