/* ─────────────────────────────────────────────
   LiveWire — Legal page layout (terms.html, privacy.html)
   Loaded after styles.css.
   ───────────────────────────────────────────── */

.legal-hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid rgba(57, 83, 111, 0.4);
  background: radial-gradient(ellipse 80% 100% at 20% 0%, rgba(57, 231, 204, 0.07) 0%, transparent 62%);
}

.legal-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--type-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--current);
  margin-bottom: 28px;
  transition: gap 0.18s ease;
}

.legal-hero__back:hover { gap: 12px; }

.legal-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--ink);
  margin: 14px 0 18px;
}

.legal-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.legal-hero__meta b {
  color: var(--ink-dim);
  font-weight: 500;
}

/* ── Layout ── */
.legal-layout { padding: 56px 0 40px; }

.legal-layout__inner {
  display: grid;
  grid-template-columns: 244px 1fr;
  gap: 56px;
  align-items: start;
}

/* ── Sticky table of contents ── */
.legal-toc { position: sticky; top: 96px; }

.legal-toc__title {
  font-family: var(--font-mono);
  font-size: var(--type-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(57, 83, 111, 0.4);
}

.legal-toc__list { display: flex; flex-direction: column; gap: 2px; }

.legal-toc__list a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--type-small);
  line-height: 1.45;
  color: var(--ink-dim);
  border-left: 2px solid transparent;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.legal-toc__list a:hover {
  background: rgba(20, 36, 56, 0.85);
  color: var(--current);
  border-left-color: var(--current);
}

/* ── Content ── */
.legal-content { min-width: 0; max-width: 74ch; }

/* Plain-language summary panel */
.legal-summary {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: linear-gradient(155deg, var(--cell-hi) 0%, var(--cell) 75%);
  border: 1px solid rgba(57, 231, 204, 0.35);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 52px;
}

.legal-summary__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-top: 2px;
}

.legal-summary__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--current);
  margin-bottom: 8px;
}

.legal-summary p {
  font-size: var(--type-small);
  color: var(--ink-mid);
  line-height: 1.75;
}

.legal-summary p + p { margin-top: 10px; }

/* Sections */
.legal-section {
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(57, 83, 111, 0.3);
}

.legal-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.legal-section__heading {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 18px;
  scroll-margin-top: 104px;
}

.legal-section__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(20, 36, 56, 0.9);
  border: 1px solid var(--grid);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--current);
}

.legal-section p {
  font-size: var(--type-body);
  color: var(--ink-mid);
  line-height: 1.85;
  margin-bottom: 14px;
}

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

.legal-section h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 26px 0 10px;
}

.legal-section a {
  color: var(--current);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(57, 231, 204, 0.4);
  transition: text-decoration-color 0.18s ease;
}

.legal-section a:hover { text-decoration-color: var(--current); }

.legal-section ul,
.legal-section ol {
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.legal-section li {
  position: relative;
  padding-left: 24px;
  font-size: var(--type-body);
  color: var(--ink-mid);
  line-height: 1.8;
}

/* List bullets drawn as solder pads */
.legal-section li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 2px rgba(215, 159, 87, 0.18);
}

.legal-section strong { color: var(--ink); font-weight: 600; }

/* Definition-style table for the data inventory */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 18px;
  font-size: var(--type-small);
  border: 1px solid rgba(57, 83, 111, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(57, 83, 111, 0.3);
  vertical-align: top;
  line-height: 1.65;
}

.legal-table thead th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: rgba(12, 25, 41, 0.85);
}

.legal-table tbody th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--copper-hi);
  white-space: nowrap;
}

.legal-table td { color: var(--ink-dim); }
.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td { border-bottom: none; }

.legal-table__wrap { overflow-x: auto; }

/* Contact block */
.legal-contact {
  background: rgba(12, 25, 41, 0.8);
  border: 1px solid rgba(57, 83, 111, 0.45);
  border-left: 3px solid var(--current);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  font-size: var(--type-small);
  line-height: 1.85;
  color: var(--ink-mid);
}

@media (max-width: 900px) {
  .legal-layout__inner { grid-template-columns: 1fr; gap: 36px; }
  .legal-toc {
    position: static;
    background: rgba(12, 25, 41, 0.7);
    border: 1px solid rgba(57, 83, 111, 0.4);
    border-radius: var(--radius-md);
    padding: 18px 16px;
  }
  .legal-toc__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
  .legal-summary { flex-direction: column; gap: 12px; }
}
