:root {
  --blue: #1b63c6;
  --teal: #12a3a0;
  --green: #7cc142;
  --bg: #f6f9fb;
  --surface: #ffffff;
  --text: #14222e;
  --muted: #55677a;
  --line: #dde6ee;
  --link: #1257b0;
  --grad: linear-gradient(135deg, var(--blue) 0%, var(--teal) 55%, var(--green) 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d151c;
    --surface: #15202a;
    --text: #e8eff5;
    --muted: #9db0c1;
    --line: #26343f;
    --link: #6fb6ff;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.65 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Home */

.hero {
  background: var(--grad);
  color: #fff;
  padding: 72px 0 80px;
}

.hero img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 28px 0 14px;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero p {
  max-width: 640px;
  margin: 0;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.94);
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
  color: #124a96;
}

.btn.ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.8);
}

.btn:focus-visible {
  outline-color: #fff;
}

.section {
  padding: 56px 0;
}

.section h2 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.section > .wrap > p.lead {
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 28px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.alt .card {
  background: var(--bg);
}

/* Legal documents */

.doc {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.doc h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.doc .meta {
  color: var(--muted);
  margin: 0 0 28px;
}

.doc h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 44px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}

.doc h3 {
  font-size: 1.08rem;
  margin: 28px 0 6px;
  scroll-margin-top: 16px;
}

.doc p,
.doc li {
  overflow-wrap: break-word;
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li {
  margin: 6px 0;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
}

.toc strong {
  display: block;
  margin-bottom: 6px;
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  break-inside: avoid;
}

.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0;
}

.note p {
  margin: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  background: var(--surface);
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  font-weight: 650;
  background: var(--bg);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.93rem;
  padding: 28px 0 36px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }

  .hero {
    padding: 48px 0 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
