:root {
  --bg: #0a0f1f;
  --bg-soft: #0f162a;
  --bg-panel: rgba(15, 22, 44, 0.85);
  --bg-card-1: rgba(15, 22, 44, 0.8);
  --bg-card-2: rgba(13, 20, 40, 0.85);
  --accent: #ff784f;
  --accent-2: #f8c35b;
  --text: #f5f7ff;
  --text-soft: #b8c0da;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at 15% 8%, rgba(248, 195, 91, 0.08), transparent 28%),
    radial-gradient(circle at top, rgba(49, 72, 149, 0.2), transparent 50%),
    linear-gradient(160deg, #060a16, #0c1325 45%, #0a0f1f 70%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  background: rgba(10, 15, 31, 0.85);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.logo-mark {
  width: 40px;
  height: 44px;
  display: inline-block;
  background: center / contain no-repeat url("../images/SPOGLOGO.png");
  color: transparent;
  font-size: 0;
  flex: 0 0 auto;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.btn {
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f1d;
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-soft);
}

.hero {
  padding: 56px 0 26px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(248, 195, 91, 0.35), rgba(255, 255, 255, 0));
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.15rem, 3.2vw, 3rem);
  line-height: 1.12;
  margin-bottom: 14px;
  max-width: 18ch;
}

.hero p {
  color: var(--text-soft);
  max-width: 72ch;
  line-height: 1.72;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 32px 0 80px;
}

.sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.nav-list {
  display: grid;
  gap: 16px;
}

.nav-list a {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--text-soft);
  line-height: 1.3;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-list a.active,
.nav-list a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-title {
  margin-bottom: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.sidebar-toggle {
  display: none;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  margin-bottom: 8px;
}

.content {
  display: grid;
  gap: 24px;
}

.section-card {
  background: var(--bg-card-1);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 11px;
  position: relative;
  overflow: hidden;
}

.section-card h2 {
  font-size: 1.38rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.section-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(248, 195, 91, 0.8), rgba(255, 120, 79, 0.7));
}

.content .section-card:nth-child(even) {
  background: var(--bg-card-2);
}

.section-card p {
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 78ch;
}

.list {
  list-style: none;
  padding-left: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 9px;
  color: var(--text-soft);
}

.list li::before {
  content: "•";
  color: var(--accent);
  margin-right: 8px;
}

.list li {
  line-height: 1.58;
}

.flowchart {
  margin-top: 12px;
  background: rgba(8, 13, 28, 0.78);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable both-edges;
  position: relative;
}

.flowchart svg {
  width: 100%;
  min-width: 0;
  height: auto;
}

.callout {
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  background: rgba(255, 120, 79, 0.08);
  margin-top: 12px;
  border-radius: 12px;
  color: var(--text-soft);
}

.note {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-soft);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: var(--text-soft);
}

.badge-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.badge.status {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.badge.status.available {
  color: #7ff0c0;
  border-color: rgba(127, 240, 192, 0.4);
  background: rgba(127, 240, 192, 0.1);
}

.badge.status.partial {
  color: #f6d25b;
  border-color: rgba(246, 210, 91, 0.4);
  background: rgba(246, 210, 91, 0.1);
}

.badge.status.planned {
  color: #8fc7ff;
  border-color: rgba(143, 199, 255, 0.4);
  background: rgba(143, 199, 255, 0.1);
}

.status-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.status-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 15, 31, 0.6);
}

.status-item .badge {
  font-weight: 600;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .content {
    order: 1;
  }

  .sidebar {
    position: static;
    order: 2;
    margin-top: 16px;
  }

  .sidebar-toggle {
    display: block;
  }

  .flowchart svg {
    min-width: 820px;
  }
}
@media (max-width: 600px) {
  .section-card {
    padding: 20px;
    gap: 8px;
  }

  .section-card h2 {
    font-size: 1.3rem;
  }

  .flowchart.is-scrollable::before {
    bottom: 6px;
    right: 8px;
  }
}

.flowchart text {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  white-space: normal;
}

.flowchart.is-scrollable::before {
  content: "Swipe for full flow ->";
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  background: rgba(10, 15, 31, 0.65);
  padding: 2px 6px;
  border-radius: 6px;
  pointer-events: none;
}

.flowchart.is-scrollable::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42px;
  background: linear-gradient(to right, rgba(10, 15, 31, 0), rgba(10, 15, 31, 0.72));
  pointer-events: none;
}

.status-item span:first-child {
  line-height: 1.25;
}


.screenshot-panel p {
  max-width: none;
}

.screenshot-frame-manual {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(8, 13, 28, 0.84);
  min-height: 210px;
  display: grid;
  place-items: center;
}

.screenshot-img-manual {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-placeholder {
  color: var(--text-soft);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

/* --- Detailed documentation styles --- */

.section-card h3 {
  font-size: 1.1rem;
  line-height: 1.3;
  margin-top: 8px;
  color: var(--text);
}

.section-card h4 {
  font-size: 0.95rem;
  line-height: 1.3;
  margin-top: 6px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Ordered step lists */
.steps {
  list-style: none;
  padding-left: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
  color: var(--text-soft);
  counter-reset: step-counter;
}

.steps li {
  counter-increment: step-counter;
  line-height: 1.58;
  padding-left: 32px;
  position: relative;
}

.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0f1d;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* Reference tables */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.9rem;
}

.ref-table thead {
  position: sticky;
  top: 0;
}

.ref-table th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(8, 13, 28, 0.85);
  color: var(--accent-2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}

.ref-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  line-height: 1.5;
  vertical-align: top;
}

.ref-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.ref-table code {
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.82rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-2);
}

/* Inline code */
.section-card code {
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-2);
}

/* Code blocks */
.code-block {
  margin-top: 12px;
  background: rgba(6, 10, 22, 0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-soft);
  white-space: pre;
  tab-size: 2;
}

/* Callout variants */
.callout.warning {
  border-left-color: var(--accent-2);
  background: rgba(248, 195, 91, 0.08);
}

.callout.info {
  border-left-color: #8fc7ff;
  background: rgba(143, 199, 255, 0.08);
}

.callout.success {
  border-left-color: #7ff0c0;
  background: rgba(127, 240, 192, 0.08);
}

.callout strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

/* Field description lists */
.field-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.field-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(10, 15, 31, 0.4);
}

.field-item .field-name {
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.82rem;
  color: var(--accent-2);
  font-weight: 500;
}

.field-item .field-desc {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Permission badges inline */
.perm {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  background: rgba(127, 240, 192, 0.1);
  color: #7ff0c0;
  border: 1px solid rgba(127, 240, 192, 0.25);
}

/* Prerequisites block */
.prereqs {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 14px 16px;
  background: rgba(143, 199, 255, 0.06);
  border: 1px solid rgba(143, 199, 255, 0.15);
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.prereqs li {
  line-height: 1.5;
}

.prereqs li::before {
  content: "\2713";
  color: #7ff0c0;
  margin-right: 8px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .field-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .ref-table {
    font-size: 0.82rem;
  }

  .ref-table th,
  .ref-table td {
    padding: 7px 8px;
  }
}
