:root {
  --ink: #111315;
  --muted: #5d656d;
  --line: #d7dde2;
  --surface: #fbfaf6;
  --paper: #ffffff;
  --accent: #0f8b8d;
  --accent-dark: #09676a;
  --amber: #e8a23d;
  --green: #2e8f59;
  --red: #bf4d45;
  --violet: #6d5bd0;
  --shadow: 0 18px 48px rgba(24, 28, 33, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
  background:
    linear-gradient(90deg, rgba(17, 19, 21, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 19, 21, 0.035) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: white;
  font-weight: 800;
  letter-spacing: 0;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: 7px 7px 0 var(--amber);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
}

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

.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.language-button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.language-button.active {
  color: white;
  background: var(--ink);
}

.category-button,
.status-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.category-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 8px;
  text-align: left;
}

.category-button:hover,
.category-button.active {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.category-button span:last-child {
  min-width: 28px;
  padding: 2px 7px;
  text-align: center;
  border-radius: 999px;
  background: #eef1ef;
  color: var(--ink);
  font-size: 12px;
}

.deploy-note {
  margin-top: auto;
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.deploy-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(46, 143, 89, 0.14);
}

.deploy-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.workspace {
  min-width: 0;
  padding: 34px clamp(18px, 4vw, 56px) 56px;
}

.hero {
  min-height: min(520px, calc(100vh - 52px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: 42px;
  padding-bottom: 24px;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 760px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 38px);
}

.lede {
  max-width: 710px;
  color: #333a40;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.atlas-visual {
  min-height: 320px;
  display: grid;
  place-items: center;
}

.atlas-visual img {
  width: min(100%, 560px);
  filter: drop-shadow(0 24px 34px rgba(17, 19, 21, 0.14));
}

.control-bar {
  position: sticky;
  top: 18px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 22px rgba(24, 28, 33, 0.07);
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-box span {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

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

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f3f5f2;
}

.status-button.active {
  color: white;
  background: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.metric {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.metric strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 22px;
  align-items: start;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.section-head p:last-child {
  margin-bottom: 4px;
  color: var(--muted);
}

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.plugin-card {
  display: grid;
  gap: 14px;
  min-height: 232px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 2px 0 rgba(17, 19, 21, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.plugin-card:hover,
.plugin-card.active {
  transform: translateY(-3px);
  border-color: rgba(15, 139, 141, 0.45);
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.plugin-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  background: var(--accent);
}

.status-pill {
  align-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.status-available {
  background: var(--green);
}

.status-planned {
  background: var(--amber);
  color: #3b2a10;
}

.status-beta {
  background: var(--violet);
}

.status-private {
  background: var(--ink);
}

.status-incompatible {
  background: var(--red);
}

.plugin-card h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.plugin-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.plugin-card .repo-line {
  color: #2f6f71;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.tag {
  padding: 5px 8px;
  border-radius: 6px;
  color: #293036;
  background: #edf0ee;
  font-size: 12px;
}

.detail-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(17, 19, 21, 0.05);
}

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

.detail-panel h2 {
  margin: 14px 0 10px;
  font-size: 28px;
}

.detail-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.detail-panel .tag {
  color: #293036;
  background: #edf0ee;
}

.raw-note {
  margin: -2px 0 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-meta {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.detail-row span:first-child {
  color: var(--muted);
}

.detail-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 20px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--amber);
  font-weight: 800;
  text-decoration: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

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

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

  .category-list {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .deploy-note {
    margin-top: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
  }

  .atlas-visual {
    min-height: 220px;
  }

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

  .detail-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .workspace,
  .sidebar {
    padding: 18px;
  }

  .control-bar {
    position: static;
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }
}

@media (max-width: 440px) {
  h1 {
    font-size: 44px;
  }

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

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