/* One More Peek — поп-арт, снят с принятого макета v4.
   Канон: project/design/design_system_v1.md */

:root {
  --paper:  #fffbf0;
  --ink:    #000000;
  --yellow: #ffe600;
  --pink:   #ff3e9a;
  --cyan:   #19b6e9;
  --orange: #ff6a13;
  --edge: 5px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* чернильная текстура поверх всей страницы, клики проходят насквозь */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/assets/04-ink-texture.png") center / 100% 100% no-repeat;
  mix-blend-mode: multiply;
  opacity: .22;
  pointer-events: none;
  z-index: 60;
}

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--pink); }

/* ── шапка ───────────────────────────────────────────── */
.top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 32px;
  border-bottom: var(--edge) solid var(--ink);
  background: var(--paper);
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; }
.brand img { width: 46px; height: 46px; display: block; }
.brand span { font-size: 21px; font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; }
.pts { font-size: 14px; font-weight: 800; background: var(--ink); color: var(--yellow); padding: 7px 13px; }
.top nav { display: flex; gap: 14px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

main { flex: 1; width: 100%; max-width: 1340px; margin: 0 auto; padding: 22px 32px 48px; }

.meta {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}

/* ── задание и таймер ────────────────────────────────── */
.task-row { display: grid; grid-template-columns: minmax(0, 1fr) 420px; margin-top: 14px; border: var(--edge) solid var(--ink); }
.task { background: var(--yellow); padding: 22px 28px 24px; border-right: var(--edge) solid var(--ink); }
.task h1 {
  font-size: clamp(34px, 4.6vw, 66px); font-weight: 800; line-height: 1;
  letter-spacing: -.045em; text-transform: uppercase; margin: 0;
  text-shadow: 5px 5px 0 var(--pink); text-wrap: balance;
}
.task h1 em {
  font-style: normal; background: var(--ink); color: var(--yellow);
  display: inline-block; line-height: 1; padding: 2px 12px; text-shadow: none; white-space: nowrap;
}
.task p { font-size: 17px; line-height: 1.35; font-weight: 500; margin: 16px 0 0; max-width: 54ch; }
.task strong { font-weight: 800; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }

.clock {
  background: var(--pink) url("/assets/03-halftone.png") 0 0 / 120px 120px;
  padding: 22px 26px 24px;
}
.clock .label { background: var(--pink); display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.clock .value {
  background: var(--pink); display: inline-block; padding: 0 8px; margin-top: 6px;
  font-size: clamp(46px, 6vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -.06em;
  font-variant-numeric: tabular-nums; text-shadow: 5px 5px 0 var(--cyan);
}
.clock .value.low { text-shadow: 5px 5px 0 var(--ink); }
.track { height: 14px; background: var(--paper); border: 3px solid var(--ink); margin-top: 12px; }
.track i { display: block; height: 100%; width: 100%; background: var(--ink); }

/* ── карточки вариантов ──────────────────────────────── */
.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.option {
  display: block; padding: 0; text-align: left; cursor: pointer; width: 100%;
  background: var(--paper); border: var(--edge) solid var(--ink); color: var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
  font-family: inherit;
}
.option:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--pink); }
.option img.shot { display: block; width: 100%; height: 190px; object-fit: cover; border-bottom: var(--edge) solid var(--ink); }
.option .label {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase;
}
.option .label img { width: 30px; height: 30px; display: block; }
.option.on { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--pink); }
.option.on .label { background: var(--yellow); }
.option[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 8px 8px 0 var(--ink); }

/* ── кнопки ──────────────────────────────────────────── */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.fineprint { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

.btn {
  font-family: inherit; font-size: 17px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  color: var(--yellow); background: var(--ink); border: var(--edge) solid var(--ink);
  padding: 15px 28px; cursor: pointer; box-shadow: 8px 8px 0 var(--pink);
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--pink); color: var(--yellow); }
.btn img { height: 24px; width: auto; display: block; }
.btn.ghost { background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.btn.ghost:hover { color: var(--ink); }
.btn[disabled] { opacity: .38; cursor: not-allowed; transform: none; box-shadow: 8px 8px 0 var(--pink); }

/* ── блоки, панели, таблицы ──────────────────────────── */
.panel { border: var(--edge) solid var(--ink); background: var(--paper); padding: 18px 22px; box-shadow: 10px 10px 0 var(--ink); }
.panel h2 { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.04em; text-transform: uppercase; margin: 0 0 12px; text-shadow: 3px 3px 0 var(--yellow); }

.scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; border: var(--edge) solid var(--ink); background: var(--paper); }
.scores > div { padding: 14px 20px; border-right: var(--edge) solid var(--ink); }
.scores > div:last-child { border-right: 0; }
.scores > div:first-child { background: var(--ink); color: var(--yellow); }
.scores .k { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.scores .v { font-size: 42px; font-weight: 800; line-height: 1; letter-spacing: -.05em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.scores .n { font-size: 13px; font-weight: 600; margin-top: 4px; }

.bars { display: grid; grid-template-columns: 200px minmax(0, 1fr) 64px; row-gap: 8px; column-gap: 14px; align-items: center; margin-top: 10px; font-size: 16px; font-weight: 700; text-transform: uppercase; }
.bars .bar { height: 24px; border: 3px solid var(--ink); }
.bars .bar i { display: block; height: 100%; border-right: 3px solid var(--ink); }
.bars .pct { text-align: right; font-variant-numeric: tabular-nums; }
.bars .me { font-weight: 800; }

table.board { width: 100%; border-collapse: collapse; font-size: 15px; }
table.board th { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-align: left; padding: 10px 8px; border-bottom: 3px solid var(--ink); }
table.board td { padding: 10px 8px; border-bottom: 1px solid rgba(0,0,0,.18); font-weight: 700; }
table.board td.num, table.board th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.board tr.me td { background: var(--yellow); font-weight: 800; }

.flag { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow); font-size: 12px; font-weight: 800; letter-spacing: .1em; padding: 4px 10px 4px 6px; border: 3px solid var(--ink); text-transform: uppercase; }
.flag img { width: 18px; height: 18px; display: block; }
.flag.miss { background: var(--pink); color: var(--paper); }

.hero { border: var(--edge) solid var(--ink); background: var(--yellow); padding: 26px 30px; box-shadow: 12px 12px 0 var(--ink); }
.hero h1 { font-size: clamp(36px, 5.2vw, 62px); font-weight: 800; line-height: .96; letter-spacing: -.045em; text-transform: uppercase; margin: 0; text-shadow: 4px 4px 0 var(--cyan); }
.hero p { font-size: 18px; font-weight: 500; line-height: 1.4; margin: 14px 0 0; max-width: 58ch; }

.place {
  background: var(--pink) url("/assets/06-result-frame.jpg") center / cover no-repeat;
  border: var(--edge) solid var(--ink);
  display: grid; place-items: center; padding: 22px 30px;
}
.place b { font-size: clamp(72px, 11vw, 140px); font-weight: 800; line-height: .82; letter-spacing: -.08em; text-shadow: 7px 7px 0 var(--paper), 14px 14px 0 var(--ink); }

/* ── формы ───────────────────────────────────────────── */
.form { max-width: 460px; }
.form label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin: 16px 0 6px; }
.form input {
  width: 100%; font-family: inherit; font-size: 17px; font-weight: 600;
  padding: 13px 14px; border: var(--edge) solid var(--ink); background: var(--paper); color: var(--ink);
}
.form input:focus { outline: 0; box-shadow: 6px 6px 0 var(--cyan); }
.form .btn { margin-top: 22px; }

.error { border: var(--edge) solid var(--ink); background: var(--pink); color: var(--paper); font-weight: 800; padding: 12px 16px; margin-bottom: 18px; text-transform: uppercase; letter-spacing: .04em; }
.notice { border: var(--edge) solid var(--ink); background: var(--cyan); font-weight: 700; padding: 14px 18px; }

.stack { display: grid; gap: 18px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 26px; align-items: start; }

/* ── телефон ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .top { padding: 10px 16px; gap: 12px; }
  .brand span { font-size: 17px; }
  main { padding: 16px 16px 40px; }
  .task-row { grid-template-columns: 1fr; }
  .task { border-right: 0; border-bottom: var(--edge) solid var(--ink); padding: 16px 18px 18px; }
  .clock { padding: 16px 18px 18px; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .option img.shot { height: 120px; }
  .option .label { font-size: 15px; padding: 10px 12px; }
  .option .label img { width: 22px; height: 22px; }
  .scores { grid-template-columns: 1fr; }
  .scores > div { border-right: 0; border-bottom: var(--edge) solid var(--ink); }
  .scores > div:last-child { border-bottom: 0; }
  .bars { grid-template-columns: 130px minmax(0, 1fr) 52px; font-size: 14px; }
  .two { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: stretch; }
  .btn { justify-content: space-between; }
}
