:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f8fafc;
  --panel: #ffffff;
  --brand: #7c3aed;
  --brand-deep: #5b21b6;
  --brand-soft: #f5f3ff;
  --accent: #db2777;
  --ok: #059669;
  --warn: #d97706;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --sidebar: 260px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 0% -10%, rgba(124, 58, 237, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(219, 39, 119, 0.08), transparent 50%),
    linear-gradient(180deg, #fbfafd 0%, var(--paper) 40%, #f1f5f9 100%);
}

a {
  color: var(--brand-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand);
}

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: #eef2ff;
  color: var(--brand-deep);
  border-radius: 6px;
  padding: 0.12em 0.4em;
}

kbd {
  border: 1px solid #ddd6fe;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 1.25rem 1rem 2rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.35rem 0.65rem 1.1rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--brand-deep), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.nav-label {
  margin: 1rem 0.65rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a {
  display: block;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.15rem;
  border-radius: 10px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.nav a.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(219, 39, 119, 0.08));
  color: var(--brand-deep);
  font-weight: 650;
}

.main {
  padding: 2rem 1.5rem 4rem;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  animation: rise 0.45s ease-out;
}

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

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 1.75rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

h2 {
  margin: 2.25rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

p,
li {
  line-height: 1.65;
  color: var(--ink-soft);
}

ul,
ol {
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.35rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.steps li {
  position: relative;
  padding: 0.95rem 1rem 0.95rem 3.1rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 0.95rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.callout {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid #ddd6fe;
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.95), rgba(255, 255, 255, 0.9));
}

.callout strong {
  color: var(--ink);
}

.callout.tip {
  border-color: #a7f3d0;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(255, 255, 255, 0.9));
}

.callout.warn {
  border-color: #fde68a;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95), rgba(255, 255, 255, 0.9));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
  margin: 1.1rem 0 0.4rem;
}

.tile {
  display: block;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: #c4b5fd;
}

.tile h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  color: var(--ink);
}

.tile p {
  margin: 0;
  font-size: 0.92rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

th {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f8fafc;
}

tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pill.free {
  background: #e2e8f0;
  color: #334155;
}

.pill.pro {
  background: linear-gradient(120deg, #fbbf24, #f59e0b);
  color: #78350f;
}

.footer-note {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.mobile-bar button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 300px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 30;
    box-shadow: 20px 0 40px rgba(15, 23, 42, 0.12);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .main {
    padding: 1.25rem 1rem 3rem;
  }
}
