:root {
  color-scheme: light;
  --ink: #132238;
  --muted: #53657a;
  --paper: #f7f9fb;
  --surface: #ffffff;
  --line: #d8e0e8;
  --navy: #173b5f;
  --green: #17745a;
  --gold: #a86f16;
  --danger: #a5333a;
  --focus: #2878ba;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.62;
}
a { color: #155f91; text-underline-offset: 3px; }
a:hover { color: var(--green); }
a:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 3px; }

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  padding: 10px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.legal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: "Iowan Old Style", "Palatino Linotype", serif; font-size: 20px; font-weight: 700; }
.legal-brand img { width: 36px; height: 36px; }
.legal-topnav { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.legal-topnav a { color: var(--muted); text-decoration: none; }
.legal-topnav .legal-app-link { padding: 7px 12px; border: 1px solid var(--navy); border-radius: 6px; color: var(--navy); font-weight: 700; }

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(54px, 8vw, 98px) 20px clamp(44px, 7vw, 78px);
  color: #fff;
  background: var(--navy);
}
.legal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: linear-gradient(90deg, transparent 49px, rgba(255,255,255,.35) 50px), linear-gradient(transparent 49px, rgba(255,255,255,.35) 50px);
  background-size: 50px 50px;
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}
.legal-hero-inner { position: relative; z-index: 1; width: min(1140px, 100%); margin: 0 auto; }
.legal-kicker { margin: 0 0 12px; color: #bde7d8; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.legal-hero h1 { max-width: 850px; margin: 0; font-family: "Iowan Old Style", "Palatino Linotype", serif; font-size: clamp(38px, 7vw, 72px); line-height: 1.02; letter-spacing: 0; }
.legal-lead { max-width: 720px; margin: 22px 0 0; color: #dbe8f3; font-size: clamp(16px, 2.2vw, 20px); }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; color: #b8c9d9; font-size: 12px; }

.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 760px); justify-content: center; gap: 72px; width: min(1140px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 86px; }
.legal-toc { align-self: start; position: sticky; top: 90px; }
.legal-toc strong { display: block; margin-bottom: 10px; color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.legal-toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; text-decoration: none; }
.legal-toc a:hover { border-left-color: var(--green); color: var(--green); }
.legal-content { min-width: 0; }
.legal-content section { scroll-margin-top: 88px; padding: 0 0 40px; margin: 0 0 40px; border-bottom: 1px solid var(--line); }
.legal-content section:last-child { border-bottom: 0; }
.legal-content h2 { margin: 0 0 16px; font-family: "Iowan Old Style", "Palatino Linotype", serif; font-size: clamp(25px, 3vw, 34px); line-height: 1.18; letter-spacing: 0; }
.legal-content h3 { margin: 26px 0 8px; font-size: 16px; letter-spacing: 0; }
.legal-content p, .legal-content li { color: #34485e; }
.legal-content ul, .legal-content ol { padding-left: 22px; }
.legal-content li + li { margin-top: 7px; }
.legal-note { padding: 14px 16px; border-left: 4px solid var(--green); background: #eaf5f1; color: #234b40 !important; }
.legal-warning { border-left-color: var(--gold); background: #fbf3e3; color: #5b451e !important; }
.legal-danger { border-left-color: var(--danger); background: #faecee; color: #612c31 !important; }

.data-table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 650px; font-size: 12px; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--navy); background: #edf3f7; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td { color: #34485e; }

.deletion-steps { counter-reset: deletion-step; display: grid; gap: 0; margin: 24px 0; padding: 0; list-style: none; }
.deletion-steps li { counter-increment: deletion-step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.deletion-steps li::before { content: counter(deletion-step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--green); font-weight: 800; }
.deletion-steps strong { display: block; color: var(--ink); }
.deletion-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.legal-button { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 16px; border: 1px solid var(--navy); border-radius: 6px; color: #fff; background: var(--navy); font-weight: 800; text-decoration: none; }
.legal-button:hover { color: #fff; background: var(--green); border-color: var(--green); }
.legal-button.secondary { color: var(--navy); background: transparent; }
.legal-button.secondary:hover { color: var(--green); background: #eaf5f1; }

.legal-footer { padding: 32px 20px; border-top: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.legal-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 28px; width: min(1140px, 100%); margin: 0 auto; font-size: 12px; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }

@media (max-width: 800px) {
  .legal-topnav a:not(.legal-app-link) { display: none; }
  .legal-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 34px; }
  .legal-toc { position: static; display: flex; flex-wrap: wrap; gap: 5px 12px; }
  .legal-toc strong { width: 100%; }
  .legal-toc a { padding: 2px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .legal-topbar { min-height: 56px; padding-inline: 14px; }
  .legal-brand { font-size: 17px; }
  .legal-brand img { width: 32px; height: 32px; }
  .legal-topnav .legal-app-link { padding: 6px 9px; font-size: 11px; }
  .legal-hero { padding-inline: 16px; }
  .legal-layout { width: min(100% - 28px, 1140px); }
  .legal-content section { padding-bottom: 30px; margin-bottom: 30px; }
}
