/**
 * MASARIB CONNECT - Production Legal Page Styles
 * Standalone CSS asset for server-rendered legal routes (/privacy, /terms).
 * Complies with strict CSP (zero inline style attributes or style blocks).
 */

:root {
  --bg-main: #FAF9F5;
  --bg-surface: #FFFFFF;
  --bg-footer: #0F0F13;
  --text-primary: #141414;
  --text-secondary: #262626;
  --text-muted: #737373;
  --text-footer: #FAF9F5;
  --text-footer-muted: #A3A3A3;
  --accent: #D946EF;
  --accent-hover: #A855F7;
  --border-color: #E5E5E5;
  --border-subtle: rgba(229, 229, 229, 0.8);
  --border-footer: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #D946EF;
  color: #FFFFFF;
}

/* Headings & Display Font */
h1, h2, h3, .font-display {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Header & Global Navigation */
header.legal-nav-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(250, 249, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.875rem 1.5rem;
}

.legal-nav-progress-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #F43F5E, #D946EF, #8B5CF6);
}

.legal-nav-container {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Official Two-Line MASARIB CONNECT Brand Lockup */
.legal-brand {
  display: inline-flex;
  text-decoration: none;
  cursor: pointer;
}

.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  text-align: left;
  user-select: none;
  line-height: 1;
}

.brand-masarib {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  line-height: 0.88;
  background: linear-gradient(90deg, #FB7185 0%, #D946EF 50%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-connect {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: #111111;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  margin-top: 2px;
}

.legal-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent);
  display: inline-block;
}

.legal-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.legal-nav-links a {
  color: #525252;
  text-decoration: none;
  transition: color 0.15s ease;
}

.legal-nav-links a:hover {
  color: #141414;
}

/* Main Content Area */
main.legal-main-content {
  max-width: 56rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem 1.5rem;
  min-height: calc(100vh - 400px);
}

.legal-return-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: #737373;
  text-decoration: none;
  margin-bottom: 1.5rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.legal-return-link:hover {
  color: #171717;
}

.legal-return-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Document Header */
.legal-doc-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.legal-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #D946EF;
  margin-bottom: 1rem;
}

.legal-badge-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}

.legal-doc-badge-error {
  color: #E11D48;
}

h1.legal-title {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem 0;
  color: #141414;
  letter-spacing: -0.025em;
}

.legal-status-line {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: #737373;
  font-weight: 400;
}

/* ==========================================================================
   CANONICAL CMS CONTENT TYPOGRAPHY (.cms-content)
   Single authoritative styling source for Legal SSR, Legal React, Article React,
   and CMS Editor Preview.
   ========================================================================== */

.cms-content,
article.legal-article-body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  color: #262626;
  line-height: 1.625;
}

/* Ensure all font elements and legacy classes inherit sans-serif and parent color by default */
.cms-content font,
article.legal-article-body font {
  font-family: inherit !important;
  font-size: inherit;
  color: inherit;
}

.cms-content font[face="Display"],
.cms-content .font-display,
article.legal-article-body font[face="Display"],
article.legal-article-body .font-display {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif !important;
}

.cms-content font[face="Mono"],
.cms-content .font-mono,
article.legal-article-body font[face="Mono"],
article.legal-article-body .font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

.cms-content font[face="Body"],
.cms-content .font-sans,
article.legal-article-body font[face="Body"],
article.legal-article-body .font-sans {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* 1. Base Preflight Normalization for Article Headings
   In LegalView (React), Tailwind Preflight resets h1, h4, h5, h6 to font-size: inherit (1rem/16px)
   and font-weight: inherit (400), ensuring non-section elements (titles, subheadings, metadata)
   render at standard readable body scale. */
.cms-content--legal h1,
article.legal-article-body h1,
article.legal-article-body h4,
article.legal-article-body h5,
article.legal-article-body h6 {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.625;
  margin: 0 0 1rem 0;
  color: #262626;
  letter-spacing: normal;
}

/* 2. Section Headings (H2) - matches LegalView
   [&>h2]:text-2xl [&>h2]:font-bold [&>h2]:text-neutral-900 [&>h2]:font-display [&>h2]:mt-10 [&>h2]:mb-4 */
article.legal-article-body h2 {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem; /* text-2xl = 24px */
  font-weight: 700;
  line-height: 2rem;
  color: #171717;
  letter-spacing: -0.02em;
  margin-top: 2.5rem; /* mt-10 = 40px */
  margin-bottom: 1rem; /* mb-4 = 16px */
}

.cms-content h2 {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 2rem;
  color: #171717;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.cms-content h2 *:not(strong):not(b),
article.legal-article-body h2 *:not(strong):not(b) {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

/* 3. Subsection Headings (H3) - matches LegalView
   [&>h3]:text-xl [&>h3]:font-bold [&>h3]:text-neutral-900 [&>h3]:font-display [&>h3]:mt-6 [&>h3]:mb-3 */
article.legal-article-body h3 {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem; /* text-xl = 20px */
  font-weight: 700;
  line-height: 1.75rem;
  color: #171717;
  letter-spacing: -0.02em;
  margin-top: 1.5rem; /* mt-6 = 24px */
  margin-bottom: 0.75rem; /* mb-3 = 12px */
}

.cms-content h3 {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.75rem;
  color: #171717;
  letter-spacing: -0.02em;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.cms-content h3 *:not(strong):not(b),
article.legal-article-body h3 *:not(strong):not(b) {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

/* Standard H4 heading for non-legal or article contexts */
.cms-content h4 {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.75rem;
  color: #171717;
  letter-spacing: -0.01em;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Article scoped heading scales */
.cms-content--article h2 {
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  line-height: 1.25;
}

.cms-content--article h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.35;
}

/* CMS editor preview scope */
.cms-content--preview {
  outline: none;
  min-height: 280px;
}

/* 4. Font and Style Normalization for Rich-Text Editor & Legacy Fallbacks */
.cms-content .text-sm,
.cms-content font[size="1"],
.cms-content font[size="2"],
article.legal-article-body .text-sm,
article.legal-article-body font[size="1"],
article.legal-article-body font[size="2"] {
  font-size: 0.875rem !important; /* text-sm = 14px */
  line-height: 1.5 !important;
}

.cms-content .text-base,
.cms-content font[size="3"],
article.legal-article-body .text-base,
article.legal-article-body font[size="3"] {
  font-size: 1rem !important; /* text-base = 16px */
  line-height: 1.625 !important;
}

.cms-content .text-lg,
.cms-content font[size="4"],
.cms-content font[size="5"],
article.legal-article-body .text-lg,
article.legal-article-body font[size="4"],
article.legal-article-body font[size="5"] {
  font-size: 1.125rem !important; /* text-lg = 18px */
  line-height: 1.75rem !important;
}

.cms-content .text-xl,
.cms-content font[size="6"],
.cms-content font[size="7"],
article.legal-article-body .text-xl,
article.legal-article-body font[size="6"],
article.legal-article-body font[size="7"] {
  font-size: 1.25rem !important; /* text-xl = 20px */
  line-height: 1.75rem !important;
}

.cms-content [style*="font-weight: normal"],
.cms-content [style*="font-weight:normal"],
.cms-content [style*="font-weight: 400"],
.cms-content [style*="font-weight:400"],
article.legal-article-body [style*="font-weight: normal"],
article.legal-article-body [style*="font-weight:normal"],
article.legal-article-body [style*="font-weight: 400"],
article.legal-article-body [style*="font-weight:400"] {
  font-weight: 400 !important;
  letter-spacing: normal !important;
}

/* Text alignment normalization */
.cms-content [style*="text-align: right"],
.cms-content [style*="text-align:right"],
article.legal-article-body [style*="text-align: right"],
article.legal-article-body [style*="text-align:right"] {
  text-align: right;
}

.cms-content [style*="text-align: center"],
.cms-content [style*="text-align:center"],
article.legal-article-body [style*="text-align: center"],
article.legal-article-body [style*="text-align:center"] {
  text-align: center;
}

.cms-content [style*="text-align: justify"],
.cms-content [style*="text-align:justify"],
article.legal-article-body [style*="text-align: justify"],
article.legal-article-body [style*="text-align:justify"] {
  text-align: justify;
}

.cms-content [style*="text-align: left"],
.cms-content [style*="text-align:left"],
article.legal-article-body [style*="text-align: left"],
article.legal-article-body [style*="text-align:left"] {
  text-align: left;
}

/* 5. Document Block & Paragraph Spacing (Exact space-y-6 Parity with LegalView) */
.cms-content > * + *,
article.legal-article-body > * + * {
  margin-top: 1.5rem;
}

.cms-content p,
article.legal-article-body p {
  margin: 0 0 1rem 0;
  line-height: 1.625;
  color: #262626;
}

.cms-content p + p,
article.legal-article-body p + p {
  margin-top: 1rem;
}

/* Bold & Strong typography - preserves intentional semantic bold across all headings, paragraphs, and list items */
.cms-content strong,
.cms-content b,
.cms-content h1 strong,
.cms-content h2 strong,
.cms-content h3 strong,
.cms-content h4 strong,
.cms-content h5 strong,
.cms-content h6 strong,
.cms-content h1 b,
.cms-content h2 b,
.cms-content h3 b,
.cms-content h4 b,
.cms-content h5 b,
.cms-content h6 b,
.cms-content p strong,
.cms-content p b,
.cms-content li strong,
.cms-content li b,
article.legal-article-body strong,
article.legal-article-body b,
article.legal-article-body h1 strong,
article.legal-article-body h2 strong,
article.legal-article-body h3 strong,
article.legal-article-body h4 strong,
article.legal-article-body h5 strong,
article.legal-article-body h6 strong,
article.legal-article-body h1 b,
article.legal-article-body h2 b,
article.legal-article-body h3 b,
article.legal-article-body h4 b,
article.legal-article-body h5 b,
article.legal-article-body h6 b,
article.legal-article-body p strong,
article.legal-article-body p b,
article.legal-article-body li strong,
article.legal-article-body li b {
  font-weight: 700 !important;
  color: #171717;
}

/* Lists */
.cms-content ul,
article.legal-article-body ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0 0 1rem 0;
}

.cms-content ol,
article.legal-article-body ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin: 0 0 1rem 0;
}

.cms-content li,
article.legal-article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.625;
  color: #262626;
}

/* 6. Links (Magenta Brand Accent - Exact Match to LegalView) */
.cms-content a,
.cms-content a *,
.cms-content font a,
.cms-content font a *,
article.legal-article-body a,
article.legal-article-body a *,
article.legal-article-body font a,
article.legal-article-body font a * {
  color: #D946EF !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.cms-content a:hover,
.cms-content a:hover *,
.cms-content font a:hover,
.cms-content font a:hover *,
article.legal-article-body a:hover,
article.legal-article-body a:hover *,
article.legal-article-body font a:hover,
article.legal-article-body font a:hover * {
  color: #A855F7 !important;
}

/* Media handling for articles & rich-text */
.cms-content img,
article.legal-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  display: block;
  margin: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #E5E5E5;
}

.cms-content figure,
article.legal-article-body figure {
  margin: 1.5rem 0;
}

.cms-content figcaption,
article.legal-article-body figcaption {
  font-size: 0.75rem;
  color: #737373;
  text-align: center;
  margin-top: 0.5rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Code & Pre */
.cms-content code,
article.legal-article-body code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  background-color: #F5F5F4;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
  border: 1px solid #E7E5E4;
  color: #171717;
}

/* Blockquotes */
.cms-content blockquote,
article.legal-article-body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid #D946EF;
  background-color: transparent;
  font-style: italic;
  color: #525252;
}

/* Horizontal Rule */
article.legal-article-body hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

/* Tables */
article.legal-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

article.legal-article-body th,
article.legal-article-body td {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
}

article.legal-article-body th {
  background-color: #F5F5F4;
  font-weight: 600;
}

/* Callout Notice Boxes */
.legal-notice-box {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.legal-notice-amber {
  background-color: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}

.legal-notice-rose {
  background-color: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #9F1239;
}

/* Cross-Navigation Links */
.legal-cross-links {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: #737373;
}

.legal-cross-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.legal-cross-nav a {
  color: #404040;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.legal-cross-nav a:hover {
  color: #D946EF;
}

.legal-cross-nav a.legal-cross-email {
  color: #737373;
  text-decoration: none;
  font-weight: 400;
}

.legal-cross-nav a.legal-cross-email:hover {
  color: #171717;
}

/* Official Site Footer (Dark Theme #0F0F13) */
footer.legal-page-footer {
  position: relative;
  background-color: #0F0F13;
  color: #FAF9F5;
  padding: 4rem 1.5rem 2.5rem 1.5rem;
  border-top: 1px solid #262626;
  overflow: hidden;
}

.legal-footer-container {
  max-width: 80rem;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

/* Footer Top Identity Strip */
.legal-footer-top {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .legal-footer-top {
    flex-direction: row;
    align-items: flex-start;
  }
}

.legal-footer-brand-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legal-footer-ping-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F43F5E, #D946EF, #8B5CF6);
  flex-shrink: 0;
}

.legal-footer-tagline-title {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: #D946EF;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin: 0 0 2px 0;
}

.legal-footer-tagline-desc {
  font-size: 0.75rem;
  color: #A3A3A3;
  margin: 0;
}

.legal-footer-office {
  font-style: normal;
  font-size: 0.75rem;
  color: #D4D4D4;
  line-height: 1.5;
  text-align: left;
}

@media (min-width: 768px) {
  .legal-footer-office {
    text-align: right;
  }
}

.legal-footer-office-label {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #A3A3A3;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.legal-footer-office p {
  margin: 0;
}

/* Monumental Brand Typography */
.legal-footer-monument {
  display: flex;
  flex-direction: column;
  user-select: none;
  line-height: 0.88;
  letter-spacing: -0.035em;
  font-weight: 700;
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  margin-bottom: 2.5rem;
}

.legal-footer-masarib {
  font-size: clamp(3rem, 10vw, 5.5rem);
  background: linear-gradient(90deg, #FB7185 0%, #D946EF 50%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-footer-connect {
  font-size: clamp(3rem, 10vw, 5.5rem);
  color: #FAF9F5;
}

/* Curated 4-Column Navigation Grid */
.legal-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2.5rem;
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .legal-footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.legal-footer-col-title {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #A3A3A3;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
}

.legal-footer-col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.legal-footer-col-list a {
  color: #D4D4D4;
  text-decoration: none;
  transition: color 0.15s ease;
}

.legal-footer-col-list a:hover {
  color: #FFFFFF;
}

.legal-footer-col-list a.legal-footer-subtle-link {
  color: #A3A3A3;
}

.legal-footer-col-list a.legal-footer-subtle-link:hover {
  color: #FFFFFF;
}

/* Bottom Legal Copyright Bar */
.legal-footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  color: #A3A3A3;
}

@media (min-width: 640px) {
  .legal-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.legal-footer-bottom p {
  margin: 0;
}

.legal-footer-bottom a {
  color: #D4D4D4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-footer-bottom a:hover {
  color: #FFFFFF;
}

/* 404 & 503 Card Layout */
.legal-error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 2rem 1.5rem;
}

.legal-error-card {
  max-width: 520px;
  width: 100%;
  padding: 2.5rem;
  background: var(--bg-surface);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.legal-error-card h1 {
  font-family: 'Manrope', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  margin: 0 0 1rem 0;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.legal-error-card p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
  font-size: 0.9375rem;
}

.legal-error-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #141414;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color 0.15s ease;
}

.legal-btn-primary:hover {
  background-color: #262626;
}

.legal-btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #FFFFFF;
  color: #141414;
  border: 1px solid #D4D4D4;
  text-decoration: none;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}

.legal-btn-secondary:hover {
  border-color: #737373;
}

.legal-btn-ghost {
  display: inline-block;
  padding: 0.5rem;
  background-color: transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.legal-btn-ghost:hover {
  color: var(--text-primary);
}

/* Responsive Rules */
@media (max-width: 640px) {
  header.legal-nav-header {
    padding: 0.75rem 1rem;
  }
  .legal-nav-links {
    display: none;
  }
  main.legal-main-content {
    padding: 2.5rem 1rem 4rem 1rem;
  }
  .legal-cross-links {
    flex-direction: column;
    align-items: flex-start;
  }
}
