:root {
  --paper: #F4F6EF;
  --card: #FFFFFF;
  --ink: #0E2A1F;
  --soft: #4C6157;
  --line: #DCE3D6;
  --lime: #C4F24A;
  --lime-deep: #A9DA2B;
  --bad: #B3361F;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 Inter, system-ui, sans-serif;
}
.mono { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: .92em; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 22px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none;
  font: 700 20px/1 "Bricolage Grotesque", sans-serif; letter-spacing: -.01em; }
.tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }

.wrap {
  max-width: 1120px; margin: 0 auto; padding: 32px 24px 56px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start;
}
h1 { font: 700 clamp(36px, 5vw, 58px)/1.02 "Bricolage Grotesque", sans-serif; letter-spacing: -.025em; margin: 12px 0 20px; }
h2 { font: 700 24px/1.15 "Bricolage Grotesque", sans-serif; letter-spacing: -.01em; margin: 0 0 18px; }
.lead { font-size: 18px; color: var(--soft); max-width: 34em; margin: 0 0 32px; }

.how { list-style: none; counter-reset: how; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 36em; }
.how li { counter-increment: how; position: relative; padding-left: 46px; color: var(--soft); }
.how li b { color: var(--ink); font-weight: 600; }
.how li::before {
  content: counter(how); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--lime); font: 700 14px/30px "Bricolage Grotesque", sans-serif; text-align: center;
}

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px;
  box-shadow: 0 1px 0 rgba(14, 42, 31, .04), 0 18px 40px -24px rgba(14, 42, 31, .25);
  position: sticky; top: 24px;
}
label { display: block; font-size: 13px; font-weight: 600; color: var(--soft); margin-bottom: 8px; }
input[type="text"] {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  font: 500 16px/1.2 Inter, system-ui, sans-serif; color: var(--ink); margin-bottom: 16px;
}
input[type="text"]:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 2px; }

.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 15px 20px; border: 0; border-radius: 12px; cursor: pointer; text-decoration: none;
  background: var(--ink); color: var(--lime); font: 600 16px/1 Inter, system-ui, sans-serif;
  transition: transform .12s ease, background .12s ease;
}
.primary:hover { background: #143A2B; }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .6; cursor: progress; }
.ghost {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer;
  color: var(--ink); font: 500 14px/1 Inter, system-ui, sans-serif;
}
.ghost:hover { border-color: var(--ink); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.fine { font-size: 13.5px; color: var(--soft); margin: 14px 0 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--soft); }
.steps .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.steps li.running { color: var(--ink); font-weight: 500; }
.steps li.running .dot { border-color: var(--ink); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.done { color: var(--ink); }
.steps li.done .dot { border-color: var(--ink); background: var(--lime);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.3 5.8 10 11 4.4' fill='none' stroke='%230E2A1F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.steps li.failed { color: var(--bad); }
.steps li.failed .dot { border-color: var(--bad); }
.steps li.skipped { opacity: .55; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.running .dot { animation: none; } }

.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 20px; }
.facts dt { color: var(--soft); font-size: 14px; }
.facts dd { margin: 0; font-weight: 500; word-break: break-word; }
#result .ghost { margin-top: 14px; }
#failure p { color: var(--soft); margin: 0 0 20px; }

/* Running: progress on the left, the live Telegram screen fills the panel on the right. */
.browser:empty { display: none; }
.browser { border-radius: 14px; overflow: hidden; aspect-ratio: 480 / 760; max-width: calc((100vh - 110px) * 480 / 760); margin: 0 auto; background: #fff; }
.browser iframe { width: 100%; height: 100%; border: 0; display: block; }
.progress { margin-top: 8px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; max-width: 36em; }
body.running .how, body.running .lead { display: none; }
body.running h1 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 18px; }
body.running .panel { padding: 10px; }
body.running .wrap { padding-top: 8px; }

.foot { max-width: 1120px; margin: 0 auto; padding: 0 24px 48px; }
.foot p { max-width: 46em; font-size: 13.5px; color: var(--soft); border-top: 1px solid var(--line); padding-top: 20px; margin: 0; }

@media (max-width: 860px) {
  .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 12px; }
  body.running .pitch { order: 2; }
  body.running h1 { display: none; }
  .panel { position: static; }
}
