/* ==========================================================================
   ЗАЯВКА НА ХАКАТОН — standalone V2 page (site-v2/apply.html), NOT part of
   the .yh-app scene system, so no .yh-app scoping needed here (same as V1's
   own apply.html — a real navigable page, not an embedded Tilda block).

   Visual language ported from V1's css/style.css `.sheet-*` component
   (read-only reference — V1 itself was never touched) because the customer
   asked to "pull the actual application form from version 1", just with
   the new question set from her document, grouped into her own 6 blocks
   instead of V1's 7 steps. Copied here as a fresh, V2-owned file rather
   than linking V1's shared stylesheet, so V1 stays completely untouched
   and V2 doesn't depend on a file it doesn't own.
   ========================================================================== */

:root {
  --ink: #1c1a17;
  --accent: #3f6fd1;
  /* customer (2026-09-19): "не на бежевом а на белом фоне" — was cream
     (#faf6ee); real mctatarstan.ru reference is white. Global variable,
     so this affects the whole page (form included), not just the intro. */
  --paper: #ffffff;
  --panel-bg: rgba(28, 26, 23, 0.88);
  --panel-fg: #f4efe8;
  /* customer (2026-09-19): "давай попробуем... цвета взять отсюда"
     (mctatarstan.ru) — sampled directly from her screenshot of the real
     site (logo green, the orange running-text ticker, the pink accent
     circle behind the hero photo), used only in .apply-intro below —
     the form itself (.sheet-*) keeps its existing --accent blue
     untouched, she didn't ask to change that. */
  --mc-orange: #fc7d54;
  --mc-pink: #fd95ec;
  --mc-green: #39b076;
  --druk: 'Druk Cond Cy Super', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* customer (2026-09-20): sent the real Apercu Pro files (Regular/Bold/
     Light/Thin) — closes the other half of the same FONT NOTE gap Druk
     closed above. Used for all body text on this page. */
  --apercu: 'Apercu Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* customer (2026-09-19): sent the real font file — this is literally the
   "Druk Cond Cy Super" font the original visual spec called for (see
   core/zone-07-cta.js's long-standing "FONT NOTE": neither this nor
   Apercu Pro ever had a licensed file in the repo, so V2 fell back to
   the system stack everywhere — that gap is now closed for THIS page's
   display type, not retroactively applied to the embedded scene, which
   she hasn't asked to touch). woff2 first (58KB, this exact font
   re-encoded losslessly via fontTools) with the original .otf (171KB)
   as a fallback for anything that can't parse woff2. */
@font-face {
  font-family: 'Druk Cond Cy Super';
  src: url('../assets/fonts/DrukCondCy-Super.woff2') format('woff2'),
       url('../assets/fonts/DrukCondCy-Super.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Apercu Pro';
  src: url('../assets/fonts/ApercuPro-Thin.woff2') format('woff2'),
       url('../assets/fonts/ApercuPro-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url('../assets/fonts/ApercuPro-Light.woff2') format('woff2'),
       url('../assets/fonts/ApercuPro-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url('../assets/fonts/ApercuPro-Regular.woff2') format('woff2'),
       url('../assets/fonts/ApercuPro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Apercu Pro';
  src: url('../assets/fonts/ApercuPro-Bold.woff2') format('woff2'),
       url('../assets/fonts/ApercuPro-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--apercu);
}

.apply-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(28, 26, 23, 0.12);
}

.apply-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}
.apply-back:hover { color: var(--accent); }

.apply-topbar__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
}

.sheet-page {
  min-height: 100vh;
  background: var(--paper);
  background-image:
    repeating-linear-gradient(rgba(63,111,209,0.07) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(63,111,209,0.07) 0 1px, transparent 1px 28px);
}

.sheet-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 28px 60px;
}

/* ---------- intro (customer, 2026-09-19): standalone-share context ---------- */

/* customer (2026-09-21): "убеpем архитектурный хакатон как заголовок,
   оставим только в виде некого колонтитула" — thin running-header strip,
   not a headline anymore. */
.apply-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(28, 26, 23, 0.5);
  padding: 14px 28px 0;
}

/* ---------- section divider: static lead-in + running-text ticker
   (customer ref: mctatarstan.ru) ---------- */

.apply-divider {
  margin: 0 0 40px;
}

/* ---------- hero: marquee (left) + colored info panel (right, in the
   photo's place from mctatarstan.ru's hero) ---------- */

.apply-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin: 10px 0 44px;
  padding: 10px 0 0;
}

.apply-hero__left {
  min-width: 0;
  overflow: hidden;
}

.apply-hero__left .apply-divider__static {
  font-size: 2.2rem;
}

.apply-hero__panel {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--paper);
  border-radius: 4px;
  padding: 30px 28px;
}

.apply-hero__panel-content {
  position: relative;
  z-index: 1;
}

.apply-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 16px;
}

.apply-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apply-hero__stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.apply-hero__stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}

.apply-hero__objects {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  opacity: 0.9;
}
.apply-hero__objects-label {
  font-weight: 800;
  opacity: 1;
  margin-right: 4px;
}

@media (max-width: 860px) {
  .apply-hero {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .apply-hero__left .apply-divider__static { font-size: 1.5rem; }
}

.apply-divider__static {
  display: block;
  /* customer (2026-09-20): "Создаем пространства для - шрифт аперку" */
  font-family: var(--apercu);
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 0 28px;
  margin-bottom: 4px;
}

/* customer (2026-09-19): "размер строки бегущей на нашем сайте... прям
   как на нем" — matched her screenshot directly: no background band,
   one flat orange (their real ticker is solid orange, not multi-color),
   and MUCH bigger — on her phone screenshot a single word nearly fills
   the viewport width. */
.apply-marquee {
  overflow: hidden;
  padding: 6px 0;
  margin-bottom: 0;
}

.apply-marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: apply-marquee-scroll 32s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .apply-marquee__track { animation: none; }
}

.apply-marquee__item {
  font-family: var(--druk);
  font-size: 5.5rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--mc-orange);
  white-space: nowrap;
  padding: 0 30px;
}

@keyframes apply-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- intro card ---------- */

.apply-intro {
  position: relative;
  padding: 40px 36px 36px;
  margin-bottom: 40px;
  border: 1px solid rgba(28,26,23,0.12);
  border-top: none;
  background: var(--paper);
  overflow: hidden;
}
.apply-intro::before,
.apply-intro::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
  opacity: 0.35;
  z-index: 2;
}
.apply-intro::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.apply-intro::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* customer (2026-09-21): "удали все элементы которые мы с тобой не
   согласовывали" / "убери 3 треугольника" — the decorative circles
   (never actually requested) and the triangle trio are both removed. */

.apply-intro__content {
  position: relative;
  z-index: 1;
}

.apply-intro__lead {
  font-size: 1.1rem;
  line-height: 1.5;
  max-width: 56ch;
  margin: 0 0 26px;
  opacity: 0.85;
}

/* customer (2026-09-21): "убери дублирующую информацию (2 раза объекты)"
   — the stats grid and objects line now live only once, in
   .apply-hero__stats / .apply-hero__objects (the colored panel), so
   their .apply-intro__* equivalents are gone. */

.apply-intro__program-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
  opacity: 0.6;
}

/* customer (2026-09-21): "таймлайн по дням оформить так чтобы были
   блоки, поиграть с размером шрифтов, или сделать поинтерактивнее эту
   зону" — real card blocks (border + own background) instead of the
   thin connecting-line layout, a much bigger day number as the visual
   anchor, and a hover lift for interactivity. */
.apply-intro__timeline {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.apply-intro__tl-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 16px 20px;
  border: 1px solid rgba(28, 26, 23, 0.12);
  border-radius: 6px;
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.apply-intro__tl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(28, 26, 23, 0.1);
}

/* customer (2026-09-19): "использование розового синего и оранжевого"
   — each card gets its own accent (orange/pink/blue cycling) rather
   than one flat color for the whole timeline. */
.apply-intro__tl-num { color: var(--mc-orange); }
.apply-intro__tl-card:nth-child(2) .apply-intro__tl-num { color: var(--mc-pink); }
.apply-intro__tl-card:nth-child(3) .apply-intro__tl-num { color: var(--accent); }

.apply-intro__tl-num {
  font-family: var(--druk);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1;
}

.apply-intro__tl-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.6;
}

.apply-intro__tl-text {
  font-size: 0.86rem;
  line-height: 1.45;
  opacity: 0.85;
}

.apply-intro__note {
  font-size: 0.78rem;
  line-height: 1.6;
  opacity: 0.55;
  max-width: 72ch;
  margin: 0 0 26px;
}

.apply-intro__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mc-orange);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
}
.apply-intro__cta:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 720px) {
  .apply-intro { padding: 28px 20px 26px; }
  .apply-intro__lead { font-size: 1rem; }
  .apply-intro__timeline { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .apply-marquee__item { font-size: 4.2rem; padding: 0 16px; }
  .apply-divider__static { font-size: 1.3rem; padding: 0 20px; }
}

/* ---------- progress rail ---------- */

.sheet-progress {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 4px 22px;
  margin-bottom: 8px;
}
.sheet-progress[hidden] { display: none; }
.sheet-progress::-webkit-scrollbar { display: none; }

.sheet-progress__item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sheet-progress__num {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  border: 2px solid rgba(28,26,23,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(28,26,23,0.45);
  background: var(--paper);
}

.sheet-progress__label {
  display: none;
  margin-left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(28,26,23,0.4);
  white-space: nowrap;
}

.sheet-progress__connector {
  width: 26px;
  height: 0;
  border-top: 2px dashed rgba(28,26,23,0.2);
  margin: 0 6px;
  flex-shrink: 0;
}

.sheet-progress__item.is-current .sheet-progress__num {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.sheet-progress__item.is-current .sheet-progress__label { display: inline; color: var(--ink); }

.sheet-progress__item.is-done .sheet-progress__num {
  border-color: #1f8f5f;
  color: #1f8f5f;
}
.sheet-progress__item.is-done .sheet-progress__connector { border-top-color: #1f8f5f; opacity: 0.5; }

/* ---------- layout ---------- */

.sheet-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}
.sheet-layout[hidden] { display: none; }

.sheet-aside {
  position: relative;
  padding: 34px 26px;
  border: 1px solid rgba(28,26,23,0.12);
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.sheet-aside::before,
.sheet-aside::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
  opacity: 0.35;
}
.sheet-aside::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.sheet-aside::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.sheet-aside__sheetnum {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.66rem;
  font-family: 'SF Mono', 'Consolas', monospace;
  letter-spacing: 0.04em;
  opacity: 0.4;
}

/* customer (2026-09-20): "поправь шрифты в самой заявке тоже. для
   заголовков используй druk" — extends the same Druk Cond Cy Super
   already wired up for the intro (see :root --druk / @font-face) to
   every real heading in the form itself: the giant step number, the
   step title, and the success-screen stamp below. */
.sheet-aside__num {
  font-family: var(--druk);
  font-size: 7.5rem;
  line-height: 0.85;
  font-weight: 400;
  color: var(--ink);
  opacity: 0.92;
  margin: 6px 0 4px;
}
/* customer (2026-09-21): "в самом опросе цифры блоков - нужно сделать
   цветными" — the giant step number was still plain black; cycles the
   same orange/pink/blue/green palette used everywhere else, one color
   per step. */
[data-step="1"] .sheet-aside__num { color: var(--mc-orange); opacity: 1; }
[data-step="2"] .sheet-aside__num { color: var(--mc-pink); opacity: 1; }
[data-step="3"] .sheet-aside__num { color: var(--accent); opacity: 1; }
[data-step="4"] .sheet-aside__num { color: var(--mc-green); opacity: 1; }
[data-step="5"] .sheet-aside__num { color: var(--mc-orange); opacity: 1; }
[data-step="6"] .sheet-aside__num { color: var(--mc-pink); opacity: 1; }

.sheet-aside__title {
  font-family: var(--druk);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 14px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
}

.sheet-aside__desc {
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.75;
  max-width: 32ch;
}

.sheet-aside__spacer { flex: 1; }

.sheet-aside__arrow {
  align-self: flex-end;
  opacity: 0.55;
  margin-top: 18px;
}

/* ---------- form card ---------- */

.sheet-card {
  background: var(--paper);
  border: 1px solid rgba(28,26,23,0.12);
  padding: 36px 36px 30px;
  position: relative;
}

.sheet-card::before {
  content: '';
  position: absolute;
  top: -1px; right: -1px;
  width: 16px; height: 16px;
  border: 2px solid var(--ink);
  border-left: none; border-bottom: none;
  opacity: 0.35;
}

.sheet-field { margin-bottom: 26px; }

.sheet-field__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: rgba(28,26,23,0.65);
}

.sheet-field__label .req { color: var(--accent); font-weight: 800; }

.sheet-field__index {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.85;
}
/* customer (2026-09-21): "цифры обозначающие порядковые номера вопросов
   - тоже разными цветами выдели" — cycles orange/pink/blue/accent across
   each field's own index number within a step, same palette used
   elsewhere on this page. */
.sheet-field:nth-of-type(4n+2) .sheet-field__index { color: var(--mc-orange); }
.sheet-field:nth-of-type(4n+3) .sheet-field__index { color: var(--mc-pink); }
.sheet-field:nth-of-type(4n+4) .sheet-field__index { color: var(--mc-green); }

.sheet-field input,
.sheet-field select {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid rgba(28,26,23,0.3);
  background: transparent;
  padding: 8px 2px 10px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--ink);
  border-radius: 0;
  min-height: 44px;
}

.sheet-field input::placeholder { color: rgba(28,26,23,0.28); }

.sheet-field input:focus,
.sheet-field select:focus {
  outline: none;
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
}

.sheet-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231c1a17' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}
.sheet-field select:invalid { color: rgba(28,26,23,0.45); }

.sheet-field textarea {
  width: 100%;
  min-height: 128px;
  border: none;
  border-bottom: 1.5px solid rgba(28,26,23,0.3);
  background: transparent;
  /* customer (2026-09-16): "строчки слетают" — the ruled-paper lines
     didn't line up with the actual text. The first line of text occupies
     content-top .. content-top+line-height, i.e. padding-top(8px) ..
     padding-top(8px)+line-height(30px) — a ruled line has to sit at that
     boundary (38px from the padding box's own top) for the two to
     coincide, repeating every line-height(30px) after.
     THIRD fix (same day, "первая строчка состоит из 2 линий" — a SECOND
     attempt at this, using background-position to shift a plain
     repeating-linear-gradient, still produced a genuine extra
     mispositioned line — confirmed via an isolated Playwright test
     sweeping background-position values: this specific combination
     (box-sizing:border-box on this page + a border-bottom + a non-zero
     background-position-y ≥ 7px) reliably makes Chromium paint a SECOND
     copy of the line, shifted 7px off — a real rendering bug in that
     combination, not a math error). Fixed by not using background-
     position at all: the padding offset is baked directly into the
     gradient's own color-stop list instead (one 30px-tall tile, opaque
     only across its own 8px-9px band), leaving background-position at
     its default (0, always clean in the same test) — mathematically the
     same repeating pattern, verified line-for-line clean afterward. */
  background-image: repeating-linear-gradient(
    transparent 0,
    transparent 8px,
    rgba(28,26,23,0.12) 8px,
    rgba(28,26,23,0.12) 9px,
    transparent 9px,
    transparent 30px
  );
  padding: 8px 2px 10px;
  font-size: 1rem;
  line-height: 30px;
  font-family: inherit;
  color: var(--ink);
  border-radius: 0;
  resize: vertical;
}
.sheet-field textarea::placeholder { color: rgba(28,26,23,0.28); line-height: normal; }
.sheet-field textarea:focus { outline: none; border-bottom-color: var(--accent); border-bottom-width: 2px; }

.sheet-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.sheet-nav[hidden] { display: none; }
.sheet-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px dashed rgba(28,26,23,0.2);
}

.sheet-btn[hidden] { display: none; }
.sheet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
}

.sheet-btn--ghost {
  background: transparent;
  border: 1.5px solid rgba(28,26,23,0.25);
  color: var(--ink);
}
.sheet-btn--ghost:hover { border-color: var(--ink); }

.sheet-btn--primary { background: var(--ink); color: #fff; }
.sheet-btn--primary:hover { background: var(--accent); }
.sheet-btn--primary:disabled { opacity: 0.6; cursor: default; }

.sheet-note {
  margin-top: 40px;
  font-size: 0.7rem;
  opacity: 0.4;
  font-family: 'SF Mono', 'Consolas', monospace;
  letter-spacing: 0.03em;
}

/* ---------- error state ---------- */

.sheet-field__hint {
  margin-top: 8px;
  font-size: 0.76rem;
  color: #c0392b;
  display: none;
}
.sheet-field.has-error input,
.sheet-field.has-error select,
.sheet-field.has-error textarea { border-bottom-color: #c0392b; }
.sheet-field.has-error .sheet-field__hint { display: block; }

/* ---------- checkbox / radio marks ---------- */

.sheet-marks { display: flex; flex-direction: column; gap: 4px; }

.sheet-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  font-size: 0.94rem;
}

.sheet-mark input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; overflow: hidden;
  clip: rect(0 0 0 0);
}

.sheet-mark__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.8px solid rgba(28,26,23,0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease, border-color 120ms ease;
}
.sheet-mark--radio .sheet-mark__box { border-radius: 50%; }

.sheet-mark__box::after {
  content: '';
  width: 10px; height: 10px;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 120ms ease, transform 120ms ease;
}
.sheet-mark--radio .sheet-mark__box::after { border-radius: 50%; }

.sheet-mark.is-selected .sheet-mark__box { border-color: var(--accent); }
.sheet-mark.is-selected .sheet-mark__box::after { opacity: 1; transform: scale(1); }
.sheet-mark input:focus-visible ~ .sheet-mark__box { outline: 3px solid #2f7dee; outline-offset: 2px; }

/* ---------- tags (checkbox pills) ---------- */

.sheet-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.sheet-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid rgba(28,26,23,0.3);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.sheet-tag input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; overflow: hidden;
  clip: rect(0 0 0 0);
}

.sheet-tag.is-selected { background: var(--ink); border-color: var(--ink); color: #fff; }
.sheet-tag input:focus-visible ~ * { outline: none; }
.sheet-tag:has(input:focus-visible) { outline: 3px solid #2f7dee; outline-offset: 2px; }
.sheet-tag.is-disabled { opacity: 0.35; cursor: default; }

/* ---------- 1-5 scale ---------- */

.sheet-scale { display: flex; gap: 8px; }

.sheet-scale__item {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1.8px solid rgba(28,26,23,0.3);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.sheet-scale__item input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; overflow: hidden;
  clip: rect(0 0 0 0);
}
.sheet-scale__item.is-selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.sheet-scale__item:has(input:focus-visible) { outline: 3px solid #2f7dee; outline-offset: 2px; }

.sheet-scale-row { margin-bottom: 24px; }
.sheet-scale-row__label { font-size: 0.82rem; font-weight: 700; margin-bottom: 8px; }
.sheet-scale-caption {
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  opacity: 0.45;
  margin-top: 4px;
}

/* ---------- "other" reveal (new — not in V1) ---------- */

.sheet-field__reveal {
  margin-top: 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms ease;
}
.sheet-field__reveal.is-open { max-height: 120px; }

/* ---------- success screen ---------- */

.sheet-success { text-align: center; padding: 40px 20px; position: relative; }
.sheet-success__stamp {
  display: inline-block;
  font-family: var(--druk);
  font-size: 3.2rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--accent);
  border: 4px solid var(--accent);
  padding: 10px 30px;
  transform: rotate(-4deg);
  border-radius: 6px;
  margin-bottom: 22px;
}
.sheet-success__id { font-family: 'SF Mono', 'Consolas', monospace; font-size: 0.78rem; opacity: 0.5; margin-bottom: 18px; }
.sheet-success__text { font-size: 1.05rem; line-height: 1.6; max-width: 44ch; margin: 0 auto 30px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(10px);
  z-index: 90;
  background: var(--panel-bg);
  color: var(--panel-fg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[hidden] { display: none; }

@media (max-width: 900px) {
  .sheet-layout { grid-template-columns: 1fr; gap: 0; }
  .sheet-aside { min-height: 0; padding: 22px 20px 26px; }
  .sheet-aside__num { font-size: 4.4rem; }
  .sheet-card { border-top: none; padding: 26px 20px 24px; }
  .sheet-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 640px) {
  .sheet-shell { padding: 18px 16px 90px; }
  .sheet-nav {
    position: sticky;
    bottom: 0;
    background: var(--paper);
    margin: 24px -16px 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(28,26,23,0.15);
  }
  .sheet-btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-card, .sheet-aside { transition: none !important; }
}
