:root {
  color-scheme: dark;
  --ink: #07111f;
  --ink-deep: #040a13;
  --panel: #0d1b2e;
  --panel-light: #122640;
  --line: rgba(154, 191, 223, 0.18);
  --line-strong: rgba(154, 191, 223, 0.34);
  --text: #edf6ff;
  --muted: #9bb0c6;
  --blue: #58b8ff;
  --blue-deep: #0c76c9;
  --yellow: #ffc857;
  --green: #6ee7b7;
  --red: #ff8b8b;
  --radius: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--ink-deep);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  background-image:
    linear-gradient(rgba(102, 160, 201, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 160, 201, 0.055) 1px, transparent 1px);
  background-size: 40px 40px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 78% 8%, rgba(22, 119, 188, 0.17), transparent 32rem);
  z-index: -1;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.site-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 10, 19, 0.86);
  backdrop-filter: blur(16px);
}
.nav { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; }
.brand span { font-size: 1.05rem; }
.nav-links { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 0.94rem; }
.nav-links a { text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

.hero { padding: 92px 0 80px; position: relative; overflow: hidden; }
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: 84px;
  width: 410px;
  height: 410px;
  border: 1px solid rgba(88, 184, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(88, 184, 255, 0.025), 0 0 0 64px rgba(88, 184, 255, 0.018);
  pointer-events: none;
}
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--yellow); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; letter-spacing: 0.04em; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 200, 87, 0.11); }
h1, h2, h3 { margin: 0; letter-spacing: -0.045em; line-height: 1.08; }
h1 { max-width: 760px; margin-top: 20px; font-size: clamp(3.2rem, 8vw, 6.4rem); }
h1 span { color: var(--blue); }
.lede { max-width: 650px; margin: 28px 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.button-primary { color: #03101b; background: var(--blue); }
.button-primary:hover { background: #80caff; }
.button-secondary { color: var(--text); border-color: var(--line-strong); background: rgba(13, 27, 46, 0.54); }
.button-secondary:hover { border-color: var(--blue); background: rgba(88, 184, 255, 0.1); }
.hero-note { margin-top: 18px; color: #7f96ad; font-size: 0.86rem; }

.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.section-heading p { max-width: 420px; margin: 0; color: var(--muted); }

.release-strip { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.release-main, .release-side { background: rgba(13, 27, 46, 0.92); padding: 28px; }
.release-main { position: relative; }
.release-main::before { content: "v4.1.1"; position: absolute; right: 26px; top: 22px; color: rgba(88, 184, 255, 0.16); font: 700 clamp(3rem, 8vw, 6rem)/1 ui-monospace, monospace; letter-spacing: -0.1em; }
.release-kicker { position: relative; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; }
.release-main h3 { position: relative; max-width: 430px; margin-top: 20px; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.release-main p { position: relative; max-width: 520px; color: var(--muted); }
.release-side { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; border-left: 1px solid var(--line); }
.status-line { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.status-line strong { color: var(--green); font-weight: 600; }
.side-link { color: var(--text); font-weight: 700; text-decoration: none; }
.side-link:hover { color: var(--blue); }

.download-list { border-top: 1px solid var(--line); }
.download-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 0.6fr auto; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.download-name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.file-mark { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--blue); font: 700 0.72rem ui-monospace, monospace; }
.download-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.download-name small, .download-meta { color: var(--muted); font-size: 0.84rem; }
.download-meta { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.download-action { color: var(--blue); font-weight: 700; text-decoration: none; white-space: nowrap; }
.download-action:hover { color: #a0d9ff; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature { min-height: 210px; padding: 26px; background: rgba(13, 27, 46, 0.82); }
.feature-index { color: var(--yellow); font: 0.8rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.feature h3 { margin-top: 40px; font-size: 1.2rem; letter-spacing: -0.02em; }
.feature p { margin: 12px 0 0; color: var(--muted); font-size: 0.94rem; }

.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding: 70px 0 96px; }
.docs-sidebar { position: sticky; top: 104px; align-self: start; }
.docs-sidebar p { margin: 0 0 16px; color: var(--yellow); font: 0.76rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.docs-sidebar a { display: block; padding: 7px 0; color: var(--muted); font-size: 0.92rem; text-decoration: none; }
.docs-sidebar a:hover { color: var(--text); }
.docs-content { min-width: 0; }
.docs-content > header { padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.docs-content h1 { max-width: 760px; font-size: clamp(2.8rem, 7vw, 5.5rem); }
.docs-content h2 { margin: 64px 0 20px; font-size: clamp(1.65rem, 3vw, 2.3rem); }
.docs-content h3 { margin: 28px 0 10px; font-size: 1.12rem; letter-spacing: -0.02em; }
.docs-content p, .docs-content li { max-width: 760px; color: var(--muted); }
.docs-content strong { color: var(--text); }
.docs-content ul, .docs-content ol { padding-left: 1.2rem; }
.docs-content li + li { margin-top: 9px; }
.callout { margin: 24px 0; padding: 18px 20px; border-left: 3px solid var(--yellow); background: rgba(255, 200, 87, 0.08); color: #e8d5a3; }
.callout strong { color: var(--yellow); }
.code { overflow-x: auto; margin: 18px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: #050d18; color: #bfe5ff; font: 0.87rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 540px; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.9rem; }
th { color: var(--text); background: rgba(18, 38, 64, 0.76); font-weight: 700; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
details { max-width: 760px; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 17px 0; color: var(--text); font-weight: 700; }
details p { margin: 0 0 18px; }

.site-footer { padding: 30px 0 38px; border-top: 1px solid var(--line); color: #71869d; font-size: 0.84rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

@media (max-width: 760px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .nav { min-height: 66px; }
  .nav-links { gap: 14px; font-size: 0.84rem; }
  .hero { padding: 66px 0 58px; }
  h1 { font-size: clamp(2.85rem, 15vw, 5rem); }
  .hero::after { right: -230px; top: 180px; width: 360px; height: 360px; }
  .release-strip, .feature-grid { grid-template-columns: 1fr; }
  .release-side { border-left: 0; border-top: 1px solid var(--line); }
  .download-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .download-meta { grid-column: 1 / 2; padding-left: 52px; margin-top: -12px; }
  .download-action { grid-column: 2; grid-row: 1 / span 2; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 14px; }
  .docs-layout { display: block; padding-top: 46px; }
  .docs-sidebar { position: static; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 48px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .docs-sidebar p { flex-basis: 100%; margin-bottom: 0; }
  .docs-sidebar a { padding: 0; }
  .footer-inner { display: block; }
  .footer-inner a { display: inline-block; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
