/* ==========================================================================
   PROCESA PILOT · 06 Конвейер креативов — брутальный постер креативного
   агентства (neo-brutalism без карикатуры).
   Палитра: кислота #D8FF3E · белый #FFFFFF · чёрный #0A0A0A.
   Unbounded (дисплей, капс) · Rubik (текст) · JetBrains Mono (служебное).
   Рамки 2–3px, жёсткие offset-тени, ноль скруглений, ноль наклонов.
   ========================================================================== */

:root {
  --acid: #D8FF3E;
  --paper: #FFFFFF;
  --ink: #0A0A0A;
  --f-display: 'Unbounded', 'Arial Black', sans-serif;
  --f-body: 'Rubik', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', 'Courier New', monospace;
  --b: 2px;
  --b-strong: 3px;
  --sh-sm: 3px 3px 0 var(--ink);
  --sh: 6px 6px 0 var(--ink);
  --sh-lg: 8px 8px 0 var(--ink);
  --sh-acid: 6px 6px 0 var(--acid);
  --sh-acid-lg: 8px 8px 0 var(--acid);
}

/* ---------- база ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--acid); color: var(--ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.topbar :focus-visible,
.sec-results :focus-visible,
.modal-ov :focus-visible { outline-color: var(--acid); }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
}

.mono { font-family: var(--f-mono); }
.dim { opacity: 0.65; }

/* ---------- шапка ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--b-strong) solid var(--acid);
}

.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand em { font-style: normal; color: var(--acid); }
.brand-mark { color: var(--acid); flex: none; }

.topbar-tag {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.75;
}

/* ---------- hero (кислотная секция) ---------- */

.sec-hero {
  background: var(--acid);
  padding: clamp(44px, 7vw, 84px) 0 clamp(40px, 6vw, 72px);
}

.hero { position: relative; }

.hero-num {
  position: absolute;
  top: -0.12em;
  right: -0.04em;
  z-index: 0;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(8rem, 22vw, 17rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 3px var(--ink);
  pointer-events: none;
  user-select: none;
}

.hero-kicker {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: var(--ink);
  color: var(--acid);
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 8px 12px;
}

.hero-title {
  position: relative;
  z-index: 1;
  max-width: 18ch;
  margin-top: 22px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 4.6vw, 3.3rem);
  line-height: 1.1;
  text-transform: uppercase;
}

.hl {
  background: var(--ink);
  color: var(--acid);
  padding: 0 0.18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-lead {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-top: 26px;
  font-size: clamp(0.95rem, 1.4vw, 1.06rem);
  font-weight: 500;
  line-height: 1.65;
}

/* ---------- схема конвейера ---------- */

.pipe {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  margin-top: clamp(30px, 4vw, 52px);
}

.stage {
  position: relative;
  background: var(--paper);
  border: var(--b) solid var(--ink);
  padding: 14px 16px 12px;
  min-height: 92px;
}

.stage .n {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1;
}

.stage .t {
  margin-top: 8px;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stage.active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--sh);
}

.stage.active .n { color: var(--acid); }

.stage.done { box-shadow: var(--sh); }

.stage.done::after {
  content: '✓';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--acid);
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.8rem;
}

@media (min-width: 961px) {
  .stage:not(:last-child)::before {
    content: '→';
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    z-index: 2;
    font-family: var(--f-display);
    font-weight: 900;
    font-size: 1rem;
  }
}

/* ---------- лента-лозунг ---------- */

.shout {
  background: var(--ink);
  overflow: hidden;
  padding: 13px 0;
}

.shout-track {
  display: flex;
  width: max-content;
  animation: shout-slide 38s linear infinite;
}

.shout-track span {
  white-space: nowrap;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--acid);
}

@keyframes shout-slide {
  to { transform: translateX(-50%); }
}

/* ---------- заголовки секций ---------- */

.sec-head {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px clamp(14px, 2.5vw, 28px);
  margin-bottom: clamp(24px, 3.5vw, 40px);
}

.sec-num {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}

.sec-results .sec-num { -webkit-text-stroke-color: var(--acid); }

.sec-head-txt { min-width: 240px; flex: 1; }

.sec-title {
  margin: 6px 0 8px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  line-height: 1.15;
  text-transform: uppercase;
}

.sec-sub {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

/* ---------- секции ---------- */

.sec-source {
  background: var(--paper);
  padding: clamp(48px, 7vw, 88px) 0;
}

.sec-results {
  background: var(--ink);
  color: var(--paper);
  border-top: var(--b-strong) solid var(--acid);
  padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 110px);
}

#results-anchor { scroll-margin-top: 140px; }

/* ---------- панели и карточки ---------- */

.panel {
  background: var(--paper);
  border: var(--b-strong) solid var(--ink);
  box-shadow: var(--sh-lg);
  padding: clamp(18px, 2.5vw, 26px);
}

.panel-label {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.panel-label.acid { color: var(--acid); }

.src-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.src-side { display: grid; gap: 28px; }

/* фид: таблица */

.table-scroll { overflow-x: auto; }

.ptable { width: 100%; border-collapse: collapse; }

.ptable th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  padding: 10px 12px;
  border: var(--b) solid var(--ink);
}

.ptable td {
  border: var(--b) solid var(--ink);
  background: var(--paper);
  padding: 12px;
  vertical-align: top;
  font-size: 0.9rem;
}

.feed-cat {
  display: block;
  margin-top: 4px;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
}

.feed-spec { font-size: 0.84rem; }

.ptable td.feed-price {
  background: var(--acid);
  font-family: var(--f-mono);
  font-weight: 700;
  white-space: nowrap;
}

/* тон бренда: чёрная карточка */

.tov-card {
  background: var(--ink);
  color: var(--paper);
  border: var(--b-strong) solid var(--ink);
  box-shadow: var(--sh-acid-lg);
  padding: clamp(18px, 2.5vw, 26px);
}

.tov-note {
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  opacity: 0.8;
}

.tov-item { margin-top: 16px; }

.tov-item + .tov-item {
  border-top: var(--b) solid var(--paper);
  padding-top: 16px;
}

.tov-item .who {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--acid);
}

.tov-item p {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* площадка: кислотная карточка */

.plat-card {
  background: var(--acid);
  border: var(--b-strong) solid var(--ink);
  box-shadow: var(--sh-lg);
  padding: clamp(18px, 2.5vw, 26px);
}

.plat-row { display: flex; flex-wrap: wrap; gap: 10px; }

.plat-hint {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  line-height: 1.5;
}

.gen-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: var(--b) solid var(--ink);
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-block;
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: var(--paper);
  border: var(--b-strong) solid var(--ink);
  box-shadow: var(--sh);
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
}

.btn.ghost { background: var(--paper); }
.btn.accent { background: var(--acid); }

.btn.inverse { background: var(--ink); color: var(--acid); }

.btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.btn:active:not(:disabled) {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn.small {
  font-size: 0.72rem;
  padding: 7px 12px;
  border-width: var(--b);
  box-shadow: var(--sh-sm);
}

.btn.small:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn.small:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.btn.xl {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  letter-spacing: 0.03em;
  padding: 16px 24px;
}

#btn-generate { margin-top: 18px; width: 100%; }

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: var(--sh-sm);
}

.btn:disabled:hover { transform: none; }

.plat-btn { text-transform: uppercase; }

.plat-btn.sel { background: var(--ink); color: var(--acid); }

/* ---------- бейджи-штампы ---------- */

.badge {
  display: inline-block;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.68rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 9px;
  border: var(--b) solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.badge.ok { background: var(--ink); color: var(--paper); }

.badge.accent {
  background: var(--acid);
  box-shadow: var(--sh-sm);
}

.badge.warn { background: var(--ink); color: var(--acid); }

#pkg-status { margin-left: auto; align-self: center; }

#pkg-status.ok {
  background: var(--ink);
  color: var(--acid);
  border-color: var(--acid);
  box-shadow: var(--sh-sm);
}

/* ---------- очередь модерации ---------- */

.res-head {
  align-items: center;
  padding-bottom: 22px;
  border-bottom: var(--b-strong) solid var(--acid);
}

.empty-box {
  border: var(--b-strong) solid var(--acid);
  padding: clamp(20px, 3vw, 34px);
}

.empty-main {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.empty-sub {
  max-width: 62ch;
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.8;
}

.modbar {
  position: sticky;
  top: 70px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 16px;
  background: var(--paper);
  color: var(--ink);
  border: var(--b-strong) solid var(--ink);
  box-shadow: var(--sh-acid);
  padding: 14px 18px;
  margin: 28px 0 34px;
}

.modbar-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.cstat {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cstat b {
  margin-left: 6px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1.25rem;
}

.modbar-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* карточка товара */

.pblock {
  background: var(--paper);
  color: var(--ink);
  border: var(--b-strong) solid var(--ink);
  box-shadow: var(--sh-acid-lg);
  padding: 0 clamp(16px, 2.4vw, 26px) 10px;
  margin-bottom: 40px;
}

.pblock > header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 20px 0 16px;
}

.pnum {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}

.pname {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  line-height: 1.2;
  text-transform: uppercase;
}

.pmeta {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
}

.pblock > .appear { border-top: var(--b) solid var(--ink); }

.trow { padding: 18px 0 16px; }

.trow-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 12px;
}

.ttag {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 8px;
}

.chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.tbody-text {
  font-size: 0.97rem;
  line-height: 1.55;
  font-weight: 500;
}

.tbody-text.viol {
  display: inline;
  background: var(--acid);
  padding: 2px 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  font-weight: 700;
}

.treason {
  margin-top: 12px;
  background: var(--acid);
  border: var(--b) solid var(--ink);
  padding: 9px 12px;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  line-height: 1.5;
}

.treason::before { content: '! '; font-weight: 700; }

.tactions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.reason-label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.tedit {
  display: block;
  width: 100%;
  min-height: 96px;
  resize: vertical;
  background: var(--paper);
  color: var(--ink);
  border: var(--b) solid var(--ink);
  box-shadow: 4px 4px 0 var(--acid);
  padding: 12px;
  font-family: var(--f-body);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tedit:focus {
  outline: var(--b-strong) solid var(--ink);
  outline-offset: 3px;
}

/* ---------- появление ---------- */

.appear { animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
}

/* ---------- модалка экспорта ---------- */

.modal-ov {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgba(10, 10, 10, 0.78);
}

.modal-ov.open { display: flex; }

.modal {
  width: 100%;
  max-width: 660px;
  margin-top: 6vh;
  background: var(--paper);
  color: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 12px 12px 0 var(--acid);
  padding: clamp(22px, 4vw, 34px);
}

.modal-title {
  margin: 14px 0 16px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.15;
  text-transform: uppercase;
}

.big {
  display: inline-block;
  background: var(--acid);
  border: var(--b) solid var(--ink);
  box-shadow: var(--sh-sm);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 14px;
}

.ex-sub {
  margin-top: 14px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

#ex-list { list-style: none; margin: 12px 0 0; padding: 0; }

#ex-list li {
  border-top: var(--b) solid var(--ink);
  padding: 11px 2px;
  font-size: 0.9rem;
  line-height: 1.5;
}

#ex-list li.accent-c {
  margin-top: 8px;
  background: var(--ink);
  color: var(--acid);
  border-top: 0;
  padding: 12px 14px;
  font-weight: 700;
}

.modal-note {
  margin-top: 16px;
  font-size: 0.85rem;
  line-height: 1.55;
  opacity: 0.8;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

/* ---------- подвал ---------- */

.footer {
  background: var(--acid);
  border-top: 4px solid var(--ink);
  padding: 26px 0;
}

.footer-in {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-sign { font-weight: 700; font-size: 0.9rem; }
.footer-url { margin-left: auto; font-weight: 700; }

/* ---------- адаптив ---------- */

@media (max-width: 1020px) {
  .src-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .pipe { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (max-width: 640px) {
  .topbar-tag { display: none; }
  .chips { margin-left: 0; }
  .pmeta { margin-left: 0; text-align: left; }
  #pkg-status { margin-left: 0; }
}

@media (max-width: 540px) {
  .pipe { grid-template-columns: 1fr; }
}

/* ---------- запасной вид контурных цифр ---------- */

@supports not (-webkit-text-stroke: 2px #000) {
  .hero-num, .sec-num, .pnum { color: var(--ink); }
  .sec-results .sec-num { color: var(--acid); }
}

/* ---------- уменьшенная анимация ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shout-track { animation: none; }
  .appear { animation: none; }
  .btn, .btn.small { transition: none; }
}
