/* TweetLock — shared styles for legal & support surfaces.
   Same committed palette and mechanics as index.html: charcoal base, orange as
   the single release signal, no gradients/shadows — elevation is layered
   surfaces + 1px borders. Tokens mirror the home page so the brand reads as one. */

:root {
  --ink: #1a1a1a;
  --surface: #1f1f1f;
  --surface-2: #262626;
  --surface-3: #2d2d2d;

  --orange: #f97316;
  --orange-ink: #0e0a06;
  --orange-soft: rgba(249, 115, 22, 0.12);
  --orange-text: #f97316;

  --fg: #f5f5f5;
  --fg-dim: #b7bcc4; /* AA on charcoal (~9:1) */
  --fg-mute: #82888f; /* AA for large text on charcoal */

  --success: #22c55e;
  --danger: #f0604d;

  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);

  --nav-bg: rgba(26, 26, 26, 0.82);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --pad: clamp(20px, 5vw, 28px);
  --maxw: 1160px;
  --readw: 72ch; /* prose measure */

  --z-nav: 100;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
  --ink: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #f1f1f3;
  --surface-3: #e7e7eb;

  --orange-text: #c2410c; /* AA on light (~4.6:1) */

  --fg: #1a1a1a;
  --fg-dim: #4b5058; /* ~8:1 on --ink */
  --fg-mute: #6a7077; /* ~5:1, secondary / large */

  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);

  --nav-bg: rgba(246, 246, 247, 0.82);
}

/* Theme-swap easing (class added for ~420ms; JS skips under reduced motion). */
.theme-anim,
.theme-anim *,
.theme-anim *::before,
.theme-anim *::after {
  transition:
    background-color 0.35s var(--ease),
    border-color 0.35s var(--ease),
    color 0.35s var(--ease) !important;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* clears the sticky nav on anchor jumps */
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: "Arimo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
}
img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--orange);
  color: var(--orange-ink);
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Nav (mirrors home, minus the waitlist CTA) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--nav-bg);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}
.nav.scrolled {
  border-bottom-color: var(--line);
}
.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}
.nav__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav__home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding-inline: 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--fg-dim);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.nav__home:hover {
  color: var(--fg);
  border-color: var(--orange);
  background: var(--orange-soft);
}
.nav__home svg {
  width: 15px;
  height: 15px;
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  color: var(--fg-dim);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.theme-toggle:hover {
  color: var(--fg);
  border-color: var(--orange);
  background: var(--orange-soft);
}
.theme-toggle svg {
  width: 19px;
  height: 19px;
}
.theme-toggle .ico-moon {
  display: none;
}
:root[data-theme="light"] .theme-toggle .ico-sun {
  display: none;
}
:root[data-theme="light"] .theme-toggle .ico-moon {
  display: block;
}

/* ---------- Document shell ---------- */
.doc {
  padding-top: clamp(40px, 7vw, 76px);
  padding-bottom: clamp(56px, 9vw, 104px);
}
.doc__wrap {
  max-width: calc(var(--readw) + 2 * var(--pad));
}

.doc__head {
  padding-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.doc__type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange-text);
  letter-spacing: 0.02em;
}
.doc__type::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--orange-text);
}
.doc__head h1 {
  margin: 16px 0 0;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
.doc__meta {
  margin: 16px 0 0;
  color: var(--fg-mute);
  font-size: 14.5px;
}
.doc__lede {
  margin: 18px 0 0;
  max-width: 60ch;
  color: var(--fg-dim);
  font-size: clamp(1.02rem, 2vw, 1.16rem);
  line-height: 1.55;
  text-wrap: pretty;
}

/* load-in: visible by default; animation only enhances. */
@media (prefers-reduced-motion: no-preference) {
  .lift {
    animation: lift 0.66s var(--ease) both;
  }
  .lift[data-d="1"] {
    animation-delay: 0.06s;
  }
  .lift[data-d="2"] {
    animation-delay: 0.12s;
  }
  .lift[data-d="3"] {
    animation-delay: 0.18s;
  }
  @keyframes lift {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---------- Table of contents ---------- */
.toc {
  margin-top: clamp(28px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: clamp(20px, 3vw, 28px);
}
.toc h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: grid;
  gap: 2px 28px;
}
@media (min-width: 620px) {
  .toc ol {
    grid-template-columns: 1fr 1fr;
  }
}
.toc li {
  counter-increment: toc;
}
.toc a {
  display: flex;
  gap: 12px;
  padding: 8px 6px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--fg-dim);
  font-weight: 500;
  font-size: 15px;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--orange-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.toc a:hover {
  color: var(--fg);
  background: var(--orange-soft);
}

/* ---------- Prose ---------- */
.prose {
  margin-top: clamp(40px, 6vw, 64px);
}
.prose > section + section {
  margin-top: clamp(40px, 6vw, 60px);
}
.prose h2 {
  margin: 0 0 18px;
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
  font-size: clamp(1.45rem, 3.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}
.prose > section:first-child h2 {
  border-top: 0;
  padding-top: 0;
}
.prose h3 {
  margin: 30px 0 10px;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.prose p {
  margin: 14px 0 0;
  color: var(--fg);
  max-width: var(--readw);
  text-wrap: pretty;
}
.prose p:first-of-type {
  margin-top: 0;
}
/* inline text links only — structural anchors (.topic, .btn) opt out */
.prose a:not(.btn):not(.topic) {
  color: var(--orange-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 500;
}
.prose a:not(.btn):not(.topic):hover {
  text-decoration-thickness: 2px;
}
.prose a.topic {
  text-decoration: none;
}
.prose strong {
  color: var(--fg);
  font-weight: 700;
}
.prose ul,
.prose ol {
  margin: 14px 0 0;
  padding-left: 1.3em;
  max-width: var(--readw);
}
.prose li {
  margin-top: 8px;
  color: var(--fg);
  padding-left: 4px;
}
.prose li::marker {
  color: var(--fg-mute);
}
.prose ul li::marker {
  color: var(--orange-text);
}

/* definition-style rows for "what we collect" tables without a real table */
.deflist {
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.deflist__row {
  display: grid;
  gap: 4px 24px;
  padding: 16px clamp(16px, 3vw, 22px);
  background: var(--surface);
}
.deflist__row + .deflist__row {
  border-top: 1px solid var(--line);
}
@media (min-width: 600px) {
  .deflist__row {
    grid-template-columns: 0.85fr 1.15fr;
  }
}
.deflist__row dt {
  font-weight: 700;
  color: var(--fg);
  font-size: 15.5px;
}
.deflist__row dd {
  margin: 0;
  color: var(--fg-dim);
  font-size: 15px;
}

/* callout — full border + tinted surface, never a side stripe */
.note {
  margin: 22px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 16px 18px;
  font-size: 15px;
  color: var(--fg-dim);
}
.note strong {
  color: var(--fg);
}

/* ---------- Support: contact + topics + FAQ ---------- */
.contact {
  margin-top: clamp(36px, 5vw, 52px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--surface);
  padding: clamp(24px, 4vw, 36px);
  display: grid;
  gap: 22px;
  align-items: center;
}
@media (min-width: 680px) {
  .contact {
    grid-template-columns: 1.1fr auto;
  }
}
.contact h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.contact p {
  margin: 10px 0 0;
  color: var(--fg-dim);
  font-size: 15.5px;
  max-width: 44ch;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 54px;
  padding-inline: 26px;
  background: var(--orange);
  color: var(--orange-ink);
  font-weight: 700;
  font-size: 16px;
  border: 0;
  border-radius: var(--r-md);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.15s var(--ease),
    background 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: #ff8328;
}
.btn:active {
  transform: translateY(0);
}
.btn svg {
  width: 18px;
  height: 18px;
}

.topics {
  margin-top: clamp(40px, 6vw, 60px);
}
.topics__grid {
  margin-top: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.topic {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--ease);
}
.topic:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.topic__ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--orange-soft);
  color: var(--orange-text);
  display: grid;
  place-items: center;
}
.topic__ico svg {
  width: 20px;
  height: 20px;
}
.topic h3 {
  margin: 16px 0 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.topic p {
  margin: 7px 0 0;
  color: var(--fg-dim);
  font-size: 14.5px;
  line-height: 1.5;
}

.faq {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.faq details {
  background: var(--surface);
}
.faq details + details {
  border-top: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px clamp(18px, 3vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 16.5px;
  color: var(--fg);
  transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  color: var(--orange-text);
}
.faq summary .chev {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--fg-mute);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary .chev {
  transform: rotate(180deg);
  color: var(--orange-text);
}
.faq__body {
  padding: 0 clamp(18px, 3vw, 24px) 20px;
  color: var(--fg-dim);
  font-size: 15.5px;
  line-height: 1.6;
}
.faq__body p {
  margin: 0;
}
.faq__body p + p {
  margin-top: 12px;
}
.faq__body a {
  color: var(--orange-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .faq__body {
    animation: fade 0.3s var(--ease) both;
  }
  @keyframes fade {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---------- Footer (mirrors home) ---------- */
footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--fg-mute);
  font-size: 14px;
}
.foot a {
  text-decoration: none;
  color: var(--fg-dim);
}
.foot a:hover {
  color: var(--fg);
}
.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.foot__links a[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
}
