:root {
  --bg: #f7f7f4;
  --panel: #fff;
  --ink: #171a18;
  --muted: #626b66;
  --line: #d9ddd7;
  --accent: #12664f;
  --soft: #e8f1ec;
  --warm: #f5efe4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }

.legal-site-header {
  min-height: 72px;
  padding: 13px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 247, 244, .95);
  backdrop-filter: blur(14px);
}

.legal-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}
.legal-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}
.legal-brand strong,
.legal-brand small { display: block; }
.legal-brand strong { font-size: 16px; }
.legal-brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }

.legal-site-header > nav,
.legal-site-footer nav {
  display: flex;
  align-items: center;
  gap: 19px;
}
.legal-site-header nav a,
.legal-site-footer a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
}
.legal-site-header nav a:hover,
.legal-site-header nav a[aria-current="page"],
.legal-site-footer a:hover { color: var(--accent); }
.legal-site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.legal-header-action {
  justify-self: end;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  background: #fff;
}
.legal-header-action:hover { border-color: var(--accent); color: var(--accent); }

.legal-layout {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 88px;
  display: grid;
  grid-template-columns: 210px minmax(0, 790px);
  justify-content: center;
  gap: clamp(42px, 7vw, 88px);
  align-items: start;
}
.legal-index {
  position: sticky;
  top: 104px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.legal-index > p {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.legal-index nav { display: grid; }
.legal-index a {
  padding: 6px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.legal-index a:hover { color: var(--accent); }

.legal-document { min-width: 0; }
.legal-document-head {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.legal-overline {
  margin: 0 0 11px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.legal-document h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 68px);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -.035em;
}
.legal-lead {
  max-width: 690px;
  margin: 18px 0 22px;
  color: #45504a;
  font-size: 18px;
  line-height: 1.55;
}
.legal-version {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.legal-version div { display: flex; gap: 7px; }
.legal-version dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}
.legal-version dd { margin: 0; font-size: 11px; font-weight: 700; }

.legal-key-notice {
  margin: 34px 0 10px;
  padding: 24px 26px;
  border: 1px solid rgba(18, 102, 79, .22);
  border-left: 4px solid var(--accent);
  border-radius: 4px 9px 9px 4px;
  background: #f0f6f2;
}
.legal-key-notice > p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.legal-key-notice h2 {
  margin: 0 0 11px;
  font-size: 22px;
  line-height: 1.3;
}
.legal-key-notice ul { margin-bottom: 0; }
.privacy-notice { background: #f2f6f4; }

.legal-document section {
  scroll-margin-top: 96px;
  padding: 31px 0 6px;
}
.legal-document section + section { border-top: 1px solid rgba(217, 221, 215, .62); }
.legal-document section.legal-key-notice { padding: 24px 26px; border-top: 1px solid rgba(18, 102, 79, .22); }
.legal-document h2 {
  margin: 0 0 13px;
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -.012em;
}
.legal-document p,
.legal-document li {
  color: #343d38;
  font-size: 14px;
}
.legal-document p { margin: 0 0 15px; }
.legal-document ul { margin: 3px 0 16px; padding-left: 22px; }
.legal-document li { margin: 7px 0; padding-left: 3px; }
.legal-document a { color: var(--accent); text-underline-offset: 3px; }
.legal-document strong { color: var(--ink); }
.legal-document code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f1f3f0;
  color: #31463e;
  font-size: 12px;
}

.legal-table-wrap {
  margin: 16px 0 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.legal-table-wrap table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.5;
}
.legal-table-wrap th,
.legal-table-wrap td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.legal-table-wrap tr:last-child td { border-bottom: 0; }
.legal-table-wrap th {
  background: #f1f4f1;
  color: #52605a;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.legal-table-wrap td:first-child { width: 22%; color: var(--ink); font-weight: 740; }
.compact-table td:first-child { width: 25%; }

.legal-basis {
  margin-top: 38px;
  padding: 22px 24px;
  border-top: 3px solid var(--ink);
  background: var(--warm);
}
.legal-basis h2 { font-size: 16px; }
.legal-basis p { margin-bottom: 0; font-size: 12px; }

.legal-site-footer {
  min-height: 88px;
  padding: 23px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #f1f2ef;
}
.legal-site-footer p { margin: 0; color: var(--muted); font-size: 11px; }
.legal-site-footer strong { color: var(--ink); }

@media (max-width: 860px) {
  .legal-site-header { grid-template-columns: 1fr auto; }
  .legal-site-header > nav { display: none; }
  .legal-layout { grid-template-columns: 1fr; padding-top: 32px; }
  .legal-index { display: none; }
}

@media (max-width: 600px) {
  .legal-site-header { min-height: 64px; padding: 10px 12px; }
  .legal-brand small { display: none; }
  .legal-brand-mark { width: 38px; height: 38px; }
  .legal-header-action { padding: 7px 9px; }
  .legal-layout { width: calc(100% - 24px); padding: 28px 0 60px; }
  .legal-document h1 { font-size: 44px; }
  .legal-lead { font-size: 16px; }
  .legal-key-notice { padding: 20px 18px; }
  .legal-document section.legal-key-notice { padding: 20px 18px; }
  .legal-document h2 { font-size: 20px; }
  .legal-document p,
  .legal-document li { font-size: 13px; }
  .legal-site-footer { align-items: flex-start; flex-direction: column; padding: 22px 12px; }
  .legal-site-footer nav { flex-wrap: wrap; gap: 13px; }
}
