:root {
  color-scheme: light;
  --ink: #1d1f21;
  --muted: #676a6d;
  --line: #dedbd4;
  --paper: #fff;
  --bg: #f5f3ef;
  --red: #c91f28;
  --green: #08713a;
  --shadow: 0 28px 80px rgba(29, 31, 33, .1);
  font-family: "Geist", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 50% 0, #fff 0, var(--bg) 32rem); color: var(--ink); }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--red); }
button, input { font: inherit; }

.legal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(222, 219, 212, .86);
  background: rgba(245, 243, 239, .9);
  backdrop-filter: blur(18px);
}

.legal-header-inner {
  width: min(100% - 32px, 1120px);
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 auto;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.05;
  text-decoration: none;
}

.legal-brand img { width: 48px; height: 48px; object-fit: contain; }
.legal-brand span { display: grid; gap: 4px; }
.legal-brand small { color: var(--muted); font-size: 11px; font-weight: 650; }
.legal-back {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.legal-shell { width: min(100% - 32px, 1120px); margin: 0 auto; padding: 54px 0 72px; }
.legal-hero { max-width: 820px; margin-bottom: 38px; }
.legal-kicker { color: var(--red); font-size: 12px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.legal-hero h1 { margin: 12px 0 14px; font-size: clamp(38px, 7vw, 70px); line-height: .98; letter-spacing: -.055em; }
.legal-hero > p { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.68; }
.legal-updated { display: inline-flex; margin-top: 18px; padding: 8px 12px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }

.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 34px; }
.legal-toc { position: sticky; top: 100px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .8); box-shadow: 0 12px 40px rgba(29, 31, 33, .05); }
.legal-toc strong { display: block; margin-bottom: 12px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.legal-toc a { display: block; padding: 7px 0; color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1.35; text-decoration: none; }
.legal-toc a:hover { color: var(--red); }

.legal-document { overflow: hidden; border: 1px solid var(--line); border-radius: 30px; background: var(--paper); box-shadow: var(--shadow); }
.legal-section { padding: clamp(26px, 5vw, 48px); border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.legal-section:first-child { border-top: 0; }
.legal-section h2 { margin: 0 0 18px; font-size: clamp(23px, 3vw, 32px); letter-spacing: -.035em; }
.legal-section h3 { margin: 28px 0 10px; font-size: 18px; }
.legal-section p, .legal-section li { color: #4f5255; font-size: 15px; line-height: 1.75; }
.legal-section p { margin: 0 0 14px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ol, .legal-section ul { margin: 0; padding-left: 22px; }
.legal-section li + li { margin-top: 8px; }
.legal-section strong { color: var(--ink); }

.legal-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.legal-fact { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fbfaf8; }
.legal-fact small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.legal-fact strong, .legal-fact a { font-size: 14px; line-height: 1.45; }

.legal-note { margin-top: 20px; padding: 18px 20px; border-left: 4px solid var(--red); border-radius: 0 15px 15px 0; background: #fdf5f3; color: #4c4341; font-size: 14px; line-height: 1.65; }
.legal-note.green { border-color: var(--green); background: #f0f8f3; }

.legal-table-wrap { overflow-x: auto; margin: 18px 0 4px; border: 1px solid var(--line); border-radius: 18px; }
.legal-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.legal-table th, .legal-table td { padding: 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; line-height: 1.55; }
.legal-table th { background: #f6f4f0; color: var(--ink); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.legal-table td { color: #515457; }
.legal-table tr:last-child td { border-bottom: 0; }

.legal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.legal-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.legal-button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.legal-button:hover { color: #fff; transform: translateY(-1px); }
.legal-button.secondary:hover { color: var(--red); }

.legal-footer { border-top: 1px solid var(--line); background: #ebe8e2; }
.legal-footer-inner { width: min(100% - 32px, 1120px); display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 28px 0; }
.legal-footer p { margin: 0; color: var(--muted); font-size: 12px; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.legal-footer a, .legal-footer button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; }
.legal-footer a:hover, .legal-footer button:hover { color: var(--red); }

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

@media (max-width: 820px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .legal-toc nav { columns: 2; column-gap: 20px; }
}

@media (max-width: 580px) {
  .legal-header-inner, .legal-shell, .legal-footer-inner { width: min(100% - 22px, 1120px); }
  .legal-header-inner { min-height: 66px; }
  .legal-brand img { width: 42px; height: 42px; }
  .legal-brand small { display: none; }
  .legal-back { padding: 0 13px; }
  .legal-shell { padding-top: 38px; }
  .legal-toc nav { columns: 1; }
  .legal-document { border-radius: 22px; }
  .legal-facts { grid-template-columns: 1fr; }
  .legal-footer-inner { align-items: flex-start; flex-direction: column; }
}
