/* Shared editorial styles for RecapMed legal pages (/privacy, /terms).
   Tokens mirror the main landing page's design system (RecapMed Landing.dc.html). */

:root {
  --rm-bg: #050505;
  --rm-text: #F4F2FF;
  --rm-text-muted: rgba(244, 242, 255, 0.68);
  --rm-text-dim: rgba(244, 242, 255, 0.5);
  --rm-text-faint: rgba(244, 242, 255, 0.38);
  --rm-purple: #7C4DFF;
  --rm-purple-light: #9E7BFF;
  --rm-green: #00E676;
  --rm-border: rgba(255, 255, 255, 0.08);
  --rm-card-bg: rgba(255, 255, 255, 0.03);
}

html { color-scheme: dark; }

* { box-sizing: border-box; }

body.rm-legal {
  margin: 0;
  background: var(--rm-bg);
  color: var(--rm-text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  .rm-legal * { animation: none !important; transition: none !important; }
}

/* Header (simplified variant of the main site header) */
.rm-legal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(8, 8, 12, 0.75);
  border-bottom: 1px solid var(--rm-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.rm-legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.rm-legal-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  flex: none;
}

.rm-legal-brand span {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--rm-text);
  white-space: nowrap;
}

.rm-legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rm-border);
  color: var(--rm-text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.rm-legal-back:hover,
.rm-legal-back:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

/* Article */
.rm-legal-main {
  display: flex;
  justify-content: center;
  padding: 56px 24px 100px;
}

.rm-legal-article {
  width: 100%;
  max-width: 720px;
}

.rm-legal-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124, 77, 255, 0.32);
  background: rgba(124, 77, 255, 0.07);
  color: var(--rm-purple-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rm-legal-article h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 18px 0 10px;
}

.rm-legal-updated {
  font-size: 13.5px;
  color: var(--rm-text-dim);
  margin: 0 0 40px;
}

.rm-legal-toc {
  border: 1px solid var(--rm-border);
  background: var(--rm-card-bg);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 0 0 48px;
}

.rm-legal-toc p {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rm-text-dim);
}

.rm-legal-toc ol {
  margin: 0;
  padding: 0 0 0 18px;
  columns: 2;
  column-gap: 24px;
}

.rm-legal-toc li { margin-bottom: 6px; }

.rm-legal-toc a {
  color: var(--rm-text-muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
}

.rm-legal-toc a:hover,
.rm-legal-toc a:focus-visible { color: #fff; }

.rm-legal-article section {
  margin: 0 0 44px;
  scroll-margin-top: 88px;
}

.rm-legal-article h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 16px;
}

.rm-legal-article h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 16.5px;
  color: #fff;
  margin: 24px 0 10px;
}

.rm-legal-article p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--rm-text-muted);
  margin: 0 0 16px;
  text-wrap: pretty;
}

.rm-legal-article ul,
.rm-legal-article ol.rm-legal-list {
  margin: 0 0 16px;
  padding-left: 20px;
}

.rm-legal-article li {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--rm-text-muted);
  margin-bottom: 8px;
}

.rm-legal-article a {
  color: var(--rm-purple-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(158, 123, 255, 0.4);
  overflow-wrap: break-word;
}

.rm-legal-article a:hover,
.rm-legal-article a:focus-visible {
  color: #fff;
  text-decoration-color: currentColor;
}

.rm-legal-callout {
  border: 1px solid rgba(0, 230, 118, 0.25);
  background: rgba(0, 230, 118, 0.05);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 16px;
}

.rm-legal-callout p {
  color: rgba(244, 242, 255, 0.82);
  margin: 0;
}

.rm-legal-callout.rm-legal-warn {
  border-color: rgba(255, 110, 64, 0.3);
  background: rgba(255, 110, 64, 0.06);
}

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

/* Footer (shared with main site) */
.rm-legal-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rm-border);
  padding: 44px 24px 40px;
  background: rgba(8, 8, 12, 0.6);
}

.rm-legal-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.rm-legal-footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.rm-legal-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rm-legal-footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
}

.rm-legal-footer-brand span {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: rgba(244, 242, 255, 0.9);
}

.rm-legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 13.5px;
}

.rm-legal-footer-nav a {
  color: rgba(244, 242, 255, 0.6);
  text-decoration: none;
}

.rm-legal-footer-nav a:hover,
.rm-legal-footer-nav a:focus-visible { color: #fff; }

.rm-legal-footer-disclaimer {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(244, 242, 255, 0.42);
  margin: 0;
  max-width: 90ch;
}

.rm-legal-footer-copy {
  font-size: 12px;
  color: rgba(244, 242, 255, 0.32);
  margin: 0;
}

@media (max-width: 600px) {
  .rm-legal-toc ol { columns: 1; }
  .rm-legal-footer-nav { gap: 14px 20px; }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--rm-purple-light);
  outline-offset: 2px;
}
