:root {
  color-scheme: light;
  --bg: #fafafa;
  --white: #ffffff;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --muted-light: #8a8a8a;
  --green: #2d4a3e;
  --green-hover: #3d5c4e;
  --border: #e8e8e8;
  --radius: 10px;
  --max: 1200px;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --legal-panel-max: 720px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header — matches synexlanding.html */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.brand {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--text);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 8px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav {
    position: relative;
  }

  .menu-btn {
    display: block;
  }
}

/* Kicker + titles — same as landing sections */
.kicker {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
}

/* Legal page layout */
.legal-main {
  padding: 0;
}

.legal-hero {
  padding: 56px 0 40px;
}

.legal-doc-header {
  text-align: center;
  max-width: var(--legal-panel-max);
  margin: 0 auto;
}

.legal-doc-header .legal-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.legal-lead {
  margin: 0 auto 16px;
  max-width: 38rem;
  font-size: 15px;
  font-style: italic;
  line-height: 1.55;
  color: var(--muted);
}

.legal-lead a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-lead a:hover {
  color: var(--green-hover);
}

.legal-doc-header .legal-updated {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--muted-light);
}

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

.legal-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.legal-updated {
  margin: 0 0 32px;
  font-size: 14px;
  color: var(--muted);
}

.legal-content-section {
  padding: 0 0 80px;
}

.legal-panel {
  max-width: var(--legal-panel-max);
  margin: 0 auto 0;
  padding: 32px 28px 36px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.legal-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}

.legal-body h2 {
  margin: 2rem 0 0.75rem;
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body h3 {
  margin: 1.5rem 0 0.5rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.legal-body p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.legal-body ul,
.legal-body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  color: var(--muted);
}

.legal-body li {
  margin-bottom: 0.35rem;
}

.legal-body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body a:hover {
  color: var(--green-hover);
}

.legal-body strong {
  color: var(--text);
  font-weight: 600;
}

.legal-body code {
  font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 0.88em;
  padding: 0 0.2em;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

/* All-caps disclaimer blocks (Terms §7–8) */
.legal-body .legal-caps {
  font-size: 0.92em;
  letter-spacing: 0.02em;
  line-height: 1.55;
}

.legal-placeholder {
  padding: 20px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
}

.legal-subnav {
  max-width: var(--legal-panel-max);
  margin: 0 auto;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted-light);
}

.legal-subnav-title {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.legal-subnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.legal-subnav-links a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-subnav-links a:hover {
  color: var(--green-hover);
}

/* Footer — matches landing */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.footer-top-spacer {
  flex: 1 1 0;
  min-width: 0;
}

.footer-top-rights {
  flex: 1 1 0;
  min-width: 0;
  text-align: right;
  color: var(--muted-light);
  font-size: 13px;
  white-space: nowrap;
}

.footer-nav-row {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  row-gap: 10px;
  max-width: 100%;
}

.footer-nav-row a {
  color: var(--muted);
  font-size: 14px;
}

.footer-nav-row a:hover {
  color: var(--text);
}

.footer-nav-row a.footer-link-policy {
  color: var(--muted-light);
}

.footer-nav-row a.footer-link-policy:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  max-width: 52rem;
  margin: 0 auto;
  justify-content: center;
}

.footer-legal-icon {
  flex-shrink: 0;
  display: block;
}

.footer-legal-line {
  flex: 1 1 280px;
  margin: 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  line-height: 1.6;
  justify-content: flex-start;
}

.footer-copyright {
  flex: 0 0 auto;
  text-align: left;
  white-space: nowrap;
}

.footer-address {
  flex: 1 1 220px;
  text-align: center;
  min-width: min(100%, 12rem);
}

.footer p {
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .footer-top,
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    align-items: center;
  }

  .footer-top-spacer {
    display: none;
  }

  .footer-top-rights {
    flex: none;
    text-align: center;
    white-space: normal;
  }

  .legal-panel {
    padding: 24px 20px 28px;
  }
}
