:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-ink: #17201c;
  --surface: #fffdf8;
  --surface-soft: #f8f5ee;
  --surface-strong: #e9e2d4;
  --text: #18211d;
  --muted: #687168;
  --line: #ddd4c3;
  --line-strong: #c8bca8;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #d8efeb;
  --amber: #a15c17;
  --amber-soft: #f2dfbf;
  --danger: #a33b32;
  --success: #21805c;
  --shadow: 0 18px 46px rgba(42, 33, 19, 0.12);
  --shadow-soft: 0 10px 26px rgba(42, 33, 19, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(23, 32, 28, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 32, 28, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 36px 36px;
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.1), transparent 32%),
    linear-gradient(315deg, rgba(161, 92, 23, 0.12), transparent 36%);
  pointer-events: none;
}

button,
input {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 14px 28px;
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid rgba(200, 188, 168, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.brand-copy {
  min-width: 190px;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #17201c 0 52%, #0f766e 52% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), var(--shadow-soft);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  background: #fffdf8;
  content: "";
}

.brand-mark::before {
  top: 14px;
}

.brand-mark::after {
  bottom: 14px;
  width: 14px;
}

h1 {
  font-size: 17px;
  line-height: 1.2;
}

.brand p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-left: 10px;
}

.button {
  appearance: none;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
  transform: translateY(-1px);
}

.button:focus-visible,
.search:focus-visible,
.category-list button:focus-visible,
.plugin-card:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

.button.ghost {
  background: #fffdf8;
  color: var(--accent);
  box-shadow: none;
}

.button.ghost:hover {
  background: var(--accent-soft);
}

.button.copied {
  border-color: var(--success);
  background: var(--success);
  color: #ffffff;
}

.primary-command {
  min-height: 46px;
  padding: 0 20px;
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 276px) minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  padding: 26px 22px;
  overflow: auto;
  background: rgba(248, 245, 238, 0.86);
  border-right: 1px solid var(--line);
}

.sidebar-kicker,
.search-label,
.section-title,
.strip-label,
.eyebrow {
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.sidebar-kicker {
  margin-bottom: 18px;
  color: var(--text);
}

.search-label,
.section-title {
  display: block;
  margin-bottom: 8px;
}

.search {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.search::placeholder {
  color: #8b9189;
}

.section-title {
  margin-top: 24px;
}

.category-list {
  display: grid;
  gap: 7px;
}

.category-list button {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.category-list button span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.category-list button.active,
.category-list button:hover {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.side-note {
  margin-top: 30px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
}

.side-note span,
.proof-row span,
.proof-grid span,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.side-note strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  word-break: break-word;
}

.content {
  width: min(1240px, 100%);
  padding: 30px;
  min-width: 0;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
  min-width: 0;
}

.hero-copy {
  min-height: 236px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  border: 1px solid rgba(255, 253, 248, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.08), transparent 42%),
    linear-gradient(150deg, #17201c 0%, #203329 58%, #0f766e 100%);
  color: #fffdf8;
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero-copy .eyebrow {
  color: #f2dfbf;
}

.hero-copy h2 {
  max-width: 740px;
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 850;
}

.hero-copy p {
  max-width: 700px;
  margin-top: 16px;
  color: rgba(255, 253, 248, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

.hero-proof {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero-proof:only-child {
  grid-column: 1 / -1;
}

.proof-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.proof-row strong {
  font-size: 18px;
  text-align: right;
}

.proof-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px 0;
}

.proof-track::before {
  position: absolute;
  top: 50%;
  left: 13%;
  right: 13%;
  height: 2px;
  background: var(--line-strong);
  content: "";
}

.proof-track span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 800;
}

.proof-track span:nth-child(2) {
  background: var(--amber-soft);
}

.proof-track span:nth-child(3) {
  background: var(--accent-soft);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.proof-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.proof-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.install-strip {
  display: grid;
  grid-template-columns: minmax(240px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.install-strip h2 {
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.35;
}

.install-strip p,
.plugin-description,
.plugin-meta,
.detail-subtitle {
  color: var(--muted);
}

.install-strip p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
}

code {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  padding: 13px 14px;
  border: 1px solid rgba(255, 253, 248, 0.1);
  border-radius: var(--radius);
  background: var(--bg-ink);
  color: #f8f5ee;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.grid-shell {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 0;
  align-items: start;
  min-width: 0;
}

.list-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.list-panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  font-size: 16px;
}

#result-count {
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.plugin-list {
  display: grid;
}

.plugin-card {
  width: 100%;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.plugin-card:last-child {
  border-bottom: 0;
}

.plugin-card:hover,
.plugin-card.active {
  background: #f6f1e8;
}

.plugin-card.active {
  box-shadow: inset 4px 0 0 var(--accent);
}

.status-dot {
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: var(--success);
}

.plugin-main {
  min-width: 0;
}

.plugin-name {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.plugin-description {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.plugin-meta {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.detail-panel {
  padding: 20px 22px;
}

.empty-state {
  min-height: 300px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.detail-title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  margin-bottom: 9px;
  overflow-wrap: anywhere;
}

.detail-subtitle {
  max-width: 760px;
  line-height: 1.7;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.action-row.compact {
  margin-bottom: 0;
}

.install-command {
  min-height: 42px;
  padding-inline: 16px;
}

.install-note {
  margin: -6px 0 20px;
  padding: 11px 12px;
  border: 1px solid var(--amber-soft);
  border-radius: var(--radius);
  background: rgba(242, 223, 191, 0.36);
  color: #694319;
  font-size: 13px;
  line-height: 1.6;
}

.install-note.active {
  border-color: #d5a75d;
  background: rgba(242, 223, 191, 0.58);
}

.detail-panel h3 {
  margin: 18px 0 10px;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 1120px) {
  .hero-panel,
  .grid-shell {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    position: static;
    padding: 18px;
    align-items: flex-start;
  }

  .top-actions {
    width: auto;
    justify-content: stretch;
    margin-left: 56px;
  }

  .top-actions .button {
    flex: 1 1 auto;
  }

  .layout,
  .install-strip {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content {
    padding: 18px;
  }

  .hero-copy {
    min-height: 300px;
    padding: 22px;
  }
}

@media (max-width: 560px) {
  .proof-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .proof-track {
    grid-template-columns: 1fr;
  }

  .proof-track::before {
    display: none;
  }

  .plugin-card {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .plugin-meta {
    grid-column: 2;
    width: fit-content;
  }

  .button {
    width: 100%;
  }
}
