:root {
  color-scheme: light;
  --ink: #122033;
  --muted: #5c6878;
  --line: #d9e1eb;
  --surface: #f5f7fb;
  --surface-strong: #eaf0f8;
  --brand: #2463eb;
  --brand-dark: #1949b8;
  --danger: #b42318;
  --success: #137a4a;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #fff; line-height: 1.65; }
a { color: var(--brand-dark); text-underline-offset: 0.16em; }
a:hover { color: var(--brand); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.legal-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* Existing legal markup, landing-page header geometry. */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(7,17,31,.9);
  color: #fff;
  backdrop-filter: blur(18px);
}
.legal-header-inner,
.legal-main,
.legal-footer-inner { width: min(calc(100% - 40px), var(--max-width)); margin: 0 auto; }
.legal-header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.legal-brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 20px; font-weight: 780; letter-spacing: -.03em; white-space: nowrap; }
.legal-brand-mark { width: 32px; height: 32px; min-width: 32px; overflow: hidden; border: 0; border-radius: 0; background: url("/assets/brand/secutest-mark.svg") center/contain no-repeat; color: transparent; font-size: 0; }
.legal-header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-left: auto;
  flex-wrap: nowrap;
  font-size: 15px;
}
.legal-header nav a {
  color: #bfcbda;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}
.legal-header nav a:hover, .legal-header nav a:focus-visible { color: #fff; }
.legal-header a:focus-visible { outline: 3px solid rgba(52,120,246,.38); outline-offset: 3px; }

.legal-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  margin-left: 0;
}

.legal-login {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: linear-gradient(135deg, #3478f6, #2463eb);
  color: #fff;
  box-shadow: 0 12px 26px rgba(36, 99, 235, 0.24);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.legal-login:hover,
.legal-login:focus-visible {
  color: #fff;
}

.legal-login:hover {
  box-shadow: 0 16px 30px rgba(36, 99, 235, 0.3);
  transform: translateY(-1px);
}

.legal-main { flex: 1; padding: 72px 0 96px; }
.legal-hero { max-width: 850px; margin-bottom: 48px; }
.legal-eyebrow { margin: 0 0 12px; color: var(--brand-dark); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.76rem; }
.legal-hero h1 { margin: 0; font-size: clamp(2.2rem, 7vw, 4.4rem); line-height: 1.05; letter-spacing: -0.055em; }
.legal-hero > p:not(.legal-eyebrow) { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 1.08rem; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; color: var(--muted); font-size: 0.9rem; }

.legal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start; }
.legal-content { min-width: 0; }
.legal-content section { scroll-margin-top: 96px; padding: 34px 0; border-top: 1px solid var(--line); }
.legal-content section:first-child { border-top: 0; padding-top: 0; }
.legal-content h2 { margin: 0 0 14px; font-size: clamp(1.35rem, 3vw, 1.85rem); letter-spacing: -0.025em; }
.legal-content h3 { margin: 28px 0 8px; font-size: 1.08rem; }
.legal-content p { margin: 0 0 14px; }
.legal-content ul, .legal-content ol { margin: 12px 0 18px; padding-left: 24px; }
.legal-content li { margin: 7px 0; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 0.94rem; }
.legal-content th, .legal-content td { border: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; }
.legal-content th { background: var(--surface); }
.legal-callout { margin: 20px 0; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; background: var(--surface); }
.legal-callout.warning { border-left-color: #d97706; }
.legal-callout.danger { border-left-color: var(--danger); }
.legal-callout.success { border-left-color: var(--success); }
.legal-callout p:last-child { margin-bottom: 0; }
.legal-toc { position: sticky; top: 104px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.legal-toc strong { display: block; margin-bottom: 10px; }
.legal-toc a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.legal-toc a:hover { color: var(--ink); }

.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 36px; align-items: start; }
.contact-card, .contact-form { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 24px; }
.contact-card { background: var(--surface); }
.contact-card h2, .contact-form h2 { margin-top: 0; }
.contact-list { display: grid; gap: 16px; }
.contact-list div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-list strong { display: block; }
.contact-list span { color: var(--muted); font-size: 0.94rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; margin-bottom: 6px; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid #bdc8d7; border-radius: 10px; padding: 11px 12px; color: var(--ink); background: #fff; font: inherit; }
.form-field textarea { min-height: 170px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 3px solid rgba(36,99,235,0.15); border-color: var(--brand); }
.form-check { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.form-check input { margin-top: 5px; }
.form-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.button-primary { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; border: 0; border-radius: 10px; padding: 0 18px; background: var(--brand); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.button-primary:hover { background: var(--brand-dark); }

/* Existing legal footer content, landing-page width/palette. */
.legal-footer { border-top: 1px solid rgba(139,170,207,.14); background: #07111f; color: #c4cfde; }
.legal-footer-inner { min-height: 112px; padding: 34px 0; display: flex; align-items: center; gap: 18px; }
.legal-footer a { color: #8fa2b9; text-decoration: none; }
.legal-footer a:hover, .legal-footer a:focus-visible { color: #fff; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; }
.legal-footer p { margin: 0; color: #9fb0c4; font-size: 12px; }

@media (max-width: 900px) {
  .legal-header { position: sticky; }
  .legal-header nav { display: none; }
  .legal-header-actions { margin-left: auto; }
  .legal-main { padding-top: 48px; }
  .legal-layout, .contact-grid { grid-template-columns: 1fr; }
  .legal-toc { position: static; order: -1; }
}
@media (max-width: 620px) {
  .legal-header-inner, .legal-main, .legal-footer-inner { width: min(calc(100% - 32px), var(--max-width)); }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .legal-content table { display: block; overflow-x: auto; }
}
