/* Shared layout for standalone legal pages (privacy, subprocessors, terms, about). */

html.legal-page,
html.legal-page body {
  height: auto;
  min-height: 100%;
  overflow: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-user-select: text;
  user-select: text;
  overscroll-behavior: auto;
}

.legal-shell {
  width: min(72rem, calc(100vw - 2rem));
  margin: 0 auto;
  padding:
    max(1.5rem, env(safe-area-inset-top))
    0
    max(3rem, env(safe-area-inset-bottom));
}

.legal-shell .instructions-header {
  align-items: flex-start;
  padding-bottom: 1rem;
}

/* OCP-00713: smaller page titles and section headings (the user, 14 Nov 2026: "do the headings have to be so big?").
   The first font-size is for iOS 10, which has no clamp(). */
.legal-shell .instructions-header h1 {
  font-size: 2rem;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.08;
}

.legal-shell .auth-agreement h2,
.legal-shell .legal-section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.legal-shell .auth-agreement {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 0.45rem;
  max-height: none !important;
  min-height: 0;
  overflow: visible !important;
  padding: 1.1rem 1.15rem;
  background: var(--surface, #101313);
  border: 1px solid var(--border, rgba(245, 245, 242, 0.14));
  border-radius: 8px;
}

.legal-shell .auth-agreement code {
  color: var(--brand-lime, #a6e600);
  font-size: 0.88em;
}

.legal-shell .auth-agreement__heading {
  font-size: 1rem;
}

.legal-shell .auth-agreement p,
.legal-shell .auth-agreement__list {
  font-size: 0.98rem;
  line-height: 1.45;
}

.legal-actions {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.legal-actions a {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 900;
  text-decoration: none;
}

.legal-actions .primary-link {
  background: var(--brand-lime, #a6e600);
  color: #050505;
}

.legal-actions .secondary-link {
  background: #1b1b1b;
  border: 1px solid var(--border, rgba(245, 245, 242, 0.14));
  color: var(--ink, #f5f5f2);
}

.legal-shell .subprocessor-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0.75rem 0 1rem;
}

.legal-shell .subprocessor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal-shell .subprocessor-table th,
.legal-shell .subprocessor-table td {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border, rgba(245, 245, 242, 0.14));
  text-align: left;
  vertical-align: top;
}

.legal-shell .subprocessor-table th {
  color: var(--brand-lime, #a6e600);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  background: #141414;
}

/* OCP-00709: About and Terms pages, and the company footer on every legal page. Margins, not flex gap, so
   iOS 10 Safari spaces them the same. */
.legal-shell .legal-section {
  margin-top: 1rem;
}

.legal-shell .legal-section h2.auth-agreement__heading {
  margin: 0;
}

.legal-shell .legal-facts {
  margin: 0.35rem 0 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.legal-shell .legal-facts dt {
  margin-top: 0.6rem;
  color: var(--muted, #b9bcb5);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-shell .legal-facts dt:first-child {
  margin-top: 0;
}

.legal-shell .legal-facts dd {
  margin: 0.1rem 0 0;
}

.legal-shell .auth-agreement a,
.legal-footer a {
  color: var(--brand-lime, #a6e600);
}

.legal-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, rgba(245, 245, 242, 0.14));
  color: #8a8a84;
  font-size: 0.85rem;
  line-height: 1.6;
}

.legal-shell .legal-footer p {
  margin: 0.35rem 0 0;
  color: #8a8a84;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.6;
}

.legal-footer__links a {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.35rem 0;
  color: var(--ink, #f5f5f2);
  font-weight: 700;
  text-decoration: none;
}

.legal-footer__links a:hover,
.legal-footer__links a:focus,
.legal-footer__links a[aria-current="page"] {
  color: var(--brand-lime, #a6e600);
  text-decoration: underline;
}
