:root {
  color-scheme: light;
  --ink: #071238;
  --muted: #626a8e;
  --violet: #5a2ce6;
  --violet-dark: #3f18b9;
  --pink: #e83e8c;
  --line: #ddd5f5;
  --surface: #ffffff;
  --soft: #f4f0ff;
  --blue-soft: #eef7ff;
  --green-soft: #effaf3;
  --warning-soft: #fff7e6;
  --shadow: 0 18px 48px rgba(51, 29, 112, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f7f5ff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--violet);
  font-weight: 750;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--violet-dark);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(221, 213, 245, 0.88);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1040px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--violet);
}

main {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.document {
  width: min(820px, 100%);
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.06;
}

h2 {
  margin: 38px 0 10px;
  font-size: 23px;
  line-height: 1.25;
}

h3 {
  margin: 24px 0 8px;
  font-size: 17px;
}

p,
li {
  color: var(--muted);
  font-size: 15px;
}

.lead {
  max-width: 720px;
  margin: 15px 0 0;
  font-size: 17px;
}

.updated {
  display: inline-flex;
  margin-top: 18px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--violet-dark);
  background: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

.content {
  padding: 6px 10px 0;
}

.content section {
  scroll-margin-top: 88px;
}

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

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

.toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 26px;
  margin: 0;
  padding-left: 20px;
}

.toc li,
.toc a {
  font-size: 13px;
}

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

.notice {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--violet);
  border-radius: 6px;
  background: var(--soft);
}

.notice.warning {
  border-color: #c98900;
  background: var(--warning-soft);
}

.notice.safe {
  border-color: #198754;
  background: var(--green-soft);
}

.notice p {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.link-card {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
}

.link-card:hover {
  border-color: #b9a8ee;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(51, 29, 112, 0.1);
}

.link-card .icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 8px;
  color: var(--violet);
  background: var(--soft);
  font-weight: 900;
}

.link-card h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.link-card p {
  margin: 0;
  font-size: 13px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 11px 18px;
  border: 1px solid var(--violet);
  border-radius: 8px;
  color: #fff;
  background: var(--violet);
  text-decoration: none;
}

.button:hover {
  color: #fff;
  background: var(--violet-dark);
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

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

th {
  color: var(--ink);
  background: var(--soft);
}

td {
  color: var(--muted);
}

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

.contact-card {
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.contact-card h2 {
  margin-top: 0;
}

.footer {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer p {
  margin: 0;
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  font-size: 12px;
  text-decoration: none;
}

@media (max-width: 760px) {
  .nav {
    min-height: 62px;
  }

  .nav-links a:not(.mobile-keep) {
    display: none;
  }

  main {
    padding-top: 24px;
  }

  .hero {
    padding: 24px 20px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    min-height: 0;
  }

  .link-card .icon {
    margin-bottom: 16px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .content {
    padding-inline: 2px;
  }

  .footer {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 12px;
  }
}
