:root {
  --bg: #23242b;
  --bg-soft: #2b2d34;
  --panel: #2f3036;
  --panel-strong: #36373d;
  --text: #f1f1f3;
  --muted: #b8bbc5;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff140d;
  --accent-soft: #f47173;
  --mid: #787878;
  --deep: #3c3c3d;
  --light: #d8d8da;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(244, 113, 115, 0.13), transparent 28%),
    radial-gradient(circle at top left, rgba(255, 20, 13, 0.12), transparent 22%),
    linear-gradient(180deg, #26272f 0%, var(--bg) 40%, #1d1f26 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-soft);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero,
.subpage-header,
.plugin-detail__hero,
.detail-block {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(220px, 420px) 1fr;
  gap: 28px;
  padding: 28px;
  border-radius: 28px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 20, 13, 0.24), transparent 70%);
  pointer-events: none;
}

.hero__palette {
  display: grid;
  grid-template-columns: 2.3fr 0.9fr 0.9fr 0.72fr;
  gap: 18px;
  align-content: start;
}

.swatch {
  display: block;
  min-height: 96px;
  border-radius: 2px;
}

.swatch--red {
  background: var(--accent);
}

.swatch--mid {
  background: var(--mid);
}

.swatch--dark {
  background: var(--deep);
}

.swatch--light {
  background: var(--light);
}

.swatch--accent {
  grid-column: 4;
  min-height: 72px;
  background: var(--accent-soft);
  margin-top: 6px;
}

.hero__copy {
  max-width: 620px;
}

.hero h1,
.section-heading h2,
.subpage-header h1,
.plugin-detail h2,
.detail-block h3 {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.hero h1 {
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.hero__text,
.section-heading p,
.plugin-detail__lead,
.plugin-detail__summary,
.detail-block p,
.detail-block li,
.meta-list dd {
  color: var(--muted);
  line-height: 1.7;
}

.section-heading {
  margin: 48px 0 28px;
  max-width: 760px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
  gap: 24px;
}

.plugin-card {
  position: relative;
  width: 100%;
  min-height: 180px;
  aspect-ratio: 420 / 180;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  isolation: isolate;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.plugin-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 113, 115, 0.4);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.plugin-card--disabled {
  cursor: default;
}

.plugin-card__media,
.plugin-card__image,
.plugin-card__overlay {
  position: absolute;
  inset: 0;
}

.plugin-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.plugin-card__image--hover {
  opacity: 0;
}

.plugin-card:hover .plugin-card__image--hover {
  opacity: 1;
}

.plugin-card:hover .plugin-card__image--base {
  opacity: 0;
}

.plugin-card__overlay {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(10, 10, 12, 0.22), rgba(10, 10, 12, 0.72)),
    linear-gradient(120deg, rgba(35, 36, 43, 0.15), rgba(35, 36, 43, 0.55));
}

.plugin-card__topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.plugin-card__year {
  color: var(--light);
}

.plugin-card__status {
  color: var(--accent-soft);
}

.plugin-card__title {
  margin-top: auto;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
}

.plugin-card__note {
  color: var(--muted);
  font-size: 0.94rem;
}

.subpage-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 26px;
  border-radius: 22px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  transition: color 0.3s ease;
}

.back-link::before {
  content: "";
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.back-link:hover {
  color: var(--text);
}

.plugin-detail {
  margin-top: 28px;
}

.plugin-detail__hero {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: 28px;
  padding: 28px;
  border-radius: 28px;
}

.plugin-detail__preview {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
}

.plugin-detail__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plugin-detail__lead {
  font-size: 1.08rem;
  color: var(--text);
}

.plugin-detail__summary {
  max-width: 60ch;
}

.plugin-detail__actions {
  margin: 20px 0 0;
}

.action-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(244, 113, 115, 0.35);
  background: rgba(255, 20, 13, 0.1);
  color: var(--text);
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.action-link:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 113, 115, 0.55);
  background: rgba(255, 20, 13, 0.16);
}

.plugin-detail__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.detail-block {
  padding: 24px;
  border-radius: 24px;
}

.detail-block h3 {
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.detail-block ol {
  margin: 0;
  padding-left: 20px;
}

.detail-block li + li {
  margin-top: 8px;
}

.meta-list {
  margin: 0;
}

.meta-list__row + .meta-list__row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.meta-list dt {
  color: var(--light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-list dd {
  margin: 6px 0 0;
}

.plugin-detail--empty {
  padding: 28px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.detail-block--stats {
  grid-column: 1 / -1;
}

.stats-panel__status {
  margin: 0;
  color: var(--muted);
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.stat-card,
.stats-block {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
}

.stat-card {
  padding: 16px 18px;
}

.stat-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.stat-card__value {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.8rem;
}

.stats-layout {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.stats-block {
  padding: 18px;
}

.stats-block h4 {
  margin: 0 0 14px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.stats-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 150px;
}

.stats-bar-wrap {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 8px;
  min-height: 150px;
}

.stats-bar {
  width: 100%;
  min-width: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  box-shadow: 0 10px 24px rgba(255, 20, 13, 0.2);
}

.stats-bar-label {
  color: var(--muted);
  font-size: 0.72rem;
}

.stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stats-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.stats-list li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.stats-list strong {
  color: var(--text);
}

.page-shell--stats {
  width: min(980px, calc(100% - 32px));
}

.stats-page {
  margin-top: 28px;
}

.stats-subtitle {
  margin: 10px 0 0;
  max-width: 56ch;
  color: var(--muted);
}

.stats-table-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.stats-page__status {
  margin: 0 0 14px;
  color: var(--muted);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.stats-table th,
.stats-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.stats-table th {
  width: 58%;
  text-align: left;
  color: var(--muted);
  font-weight: 600;
}

.stats-table td {
  text-align: right;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.stats-updated {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .hero,
  .plugin-detail__hero {
    grid-template-columns: 1fr;
  }

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

  .plugin-card {
    max-width: 420px;
  }

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

  .stats-table th,
  .stats-table td {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 0;
  }

  .stats-table td {
    font-size: 1.15rem;
    padding-top: 0;
    padding-bottom: 14px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .hero,
  .subpage-header,
  .plugin-detail__hero,
  .detail-block {
    padding: 20px;
    border-radius: 20px;
  }

  .hero__palette {
    gap: 12px;
  }

  .swatch {
    min-height: 70px;
  }
}
