/*
 * NableU maintainer note
 * Purpose: Presents public legal documents as readable, printable, keyboard-
 * accessible pages without requiring JavaScript or authenticated app state.
 */

:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: Canvas;
  color: CanvasText;
}

a { color: LinkText; }
a:focus-visible, .legal-table-scroll:focus-visible { outline: 3px solid Highlight; outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  padding: 0.7rem 1rem;
  background: Canvas;
  color: CanvasText;
  border: 2px solid CanvasText;
  z-index: 10;
}

.skip-link:focus { top: 1rem; }

.legal-header,
.legal-footer {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid color-mix(in srgb, CanvasText 20%, transparent);
}

.legal-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.legal-brand img { width: 2.25rem; height: 2.25rem; }

.legal-shell {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 3rem) 0;
}

.legal-shell h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; }
.legal-shell h2 { margin-top: 2.5rem; font-size: clamp(1.45rem, 3vw, 2rem); }
.legal-shell h3 { margin-top: 2rem; }
.legal-shell p, .legal-shell li { max-width: 78ch; }
.legal-shell li + li { margin-top: 0.35rem; }
.legal-shell code { overflow-wrap: anywhere; }

blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 1rem;
  border-left: 4px solid currentColor;
}

.legal-table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 36rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem;
  border: 1px solid color-mix(in srgb, CanvasText 28%, transparent);
}

th { font-weight: 700; }

.legal-footer {
  border-top: 1px solid color-mix(in srgb, CanvasText 20%, transparent);
  font-size: 0.95rem;
}

@media (max-width: 620px) {
  .legal-header { align-items: flex-start; flex-direction: column; }
  .legal-header nav { gap: 0.75rem 1rem; }
}

@media print {
  .skip-link, .legal-header nav { display: none; }
  .legal-header, .legal-shell, .legal-footer { width: 100%; }
  .legal-shell { padding-top: 0; }
  a { color: inherit; text-decoration: underline; }
}

@media (forced-colors: active) {
  blockquote, th, td, .legal-header, .legal-footer { border-color: CanvasText; }
}
