:root {
  --bg: #f6f7fb;
  --ink: #0f172a;
  --ink2: #334155;
  --muted: #64748b;
  --muted2: #94a3b8;

  --card: rgba(255, 255, 255, 0.92);
  --cardSolid: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --border2: rgba(15, 23, 42, 0.07);

  --accent: #1d4ed8;
  --accent2: #0ea5e9;
  --accentSoft: rgba(29, 78, 216, 0.12);

  --good: #15803d;
  --danger: #b91c1c;
  --warning: #b45309;

  --shadow-sm: 0 1px 0 rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 16px 44px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.18);

  --radius: 18px;
  --radius-sm: 14px;
  --radius-lg: 28px;

  --focusRing: 0 0 0 3px rgba(29, 78, 216, 0.22);

  --grid: rgba(15, 23, 42, 0.045);
  --glowA: rgba(29, 78, 216, 0.18);
  --glowB: rgba(14, 165, 233, 0.14);
  --glowC: rgba(21, 128, 61, 0.08);

  --font-display: "Space Grotesk", "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", "Consolas", monospace;
}

[data-theme='dark'] {
  --bg: #070b14;
  --ink: #e5e7eb;
  --ink2: #cbd5e1;
  --muted: #94a3b8;
  --muted2: rgba(148, 163, 184, 0.76);

  --card: rgba(255, 255, 255, 0.06);
  --cardSolid: rgba(255, 255, 255, 0.06);
  --border: rgba(148, 163, 184, 0.20);
  --border2: rgba(148, 163, 184, 0.14);

  --accent: #60a5fa;
  --accent2: #38bdf8;
  --accentSoft: rgba(56, 189, 248, 0.14);

  --good: #4ade80;
  --danger: #f87171;
  --warning: #fdba74;

  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 52px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 24px 70px rgba(0, 0, 0, 0.64);
  --shadow-lg: 0 32px 92px rgba(0, 0, 0, 0.74);

  --focusRing: 0 0 0 3px rgba(56, 189, 248, 0.22);

  --grid: rgba(148, 163, 184, 0.08);
  --glowA: rgba(96, 165, 250, 0.20);
  --glowB: rgba(56, 189, 248, 0.16);
  --glowC: rgba(74, 222, 128, 0.10);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 85% -10%, var(--glowA), transparent 58%),
    radial-gradient(900px 600px at 10% 0%, var(--glowB), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, var(--glowC), transparent 55%),
    repeating-linear-gradient(0deg, var(--grid) 0, var(--grid) 1px, transparent 1px, transparent 28px),
    repeating-linear-gradient(90deg, var(--grid) 0, var(--grid) 1px, transparent 1px, transparent 28px);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: var(--font-mono);
}

pre {
  margin: 0;
}

.mono {
  font-family: var(--font-mono);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container.narrow,
.narrow {
  max-width: 760px;
}

.page {
  padding: 1.75rem 0 3.5rem;
}

.skip {
  position: absolute;
  top: 0.75rem;
  left: -9999px;
  padding: 0.65rem 0.9rem;
  background: var(--cardSolid);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

.skip:focus {
  left: 1rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 247, 251, 0.72);
  border-bottom: 1px solid var(--border2);
  backdrop-filter: blur(14px);
}

[data-theme='dark'] .topbar {
  background: rgba(7, 11, 20, 0.72);
}

.topbar__inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  box-shadow: var(--shadow-md);
  flex: 0 0 auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 760;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__tag {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52ch;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink2);
}

.nav a:hover {
  text-decoration: none;
  background: rgba(15, 23, 42, 0.05);
}

[data-theme='dark'] .nav a:hover {
  background: rgba(148, 163, 184, 0.12);
}

.nav a.active {
  background: var(--accentSoft);
  color: var(--ink);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar__actions form {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 720;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

[data-theme='dark'] .btn {
  background: rgba(255, 255, 255, 0.04);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(15, 23, 42, 0.18);
  text-decoration: none;
}

[data-theme='dark'] .btn:hover {
  border-color: rgba(148, 163, 184, 0.26);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focusRing);
}

.btn--small {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.btn--primary {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
}

.btn--primary:hover {
  border-color: transparent;
  filter: brightness(1.03);
}

.btn--ghost {
  background: transparent;
}

.btn--ghost:hover {
  box-shadow: none;
  transform: none;
  background: rgba(15, 23, 42, 0.05);
}

[data-theme='dark'] .btn--ghost:hover {
  background: rgba(148, 163, 184, 0.12);
}

.btn--danger {
  color: var(--danger);
  background: rgba(185, 28, 28, 0.10);
  border-color: rgba(185, 28, 28, 0.22);
}

.btn--danger:hover {
  box-shadow: none;
  transform: none;
  background: rgba(185, 28, 28, 0.16);
  border-color: rgba(185, 28, 28, 0.28);
}

.input,
.textarea,
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

[data-theme='dark'] .input,
[data-theme='dark'] .textarea,
[data-theme='dark'] input,
[data-theme='dark'] textarea,
[data-theme='dark'] select {
  background: rgba(255, 255, 255, 0.04);
}

.textarea,
textarea {
  min-height: 120px;
  resize: vertical;
}

.textarea--mono {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.45;
  tab-size: 2;
  font-variant-ligatures: none;
}

.input:focus,
.textarea:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow: var(--focusRing);
  background: var(--cardSolid);
}

[data-theme='dark'] .input:focus,
[data-theme='dark'] .textarea:focus,
[data-theme='dark'] input:focus,
[data-theme='dark'] textarea:focus,
[data-theme='dark'] select:focus {
  border-color: rgba(56, 189, 248, 0.48);
  background: rgba(255, 255, 255, 0.06);
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--ink2);
  margin-bottom: 0.35rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.help {
  font-size: 0.85rem;
}

.form {
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 720;
  user-select: none;
}

.check input {
  width: auto;
  margin: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 760;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.notice {
  border: 1px solid var(--border);
  background: var(--accentSoft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.notice--error {
  background: rgba(185, 28, 28, 0.10);
  border-color: rgba(185, 28, 28, 0.22);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: rgba(15, 23, 42, 0.04);
  font-weight: 760;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--ink2);
  text-decoration: none;
}

.pill:hover {
  text-decoration: none;
}

[data-theme='dark'] .pill {
  background: rgba(148, 163, 184, 0.10);
}

.pill--accent {
  background: var(--accentSoft);
  border-color: rgba(29, 78, 216, 0.18);
  color: var(--ink);
}

[data-theme='dark'] .pill--accent {
  border-color: rgba(56, 189, 248, 0.22);
}

.pill--soft {
  background: rgba(15, 23, 42, 0.03);
}

[data-theme='dark'] .pill--soft {
  background: rgba(148, 163, 184, 0.10);
}

.pill--lock {
  background: rgba(185, 28, 28, 0.10);
  border-color: rgba(185, 28, 28, 0.22);
  color: var(--danger);
}

.pill--good {
  background: rgba(21, 128, 61, 0.10);
  border-color: rgba(21, 128, 61, 0.22);
  color: var(--good);
}

.hero {
  padding: 1.25rem 0 0.25rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin: 0.9rem 0 0;
  font-family: var(--font-display);
  font-weight: 820;
  letter-spacing: -0.03em;
  font-size: clamp(2.2rem, 4.2vw, 3.35rem);
  line-height: 1.05;
}

.hero__lead {
  margin: 0.85rem 0 0;
  font-size: 1.05rem;
  color: var(--ink2);
  max-width: 62ch;
}

.hero__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.hero__bullets {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--ink2);
}

.bullet svg {
  margin-top: 0.15rem;
  color: var(--accent);
  flex: 0 0 auto;
}

.hero-card {
  border-radius: var(--radius-lg);
}

.hero-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-card__title {
  font-family: var(--font-display);
  font-weight: 780;
  letter-spacing: -0.02em;
}

.hero-card__badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.kpi {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.55);
}

[data-theme='dark'] .kpi {
  background: rgba(255, 255, 255, 0.04);
}

.kpi__value {
  font-family: var(--font-display);
  font-weight: 820;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.kpi__label {
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.catalog {
  margin-top: 2.25rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 780;
  letter-spacing: -0.02em;
  font-size: 1.4rem;
}

.section-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.search {
  min-width: 260px;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid--cards {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 1.25rem;
}

.product {
  padding: 1.05rem;
  border-radius: var(--radius);
}

.product__media {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border2);
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.10) 0%, rgba(14, 165, 233, 0.07) 60%, rgba(21, 128, 61, 0.05) 100%);
}

.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease;
}

.product:hover .product__media img {
  transform: scale(1.03);
}

.product__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(15, 23, 42, 0.45);
  font-family: var(--font-display);
  font-weight: 820;
  letter-spacing: 0.12em;
}

[data-theme='dark'] .product__fallback {
  color: rgba(226, 232, 240, 0.50);
}

.product__body {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.6rem;
}

.product__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 820;
  letter-spacing: -0.02em;
  line-height: 1.18;
  font-size: 1.15rem;
}

.product__title a {
  color: inherit;
}

.product__title a:hover {
  text-decoration: none;
  color: var(--accent);
}

.product__desc {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.empty {
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.55);
}

[data-theme='dark'] .empty {
  background: rgba(255, 255, 255, 0.03);
}

.product-hero {
  margin-top: 1.25rem;
}

.product-hero__grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1rem;
  align-items: start;
}

.product-hero__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-weight: 840;
  letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 3.6vw, 2.65rem);
  line-height: 1.08;
}

.product-hero__byline {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.features {
  display: grid;
  gap: 0.55rem;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--ink2);
}

.feature__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 0.35rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  flex: 0 0 auto;
}

.media-card {
  padding: 1.05rem;
}

.media-card__frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.55);
}

[data-theme='dark'] .media-card__frame {
  background: rgba(255, 255, 255, 0.03);
}

.media-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 860;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.40);
}

[data-theme='dark'] .media-card__fallback {
  color: rgba(226, 232, 240, 0.48);
}

.thumbs {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.thumb {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border2);
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.55);
}

[data-theme='dark'] .thumb {
  background: rgba(255, 255, 255, 0.03);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.downloads {
  margin-top: 2rem;
}

.downloads__grid {
  display: grid;
  grid-template-columns: 1.55fr 0.45fr;
  gap: 1rem;
  align-items: start;
}

.release-grid {
  display: grid;
  gap: 0.9rem;
}

.release {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.55);
}

[data-theme='dark'] .release {
  background: rgba(255, 255, 255, 0.03);
}

.release__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.release__title {
  font-family: var(--font-display);
  font-weight: 820;
  letter-spacing: -0.02em;
}

.release__meta {
  margin-top: 0.15rem;
  font-size: 0.875rem;
}

.release__body {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.hashline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hashline code {
  font-size: 0.82rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 0.45rem 0.6rem;
  word-break: break-all;
}

[data-theme='dark'] .hashline code {
  background: rgba(148, 163, 184, 0.10);
}

.release__form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.release__form .input {
  flex: 1 1 220px;
}

.verify {
  display: grid;
  gap: 0.85rem;
}

.verify__title {
  font-weight: 760;
  color: var(--ink2);
  margin-bottom: 0.35rem;
}

.verify pre {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: rgba(15, 23, 42, 0.04);
  padding: 0.85rem;
  overflow-x: auto;
}

[data-theme='dark'] .verify pre {
  background: rgba(148, 163, 184, 0.10);
}

.verify code {
  font-size: 0.85rem;
}

.archive {
  display: grid;
  gap: 0.75rem;
}

.archive__item {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

[data-theme='dark'] .archive__item {
  background: rgba(255, 255, 255, 0.03);
}

.archive__item summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.archive__item summary::-webkit-details-marker {
  display: none;
}

.archive__item summary::marker {
  content: '';
}

.archive__item[open] summary {
  border-bottom: 1px solid var(--border2);
}

.archive__summary {
  font-weight: 760;
  color: var(--ink2);
}

.archive__body {
  padding: 1rem;
  display: grid;
  gap: 0.6rem;
}

.docs-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 94px;
}

.toc__links {
  display: grid;
  gap: 0.55rem;
}

.toc__link {
  color: var(--ink2);
  font-weight: 650;
  font-size: 0.9rem;
}

.toc__link:hover {
  color: var(--accent);
  text-decoration: none;
}

.md {
  line-height: 1.75;
}

.md h1,
.md h2,
.md h3,
.md h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 1.35rem 0 0.65rem;
}

.md h1 { font-size: 1.75rem; }
.md h2 { font-size: 1.35rem; }
.md h3 { font-size: 1.1rem; }

.md p {
  margin: 0 0 1rem;
}

.md ul,
.md ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.md li {
  margin-bottom: 0.35rem;
}

.md code {
  font-size: 0.92em;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 0.12rem 0.35rem;
}

[data-theme='dark'] .md code {
  background: rgba(148, 163, 184, 0.10);
}

.md pre {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: rgba(15, 23, 42, 0.04);
  overflow-x: auto;
}

[data-theme='dark'] .md pre {
  background: rgba(148, 163, 184, 0.10);
}

.md pre code {
  border: none;
  background: transparent;
  padding: 0;
}

.md blockquote {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid rgba(29, 78, 216, 0.45);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accentSoft);
  color: var(--ink2);
}

.md hr {
  border: none;
  height: 1px;
  background: var(--border2);
  margin: 1.35rem 0;
}

.md img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.55);
}

[data-theme='dark'] .md img {
  background: rgba(255, 255, 255, 0.03);
}

.md table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.md th,
.md td {
  text-align: left;
  padding: 0.75rem 0.7rem;
  border-bottom: 1px solid var(--border2);
}

.md th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.preview {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  padding: 1rem;
  min-height: 96px;
}

[data-theme='dark'] .preview {
  background: rgba(255, 255, 255, 0.03);
}

.md-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.md-toolbar__sep {
  width: 1px;
  height: 22px;
  background: var(--border2);
  display: inline-block;
}

.md-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.md-split--tall .md-split__input {
  min-height: 320px;
}

.md-split__preview {
  min-height: 200px;
  max-height: 520px;
  overflow: auto;
}

.md-help {
  margin-top: 0.75rem;
}

.md-help summary {
  cursor: pointer;
  font-weight: 720;
  color: var(--ink2);
}

.md-help__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.md-help pre {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: rgba(15, 23, 42, 0.04);
  padding: 0.85rem;
  overflow-x: auto;
}

[data-theme='dark'] .md-help pre {
  background: rgba(148, 163, 184, 0.10);
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.95rem 0.75rem;
  border-bottom: 1px solid var(--border2);
  text-align: left;
  vertical-align: top;
}

.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-head__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.page-title {
  margin: 0.6rem 0 0;
  font-family: var(--font-display);
  font-weight: 860;
  letter-spacing: -0.03em;
  font-size: 2rem;
  line-height: 1.06;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kpi-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

[data-theme='dark'] .kpi-card {
  background: rgba(255, 255, 255, 0.03);
}

.admin-split {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
  align-items: start;
}

.auth-card {
  padding: 1.5rem;
}

.error-card {
  max-width: 720px;
  margin: 2rem auto 0;
  text-align: center;
}

.error-card__icon {
  display: grid;
  place-items: center;
  color: var(--muted2);
}

.error-card__title {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-weight: 860;
  letter-spacing: -0.03em;
}

.error-card__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.footer {
  margin-top: 3.5rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.35);
}

[data-theme='dark'] .footer {
  background: rgba(255, 255, 255, 0.02);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.25rem;
}

.footer__name {
  font-family: var(--font-display);
  font-weight: 820;
  letter-spacing: -0.02em;
  font-size: 1.2rem;
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.footer__link {
  display: block;
  padding: 0.3rem 0;
  color: var(--ink2);
  font-weight: 650;
}

.footer__link:hover {
  text-decoration: none;
  color: var(--accent);
}

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 560ms cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero__grid,
  .product-hero__grid,
  .downloads__grid,
  .docs-grid,
  .admin-split {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

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

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

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

/* Blueprint Viewer */
.bpviewer {
  margin-top: 0.9rem;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #0b1020;
  overflow: hidden;
}

.bpviewer--compact .bpviewer__canvas {
  height: 420px;
}

.bpviewer__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.92);
}

.bpviewer__toolbarLeft,
.bpviewer__toolbarRight {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bpviewer__zoom {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.80);
}

.bpviewer__btn {
  border-color: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.92);
  background: rgba(15, 23, 42, 0.30);
}

.bpviewer__btn:hover {
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: none;
  transform: none;
}

.bpviewer__canvas {
  position: relative;
  height: min(66vh, 700px);
  overflow: hidden;
  cursor: grab;
  background:
    radial-gradient(800px 380px at 18% 8%, rgba(56, 189, 248, 0.15), transparent 62%),
    radial-gradient(900px 480px at 88% 12%, rgba(96, 165, 250, 0.13), transparent 60%),
    radial-gradient(900px 600px at 55% 120%, rgba(74, 222, 128, 0.07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.11) 0, rgba(148, 163, 184, 0.11) 1px, transparent 1px, transparent 28px),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.11) 0, rgba(148, 163, 184, 0.11) 1px, transparent 1px, transparent 28px);
}

.bpviewer__canvas.is-panning {
  cursor: grabbing;
}

.bpviewer__stage {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}

.bpviewer__overlay {
  position: absolute;
  inset: 0;
  display: none;
  padding: 0.9rem;
}

.bpviewer__wires {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bpwire {
  fill: none;
  stroke-width: 3;
  opacity: 0.92;
  stroke-linecap: round;
}

.bpviewer__nodes {
  position: absolute;
  inset: 0;
}

.bpnode {
  position: absolute;
  z-index: 3;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  color: rgba(226, 232, 240, 0.94);
}

.bpnode__header {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 780;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bpnode--event .bpnode__header {
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.48) 0%, rgba(15, 23, 42, 0.05) 65%);
}

.bpnode--function .bpnode__header {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.52) 0%, rgba(15, 23, 42, 0.05) 65%);
}

.bpnode--variable .bpnode__header {
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.45) 0%, rgba(15, 23, 42, 0.05) 65%);
}

.bpnode__body {
  position: relative;
}

.bppin {
  position: absolute;
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.84);
}

.bppin--in {
  left: 10px;
}

.bppin--out {
  right: 10px;
  flex-direction: row-reverse;
  text-align: right;
}

.bppin__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.55);
  flex: 0 0 auto;
}

.bppin__label {
  max-width: 120px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bpcomment {
  position: absolute;
  z-index: 1;
  border-radius: 14px;
  border: 1px dashed rgba(250, 204, 21, 0.42);
  background: rgba(250, 204, 21, 0.08);
  color: rgba(254, 243, 199, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.40);
}

.bpcomment__title {
  padding: 0.55rem 0.75rem;
  font-family: var(--font-display);
  font-weight: 780;
  letter-spacing: -0.01em;
  color: rgba(254, 243, 199, 0.96);
}

.bpknot {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.40);
}

.bpviewer__empty {
  padding: 1rem;
  color: rgba(226, 232, 240, 0.90);
}

@media (max-width: 640px) {
  .topbar__inner {
    flex-wrap: wrap;
    padding: 0.75rem 0;
  }

  .brand__tag {
    display: none;
  }

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

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

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

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