/* ============================================================
   PORTFOLIO — Legal pages stylesheet
   Terms / Privacy / Accessibility for every product.
   Editorial, high-contrast, prose-led. Tokens borrowed from
   assets/portfolio.css so the legal pages sit in the same family.
   ============================================================ */
:root {
  --bg-0:      #FAFAF7;
  --bg-1:      #F4EFE8;
  --bg-2:      #FFFFFF;
  --bg-tint:   #FFF8F2;
  --fg-0:      #0E0C0A;
  --fg-1:      #1A1714;
  --fg-2:      #4A413A;
  --fg-3:      #6F655B;
  --line-1:    rgba(20, 18, 15, 0.10);
  --line-2:    rgba(20, 18, 15, 0.16);
  --ember-50:  #FFF1EA;
  --ember-500: #FF6A3D;
  --ember-600: #E5512A;
  --ember-700: #B33A1B;
  --ember-800: #8A2E15;
  --font-serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --font-sans:  'Geist', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  background-attachment: fixed;
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ember-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ember-800); }
a:focus-visible,
.lg-tab:focus-visible,
.lg-home:focus-visible {
  outline: 3px solid var(--ember-600);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Skip link */
.lg-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--fg-0);
  color: #fff;
  padding: 10px 16px;
  z-index: 50;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.lg-skip:focus { left: 0; color: #fff; }

.lg-wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* Header */
.lg-top {
  border-bottom: 1px solid var(--line-1);
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.lg-top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.lg-home {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 14px;
  color: var(--fg-1);
  text-decoration: none;
}
.lg-home:hover { color: var(--ember-700); }
.lg-logo-mark {
  width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(135deg, #FF8A55 0%, #FF6A3D 60%, #E5512A 100%);
  display: inline-block;
}
.lg-breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex; gap: 8px; align-items: center;
}
.lg-breadcrumb a { color: var(--fg-3); }
.lg-breadcrumb a:hover { color: var(--ember-700); }

/* Main */
.lg-main { padding-top: 56px; padding-bottom: 96px; }

.lg-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember-700);
  margin: 0 0 12px;
}
h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--fg-0);
}
.lg-dates {
  font-size: 14px;
  color: var(--fg-3);
  margin: 0 0 28px;
}

/* Stage banner */
.lg-stage-banner {
  display: flex;
  gap: 12px;
  background: var(--bg-tint);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--ember-500);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 0 0 28px;
}
.lg-stage-banner p { margin: 0; font-size: 15px; color: var(--fg-2); }
.lg-stage-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ember-500);
  margin-top: 7px;
  flex: none;
}

/* Document tabs */
.lg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 36px;
  border-bottom: 1px solid var(--line-1);
  padding-bottom: 16px;
}
.lg-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 7px 15px;
}
.lg-tab:hover { border-color: var(--ember-500); color: var(--ember-700); }
.lg-tab-on {
  background: var(--fg-0);
  color: #fff;
  border-color: var(--fg-0);
}
.lg-tab-on:hover { color: #fff; }

/* Intro */
.lg-intro p {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0 0 36px;
}

/* Sections */
.lg-section { margin: 0 0 38px; }
.lg-section h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  color: var(--fg-0);
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.lg-sec-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ember-700);
  flex: none;
}
.lg-section p { margin: 0 0 14px; }
.lg-section ul { margin: 0 0 14px; padding-left: 22px; }
.lg-section li { margin: 0 0 8px; }
.lg-section p:last-child, .lg-section ul:last-child { margin-bottom: 0; }

.lg-inline-note {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 15px;
  color: var(--fg-2);
}

/* Footer */
.lg-foot {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line-2);
}
.lg-foot h2 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.lg-foot p { margin: 0 0 12px; font-size: 15px; color: var(--fg-2); }
.lg-foot-meta { font-size: 13px; color: var(--fg-3); }
.lg-foot-links {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Legal hub index */
.lg-hub-intro p {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--fg-2);
}
.lg-group { margin: 40px 0 0; }
.lg-group-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember-700);
  margin: 0 0 4px;
}
.lg-group-note { font-size: 14px; color: var(--fg-3); margin: 0 0 16px; }
.lg-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 12px;
}
.lg-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.lg-card h3 {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  margin: 0;
  color: var(--fg-0);
}
.lg-card-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.lg-card-tag { font-size: 14px; color: var(--fg-2); margin: 4px 0 12px; }
.lg-card-links { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-card-links a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg-1);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 6px 11px;
}
.lg-card-links a:hover { border-color: var(--ember-500); color: var(--ember-700); }

@media (max-width: 540px) {
  body { font-size: 16px; }
  .lg-section h2 { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ──────────────────────────────────────────────────────────────
   Mobile: long-content handling. Privacy/terms docs embed long
   URLs, monospace email addresses, and code spans that overflow
   the 760px-max container at narrow widths. `anywhere` lets these
   break wherever needed; the longer-word `break-word` keeps the
   surrounding body prose from getting hyphenated unnecessarily.
   ────────────────────────────────────────────────────────────── */
.lg-section,
.lg-foot p,
.lg-inline-note {
  overflow-wrap: anywhere;
}
.lg-section a[href^="http"],
.lg-section a[href^="mailto"],
.lg-section code,
.lg-foot a[href^="http"],
.lg-foot a[href^="mailto"] {
  word-break: break-word;
}

/* Sub-processor table — make it horizontally scrollable on narrow
   viewports so it stops pushing the page wider than the viewport.
   `display: block` is deliberate (lets overflow-x work); the inner
   thead/tbody stay as `display: table` so assistive tech still sees
   the row/column relationships. */
@media (max-width: 600px) {
  .lg-subproc-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .lg-subproc-table thead,
  .lg-subproc-table tbody {
    display: table;
    width: 100%;
    min-width: 520px;
  }
}

/* ──────────────────────────────────────────────────────────────
   Mobile: prevent iOS Safari auto-zoom on focus.
   Any <input>/<textarea>/<select> rendered below 16px will trigger
   a viewport zoom on iOS when focused. Setting it globally here
   keeps every form across the design system zoom-safe without
   per-page overrides. Added by scripts/apply-mobile-fixes.py.
   ────────────────────────────────────────────────────────────── */
input, textarea, select {
  font-size: 16px;
}
