/* Legal pages — same atmosphere, calmer reading layout. */

.legal-page { min-height: 100vh; }

.legal-header {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid rgba(216, 180, 90, 0.14);
  background: rgba(5, 7, 13, 0.78);
}
@supports (backdrop-filter: blur(14px)) {
  .legal-header { background: rgba(5, 7, 13, 0.62); backdrop-filter: blur(14px) saturate(115%); }
}
.legal-header__inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.legal-header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}
.legal-header__nav a {
  color: var(--muted);
  font-size: 0.82rem;
  transition: color 0.18s ease;
}
.legal-header__nav a:hover { color: var(--gold-hi); }
.legal-header__nav .is-current { color: var(--gold); }
.legal-header__back { display: inline-flex; align-items: center; gap: 8px; }
.legal-header__back .icon { transform: rotate(180deg); }

.legal-main { padding: 66px 0 90px; }
.legal-layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 780px);
  align-items: start;
  justify-content: space-between;
  gap: clamp(40px, 7vw, 95px);
}
.legal-aside { position: sticky; top: 108px; }
.legal-aside__nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.legal-aside__nav a {
  padding: 10px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--dim);
  font-size: 0.82rem;
  line-height: 1.45;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.legal-aside__nav a:hover { color: var(--gold-hi); background: rgba(255, 255, 255, 0.025); }
.legal-aside__nav a[aria-current="page"] {
  border-left-color: var(--gold);
  background: rgba(216, 180, 90, 0.055);
  color: var(--gold-hi);
}
.legal-aside__note {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--dim);
  font-size: 0.7rem;
  line-height: 1.65;
}
.legal-aside__note a { color: var(--gold); }

.legal-document {
  min-width: 0;
  overflow-wrap: break-word;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(13, 18, 28, 0.9), rgba(6, 9, 15, 0.93));
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
}
.legal-document__head { padding-bottom: 29px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.legal-document__head h1 {
  margin-bottom: 15px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--dim);
  font-size: 0.72rem;
  line-height: 1.5;
}
.legal-meta span { position: relative; }
.legal-meta span + span::before { content: "·"; margin-right: 18px; }

.legal-callout {
  margin: 28px 0 34px;
  padding: 17px 19px;
  border: 1px solid rgba(216, 180, 90, 0.25);
  border-left: 2px solid var(--gold);
  border-radius: 0 7px 7px 0;
  background: rgba(216, 180, 90, 0.055);
  color: #c8c3b7;
  font-size: 0.81rem;
  line-height: 1.7;
}
.legal-callout strong { color: var(--gold-hi); }

.legal-draft {
  margin: 0 0 28px;
  padding: 12px 14px;
  border: 1px dashed rgba(227, 179, 65, 0.42);
  border-radius: 6px;
  background: rgba(227, 179, 65, 0.055);
  color: #cdbb89;
  font-size: 0.72rem;
  line-height: 1.6;
}

.legal-document section { padding-top: 32px; scroll-margin-top: 104px; }
.legal-document h2 {
  margin-bottom: 13px;
  font-family: var(--ui);
  font-size: 1.12rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: #e4dfd2;
}
.legal-document h3 {
  margin: 22px 0 8px;
  font-size: 0.94rem;
  font-weight: 650;
  color: #d6d0c2;
}
.legal-document p,
.legal-document li {
  color: #aeb4bf;
  font-size: 0.87rem;
  line-height: 1.78;
}
.legal-document p + p { margin-top: 10px; }
.legal-document ul,
.legal-document ol {
  margin: 11px 0 0;
  padding-left: 3px;
  list-style: none;
}
.legal-document li { position: relative; padding-left: 18px; margin-top: 7px; }
.legal-document li::before {
  content: "";
  position: absolute;
  top: 0.76em;
  left: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
}
.legal-document ol { counter-reset: legal-list; }
.legal-document ol > li { counter-increment: legal-list; padding-left: 25px; }
.legal-document ol > li::before {
  content: counter(legal-list) ".";
  top: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--gold);
  font-size: 0.78rem;
  line-height: 1.9;
}
.legal-document a:not(.text-link) {
  color: var(--gold-hi);
  text-decoration: underline;
  text-decoration-color: rgba(244, 226, 171, 0.35);
  text-underline-offset: 3px;
}
.legal-document a:not(.text-link):hover { text-decoration-color: currentColor; }
.legal-document .legal-placeholder {
  display: inline;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(227, 179, 65, 0.12);
  color: #e0c990;
  font-style: italic;
}
.legal-table-wrap {
  max-width: 100%;
  margin-top: 13px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.legal-document table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.legal-document th,
.legal-document td {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  text-align: left;
  vertical-align: top;
  color: #aeb4bf;
  line-height: 1.55;
}
.legal-document th { background: rgba(255, 255, 255, 0.035); color: #d8d2c5; font-weight: 600; }
.legal-document__foot {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--dim);
  font-size: 0.72rem;
  line-height: 1.65;
}

.legal-footer {
  padding: 26px 0 34px;
  border-top: 1px solid rgba(216, 180, 90, 0.12);
  background: rgba(4, 6, 11, 0.82);
}
.legal-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px 30px;
  color: var(--dim);
  font-size: 0.71rem;
  line-height: 1.6;
}
.legal-footer__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.legal-footer a:hover { color: var(--gold-hi); }

@media (max-width: 850px) {
  .legal-layout { grid-template-columns: 1fr; gap: 28px; }
  .legal-aside { position: static; }
  .legal-aside__nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .legal-aside__nav a { border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; font-size: 0.75rem; }
  .legal-aside__nav a[aria-current="page"] { border-color: rgba(216, 180, 90, 0.45); }
  .legal-aside__note { display: none; }
  .legal-document { padding: 28px 22px; }
}

@media (max-width: 640px) {
  .legal-header__inner { min-height: 64px; gap: 12px; }
  .legal-header__nav a:not(.legal-header__back):not(.lang-switch) { display: none; }
  .legal-header__nav .lang-switch { display: inline-flex; }
  .legal-header .brand__sub { display: none; }
  .lang-switch--legal { min-width: 36px; min-height: 32px; }
  .legal-main { padding: 30px 0 54px; }
  .legal-document__head h1 { font-size: 1.85rem; }
  .legal-document h2 { font-size: 1.02rem; }
  .legal-document p, .legal-document li { font-size: 0.84rem; }
  .legal-table-wrap { margin-inline: -2px; padding-bottom: 4px; }
  .legal-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media print {
  .site-bg, .legal-header, .legal-aside, .legal-footer { display: none !important; }
  .legal-main { padding: 0; }
  .legal-layout { display: block; }
  .legal-document { border: 0; box-shadow: none; background: #fff; color: #111; padding: 0; }
  .legal-document h1, .legal-document h2, .legal-document h3, .legal-document p, .legal-document li, .legal-document td { color: #111; }
}
