:root {
  --bg: #070807;
  --bg-raised: #101311;
  --bg-soft: #171b18;
  --ink: #f7f7f2;
  --ink-strong: #ffffff;
  --muted: #a8b0aa;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --paper: #f6f4ec;
  --paper-ink: #171b18;
  --paper-muted: #5f6861;
  --paper-line: #d9d5c9;
  --green: #31d994;
  --blue: #70a7ff;
  --amber: #f6b44b;
  --red: #ff6f61;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration-color: currentColor;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

code,
pre,
input,
button {
  font: inherit;
}

code,
pre {
  font-family: var(--mono);
}

button {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-180%);
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  padding: 0.55rem 0.75rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 7, 0.88);
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink-strong);
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0d1511;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink-strong);
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
}

.hero-grid {
  display: grid;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  color: var(--ink-strong);
  line-height: 1.03;
  letter-spacing: 0;
}

h1 {
  max-width: 15ch;
  margin-bottom: 1.35rem;
  font-size: clamp(3rem, 6vw, 5.35rem);
  font-weight: 860;
}

h2 {
  max-width: 12.5ch;
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 4.6vw, 4.7rem);
  font-weight: 820;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.18rem;
  font-weight: 780;
}

.lede {
  max-width: 690px;
  margin-bottom: 0;
  color: #d6ddd7;
  font-size: clamp(1.08rem, 1.55vw, 1.34rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  border-radius: 7px;
  padding: 0.76rem 1rem;
  font-weight: 760;
  text-decoration: none;
}

.button.primary {
  background: var(--green);
  color: #03100a;
}

.button.primary:hover {
  background: #69efb6;
  color: #03100a;
}

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

.hero-console {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(10, 13, 11, 0.94);
  box-shadow: var(--shadow);
}

.console-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.72rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.console-top span {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 999px;
  background: var(--red);
}

.console-top span:nth-child(2) {
  background: var(--amber);
}

.console-top span:nth-child(3) {
  background: var(--green);
}

.console-top strong {
  margin-left: 0.45rem;
  color: var(--ink);
  font-weight: 720;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.stat-row {
  min-height: 7.6rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
}

.stat-row:nth-child(2n) {
  border-right: 0;
}

.stat-row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.stat-row strong {
  display: block;
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1;
}

.stat-row span {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-row.muted strong {
  color: var(--amber);
}

.terminal-command {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.84rem;
}

.terminal-command code {
  min-width: 0;
  color: #dce5df;
  overflow-wrap: anywhere;
}

.hero-change {
  min-height: 9rem;
  padding: 1rem;
}

.mini-label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 760;
  text-transform: uppercase;
}

.hero-change strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ink-strong);
}

.hero-change p {
  margin: 0;
  color: #c8d2cc;
}

.skeleton-line {
  height: 1rem;
  margin: 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.skeleton-line.short {
  width: 60%;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3rem);
}

.section-heading {
  width: min(1180px, 100%);
  margin: 0 auto 2rem;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
  gap: 2rem;
  align-items: end;
}

.split-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.principles-section {
  background: var(--paper);
  color: var(--paper-ink);
}

.principles-section h2,
.principles-section h3 {
  color: var(--paper-ink);
}

.principles-section .eyebrow {
  color: #0f8058;
}

.principles-grid {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--paper-line);
  border-left: 1px solid var(--paper-line);
}

.principles-grid article {
  min-height: 15rem;
  border-right: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  padding: 1rem;
}

.principle-number {
  display: block;
  margin-bottom: 2.5rem;
  color: #0f8058;
  font-family: var(--mono);
  font-weight: 800;
}

.principles-grid p {
  margin-bottom: 0;
  color: var(--paper-muted);
}

.catalog-section {
  background: #101311;
}

.catalog-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.catalog-summary span,
.plugin-meta span,
.version-pill,
.support-pill,
.change-type {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 720;
}

.catalog-summary span {
  color: #dce5df;
}

.catalog-toolbar {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto 1rem;
  grid-template-columns: minmax(220px, 0.75fr) auto;
  gap: 0.75rem;
}

.search-field {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0 0.8rem;
}

.search-field span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.segmented.wide {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.segmented button,
.copy-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 0.55rem 0.72rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 720;
}

.segmented button[aria-pressed="true"],
.segmented button:hover,
.copy-button:hover {
  border-color: rgba(49, 217, 148, 0.7);
  background: rgba(49, 217, 148, 0.13);
  color: var(--ink-strong);
}

.plugin-grid {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.plugin-card {
  display: flex;
  min-height: 23rem;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 1rem;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.plugin-card:hover {
  transform: translateY(-2px);
  border-color: rgba(49, 217, 148, 0.42);
  background: rgba(255, 255, 255, 0.065);
}

.plugin-head,
.change-head,
.block-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.plugin-category {
  margin: 0 0 0.35rem;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.plugin-summary {
  color: #d4ddd7;
}

.version-pill {
  color: var(--green);
}

.plugin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.support-pill.both {
  border-color: rgba(49, 217, 148, 0.45);
  color: var(--green);
}

.support-pill.claude {
  border-color: rgba(246, 180, 75, 0.5);
  color: var(--amber);
}

.latest-note {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.latest-note p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.change-type.breaking {
  border-color: rgba(255, 111, 97, 0.58);
  color: var(--red);
}

.change-type.added {
  border-color: rgba(49, 217, 148, 0.5);
  color: var(--green);
}

.change-type.changed {
  border-color: rgba(112, 167, 255, 0.55);
  color: var(--blue);
}

.change-type.fixed {
  border-color: rgba(246, 180, 75, 0.5);
  color: var(--amber);
}

.source-link {
  margin-top: 1rem;
  color: var(--ink-strong);
  font-weight: 720;
}

.empty-state,
.no-script,
.error-state {
  width: min(1180px, 100%);
  margin: 1rem auto 0;
  color: var(--muted);
}

.install-section,
.changelog-section {
  background: var(--paper);
  color: var(--paper-ink);
}

.install-section h2,
.install-section h3,
.changelog-section h2,
.changelog-section h3 {
  color: var(--paper-ink);
}

.install-section .eyebrow,
.changelog-section .eyebrow {
  color: #0f8058;
}

.install-section .split-heading p,
.changelog-section .split-heading p {
  color: var(--paper-muted);
}

.install-grid {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.install-block {
  min-width: 0;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: #ffffff;
  padding: 1rem;
}

.copy-button {
  border-color: var(--paper-line);
  background: #f2efe5;
  color: var(--paper-ink);
}

pre {
  max-height: 27rem;
  overflow: auto;
  margin: 0.75rem 0 0;
  border: 1px solid #20241f;
  border-radius: 8px;
  background: #070807;
  color: #dce5df;
  padding: 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
}

.change-feed {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.change-item {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: #ffffff;
  padding: 1rem;
}

.change-head p {
  margin: 0 0 0.25rem;
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.change-item > p {
  color: var(--paper-muted);
}

.change-item a {
  margin-top: auto;
  color: #0f8058;
  font-weight: 720;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  padding: 1.2rem clamp(1rem, 4vw, 3rem);
}

.site-footer a {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .plugin-card {
    transition: none;
  }

  .plugin-card:hover {
    transform: none;
  }
}

@media (max-width: 1050px) {
  .hero-grid,
  .split-heading,
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .segmented {
    justify-content: flex-start;
  }

  .principles-grid,
  .plugin-grid,
  .change-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero-grid {
    width: min(100% - 1rem, 1180px);
    padding-top: 3rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .hero-console,
  .install-block,
  .plugin-card,
  .change-item {
    border-radius: 6px;
  }

  .hero-stats,
  .principles-grid,
  .plugin-grid,
  .install-grid,
  .change-feed {
    grid-template-columns: 1fr;
  }

  .stat-row {
    min-height: auto;
    border-right: 0;
  }

  .stat-row:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .principles-grid article {
    min-height: auto;
  }

  .principle-number {
    margin-bottom: 1.2rem;
  }

  .plugin-card,
  .change-item {
    min-height: auto;
  }

  .site-footer {
    flex-direction: column;
  }
}
