/* ============================================================================
   LYFEWORK · LEGAL & COMPLIANCE — SHARED STYLESHEET
   ----------------------------------------------------------------------------
   Single source of truth for the look of every legal / privacy / compliance
   page (terms, privacy, refund, cookies, accessibility, do-not-sell,
   data-request, contact). Edit ONCE here → every page updates.

   Brand: Axiom v4 (flat · white-default · Geist · Electric Lava #FF5418).
   Faithful reproduction of the original inline terms.html template so new
   pages are visually identical to the two pages already shipped.

   SECTION MAP (search these banners to jump):
     [01] TOKENS            [06] LISTS / DEFINITIONS
     [02] BASE / RESET      [07] CALLOUT / TABLE / CARDS
     [03] HEADER (sticky)   [08] FORMS (data-request / contact)
     [04] PAGE LAYOUT       [09] TWO-COLUMN (contact)
     [05] HEADINGS / BODY   [10] RESPONSIVE
   ========================================================================== */

/* ── [01] TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --paper: #fff;
  --ink: #0b0c0f;
  --black: #000;
  --lava: #ff5418;
  --lava-press: #e0440f;
  --lava-soft: rgba(255, 84, 24, 0.08);
  --lava-line: rgba(255, 84, 24, 0.18);
  --graphite: #6e7180;
  --space: #9da2b3;
  --steel: #bcbfcc;
  --smoke: #d3d6e0;
  --cloud: #e7eaf2;
  --panel: #f4f5f8;
  --border: #c7ccda;
  --border-strong: #b4bacb;
  --border-subtle: #d6dbe8;
  --green: #0fae73;          /* spectrum green, contrast-safe for "on" states */
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --container: 1140px;
  --r: 16px;
  --r-lg: 22px;
  --r-btn: 10px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ── [02] BASE / RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Visible keyboard focus on everything interactive (a11y baseline) */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--lava);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── [03] HEADER (sticky) ────────────────────────────────────────────────── */
.legal-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
.legal-header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; gap: 18px;
}
.legal-header .brand { display: flex; align-items: center; }
.legal-header .brand svg { height: 22px; width: auto; --lk-emblem: var(--lava); --lk-word: #0a0a0a; }
.legal-header nav { display: flex; align-items: center; gap: 14px; }
.legal-header nav a {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  color: var(--graphite); text-decoration: none;
}
.legal-header nav a:hover { color: var(--ink); }
.legal-header nav a.cta {
  display: inline-flex; align-items: center; font-weight: 600;
  letter-spacing: -0.01em; padding: 10px 18px; border-radius: var(--r-btn);
  background: var(--black); color: #fff;
}
.legal-header nav a.cta:hover { background: #1a1c22; }

/* ── [04] PAGE LAYOUT ────────────────────────────────────────────────────── */
.legal-main { padding-top: 96px; }

.legal-wrap { max-width: 760px; margin: 0 auto; padding: 64px 28px 96px; }

.legal-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--lava);
  letter-spacing: 0.04em; background: var(--lava-soft);
  border: 1px solid var(--lava-line); border-radius: 6px;
  padding: 5px 11px; margin-bottom: 22px;
}
.legal-eyebrow::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--lava); flex-shrink: 0;
}

.legal-h1 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: var(--ink);
  letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 14px;
}

.legal-updated { font-size: 13px; color: var(--space); line-height: 1.6; }
.legal-updated strong { color: var(--graphite); font-weight: 600; }

.legal-header-divider { border: none; border-top: 1px solid var(--border-subtle); margin: 32px 0 40px; }

.legal-intro {
  background: var(--panel); border: 1px solid var(--border-subtle);
  border-radius: var(--r); padding: 22px 26px; margin-bottom: 40px;
  font-size: 14px; color: var(--graphite); line-height: 1.7; text-align: center;
}
.legal-intro a, .legal-intro a:visited { color: var(--lava); font-weight: 600; text-decoration: none; }
.legal-intro a:hover { color: var(--lava-press); }

/* Table of contents */
.legal-toc { border: 1px solid var(--border); border-radius: var(--r); padding: 26px 28px; margin-bottom: 52px; }
.legal-toc-title {
  font-size: 13px; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px;
}
.legal-toc ol { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; }
.legal-toc li { font-size: 13px; line-height: 1.5; }
.legal-toc-num { color: var(--lava); font-weight: 700; margin-right: 6px; font-size: 12px; }
.legal-toc a, .legal-toc a:visited { color: var(--graphite); text-decoration: none; transition: color 0.15s; }
.legal-toc a:hover { color: var(--lava); }

/* ── [05] SECTIONS / HEADINGS / BODY ─────────────────────────────────────── */
.legal-section { margin-bottom: 52px; scroll-margin-top: 86px; }
.legal-section:not(:last-child) { padding-bottom: 52px; border-bottom: 1px solid var(--border-subtle); }

.legal-section-title {
  font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em;
  line-height: 1.3; margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.legal-section-num { color: var(--lava); font-weight: 700; margin-right: 6px; font-size: 18px; }

.legal-p { font-size: 16px; color: var(--graphite); line-height: 1.75; margin-bottom: 16px; }
.legal-p:last-child { margin-bottom: 0; }
.legal-p strong { color: var(--ink); font-weight: 600; }
.legal-p a, .legal-p a:visited { color: var(--lava); font-weight: 600; text-decoration: none; }
.legal-p a:hover { color: var(--lava-press); text-decoration: underline; text-underline-offset: 3px; }
.legal-p.small { font-size: 12px; color: var(--space); }

/* A bracketed placeholder Ryan must fill before publish — visually obvious. */
.legal-fill {
  color: var(--lava-press); font-weight: 600; font-style: normal;
  background: var(--lava-soft); border-bottom: 1px dashed var(--lava-line);
  padding: 0 3px; border-radius: 3px;
}

.legal-sub { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 28px; margin-bottom: 12px; line-height: 1.4; }

/* ── [06] LISTS / DEFINITIONS ────────────────────────────────────────────── */
.legal-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; padding: 0; }
.legal-list li { font-size: 16px; color: var(--graphite); line-height: 1.7; padding-left: 22px; position: relative; }
.legal-list li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--lava);
}
.legal-list li strong { color: var(--ink); font-weight: 600; }

.legal-def-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.legal-def-item { display: flex; gap: 12px; font-size: 16px; color: var(--graphite); line-height: 1.7; }
.legal-def-term { font-weight: 700; color: var(--ink); white-space: nowrap; min-width: 130px; flex-shrink: 0; }

/* ── [07] CALLOUT / TABLE / CARDS ────────────────────────────────────────── */
.legal-callout {
  background: var(--panel); border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--lava); border-radius: 0 var(--r) var(--r) 0;
  padding: 18px 22px; margin: 20px 0;
}
.legal-callout-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.04em; }
.legal-callout-text { font-size: 14px; color: var(--graphite); line-height: 1.65; }
.legal-callout-text a, .legal-callout-text a:visited { color: var(--lava); font-weight: 600; text-decoration: none; }
.legal-callout-text a:hover { color: var(--lava-press); }

.legal-table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--r); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal-table th {
  background: var(--panel); color: var(--ink); font-weight: 700; text-align: left;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
}
.legal-table td { padding: 10px 16px; color: var(--graphite); border-bottom: 1px solid var(--border-subtle); line-height: 1.5; vertical-align: top; }
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td strong { color: var(--ink); font-weight: 600; }

.legal-contact-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); padding: 24px 28px; margin-top: 20px; }
.legal-contact-card p { font-size: 15px; color: var(--graphite); line-height: 1.75; margin-bottom: 4px; }
.legal-contact-card p:last-child { margin-bottom: 0; }
.legal-contact-card strong { color: var(--ink); font-weight: 700; }
.legal-contact-card a, .legal-contact-card a:visited { color: var(--lava); font-weight: 600; text-decoration: none; }
.legal-contact-card a:hover { color: var(--lava-press); }

/* Primary / secondary buttons reused across compliance pages */
.legal-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  padding: 12px 20px; border-radius: var(--r-btn); border: 1px solid transparent;
  text-decoration: none; transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.legal-btn-primary { background: var(--lava); color: #fff; }
.legal-btn-primary:hover { background: var(--lava-press); }
.legal-btn-dark { background: var(--black); color: #fff; }
.legal-btn-dark:hover { background: #1a1c22; }
.legal-btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--border); }
.legal-btn-ghost:hover { border-color: var(--ink); }

/* ── [08] FORMS (data-request / contact) ─────────────────────────────────── */
.legal-form { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.legal-field { display: flex; flex-direction: column; gap: 7px; }
.legal-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.legal-field .req { color: var(--lava); }
.legal-field .hint { font-size: 12px; color: var(--space); line-height: 1.5; }
.legal-input, .legal-select, .legal-textarea {
  font-family: var(--sans); font-size: 15px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--border); border-radius: var(--r-btn); padding: 12px 14px;
  width: 100%; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.legal-input:focus, .legal-select:focus, .legal-textarea:focus {
  outline: none; border-color: var(--lava); box-shadow: 0 0 0 3px var(--lava-soft);
}
.legal-textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.legal-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.legal-form-note { font-size: 12px; color: var(--space); line-height: 1.6; }

/* Toggle switch (cookie preferences + do-not-sell opt-out) */
.legal-toggle-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--border-subtle);
}
.legal-toggle-row:last-child { border-bottom: none; }
.legal-toggle-copy { flex: 1; }
.legal-toggle-copy h4 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.legal-toggle-copy p { font-size: 13px; color: var(--graphite); line-height: 1.6; }
.legal-switch { position: relative; flex-shrink: 0; width: 46px; height: 26px; }
.legal-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.legal-switch .track {
  position: absolute; inset: 0; background: var(--steel); border-radius: 99px;
  transition: background .18s var(--ease); pointer-events: none;
}
.legal-switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: transform .18s var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.legal-switch input:checked + .track { background: var(--green); }
.legal-switch input:checked + .track::after { transform: translateX(20px); }
.legal-switch input:disabled + .track { background: var(--green); opacity: .5; cursor: not-allowed; }
.legal-switch input:focus-visible + .track { outline: 2px solid var(--lava); outline-offset: 2px; }

/* ── [09] TWO-COLUMN (contact) ───────────────────────────────────────────── */
.legal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.legal-info-card {
  background: var(--panel); border: 1px solid var(--border-subtle);
  border-radius: var(--r); padding: 22px 24px;
}
.legal-info-card h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.legal-info-card p { font-size: 14px; color: var(--graphite); line-height: 1.65; margin-bottom: 4px; }
.legal-info-card a, .legal-info-card a:visited { color: var(--lava); font-weight: 600; text-decoration: none; }
.legal-info-card a:hover { color: var(--lava-press); }

/* ── [10] RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .legal-wrap { padding: 48px 20px 72px; }
  .legal-section-title { font-size: 18px; }
  .legal-def-item { flex-direction: column; gap: 2px; }
  .legal-def-term { min-width: auto; }
  .legal-toc { padding: 20px; }
  .legal-contact-card { padding: 20px; }
  .legal-field-row, .legal-grid-2 { grid-template-columns: 1fr; }
  .legal-header nav a:not(.cta) { display: none; }   /* keep CTA, drop text links on small screens */
}

@media (max-width: 520px) {
  .legal-section-title { font-size: 16px; }
  .legal-sub { font-size: 14px; }
  .legal-p, .legal-list li { font-size: 15px; }
  .legal-table { font-size: 13px; }
  .legal-table th, .legal-table td { padding: 8px 12px; }
}
