/* Legal pages: contact, terms, privacy, refunds, shipping. Built by scripts/legal.mjs and
   layered on styles.css, so type, colour and buttons match the home page. */

.legal-page {
  background: var(--c-surface);
}
.legal-head {
  border-bottom: 1px solid var(--c-line);
}
.legal-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--head-h);
}
.legal-page .brand-i {
  color: var(--c-filament);
}

.legal {
  display: grid;
  gap: 28px;
  padding-block: clamp(28px, 6vw, 72px) var(--section);
}
@media (min-width: 900px) {
  .legal {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
}

/* Page list: a row of chips on phones, a sticky list beside the text on wider screens. */
.legal-nav {
  display: flex;
  gap: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.legal-nav::-webkit-scrollbar {
  display: none;
}
.legal-nav a {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  color: var(--c-ink2);
  font-size: var(--fs-small);
  font-weight: var(--fw-body-strong);
  text-decoration: none;
}
.legal-nav a[aria-current="page"] {
  border-color: var(--c-ink);
  background: var(--c-ink);
  color: var(--c-surface);
}
@media (min-width: 900px) {
  .legal-nav {
    position: sticky;
    top: 24px;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .legal-nav a {
    padding: 10px 14px;
    border: 0;
    border-radius: var(--r-chip-small);
    font-size: var(--fs-body);
  }
  .legal-nav a:hover {
    background: var(--c-canvas);
  }
}

/* The document: one readable column. */
.legal-doc {
  max-width: 68ch;
  color: var(--c-ink2);
}
.legal-doc h1 {
  color: var(--c-ink);
  font-size: var(--t-heading);
  font-weight: var(--fw-h1);
  letter-spacing: var(--ls-h1);
  line-height: var(--lh-h1);
}
.legal-meta {
  margin-top: 10px;
  font-size: var(--fs-small);
  color: var(--c-muted);
}
.legal-doc .lead {
  margin-top: 24px;
  color: var(--c-ink);
  font-size: var(--fs-title);
  line-height: 1.45;
}
.legal-doc h2 {
  margin-top: 40px;
  color: var(--c-ink);
  font-size: var(--fs-title);
  font-weight: var(--fw-title);
  letter-spacing: var(--ls-title);
}
.legal-doc p,
.legal-doc ul,
.legal-doc address,
.legal-doc dl {
  margin-top: 12px;
}
.legal-doc ul {
  display: grid;
  gap: 8px;
  padding-left: 1.2em;
  list-style: disc;
}
.legal-doc li::marker {
  color: var(--c-filament);
}
.legal-doc strong {
  color: var(--c-ink);
}
.legal-doc address {
  font-style: normal;
}
.legal-doc a {
  color: var(--c-filament-ink);
  text-underline-offset: 3px;
}
.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--c-line);
}
.facts div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-line);
}
.facts dt {
  color: var(--c-muted);
  font-size: var(--fs-small);
  font-weight: var(--fw-body-strong);
}
.facts dd {
  margin: 0;
  color: var(--c-ink);
}

/* Price table on the pricing page */
.prices {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.prices th,
.prices td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}
.prices thead th {
  color: var(--c-muted);
  font-size: var(--fs-small);
  font-weight: var(--fw-body-strong);
}
.prices tbody th {
  color: var(--c-ink);
  font-weight: var(--fw-title);
}
.prices td:last-child {
  color: var(--c-ink);
  font-weight: var(--fw-title);
  text-align: right;
}
