/* ==========================================================================
   Legal pages (privacy.html). Sits on top of styles.css and work/work.css:
   the shell, sticky index and section rhythm are the case-study ones, and
   only what a policy needs beyond them lives here.
   ========================================================================== */
.legal-updated {
  margin: 1.6rem 0 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ---- the short version: one bordered panel above the full text ---- */
.legal-summary {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  max-width: 880px;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--case-accent);
  border-radius: 16px;
  background: var(--bg-tertiary);
}
.legal-summary h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--case-accent);
}
.legal-summary ul { margin: 1.1rem 0 0; }
.legal-summary li { color: var(--text-primary); }

/* ---- prose ---- */
.legal-list {
  margin: 1.1rem 0 0;
  padding-left: 1.2rem;
  max-width: 62ch;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.legal-list li + li { margin-top: 0.55rem; }
.legal-list li::marker { color: var(--case-accent); }
.legal-list strong { color: var(--text-primary); font-weight: 600; }

.case-p a,
.legal-list a,
.legal-table a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--case-accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.case-p a:hover,
.legal-list a:hover,
.legal-table a:hover { color: var(--case-accent); }
.case-p a:focus-visible,
.legal-list a:focus-visible,
.legal-table a:focus-visible { outline: 2px solid var(--case-accent); outline-offset: 3px; border-radius: 2px; }

.legal-table code,
.legal-list code,
.case-p code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* ---- storage table: hairline rows, no card ---- */
.legal-table {
  width: 100%;
  max-width: 880px;
  margin-top: 2rem;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
}
.legal-table th,
.legal-table td {
  padding: 0.95rem 1.2rem 0.95rem 0;
  border-top: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text-muted);
}
.legal-table thead th {
  border-top: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.legal-table tbody th { font-weight: 500; white-space: nowrap; }
.legal-table tbody tr:last-child > * { border-bottom: 1px solid var(--border-subtle); }

/* Phones: each row becomes a labelled stack, so nothing scrolls sideways. */
@media (max-width: 768px) {
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal-table tr { display: block; padding: 1rem 0; border-top: 1px solid var(--border-subtle); }
  .legal-table tbody tr:last-child { border-bottom: 1px solid var(--border-subtle); }
  .legal-table th,
  .legal-table td,
  .legal-table tbody tr:last-child > * { display: block; padding: 0; border: 0; }
  .legal-table tbody th { white-space: normal; }
  .legal-table td { margin-top: 0.45rem; }
  .legal-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
}

/* ---- slim footer: only the small row, no conversation block ---- */
.site-footer.legal-footer { padding: 0 0 2.2rem; }
.legal-footer .footer-row { margin-top: 0; border-top: 0; }
