:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --bg-subtle: #edf3ef;
  --surface: #ffffff;
  --surface-soft: #e8f0eb;
  --text: #13211c;
  --text-muted: #4f6259;
  --text-soft: #6b7d74;
  --border: #d5e1da;
  --border-strong: #b7c9bf;
  --primary: #176c50;
  --primary-hover: #11553e;
  --primary-on: #ffffff;
  --primary-soft: #dcefe6;
  --focus: #d26b00;
  --header-bg: rgba(244, 247, 245, 0.92);
  --shadow: 0 18px 54px rgba(24, 48, 37, 0.1);
  --content: 1180px;
  --measure: 760px;
  --header-height: 72px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09110d;
  --bg-subtle: #0d1712;
  --surface: #111d17;
  --surface-soft: #17271f;
  --text: #edf5f0;
  --text-muted: #b5c6bc;
  --text-soft: #93a89c;
  --border: #263b31;
  --border-strong: #3b574a;
  --primary: #78d9b2;
  --primary-hover: #9ae8c8;
  --primary-on: #082219;
  --primary-soft: #163c2e;
  --focus: #ffbd6c;
  --header-bg: rgba(9, 17, 13, 0.92);
  --shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #09110d;
    --bg-subtle: #0d1712;
    --surface: #111d17;
    --surface-soft: #17271f;
    --text: #edf5f0;
    --text-muted: #b5c6bc;
    --text-soft: #93a89c;
    --border: #263b31;
    --border-strong: #3b574a;
    --primary: #78d9b2;
    --primary-hover: #9ae8c8;
    --primary-on: #082219;
    --primary-soft: #163c2e;
    --focus: #ffbd6c;
    --header-bg: rgba(9, 17, 13, 0.92);
    --shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  max-width: 850px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 8vw, 5.2rem);
  font-weight: 800;
  hyphens: auto;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  font-weight: 760;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  font-weight: 740;
  letter-spacing: -0.015em;
}

p,
li,
dd {
  color: var(--text-muted);
}

::selection {
  background: var(--primary);
  color: var(--primary-on);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 32px), var(--content));
  min-height: var(--header-height);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 790;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--primary);
  color: var(--primary-on);
  box-shadow: var(--shadow);
  font-size: 1rem;
  font-weight: 850;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  display: none;
}

.site-nav a:not([aria-current="page"]):not([href="index.html"]) {
  display: inline-flex;
}

.site-nav a,
.footer-links a {
  color: var(--text-muted);
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.footer-links a:hover {
  color: var(--primary);
}

.theme-control {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-control:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.theme-control__icon {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
}

:root:not([data-theme="dark"]) .theme-control__icon--sun,
:root[data-theme="dark"] .theme-control__icon--moon {
  display: none;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 126px) 0 clamp(66px, 9vw, 108px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 82% 14%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 30%),
    linear-gradient(180deg, var(--bg-subtle), var(--bg));
}

.legal-hero::after {
  position: absolute;
  right: -120px;
  bottom: -190px;
  width: 440px;
  height: 440px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: 50%;
  content: "";
}

.legal-hero__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-hero__lead {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(1.08rem, 2.2vw, 1.28rem);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 620;
}

.legal-shell {
  display: grid;
  gap: 40px;
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
  padding: 56px 0 96px;
}

.legal-toc {
  align-self: start;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-toc p {
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-toc ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc a {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 640;
  line-height: 1.35;
  text-decoration: none;
}

.legal-toc a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.legal-content {
  min-width: 0;
  max-width: var(--measure);
}

.legal-section {
  padding: 0 0 46px;
  margin-bottom: 46px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.legal-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.legal-section p:last-child,
.legal-section ul:last-child,
.legal-section dl:last-child {
  margin-bottom: 0;
}

.legal-section a,
.contact-card a,
.legal-note a {
  color: var(--primary);
  font-weight: 680;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-section a:hover,
.contact-card a:hover,
.legal-note a:hover {
  color: var(--primary-hover);
}

.legal-section ul,
.legal-section ol {
  padding-left: 1.35rem;
}

.legal-section li + li {
  margin-top: 8px;
}

.contact-card,
.legal-note,
.data-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.contact-card {
  margin-top: 22px;
  font-style: normal;
}

.contact-card p {
  margin-bottom: 10px;
}

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

.legal-note {
  margin: 22px 0;
  border-color: var(--border-strong);
  background: var(--primary-soft);
}

.legal-note strong {
  color: var(--text);
}

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

.data-grid {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.data-card h3 {
  margin-bottom: 8px;
}

.data-card p {
  margin-bottom: 0;
  font-size: 0.94rem;
}

.legal-table {
  width: 100%;
  margin: 22px 0;
  border: 1px solid var(--border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

.legal-table th,
.legal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-table td {
  font-size: 0.9rem;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-table strong {
  color: var(--text);
}

.legal-address {
  margin: 20px 0;
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-style: normal;
}

.legal-address p {
  margin-bottom: 12px;
}

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

.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.site-footer__inner {
  display: grid;
  gap: 20px;
  align-items: center;
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  min-height: 44px;
  padding: 9px 0;
}

.site-footer p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

@media (min-width: 680px) {
  .data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__inner {
    grid-template-columns: 1fr auto;
  }

  .site-footer__inner > p {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
    margin-left: 0;
  }

  .site-nav a {
    display: inline-flex;
  }

  .legal-shell {
    grid-template-columns: minmax(210px, 250px) minmax(0, var(--measure));
    justify-content: space-between;
    gap: 72px;
    padding-top: 72px;
  }

  .legal-toc {
    position: sticky;
    top: calc(var(--header-height) + 28px);
    max-height: calc(100vh - var(--header-height) - 56px);
    overflow: auto;
  }

  .site-footer__inner {
    grid-template-columns: 1fr auto auto;
  }

  .site-footer__inner > p {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table td {
    display: block;
  }

  .legal-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .legal-table tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

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

  .legal-table td {
    padding: 4px 0;
    border: 0;
  }

  .legal-table td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--text-soft);
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 780;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #111111;
    --text-muted: #333333;
    --border: #cccccc;
  }

  .site-header,
  .legal-toc,
  .site-footer {
    display: none;
  }

  .legal-hero {
    padding: 24px 0 32px;
    background: #ffffff;
  }

  .legal-shell {
    display: block;
    width: 100%;
    padding: 32px 0;
  }

  .legal-content {
    max-width: none;
  }

  .legal-section {
    break-inside: avoid;
  }
}
