:root {
    --ink: #090b0f;
    --panel: #10141a;
    --panel-raised: #151a22;
    --panel-soft: #0d1015;
    --line: rgba(255,255,255,.09);
    --line-strong: rgba(255,255,255,.16);
    --text: #f3f4f6;
    --soft: #bac0c9;
    --muted: #7f8896;
    --faint: #59616d;
    --gold: #d8b56c;
    --gold-high: #f0d48d;
    --gold-low: #a88343;
    --gold-wash: rgba(216,181,108,.1);
    --green: #73d4a4;
    --blue: #92b9ff;
    --red: #e69696;
    --display: "SF Pro Display", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --ui: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
    --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background: var(--ink);
    color: var(--text);
    font-family: var(--ui);
    letter-spacing: -.012em;
    -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--gold-high);
    outline-offset: 3px;
}
.store-shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.eyebrow {
    margin: 0 0 13px;
    color: var(--gold);
    font: 700 10px var(--mono);
    letter-spacing: .18em;
    text-transform: uppercase;
}
.store-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(900px 460px at 80% 12%, rgba(216,181,108,.13), transparent 62%),
        radial-gradient(620px 340px at 2% -10%, rgba(255,255,255,.05), transparent 62%),
        #0b0e13;
}
.store-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .24;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(90deg,transparent,black 40%,black);
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0,1fr) 360px;
    gap: 72px;
    align-items: center;
    min-height: 390px;
    padding: 68px 0 72px;
}
.hero-copy h1 {
    margin: 0;
    max-width: 830px;
    font: 690 clamp(45px,6vw,76px)/.98 var(--display);
    letter-spacing: -.062em;
}
.hero-copy h1 span { color: #8d96a4; }
.primary-action, .secondary-action {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 19px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: inherit;
    cursor: pointer;
    font-size: 13px;
    font-weight: 720;
    text-decoration: none;
    transition: transform .18s var(--ease), filter .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.primary-action {
    color: #171107;
    background: linear-gradient(180deg,var(--gold-high),var(--gold) 58%,var(--gold-low));
    box-shadow: 0 14px 34px rgba(216,181,108,.13), 0 0 0 1px rgba(0,0,0,.5);
}
.primary-action:hover { filter: brightness(1.06); transform: translateY(-1px); }
.secondary-action { border-color: var(--line-strong); background: rgba(255,255,255,.035); }
.secondary-action:hover { border-color: rgba(216,181,108,.4); background: var(--gold-wash); }
.library-summary { padding: 24px 0; border-top: 1px solid rgba(216,181,108,.3); border-bottom: 1px solid var(--line-strong); }
.library-summary > p { margin: 0 0 22px; color: var(--muted); font: 700 9px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.library-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.library-stats > div { min-width: 0; }
.library-stats > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.library-stats strong { display: block; font: 680 48px/1 var(--display); letter-spacing: -.06em; }
.library-stats span { display: block; margin-top: 10px; color: var(--soft); font-size: 12px; font-weight: 650; }
.library-stats small { display: block; margin-top: 5px; color: var(--faint); font-size: 9px; }

.catalog-heading h2, .skills-copy h2 { margin: 0; font: 660 clamp(30px,4vw,42px)/1.05 var(--display); letter-spacing: -.045em; }
.text-link { color: var(--soft); font-size: 12px; font-weight: 650; text-decoration: none; }
.text-link span { margin-left: 5px; color: var(--gold); }
.text-link:hover { color: var(--gold-high); }

.catalog-section { padding: 72px 0 84px; background: var(--ink); }
.catalog-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 31px; }
.catalog-heading > div > p:last-child { max-width: 620px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.breadcrumbs { display: none; margin-bottom: 21px; color: var(--muted); font: 650 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.breadcrumbs.visible { display: flex; align-items: center; gap: 8px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-high); }
.filter-toggle { display: none; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); color: var(--text); cursor: pointer; font-size: 12px; font-weight: 680; }
.filter-toggle span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; border-radius: 999px; background: var(--gold); color: #171107; font-size: 10px; }
.catalog-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 38px; align-items: start; }
.filter-panel { position: sticky; top: 24px; }
.filter-panel-head { display: none; }
.filter-panel fieldset { margin: 0; padding: 0 0 21px; border: 0; border-bottom: 1px solid var(--line); }
.filter-panel fieldset + fieldset { padding-top: 22px; }
.filter-panel legend { width: 100%; margin: 0 0 11px; padding: 0; color: var(--muted); font: 750 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.filter-panel label { display: flex; align-items: center; gap: 9px; min-height: 31px; color: #b4bbc5; cursor: pointer; font-size: 12px; }
.filter-panel label:hover { color: var(--text); }
.filter-panel label span { flex: 1; }
.filter-panel label b { color: var(--faint); font: 500 10px var(--mono); }
.filter-panel input { appearance: none; width: 14px; height: 14px; margin: 0; border: 1px solid var(--line-strong); background: var(--panel); }
.filter-panel input[type="checkbox"] { border-radius: 3px; }
.filter-panel input[type="radio"] { border-radius: 50%; }
.filter-panel input:checked { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 3px var(--ink); }
.filter-categories { max-height: 240px; overflow: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.clear-button { margin-top: 18px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.clear-button:hover { color: var(--gold-high); }
.catalog-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) 190px; gap: 11px; }
.search-box { position: relative; display: flex; align-items: center; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.search-box:focus-within { border-color: rgba(216,181,108,.44); box-shadow: 0 0 0 3px rgba(216,181,108,.06); }
.search-box svg { width: 18px; height: 18px; margin-left: 14px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0 12px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-box input::placeholder { color: #656d79; }
.search-box kbd { margin-right: 11px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--faint); background: var(--panel); font: 10px var(--mono); }
.sort-control { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; height: 46px; padding-left: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); color: var(--muted); font-size: 10px; }
.sort-control select { min-width: 0; height: 100%; padding: 0 8px; border: 0; outline: 0; background: transparent; color: var(--text); cursor: pointer; font-size: 11px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 9px; border: 1px solid rgba(216,181,108,.2); border-radius: 999px; background: var(--gold-wash); color: var(--gold-high); font-size: 10px; }
.filter-chip button { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; line-height: 1; }
.results-line { display: flex; justify-content: space-between; gap: 20px; margin: 20px 0 13px; color: var(--muted); font-size: 10px; }
.results-line p { margin: 0; }
.product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.product-grid[aria-busy="true"]::before { content: "Loading scripts…"; grid-column: 1/-1; min-height: 280px; display: grid; place-items: center; color: var(--muted); font: 11px var(--mono); }
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 355px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(145deg,#12161d,#0e1116);
    box-shadow: 0 20px 45px rgba(0,0,0,.16);
    transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.product-card:hover { transform: translateY(-3px); border-color: rgba(216,181,108,.33); box-shadow: 0 28px 60px rgba(0,0,0,.3); }
.card-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #080a0d; }
.card-media::after { content: ""; position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(transparent,rgba(8,10,13,.65)); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .45s var(--ease); }
.product-card:hover .card-media img { transform: scale(1.04); }
.card-badges { position: absolute; z-index: 1; top: 11px; left: 11px; right: 11px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.access-badge, .state-badge { padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(8,10,13,.82); backdrop-filter: blur(8px); color: var(--soft); font: 750 8px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.access-badge.free { border-color: rgba(115,212,164,.32); color: #98e0bc; }
.access-badge.paid { border-color: rgba(216,181,108,.34); color: var(--gold-high); }
.state-badge.sold { color: var(--red); }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.card-category { color: var(--muted); font: 650 8px var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.card-copy h3 { margin: 8px 0 0; font: 650 17px/1.15 var(--display); letter-spacing: -.025em; }
.card-copy p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.card-skills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; min-height: 23px; }
.skill-tag { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: #929aa6; background: rgba(255,255,255,.02); font-size: 8px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 16px; }
.card-price { color: var(--gold-high); font: 680 13px var(--mono); }
.card-price.free { color: var(--green); }
.view-script { display: inline-flex; align-items: center; gap: 7px; color: var(--soft); font-size: 10px; font-weight: 680; text-decoration: none; }
.view-script span { color: var(--gold); }
.product-hitbox { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.product-hitbox:focus-visible { outline: 2px solid var(--gold-high); outline-offset: -4px; }
.product-card .view-script { pointer-events: none; }
.empty-results { min-height: 360px; padding: 78px 24px; border: 1px dashed var(--line-strong); border-radius: 14px; text-align: center; }
.empty-results > span { color: var(--gold); font: 700 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.empty-results h3 { margin: 15px 0 0; font: 650 24px var(--display); }
.empty-results p { margin: 10px auto 23px; color: var(--muted); font-size: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 28px; }
.page-button { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--soft); cursor: pointer; font-size: 10px; }
.page-button:hover, .page-button[aria-current="page"] { border-color: rgba(216,181,108,.38); color: var(--gold-high); background: var(--gold-wash); }
.page-button:disabled { opacity: .35; cursor: default; }

.skills-section { padding: 82px 0; border-top: 1px solid var(--line); background: #0d1015; }
.skills-layout { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 72px; align-items: start; }
.skills-copy { position: sticky; top: 28px; }
.skills-copy p:not(.eyebrow) { margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.skill-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.skill-link { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 91px; padding: 10px 5px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); color: var(--soft); text-align: center; text-decoration: none; transition: border-color .16s,background .16s,transform .16s; }
.skill-link:hover, .skill-link.active { transform: translateY(-2px); border-color: rgba(216,181,108,.32); background: var(--gold-wash); color: var(--gold-high); }
.skill-link img { width: 29px; height: 29px; object-fit: contain; image-rendering: auto; }
.skill-link span { display: block; width: 100%; overflow: hidden; margin-top: 8px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.skill-link b { margin-top: 3px; color: var(--faint); font: 500 8px var(--mono); }
.store-footer { border-top: 1px solid var(--line); background: var(--ink); color: var(--faint); font-size: 9px; }
.store-footer .store-shell { display: flex; justify-content: space-between; gap: 20px; padding: 25px 0 32px; }
.store-footer span:last-child { font-family: var(--mono); letter-spacing: .1em; }

.scrim { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: rgba(3,5,8,.82); backdrop-filter: blur(15px); }
.scrim[hidden] { display: none; }
.product-dialog { position: relative; display: grid; grid-template-columns: minmax(0,1.06fr) minmax(360px,.94fr); width: min(1000px,100%); max-height: calc(100vh - 44px); overflow: auto; border: 1px solid var(--line-strong); border-radius: 20px; background: #10141a; box-shadow: 0 50px 130px rgba(0,0,0,.65); }
.modal-close { position: absolute; z-index: 4; top: 14px; right: 14px; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(8,10,13,.72); color: var(--soft); cursor: pointer; font-size: 18px; backdrop-filter: blur(8px); }
.modal-close:hover { border-color: rgba(216,181,108,.4); color: white; }
.modal-gallery { padding: 14px; border-right: 1px solid var(--line); background: #090c10; }
.modal-hero { aspect-ratio: 16/11; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #07090c; }
.modal-hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.modal-hero:has(img[data-kind="gui"]) { aspect-ratio: auto; }
.modal-hero img[data-kind="gui"] { height: auto; object-fit: contain; }
.modal-hero img[data-kind="artwork"] { object-fit: contain; }
.image-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 9px; font-size: 11px; color: var(--muted); }
.image-caption a { color: var(--gold); text-decoration: none; }
.modal-thumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.modal-thumbs button { width: 70px; height: 47px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); cursor: pointer; }
.modal-thumbs button[aria-current="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.modal-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.modal-copy { display: flex; flex-direction: column; padding: 34px 31px 31px; }
.modal-meta { display: flex; gap: 7px; color: var(--muted); font: 650 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.modal-copy h2 { margin: 13px 42px 0 0; font: 670 33px/1.04 var(--display); letter-spacing: -.045em; }
.modal-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 17px 0; }
.product-price, .meta-pill { padding: 6px 9px; border: 1px solid rgba(216,181,108,.27); border-radius: 999px; background: var(--gold-wash); color: var(--gold-high); font: 680 10px var(--mono); }
.meta-pill { border-color: var(--line); background: rgba(255,255,255,.025); color: var(--soft); }
.meta-pill.stock { color: var(--green); }
.meta-pill.stock.low { color: var(--gold-high); }
.meta-pill.stock.out { color: var(--red); }
.modal-lede { margin: 0; color: var(--soft); font-size: 13px; line-height: 1.64; }
.modal-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.modal-copy ul { display: grid; gap: 8px; margin: 20px 0 0; padding: 19px 0 0; border-top: 1px solid var(--line); list-style: none; }
.modal-copy li { position: relative; padding-left: 15px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.modal-copy li::before { content: ""; position: absolute; left: 0; top: .67em; width: 7px; height: 1px; background: var(--gold); }
.modal-action { display: grid; gap: 10px; margin-top: auto; padding-top: 28px; }
.modal-action .primary-action { width: 100%; }
.modal-action .primary-action[aria-disabled="true"] { pointer-events: none; color: var(--muted); background: #262b33; box-shadow: none; }
.modal-action small { color: var(--faint); font-size: 9px; text-align: center; }

@media (max-width: 1080px) {
    .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .skill-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; gap: 38px; min-height: 0; padding: 62px 0; }
    .library-summary { max-width: 560px; }
    .catalog-layout { grid-template-columns: 1fr; gap: 0; }
    .filter-toggle { display: inline-flex; align-items: center; }
    .filter-panel { position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(350px,calc(100% - 36px)); padding: 20px 22px 40px; overflow-y: auto; border-left: 1px solid var(--line-strong); background: #0d1117; box-shadow: -30px 0 80px rgba(0,0,0,.6); transform: translateX(105%); transition: transform .25s var(--ease); }
    .filter-panel.open { transform: translateX(0); }
    .filter-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
    .filter-panel-head button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--soft); cursor: pointer; }
    .skills-layout { grid-template-columns: 1fr; gap: 34px; }
    .skills-copy { position: static; max-width: 560px; }
    .skill-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
    .product-dialog { grid-template-columns: 1fr; max-width: 670px; }
    .modal-gallery { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
    .store-shell { width: calc(100% - 28px); }
    .store-hero::after { display: none; }
    .hero-inner { padding: 47px 0 52px; }
    .hero-copy h1 { font-size: 47px; }
    .library-summary { padding: 20px 0; }
    .library-stats strong { font-size: 42px; }
    .catalog-section { padding: 54px 0 62px; }
    .catalog-heading { align-items: start; }
    .catalog-toolbar { grid-template-columns: 1fr; }
    .sort-control { display: flex; }
    .sort-control select { flex: 1; }
    .product-grid { grid-template-columns: 1fr; }
    .product-card { min-height: 0; }
    .skills-section { padding: 58px 0; }
    .skill-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .skill-link { min-height: 85px; }
    .store-footer .store-shell { display: block; }
    .store-footer span { display: block; margin-top: 5px; }
    .scrim { align-items: end; padding: 0; }
    .product-dialog { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; border-bottom: 0; }
    .modal-copy { padding: 27px 22px 28px; }
    .modal-copy h2 { font-size: 29px; }
}
@media (max-width: 390px) {
    .hero-copy h1 { font-size: 41px; }
    .skill-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .catalog-heading { display: block; }
    .filter-toggle { margin-top: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* Self-service trial stays beside the purchase controls, not in the review area. */
.product-trial { margin-top: 22px; padding: 20px; border: 1px solid #665332; border-radius: 14px; background: linear-gradient(135deg, #292416, #111820); }
.product-trial[hidden] { display: none; }
.product-trial h3 { margin: 0 0 10px; color: #eed08b; }
.product-trial p, .product-trial small { line-height: 1.6; }
.product-trial small { display: block; color: #aab2bc; }
.product-trial .primary-action { margin-top: 14px; cursor: pointer; width: 100%; white-space: normal; }
.product-trial [role="alert"] { color: #ffb4a8; }
