:root {
  color-scheme: dark;
  --ink: #e9fff9;
  --muted: #9bb4af;
  --dim: #6f8783;
  --bg: #061014;
  --bg-deep: #03090c;
  --panel: #0b181d;
  --panel-strong: #102329;
  --line: #1f3a3f;
  --line-bright: #2e5b5e;
  --mint: #52e6c2;
  --mint-dark: #092d28;
  --amber: #ffbd4a;
  --danger: #ff786e;
  --focus: #a9ffe9;
  --shadow: 0 24px 70px rgb(0 0 0 / 32%);
  --radius: 0.8rem;
  --max: 92rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--bg-deep);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgb(82 230 194 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(82 230 194 / 3%) 1px, transparent 1px),
    radial-gradient(circle at 12% -10%, rgb(40 160 138 / 18%), transparent 34rem),
    var(--bg);
  background-size: 2.5rem 2.5rem, 2.5rem 2.5rem, auto, auto;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent 0, rgb(3 9 12 / 62%) 72%, var(--bg-deep) 100%);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration-color: rgb(82 230 194 / 45%);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--mint);
  text-decoration-color: currentColor;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

:focus-visible {
  outline: 0.18rem solid var(--focus);
  outline-offset: 0.2rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.4rem;
  color: var(--bg-deep);
  background: var(--focus);
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem max(1rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgb(82 230 194 / 14%);
  background: rgb(3 9 12 / 88%);
  backdrop-filter: blur(1rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand b {
  color: var(--mint);
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 0.18rem;
  padding: 0.35rem;
  border: 1px solid var(--line-bright);
  border-radius: 0.35rem;
  background: var(--mint-dark);
  box-shadow: inset 0 0 1rem rgb(82 230 194 / 8%);
}

.brand-mark i {
  display: block;
  height: 45%;
  background: var(--mint);
}

.brand-mark i:nth-child(2) {
  height: 100%;
}

.brand-mark i:nth-child(3) {
  height: 70%;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2vw, 1.6rem);
}

.site-header nav a {
  padding-block: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--ink);
}

.catalog-shell,
.listing-shell,
.detail-shell,
.prose-shell,
.empty-page {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.catalog-shell,
.listing-shell {
  padding-block: clamp(2rem, 5vw, 4.75rem) 5rem;
}

.catalog-intro {
  display: grid;
  align-items: end;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.catalog-intro > p {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--mint);
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

h1 {
  max-width: 20ch;
  margin-bottom: 0;
  font-size: clamp(2rem, 6vw, 4.7rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.35rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--line);
  border-top: 0.2rem solid var(--mint);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(16 35 41 / 95%), rgb(8 21 25 / 96%));
  box-shadow: var(--shadow);
}

.filter-panel > div {
  min-width: 0;
}

.search-field {
  grid-column: 1 / -1;
}

.filter-panel label {
  display: block;
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 750;
  letter-spacing: 0.035em;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 3rem;
  padding: 0.66rem 0.8rem;
  border: 1px solid var(--line-bright);
  border-radius: 0.45rem;
  color: var(--ink);
  background: #071216;
}

.filter-panel input::placeholder {
  color: var(--dim);
}

.filter-panel input:hover,
.filter-panel select:hover {
  border-color: #4e7776;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--mint);
}

.catalog-status {
  display: flex;
  min-height: 4.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}

.catalog-status p {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.84rem;
}

.reset-button,
.load-more {
  min-height: 2.75rem;
  border: 1px solid var(--line-bright);
  border-radius: 0.45rem;
  color: var(--ink);
  background: transparent;
  font-weight: 750;
}

.reset-button {
  padding-inline: 0.9rem;
}

.reset-button:hover,
.load-more:hover {
  border-color: var(--mint);
  color: var(--mint);
  background: rgb(82 230 194 / 5%);
}

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

.script-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(16 35 41 / 95%), rgb(8 20 24 / 96%));
  box-shadow: 0 0 0 transparent;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.script-card:hover {
  border-color: var(--line-bright);
  box-shadow: 0 1.2rem 3rem rgb(0 0 0 / 24%);
  transform: translateY(-0.15rem);
}

.card-media {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle, rgb(82 230 194 / 16%) 0.08rem, transparent 0.1rem) 0 0 / 1rem 1rem,
    #091b20;
  text-decoration: none;
}

.card-media::after {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  width: 0.55rem;
  height: 0.55rem;
  border: 0.12rem solid var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0.8rem var(--mint);
  content: "";
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.script-card:hover .card-media img {
  transform: scale(1.025);
}

.card-placeholder {
  color: rgb(82 230 194 / 68%);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0.16em;
}

.card-body {
  display: flex;
  min-height: 17rem;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.card-meta,
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--dim);
  font-size: 0.78rem;
}

.card-meta a {
  overflow: hidden;
  color: var(--mint);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-meta time {
  flex: none;
}

.card-body h3 {
  margin: 0.85rem 0 0.7rem;
}

.card-body h3 a {
  text-decoration: none;
}

.card-body > p {
  display: -webkit-box;
  margin: 0.9rem 0 1.2rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.93rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  min-height: 1.65rem;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border: 1px solid #3c5354;
  border-radius: 999px;
  color: #c4d4d0;
  background: #122328;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tag-key {
  border-color: rgb(255 189 74 / 48%);
  color: var(--amber);
  background: rgb(62 44 12 / 58%);
}

.tag-verified {
  border-color: rgb(82 230 194 / 48%);
  color: var(--mint);
  background: var(--mint-dark);
}

.card-foot {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.text-link {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.load-zone {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
}

.load-more {
  min-width: 12rem;
  padding-inline: 1.25rem;
}

[hidden] {
  display: none !important;
}

.empty-state,
.notice {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--line-bright);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgb(7 18 22 / 76%);
}

.empty-state strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 1.1rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-block: 2rem;
  color: var(--dim);
  font-size: 0.85rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.detail-shell {
  padding-bottom: 5rem;
}

.detail-layout {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgb(15 33 39 / 98%), rgb(7 17 21 / 98%));
  box-shadow: var(--shadow);
}

.detail-media {
  display: grid;
  min-height: 16rem;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: #07171c;
}

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

.detail-placeholder {
  padding: 2rem;
  color: rgb(82 230 194 / 58%);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

.detail-copy {
  padding: clamp(1.2rem, 4vw, 3rem);
}

.detail-copy h1 {
  max-width: 17ch;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
}

.detail-description {
  max-width: 67ch;
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.facts > div {
  min-width: 0;
  padding: 0.85rem;
  background: #09171b;
}

.facts dt {
  color: var(--dim);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-weight: 750;
}

.primary-cta {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border: 1px solid var(--mint);
  border-radius: 0.45rem;
  color: #02110e;
  background: var(--mint);
  box-shadow: 0 0.8rem 2rem rgb(82 230 194 / 14%);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.primary-cta:hover {
  color: #02110e;
  background: #7bf2d6;
}

.monetized-note {
  max-width: 66ch;
  margin: 0.75rem 0 0;
  color: var(--dim);
  font-size: 0.8rem;
}

.content-note {
  max-width: 62rem;
  margin: 2rem auto 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-left: 0.2rem solid var(--amber);
  background: rgb(255 189 74 / 6%);
}

.content-note h2 {
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
}

.content-note p {
  margin: 0;
  color: var(--muted);
}

.listing-heading {
  margin-bottom: 2rem;
}

.listing-heading h1 {
  margin-bottom: 0.75rem;
}

.listing-heading > p:last-child {
  color: var(--muted);
}

.prose-shell,
.empty-page {
  max-width: 58rem;
  padding-block: clamp(3rem, 8vw, 7rem);
}

.prose-shell h1,
.empty-page h1 {
  margin-bottom: 1rem;
}

.prose-shell .lead,
.empty-page > p:not(.eyebrow) {
  max-width: 52ch;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.prose-shell section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.prose-shell section h2 {
  margin-bottom: 0.7rem;
  font-size: 1.35rem;
}

.prose-shell section p {
  max-width: 68ch;
  color: var(--muted);
}

.site-footer {
  display: flex;
  width: min(calc(100% - 2rem), var(--max));
  min-height: 8rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-inline: auto;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.82rem;
}

.site-footer p {
  max-width: 50rem;
  margin: 0;
}

.site-footer strong {
  color: var(--muted);
}

@media (min-width: 40rem) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .catalog-intro {
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
  }
}

@media (min-width: 64rem) {
  .filter-panel {
    grid-template-columns: minmax(17rem, 2.2fr) repeat(5, minmax(7rem, 1fr));
    align-items: end;
  }

  .search-field {
    grid-column: auto;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(28rem, 0.92fr);
    align-items: stretch;
  }

  .detail-media {
    min-height: 39rem;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
}

@media (min-width: 86rem) {
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 39.99rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0.35rem;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
  }

  .catalog-intro {
    margin-bottom: 1.4rem;
  }

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

  .primary-cta {
    width: 100%;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .brand-mark,
  .filter-panel,
  .script-card,
  .detail-layout {
    border: 1px solid CanvasText;
  }
}
