/* batchcode — тёмная тема, один акцент: signal lime */
:root {
  --void: #000000; --carbon: #060606; --onyx: #1f1f1f; --graphite: #252525; --iron: #313131;
  --slate: #3d3d3d; --fog: #525252; --ash: #7a7a7a; --smoke: #8a8a8a; --pearl: #c5c5c5;
  --bone: #e5e5e5; --chalk: #ffffff;
  --lime: #c5ff4a; --olive: #597321; --moss: #314013;
  --glow: 0 0 8px 0 rgba(197, 255, 74, .45);
  --glow-lg: 0 0 24px 2px rgba(197, 255, 74, .35);

  --serif: 'Source Serif 4', 'PT Serif', ui-serif, Georgia, 'Times New Roman', serif;
  --sans: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark; accent-color: var(--lime);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scrollbar-width: thin; scrollbar-color: var(--iron) var(--carbon); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--carbon); }
::-webkit-scrollbar-thumb { background: var(--iron); border: 3px solid var(--carbon); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--fog); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--carbon); color: var(--bone);
  font: 400 15px/1.6 var(--sans); letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--lime); color: var(--void); }
a { color: inherit; }
em { font-style: italic; }
code { font-family: var(--mono); }

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

.topbar { z-index: 30; }
main, .footer { position: relative; z-index: 1; }
main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

/* ---------- Типографика ---------- */
.stamp {
  font: 500 11px/1.3 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ash);
}
.display {
  margin: 18px 0 0; color: var(--chalk);
  font: 300 clamp(44px, 10.5vw, 96px)/.94 var(--serif); letter-spacing: -.03em;
  font-optical-sizing: auto;
}
.display em, .h2 em, .result__date em { color: var(--lime); font-weight: 300; }
.h2 {
  margin: 0 0 12px; color: var(--chalk);
  font: 300 clamp(26px, 5vw, 36px)/1.08 var(--serif); letter-spacing: -.015em;
}
.lead { max-width: 520px; margin: 22px 0 0; color: var(--pearl); font-size: clamp(15px, 2.2vw, 17px); line-height: 1.6; }
.muted { color: var(--ash); font-size: 14px; line-height: 1.6; margin: 0; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(0, 0, 0, .72);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--graphite);
}
.topbar__in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1280px; height: 60px; margin: 0 auto; padding: 0 var(--gutter);
}
.brandmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brandmark__tile {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 0;
  background: var(--lime); color: var(--void); box-shadow: var(--glow);
  font: 300 20px/1 var(--serif); transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.brandmark:hover .brandmark__tile { transform: rotate(-8deg) scale(1.06); box-shadow: var(--glow-lg); }
.brandmark__word { font: 300 21px/1 var(--serif); color: var(--chalk); letter-spacing: -.01em; }
.brandmark__word em { color: var(--lime); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 9vw, 104px) 0 clamp(32px, 5vw, 56px); overflow: hidden; isolation: isolate; }
.hero__dots {
  position: absolute; inset: -22px; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 78% 35%, #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 78% 35%, #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
  opacity: .55; animation: dots-drift 24s linear infinite, dots-breathe 7s ease-in-out infinite;
}
.hero__dots::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 78% 35%, rgba(197, 255, 74, .10), transparent 40%);
  animation: dots-glow 7s ease-in-out infinite;
}
@keyframes dots-drift { to { background-position: 22px -22px; } }
@keyframes dots-breathe { 50% { opacity: .38; } }
@keyframes dots-glow { 50% { opacity: .3; } }
.check { padding-top: clamp(28px, 5vw, 48px); }
.reveal { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Форма-консоль ---------- */
.console {
  position: relative; margin-top: 0;
  display: grid; grid-template-columns: 1.35fr 1fr auto; gap: 16px; align-items: start;
  padding: 24px; background: rgba(31, 31, 31, .78); border: 1px solid var(--graphite);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .3s;
}
.console:focus-within { border-color: var(--iron); }
.console__scan {
  position: absolute; left: 0; right: 0; top: 0; height: 1px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  box-shadow: 0 0 12px 1px rgba(197, 255, 74, .6);
}
.console.is-busy .console__scan { opacity: 1; animation: scan 1s var(--ease) infinite; }
@keyframes scan { 0% { top: 0; } 100% { top: 100%; } }
.console .btn { margin-top: 19px; height: 52px; }

.field { position: relative; min-width: 0; }
.field__label {
  display: block; height: 11px; margin-bottom: 8px;
  font: 500 11px/11px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--smoke);
}
.field__hint { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--ash); min-height: 17px; }
.field__hint:empty { margin: 0; min-height: 0; }
@media (min-width: 761px) { .field__hint:empty { margin-top: 8px; min-height: 17px; } }

.input {
  display: block; width: 100%; height: 52px; padding: 0 16px;
  background: var(--carbon); color: var(--chalk); border: 1px solid var(--slate); border-radius: 0;
  font: 400 16px/1 var(--sans); outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input { caret-color: var(--lime); }
.input::placeholder { color: var(--fog); }
.input:hover { border-color: var(--fog); }
.input:focus { border-color: var(--lime); box-shadow: var(--glow); background: var(--void); }
select.input {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%237a7a7a' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
select.input option { background: var(--onyx); color: var(--bone); }
.input--code {
  font: 500 22px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--lime);
}
.input--code::placeholder { color: var(--iron); letter-spacing: .18em; }
input[type=number].input { -moz-appearance: textfield; }
input[type=number].input::-webkit-inner-spin-button { -webkit-appearance: none; }

.is-err { animation: shake .4s; }
.is-err .input, .is-err.input { border-color: var(--chalk); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Комбобокс брендов */
.combo__box { position: relative; }
.combo__box .input { padding-right: 48px; }
.combo.is-set .input { color: var(--chalk); }
.combo__toggle {
  position: absolute; right: 4px; top: 4px; bottom: 4px; width: 40px; padding: 0;
  display: grid; place-items: center; background: none; border: 0; color: var(--ash); cursor: pointer;
  transition: color .2s, transform .3s var(--ease);
}
.combo.is-open .combo__toggle { transform: rotate(180deg); color: var(--lime); }
.combo__list {
  position: absolute; z-index: 20; left: 0; right: 0; top: 76px; margin: 0; padding: 6px 0;
  max-height: min(340px, 50vh); overflow-y: auto; overscroll-behavior: contain; list-style: none;
  background: var(--graphite); border: 1px solid var(--iron); border-radius: 0;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .8);
  animation: drop .22s var(--ease);
  scrollbar-width: thin; scrollbar-color: var(--fog) transparent;
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.combo__group {
  position: sticky; top: -6px; padding: 10px 16px 6px; background: var(--graphite);
  font: 500 10px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ash);
}
.combo__opt {
  position: relative; padding: 10px 16px 10px 28px; cursor: pointer; color: var(--bone); font-size: 15px;
  transition: background .12s, color .12s;
}
.combo__opt::before {
  content: ''; position: absolute; left: 14px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  border-radius: 0; background: var(--lime); opacity: 0; transform: scale(0); transition: .2s var(--ease);
}
.combo__opt.is-active { background: var(--iron); color: var(--chalk); }
.combo__opt.is-active::before { opacity: 1; transform: none; box-shadow: var(--glow); }
.combo__opt mark { background: none; color: var(--lime); }
.combo__empty { padding: 14px 16px; color: var(--ash); font-size: 14px; }

/* ---------- Кнопки ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px; border-radius: 0; cursor: pointer; white-space: nowrap;
  font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  transition: transform .15s, box-shadow .3s var(--ease), background .2s, color .2s; overflow: hidden;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.btn--primary { background: var(--lime); color: var(--void); border: 0; box-shadow: var(--glow); }
.btn--primary:hover { box-shadow: var(--glow-lg); }
.btn--primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg); transition: none;
}
.btn--primary:hover::after { left: 130%; transition: left .7s var(--ease); }
.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.is-busy .btn__arrow { animation: nudge .6s ease-in-out infinite alternate; }
@keyframes nudge { to { transform: translateX(6px); } }
.btn--ghost { background: transparent; color: var(--lime); border: 1px solid var(--lime); box-shadow: var(--glow); }
.btn--ghost:hover { background: var(--lime); color: var(--void); }

/* ---------- Неоновая полоса ---------- */
.neon {
  height: 6px; background: var(--lime); box-shadow: 0 0 18px rgba(197, 255, 74, .35);
  transform-origin: left; animation: sweep 1.2s .5s var(--ease) both;
}
@keyframes sweep { from { transform: scaleX(0); } }

/* ---------- Контент ---------- */
.content { padding-top: clamp(32px, 6vw, 56px); padding-bottom: clamp(56px, 10vw, 96px); }
#out:empty { display: none; }

.panel {
  position: relative; margin: 0 0 20px; padding: clamp(22px, 5vw, 40px);
  background: var(--onyx); border: 1px solid var(--graphite);
}
.eyebrow {
  display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px;
  font: 500 11px/1.3 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ash);
}
.eyebrow span:last-child { flex: none; font-family: var(--mono); letter-spacing: .12em; }

/* Результат */
.result { opacity: 0; transform: translateY(24px); }
#out.is-in .result, #out.is-in .notice {
  animation: rise .8s var(--ease) forwards; animation-delay: calc(var(--i, 0) * .14s);
}
#out .notice { opacity: 0; }
.result::before {
  content: ''; position: absolute; left: -1px; top: -1px; height: 2px; width: 0;
  background: var(--lime); box-shadow: var(--glow);
}
#out.is-in .result:not(.result--alt):not(.result--empty)::before { animation: line 1.1s .25s var(--ease) forwards; }
@keyframes line { to { width: calc(100% + 2px); } }
.result--alt { background: var(--carbon); }
.result--warn { border-color: var(--fog); border-style: dashed; }

.result__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.result__date {
  margin: 0; color: var(--chalk); font: 300 clamp(38px, 9vw, 68px)/.98 var(--serif); letter-spacing: -.025em;
  min-height: 1em;
}
.result--alt .result__date { font-size: clamp(30px, 6vw, 44px); color: var(--pearl); }
.conf {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 0;
  border: 1px solid var(--fog); color: var(--pearl);
  font: 500 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
}
.conf--high { border-color: var(--lime); color: var(--lime); box-shadow: var(--glow); }
.conf--low { border-style: dashed; color: var(--smoke); }
.conf__bars { display: inline-flex; gap: 3px; align-items: flex-end; }
.conf__bars i { display: block; width: 3px; background: var(--iron); }
.conf__bars i:nth-child(1) { height: 6px; } .conf__bars i:nth-child(2) { height: 9px; } .conf__bars i:nth-child(3) { height: 12px; }
.conf__bars i.on { background: currentColor; }

.metrics { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 24px 0 0; }
.metric { display: flex; flex-direction: column; gap: 6px; }
.metric__label { font: 500 10px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ash); }
.metric__val { font-size: 18px; color: var(--bone); }
.metric__val b { font: 500 26px/1 var(--mono); color: var(--chalk); font-variant-numeric: tabular-nums; }
.metric__val--dim { font-family: var(--mono); font-size: 16px; color: var(--smoke); padding-top: 6px; }

.result--empty .h2 { margin-top: 4px; }

.notice {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 20px; padding: 16px 20px;
  border: 1px solid var(--graphite); border-left: 2px solid var(--lime); background: var(--carbon);
}
.notice p { margin: 0; font-size: 14px; color: var(--pearl); flex: 1 1 260px; }
.notice--err { border-left-color: var(--chalk); }

.disclaimer {
  margin-top: 36px; background: rgba(6, 6, 6, .7); padding: 22px 24px; border: 1px dashed var(--fog);
  display: flex; flex-direction: column; gap: 10px;
}
.disclaimer p { margin: 0; color: var(--pearl); font-size: 14px; }

.fade { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fade.is-in { opacity: 1; transform: none; }

/* Подвал */
.footer { border-top: 1px solid var(--graphite); background: var(--void); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 28px; padding-bottom: 28px; }
.footer .brandmark__word { font-size: 18px; }

/* ---------- Адаптив ---------- */
@media (max-width: 760px) {
  .console { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .console .btn { margin-top: 8px; width: 100%; height: 54px; }
  .hide-sm { display: none; }
}
@media (max-width: 420px) {
  .metrics { gap: 16px 28px; }
  .eyebrow { font-size: 10px; letter-spacing: .18em; }
}
@media (hover: none) {
  .btn--primary::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__dots, .hero__dots::after { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}

/* ---------- Админка (общие элементы) ---------- */
.card { background: var(--onyx); border: 1px solid var(--graphite); padding: clamp(18px, 4vw, 32px); margin: 20px 0; }
.card h2 { margin: 0 0 10px; font: 300 26px/1.1 var(--serif); color: var(--chalk); }
.head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.admin h1 { margin: 32px 0 8px; font: 300 clamp(32px, 6vw, 48px)/1 var(--serif); color: var(--chalk); letter-spacing: -.02em; }
.admin h1 em { color: var(--lime); }
.admin a { color: var(--ash); text-decoration: none; font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.admin a:hover { color: var(--lime); }
.admin label { display: block; margin-bottom: 14px; font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--smoke); }
.admin label input { margin-top: 8px; }
.admin input[type=password], .admin select {
  display: block; width: 100%; height: 48px; padding: 0 14px; background: var(--carbon); color: var(--chalk);
  border: 1px solid var(--slate); border-radius: 0; font: 400 15px var(--sans); outline: none;
}
.admin input:focus, .admin select:focus { border-color: var(--lime); box-shadow: var(--glow); }
.admin button { height: 48px; padding: 0 24px; border: 0; border-radius: 0; background: var(--lime); color: var(--void);
  font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; box-shadow: var(--glow); }
.admin td select { height: 34px; width: auto; padding: 0 10px; font-size: 13px; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * clamp(18px, 4vw, 32px)); padding: 0 clamp(18px, 4vw, 32px); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--slate); white-space: nowrap;
  font: 500 10px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ash); }
td { padding: 10px; border-bottom: 1px solid var(--graphite); vertical-align: top; color: var(--bone); }
tr:hover td { background: rgba(255, 255, 255, .02); }
td code { color: var(--lime); font-size: 14px; letter-spacing: .06em; }
td small { color: var(--smoke); }
.ok { color: var(--lime); }
.bad { color: var(--chalk); font-weight: 600; }
.mid { color: var(--smoke); }
