/* Spectra — tactical dark UI.
   Brand violet is the in-game menu's default accent (MenuTheme accent_default).
   Fonts are Windows system faces on purpose: the CSP allows no external fonts,
   and Bahnschrift ships with Windows 10+. */
:root {
  --bg: #0a0b0e;
  --surface: #121419;
  --surface-2: #181b21;
  --line: #242832;
  --line-2: #353b47;
  --text: #eceef2;
  --dim: #9aa1ad;
  --faint: #858c99;
  --accent: #8b5cf6;
  --accent-fill: #7447ee;   /* white text on it passes AA; #8b5cf6 does not */
  --accent-hi: #b39dff;
  --ok: #3ddc84;
  --warn: #ffb020;
  --bad: #ff5a67;

  --display: "Bahnschrift", "DIN Alternate", "Arial Narrow", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;

  --gap-xs: 4px;
  --gap-sm: 12px;
  --gap: 18px;
  --gap-lg: 28px;
  --r: 3px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--line-2) transparent; }
body {
  margin: 0;
  min-height: 100vh;
  font: 14px/1.55 var(--body);
  color: var(--text);
  background: var(--bg);
}
/* A faint tactical grid that fades out below the fold. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
::selection { background: rgba(139, 92, 246, .38); }

a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; }
h2 {
  font-size: 16px; line-height: 1.2;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: var(--gap-xs);
}
.display {
  font-size: clamp(34px, 4.4vw, 56px); line-height: .98;
  text-transform: uppercase; letter-spacing: .01em;
  font-stretch: 87.5%;
}
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 var(--gap-sm);
  font: 600 11.5px/1 var(--mono);
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent-hi);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--accent); }
.lead { color: var(--dim); font-size: 15.5px; max-width: 52ch; margin: var(--gap) 0 0; }
.sub { color: var(--dim); font-size: 13.5px; margin: 0 0 var(--gap); }
.muted { color: var(--faint); font-size: 12.5px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.mt { margin-top: var(--gap); }
.hide { display: none !important; }

/* ---- Shell ---------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 11, 14, .92);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: 1120px; height: 60px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text);
  font: 700 17px/1 var(--display); letter-spacing: .22em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }
.brand small {
  font: 600 11px/1 var(--mono); letter-spacing: .12em; color: var(--accent-hi);
  padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 2px;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a, .nav-links button {
  padding: 9px 12px; border: 0; border-radius: var(--r); background: none;
  font: 600 13px/1 var(--display); text-transform: uppercase; letter-spacing: .07em;
  color: var(--dim); cursor: pointer;
}
.nav-links a:hover, .nav-links button:hover {
  color: var(--text); background: var(--surface-2); text-decoration: none;
}

.lang { display: flex; gap: 2px; margin-left: 6px; }
.lang button {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r);
  background: none; color: var(--faint);
  font: 600 11px/1 var(--mono); letter-spacing: .08em; cursor: pointer;
}
.lang button:hover { color: var(--text); border-color: var(--line-2); }
.lang button.on { color: var(--accent-hi); border-color: var(--accent); }

.page { max-width: 1120px; margin: 0 auto; padding: 32px 20px 24px; }
.footer {
  max-width: 1120px; margin: 40px auto 0; padding: 20px 20px 32px;
  border-top: 1px solid var(--line);
  color: var(--faint); font-size: 12px;
}

/* ---- Panels --------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
}
.card + .card { margin-top: var(--gap); }
/* The HUD tick: marks the one panel on a screen that matters most. */
.card.accent::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 56px; height: 2px; background: var(--accent);
}
.spread {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding-bottom: var(--gap-xs);
}
.spread > h2 { margin-bottom: 0; }
.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap); align-items: start;
}
.grid > .card { margin-top: 0; }
.span2 { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Screenshot frame with corner brackets, and the arrows that flip it. */
.frame { position: relative; padding: 6px; background: var(--surface); border: 1px solid var(--line); }
.frame img { display: block; width: 100%; height: auto; }
.frame-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 46px; cursor: pointer; opacity: 0;
  background: rgba(10, 11, 14, .78); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r);
  font: 20px/1 var(--body);
  transition: opacity .15s, border-color .12s;
}
.frame:hover .frame-nav, .frame-nav:focus-visible { opacity: 1; }
.frame-nav:hover { border-color: var(--accent); }
.frame-nav.prev { left: 12px; }
.frame-nav.next { right: 12px; }
.frame-count {
  position: absolute; right: 12px; bottom: 12px;
  padding: 3px 7px; border-radius: 2px;
  background: rgba(10, 11, 14, .78); border: 1px solid var(--line);
  font: 11px var(--mono); letter-spacing: .08em; color: var(--dim);
}
/* No hover on a touch screen: the arrows stay up. */
@media (hover: none) { .frame-nav { opacity: 1; } }
.frame::before, .frame::after {
  content: ""; position: absolute; width: 20px; height: 20px;
  border: 0 solid var(--accent);
}
.frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ---- Forms ---------------------------------------------------------------- */
label {
  display: block; margin: 16px 0 7px;
  font: 600 11.5px/1 var(--display); text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint);
}
label .muted { text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 400; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  color: var(--text);
  font: 14.5px var(--body);
  outline: none;
  transition: border-color .12s;
}
#key, #invite { font-family: var(--mono); letter-spacing: .04em; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #5d6470; }
textarea { resize: vertical; min-height: 84px; }
input[type=file] { color: var(--dim); font: 13px var(--body); padding: 8px 0; }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 8px 12px; cursor: pointer;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r);
  font: 600 12px/1 var(--display); text-transform: uppercase; letter-spacing: .06em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: var(--gap); padding: 15px 20px;
  border: 0; border-radius: 0; cursor: pointer;
  font: 600 14px/1 var(--display); text-transform: uppercase; letter-spacing: .09em;
  color: #fff; background: var(--accent-fill);
  /* Chamfered corner: the signature shape of the primary action. */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
  transition: background .12s, color .12s, box-shadow .12s;
}
.btn:hover { background: #8458ff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { clip-path: none; }   /* the chamfer would clip the outline */
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost, .btn.secondary, .btn.danger { clip-path: none; border-radius: var(--r); }
.btn.ghost { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--faint); }
.btn.secondary { background: rgba(139, 92, 246, .14); color: var(--accent-hi); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .5); }
.btn.danger { background: rgba(255, 90, 103, .08); color: #ff8f99; box-shadow: inset 0 0 0 1px rgba(255, 90, 103, .4); }
.btn.danger:hover { background: rgba(255, 90, 103, .16); }
.btn.small { width: auto; margin: 0; padding: 8px 12px; font-size: 12px; }
.btn img { width: 20px; height: 20px; }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.msg {
  display: none; margin-top: var(--gap); padding: 10px 14px;
  border-left: 3px solid; border-radius: 0 var(--r) var(--r) 0;
  font-size: 13.5px;
}
.msg.show { display: block; }
.msg.err { background: rgba(255, 90, 103, .08); border-color: var(--bad); color: #ffadb4; }
.msg.ok { background: rgba(61, 220, 132, .08); border-color: var(--ok); color: #9ff0c2; }

.help { margin: var(--gap) 0 0; padding-top: var(--gap); border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }

/* ---- Tabs ----------------------------------------------------------------- */
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: var(--gap); }
.tab {
  flex: 1; padding: 11px 12px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  font: 600 13px/1 var(--display); text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint); cursor: pointer;
  transition: color .12s, border-color .12s;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs + form label:first-child,
.tabs + form > div > label:first-child { margin-top: 0; }

/* Compact segmented switch, for a range picker inside a card header. */
.tabs.seg { flex: none; margin: 0; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: var(--r); }
.tabs.seg .tab { margin: 0; border: 0; border-radius: 2px; }
.tabs.seg .tab.on { background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.tab.small { flex: none; padding: 7px 11px; font-size: 12px; }

.channel-tabs { flex-wrap: wrap; gap: 6px; border: 0; }
.channel-tabs .tab {
  display: inline-flex; align-items: baseline; gap: 8px; max-width: min(100%, 320px);
  margin: 0; padding: 9px 14px; text-transform: none; letter-spacing: .02em;   /* a pometka shows as typed */
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.channel-tabs .tab.on { border-color: var(--accent); background: rgba(139, 92, 246, .1); }
.tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-sub { flex: none; font: 12px var(--mono); letter-spacing: 0; color: var(--faint); }
.tab.on .tab-sub { color: var(--accent-hi); }

/* ---- Data bits -------------------------------------------------------------- */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: var(--gap-sm) 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--dim); font-size: 13.5px; }
.kv .v { font-size: 13.5px; font-weight: 600; text-align: right; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 2px;
  font: 600 11px/1 var(--display); text-transform: uppercase; letter-spacing: .08em;
  white-space: nowrap;
}
.pill.on { background: rgba(61, 220, 132, .1); color: var(--ok); }
.pill.off { background: rgba(255, 176, 32, .1); color: var(--warn); }
.pill.bad { background: rgba(255, 90, 103, .1); color: var(--bad); }
.dot { width: 6px; height: 6px; background: currentColor; }

.notice {
  margin-top: var(--gap); padding: 11px 14px;
  background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 var(--r) var(--r) 0;
  color: var(--dim); font-size: 13px; line-height: 1.55;
}
.notice b { color: var(--text); }
.notice.warn { border-color: var(--warn); background: rgba(255, 176, 32, .07); color: #f3d38f; }
.notice.block { margin: var(--gap) 0; padding: 13px 16px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font: 600 11px/1 var(--display); text-transform: uppercase; letter-spacing: .09em; color: var(--faint); }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td .mono { font-size: 12px; }
.scroll { overflow-x: auto; }
/* Long admin tables scroll inside their panel with the header pinned. */
.scroll.tall { max-height: 520px; overflow-y: auto; }
.scroll.tall th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
td.row { display: table-cell; white-space: nowrap; }
td.row > * + * { margin-left: 6px; }

.codebox {
  padding: 12px 14px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r);
  font: 13px var(--mono); color: var(--accent-hi); white-space: pre-wrap; word-break: break-all;
}
.changelog { color: var(--dim); font-size: 13px; white-space: pre-wrap; line-height: 1.5; }

/* Stat readout: tiles joined by hairlines, like a HUD strip. */
.hero-stats {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.stat { background: var(--surface-2); padding: 12px 16px; min-width: 0; }
.stat-value {
  font: 600 26px/1.05 var(--display); font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat-label {
  margin-top: 6px;
  font: 600 10.5px/1 var(--display); text-transform: uppercase; letter-spacing: .12em;
  color: var(--faint);
}

/* ---- Auth pages (/ and /register) --------------------------------------------- */
.auth {
  max-width: 1120px; margin: 0 auto; padding: 56px 20px 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 64px; align-items: center;
}
.pitch .frame { margin-top: var(--gap-lg); }

/* ---- Dashboard ------------------------------------------------------------------ */
.hero {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center;
  margin-bottom: var(--gap); padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.hero::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; background: var(--accent); }
.hero .eyebrow { margin-bottom: 8px; }
/* A row, so the number cannot be eaten by the name's ellipsis: the name is the
   only part allowed to shrink, and a 20-character login on a phone still leaves
   the id readable — which is the whole reason it is on screen. */
.hero-name {
  display: flex; align-items: baseline; gap: 10px; min-width: 0;
  font: 600 32px/1 var(--display); letter-spacing: .01em;
}
.hero-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The public account number, beside the name rather than as its own column:
   .hero is a THREE-column grid (auto / 1fr / auto), and a fourth child wraps to
   a second row — which stretches the avatar column to the width of the stats and
   turns the round "Сменить" overlay into an ellipse. */
.hero-id { flex: none; font: 600 15px/1 var(--mono); color: var(--faint); letter-spacing: .04em; }
.hero-sub { margin-top: 6px; color: var(--dim); font-size: 13px; }
.hero-actions { display: flex; align-items: center; gap: 8px; margin-top: var(--gap-sm); flex-wrap: wrap; }
/* Its own reserved line: the hint comes and goes on a timer and must not move the header. */
.hero-hint { flex: 1 0 100%; min-height: 15px; font-size: 12px; line-height: 15px; color: var(--dim); }
.hero-hint.bad { color: #ffadb4; }

.avatar {
  position: relative; flex: none; display: grid; place-items: center;
  border-radius: 50%; user-select: none;
  font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--a-from, #7447ee), var(--a-to, #3a2a7a));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar-ring { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.avatar-slot { position: relative; flex: none; margin: 5px; }
.avatar-edit {
  position: absolute; inset: 0; border: 0; border-radius: 50%;
  background: rgba(6, 7, 10, .72); color: var(--text);
  font: 600 11px/1 var(--display); text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer; opacity: 0; transition: opacity .15s;
}
.avatar-slot:hover .avatar-edit, .avatar-edit:focus-visible { opacity: 1; }

/* Configs */
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap-sm); }
.cfg-card {
  display: flex; flex-direction: column; gap: var(--gap-sm);
  padding: 14px 16px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .12s;
}
.cfg-card:hover { border-color: var(--line-2); }
.cfg-name { font: 600 15px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-meta { margin-top: var(--gap-xs); color: var(--faint); font-size: 11.5px; }
.cfg-code {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 6px 6px 6px 10px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r);
  font: 12px var(--mono); color: var(--accent-hi);
}
.cfg-code span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-copy {
  margin-left: auto; padding: 5px 8px; cursor: pointer; white-space: nowrap;
  background: rgba(139, 92, 246, .14); color: var(--accent-hi);
  border: 1px solid rgba(139, 92, 246, .45); border-radius: 2px;
  font: 600 10.5px/1 var(--display); letter-spacing: .08em;
}
.cfg-copy:hover { background: rgba(139, 92, 246, .26); }
.cfg-copy.flash { background: rgba(61, 220, 132, .14); border-color: rgba(61, 220, 132, .5); color: var(--ok); }
.cfg-actions { display: flex; gap: 7px; }
.cfg-actions .btn { flex: 1; }
.cfg-empty { grid-column: 1 / -1; padding: 6px 0 2px; color: var(--faint); font-size: 13px; }

/* ---- Buy ------------------------------------------------------------------------ */
.buy-hero {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 56px; align-items: center; padding: 24px 0 8px;
}
.buy-hero .display { font-size: clamp(56px, 8vw, 108px); letter-spacing: .06em; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--gap-lg); }
.cta-row .btn { width: auto; margin: 0; padding: 16px 24px; }
.seller { display: flex; align-items: center; gap: 8px; margin-top: var(--gap-sm); color: var(--faint); font-size: 12.5px; }
.seller img { width: 18px; height: 18px; border-radius: 2px; }

.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px; margin: 48px 0 var(--gap);
  background: var(--line); border: 1px solid var(--line);
}
.step { background: var(--surface); padding: 20px 22px; }
.step b { display: block; margin-bottom: 6px; font: 600 15px/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em; }
.step p { margin: 0; color: var(--dim); font-size: 13.5px; }
.step-n { display: block; margin-bottom: 14px; font: 600 12px/1 var(--mono); color: var(--accent-hi); letter-spacing: .1em; }

/* Masonry by column count: the lists are wildly different lengths. */
.features { columns: 3; column-gap: var(--gap); margin-top: var(--gap); }
.ftext { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.fcol {
  display: inline-block; width: 100%; break-inside: avoid;
  margin-bottom: var(--gap); padding: 16px 18px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
}
.fcol-head {
  display: flex; align-items: center; gap: 10px; margin: 0 0 var(--gap-sm);
  font: 600 14px/1 var(--display); letter-spacing: .1em;
}
.fcol-icon { display: grid; place-items: center; flex: none; color: var(--accent-hi); }
.fcol-icon svg { width: 18px; height: 18px; }
.fgroup {
  margin: var(--gap-sm) 0 6px;
  font: 600 10.5px/1 var(--display); text-transform: uppercase; letter-spacing: .12em;
  color: var(--faint);
}
.fcol .fgroup:first-of-type { margin-top: 0; }
.flist { margin: 0; padding: 0; list-style: none; }
.flist li { position: relative; padding: 3px 0 3px 14px; color: var(--dim); font-size: 13px; line-height: 1.4; }
.flist li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; background: var(--accent); }

/* Columns, not a row grid: the shots have different aspects and a fixed-height
   row would crop them. This shows each one whole. */
.shots { columns: 3; column-gap: var(--gap-sm); margin-top: var(--gap); }
.shot {
  display: inline-block; width: 100%; break-inside: avoid;
  margin: 0 0 var(--gap-sm); padding: 0; cursor: zoom-in;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .12s;
}
.shot:hover { border-color: var(--accent); }
.shot img { display: block; width: 100%; height: auto; }

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 28px;
  background: rgba(5, 6, 8, .92); cursor: zoom-out;
}
.lightbox-figure { margin: 0; max-width: 100%; max-height: 100%; cursor: default; }
.lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 72px); border: 1px solid var(--line-2); }
.lightbox-close {
  position: absolute; top: 18px; right: 20px; width: 36px; height: 36px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r);
  font: 16px var(--body);
}
.lightbox-close:hover { border-color: var(--accent); }

/* A folded block: the feature list is 240 rows and nobody wants it open by
   default. <details> handles the state, so this is only paint. */
.disclose > summary {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  list-style: none; padding: 2px 0;
}
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary:hover .disclose-mark { color: var(--text); border-color: var(--line-2); }
.disclose > summary h2 { margin: 0; }
.disclose-mark {
  margin-left: auto; display: grid; place-items: center;
  width: 28px; height: 28px; flex: none;
  border: 1px solid var(--line); border-radius: var(--r);
  color: var(--dim); font-size: 12px;
  transition: transform .15s, color .12s, border-color .12s;
}
.disclose[open] .disclose-mark { transform: rotate(180deg); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 64px; cursor: pointer;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r);
  font: 26px/1 var(--body);
}
.lightbox-nav:hover { border-color: var(--accent); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-count {
  margin-top: 10px; text-align: center;
  font: 12px var(--mono); letter-spacing: .1em; color: var(--faint);
}
@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lightbox-nav { width: 40px; height: 52px; }
  .lightbox-nav.prev { left: 6px; }
  .lightbox-nav.next { right: 6px; }
}

/* ---- Sales panel ------------------------------------------------------------------ */
/* Scale as a unit where there is room; a fixed height distorts the axis text. */
.chart { width: 100%; height: 170px; display: block; margin-bottom: var(--gap); }
@media (min-width: 760px) { .chart { height: auto; aspect-ratio: 720 / 170; } }
.chart .grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 10px; font-family: var(--mono); }
.chart-empty {
  margin-bottom: var(--gap); padding: 26px 0; text-align: center;
  color: var(--faint); font-size: 13px;
  border: 1px dashed var(--line-2); border-radius: var(--r);
}
.sales-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 var(--gap-lg); }
.bars { margin-bottom: var(--gap); }
.bar-row { display: grid; grid-template-columns: minmax(84px, 30%) 1fr auto; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.bar-label { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 6px; background: var(--surface-2); }
.bar-fill { display: block; height: 100%; background: var(--accent); }
.bar-value { font-family: var(--mono); font-size: 12.5px; }
#salService { margin: var(--gap-sm) 0 0; font-size: 13px; }
.price-cell { display: flex; align-items: center; gap: 8px; }
.price-input { width: 96px; padding: 6px 8px; font-size: 13px; text-align: right; }

/* ---- Responsive --------------------------------------------------------------------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
  .auth .pitch .frame, .auth .lead { display: none; }
  .buy-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: auto minmax(0, 1fr); }
  .hero-stats { grid-column: 1 / -1; }
  .features { columns: 2; }
  .shots { columns: 2; }
}
@media (max-width: 1100px) and (min-width: 901px) { .features { columns: 3; } }
@media (max-width: 560px) {
  .nav-in { padding: 0 12px; gap: 8px; }
  .nav-links a, .nav-links button { padding: 9px 7px; font-size: 12px; }
  .brand { font-size: 0; gap: 0; }   /* logo only: the links need the room */
  .hero-stats { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .features { columns: 1; }
  .shots { columns: 1; }
  .card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
