:root {
  color-scheme: light dark;
  --ink: #0f172a;
  --muted: #667085;
  --line: #e2e7f3;
  --paper: #fafbff;
  --surface: #ffffff;
  --surface-strong: #f4f6fc;
  --accent: #4b39ff;
  --accent-strong: #3324c8;
  --accent-soft: #f0edff;
  --blue: #1667b7;
  --blue-soft: #eff6ff;
  --green: #168a4a;
  --shadow: 0 18px 48px rgba(191, 200, 228, 0.45);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7ecf2;
  --muted: #c0cad4;
  --line: #3a4652;
  --paper: #0f141a;
  --surface: #171d24;
  --surface-strong: #27313a;
  --accent: #b8d6ff;
  --accent-strong: #d8e8ff;
  --accent-soft: #1b3554;
  --blue: #aecbe2;
  --blue-soft: #21384c;
  --green: #5bd58e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e7ecf2;
    --muted: #c0cad4;
    --line: #3a4652;
    --paper: #0f141a;
    --surface: #171d24;
    --surface-strong: #27313a;
    --accent: #b8d6ff;
    --accent-strong: #d8e8ff;
    --accent-soft: #1b3554;
    --blue: #aecbe2;
    --blue-soft: #21384c;
    --green: #5bd58e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 22%, transparent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  border-radius: 8px;
  padding: 9px 12px;
  color: inherit;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
}

main {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

main > header {
  position: relative;
  margin-bottom: 24px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

main > header::before {
  content: "";
  position: absolute;
  top: 30px;
  right: 30px;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: url("./subtrack-logo.png") center / cover no-repeat;
  opacity: 0.9;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 12px;
  font-size: 3rem;
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.16rem;
  line-height: 1.3;
}

p {
  margin-bottom: 14px;
}

ul {
  margin: 0;
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

.updated {
  display: inline-flex;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.summary {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

section {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0;
  padding: 22px;
  background: var(--surface);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--line) 24%, transparent);
}

section h2 {
  color: var(--ink);
}

section p,
section li {
  color: var(--muted);
}

footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

footer p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

footer p:last-child a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

footer p:last-child a:hover,
footer p:last-child a:focus-visible {
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
}

@media (max-width: 720px) {
  .nav,
  main {
    width: min(100% - 28px, 920px);
  }

  .nav-links {
    display: none;
  }

  main {
    padding-top: 28px;
  }

  main > header {
    padding: 24px;
  }

  main > header::before {
    width: 44px;
    height: 44px;
    top: 22px;
    right: 22px;
    opacity: 0.62;
  }

  h1 {
    font-size: 2.3rem;
  }

  .summary {
    font-size: 1rem;
  }
}
