/* ==========================================================================
   TurboSketchUp — turbosketchup.com
   Architectural CAD Precision design system
   Dark obsidian default + Architectural Paper Light theme
   ========================================================================== */

/* ---------- Design tokens ---------- */

:root {
  color-scheme: dark;

  --bg: #080a0e;
  --bg-2: #0d1118;
  --bg-3: #0a0e14;
  --panel: #121824;
  --panel-2: #161f2e;
  --panel-3: #1b2536;

  --line: #1e2836;
  --line-2: #2c3a4d;
  --line-3: #3b4c63;

  --text: #e9eff8;
  --text-strong: #ffffff;
  --muted: #9aa9bd;
  --dim: #6d7d93;

  --accent: #ff6422;
  --accent-2: #ff9248;
  --accent-3: #ffb27a;
  --accent-soft: rgba(255, 100, 34, 0.12);
  --accent-line: rgba(255, 100, 34, 0.38);

  --axis-red: #ef4444;
  --axis-green: #22c55e;
  --axis-blue: #3b82f6;

  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, 0.12);
  --warn: #f59e0b;
  --danger: #ef4444;

  --header-bg: rgba(8, 10, 14, 0.82);
  --glass: rgba(18, 24, 36, 0.72);
  --glass-2: rgba(255, 255, 255, 0.04);
  --hover: rgba(255, 255, 255, 0.06);
  --grid-line: rgba(148, 178, 214, 0.055);
  --grid-line-strong: rgba(148, 178, 214, 0.1);

  --btn-top: #ff8a4c;
  --btn-bottom: #f4551a;
  --btn-ink: #1a0c04;

  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.35);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --max: 1200px;

  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fixed dark CAD viewport tokens — never themed, so geometry always pops */
  --stage-bg: #0a0f16;
  --stage-bg-2: #0e1622;
  --stage-line: rgba(148, 178, 214, 0.1);
  --stage-line-2: rgba(148, 178, 214, 0.18);
  --stage-text: #dbe7f5;
  --stage-muted: #8ea3bd;
  --stage-border: rgba(148, 178, 214, 0.16);
  --stage-grid: 24px;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f8fb;
  --bg-2: #eef1f6;
  --bg-3: #ffffff;
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --panel-3: #eaeff7;

  --line: #dfe5ee;
  --line-2: #c9d3e0;
  --line-3: #aebbcb;

  --text: #0b1220;
  --text-strong: #050a14;
  --muted: #4c5a6d;
  --dim: #6b7a8e;

  --accent: #e8541a;
  --accent-2: #c2410c;
  --accent-3: #9a3412;
  --accent-soft: rgba(232, 84, 26, 0.1);
  --accent-line: rgba(232, 84, 26, 0.3);

  --header-bg: rgba(247, 248, 251, 0.86);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-2: rgba(11, 18, 32, 0.03);
  --hover: rgba(11, 18, 32, 0.05);
  --grid-line: rgba(11, 18, 32, 0.05);
  --grid-line-strong: rgba(11, 18, 32, 0.085);

  --btn-top: #f97316;
  --btn-bottom: #e04a12;
  --btn-ink: #1a0c04;

  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --shadow-sm: 0 10px 26px rgba(15, 23, 42, 0.1);
}

/* ---------- Reset & base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

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

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

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

button { cursor: pointer; }

h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--text-strong);
}

h1 { font-size: clamp(2.15rem, 4.6vw, 3.65rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); }
h3 { font-size: 1.16rem; }
h4 { font-size: 0.98rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }

strong { color: var(--text-strong); }

::selection { background: rgba(255, 100, 34, 0.32); color: #fff; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Utilities ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--accent);
  color: var(--btn-ink);
  padding: 10px 16px;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; top: 0; }

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 0.86rem; }
.mono { font-family: var(--mono); }

.accent {
  background: linear-gradient(100deg, var(--accent-2), var(--accent) 62%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.lede {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  color: var(--btn-ink);
  box-shadow: 0 8px 22px rgba(255, 100, 34, 0.26);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(255, 100, 34, 0.38); }

.btn-ghost {
  background: var(--glass-2);
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--hover); border-color: var(--line-3); }

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 8px 10px;
}
.btn-quiet:hover { color: var(--text-strong); background: var(--hover); }

.btn-sm { padding: 9px 14px; font-size: 0.84rem; border-radius: 8px; }
.btn-block { width: 100%; }

.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.is-copied {
  border-color: rgba(34, 197, 94, 0.55);
  color: var(--ok);
}

/* ---------- Badges, chips, pills, kbd ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass-2);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.badge-accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-2);
}
.badge-blue {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #7fb2ff;
}
.badge-green {
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--ok-soft);
  color: #5ee08a;
}

[data-theme="light"] .badge-blue { color: #1d4ed8; }
[data-theme="light"] .badge-green { color: #15803d; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chips li {
  margin: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.ver-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: var(--glass-2);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

kbd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  background: var(--panel-2);
  color: var(--text-strong);
}

code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--accent-2);
}

/* ---------- Axis hairline ---------- */

.axis-bar {
  height: 2px;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--axis-red) 0%,
    var(--axis-red) 21%,
    var(--axis-green) 27%,
    var(--axis-green) 46%,
    var(--axis-blue) 52%,
    var(--axis-blue) 71%,
    var(--accent) 77%,
    var(--accent-2) 100%
  );
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.06rem;
  color: var(--text-strong);
  white-space: nowrap;
  flex: 0 0 auto;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(255, 100, 34, 0.35);
  flex: 0 0 auto;
}
.brand-mark svg { width: 17px; height: 17px; }
.brand span em {
  font-style: normal;
  color: var(--accent-2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li { margin: 0; }
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text-strong); background: var(--hover); }
.nav-links a[aria-current="page"] { color: var(--text-strong); }
.nav-links a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--glass-2);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { background: var(--hover); border-color: var(--line-3); color: var(--text-strong); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle [data-theme-icon] { display: none; }
html:not([data-theme]) .theme-toggle [data-theme-icon="sun"],
[data-theme="dark"] .theme-toggle [data-theme-icon="sun"] { display: block; }
[data-theme="light"] .theme-toggle [data-theme-icon="moon"] { display: block; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--glass-2);
  color: var(--text);
  padding: 0;
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 66px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-line-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-strong) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 40% 30%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 80% at 40% 30%, #000 20%, transparent 78%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 420px at 12% 8%, rgba(255, 100, 34, 0.14), transparent 68%),
    radial-gradient(520px 420px at 88% 78%, rgba(59, 130, 246, 0.12), transparent 70%);
}

.hero > .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 54px;
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  margin-bottom: 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: live-pulse 2.4s ease-out infinite;
  flex: 0 0 auto;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: 1.1rem; margin-bottom: 26px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.hero-stats li,
.hero-stats > div {
  margin: 0;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.hero-stats li:first-child,
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.hero-stats span {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 2px;
}

/* ---------- Viewport showcase (always dark) ---------- */

.viewport-frame {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--stage-border);
  background: linear-gradient(180deg, var(--stage-bg-2), var(--stage-bg));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  color: var(--stage-text);
  min-width: 0;
}

.viewport-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--stage-border);
  background: rgba(255, 255, 255, 0.03);
}

.viewport-dots { display: flex; gap: 5px; flex: 0 0 auto; }
.viewport-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.viewport-dot:nth-child(1) { background: rgba(239, 68, 68, 0.75); }
.viewport-dot:nth-child(2) { background: rgba(245, 158, 11, 0.7); }
.viewport-dot:nth-child(3) { background: rgba(34, 197, 94, 0.7); }

.viewport-axis {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--stage-border);
  background: rgba(255, 255, 255, 0.03);
  flex: 0 0 auto;
}
.viewport-axis i {
  display: block;
  width: 9px;
  height: 2px;
  border-radius: 2px;
}
.viewport-axis i:nth-child(1) { background: var(--axis-red); }
.viewport-axis i:nth-child(2) { background: var(--axis-green); }
.viewport-axis i:nth-child(3) { background: var(--axis-blue); }

.viewport-chrome-title {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--stage-muted);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.viewport-chrome-title b {
  color: var(--stage-text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewport-chrome-title span { color: var(--stage-muted); }

.viewport-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: var(--stage-bg);
  background-image:
    linear-gradient(to right, var(--stage-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--stage-line) 1px, transparent 1px),
    linear-gradient(to right, var(--stage-line-2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--stage-line-2) 1px, transparent 1px);
  background-size: var(--stage-grid) var(--stage-grid), var(--stage-grid) var(--stage-grid), 120px 120px, 120px 120px;
  overflow: hidden;
}

.viewport-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
}
.viewport-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.cad-svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.viewport-hud {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--stage-border);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--mono);
  font-size: 0.68rem;
  min-width: 0;
}
.viewport-hud-info { min-width: 0; flex: 1 1 auto; }
.viewport-hud-label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stage-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewport-hud-title {
  display: block;
  color: var(--stage-text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewport-hud-buy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--accent-line);
  background: rgba(255, 100, 34, 0.14);
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.viewport-hud-buy:hover { background: rgba(255, 100, 34, 0.24); border-color: var(--accent); }
.viewport-hud-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--stage-text);
  font-weight: 600;
  white-space: nowrap;
}
.viewport-hud-link:hover { color: var(--accent-2); }
.viewport-hud-link svg { width: 12px; height: 12px; }

.viewport-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px;
  border-top: 1px solid var(--stage-border);
  background: rgba(0, 0, 0, 0.18);
}
.viewport-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--stage-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--stage-muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.viewport-tab:hover { color: var(--stage-text); background: rgba(255, 255, 255, 0.07); }
.viewport-tab.is-active {
  color: var(--accent-2);
  border-color: var(--accent-line);
  background: rgba(255, 100, 34, 0.14);
}
.viewport-tab .tab-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

/* ---------- Sections ---------- */

.section { padding: 74px 0; }
.section-tight { padding: 54px 0; }
.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}
.section-head > div { max-width: 64ch; min-width: 0; }
.section-head p { margin-bottom: 0; }
.section-head .btn { flex: 0 0 auto; }

/* ---------- Catalog toolbar ---------- */

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}
.search-box > svg {
  position: absolute;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--dim);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 76px 0 36px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box input::placeholder { color: var(--dim); }
.search-box input:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-kbd {
  position: absolute;
  right: 10px;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dim);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 6px;
  background: var(--panel-2);
  line-height: 1.6;
}
.search-box.has-value .search-kbd { display: none; }

.search-clear {
  position: absolute;
  right: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--glass-2);
  color: var(--muted);
}
.search-clear:hover { background: var(--hover); color: var(--text-strong); }
.search-clear svg { width: 12px; height: 12px; }
.search-box.has-value .search-clear { display: inline-flex; }

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.toolbar-right select {
  height: 40px;
  padding: 0 30px 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background-color: var(--panel);
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--text);
  font-size: 0.84rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.toolbar-right select:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.view-toggle {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--panel);
}
.view-toggle button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--dim);
  transition: background 0.15s ease, color 0.15s ease;
}
.view-toggle button:hover { color: var(--text-strong); background: var(--hover); }
.view-toggle button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-2);
}
.view-toggle svg { width: 15px; height: 15px; }

/* ---------- Filter pills ---------- */

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 550;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.filter-pill:hover { color: var(--text-strong); border-color: var(--line-3); background: var(--hover); }
.filter-pill.is-active {
  color: var(--accent-2);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.pill-count {
  font-family: var(--mono);
  font-size: 0.64rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  color: var(--dim);
}
.filter-pill.is-active .pill-count {
  color: var(--accent-2);
  border-color: var(--accent-line);
  background: rgba(255, 100, 34, 0.1);
}

/* ---------- Catalog status ---------- */

.catalog-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  min-height: 20px;
}
.catalog-status strong { color: var(--text); font-weight: 600; }
.catalog-reset {
  color: var(--accent-2);
  font-weight: 600;
  border-bottom: 1px solid transparent;
}
.catalog-reset:hover { border-bottom-color: currentColor; }

/* ---------- Plugin grid ---------- */

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.plugin-grid > li {
  margin: 0;
  display: flex;
  min-width: 0;
}
.plugin-grid > * { min-width: 0; }

.plugin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: linear-gradient(170deg, var(--panel-2), var(--panel) 58%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.plugin-card:hover {
  border-color: var(--line-3);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.plugin-card.is-hidden { display: none !important; }

/* Card stage — always a dark CAD viewport */
.card-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 16px;
  background-color: var(--stage-bg);
  background-image:
    linear-gradient(to right, var(--stage-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--stage-line) 1px, transparent 1px),
    linear-gradient(to right, var(--stage-line-2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--stage-line-2) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
  border-bottom: 1px solid var(--stage-border);
  overflow: hidden;
  color: var(--stage-text);
}
.card-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 70% at 50% 45%, rgba(59, 130, 246, 0.08), transparent 72%);
}
.card-stage .cad-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-height: 100%;
}

.card-stage-top {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.plugin-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  padding: 6px;
  flex: 0 0 auto;
}
.plugin-icon img,
.plugin-icon svg { width: 100%; height: 100%; object-fit: contain; }
.plugin-icon.lg { width: 60px; height: 60px; padding: 10px; border-radius: 13px; }
.card-stage .plugin-icon,
.viewport-frame .plugin-icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--stage-border);
}

.card-stage-top .badge {
  border-color: var(--stage-border);
  background: rgba(10, 15, 22, 0.72);
  color: var(--stage-muted);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card-stage-top .badge-accent {
  border-color: var(--accent-line);
  background: rgba(255, 100, 34, 0.16);
  color: var(--accent-2);
}

.price-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--stage-border);
  background: rgba(10, 15, 22, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--stage-text);
  white-space: nowrap;
}
.price-tag small,
.price-tag span {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--stage-muted);
  margin-left: 2px;
}

.hud-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--stage-border);
  background: rgba(10, 15, 22, 0.78);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: var(--stage-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px 18px 14px;
  min-width: 0;
}
.card-body h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 6px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}
.card-body h3 a { color: var(--text-strong); }
.card-body h3 a:hover { color: var(--accent-2); }
.card-body .tagline {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
  flex: 1 1 auto;
}
.card-body .chips { margin-bottom: 0; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.compat-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.compat-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  flex: 0 0 auto;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.card-actions .details-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.card-actions .details-link:hover { color: var(--text-strong); }
.card-actions .details-link svg { width: 12px; height: 12px; transition: transform 0.2s ease; }
.plugin-card:hover .card-actions .details-link svg { transform: translateX(2px); }

/* List view */

.plugin-grid.is-list { grid-template-columns: 1fr; gap: 12px; }
.plugin-grid.is-list > li { display: block; }
.plugin-grid.is-list .plugin-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 210px;
  align-items: stretch;
}
.plugin-grid.is-list .plugin-card:hover { transform: translateY(-2px); }
.plugin-grid.is-list .card-stage {
  aspect-ratio: auto;
  height: 100%;
  min-height: 138px;
  border-bottom: 0;
  border-right: 1px solid var(--stage-border);
  padding: 12px;
}
.plugin-grid.is-list .card-stage-top { top: 8px; left: 8px; }
.plugin-grid.is-list .card-stage-top .badge { display: none; }
.plugin-grid.is-list .price-tag { top: 8px; right: 8px; }
.plugin-grid.is-list .hud-pill { bottom: 8px; left: 8px; max-width: calc(100% - 16px); }
.plugin-grid.is-list .card-body { padding: 16px 20px; justify-content: center; }
.plugin-grid.is-list .card-body .tagline { flex: 0 0 auto; margin-bottom: 10px; }
.plugin-grid.is-list .card-foot {
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 0;
  border-left: 1px solid var(--line);
}
.plugin-grid.is-list .card-actions { flex-direction: column; align-items: stretch; width: 100%; }
.plugin-grid.is-list .card-actions .btn { width: 100%; }
.plugin-grid.is-list .card-actions .details-link { justify-content: center; }
.plugin-grid.is-list .compat-label { justify-content: flex-end; }

/* ---------- Catalog empty ---------- */

.catalog-empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 54px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--glass-2);
}
.catalog-empty h3 { margin: 0; font-size: 1.1rem; }
.catalog-empty p { margin: 0; color: var(--muted); font-size: 0.9rem; max-width: 46ch; }
.catalog-empty .empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.catalog-empty .empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--dim);
}
.catalog-empty .empty-icon svg { width: 19px; height: 19px; }

/* ---------- Pricing & licence builder ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--panel-2), var(--panel) 62%);
  overflow: hidden;
}
.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  box-shadow: 0 0 22px rgba(255, 100, 34, 0.55);
}
.pricing-card::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 100, 34, 0.14), transparent 68%);
  pointer-events: none;
}
.pricing-card > * { position: relative; z-index: 1; }

.pricing-card .badge { margin-bottom: 16px; }

.price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.price-amount {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text-strong);
}
.price-unit {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--dim);
}
.price-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 22px;
}

.check-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 9px;
}
.check-list li {
  position: relative;
  margin: 0;
  padding-left: 26px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 6px;
  height: 3px;
  border-left: 1.6px solid var(--accent-2);
  border-bottom: 1.6px solid var(--accent-2);
  transform: rotate(-45deg);
}
.check-list li strong { color: var(--text); }

.pricing-note {
  margin: auto 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}
.pricing-note strong { color: var(--text-strong); }

.builder-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  min-width: 0;
}

.builder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.builder-head h3 { margin: 0 0 3px; font-size: 1.12rem; }
.builder-head p { margin: 0; font-size: 0.8rem; color: var(--dim); }
.builder-quick {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.builder-quick button {
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 600;
}
.builder-quick button:hover { background: var(--accent-soft); }

.builder-list {
  display: grid;
  gap: 6px;
  max-height: 306px;
  overflow-y: auto;
  padding: 2px;
  margin: 0 0 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.builder-list::-webkit-scrollbar { width: 8px; }
.builder-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

.builder-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.builder-item:hover { border-color: var(--line-3); }
.builder-item.is-selected {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.builder-item .plugin-icon { width: 28px; height: 28px; padding: 5px; border-radius: 7px; }
.builder-item .bi-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.builder-item .bi-cat {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}
.builder-item .bi-price {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Custom checkbox */

.check {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 auto;
  border-radius: 5px;
  border: 1px solid var(--line-3);
  background: var(--panel);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.check::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--btn-ink);
  border-bottom: 2px solid var(--btn-ink);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.15s ease;
  margin-top: -2px;
}
.check:checked {
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  border-color: var(--accent);
}
.check:checked::after { transform: rotate(-45deg) scale(1); }
.check:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.builder-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.builder-controls .bc-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.builder-controls .bc-hint {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--dim);
  font-weight: 400;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel-2);
  overflow: hidden;
  flex: 0 0 auto;
}
.stepper button {
  width: 32px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
}
.stepper button:hover { background: var(--hover); color: var(--text-strong); }
.stepper input {
  width: 44px;
  height: 34px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: var(--accent-soft); }

.builder-summary {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.builder-breakdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
  margin-bottom: 6px;
}
.builder-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.builder-total-row span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.builder-total {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  line-height: 1;
}
.builder-total small {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0;
}

/* ---------- Value grid ---------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.value-grid > li {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  min-width: 0;
}
.value-grid h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  margin-bottom: 8px;
}
.value-grid p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.value-grid .ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.value-grid .ico svg { width: 15px; height: 15px; }

/* ---------- Compatibility strip & table ---------- */

.compat {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.compat > div {
  background: var(--panel);
  padding: 20px;
  min-width: 0;
}
.compat strong {
  display: block;
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: 0.98rem;
  margin-bottom: 3px;
}
.compat span { font-size: 0.8rem; color: var(--dim); }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 560px;
}
th, td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
  background: var(--glass-2);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--glass-2); }
td a { color: var(--accent-2); font-weight: 600; }
td a:hover { text-decoration: underline; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps > li {
  margin: 0;
  counter-increment: step;
  position: relative;
  padding: 20px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 0.86rem;
  color: var(--muted);
  min-width: 0;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.steps > li strong {
  display: block;
  color: var(--text-strong);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 9px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 0 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.faq details[open] { border-color: var(--line-3); background: var(--panel-2); }
.faq summary {
  cursor: pointer;
  padding: 15px 0;
  font-weight: 600;
  color: var(--text-strong);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent-2);
  line-height: 1;
  flex: 0 0 auto;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 80ch;
}

/* ---------- CTA ---------- */

.cta {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 46px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 100, 34, 0.16), transparent 52%),
    linear-gradient(160deg, var(--panel-2), var(--panel));
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 100% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 100% at 100% 0%, #000, transparent 75%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { max-width: 24ch; }
.cta p { color: var(--muted); max-width: 58ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 50px 0 28px;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 34px;
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--text-strong); }
.footer-brand p { color: var(--dim); font-size: 0.84rem; max-width: 34ch; margin-top: 12px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.72rem;
}

/* ---------- Plugin detail: breadcrumbs ---------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 20px 0 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--dim);
}
.crumbs li { margin: 0; display: flex; align-items: center; gap: 7px; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--line-3); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text-strong); }
.crumbs [aria-current="page"] { color: var(--text); }

/* ---------- Plugin detail: hero ---------- */

.plugin-hero {
  padding: 26px 0 52px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.plugin-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 380px at 8% 0%, rgba(255, 100, 34, 0.1), transparent 70%),
    radial-gradient(460px 360px at 92% 90%, rgba(59, 130, 246, 0.09), transparent 72%);
}
.plugin-hero > .wrap { position: relative; z-index: 1; }

.plugin-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 44px;
  align-items: start;
}

.plugin-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  min-width: 0;
}
.plugin-title-row h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  min-width: 0;
}
.plugin-hero .lede { font-size: 1.02rem; margin-bottom: 22px; }
.plugin-hero .hero-actions { margin-bottom: 0; }
.plugin-hero .chips { margin-bottom: 16px; }

/* ---------- Plugin detail: layout & sidebar ---------- */

.plugin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}
.plugin-layout > * { min-width: 0; }

.plugin-main { min-width: 0; }
.plugin-main > .section { padding: 44px 0; }
.plugin-main > .section:first-child { padding-top: 34px; }

.buy-sidebar {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.buy-sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.buy-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}
.buy-price-amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-strong);
}
.buy-price-unit {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
}
.buy-sub {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0 0 16px;
}
.buy-actions { display: grid; gap: 8px; margin-bottom: 18px; }
.buy-actions .btn { width: 100%; }

.buy-includes {
  list-style: none;
  margin: 0 0 18px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
}
.buy-includes li {
  position: relative;
  margin: 0;
  padding-left: 22px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.buy-includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 6px;
  border-left: 1.8px solid var(--ok);
  border-bottom: 1.8px solid var(--ok);
  transform: rotate(-45deg);
}

.spec-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.spec-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  min-width: 0;
}
.spec-list li:last-child { border-bottom: 0; }
.spec-list .k { color: var(--dim); flex: 0 0 auto; }
.spec-list .v {
  color: var(--text-strong);
  font-weight: 600;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.76rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cmd-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cmd-list li {
  margin: 0;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  white-space: nowrap;
}
.cmd-list li:hover { border-color: var(--accent-line); color: var(--accent-2); }

.sidebar-block { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.sidebar-block h2,
.sidebar-block h3 {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}
.spec-note {
  font-size: 0.7rem;
  color: var(--dim);
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--mono);
}

/* ---------- Metrics ---------- */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}
.metrics-grid > * {
  margin: 0;
  padding: 18px;
  background: var(--panel);
  min-width: 0;
}
.metrics-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  line-height: 1.25;
}
.metrics-grid span {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 3px;
}

/* ---------- Before / after ---------- */

.before-after {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  position: relative;
}
.ba-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  min-width: 0;
}
.ba-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.ba-card h3::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.ba-before { border-top: 2px solid rgba(239, 68, 68, 0.55); }
.ba-before h3::before { background: var(--axis-red); }
.ba-after { border-top: 2px solid rgba(34, 197, 94, 0.55); }
.ba-after h3::before { background: var(--axis-green); }
.ba-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.ba-card li {
  position: relative;
  margin: 0;
  padding-left: 18px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}
.ba-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 1px;
  background: var(--line-3);
}
.ba-badge {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  text-transform: uppercase;
}
.ba-badge svg { width: 13px; height: 13px; }

/* ---------- Feature list ---------- */

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.feature-list > li {
  margin: 0;
  display: flex;
  gap: 11px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
  min-width: 0;
}
.feature-list > li strong {
  display: block;
  color: var(--text-strong);
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.feature-list .tick {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.feature-list .tick svg { width: 11px; height: 11px; }

/* ---------- Use cases ---------- */

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.usecase-grid > li {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  min-width: 0;
}
.usecase-grid h3 {
  font-size: 0.92rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.usecase-grid h3 .role {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 5px;
}
.usecase-grid p { margin: 0; font-size: 0.84rem; color: var(--muted); }

/* ---------- Related grid ---------- */

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.related-grid > li { margin: 0; display: flex; min-width: 0; }
.related-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.related-card:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.related-grid .card-stage {
  aspect-ratio: 16 / 9;
  padding: 10px;
  border-bottom: 1px solid var(--stage-border);
}
.related-grid .card-stage-top { top: 7px; left: 7px; }
.related-grid .card-stage-top .badge { display: none; }
.related-grid .plugin-icon { width: 26px; height: 26px; padding: 4px; border-radius: 6px; }
.related-grid .price-tag { top: 7px; right: 7px; font-size: 0.64rem; padding: 3px 6px; }
.related-grid .hud-pill { display: none; }
.related-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  min-width: 0;
}
.related-body b {
  display: block;
  font-size: 0.86rem;
  color: var(--text-strong);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-body small {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--dim);
}
.related-body .related-price {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-2);
  white-space: nowrap;
  flex: 0 0 auto;
}

/* ---------- Note box ---------- */

.note-box {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 15px 18px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}
.note-box strong { color: var(--text-strong); }

/* ---------- Shared order / licence modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 7, 12, 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.modal-backdrop.is-open { opacity: 1; visibility: visible; }

.modal {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
  overflow: hidden;
}
.modal-backdrop.is-open .modal { opacity: 1; transform: none; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.modal-head h2 { margin: 0 0 3px; font-size: 1.24rem; }
.modal-head p { margin: 0; font-size: 0.8rem; color: var(--dim); }

.modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--glass-2);
  color: var(--muted);
}
.modal-close:hover { background: var(--hover); color: var(--text-strong); border-color: var(--line-3); }
.modal-close svg { width: 14px; height: 14px; }

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.modal-body::-webkit-scrollbar { width: 9px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 9px; }

.modal-section { margin-bottom: 18px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section > h3 {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 9px;
}

.modal-plugins {
  display: grid;
  gap: 5px;
  max-height: 210px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.modal-plugins::-webkit-scrollbar { width: 8px; }
.modal-plugins::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

.modal-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--panel-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.modal-row:hover { border-color: var(--line-3); }
.modal-row.is-selected { border-color: var(--accent-line); background: var(--accent-soft); }
.modal-row .mr-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-row .mr-meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
}
.modal-row .mr-price {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.86rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--dim); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.modal-total-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.modal-total-box .mt-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.modal-total-box .mt-meta {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
}
.modal-total {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  line-height: 1;
  white-space: nowrap;
}
.modal-total small {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0;
}

.modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  flex: 0 0 auto;
}
.modal-foot .btn { flex: 0 1 auto; }
.modal-foot .modal-foot-note {
  margin-right: auto;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--dim);
  max-width: 30ch;
}

/* ---------- Responsive: tablet ---------- */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 56px 0 52px; }
  .viewport-frame { max-width: 640px; }

  .plugin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card { padding: 26px; }
  .builder-card { padding: 22px; }

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

  .plugin-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .plugin-layout { grid-template-columns: 1fr; gap: 28px; }
  .buy-sidebar { position: static; }
  .plugin-main > .section { padding: 36px 0; }

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

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

/* ---------- Responsive: mobile ---------- */

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 16px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; font-size: 0.94rem; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-toggle { display: grid; }
  .nav-actions .btn { display: none; }

  .hero { padding: 44px 0 42px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; }
  .hero-stats li,
  .hero-stats > div { padding: 0 12px; }
  .hero-stats li:nth-child(odd),
  .hero-stats > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .hero-stats li:nth-child(n + 3),
  .hero-stats > div:nth-child(n + 3) { padding-top: 12px; border-top: 1px solid var(--line); }

  .viewport-hud { flex-wrap: wrap; gap: 8px 12px; }
  .viewport-hud-info { flex: 1 1 100%; }
  .viewport-tabs { gap: 5px; }
  .viewport-tab { padding: 5px 8px; font-size: 0.6rem; }

  .section { padding: 50px 0; }
  .section-tight { padding: 40px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 26px; }

  .catalog-toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px; }
  .toolbar-right { justify-content: space-between; }
  .toolbar-right select { flex: 1 1 auto; min-width: 0; }

  .plugin-grid { grid-template-columns: 1fr; }
  .plugin-grid.is-list .plugin-card { grid-template-columns: 1fr; }
  .plugin-grid.is-list .card-stage {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--stage-border);
  }
  .plugin-grid.is-list .card-stage-top .badge { display: inline-flex; }
  .plugin-grid.is-list .card-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 18px 14px;
  }
  .plugin-grid.is-list .card-actions { flex-direction: row; align-items: center; width: auto; }
  .plugin-grid.is-list .card-actions .btn { width: auto; }
  .plugin-grid.is-list .compat-label { justify-content: flex-start; }

  .pricing-card, .builder-card { padding: 20px; }
  .builder-head { flex-direction: column; gap: 8px; }
  .builder-list { max-height: 280px; }

  .value-grid,
  .feature-list,
  .usecase-grid,
  .related-grid,
  .before-after,
  .steps { grid-template-columns: 1fr; }

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

  .cta { padding: 30px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }

  .plugin-title-row { gap: 11px; }
  .plugin-icon.lg { width: 48px; height: 48px; padding: 8px; border-radius: 11px; }
  .plugin-hero { padding: 20px 0 38px; }
  .plugin-hero .hero-actions .btn { flex: 1 1 auto; }

  .modal-backdrop { padding: 12px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 24px); border-radius: 16px; }
  .modal-head { padding: 16px 18px 13px; }
  .modal-body { padding: 15px 18px; }
  .modal-foot { padding: 12px 18px; }
  .modal-foot .modal-foot-note { display: none; }
  .modal-foot .btn { flex: 1 1 100%; }
  .modal-grid { grid-template-columns: 1fr; }
}

/* ---------- Responsive: small phones ---------- */

@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .brand { font-size: 0.98rem; }
  .brand-mark { width: 27px; height: 27px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .compat { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .builder-item { grid-template-columns: auto auto minmax(0, 1fr); }
  .builder-item .bi-price { display: none; }
  .modal-row { grid-template-columns: auto minmax(0, 1fr); }
  .modal-row .mr-price { grid-column: 2; justify-self: start; }
  .card-foot { flex-wrap: wrap; }
  .card-actions { width: 100%; justify-content: space-between; }
  .plugin-grid.is-list .card-actions { width: 100%; }
  .card-actions .btn { flex: 1 1 auto; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .live-dot { animation: none; }
  .plugin-card:hover,
  .related-card:hover,
  .btn:hover { transform: none; }
}
