:root {
  --bg-0: #060d14;
  --bg-1: #101d29;
  --bg-2: #142534;
  --ink: #ecf3fa;
  --muted: #9fb2c4;
  --line: #2c3f52;
  --accent: #ff6a3d;
  --accent-2: #13bfa0;
  --warn: #f5c247;
  --panel: rgba(15, 27, 39, 0.74);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 14% -8%, #20364d 0%, transparent 45%),
    radial-gradient(circle at 87% 3%, #2a2f47 0%, transparent 38%),
    linear-gradient(145deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 26px,
      rgba(255, 255, 255, 0.03) 27px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 26px,
      rgba(255, 255, 255, 0.03) 27px
    );
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 10, 15, 0.7);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 0;
  background: url("./open-plant-logo.svg") center / contain no-repeat;
  box-shadow: none;
  transform: none;
}

.topnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.topnav a:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.18);
}

.topnav a.active {
  color: var(--ink);
  background: rgba(255, 106, 61, 0.14);
  border-color: rgba(255, 106, 61, 0.42);
}

.page {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
}

.sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 14px;
}

.sidebar h2 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  margin: 4px 0;
  padding: 8px 10px;
  border-radius: 10px;
}

.sidebar a:hover,
.sidebar a.current {
  background: rgba(19, 191, 160, 0.16);
}

.content {
  min-width: 0;
}

.hero {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(19, 191, 160, 0.12), rgba(255, 106, 61, 0.12));
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.kicker {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 780px;
}

.content h2 {
  margin: 30px 0 10px;
  font-size: clamp(22px, 2.2vw, 30px);
}

.content h3 {
  margin: 20px 0 8px;
  font-size: 18px;
}

.content p,
.content li {
  color: #d7e4f0;
}

.content a {
  color: #8ae9d8;
}

.content a:hover {
  color: #b9fff2;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: rgba(16, 30, 43, 0.72);
}

.card h3 {
  margin: 0 0 6px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.callout {
  margin: 14px 0;
  border: 1px solid rgba(245, 194, 71, 0.3);
  background: rgba(245, 194, 71, 0.1);
  border-left: 4px solid var(--warn);
  border-radius: 12px;
  padding: 12px 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(19, 191, 160, 0.17);
  color: #94f6e4;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

code {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  padding: 2px 6px;
  font-size: 0.92em;
}

pre {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #091219;
  overflow: auto;
  padding: 14px;
  margin: 14px 0;
}

pre code {
  background: transparent;
  padding: 0;
  font-size: 13px;
  color: #d7ebfb;
}

.copy-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(12, 26, 36, 0.84);
  color: var(--ink);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
}

.flow {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.flow-step {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 11px 12px;
  background: rgba(10, 22, 32, 0.78);
}

.flow-step strong {
  color: #ffd9c9;
}

.footer {
  margin-top: 34px;
  color: var(--muted);
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.45s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
