:root {
  --ink: #17201b;
  --muted: #607069;
  --line: #dfe7e1;
  --paper: #fbfcf7;
  --panel: #ffffff;
  --mint: #2f8f5b;
  --mint-dark: #16623c;
  --gold: #c98721;
  --cyan: #277d92;
  --red: #b73a3a;
  --shadow: 0 18px 45px rgba(28, 47, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.theme-emerald {
  --paper: #f4fbf5;
  --mint: #25985a;
  --mint-dark: #0e6d3a;
  --cyan: #2f8f7e;
  --gold: #b9932d;
}

body.theme-midnight {
  --ink: #eef7f0;
  --muted: #a9b8b0;
  --line: #31443a;
  --paper: #101812;
  --panel: #18231b;
  --mint: #58c783;
  --mint-dark: #45a96d;
  --cyan: #61bfd1;
  --gold: #d7a846;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

body.theme-midnight input,
body.theme-midnight select,
body.theme-midnight textarea,
body.theme-midnight .site-header,
body.theme-midnight .product-card,
body.theme-midnight .content-block,
body.theme-midnight .summary-panel,
body.theme-midnight .product-sidebar section,
body.theme-midnight .collection-card,
body.theme-midnight .auth-panel form,
body.theme-midnight .filters,
body.theme-midnight .metric-grid div,
body.theme-midnight .rank-list a,
body.theme-midnight .mini-grid a,
body.theme-midnight .saved-item,
body.theme-midnight .doc-panel,
body.theme-midnight .code-panel,
body.theme-midnight .review,
body.theme-midnight .notice {
  background: var(--panel);
  color: var(--ink);
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.78rem 0.85rem;
  color: var(--ink);
  background: #fff;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(240px, 1fr) minmax(0, auto);
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem clamp(1rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 247, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  gap: 0.72rem;
  align-items: center;
  min-width: 0;
  width: fit-content;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.brand:hover,
.brand:focus-visible {
  border-color: #d5e6d9;
  background: #eef5ed;
  box-shadow: 0 10px 22px rgba(28, 47, 38, 0.08);
}

.brand small,
.card-meta,
small {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 18%, transparent 18% 100%),
    linear-gradient(135deg, var(--mint-dark), var(--cyan));
  box-shadow: 0 8px 18px rgba(22, 98, 60, 0.22);
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.78rem;
  line-height: 1.1;
}

.header-search {
  position: relative;
}

.header-search input {
  min-height: 2.8rem;
  border-radius: 999px;
  padding-inline: 1rem;
  background: rgba(255, 255, 255, 0.88);
}

.suggestions {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 60;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.suggestions a {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.7rem;
  padding: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.suggestions img,
.rank-list img,
.mini-grid img,
.cart-line img,
.product-icon-row img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  object-fit: cover;
}

.suggestions small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav,
.site-footer nav,
.hero-actions,
.product-title-row,
.stat-row,
.check-row,
.table-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-editor-list {
  display: grid;
  gap: 1rem;
}

.admin-editor-item {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.admin-editor-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.buy-options-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
}

.buy-options-form label {
  display: grid;
  gap: 0.25rem;
  min-width: min(17rem, 100%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.buy-options-form select {
  min-height: 2.8rem;
}

.cart-line small,
.summary-row small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-weight: 700;
}

.main-nav a,
.main-nav button,
.site-footer a,
.admin-nav a,
.account-nav a {
  color: var(--muted);
  font-weight: 800;
}

.main-nav {
  justify-content: flex-end;
  gap: 0.45rem;
}

.main-nav a,
.main-nav button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.78rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(28, 47, 38, 0.05);
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav button:hover,
.main-nav button:focus-visible,
.main-nav a.is-active {
  border-color: var(--mint-dark);
  color: #fff;
  background: var(--mint-dark);
  transform: translateY(-1px);
}

.main-nav .count {
  margin-left: 0.1rem;
}

.nav-form {
  margin: 0;
}

.count {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--gold);
  font-size: 0.75rem;
}

main {
  min-height: 72vh;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hero-store,
.product-hero,
.bundle-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3.5rem) 2.5rem;
}

.home-board {
  display: grid;
  width: min(1220px, calc(100% - 2rem));
  gap: 1.4rem;
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.home-section {
  position: relative;
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 0;
  scroll-margin-top: 6rem;
}

.home-section[draggable="true"] {
  cursor: grab;
}

.home-section.is-dragging {
  opacity: 0.42;
}

.home-section.is-drop-target {
  border-top-color: var(--mint-dark);
}

.drag-handle {
  position: absolute;
  top: 1.65rem;
  left: -0.2rem;
  width: 0.55rem;
  height: 2.1rem;
  border-radius: 999px;
  background-image: radial-gradient(circle, var(--muted) 1.2px, transparent 1.4px);
  background-size: 0.28rem 0.28rem;
  opacity: 0.46;
}

.home-section:hover .drag-handle,
.home-section:focus-within .drag-handle {
  opacity: 0.9;
}

.home-hero {
  overflow: hidden;
  min-height: clamp(24rem, 58vh, 35rem);
  border-top: 0;
  border-radius: 8px;
  padding: clamp(1.4rem, 4vw, 3rem);
  color: #fff;
  background: #102118;
  isolation: isolate;
}

.home-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 23, 16, 0.9), rgba(10, 23, 16, 0.62) 48%, rgba(10, 23, 16, 0.18));
  content: "";
}

.home-hero img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero .drag-handle {
  top: 1.2rem;
  left: 1rem;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.82) 1.2px, transparent 1.4px);
}

.home-hero-copy {
  display: grid;
  align-content: center;
  max-width: 42rem;
  min-height: 100%;
}

.home-hero h1 {
  margin: 0.25rem 0 0.85rem;
  font-size: clamp(2.4rem, 8vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.home-hero p {
  max-width: 38rem;
  margin: 0 0 1.15rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.home-hero .eyebrow {
  color: #b9f1cf;
}

.home-hero .button.ghost {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.home-product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-focus {
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1rem, 3vw, 1.4rem);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(28, 47, 38, 0.06);
}

.home-focus .drag-handle {
  top: 1.25rem;
  left: 0.9rem;
}

.home-focus-copy {
  padding-left: 0.9rem;
}

.home-focus-copy h2 {
  margin: 0.15rem 0 0.6rem;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1.02;
}

.home-focus-copy p {
  max-width: 42rem;
  color: var(--muted);
}

.home-focus-media {
  overflow: hidden;
  border-radius: 8px;
  background: #e8f1e9;
}

.home-focus-media img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.section-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.section-actions a,
.section-heading > a {
  color: var(--mint-dark);
  font-weight: 900;
}

.home-link-grid,
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.home-link-card,
.directory-card {
  display: grid;
  gap: 0.45rem;
  min-height: 10rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(28, 47, 38, 0.06);
}

.home-directory {
  padding-bottom: 0.2rem;
}

.home-link-card:hover,
.home-link-card:focus-visible,
.directory-card:hover,
.directory-card:focus-visible {
  border-color: var(--mint);
  box-shadow: var(--shadow);
}

.home-link-card small,
.directory-card small {
  color: var(--mint-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-link-card strong,
.directory-card strong {
  font-size: 1.2rem;
}

.home-link-card span,
.directory-card span {
  color: var(--muted);
}

.directory-card em {
  align-self: end;
  color: var(--mint-dark);
  font-style: normal;
  font-weight: 900;
}

.directory-card img {
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: 8px;
  object-fit: cover;
}

.home-collection-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.premium-product-hero {
  background: linear-gradient(135deg, rgba(47, 143, 91, 0.12), rgba(201, 135, 33, 0.16));
}

.premium-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: #513600;
  background: #ffe6ad;
  font-weight: 900;
}

.hero-store h1,
.page-title h1,
.product-hero h1,
.bundle-hero h1 {
  margin: 0.2rem 0 0.7rem;
  font-size: clamp(2rem, 6vw, 4.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy p,
.page-title p,
.product-hero-copy p,
.bundle-hero p {
  max-width: 58rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.eyebrow {
  color: var(--mint-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-panel,
.product-hero-media,
.bundle-hero img {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel img,
.product-hero-media img,
.bundle-hero img {
  width: 100%;
  min-height: 18rem;
  object-fit: cover;
}

.promotion-hero .price-big {
  display: block;
  margin: 0.8rem 0;
  color: var(--mint-dark);
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.75rem;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--mint-dark);
  font-weight: 900;
  cursor: pointer;
}

.button.ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.disabled-button {
  cursor: not-allowed;
  opacity: 0.62;
}

.button.full {
  width: 100%;
}

.locale-switcher {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}

.locale-switcher a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: var(--muted);
  background: #fff;
  font-weight: 900;
}

.locale-switcher a.active {
  color: #fff;
  border-color: var(--mint-dark);
  background: var(--mint-dark);
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--mint-dark);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.main-nav .link-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.78rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.danger {
  color: var(--red);
}

.section-band,
.page-title,
.catalog-layout,
.product-layout,
.cart-layout,
.checkout-layout,
.account-layout,
.admin-grid,
.metric-grid,
.split-sections {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.section-band {
  padding: 2.2rem 0;
}

.section-band.muted {
  width: 100%;
  padding-inline: max(1rem, calc((100% - 1200px) / 2));
  background: #eef5ed;
}

.section-band.inline {
  padding-top: 0;
}

.section-heading,
.page-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.section-heading h2,
.content-block h2,
.product-sidebar h2,
.summary-panel h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.section-heading.compact h2 {
  font-size: 1.35rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.product-grid.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.product-card,
.content-block,
.summary-panel,
.product-sidebar section,
.collection-card,
.auth-panel form,
.filters,
.metric-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(28, 47, 38, 0.06);
}

.product-card {
  overflow: hidden;
}

.product-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: #e8f1e9;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fallback-art {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--mint-dark);
  font-size: 2rem;
  font-weight: 900;
}

.product-body,
.content-block,
.summary-panel,
.product-sidebar section,
.filters,
.collection-card,
.auth-panel form,
.metric-grid div {
  padding: 1rem;
}

.product-title-row {
  justify-content: space-between;
}

.product-title-row h3 {
  margin: 0;
}

.price-stack {
  display: grid;
  justify-items: end;
  line-height: 1.15;
}

.price-stack span {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: line-through;
}

.price-stack strong {
  color: var(--mint-dark);
}

.pill-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}

.pill {
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  color: var(--mint-dark);
  background: #e5f3e9;
  font-size: 0.78rem;
  font-weight: 900;
}

.pill.soft {
  color: var(--cyan);
  background: #e4f3f6;
}

.card-meta,
.summary-row,
.release-row {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
}

.dependency-list {
  display: grid;
  gap: 0.9rem;
}

.dependency-item {
  display: grid;
  gap: 0.45rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.dependency-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.dependency-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dependency-name {
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

a.dependency-name,
.dependency-url {
  color: var(--mint-dark);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.dependency-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  color: var(--muted);
  background: rgba(97, 191, 209, 0.12);
  font-size: 0.82rem;
  font-weight: 900;
}

.dependency-status.required {
  color: var(--mint-dark);
  background: rgba(88, 199, 131, 0.14);
}

.dependency-notes {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.dependency-url {
  width: fit-content;
  font-size: 0.92rem;
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 0.65rem;
}

.rank-list a,
.mini-grid a,
.saved-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  background: #fff;
}

.rank-list span:first-child {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--gold);
  font-weight: 900;
}

.split-sections,
.admin-grid,
.cart-layout,
.checkout-layout,
.account-layout,
.product-layout,
.catalog-layout {
  display: grid;
  gap: 1rem;
  padding: 1rem 0 2rem;
}

.split-sections {
  grid-template-columns: repeat(3, 1fr);
}

.catalog-layout {
  grid-template-columns: 280px 1fr;
  align-items: start;
}

.filters form,
.admin-form,
.auth-panel form,
.review-form,
.review-filter-form,
.content-block form {
  display: grid;
  gap: 1rem;
}

.review-heading {
  align-items: start;
}

.review-filter-form {
  grid-template-columns: minmax(120px, 170px) minmax(140px, 180px) auto auto;
  align-items: end;
}

.inline-check {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
}

.inline-check input {
  width: auto;
}

.result-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.collection-grid,
.mini-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.dashboard-stack {
  display: grid;
  gap: 1.25rem;
}

.dashboard-grid,
.dashboard-two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: var(--surface);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.metric-card strong {
  font-size: 2rem;
}

.collection-card {
  min-height: 9rem;
}

.collection-card strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.collection-card.promo {
  border-color: #f0d5aa;
  background: #fff8ec;
}

.product-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.product-content,
.product-sidebar,
.cart-lines,
.review-admin-list {
  display: grid;
  gap: 1rem;
}

.product-icon-row {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.product-icon-row img {
  width: 4.2rem;
  height: 4.2rem;
}

.stat-row span {
  border-left: 3px solid var(--mint);
  padding-left: 0.7rem;
}

.product-overview {
  display: grid;
  gap: 1rem;
  max-width: 78ch;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.7;
}

.product-overview p,
.product-overview h3,
.product-overview ul {
  margin: 0;
}

.product-overview h3 {
  margin-top: 0.25rem;
  color: var(--ink);
  font-size: 1.12rem;
}

.product-overview ul {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.25rem;
}

.product-overview li::marker {
  color: var(--mint);
}

.product-overview strong {
  color: var(--ink);
  font-weight: 900;
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.media-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
}

.doc-panel,
.code-panel,
.review,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.doc-results-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.doc-search-page {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.doc-search {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

[data-doc-results] {
  display: grid;
  gap: 0.45rem;
}

[data-doc-results] a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem;
  background: #f7faf7;
}

.steps {
  padding-left: 1.2rem;
}

.code-panel pre {
  overflow: auto;
  border-radius: 8px;
  padding: 1rem;
  color: #e9f8ee;
  background: #142119;
}

.timeline {
  display: grid;
  gap: 0.8rem;
  border-left: 3px solid #d9eadb;
  padding-left: 1rem;
}

.response {
  margin-top: 0.7rem;
  border-left: 3px solid var(--mint);
  padding-left: 0.8rem;
}

.cart-layout,
.checkout-layout,
.admin-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.cart-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  background: #fff;
}

.summary-panel {
  position: sticky;
  top: 5.5rem;
}

.summary-row.total {
  border-top: 1px solid var(--line);
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  font-size: 1.2rem;
}

.impersonation-banner {
  align-items: center;
  background: rgba(255, 153, 0, 0.14);
  border-bottom: 1px solid rgba(255, 153, 0, 0.35);
  color: var(--text);
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 0.75rem 1rem;
}

.impersonation-banner form {
  margin: 0;
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-action-row form {
  margin: 0;
}

.auth-panel {
  display: grid;
  min-height: 60vh;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-panel form {
  width: min(440px, 100%);
}

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

.account-nav,
.admin-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: min(1200px, calc(100% - 2rem));
  margin: 1rem auto 0;
  max-height: 9rem;
  overflow: auto;
}

.admin-menu {
  position: sticky;
  top: 9.2rem;
  z-index: 35;
  overflow: visible;
  max-height: none;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(28, 47, 38, 0.08);
}

.admin-menu-home,
.admin-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.62rem 0.85rem;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.admin-menu summary::-webkit-details-marker {
  display: none;
}

.admin-menu summary::after {
  margin-left: 0.55rem;
  color: var(--muted);
  content: "v";
  font-size: 0.78rem;
}

.admin-menu-group[open] summary::after {
  transform: rotate(180deg);
}

.admin-menu-home:hover,
.admin-menu summary:hover,
.admin-menu-home.is-active,
.admin-menu summary.is-active {
  border-color: #cfe1d5;
  color: var(--mint-dark);
  background: #edf6ef;
}

.admin-menu-group {
  position: relative;
}

.admin-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 45;
  display: grid;
  min-width: 14rem;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-menu-panel a {
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: transparent;
  white-space: nowrap;
}

.admin-menu-panel a:hover,
.admin-menu-panel a.is-active {
  color: var(--mint-dark);
  background: #edf6ef;
}

.account-nav {
  display: grid;
  align-content: start;
  width: auto;
  margin: 0;
  max-height: none;
  overflow: visible;
}

.admin-nav a,
.account-nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  background: var(--panel);
}

.admin-menu a {
  border: 0;
  background: transparent;
}

.metric-grid {
  padding: 0 0 1rem;
}

.metric-grid strong {
  display: block;
  font-size: 2rem;
}

.form-grid,
.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.release-upload-panel {
  display: grid;
  gap: 1rem;
}

.release-upload-heading {
  align-items: center;
  margin-bottom: 0;
}

.release-upload-heading .button {
  white-space: nowrap;
}

.release-file-field input[type="file"] {
  padding: 0.85rem;
}

.release-history-list {
  display: grid;
  gap: 0.6rem;
}

.release-history-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.35fr) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.45);
}

.release-history-row span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.product-image-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.product-image-card {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.42);
}

.product-image-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-weight: 900;
}

.product-image-preview-icon {
  width: min(7rem, 100%);
  min-height: auto;
  aspect-ratio: 1 / 1;
}

.product-image-preview-wide {
  min-height: auto;
  aspect-ratio: 16 / 8;
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-preview-icon img {
  object-fit: contain;
}

.image-upload-field input[type="file"] {
  padding: 0.85rem;
}

.product-image-card .button {
  width: 100%;
  text-align: center;
}

fieldset {
  display: grid;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

fieldset legend {
  padding: 0 0.45rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.taxonomy-grid fieldset {
  align-content: start;
  gap: 0.45rem;
  min-width: 0;
}

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

.option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.taxonomy-manager {
  gap: 0.55rem;
}

.option-manager {
  min-width: 0;
  overflow: hidden;
}

.taxonomy-row {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
}

.option-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.1fr) minmax(7rem, 0.7fr) auto auto;
  gap: 0.65rem;
  align-items: end;
  border-bottom: 1px solid rgba(118, 136, 124, 0.18);
  padding: 0.25rem 0 0.55rem;
}

.option-row.has-price {
  grid-template-columns: repeat(3, minmax(6.75rem, 1fr));
  row-gap: 0.55rem;
}

.option-row.has-price .option-enabled {
  grid-column: 1 / 2;
}

.option-row.has-price .option-actions {
  grid-column: 2 / -1;
  justify-content: flex-end;
}

.option-mini-field {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.option-mini-field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.option-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.option-enabled {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  min-height: 2.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  white-space: nowrap;
}

.option-enabled input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--mint);
}

.product-option-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.product-option-list div {
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.65);
}

.product-option-list span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-option-list strong {
  color: var(--ink);
  font-size: 1rem;
}

.product-option-list small {
  color: var(--mint-dark);
  font-weight: 900;
}

.dependency-editor {
  display: grid;
  gap: 0.85rem;
}

.dependency-row {
  display: grid;
  grid-template-columns: minmax(10rem, 0.9fr) minmax(12rem, 1fr) minmax(16rem, 1.4fr) auto;
  gap: 0.75rem;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.dependency-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dependency-row textarea {
  min-height: 2.75rem;
}

.dependency-required {
  min-height: 2.75rem;
}

.taxonomy-row .taxonomy-check {
  justify-content: center;
  min-height: 2.4rem;
  padding: 0;
}

.taxonomy-name-input {
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.95rem;
}

.taxonomy-row .link-button,
.option-row .link-button {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  color: var(--mint-dark);
  background: rgba(255, 255, 255, 0.72);
}

.taxonomy-row .link-button.danger,
.option-row .link-button.danger {
  color: var(--red);
}

.taxonomy-add-row {
  border-top: 1px solid var(--line);
  margin-top: 0.35rem;
  padding-top: 0.65rem;
}

form[id^="taxonomy-"],
form[id^="option-"] {
  display: none;
}

.checkbox-option {
  display: flex;
  flex-direction: row;
  gap: 0.65rem;
  align-items: center;
  min-height: 2.35rem;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.checkbox-option:hover {
  background: #f2f7f3;
}

.checkbox-option input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--mint-dark);
}

.checkbox-option span {
  min-width: 0;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  width: min(1200px, calc(100% - 2rem));
  margin: 1rem auto 0;
  border-top: 1px solid var(--line);
  padding: 0.8rem 0;
  background: rgba(251, 252, 247, 0.42);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.sticky-actions .button {
  pointer-events: auto;
}

.danger-zone {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto 2rem;
}

.product-danger-zone {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(183, 58, 58, 0.38);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(183, 58, 58, 0.08);
}

.product-danger-zone h2 {
  margin: 0 0 0.35rem;
}

.danger-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
}

.danger-actions form {
  margin: 0;
}

.danger-button {
  background: var(--red);
}

.setting-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.inline-form {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.inline-form label {
  min-width: 220px;
}

.license-table {
  table-layout: fixed;
}

.license-table th,
.license-table td {
  padding: 0.72rem 0.65rem;
}

.license-table th:nth-child(1),
.license-table td:nth-child(1) {
  width: 11%;
}

.license-table th:nth-child(2),
.license-table td:nth-child(2) {
  width: 18%;
}

.license-table th:nth-child(3),
.license-table td:nth-child(3) {
  width: 10%;
}

.license-table th:nth-child(4),
.license-table td:nth-child(4) {
  width: 17%;
}

.license-table th:nth-child(5),
.license-table td:nth-child(5),
.license-table th:nth-child(6),
.license-table td:nth-child(6),
.license-table th:nth-child(7),
.license-table td:nth-child(7) {
  width: 7%;
}

.license-table th:nth-child(8),
.license-table td:nth-child(8) {
  width: 9%;
}

.license-table th:nth-child(9),
.license-table td:nth-child(9) {
  width: 24%;
}

.license-key {
  display: block;
  max-width: 15rem;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.35;
}

.license-actions-cell {
  min-width: 18rem;
}

.license-action-form {
  display: flex !important;
  gap: 0.45rem !important;
  align-items: center;
  margin: 0;
}

.license-action-form + .license-action-form {
  margin-top: 0.45rem;
}

.license-action-form select,
.license-action-form input {
  width: auto;
  min-width: 0;
  min-height: 2.4rem;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.92rem;
}

.license-action-form select {
  flex: 1 1 8.5rem;
}

.license-action-form input[name="max_ips"] {
  flex: 0 0 4.1rem;
}

.license-action-form input[name="expires_on"] {
  flex: 1 1 7.5rem;
}

.compact-button {
  min-height: 2.4rem;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

.compact-form {
  margin-bottom: 1rem;
}

.coupon-form {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 0.4rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.theme-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  cursor: pointer;
}

.theme-option input {
  width: auto;
}

.theme-option strong,
.theme-option span {
  display: block;
}

.theme-preview-emerald {
  border-color: #a9dac0;
  background: #eefaf2;
}

.theme-preview-midnight {
  color: #eef7f0;
  border-color: #31443a;
  background: #18231b;
}

.muted-copy {
  color: var(--muted);
}

.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.settings-heading h2 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-light {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(183, 58, 58, 0.12);
}

.status-pill-ok {
  color: #187449;
  border-color: rgba(24, 116, 73, 0.35);
}

.status-pill-ok .status-light {
  background: #23a455;
  box-shadow: 0 0 0 3px rgba(35, 164, 85, 0.14);
}

.status-pill-warning {
  color: #b76a00;
  border-color: rgba(183, 106, 0, 0.35);
}

.status-pill-warning .status-light {
  background: #d98a14;
  box-shadow: 0 0 0 3px rgba(217, 138, 20, 0.16);
}

.status-pill-error {
  color: var(--red);
  border-color: rgba(183, 58, 58, 0.35);
}

.archive-list {
  display: grid;
  gap: 1rem;
}

.archive-list .archived-card {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  opacity: 0.92;
}

.archive-media {
  display: block;
  height: 100%;
  min-height: 11rem;
  background: #e8f1e9;
}

.archive-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flash {
  width: min(1200px, calc(100% - 2rem));
  margin: 0.8rem auto;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-weight: 800;
}

.flash.success {
  color: var(--mint-dark);
  background: #e5f3e9;
}

.flash.info {
  color: var(--cyan);
  background: #e4f3f6;
}

.flash.error {
  color: var(--red);
  background: #fdecec;
}

.empty-state {
  display: grid;
  min-height: 50vh;
  place-items: center;
  padding: 2rem;
  text-align: center;
}

.empty-state.small {
  min-height: 14rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 2rem clamp(1rem, 3vw, 2.2rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.marketplace-header {
  display: block;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.header-topline,
.header-category-row {
  display: grid;
  align-items: center;
  gap: 1rem;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.header-topline {
  grid-template-columns: 280px 1fr auto;
  min-height: 6.25rem;
  border-bottom: 1px solid var(--line);
}

.header-category-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 4rem;
  box-shadow: 0 2px 8px rgba(28, 47, 38, 0.08);
}

.marketplace-brand {
  width: fit-content;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.marketplace-brand:hover,
.marketplace-brand:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.marketplace-brand strong {
  color: var(--ink);
  font-size: 1.38rem;
}

.marketplace-brand small {
  font-size: 0.92rem;
}

.brand-cube {
  position: relative;
  display: inline-block;
  width: 2.1rem;
  height: 2.1rem;
  transform: rotate(45deg);
  border-radius: 6px;
  background: #4486c7;
}

.brand-cube::after {
  position: absolute;
  inset: 0.48rem;
  border-radius: 3px;
  background: #fff;
  content: "";
}

.resource-nav,
.auth-nav,
.category-nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.resource-nav {
  justify-content: center;
  gap: 3rem;
}

.auth-nav {
  justify-content: flex-end;
}

.resource-nav a,
.auth-nav a,
.auth-nav button,
.category-nav a,
.cart-link {
  color: #171d1a;
  font-weight: 700;
}

.resource-nav a,
.auth-nav a,
.auth-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  border: 0;
  border-radius: 0;
  padding: 0.75rem 0.9rem;
  background: transparent;
}

.resource-nav a.is-active {
  min-height: 4.2rem;
  border: 1px solid var(--line);
  border-bottom-color: #fff;
  border-radius: 4px 4px 0 0;
  color: #4486c7;
  background: #fff;
}

.resource-nav a:hover,
.auth-nav a:hover,
.auth-nav button:hover,
.category-nav a:hover,
.category-nav a.is-active,
.cart-link:hover,
.cart-link.is-active {
  color: #4486c7;
}

.category-nav {
  gap: 1.65rem;
}

.category-nav a,
.cart-link {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: #5e6877;
  font-size: 1rem;
}

.auth-nav .link-button {
  border: 0;
  padding: 0.75rem 0.9rem;
  color: #171d1a;
  background: transparent;
}

.home-board {
  width: 100%;
  padding: 1rem clamp(1rem, 3vw, 2rem) 2.25rem;
}

.home-hero {
  min-height: 14rem;
  border-radius: 4px;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 10vw, 8.5rem);
  background:
    linear-gradient(90deg, rgba(59, 132, 196, 0.94), rgba(63, 143, 207, 0.88)),
    linear-gradient(135deg, transparent 0 24%, rgba(255, 255, 255, 0.08) 24% 26%, transparent 26% 50%);
  background-color: #4486c7;
}

.home-hero::after {
  opacity: 0.22;
  background-image:
    linear-gradient(30deg, rgba(255, 255, 255, 0.22) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.22) 87.5%, rgba(255, 255, 255, 0.22)),
    linear-gradient(150deg, rgba(255, 255, 255, 0.22) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.22) 87.5%, rgba(255, 255, 255, 0.22)),
    linear-gradient(30deg, rgba(255, 255, 255, 0.22) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.22) 87.5%, rgba(255, 255, 255, 0.22)),
    linear-gradient(150deg, rgba(255, 255, 255, 0.22) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.22) 87.5%, rgba(255, 255, 255, 0.22));
  background-position: 0 0, 0 0, 2.5rem 4.4rem, 2.5rem 4.4rem;
  background-size: 5rem 8.8rem;
}

.home-hero-copy {
  place-items: center;
  max-width: 100%;
}

.home-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  line-height: 1.12;
}

.hero-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.45rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.hero-stats strong {
  color: #fff;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 230px) 125px;
  gap: 0.6rem;
  width: min(100%, 880px);
  margin: 0 auto;
}

.hero-search input,
.hero-search select {
  min-height: 3.55rem;
  border: 0;
  border-radius: 4px;
  padding: 0 1rem;
  color: var(--ink);
  background: #fff;
  font-size: 1.05rem;
}

.hero-search button {
  min-height: 3.55rem;
  border: 0;
  border-radius: 4px;
  padding: 0 1.35rem;
  color: #fff;
  background: #304761;
  font-weight: 900;
  cursor: pointer;
}

body.theme-obsidian {
  --ink: #f5fbf6;
  --muted: #a8bed0;
  --line: #243445;
  --paper: #071018;
  --panel: #101a24;
  --mint: #82ff68;
  --mint-dark: #65e65f;
  --gold: #ff9f1a;
  --cyan: #70c8ff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
  color: var(--ink);
  background:
    radial-gradient(circle at 0 18%, rgba(255, 159, 26, 0.10), transparent 26rem),
    radial-gradient(circle at 78% 8%, rgba(87, 153, 255, 0.12), transparent 30rem),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(120deg, #071018 0%, #0a1620 48%, #0d1b25 100%);
  background-attachment: fixed;
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
}

body.theme-obsidian .marketplace-header {
  border-bottom-color: #1f2c3b;
  background: rgba(6, 13, 20, 0.96);
}

body.theme-obsidian .header-topline,
body.theme-obsidian .header-category-row {
  border-color: #1f2c3b;
}

body.theme-obsidian .header-category-row {
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.wordmark {
  display: grid;
  gap: 0.1rem;
  line-height: 1;
  letter-spacing: 0.18rem;
}

.wordmark strong {
  color: #82ff68;
  font-size: 1.45rem;
  font-weight: 1000;
  letter-spacing: 0.12rem;
}

.wordmark small {
  display: block;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 1000;
  letter-spacing: 0.34rem;
}

.marketplace-brand .wordmark small {
  display: block;
}

body.theme-obsidian .resource-nav a,
body.theme-obsidian .auth-nav a,
body.theme-obsidian .auth-nav button,
body.theme-obsidian .category-nav a,
body.theme-obsidian .cart-link {
  color: #eef7ff;
}

body.theme-obsidian .resource-nav a.is-active {
  border-color: #26384a;
  border-bottom-color: #0b141d;
  color: #82ff68;
  background: #0b141d;
}

body.theme-obsidian .resource-nav a:hover,
body.theme-obsidian .auth-nav a:hover,
body.theme-obsidian .auth-nav button:hover,
body.theme-obsidian .category-nav a:hover,
body.theme-obsidian .category-nav a.is-active,
body.theme-obsidian .cart-link:hover,
body.theme-obsidian .cart-link.is-active {
  color: #82ff68;
}

body.theme-obsidian .content-block,
body.theme-obsidian .product-card,
body.theme-obsidian .summary-panel,
body.theme-obsidian .product-sidebar section,
body.theme-obsidian .cart-line,
body.theme-obsidian .collection-card,
body.theme-obsidian .auth-panel form,
body.theme-obsidian .filters,
body.theme-obsidian .metric-grid div,
body.theme-obsidian .rank-list a,
body.theme-obsidian .mini-grid a,
body.theme-obsidian .saved-item,
body.theme-obsidian .doc-panel,
body.theme-obsidian .code-panel,
body.theme-obsidian .review,
body.theme-obsidian .notice,
body.theme-obsidian .admin-menu,
body.theme-obsidian .directory-card,
body.theme-obsidian .home-link-card,
body.theme-obsidian .home-focus {
  border-color: #26384a;
  color: var(--ink);
  background: rgba(16, 26, 36, 0.94);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

body.theme-obsidian .release-history-row {
  border-color: #2d4054;
  background: rgba(12, 24, 36, 0.72);
}

body.theme-obsidian .product-image-card,
body.theme-obsidian .product-image-preview {
  border-color: #2d4054;
  background: rgba(12, 24, 36, 0.72);
}

body.theme-obsidian a.dependency-name,
body.theme-obsidian .dependency-url {
  color: #82ff68;
}

body.theme-obsidian .cart-line strong,
body.theme-obsidian .cart-line span {
  color: #eef7ff;
}

body.theme-obsidian .cart-line small {
  color: #a8bed0;
}

body.theme-obsidian input,
body.theme-obsidian select,
body.theme-obsidian textarea {
  border-color: #2d4054;
  color: #f5fbf6;
  background: #0b1620;
}

body.theme-obsidian input::placeholder,
body.theme-obsidian textarea::placeholder {
  color: #7f96a8;
}

body.theme-obsidian .hero-search input,
body.theme-obsidian .hero-search select {
  color: #17201b;
  background: #fff;
}

body.theme-obsidian .admin-menu-panel,
body.theme-obsidian .suggestions {
  border-color: #26384a;
  background: #0d1823;
}

body.theme-obsidian .admin-menu-panel a,
body.theme-obsidian .suggestions a {
  color: #eef7ff;
}

body.theme-obsidian .admin-menu-home:hover,
body.theme-obsidian .admin-menu summary:hover,
body.theme-obsidian .admin-menu-home.is-active,
body.theme-obsidian .admin-menu summary.is-active,
body.theme-obsidian .admin-menu-panel a:hover,
body.theme-obsidian .admin-menu-panel a.is-active,
body.theme-obsidian .checkbox-option:hover {
  color: #82ff68;
  background: rgba(130, 255, 104, 0.08);
  border-color: #365948;
}

body.theme-obsidian .sticky-actions {
  border-color: #243445;
  background: rgba(7, 16, 24, 0.42);
}

body.theme-obsidian .button.ghost {
  border-color: #82ff68;
  color: #071018;
  background: #82ff68;
}

body.theme-obsidian .button.ghost:hover,
body.theme-obsidian .button.ghost:focus-visible {
  border-color: #ff9f1a;
  color: #071018;
  background: #ff9f1a;
}

body.theme-obsidian .sticky-actions .button {
  border: 1px solid #82ff68;
  color: #071018;
  background: #82ff68;
}

body.theme-obsidian .sticky-actions .button:hover,
body.theme-obsidian .sticky-actions .button:focus-visible {
  border-color: #ff9f1a;
  color: #071018;
  background: #ff9f1a;
}

body.theme-obsidian .taxonomy-row .link-button,
body.theme-obsidian .option-row .link-button {
  border-color: #2d4054;
  color: #82ff68;
  background: #0b1620;
}

body.theme-obsidian .taxonomy-row .link-button:hover,
body.theme-obsidian .taxonomy-row .link-button:focus-visible,
body.theme-obsidian .option-row .link-button:hover,
body.theme-obsidian .option-row .link-button:focus-visible {
  border-color: #82ff68;
  color: #071018;
  background: #82ff68;
}

body.theme-obsidian .taxonomy-row .link-button.danger,
body.theme-obsidian .option-row .link-button.danger {
  color: #ff8f8f;
}

body.theme-obsidian .taxonomy-row .link-button.danger:hover,
body.theme-obsidian .taxonomy-row .link-button.danger:focus-visible,
body.theme-obsidian .option-row .link-button.danger:hover,
body.theme-obsidian .option-row .link-button.danger:focus-visible {
  border-color: #ff8f8f;
  color: #071018;
  background: #ff8f8f;
}

body.theme-obsidian .option-row {
  border-color: rgba(45, 64, 84, 0.7);
}

body.theme-obsidian .product-option-list div {
  border-color: #243445;
  background: rgba(11, 22, 32, 0.78);
}

body.theme-obsidian .product-option-list strong {
  color: #eef7ff;
}

.profile-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 18px;
  object-fit: cover;
  background: var(--panel);
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  color: #071018;
  background: #82ff68;
  font-size: 2.4rem;
  font-weight: 900;
}

.profile-badge,
.activity-type {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(130, 255, 104, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: #82ff68;
  background: rgba(130, 255, 104, 0.08);
  font-weight: 900;
}

.profile-form {
  margin: 1rem 0 1.6rem;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
}

.badge-choice,
.notification-row,
.activity-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(12, 24, 35, 0.48);
}

.badge-choice {
  display: grid;
  gap: 0.25rem;
}

.badge-choice span,
.notification-meta,
.activity-item time {
  color: var(--muted);
  font-size: 0.95rem;
}

.badge-choice.locked {
  opacity: 0.55;
}

.notification-preferences {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.notification-list,
.activity-timeline {
  display: grid;
  gap: 0.75rem;
}

.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
}

.notification-row p,
.activity-item p {
  margin: 0.25rem 0;
  color: var(--muted);
}

.notification-meta {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  text-transform: capitalize;
}

.activity-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 760px) {
  .profile-card,
  .notification-row,
  .activity-item {
    grid-template-columns: 1fr;
  }

  .notification-meta {
    justify-items: start;
  }
}

.header-topline {
  grid-template-columns: minmax(220px, 0.8fr) minmax(340px, 1fr) minmax(190px, auto);
  min-height: 5.15rem;
}

@media (max-width: 560px) {
  .dependency-heading {
    display: grid;
  }

  .dependency-status {
    width: fit-content;
  }

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

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

  .option-row {
    grid-template-columns: 1fr;
  }

  .option-row.has-price {
    grid-template-columns: 1fr;
  }

  .option-row.has-price .option-enabled,
  .option-row.has-price .option-actions {
    grid-column: auto;
  }

  .dependency-row {
    grid-template-columns: 1fr;
  }

  .release-upload-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .release-upload-heading .button {
    width: 100%;
    text-align: center;
  }

  .release-history-row {
    grid-template-columns: 1fr;
  }

  .product-image-preview-icon {
    width: min(8rem, 100%);
  }

  .option-actions {
    justify-content: stretch;
  }

  .option-actions .link-button {
    flex: 1 1 auto;
  }
}

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

.marketplace-brand strong {
  font-size: 1.55rem;
}

.marketplace-brand small,
.brand-cube {
  display: none;
}

.brand-cube::after {
  content: none;
}

.resource-nav {
  flex-wrap: nowrap;
  gap: clamp(1.4rem, 4vw, 3.4rem);
}

.resource-nav a.is-active {
  min-height: 5.15rem;
}

.home-focus {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: clamp(1rem, 3vw, 1.5rem);
  padding: clamp(0.9rem, 2vw, 1.15rem);
}

.home-focus-copy h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.home-focus-media img {
  height: clamp(8.5rem, 17vw, 12rem);
  aspect-ratio: auto;
}

@media (max-width: 900px) {
  .header-topline,
  .header-category-row {
    grid-template-columns: 1fr;
    align-items: start;
    padding-block: 1rem;
  }

  .resource-nav,
  .auth-nav,
  .category-nav {
    justify-content: flex-start;
    gap: 0.9rem;
  }

  .resource-nav a.is-active {
    min-height: 3rem;
    border-bottom-color: var(--line);
    border-radius: 4px;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 30rem;
    padding: 2rem 1.2rem;
  }

  .site-header,
  .hero-store,
  .product-hero,
  .bundle-hero,
  .catalog-layout,
  .product-layout,
  .cart-layout,
  .checkout-layout,
  .account-layout,
  .admin-grid,
  .split-sections {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    gap: 0.75rem;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

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

  .main-nav a,
  .main-nav button {
    min-height: 2.35rem;
  }

  .home-board {
    width: min(100% - 1rem, 1220px);
  }

  .home-product-grid,
  .home-collection-grid,
  .home-focus {
    grid-template-columns: 1fr;
  }

  .home-focus-copy {
    padding-left: 0;
  }

  .archive-list .archived-card {
    grid-template-columns: 1fr;
  }

  .archive-media {
    height: auto;
    min-height: 0;
  }

  .archive-media img {
    aspect-ratio: 16 / 8;
  }

  .home-hero {
    min-height: 28rem;
    padding: 3rem 1.2rem 1.4rem;
  }

  .home-hero::after {
    background: linear-gradient(180deg, rgba(10, 23, 16, 0.86), rgba(10, 23, 16, 0.5));
  }

  .cart-line {
    grid-template-columns: auto 1fr;
  }

  .summary-panel {
    position: static;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-filter-form {
    grid-template-columns: 1fr;
  }

  .doc-search-page {
    grid-template-columns: 1fr;
  }
}

.builder-list {
  display: grid;
  gap: 0.75rem;
}

.builder-row,
.builder-edit-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.builder-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.builder-row.is-dragging {
  opacity: 0.55;
}

.builder-row.is-drop-target {
  border-color: var(--accent);
}

.builder-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.builder-edit-card {
  padding: 1rem;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
}

.score-pill.good {
  background: rgba(131, 255, 92, 0.18);
  color: #8cff65;
}

.score-pill.warn {
  background: rgba(255, 196, 87, 0.18);
  color: #ffd36d;
}

.score-pill.bad {
  background: rgba(255, 128, 128, 0.18);
  color: #ff9a9a;
}

.compact-list {
  margin: 0;
  padding-left: 1rem;
}

.recommendation-reason {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: -0.25rem;
}

.gift-line-form,
.inline-admin-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.gift-line-form input,
.inline-admin-form input,
.inline-admin-form select {
  min-width: 9rem;
}

.countdown-panel,
[data-countdown] {
  display: inline-block;
  color: var(--accent);
  font-weight: 800;
}

.subscription-offers {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.subscription-offers form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.gift-claim-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.admin-actions-cell {
  display: grid;
  gap: 0.65rem;
}

@media (max-width: 900px) {
  .builder-edit-grid {
    grid-template-columns: 1fr;
  }
}
