:root {
  --bg: #0e1116;
  --bg-elev: #161b22;
  --bg-soft: #1c2330;
  --line: rgba(232, 228, 217, 0.1);
  --text: #e8e4d9;
  --muted: #9aa3b2;
  --amber: #e0a33a;
  --amber-dim: rgba(224, 163, 58, 0.16);
  --teal: #3ecfbf;
  --teal-dim: rgba(62, 207, 191, 0.14);
  --rose: #ef7d6a;
  --good: #6fbf8a;
  --warn: #e0a33a;
  --bad: #ef7d6a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1180px;
  --sidebar: 280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(224, 163, 58, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(62, 207, 191, 0.1), transparent 50%),
    linear-gradient(180deg, #0b0e13 0%, var(--bg) 40%, #0c1017 100%);
  min-height: 100vh;
  line-height: 1.65;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  color: #7ee6d9;
}

img {
  max-width: 100%;
  display: block;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
}

kbd {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--bg-elev);
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--amber);
  color: #111;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(14, 17, 22, 0.82);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--amber), #f0c36a 45%, transparent 46%),
    linear-gradient(315deg, var(--teal), #7ee6d9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.search-wrap {
  position: relative;
  min-width: 180px;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.9rem 0.55rem 2.2rem;
  outline: none;
  font: inherit;
}

.search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.95rem;
}

.search-wrap input:focus {
  border-color: rgba(62, 207, 191, 0.45);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--amber);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero p.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.15rem;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), #f0c36a);
  color: #1a1305;
}

.btn-primary:hover {
  filter: brightness(1.05);
  color: #1a1305;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(232, 228, 217, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.hero-visual {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(14, 17, 22, 0.55));
  pointer-events: none;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 34rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%), var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: 0.25s ease;
  min-height: 100%;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 163, 58, 0.35);
  box-shadow: var(--shadow);
}

.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.tag-cursor {
  background: var(--amber-dim);
  color: var(--amber);
}

.tag-claude {
  background: var(--teal-dim);
  color: var(--teal);
}

.tag-cmp {
  background: rgba(239, 125, 106, 0.14);
  color: var(--rose);
}

.card h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.card .more {
  font-weight: 700;
  color: var(--text);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pill {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.86rem;
}

.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  gap: 1.5rem;
}

.toc {
  position: sticky;
  top: 78px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(22, 27, 34, 0.75);
}

.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-body);
}

.toc a {
  display: block;
  color: var(--muted);
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.toc a:hover,
.toc a.active {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.content {
  min-width: 0;
}

.page-hero {
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: var(--bg-elev);
}

.page-hero img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.page-hero-body {
  padding: 1.35rem 1.4rem 1.5rem;
}

.page-hero-body h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.page-hero-body p {
  margin: 0;
  color: var(--muted);
  max-width: 48rem;
}

.article section {
  scroll-margin-top: 90px;
  margin-bottom: 2rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%), var(--bg-elev);
}

.article h2 {
  font-family: var(--font-display);
  margin: 0 0 0.8rem;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.article h3 {
  margin: 1.2rem 0 0.5rem;
  font-size: 1.08rem;
}

.article p,
.article li {
  color: #c9c4b8;
}

.article ul,
.article ol {
  padding-left: 1.2rem;
}

.article li + li {
  margin-top: 0.35rem;
}

.callout {
  margin: 1rem 0;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.callout.tip {
  border-color: rgba(62, 207, 191, 0.35);
  background: var(--teal-dim);
}

.callout.warn {
  border-color: rgba(224, 163, 58, 0.4);
  background: var(--amber-dim);
}

.callout strong {
  color: var(--text);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.steps li {
  position: relative;
  padding: 0.9rem 0.9rem 0.9rem 3.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  margin-bottom: 0.65rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 0.95rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--amber);
  color: #1a1305;
  font-weight: 800;
  font-size: 0.85rem;
}

.figure {
  margin: 1rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.figure figcaption {
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--bg-soft);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.mini {
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.mini h4 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.mini p {
  margin: 0;
  font-size: 0.92rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 700;
  position: sticky;
  top: 0;
}

td {
  color: #c9c4b8;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-yes {
  background: rgba(111, 191, 138, 0.16);
  color: var(--good);
}

.badge-partial {
  background: var(--amber-dim);
  color: var(--amber);
}

.badge-no {
  background: rgba(239, 125, 106, 0.16);
  color: var(--rose);
}

.cheat {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.cheat div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.cheat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding: 1.5rem 1.25rem 2.5rem;
  color: var(--muted);
  text-align: center;
}

.footer strong {
  color: var(--text);
  font-family: var(--font-display);
}

.mobile-toc {
  display: none;
}

@media (max-width: 980px) {
  .hero-grid,
  .cards,
  .grid-2,
  .cheat {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }

  .mobile-toc {
    display: block;
    margin-bottom: 1rem;
  }

  .mobile-toc select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    color: var(--text);
    font: inherit;
  }

  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    width: 100%;
    order: 3;
  }

  .menu-btn {
    display: inline-flex;
  }
}

.menu-btn {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
}

.highlight {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.mark {
  background: rgba(224, 163, 58, 0.25);
  color: var(--text);
  padding: 0 0.15rem;
  border-radius: 3px;
}
