:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #17212b;
  background: #eef3f5;
  --legal-ink: #17212b;
  --legal-muted: #5b6974;
  --legal-accent: #075f7c;
  --legal-accent-soft: #eaf5f8;
  --legal-line: #d8e1e5;
  --legal-paper: #fff;
  --legal-warning: #8a4306;
  --legal-warning-bg: #fff7e8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 0%, rgb(7 95 124 / 8%), transparent 31rem), #eef3f5;
  line-height: 1.65;
}

.legal-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--legal-ink);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
}

.legal-skip-link:focus {
  transform: translateY(0);
}

a {
  color: var(--legal-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 0.13em;
}

a:focus-visible {
  outline: 3px solid rgb(7 95 124 / 28%);
  outline-offset: 3px;
}

.legal-nav {
  border-bottom: 1px solid var(--legal-line);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(12px);
}

.legal-nav-inner,
.legal-main,
.legal-footer-inner {
  width: min(790px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.legal-main--wide {
  width: min(940px, calc(100% - 32px));
}

.legal-nav-inner {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-nav-inner > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.legal-brand {
  color: var(--legal-ink);
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.legal-main {
  margin-top: 42px;
  margin-bottom: 72px;
  padding: clamp(25px, 5vw, 54px);
  border: 1px solid var(--legal-line);
  border-radius: 24px;
  background: var(--legal-paper);
  box-shadow: 0 20px 60px rgb(23 33 43 / 9%);
}

.legal-main section {
  scroll-margin-top: 24px;
}

h1,
h2,
h3 {
  color: var(--legal-ink);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 18ch;
  margin: 0 0 10px;
  font-size: clamp(2rem, 7vw, 3.35rem);
}

h2 {
  margin: 38px 0 10px;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
}

h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

p,
ul,
ol {
  margin: 0 0 17px;
}

li + li {
  margin-top: 7px;
}

code {
  padding: 0.08em 0.35em;
  border-radius: 5px;
  background: #edf1f3;
  font-size: 0.9em;
}

.legal-eyebrow {
  margin-bottom: 9px;
  color: var(--legal-accent);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-updated {
  color: var(--legal-muted);
  font-size: 0.9rem;
}

.legal-lead {
  max-width: 70ch;
  color: #35434d;
  font-size: clamp(1.03rem, 2vw, 1.14rem);
}

.legal-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 22px;
  margin: 30px 0 42px;
  padding: 20px 22px;
  border: 1px solid #cfe2e8;
  border-radius: 16px;
  background: var(--legal-accent-soft);
}

.legal-toc strong {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  color: #24414d;
}

.legal-toc a {
  width: fit-content;
}

.legal-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.legal-card {
  padding: 22px;
  border: 1px solid var(--legal-line);
  border-radius: 17px;
  background: #fbfcfd;
}

.legal-card h2 {
  margin-top: 0;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-alert {
  margin: 22px 0;
  padding: 17px 19px;
  border: 1px solid #c8dfe6;
  border-left: 5px solid var(--legal-accent);
  border-radius: 12px;
  background: var(--legal-accent-soft);
}

.legal-alert--warning {
  border-color: #efd49f;
  border-left-color: #c46a12;
  background: var(--legal-warning-bg);
  color: #5c3410;
}

.legal-alert strong {
  color: inherit;
}

.legal-choice p {
  margin: 7px 0 13px;
}

.legal-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.legal-choice-actions button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #9fb8c3;
  border-radius: 9px;
  background: #fff;
  color: #163b4a;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.legal-choice-actions button:hover:not(:disabled) {
  border-color: var(--legal-accent);
}

.legal-choice-actions button:focus-visible {
  outline: 3px solid rgb(13 102 136 / 20%);
  outline-offset: 2px;
}

.legal-choice-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.legal-choice small {
  display: block;
  margin-top: 10px;
  color: var(--legal-muted);
}

.legal-details {
  display: grid;
  gap: 0;
  overflow: hidden;
  margin: 22px 0;
  border: 1px solid var(--legal-line);
  border-radius: 14px;
  background: #fbfcfd;
}

.legal-details div {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 20px;
  padding: 13px 17px;
}

.legal-details div + div {
  border-top: 1px solid var(--legal-line);
}

.legal-details dt {
  color: var(--legal-muted);
  font-weight: 750;
}

.legal-details dd {
  margin: 0;
}

.legal-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 18px 0 25px;
  border: 1px solid var(--legal-line);
  border-radius: 15px;
  background: #fff;
}

.legal-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.5;
}

.legal-table th,
.legal-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--legal-line);
  text-align: left;
  vertical-align: top;
}

.legal-table thead th {
  background: #edf5f7;
  color: #2c4651;
  font-size: 0.78rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.legal-table tbody tr:last-child > * {
  border-bottom: 0;
}

.legal-table--key-value {
  min-width: 580px;
}

.legal-table--key-value th {
  width: 25%;
  background: #f7fafb;
  color: #35434d;
}

.legal-list {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.legal-list li {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--legal-line);
  border-radius: 14px;
  background: #fbfcfd;
}

.legal-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--legal-ink);
  font-size: 1.02rem;
}

.legal-list--measures {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legal-signature {
  margin-top: 48px;
  padding: 24px;
  border: 1px dashed #aebdc4;
  border-radius: 17px;
  background: #f8fafb;
}

.legal-signature h2 {
  margin-top: 0;
}

.legal-signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.legal-signature-grid > div {
  padding: 18px;
  border: 1px solid var(--legal-line);
  border-radius: 12px;
  background: #fff;
}

.legal-signature-grid p {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
}

.legal-footer {
  border-top: 1px solid var(--legal-line);
  background: #fff;
}

.legal-footer-inner {
  padding: 28px 0 34px;
  color: var(--legal-muted);
  font-size: 0.88rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.9rem;
}

.legal-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.legal-footer p {
  margin: 12px 0 0;
}

@media (max-width: 680px) {
  .legal-contact-grid,
  .legal-list--measures,
  .legal-signature-grid {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    grid-template-columns: 1fr;
  }

  .legal-details div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 520px) {
  .legal-nav-inner {
    min-height: 58px;
  }

  .legal-main,
  .legal-main--wide {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    border-width: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .legal-table {
    min-width: 560px;
  }
}

@media print {
  :root,
  body {
    background: #fff;
  }

  .legal-nav,
  .legal-footer,
  .legal-skip-link,
  .legal-toc {
    display: none;
  }

  .legal-main,
  .legal-main--wide {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .legal-table-wrap {
    overflow: visible;
  }

  .legal-table {
    min-width: 0;
  }

  a {
    color: inherit;
  }
}
