* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #090c11;
  --panel: #0f141c;
  --panel-hover: #131a23;
  --text: #f4f6f8;
  --muted: #98a4b2;
  --line: #202936;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 84px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
}

.brand h1 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -.01em;
}

.brand p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero {
  max-width: 700px;
  margin-bottom: 44px;
}

.hero h2,
.document-header h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  display: block;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  border-color: #344051;
  background: var(--panel-hover);
  outline: none;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 23px;
  letter-spacing: -.02em;
}

.card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.card span {
  font-size: 13px;
  font-weight: 700;
}

.document-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 38px;
}

.back {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 13px;
}

.back:hover { color: var(--text); }

.document-header h1 {
  font-size: clamp(36px, 7vw, 54px);
  margin-bottom: 6px;
}

.muted,
.updated {
  color: var(--muted);
}

.updated {
  margin: 15px 0 0;
  font-size: 12px;
}

.document {
  max-width: 760px;
}

.document h2 {
  margin: 38px 0 10px;
  font-size: 20px;
  letter-spacing: -.02em;
}

.document p,
.document li {
  color: #c5ccd5;
  font-size: 15px;
}

.document ul {
  padding-left: 22px;
}

.return {
  margin-top: 24px !important;
}

.return a:hover { color: var(--muted); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 42px;
  margin-top: 64px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer nav {
  display: flex;
  gap: 16px;
}

footer a:hover { color: var(--text); }

@media (max-width: 700px) {
  .container {
    width: min(100% - 28px, 920px);
    padding-top: 28px;
  }

  .brand { margin-bottom: 54px; }
  .cards { grid-template-columns: 1fr; }

  .card { padding: 23px; }

  footer {
    flex-direction: column;
  }

  footer nav {
    flex-direction: column;
    gap: 8px;
  }
}
