* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #102331;
  --muted: #637684;
  --line: rgba(16, 35, 49, 0.12);
  --brand: #155c73;
  --brand-2: #237f99;
  --gold: #b98714;
  --paper: rgba(255, 255, 255, 0.96);
  --paper-strong: #ffffff;
  --nav: #0f2b39;
  --soft: #f4f8fb;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  padding: 32px;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(246, 250, 252, 0.95), rgba(226, 238, 244, 0.92)),
    linear-gradient(135deg, #d7ebf4 0%, #aacdda 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(30, 90, 111, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 90, 111, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 78%);
}

.legal-page {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.86);
  color: var(--nav);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(20,50,70,0.06);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.back-link:hover {
  transform: translateY(-1px);
  background: var(--brand);
  color: #fff;
}

.legal-shell {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.legal-nav {
  position: sticky;
  top: 24px;
  display: block !important;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  background: linear-gradient(180deg, #153747, #102b39);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 56px rgba(16, 35, 49, 0.18);
  padding: 14px;
  overflow: hidden;
}

.legal-nav-title {
  padding: 8px 10px 16px;
  color: rgba(255,255,255,0.66);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-nav a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 12px 13px !important;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(255,255,255,0.82) !important;
  text-decoration: none !important;
  font-size: 0.88rem;
  font-weight: 850;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.legal-nav a + a { margin-top: 4px; }

.legal-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff !important;
  transform: translateX(2px);
}

.legal-nav a.active {
  background: #ffffff;
  color: var(--nav) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.legal-nav a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.3;
}

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

.legal-hero,
.legal-card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 26px 64px rgba(20,50,70,0.10);
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 58px);
  border-radius: 20px;
  margin-bottom: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.99), rgba(248,251,253,0.96));
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--gold));
}

.legal-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(21,92,115,0.18);
  border-radius: 999px;
  background: #eef6f8;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

h1 {
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 4.15rem);
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 18px;
}

.legal-hero p {
  max-width: 780px;
  color: #456775;
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.7;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.legal-meta span {
  display: inline-flex !important;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(21, 92, 115, 0.08);
  color: #315a69;
  font-size: 0.78rem;
  font-weight: 850;
}

.legal-card {
  padding: clamp(24px, 4vw, 44px);
  border-radius: 20px;
  background: var(--paper-strong);
}

h2 {
  margin: 34px 0 12px;
  color: var(--ink);
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  letter-spacing: 0;
}

h2:first-child { margin-top: 0; }

p, li {
  color: #3d5c69;
  line-height: 1.76;
  font-size: 0.98rem;
}

p + p { margin-top: 10px; }

ul {
  display: grid;
  gap: 9px;
  margin: 12px 0 16px;
  padding-left: 0;
  list-style: none;
}

li {
  position: relative;
  padding-left: 28px;
}

li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), var(--gold));
}

strong { color: var(--ink); font-weight: 900; }

.notice,
.warning {
  margin: 8px 0 28px;
  padding: 18px 20px;
  border-radius: 14px;
  line-height: 1.65;
}

.notice {
  border: 1px solid rgba(44,143,176,0.18);
  border-left: 5px solid var(--brand-2);
  background: linear-gradient(135deg, #eef9fd, #ffffff);
}

.warning {
  border: 1px solid rgba(217,165,20,0.28);
  border-left: 5px solid var(--gold);
  background: linear-gradient(135deg, #fff8df, #ffffff);
}

.contact-highlight {
  margin: 20px 0 30px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid rgba(30,90,111,0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(30,90,111,0.08), rgba(44,143,176,0.04)),
    #ffffff;
}

.contact-highlight span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.contact-highlight a {
  display: inline-flex;
  color: var(--brand);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 950;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-highlight a:hover { text-decoration: underline; }

.contact-highlight p {
  max-width: 720px;
  margin-top: 12px;
}

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

.contact-grid div {
  min-height: 188px;
  padding: 20px;
  border: 1px solid rgba(27, 84, 105, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f5fbfd);
}

.contact-grid h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1rem;
}

.legal-card > p:last-child {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #6b838e;
  font-size: 0.88rem;
}

.legal-footer {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.66);
  text-align: center;
  color: #5f7d8b;
  font-size: 0.84rem;
}

.legal-footer a {
  color: var(--brand);
  font-weight: 900;
  text-decoration: none;
}

.legal-footer a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  body { padding: 18px; }
  .legal-shell { grid-template-columns: 1fr; }
  .legal-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }
  .legal-nav-title { display: none; }
  .legal-nav a {
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .legal-nav a::after { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { padding: 12px; }
  .legal-hero,
  .legal-card { border-radius: 16px; }
  .legal-footer { border-radius: 14px; }
}
