/* Nashenski Commerce — nashenski.com
   One stylesheet. Tokens first; components use tokens only. */

/* Light theme: the base. Dark theme: system preference (unless the visitor chose light)
   or the visitor's choice (data-theme on <html>, set before paint from localStorage). */
:root {
  color-scheme: light;

  --bg: #f6f7fa;
  --bg-raised: #eef1f6;
  --surface: #ffffff;
  --surface-2: #e9edf4;
  --border: #dde2ea;
  --border-strong: #c3cad6;
  --header-bg: #ffffff;

  --text: #0d1526;
  --text-muted: #46536a;      /* 7.6:1 on --bg */
  --text-faint: #5f6b80;      /* 5.2:1 on --bg */

  --accent: #f7c948;          /* banner yellow: fills, borders */
  --accent-hover: #f2bb1f;
  --accent-text: #b45309;     /* 5.0:1 on white: yellow as text */
  --on-accent: #1b1403;
  --focus: #b45309;
  --ok: #047857;
  --ok-bg: rgba(4, 120, 87, 0.10);
  --warn: #b45309;
  --warn-bg: rgba(247, 201, 72, 0.22);
  --info: #1d4ed8;
  --info-bg: rgba(29, 78, 216, 0.09);
  --glow: transparent;

  --shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1120;
    --bg-raised: #0f182b;
    --surface: #131d33;
    --surface-2: #1a2640;
    --border: #1d2840;
    --border-strong: #2d3b58;
    --header-bg: #0d1526;
    --text: #eef2f8;
    --text-muted: #a3b0c5;
    --text-faint: #7e8ba1;
    --accent-hover: #ffd866;
    --accent-text: #f7c948;
    --focus: #f7c948;
    --ok: #5fe0a5;
    --ok-bg: rgba(95, 224, 165, 0.12);
    --warn: #f7c948;
    --warn-bg: rgba(247, 201, 72, 0.12);
    --info: #8ab4ff;
    --info-bg: rgba(138, 180, 255, 0.12);
    --glow: transparent;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1120;
  --bg-raised: #0f182b;
  --surface: #131d33;
  --surface-2: #1a2640;
  --border: #1d2840;
  --border-strong: #2d3b58;
  --header-bg: #0d1526;
  --text: #eef2f8;
  --text-muted: #a3b0c5;
  --text-faint: #7e8ba1;
  --accent-hover: #ffd866;
  --accent-text: #f7c948;
  --focus: #f7c948;
  --ok: #5fe0a5;
  --ok-bg: rgba(95, 224, 165, 0.12);
  --warn: #f7c948;
  --warn-bg: rgba(247, 201, 72, 0.12);
  --info: #8ab4ff;
  --info-bg: rgba(138, 180, 255, 0.12);
  --glow: transparent;
  --shadow: none;
}

:root {
  /* Flag */
  --flag-white: #ffffff;
  --flag-green: #00966e;
  --flag-red: #d62612;

  /* Type */
  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-2xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --fs-3xl: clamp(2.4rem, 1.5rem + 3.8vw, 4.25rem);

  /* Space (spacious marketing scale) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: clamp(4.5rem, 3rem + 6vw, 8rem);

  --radius-sm: 3px;
  --radius: 4px;
  --radius-lg: 6px;
  --container: 1180px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t: 240ms;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 var(--s-4); }
h1, h2, h3, h4 { margin: 0 0 var(--s-4); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Flag strip (signature detail) ---------- */
.flag {
  display: flex; height: 4px; width: 100%;
}
.flag span { flex: 1; }
.flag span:nth-child(1) { background: var(--flag-white); box-shadow: inset 0 0 0 1px var(--border-strong); }
.flag span:nth-child(2) { background: var(--flag-green); }
.flag span:nth-child(3) { background: var(--flag-red); }
.flag--mini { width: 36px; height: 3px; border-radius: 0; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: var(--s-5); min-height: 68px; }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand picture { flex: none; display: block; line-height: 0; }
.brand img { display: block; width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.brand b { font-size: var(--fs-lg); letter-spacing: -0.02em; }
.brand small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--text-faint); letter-spacing: 0; line-height: 1.2; }
.brand b { display: block; line-height: 1.2; }
.nav-links { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  text-decoration: none; color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500;
  border-radius: var(--radius-sm); transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-links a.pro-link::after {
  content: "PRO"; margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 5px; border-radius: 4px; background: var(--warn-bg); color: var(--accent-text);
}
.lang {
  display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 3px;
}
.lang a {
  min-height: 34px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 600; text-decoration: none; color: var(--text-muted); border-radius: var(--radius-sm);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { background: var(--surface-2); color: var(--text); }
.nav .btn { margin-left: var(--s-2); }

.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border-strong); color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}

@media (max-width: 1180px) { /* the full menu needs about 1180px in Bulgarian */
  .menu-toggle { display: inline-flex; }
  .nav-panel {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg-raised); border-bottom: 1px solid var(--border);
    padding: var(--s-4) var(--gutter) var(--s-5);
    display: none; flex-direction: column; align-items: stretch; gap: var(--s-4);
  }
  .nav-panel.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; margin: 0; }
  .nav-links a { min-height: 48px; font-size: var(--fs-base); }
  .nav .btn { margin-left: 0; }
  .lang { align-self: flex-start; }
}
@media (min-width: 1181px) {
  .nav-panel { display: flex; align-items: center; gap: var(--s-3); margin-left: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5); border-radius: var(--radius-sm);
  font: 600 var(--fs-sm)/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text-faint); background: var(--surface-2); }
.btn-sm { min-height: 38px; padding: 0 var(--s-4); font-size: var(--fs-xs); }
.btn-lg { min-height: 50px; padding: 0 var(--s-6); font-size: var(--fs-base); }

/* ---------- Badges / eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: var(--s-4);
}
.eyebrow svg { width: 16px; height: 16px; flex: none; }

/* Grid children may shrink below their content (long code, file names) */
.hero-grid > *, .feature > *, .bento > *, .migrate > *, .band > *, .pillars > *, .law > *, .dl-grid > *, .trio > * { min-width: 0; }
.release code, .tile code, .faq code { white-space: normal; overflow-wrap: anywhere; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--radius-sm);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: var(--s-8) 0 var(--s-9); overflow: hidden; isolation: isolate; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--s-8); align-items: center; }
.hero h1 { margin-bottom: var(--s-5); }
.hero h1 em, .page-hero h1 em { font-style: normal; color: var(--accent-text); }
.lede { font-size: var(--fs-lg); color: var(--text-muted); max-width: 36em; margin-bottom: var(--s-6); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }
.meta-row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); padding: 0; margin: 0; list-style: none; font-size: var(--fs-xs); color: var(--text-faint); }
.meta-row li { display: inline-flex; align-items: center; gap: 6px; }
.meta-row svg { width: 15px; height: 15px; color: var(--ok); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-7); }
}

/* ---------- Checkout mock (hero visual) ---------- */
.mock {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: var(--s-5); max-width: 520px; justify-self: end; width: 100%;
}
.mock-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.mock-title { font-weight: 700; font-size: var(--fs-base); margin: 0; }
.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); }
.ship { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--s-2); }
.ship-opt {
  display: grid; grid-template-columns: 20px 1fr auto; gap: var(--s-3); align-items: center;
  padding: var(--s-3) var(--s-4); border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg); cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.ship-opt:hover { border-color: var(--border-strong); }
.ship-opt:has(input:checked) { border-color: var(--accent); background: rgba(247, 201, 72, 0.06); box-shadow: inset 3px 0 0 var(--accent); }
.ship-opt:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); position: relative; }
.ship-opt:has(input:checked) .radio { border-color: var(--accent); }
.ship-opt:has(input:checked) .radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.ship-opt:not(:has(input:checked)) .ship-pick { display: none; }
.ship-name { font-weight: 600; font-size: var(--fs-sm); line-height: 1.3; }
.ship-type { display: block; font-size: var(--fs-xs); color: var(--text-faint); font-weight: 400; }
.ship-price { font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.ship-pick {
  grid-column: 2 / -1; display: flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-1); padding: var(--s-2) var(--s-3); border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-muted);
}
.ship-pick svg { width: 15px; height: 15px; color: var(--accent-text); flex: none; }
.ship-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-foot { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px dashed var(--border-strong); }
.mock-note { position: absolute; left: var(--s-5); bottom: calc(-1 * var(--s-5)); font-size: 11px; color: var(--text-faint); }

.float-card {
  position: absolute; right: calc(-1 * var(--s-6)); bottom: calc(-1 * var(--s-6));
  display: flex; align-items: center; gap: var(--s-3);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: var(--s-3) var(--s-4); box-shadow: var(--shadow); font-size: var(--fs-xs);
}
.float-card b { display: block; font-size: var(--fs-sm); }
.float-card .ic { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.float-card .ic svg { width: 20px; height: 20px; }
@media (min-width: 981px) { .mock { padding-bottom: var(--s-8); } }
@media (max-width: 1180px) { .float-card { right: calc(-1 * var(--s-3)); } }
@media (max-width: 980px) {
  .mock { justify-self: stretch; max-width: none; }
  .float-card { position: static; margin-top: var(--s-4); }
  .mock-note { position: static; display: block; margin-top: var(--s-3); }
}

/* ---------- Courier strip ---------- */
.strip { border-block: 1px solid var(--border); background: var(--bg-raised); }
.strip-inner { display: flex; align-items: center; gap: var(--s-5) var(--s-7); flex-wrap: wrap; justify-content: space-between; padding-block: var(--s-5); }
.strip-label { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.strip-list { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); list-style: none; margin: 0; padding: 0; }
.strip-list li { font-size: var(--fs-lg); font-weight: 700; color: var(--text); letter-spacing: -0.01em; }

/* ---------- Sections ---------- */
.section { padding-block: var(--s-9); }
.section--alt { background: var(--bg-raised); border-block: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: var(--s-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: var(--fs-lg); margin: 0; }

/* Trust trio */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.trio-item { padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.trio-item h3 { font-size: var(--fs-base); margin-bottom: var(--s-2); display: flex; align-items: center; gap: var(--s-3); }
.trio-item p { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.ic-box { width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--warn-bg); color: var(--accent-text); flex: none; }
.ic-box svg { width: 21px; height: 21px; }
@media (max-width: 860px) { .trio { grid-template-columns: 1fr; } }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--s-8); align-items: center; }
.feature + .feature { margin-top: var(--s-9); }
.feature--flip .feature-text { order: 2; }
.feature-text h2 { font-size: var(--fs-xl); }
.feature-text > p { color: var(--text-muted); }
.checks { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: var(--s-3); }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-muted); }
.checks li b { color: var(--text); font-weight: 600; }
.checks svg { width: 20px; height: 20px; color: var(--ok); margin-top: 2px; }
@media (max-width: 920px) {
  .feature { grid-template-columns: 1fr; gap: var(--s-6); }
  .feature--flip .feature-text { order: 0; }
}

/* Screenshot frame */
.shot {
  margin: 0; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: var(--surface);
  padding: 10px; box-shadow: var(--shadow); position: relative;
}
.shot-bar { display: flex; gap: 6px; padding: 4px 6px 10px; }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); }
.shot a { display: block; border-radius: var(--radius-sm); overflow: hidden; }
.shot img { width: 100%; height: auto; background: #f0f0f1; }
.shot figcaption { font-size: var(--fs-xs); color: var(--text-faint); padding: var(--s-3) var(--s-2) var(--s-1); }

/* Panel card (custom UI visual) */
.panel { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.panel-head h3 { margin: 0; font-size: var(--fs-base); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.rows li:last-child { border-bottom: 0; }
.rows .k { font-weight: 600; }
.rows .v { color: var(--text-faint); font-size: var(--fs-xs); display: block; font-weight: 400; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-4); }
.tile {
  grid-column: span 2; padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); display: flex; flex-direction: column; gap: var(--s-2);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.tile:hover, .trio-item:hover, .pillar:hover { border-color: var(--border-strong); box-shadow: inset 0 2px 0 var(--accent); }
.trio-item, .pillar { transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.tile--wide { grid-column: span 3; }
.tile--xl { grid-column: span 4; }
.tile h3 { font-size: var(--fs-base); margin: var(--s-2) 0 0; }
.tile p { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.tile .ic-box { margin-bottom: var(--s-1); }
.tile pre {
  margin: var(--s-3) 0 0; padding: var(--s-4); background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow-x: auto; font-size: 13px; line-height: 1.7; color: var(--text-muted);
}
.tile pre .c { color: var(--ok); }
.tile pre .p { color: var(--text-faint); user-select: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: auto; padding-top: var(--s-3); }
.chip { font-size: var(--fs-xs); padding: 4px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); color: var(--text-muted); }
@media (max-width: 980px) { .bento { grid-template-columns: repeat(2, 1fr); } .tile, .tile--wide, .tile--xl { grid-column: span 1; } .tile--xl { grid-column: span 2; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .tile--xl { grid-column: span 1; } }

/* Migration list */
.migrate { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--s-8); align-items: start; }
.plugin-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.plugin-list li { padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--fs-sm); }
.plugin-list li small { display: block; color: var(--text-faint); font-size: var(--fs-xs); }
@media (max-width: 920px) { .migrate { grid-template-columns: 1fr; gap: var(--s-6); } }
@media (max-width: 520px) { .plugin-list { grid-template-columns: 1fr; } }

/* Pro teaser band */
.band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: var(--surface); box-shadow: inset 3px 0 0 var(--accent);
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem); display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--s-6); align-items: center;
}
.band h2 { font-size: var(--fs-xl); }
.band p { color: var(--text-muted); }
.band ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.band li { display: flex; gap: var(--s-3); align-items: center; font-weight: 600; font-size: var(--fs-sm); }
.band li svg { width: 20px; height: 20px; color: var(--accent-text); flex: none; }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: var(--s-3); }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color var(--t-fast) var(--ease); }
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: var(--s-4) var(--s-5); min-height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-3px); transition: transform var(--t) var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq .answer { padding: 0 var(--s-5) var(--s-5); color: var(--text-muted); }
.faq .answer p:last-child { margin: 0; }

/* Final CTA */
.final { text-align: center; }
.final h2 { max-width: 18em; margin-inline: auto; }
.final p { color: var(--text-muted); font-size: var(--fs-lg); max-width: 34em; margin: 0 auto var(--s-6); }
.final .cta-row { justify-content: center; margin-bottom: var(--s-4); }

/* ---------- Pro page ---------- */
.pill-status {
  display: inline-flex; align-items: center; gap: var(--s-2); padding: 6px 14px 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid rgba(247, 201, 72, 0.4); background: var(--warn-bg); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 600;
}
.pill-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.pillar { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: var(--s-6) var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.pillar h3 { font-size: var(--fs-lg); margin: var(--s-2) 0 0; }
.pillar > p { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; }
.pillar .checks { margin-top: var(--s-2); }
@media (max-width: 980px) { .pillars { grid-template-columns: 1fr; } }

/* Plans on /pro: cards drawn by PLANS_JS (build.py) from the Nashenski Pro server's public offer */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.plans > * { min-width: 0; }
.plan {
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
  padding: var(--s-6) var(--s-5); display: flex; flex-direction: column; gap: var(--s-4);
  transition: border-color var(--t) var(--ease);
}
.plan:hover { border-color: var(--border-strong); }
.plan h3 { margin: 0; }
.plan-price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
.plan-price b { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--text-muted); font-size: var(--fs-sm); }
.plan-alt { margin: calc(-1 * var(--s-2)) 0 0; color: var(--text-faint); font-size: var(--fs-xs); }
.plan .checks { margin: 0; padding-top: var(--s-4); border-top: 1px solid var(--border); }
.plan .btn { margin-top: auto; width: 100%; }
.plans-loading { color: var(--text-muted); margin: 0; }
@media (max-width: 980px) { .plans { grid-template-columns: 1fr; } }

/* /pro states, promotions and the waitlist form */
[hidden] { display: none !important; }
.plan-price s { color: var(--text-faint); font-size: var(--fs-base); font-weight: 600; }
.plan-promo { margin: calc(-1 * var(--s-2)) 0 0; color: var(--accent-text); font-size: var(--fs-xs); font-weight: 600; }
.plan-save { margin: 0; color: var(--ok); font-size: var(--fs-xs); font-weight: 600; }
.phases b .badge { margin-left: var(--s-2); vertical-align: middle; }
.waitlist { display: grid; gap: var(--s-4); }
.waitlist-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.waitlist-row input {
  flex: 1 1 16rem; min-width: 0; min-height: 50px; padding: 0 var(--s-4); font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.waitlist-consent { display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-muted); cursor: pointer; }
.waitlist-consent input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); }
.waitlist .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.waitlist-msg { margin: var(--s-4) 0 0; font-weight: 600; }
.waitlist-msg:empty { display: none; }
.waitlist-msg.ok { color: var(--ok); }
.waitlist-msg.bad { color: var(--accent-text); }

.law { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--s-8); align-items: start; }
.law-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.law-table th, .law-table td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); vertical-align: top; }
.law-table th { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.law-table td:first-child { font-family: var(--mono); font-size: 13px; color: var(--accent-text); white-space: nowrap; }
.law-table td:last-child { color: var(--text-muted); }
.phases { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); counter-reset: ph; }
.phases li { display: grid; grid-template-columns: 36px 1fr; gap: var(--s-3); align-items: start; font-size: var(--fs-sm); color: var(--text-muted); }
.phases li::before {
  counter-increment: ph; content: counter(ph); width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: grid; place-items: center; font-weight: 700; color: var(--accent-text); border: 1px solid rgba(247, 201, 72, 0.6);
}
.phases b { color: var(--text); display: block; }
@media (max-width: 920px) { .law { grid-template-columns: 1fr; gap: var(--s-6); } }

.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--fs-sm); }
.compare th, .compare td { position: relative; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); text-align: left; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); background: var(--bg-raised); }
.compare thead th.col-pro { color: var(--accent-text); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 140px; }
.compare td.col-pro { background: rgba(247, 201, 72, 0.04); }
.compare svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.yes { color: var(--ok); }
.no { color: var(--text-faint); }
.compare .group td { background: var(--bg-raised); font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

/* Comparison page: tables with text in every column, and stat tiles */
.compare--text { min-width: 640px; }
.compare--text td:not(:first-child), .compare--text th:not(:first-child) { text-align: left; width: 34%; }
.compare--text td.col-pro { color: var(--text); font-weight: 600; }
.compare--text td:not(:first-child):not(.col-pro) { color: var(--text-muted); }
.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.stats > li { min-width: 0; padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 2px 0 var(--accent); }
.stats b { display: block; font-size: var(--fs-2xl); line-height: 1.1; color: var(--accent-text); margin-bottom: var(--s-2); }
.stats span { color: var(--text-muted); font-size: var(--fs-sm); }
.stats--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .stats, .stats--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .stats, .stats--4 { grid-template-columns: 1fr; } }
.teaser-link { margin-top: var(--s-6); text-align: center; }

.note-box { border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: var(--s-4) var(--s-5); color: var(--text-muted); font-size: var(--fs-sm); }
.note-box b { color: var(--text); }

/* ---------- Download page ---------- */
.dl-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--s-5); align-items: start; }
.dl-card {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: clamp(1.25rem, 1rem + 2vw, 2.25rem);
  background: var(--surface); box-shadow: inset 0 3px 0 var(--accent);
}
.dl-top { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.dl-top img { width: 64px; height: 64px; border-radius: var(--radius-sm); }
.dl-top h2 { font-size: var(--fs-xl); margin: 0; }
.dl-top p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.dl-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin: 0 0 var(--s-5); }
.dl-facts div { padding: var(--s-3) var(--s-4); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dl-facts dt { font-size: var(--fs-xs); color: var(--text-faint); }
.dl-facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.dl-card .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.3; padding-block: var(--s-3); }
.hash { margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--text-faint); word-break: break-all; }
.hash code { white-space: normal; word-break: break-all; font-size: 11px; }
.side-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: var(--s-5); }
.side-card + .side-card { margin-top: var(--s-4); }
.side-card h3 { font-size: var(--fs-base); }
.side-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); font-size: var(--fs-sm); color: var(--text-muted); }
.side-card ul li { display: flex; justify-content: space-between; gap: var(--s-3); border-bottom: 1px solid var(--border); padding-bottom: var(--s-2); }
.side-card ul li:last-child { border: 0; padding: 0; }
.side-card ul li b { color: var(--text); font-weight: 600; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); counter-reset: st; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: var(--s-4); }
.steps li::before {
  counter-increment: st; content: counter(st); width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-strong); font-weight: 700;
}
.steps h3 { font-size: var(--fs-base); margin: 6px 0 var(--s-1); }
.steps p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
@media (max-width: 920px) { .dl-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .dl-facts { grid-template-columns: 1fr 1fr; } .dl-facts div:last-child { grid-column: span 2; } }

.changelog { display: grid; gap: var(--s-4); }
.release { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: var(--s-5); }
.release-head { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-3); }
.release-head h3 { margin: 0; font-size: var(--fs-lg); font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.release-head time { color: var(--text-faint); font-size: var(--fs-xs); }
.release h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin: var(--s-3) 0 var(--s-2); }
.release ul { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }
.release li + li { margin-top: var(--s-1); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: var(--s-8) 0 var(--s-7); position: relative; overflow: hidden; isolation: isolate; }
.page-hero h1 { font-size: var(--fs-2xl); max-width: 16em; }
.page-hero .lede { margin-bottom: var(--s-5); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-raised); padding: var(--s-7) 0 var(--s-6); font-size: var(--fs-sm); color: var(--text-muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s-6); }
.foot-grid h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: var(--s-3); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-1); }
.foot-grid a { text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; transition: color var(--t-fast) var(--ease); }
.foot-grid a:hover { color: var(--text); }
.foot-brand p { max-width: 30em; margin-top: var(--s-3); }
.foot-bottom { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-xs); color: var(--text-faint); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: span 2; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 320ms var(--ease), transform 320ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { transition-delay: 60ms; }
.hero .reveal:nth-child(3) { transition-delay: 120ms; }
.hero .reveal:nth-child(4) { transition-delay: 180ms; }
.hero .reveal:nth-child(5) { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-muted); cursor: pointer; display: inline-grid; place-items: center;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.theme-toggle:hover { color: var(--text); background: var(--surface); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.nav-tools { display: flex; align-items: center; gap: var(--s-2); }
@media (max-width: 1180px) { .nav-tools { justify-content: space-between; } }

/* ---------- Courier logos (shown unaltered, on white, in both themes) ---------- */
.logo-tile {
  display: inline-flex; align-items: center; justify-content: center;
  background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.logo-tile img { width: auto; display: block; }
.strip-list { gap: var(--s-3); }
.strip-list li { display: flex; }
.strip-list .logo-tile { height: 64px; padding: 0 var(--s-5); min-width: 150px; }
.strip-list .logo-tile img { height: 30px; }
.strip-list .logo-tile img.tall { height: 46px; }
.ship .logo-tile { height: 34px; width: 84px; padding: 0 8px; flex: none; }
.ship .logo-tile img { max-height: 20px; max-width: 100%; }
.ship .logo-tile img.tall { max-height: 28px; }
.ship-opt { grid-template-columns: 20px auto 1fr auto; }
.ship-pick { grid-column: 2 / -1; }
.rows .logo-tile { height: 36px; width: 92px; padding: 0 8px; flex: none; }
.rows .logo-tile img { max-height: 20px; max-width: 100%; }
.rows .logo-tile img.tall { max-height: 30px; }
.rows .courier { display: flex; align-items: center; gap: var(--s-4); min-width: 0; }
@media (max-width: 520px) {
  .strip-list { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .strip-list .logo-tile { min-width: 0; width: 100%; }
  .ship .logo-tile { width: 64px; }
  .rows .logo-tile { width: 72px; }
}

/* Бай Ганьо, the mascot: at most one per page, wide screens only (mascot() in build.py). */
.mascot { display: none; }
/* Below 1240px only the peek shows: small, at the right of the hero's shipping card, clear of the checks above it. */
@media (max-width: 1239px) {
  .mascot--peek { display: block; position: absolute; pointer-events: none; right: var(--s-5); bottom: calc(100% - 12px); height: 72px; }
  .mascot--peek img { width: auto; height: 100%; max-width: none; }
  /* Waving over the last call to action (wide screens have their own mascot there or elsewhere). */
  .mascot--cta { display: block; width: fit-content; height: 150px; margin: 0 auto var(--s-4); pointer-events: none; }
  .mascot--cta img { display: block; width: auto; height: 100%; max-width: none; }
}
@media (min-width: 1240px) { .mascot.mascot--cta { display: none; } }
@media (min-width: 1240px) {
  .mascot { display: block; position: absolute; pointer-events: none; }
  .mascot img { width: auto; height: 100%; max-width: none; }
  .mascot--flip img { transform: scaleX(-1); }
  .mascot--hero { right: calc((100% - var(--container)) / 2 + var(--gutter)); bottom: 0; height: min(340px, calc(100% - var(--s-6))); }
  .mascot-host { position: relative; }
  .mascot--side { right: 0; bottom: 0; height: 240px; }
  .mascot--stand { right: var(--s-6); bottom: 100%; height: 230px; } /* standing on top of a panel */
  /* Hands over the top edge of the hero's shipping card. The hero clips what sticks out, and there is
     about 95px above the card, so he stays under 92px above it. */
  .mascot--peek { left: 20%; bottom: calc(100% - 18px); height: 110px; }
}
