:root {
  --bg: #f6f3ee;
  --panel: #fffdf9;
  --panel-alt: #f1ece3;
  --ink: #202124;
  --muted: #666154;
  --accent: #1b5e56;
  --accent-soft: #d7e6e3;
  --line: #d8d1c4;
  --shadow: 0 10px 24px rgba(36, 33, 28, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(32, 33, 36, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(32, 33, 36, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 22px 22px;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem;
}

.hero {
  padding: 0.4rem 0 1rem;
}

.hero-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.section-label,
.meta-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.status-dot::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
}

h1 {
  margin: 0.5rem 0 0.35rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.5;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel-head,
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

h2,
h3 {
  margin: 0;
}

.search-wrap {
  display: grid;
  gap: 0.4rem;
  margin: 0.85rem 0 1rem;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.72rem 0.82rem;
  font: inherit;
  color: var(--ink);
}

.search-wrap input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.package-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-height: 55vh;
  overflow: auto;
}

.package-item button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
  font: inherit;
}

.package-item button:hover {
  border-color: var(--accent);
  background: #fcfaf4;
}

.package-item button.active {
  border-color: var(--accent);
  background: #f0f6f5;
  box-shadow: inset 3px 0 0 var(--accent);
}

.package-item .name {
  font-weight: 700;
}

.package-item .meta {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.15rem;
}

.pill {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.22rem 0.56rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--panel-alt);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.hidden {
  display: none;
}

.detail {
  animation: reveal 260ms ease;
}

.description {
  color: var(--muted);
  margin: 0.7rem 0 1rem;
  line-height: 1.6;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.meta-card {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-alt);
}

.meta-card strong,
.meta-card a {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  text-decoration: none;
}

.command-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fcfaf5;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

code {
  font-family: "IBM Plex Mono", monospace;
  background: rgba(27, 94, 86, 0.08);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  overflow: auto;
  white-space: nowrap;
}

#copyBtn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  border-radius: 7px;
  padding: 0.58rem 0.82rem;
  cursor: pointer;
  font: inherit;
}

#copyBtn.copied {
  background: var(--accent);
  border-color: var(--accent);
}

.deps-block {
  margin-top: 1rem;
}

.tag-list,
.edges-list {
  list-style: none;
  padding: 0;
  margin: 0.55rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  font-size: 0.83rem;
  background: #fff;
}

.edges-list {
  display: grid;
}

.edges-list li {
  border-left: 3px solid var(--accent);
  background: #fff;
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}

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

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

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

  .package-list {
    max-height: none;
  }

  .command-box {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
