:root {
  color-scheme: dark;
  --bg: #08111f;
  --panel: #101d30;
  --panel-soft: #13243b;
  --text: #eef5ff;
  --muted: #aebdd0;
  --line: #29425f;
  --accent: #49c6e5;
  --accent-strong: #7ee7ff;
  --warm: #ffc857;
  --success: #69d49b;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 10%, rgba(73, 198, 229, 0.13), transparent 34rem),
    linear-gradient(155deg, #08111f 0%, #0a1526 48%, #07101d 100%);
}

a {
  color: var(--accent-strong);
}

a:hover,
a:focus-visible {
  color: #ffffff;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 1.35rem 1.1rem;
  border-right: 1px solid var(--line);
  background: rgba(7, 16, 29, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 3rem;
  height: 3rem;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand-copy span {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.77rem;
}

.nav-toggle {
  width: 100%;
  margin: 0 0 0.7rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
  text-align: left;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent);
}

.nav-list {
  display: grid;
  gap: 0.38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 0.62rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  color: var(--muted);
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list a[aria-current="page"] {
  border-color: var(--line);
  color: var(--text);
  background: var(--panel);
}

.nav-list a[aria-current="page"] {
  border-left: 0.24rem solid var(--accent);
}

.sidebar-meta {
  margin-top: 1.4rem;
  padding: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.55;
}

.content-column {
  width: min(100%, 82rem);
  padding: 2.4rem clamp(1rem, 4vw, 4.6rem) 1.8rem;
}

main {
  min-height: calc(100vh - 9rem);
}

.hero {
  padding: clamp(1.4rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background:
    linear-gradient(135deg, rgba(73, 198, 229, 0.14), transparent 48%),
    var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.16;
}

h1 {
  max-width: 18ch;
  margin-bottom: 0.85rem;
  font-size: clamp(2.25rem, 6vw, 4.7rem);
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  margin-bottom: 0.42rem;
  font-size: 1.08rem;
}

.lead {
  max-width: 63rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0.7rem;
  color: #04111a;
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  color: var(--text);
  background: transparent;
}

.button:hover,
.button:focus-visible {
  color: #04111a;
  background: var(--accent-strong);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  color: var(--text);
  background: var(--panel-soft);
}

.section {
  margin-top: 1.2rem;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(16, 29, 48, 0.88);
}

.section > :last-child,
.card > :last-child,
.notice > :last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0.85rem;
}

.card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--panel-soft);
}

.card p,
.section p,
.section li,
.notice p {
  color: var(--muted);
  line-height: 1.65;
}

.card .metric {
  display: block;
  margin: 0.15rem 0 0.3rem;
  color: var(--warm);
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.download-card {
  display: flex;
  min-height: 14rem;
  flex-direction: column;
}

.download-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.notice {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 0.28rem solid var(--success);
  border-radius: 0.4rem;
  background: rgba(105, 212, 155, 0.08);
}

.warning {
  border-left-color: var(--warm);
  background: rgba(255, 200, 87, 0.08);
}

code,
pre,
.hash {
  font-family: Consolas, "Courier New", monospace;
}

code {
  color: #d8f7ff;
}

pre {
  max-width: 100%;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: #dff8ff;
  background: #07101d;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hash {
  display: block;
  color: var(--accent-strong);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

dl {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
  gap: 0.55rem 1rem;
  margin: 0;
}

dt {
  color: var(--text);
  font-weight: 700;
}

dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.history {
  max-height: 34rem;
  overflow-y: auto;
}

footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.site-shell.nav-collapsed {
  grid-template-columns: 5.2rem minmax(0, 1fr);
}

.nav-collapsed .sidebar {
  padding-inline: 0.65rem;
}

.nav-collapsed .brand {
  justify-content: center;
}

.nav-collapsed .brand-copy,
.nav-collapsed .nav-label,
.nav-collapsed .sidebar-meta {
  display: none;
}

.nav-collapsed .nav-toggle,
.nav-collapsed .nav-list a {
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.nav-collapsed .nav-list a {
  padding-inline: 0.35rem;
  font-size: 0;
}

.nav-collapsed .nav-list a::first-letter {
  font-size: 1rem;
}

@media (max-width: 760px) {
  .site-shell,
  .site-shell.nav-collapsed {
    display: block;
  }

  .sidebar {
    position: relative;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-collapsed .brand-copy {
    display: block;
  }

  .nav-collapsed .brand {
    justify-content: flex-start;
  }

  .nav-collapsed .nav-list,
  .nav-collapsed .sidebar-meta {
    display: none;
  }

  .nav-collapsed .nav-label {
    display: inline;
  }

  .content-column {
    padding: 1rem;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3.4rem);
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
