:root {
  --bg: #0b0d13;
  --bg-panel: #12151f;
  --bg-card: #161a24;
  --bg-elev-2: #1c2029;
  --border: #262b38;
  --text: #e9eaf0;
  --text-dim: #8b91a3;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.15);
  --ok: #4ade80;
  --pending: #fbbf24;
  --unsupported: #f87171;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.brand-slash,
.brand-count {
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.brand-text {
  font-size: 15px;
  font-weight: 700;
}

.topbar-search {
  flex: 1;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
}

.search-icon {
  color: var(--text-dim);
  font-size: 12px;
}

.topbar-search input {
  flex: 1;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.topbar-actions,
.toolbar-right,
.card-actions,
.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-actions {
  margin-left: auto;
}

.topbar-btn,
.action-btn,
.icon-btn,
.sidebar-all,
.sidebar-item,
.view-btn {
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
}

.topbar-btn,
.action-btn {
  padding: 8px 13px;
  font-size: 13px;
}

.topbar-btn:hover,
.topbar-btn.active,
.action-btn:hover,
.sidebar-item:hover,
.sidebar-item.active,
.sidebar-all.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.page-frame {
  display: grid;
  grid-template-columns: 160px minmax(0, 1500px) 160px;
  gap: 16px;
  width: 100%;
  max-width: 1876px;
  margin: 0 auto;
  align-items: start;
  padding: 0 12px;
}

.ad-rail {
  position: sticky;
  top: 88px;
  align-self: start;
  width: 160px;
  max-width: 160px;
  padding-top: 20px;
  color: #555c70;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-rail span {
  width: 160px;
  max-width: 100%;
  height: 600px;
  max-height: calc(100vh - 112px);
  border: 1px dashed #303746;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdf-cta { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:18px 0; padding:20px 22px; border:1px solid rgba(139,92,246,.45); border-radius:14px; background:linear-gradient(135deg,rgba(139,92,246,.14),rgba(28,32,41,.82)); }
.pdf-cta h2,.pdf-cta p { margin:0 0 7px; }
.pdf-cta p { color:var(--text-dim); max-width:850px; line-height:1.5; }
.pdf-kicker { color:var(--accent)!important; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.pdf-button { display:inline-flex; justify-content:center; align-items:center; min-height:44px; padding:10px 16px; border:1px solid var(--accent); border-radius:9px; background:var(--accent); color:white; font-weight:800; cursor:pointer; white-space:nowrap; }
.pdf-button:disabled { cursor:not-allowed; opacity:.48; }
.pdf-cta-compact { margin-top:22px; padding:17px 19px; }
.pdf-cta-compact h2 { font-size:18px; }
.product-page { min-width:0; padding:28px 0 60px; }
.product-hero { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,390px); gap:28px; padding:32px; border:1px solid var(--border); border-radius:16px; background:var(--bg-card); }
.product-hero h1 { margin:6px 0 12px; font-size:clamp(34px,5vw,62px); line-height:1.02; }
.product-lead { max-width:720px; color:var(--text-dim); font-size:19px; line-height:1.55; }
.free-note { margin-top:24px; padding:16px; border-left:3px solid var(--ok); background:rgba(74,222,128,.08); line-height:1.5; }
.purchase-card { display:flex; flex-direction:column; gap:14px; align-self:start; padding:22px; border:1px solid var(--border); border-radius:14px; background:var(--bg-elev-2); }
.product-price { font-size:44px; }
.consent-row { display:grid; grid-template-columns:auto 1fr; gap:10px; color:var(--text-dim); font-size:12px; line-height:1.45; }
.consent-row input { margin-top:3px; }
.checkout-note,.license-summary { margin:0; color:var(--text-dim); font-size:12px; line-height:1.45; }
.license-summary a { color:var(--accent); text-decoration:underline; }
.product-section { margin-top:24px; padding:28px; border:1px solid var(--border); border-radius:14px; background:var(--bg-panel); }
.benefit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:18px; }
.benefit-card { padding:14px; border:1px solid var(--border); border-radius:9px; background:var(--bg-card); }
.web-pdf-compare { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:24px; }
.web-pdf-compare article { padding:24px; border:1px solid var(--border); border-radius:14px; background:var(--bg-panel); }
.web-pdf-compare article>span { color:var(--accent); font-size:12px; font-weight:800; letter-spacing:.1em; }
.legal-page { width:min(900px,calc(100% - 32px)); margin:30px auto; }
@media (max-width: 760px) { .pdf-cta,.product-hero { grid-template-columns:1fr; flex-direction:column; align-items:stretch; padding:18px; } .pdf-button { width:100%; white-space:normal; text-align:center; } .benefit-grid,.web-pdf-compare { grid-template-columns:1fr; } .product-page { padding-top:16px; } }

.layout {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

.sidebar {
  width: 260px;
  min-width: 260px;
  flex-shrink: 0;
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 65px;
  max-height: calc(100vh - 65px);
  overflow-y: auto;
}

.sidebar-all {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-section h2 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  color: var(--text-dim);
  text-align: left;
  background: transparent;
}

.sidebar-item-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--accent-soft);
}

.sidebar-item-icon.platform-icon {
  background: color-mix(in srgb, var(--platform-color), transparent 75%);
}

.sidebar-item-icon.ok {
  background: rgba(74, 222, 128, 0.18);
}

.sidebar-item-icon.pending {
  background: rgba(251, 191, 36, 0.18);
}

.sidebar-item-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-item-count,
.sidebar-count {
  color: var(--text-dim);
  font-size: 12px;
}

.sidebar-help {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.5;
}

.sidebar-help summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 60px;
}

.catalog-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 8px 0 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.catalog-intro h1,
.detail-card h1 {
  margin: 0;
  letter-spacing: 0;
}

.catalog-intro h1 {
  max-width: 860px;
  font-size: 34px;
  line-height: 1.12;
}

.catalog-intro p,
.detail-description,
.detail-section p {
  color: var(--text-dim);
  line-height: 1.6;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
  min-width: 320px;
}

.intro-stats span {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text-dim);
  font-size: 12px;
}

.intro-stats strong {
  display: block;
  color: var(--text);
  font-size: 22px;
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.results-summary {
  color: var(--text-dim);
  font-size: 13px;
}

#sortSelect,
.compare-select select {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius);
}

.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-btn {
  border: 0;
  border-radius: 0;
  padding: 7px 10px;
  color: var(--text-dim);
}

.view-btn.active {
  background: var(--accent);
  color: #10121a;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.grid.list-view {
  grid-template-columns: 1fr;
}

.artifact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 292px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grid.list-view .artifact-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.artifact-card:hover,
.detail-card:hover {
  border-color: #394153;
}

.card-head,
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.artifact-id {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn.active {
  color: var(--pending);
  border-color: var(--pending);
}

.card-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  color: var(--text-dim);
  cursor: pointer;
}

.page-btn:hover,
.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #10121a;
}

.card-title:hover {
  color: var(--accent);
}

.technical-name {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
}

.card-description {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.5;
  font-size: 13.5px;
}

.card-meta,
.platform-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-meta span {
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.platform-row {
  margin-top: auto;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  color: var(--text-dim);
  font-size: 12px;
  background: var(--bg-elev-2);
}

.platform-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--platform-color);
}

.platform-pill strong {
  color: var(--pending);
  font-weight: 700;
}

.status-verified strong {
  color: var(--ok);
}

.status-unsupported strong {
  color: var(--unsupported);
}

.card-actions {
  margin-top: 6px;
}

.empty-state {
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.detail-layout {
  grid-column: 2;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 24px 20px 70px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--accent);
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.detail-header {
  justify-content: flex-start;
}

.detail-header .icon-btn {
  margin-left: auto;
}

.detail-card h1 {
  font-size: 32px;
}

.detail-section {
  margin-top: 24px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.prompt-block {
  margin: 0;
  white-space: pre-wrap;
  background: #0f121a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  color: #d8daf0;
  line-height: 1.55;
  overflow-x: auto;
}

.results-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.result-panel {
  min-height: 190px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.result-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.pending-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-dim);
  text-align: center;
}

.status-badge {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.status-pending {
  color: var(--pending);
  background: rgba(251, 191, 36, 0.12);
}

.status-tested,
.status-review {
  color: var(--ok);
  background: rgba(74, 222, 128, 0.12);
}

.status-review {
  color: var(--unsupported);
  background: rgba(248, 113, 113, 0.12);
}

.tested-label {
  margin: -4px 0 12px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 800;
}

.result-panel img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.result-demo-link {
  display: inline-flex;
  margin-top: 12px;
}

.compare-select {
  display: grid;
  gap: 8px;
  max-width: 460px;
  color: var(--text-dim);
}

.admin-page {
  background: #0b0d13;
}

.admin-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.admin-header,
.admin-toolbar,
.admin-actions,
.admin-current-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-header h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.admin-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 10px 12px;
}

.admin-progress span {
  color: var(--text-dim);
}

.admin-toolbar {
  margin-bottom: 14px;
}

.admin-validator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}

.admin-main-panel,
.admin-capture-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px;
}

.admin-current-row {
  justify-content: space-between;
  margin-bottom: 10px;
}

.admin-main-panel h2 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: 0;
}

.admin-main-panel h3 {
  margin: 0;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.admin-actions {
  margin-top: 16px;
}

.admin-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 1px dashed #3d4658;
  border-radius: var(--radius);
  background: #10131b;
  color: var(--text-dim);
  text-align: center;
  padding: 18px;
  cursor: pointer;
}

.admin-dropzone.dragging,
.admin-dropzone:focus {
  outline: 0;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.admin-preview {
  margin: 16px 0 0;
}

.admin-file-info {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #10131b;
  padding: 10px 12px;
  color: var(--text-dim);
  font-size: 12px;
}

.admin-file-info p {
  margin: 6px 0;
  line-height: 1.45;
}

.admin-file-info .action-btn {
  display: inline-flex;
  margin-right: 6px;
  margin-top: 4px;
}

.admin-preview img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0f121a;
}

.admin-preview figcaption,
.admin-save-state {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

.admin-save-state[data-kind="ok"] {
  color: var(--ok);
}

.admin-save-state[data-kind="error"] {
  color: var(--unsupported);
}

.review-grid { display: grid; gap: 18px; }
.review-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); padding: 18px; }
.review-card h2 { margin: 10px 0 2px; }
.review-frame { width: 100%; height: 1400px; max-height: none; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.review-text-frame { height: 560px; }
.review-image { display: block; width: 100%; max-height: 700px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius); }

.demo-layout {
  grid-column: 2;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.demo-header {
  margin-bottom: 16px;
}

.demo-header h1 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

.demo-frame {
  display: block;
  width: 100%;
  height: min(1000px, calc(100vh - 180px));
  min-height: 680px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

@media (max-width: 1700px) {
  .page-frame {
    grid-template-columns: 1fr;
    max-width: 1500px;
  }

  .ad-rail {
    display: none;
  }

  .layout,
  .detail-layout {
    grid-column: 1;
  }
}

@media (min-width: 1701px) {
  .ad-left {
    grid-column: 1;
    grid-row: 1;
  }

  .layout,
  .detail-layout {
    grid-column: 2;
    grid-row: 1;
  }

  .ad-right {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 900px) {
  .topbar {
    gap: 12px;
    padding: 12px;
  }

  .topbar-search {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .layout {
    display: block;
  }

  .sidebar {
    width: auto;
    min-width: 0;
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .catalog-intro {
    grid-template-columns: 1fr;
  }

  .intro-stats,
  .results-compare {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .grid.list-view .artifact-card {
    display: flex;
  }

  .admin-shell {
    padding: 16px 12px 48px;
  }

  .admin-validator {
    grid-template-columns: 1fr;
  }

  .demo-layout {
    grid-column: 1;
    padding: 16px 12px 40px;
  }

  .demo-frame {
    min-height: 620px;
  }
}

@media (max-width: 560px) {
  .content,
  .detail-layout {
    padding: 16px 12px 48px;
  }

  .catalog-intro h1,
  .detail-card h1 {
    font-size: 26px;
  }

  .artifact-card,
  .detail-card {
    padding: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .platform-pill {
    width: 100%;
    justify-content: space-between;
  }
}
