:root {
  color-scheme: dark;
  --bg: #080d13;
  --rail: #0d151e;
  --panel: #111b26;
  --panel-2: #142231;
  --text: #f3f7fb;
  --muted: #a8b8c7;
  --line: rgba(160, 190, 218, .22);
  --blue: #55a9ff;
  --green: #6ee7b7;
  --yellow: #f5c75b;
  --red: #ff7a8a;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

code,
pre,
textarea {
  font-family: "JetBrains Mono", Consolas, monospace;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 19, .94);
  backdrop-filter: blur(14px);
}

.brand,
.top-nav,
.hero-actions,
.portal-footer,
.community-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #051017;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.top-nav {
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.top-nav a,
.side-nav a,
.header-action,
.button,
.reference-list a,
.tutorial-list a,
.community-links a,
.portal-footer a {
  text-decoration: none;
}

.top-nav a:hover,
.side-nav a:hover,
.portal-footer a:hover {
  color: var(--text);
}

.header-action,
.button,
.playground-card button {
  border-radius: 8px;
  font-weight: 800;
}

.header-action {
  padding: 10px 14px;
  color: #061017;
  background: var(--green);
}

.portal-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 65px);
}

.side-nav {
  position: sticky;
  top: 65px;
  align-self: start;
  display: grid;
  gap: 6px;
  height: calc(100vh - 65px);
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--rail);
}

.side-title {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.side-nav a {
  padding: 9px 10px;
  color: var(--muted);
  border-radius: 6px;
  font-weight: 700;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, .05);
}

.content {
  min-width: 0;
}

.hero,
.section,
.portal-footer {
  padding: clamp(38px, 6vw, 78px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(360px, 1fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 65px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(29px, 4vw, 46px);
  line-height: 1.05;
}

h3 {
  margin-bottom: 9px;
  font-size: 20px;
  line-height: 1.14;
}

.hero-lede,
.section-heading p,
.section p,
.doc-grid p,
.sdk-row p {
  color: var(--muted);
}

.hero-lede {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: 19px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 16px;
}

.button.primary {
  color: #061017;
  background: var(--blue);
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
}

.terminal-card,
.playground-card,
.compatibility-panel,
.reference-list,
.doc-grid article,
.sdk-row article,
.capability-card,
.examples-grid pre {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.terminal-card {
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #0a1118;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.terminal-bar span:nth-child(2) {
  background: var(--yellow);
}

.terminal-bar span:nth-child(3) {
  background: var(--red);
}

pre {
  margin: 0;
  overflow-x: auto;
}

.terminal-card pre,
.examples-grid pre {
  padding: 20px;
}

code {
  color: #dff8ff;
  font-size: 14px;
}

.section {
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 800px;
  margin-bottom: 26px;
}

.doc-grid,
.sdk-row,
.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.doc-grid article,
.sdk-row article {
  padding: 22px;
}

.doc-grid span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--green);
  font-weight: 800;
}

.split,
.registry-section,
.playground-section,
.community-section {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(360px, 1fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: start;
}

.reference-list,
.tutorial-list,
.community-links {
  display: grid;
  gap: 10px;
}

.reference-list,
.compatibility-panel,
.playground-card {
  padding: 18px;
}

.reference-list a,
.tutorial-list a,
.community-links a {
  padding: 12px;
  border: 1px solid rgba(85, 169, 255, .24);
  border-radius: 6px;
  color: var(--text);
  background: rgba(85, 169, 255, .08);
}

.compatibility-panel {
  display: grid;
  gap: 10px;
}

.compatibility-panel div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 6px;
  background: #0b131b;
}

.compatibility-panel span {
  color: var(--muted);
  font-size: 13px;
}

.compatibility-panel code {
  color: var(--green);
}

.examples-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.playground-card {
  display: grid;
  gap: 12px;
}

textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070d13;
}

.playground-card button {
  width: fit-content;
  padding: 11px 14px;
  color: #061017;
  border: 0;
  background: var(--green);
  cursor: pointer;
}

output {
  min-height: 42px;
  padding: 11px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
}

output.is-ok {
  color: var(--green);
  border-color: rgba(110, 231, 183, .42);
}

output.is-error {
  color: var(--red);
  border-color: rgba(255, 122, 138, .46);
}

.portal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .portal-shell,
  .hero,
  .split,
  .registry-section,
  .playground-section,
  .community-section,
  .doc-grid,
  .sdk-row,
  .examples-grid {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .portal-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    flex-wrap: wrap;
  }

  h1 {
    font-size: 39px;
  }
}
