/* Rust Plugin Store — one stylesheet, no build step.
   Tokens first; every colour, radius and font below comes from :root.
   Dark only, on purpose: it is a gamer storefront and the product art is dark. */

:root {
  --bg-0: #060608;
  --bg-1: #0C0C10;
  --bg-2: #131318;
  --card: #16161C;
  --card-2: #1B1B23;
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .11);

  --accent: #CE422B;
  --accent-2: #FF6A3D;
  --accent-grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --accent-soft: rgba(206, 66, 43, .14);

  --carbon: #4ade80;
  --oxide: #f97316;
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #60a5fa;

  --text: #F0F0F2;
  --text-2: #9A9AAE;
  --text-3: #5E5E72;

  --font-display: 'Orbitron', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --nav-h: 64px;
  --wrap: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg-0); color: var(--text);
  font: 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
code, kbd, pre, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

.icon { width: 1em; height: 1em; flex: none; vertical-align: -.125em; }
.icon.ok { color: var(--ok); }
.icon.star { color: var(--warn); }

.h-display {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; font-size: clamp(26px, 3.4vw, 40px);
}
.h-section { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 18px; }
.grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font: 600 12px/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2);
}

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  font: 700 12px/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-busy { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 16px rgba(206, 66, 43, .28); }
.btn-primary:hover { box-shadow: 0 6px 22px rgba(255, 106, 61, .38); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07); }
.btn-success { background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .35); color: var(--carbon); }
.btn-success:hover { background: rgba(74, 222, 128, .2); }
.btn-danger { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .35); color: var(--bad); }
.btn-danger:hover { background: rgba(248, 113, 113, .18); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 11px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--r-sm); background: transparent; border: 1px solid transparent; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { color: var(--text); background: rgba(255, 255, 255, .06); border-color: var(--line); }
.btn-icon.danger:hover { color: var(--bad); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-2); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------------------------------------------------- pills */
.pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font: 600 11px/1 var(--font-body); letter-spacing: .02em; border: 1px solid;
}
.pill-carbon { color: var(--carbon); border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); }
.pill-oxide { color: var(--oxide); border-color: rgba(249, 115, 22, .35); background: rgba(249, 115, 22, .08); }
.pill-neutral { color: var(--text-2); border-color: var(--line-2); background: rgba(255, 255, 255, .03); }
.pill-lg { height: 30px; padding: 0 14px; font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 4px;
  font: 700 10px/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase;
  background: var(--card-2); color: var(--text); border: 1px solid var(--line-2);
}
.badge-new { background: var(--accent-grad); border-color: transparent; color: #fff; }
.badge-hot { background: linear-gradient(135deg, #b91c1c, #f97316); border-color: transparent; color: #fff; }
.badge-updated { background: rgba(96, 165, 250, .14); border-color: rgba(96, 165, 250, .4); color: var(--info); }
.badge-soon { background: rgba(255, 255, 255, .06); color: var(--text-2); }
.badge-owned { background: rgba(74, 222, 128, .14); border-color: rgba(74, 222, 128, .4); color: var(--carbon); }
.badge-inline { vertical-align: middle; margin-left: 10px; font-size: 10px; }
.badge-xs { padding: 2px 5px; font-size: 9px; }

/* status badges for tables — keep in step with Enums */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-paid, .status-active, .status-published, .status-processed { color: var(--ok); }
.status-pending, .status-coming_soon, .status-received, .status-partial_refund { color: var(--warn); }
.status-refunded, .status-revoked, .status-failed, .status-banned { color: var(--bad); }
.status-draft, .status-archived, .status-ignored { color: var(--text-3); }

/* ---------------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(6, 6, 8, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand-mark { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; background: var(--accent-grad); color: #fff; }
.brand-mark .icon { width: 18px; height: 18px; }
.brand-name { font: 800 14px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; }
.nav-link { padding: 8px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; text-decoration: none !important; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav-link.is-active { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); }
.nav-user:hover { border-color: var(--line-2); color: var(--text); }
.nav-user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--accent-grad); color: #fff; font: 700 12px/1 var(--font-display); }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow);
}
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--text-2); background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none !important; font-size: 14px;
}
.menu-pop a:hover, .menu-pop button:hover { background: rgba(255, 255, 255, .05); color: var(--text); }

/* --------------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; border-bottom: 1px solid var(--line); }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 420px at 78% 10%, rgba(255, 106, 61, .20), transparent 60%),
    radial-gradient(700px 380px at 10% 90%, rgba(206, 66, 43, .14), transparent 60%),
    linear-gradient(180deg, rgba(6, 6, 8, .2), var(--bg-0) 92%),
    var(--bg-1);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-title { font: 800 clamp(36px, 6.4vw, 76px)/1.02 var(--font-display); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 20px; }
.hero-sub { max-width: 560px; font-size: 18px; color: var(--text-2); }
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.page-hero { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; }
.link-more:hover { color: var(--accent-2); }

/* ---------------------------------------------------------- how it works */
.how { padding-top: 40px; padding-bottom: 8px; }
.how-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; counter-reset: step; }
.how-step { display: flex; gap: 16px; padding: 22px 24px; background: var(--bg-1); position: relative; counter-increment: step; }
.how-step::after { content: '0' counter(step); position: absolute; right: 18px; top: 14px; font: 800 28px/1 var(--font-display); color: rgba(255, 255, 255, .04); }
.how-step strong { font: 700 13px/1.3 var(--font-display); letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.how-step p { margin: 0; color: var(--text-2); font-size: 14px; }
.how-icon { flex: none; width: 42px; height: 42px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-2); }
.how-icon .icon { width: 20px; height: 20px; }

/* ----------------------------------------------------------- filter panel */
.catalogue { padding-top: 48px; padding-bottom: 72px; }
.glass {
  background: rgba(22, 22, 28, .6); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.filter-panel { display: flex; align-items: center; gap: 16px; padding: 10px; margin-bottom: 24px; position: sticky; top: calc(var(--nav-h) + 10px); z-index: 20; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  background: transparent; border: 1px solid transparent; color: var(--text-2); cursor: pointer; white-space: nowrap; font-weight: 500; font-size: 14px;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.tab.is-active { color: var(--text); background: rgba(255, 255, 255, .07); border-color: var(--line-2); }
.tab-count { font: 500 11px/1 var(--font-mono); padding: 3px 6px; border-radius: 4px; background: rgba(255, 255, 255, .06); color: var(--text-2); }
.tab.is-active .tab-count { background: var(--accent); color: #fff; }
.search { position: relative; display: flex; align-items: center; width: 280px; flex: none; }
.search > .icon { position: absolute; left: 12px; color: var(--text-3); }
.search input {
  width: 100%; height: 36px; padding: 0 36px 0 36px; border-radius: var(--r-sm);
  background: var(--bg-1); border: 1px solid var(--line-2); outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-kbd { position: absolute; right: 10px; font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-3); }
.search input:focus + .search-kbd { display: none; }
.grid-empty { text-align: center; padding: 24px; }

/* ------------------------------------------------------------ product card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.pcard {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .25s ease, filter .25s ease;
}
.pcard:hover { transform: translateY(-4px); border-color: rgba(255, 106, 61, .45); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.pcard.is-dim { opacity: .22; filter: grayscale(.8); transform: none; }
.pcard.is-dim:hover { opacity: .5; }
.pcard-cover { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--bg-2); overflow: hidden; }
.pcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pcard:hover .pcard-cover img { transform: scale(1.04); }
.pcard-cover .badge { position: absolute; top: 12px; right: 12px; }
.pcard-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-3); background: radial-gradient(circle at 50% 40%, var(--card-2), var(--bg-2)); }
.pcard-placeholder .icon { width: 56px; height: 56px; }
.pcard-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.pcard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pcard-title { font: 700 16px/1.25 var(--font-display); letter-spacing: .04em; text-transform: uppercase; margin: 0; }
.pcard-title a { color: var(--text); }
.pcard-title a:hover { color: var(--accent-2); text-decoration: none; }
.pcard-ver { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.pcard-desc { color: var(--text-2); font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-stats { list-style: none; margin: 0; padding: 8px 0; display: flex; gap: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pcard-stats li { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font: 500 12px/1 var(--font-mono); }
.pcard-stats .icon { color: var(--text-3); }
.pcard-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13px; color: var(--text-2); }
.pcard-features li { display: flex; gap: 8px; align-items: flex-start; }
.pcard-features .icon { color: var(--accent-2); margin-top: 3px; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.pcard-soon { border-style: dashed; border-color: var(--line-2); background: transparent; }
.pcard-soon .pcard-cover img { filter: grayscale(.6) brightness(.7); }
.pcard-empty { min-height: 180px; justify-content: center; text-align: center; grid-column: 1 / -1; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price-now { font: 800 20px/1 var(--font-display); letter-spacing: .02em; }
.price-was { color: var(--text-3); font-size: 13px; }
.price-lg .price-now { font-size: 32px; }

/* ----------------------------------------------------------------- detail */
.detail { padding-top: 28px; padding-bottom: 72px; }
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--text-3); margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a { color: var(--text-2); }
.detail-head { margin-bottom: 22px; }
.detail-title { margin-bottom: 8px; }
.detail-sub { font-size: 17px; color: var(--text-2); max-width: 760px; }
.detail-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.gallery { margin-bottom: 32px; }
.gallery-stage { aspect-ratio: 16 / 9; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-stage img, .gallery-stage video { width: 100%; height: 100%; object-fit: contain; }
.gallery-stage iframe { width: 100%; height: 100%; border: 0; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 10; padding: 0; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; background: var(--bg-2); cursor: pointer; opacity: .6; transition: opacity .15s, border-color .15s; }
.thumb:hover { opacity: 1; }
.thumb.is-active { border-color: var(--accent-2); opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-video { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.thumb-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0, 0, 0, .3); }

.detail-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr) 320px; grid-template-areas: 'toc body buy'; gap: 36px; align-items: start; }
.toc { grid-area: toc; position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.toc-label { font: 700 10px/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin: 0 0 10px 14px; }
.toc-link { padding: 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); font-size: 14px; text-decoration: none !important; }
.toc-link:hover { color: var(--text); }
.toc-link.is-active { color: var(--text); border-left-color: var(--accent-2); }
.detail-body { grid-area: body; min-width: 0; }
.doc-section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.doc-section:last-child { border-bottom: 0; }
.buy-panel { grid-area: buy; position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.buy-note { font-size: 13px; margin: 0; }
.buy-trust { display: flex; gap: 8px; font-size: 12px; margin: 0; }
.buy-trust .icon { color: var(--accent-2); margin-top: 2px; }
.spec { margin: 6px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.spec > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec dt { color: var(--text-2); }
.spec dd { margin: 0; display: flex; align-items: center; gap: 6px; }

.prose { color: #d6d6de; }
.prose h3 { font: 700 15px/1.3 var(--font-display); letter-spacing: .06em; text-transform: uppercase; margin: 1.6em 0 .6em; color: var(--text); }
.prose h4, .prose h5 { font-size: 15px; margin: 1.4em 0 .5em; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose code { font-size: .88em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; color: #ffb59c; }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--bg-1); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-2); }
.prose-sm { font-size: 14px; }
.prose-sm p:last-child, .prose-sm ul:last-child { margin-bottom: 0; }
.prose-sm ul { margin: 0; }
pre.code { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.55; color: #e4e4ea; }
pre.code code { background: none; border: 0; padding: 0; color: inherit; }
.feature-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.feature-list li { padding: 12px 14px 12px 38px; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin: 0; }
.feature-list li::before { content: ''; position: absolute; left: 14px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg); }

/* ------------------------------------------------------------------ cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel { padding: 22px; }
.panel + .panel { margin-top: 20px; }
.form-row > .panel { margin-top: 0; }
.form-row + .panel, .form-row + .card, .card + .form-row { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-title { font: 700 13px/1.3 var(--font-display); letter-spacing: .1em; text-transform: uppercase; }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 700 10px/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 12px 14px; background: var(--bg-1); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .015); }
.table .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table a.row-link { color: var(--text); font-weight: 600; }
.table-empty { padding: 36px; text-align: center; color: var(--text-2); }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--text); }

/* ------------------------------------------------------------------ forms */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span, .label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; }
.hint { font-size: 12px; color: var(--text-3); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-sm); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.textarea.code, .input.mono { font-family: var(--font-mono); font-size: 13px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-error { color: var(--bad); font-size: 13px; margin: 0; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ auth */
.auth { display: flex; justify-content: center; padding: 64px 16px 96px; }
.auth-card { width: 100%; max-width: 420px; padding: 30px; }
.auth-card h1 { font: 800 22px/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .06em; }
.auth-alt { text-align: center; margin: 18px 0 0; font-size: 14px; color: var(--text-2); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line-2); font-size: 14px; }
.notice .icon { margin-top: 3px; }
.notice-ok { border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .07); }
.notice-ok .icon { color: var(--ok); }
.notice-warn { border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .07); }
.notice-warn .icon { color: var(--warn); }
.notice-bad { border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .07); }
.notice-bad .icon { color: var(--bad); }

/* ---------------------------------------------------------------- account */
.acct { padding-top: 36px; padding-bottom: 72px; }
.acct-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.acct-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.acct-tabs a { padding: 10px 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; font-weight: 500; }
.acct-tabs a:hover { color: var(--text); }
.acct-tabs a.is-active { color: var(--text); border-bottom-color: var(--accent-2); }
.owned-list { display: grid; gap: 14px; }
.owned { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px; }
.owned-cover { width: 96px; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--bg-2); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.owned-cover img { width: 100%; height: 100%; object-fit: cover; }
.owned h3 { font: 700 15px/1.3 var(--font-display); letter-spacing: .05em; text-transform: uppercase; margin: 0 0 6px; }
.owned-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.owned-meta .mono { color: var(--text); }
.owned-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.owned.is-revoked { opacity: .6; }
.update-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); margin-right: 6px; }
.key { font-family: var(--font-mono); font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); }
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state .icon { width: 42px; height: 42px; color: var(--text-3); margin: 0 auto 14px; }
.steam-box { display: flex; align-items: center; gap: 14px; }
.steam-box img { width: 48px; height: 48px; border-radius: var(--r-sm); }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent-2); animation: spin 0.9s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ admin */
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - var(--nav-h)); }
.admin-side { border-right: 1px solid var(--line); background: var(--bg-1); padding: 20px 12px; position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; }
.admin-side p { font: 700 10px/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin: 18px 12px 8px; }
.admin-side p:first-child { margin-top: 4px; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none !important; font-size: 14px; }
.admin-side a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.admin-side a.is-active { color: var(--text); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent-2); }
.admin-main { padding: 28px 32px 72px; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-head h1 { font: 800 22px/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 180px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px; }
.stat-label { font: 700 10px/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.stat-value { font: 800 26px/1.2 var(--font-display); margin-top: 10px; }
.stat-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.pager-btns { display: flex; gap: 6px; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.editor-side { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 20px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-item { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); aspect-ratio: 1; cursor: grab; }
.media-item.is-dragging { opacity: .4; }
.media-item.is-over { border-color: var(--accent-2); box-shadow: 0 0 0 2px var(--accent-soft); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.media-item .media-kind { position: absolute; left: 8px; top: 8px; }
.media-item .media-cover { position: absolute; left: 8px; bottom: 8px; }
.media-tools { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.media-item:hover .media-tools, .media-item:focus-within .media-tools { opacity: 1; }
.media-tools .btn-icon { background: rgba(6, 6, 8, .8); color: var(--text); }
.dropzone { display: block; border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 22px; text-align: center; color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent-2); background: var(--accent-soft); color: var(--text); }
.dropzone .icon { width: 26px; height: 26px; margin: 0 auto 8px; display: block; }
.version-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--bg-1); }
.version-card + .version-card { margin-top: 12px; }
.version-card.is-latest { border-color: rgba(96, 165, 250, .35); }
.version-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.file-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); margin-top: 6px; font-size: 13px; }
.file-row .select { min-height: 30px; padding: 3px 28px 3px 8px; font-size: 12px; background-position: calc(100% - 15px) 12px, calc(100% - 10px) 12px; }
.cap-table td, .cap-table th { padding: 7px 10px; font-size: 12px; }
.trace-result { margin-top: 20px; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; word-break: break-word; }
.verdict { font: 800 16px/1.3 var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.verdict-match { color: var(--ok); }
.verdict-conflict { color: var(--warn); }
.verdict-none { color: var(--bad); }

/* ------------------------------------------------------------------ invoice */
.invoice { max-width: 820px; margin: 36px auto 72px; padding: 40px; background: #fff; color: #111; border-radius: var(--r); font-size: 14px; }
.invoice h1 { font: 800 24px/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: #111; }
.invoice .muted { color: #666; }
.invoice-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.invoice table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.invoice th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #666; border-bottom: 2px solid #111; padding: 8px 6px; }
.invoice td { border-bottom: 1px solid #ddd; padding: 10px 6px; }
.invoice .num { text-align: right; font-family: var(--font-mono); }
.invoice .total td { border-bottom: 0; font-weight: 700; }
.invoice-actions { max-width: 820px; margin: 24px auto 0; display: flex; gap: 10px; justify-content: flex-end; padding: 0 16px; }

/* ----------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); background: var(--bg-1); margin-top: auto; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 36px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand p { margin: 2px 0 0; font-size: 13px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--text-2); font-size: 14px; }
.footer-legal { grid-column: 1 / -1; font-size: 12px; margin: 0; }

.error-page { text-align: center; padding-top: 96px; padding-bottom: 120px; }
.error-code { font-size: clamp(64px, 12vw, 120px); margin: 0; line-height: 1; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ----------------------------------------------------------------- toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px; animation: toast-in .2s ease; }
.toast .icon { color: var(--ok); margin-top: 3px; }
.toast.is-error { border-color: rgba(248, 113, 113, .4); }
.toast.is-error .icon { color: var(--bad); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.boot-slot { max-width: var(--wrap); margin: 16px auto 0; padding: 0 24px; }
.boot-error { padding: 14px 16px; border-radius: var(--r); background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .35); color: #fecaca; font-size: 14px; }
.boot-error pre { white-space: pre-wrap; margin: 8px 0 0; font-size: 12px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: 'toc toc' 'body buy'; gap: 24px; }
  .toc { position: sticky; top: var(--nav-h); z-index: 10; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); background: rgba(6, 6, 8, .9); backdrop-filter: blur(12px); padding: 6px 0; scrollbar-width: none; }
  .toc-label { display: none; }
  .toc-link { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; margin: 0; }
  .toc-link.is-active { border-bottom-color: var(--accent-2); }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .how-strip { grid-template-columns: 1fr; }
  .filter-panel { flex-direction: column; align-items: stretch; position: static; }
  .search { width: 100%; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'buy' 'toc' 'body'; }
  .buy-panel { position: static; }
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: static; height: auto; display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-side p { display: none; }
  .admin-side a { white-space: nowrap; }
  .admin-main { padding: 20px 16px 56px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
}
@media (max-width: 560px) {
  .wrap, .nav-inner { padding: 0 16px; }
  .brand-name { display: none; }
  .nav-user-name { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .hero { padding: 56px 0 44px; }
  .hero-sub { font-size: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .owned { grid-template-columns: 64px minmax(0, 1fr); }
  .owned-cover { width: 64px; }
  .owned-actions { grid-column: 1 / -1; flex-direction: row; }
  .owned-actions .btn { flex: 1; }
  .auth-card { padding: 22px; }
  .panel { padding: 16px; }
  .invoice { padding: 22px; margin: 16px; }
  .file-row { grid-template-columns: minmax(0, 1fr) auto; }
  .file-row > .icon, .file-row > .faint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: #fff; }
  .nav, .footer, .invoice-actions, .toasts, .skip { display: none !important; }
  .invoice { margin: 0; box-shadow: none; padding: 0; max-width: none; }
}
.versions td.prose { min-width: 220px; }
