:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #526070;
  --line: #d7dde5;
  --surface: #f7f9fb;
  --white: #ffffff;
  --blue: #155e75;
  --green: #166534;
  --gold: #a16207;
  --red: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

a,
button {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  font-weight: 800;
  transform: translateY(calc(-100% - 16px));
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.topbar a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.legal-page {
  width: min(840px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.legal-page h1 {
  margin: 0 0 18px;
  font-size: 2.7rem;
  line-height: 1.05;
}

.legal-page h2 {
  margin: 34px 0 12px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
}

.legal-page a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--blue);
  font-weight: 700;
}

.legal-page hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.legal-page table {
  display: block;
  overflow-x: auto;
  margin: 16px 0;
  border-collapse: collapse;
}

.legal-page th,
.legal-page td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  vertical-align: top;
}

.legal-page th {
  background: var(--surface);
  color: var(--ink);
}

.legal-page blockquote {
  margin: 16px 0;
  padding: 4px 16px;
  border-left: 4px solid var(--gold);
  background: var(--surface);
}

.legal-page pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  h1 {
    font-size: 3.45rem;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 540px) {
  h1 {
    font-size: 2.55rem;
  }

  .topbar nav,
  .footer-inner,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
  }
}
