/* ============================================================
   Анкета-консультация — «настольная тетрадь дизайнера»
   Тёплая редакторская айдентика: бумага, чернила, хвоя, латунь.
   Шрифты: Alegreya (заголовки) + Golos Text (текст/интерфейс)
   ============================================================ */

:root {
  /* Палитра: глубокий тил + песок + графит */
  --paper:   #ece6da;
  --paper-2: #f6f2ea;
  --paper-3: #fbf9f3;
  --sunk:    #e1dacb;
  --ink:       #24282b;
  --ink-soft:  #62676b;
  --ink-faint: #9a9990;
  --line:   #ddd6c6;
  --line-2: #c8bfab;

  --pine:      #14555d;  /* тил — основной интерактив */
  --pine-deep: #0e3e44;
  --pine-tint: #dbe8e7;
  --brass:     #b0904f;  /* песок/золото — структура, номера */
  --brass-2:   #ccb182;
  --brass-tint:#ebe0c9;
  --clay:      #b15b41;
  --clay-tint: #f0ddd3;
  --sage:      #5f8a86;

  --radius:   16px;
  --radius-s: 10px;
  --shadow-s: 0 1px 2px rgba(40,34,24,.05);
  --shadow:   0 2px 4px rgba(40,34,24,.04), 0 14px 34px -20px rgba(40,34,24,.4);
  --shadow-l: 0 4px 8px rgba(40,34,24,.05), 0 26px 60px -28px rgba(40,34,24,.5);

  --ff-display: 'Alegreya', Georgia, serif;
  --ff-body:    'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --maxw: 1220px;
  --spine: 296px;
  --pad: 56px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--paper);
  /* тёплое свечение + едва заметное зерно бумаги */
  background-image:
    radial-gradient(150% 100% at 100% -10%, rgba(176,144,79,.08), transparent 50%),
    radial-gradient(130% 90% at -10% 110%, rgba(20,85,93,.07), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brass-tint); }
a { color: var(--pine); text-underline-offset: 3px; }

/* ---------- Раскладка ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--spine) minmax(0, 1fr);
  max-width: var(--maxw);
  margin: 0 auto;
  align-items: start;
}

/* ============================================================
   Корешок-указатель (signature element)
   ============================================================ */
.spine {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 32px 20px 20px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--line);
}

.brand { display: flex; flex-direction: column; gap: 3px; }
.brand__mark {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.015em;
  color: var(--ink);
}
.brand__mark span { color: var(--brass); font-weight: 700; }
.brand__sub {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

/* Кольцо прогресса */
.progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-s);
}
.progress__ring {
  --p: 0;
  position: relative;
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: conic-gradient(var(--pine) calc(var(--p) * 1%), var(--sunk) 0);
  display: grid;
  place-items: center;
  transition: background .6s cubic-bezier(.4,0,.2,1);
}
.progress__ring::after {
  content: '';
  width: 37px; height: 37px;
  border-radius: 50%;
  background: var(--paper-2);
}
.progress__num {
  position: absolute;
  font-size: .78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pine);
}
.progress__meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.progress__meta b { font-size: .92rem; font-weight: 600; }
.progress__meta small { font-size: .74rem; color: var(--ink-soft); }

/* Список разделов */
.index {
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.index::-webkit-scrollbar { width: 7px; }
.index::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.idx {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr 12px;
  align-items: center;
  gap: 11px;
  padding: 8px 11px 8px 12px;
  border-radius: 9px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .88rem;
  line-height: 1.2;
  transition: background .15s, color .15s;
}
.idx::before {
  content: '';
  position: absolute; left: 2px; top: 50%;
  width: 3px; height: 0;
  border-radius: 3px;
  background: var(--pine);
  transform: translateY(-50%);
  transition: height .2s ease;
}
.idx:hover { background: var(--paper-2); color: var(--ink); }
.idx.is-active { background: var(--paper-2); color: var(--ink); }
.idx.is-active::before { height: 20px; }

.idx__n {
  font-family: var(--ff-display);
  font-size: .98rem;
  font-weight: 700;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.idx.is-active .idx__n { color: var(--pine); }
.idx__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idx__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  transition: background .2s, border-color .2s;
}
.idx[data-state="partial"] .idx__dot {
  border-color: var(--brass);
  background: linear-gradient(90deg, var(--brass) 50%, transparent 50%);
}
.idx[data-state="full"] .idx__dot { border-color: var(--pine); background: var(--pine); }

/* ============================================================
   Основная колонка
   ============================================================ */
.main { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px var(--pad);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__spacer { flex: 1 1 auto; }

.save { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }
.save__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 22%, transparent); }
.save[data-state="saving"] .save__dot { background: var(--brass); box-shadow: 0 0 0 3px var(--brass-tint); animation: pulse 1s infinite; }
.save[data-state="offline"] .save__dot,
.save[data-state="error"]   .save__dot { background: var(--clay); box-shadow: 0 0 0 3px var(--clay-tint); }
@keyframes pulse { 50% { opacity: .3; } }

/* Кнопки */
.btn {
  font-family: var(--ff-body);
  font-size: .9rem;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow-s);
  text-decoration: none;
}
.btn:hover { background: #fff; border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn--primary { background: var(--pine); border-color: var(--pine); color: #f4efe4; box-shadow: 0 2px 4px rgba(33,58,50,.18), 0 10px 24px -14px rgba(33,58,50,.7); }
.btn--primary:hover { background: var(--pine-deep); border-color: var(--pine-deep); }
.btn--lg { padding: 13px 26px; font-size: .98rem; font-weight: 600; border-radius: 12px; }
.btn--icon { padding: 9px 11px; }
.btn--ghost { border-color: transparent; background: transparent; box-shadow: none; }

/* Меню «⋯» */
.menu { position: relative; }
.menu__pop {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 248px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-l);
  padding: 7px;
  display: none;
  flex-direction: column;
  gap: 1px;
  z-index: 40;
}
.menu.is-open .menu__pop { display: flex; }
.menu__item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border: 0; background: transparent;
  font: inherit; text-align: left;
  color: var(--ink);
  border-radius: 9px;
  cursor: pointer; width: 100%;
}
.menu__item:hover { background: var(--sunk); }
.menu__item small { color: var(--ink-soft); font-size: .76rem; display: block; }
.menu__item.is-danger { color: var(--clay); }
.menu__sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ============================================================
   Обложка
   ============================================================ */
.cover { padding: 60px var(--pad) 34px; border-bottom: 1px solid var(--line); }
.cover__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 44px;
  align-items: end;
}
.cover__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
}
.cover__eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
.cover__title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(2.7rem, 6vw, 4.3rem);
  line-height: .98;
  letter-spacing: -.025em;
  margin: 16px 0 0;
  text-wrap: balance;
}
.cover__lead {
  margin: 20px 0 0;
  max-width: 52ch;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.cover__actions { margin-top: 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cover__meta { font-size: .86rem; color: var(--ink-soft); }

/* Записка от дизайнера */
.notecard {
  position: relative;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 4px 16px 16px 16px;
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
  transform: rotate(-.7deg);
}
.notecard::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  border-left: 3px solid var(--brass-2);
  pointer-events: none;
}
.notecard__quote {
  font-family: var(--ff-display);
  font-size: 3.4rem;
  line-height: .5;
  color: var(--brass-2);
  height: 24px;
}
.notecard__text {
  margin: 6px 0 0;
  font-family: var(--ff-display);
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--ink);
}
.notecard__sign {
  margin-top: 16px;
  font-style: italic;
  font-family: var(--ff-display);
  color: var(--ink-soft);
}

.cover__hint {
  margin-top: 34px;
  display: inline-flex; gap: 10px; align-items: center;
  font-size: .86rem; color: var(--ink-soft);
  padding: 10px 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.cover__hint-ic {
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--pine); color: #f4efe4;
  font-size: .66rem;
}

/* ============================================================
   Разделы
   ============================================================ */
.sections { padding: 8px var(--pad) 120px; }

.section {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 76px;
}
.section:last-child { border-bottom: 0; }

/* появление при скролле */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
  margin-bottom: 30px;
}
.section__ord {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 2.7rem;
  line-height: .9;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}
.section__headmain { min-width: 0; }
.section__eyebrow-row { display: flex; align-items: center; gap: 12px; min-height: 18px; }
.section__eyebrow {
  font-size: .72rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
.section__check {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--pine);
  background: var(--pine-tint);
  border-radius: 999px;
  padding: 3px 9px 3px 8px;
  opacity: 0; transform: scale(.9);
  transition: opacity .2s, transform .2s;
}
.section__check::before { content: '✓'; font-size: .7rem; }
.section__check.is-on { opacity: 1; transform: none; }

.section__title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.06;
  letter-spacing: -.015em;
  margin: 5px 0 0;
}
.section__note { margin: 12px 0 0; color: var(--ink-soft); font-size: .96rem; max-width: 60ch; }
.section__intro { margin-top: 16px; max-width: 62ch; color: var(--ink-soft); }
.section__intro p { margin: 0 0 10px; }
.section__outro {
  margin-top: 26px; padding: 18px 20px;
  border-left: 3px solid var(--brass);
  background: var(--paper-2);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--ink-soft); font-size: .96rem; max-width: 64ch;
}

.section__body { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }

/* «Дальше» */
.section__next {
  margin-top: 34px;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  text-decoration: none; color: var(--ink);
  max-width: 720px;
  transition: border-color .15s, background .15s, transform .1s;
}
.section__next:hover { border-color: var(--brass); background: #fff; }
.section__next-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); font-weight: 600; }
.section__next-title { flex: 1 1 auto; font-family: var(--ff-display); font-weight: 600; font-size: 1.05rem; }
.section__next-arrow { color: var(--brass); font-size: 1.15rem; transition: transform .15s; }
.section__next:hover .section__next-arrow { transform: translateX(3px); }

.section__finish {
  margin-top: 34px; max-width: 720px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.section__finish p { margin: 0; color: var(--ink-soft); max-width: 42ch; }

/* Акценты разделов */
.section--stop .section__ord { color: var(--clay); }
.section--focus .section__ord { color: var(--pine); }

/* Раздел 16 — «сумеречный» */
.section--dusk {
  margin: 52px calc(var(--pad) * -1);
  padding: 54px var(--pad) 58px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(120% 130% at 82% -10%, rgba(194,160,102,.18), transparent 52%),
    linear-gradient(180deg, #2a3a3e, #223035);
  color: #e9e3d6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.section--dusk .section__ord { color: #d9b877; }
.section--dusk .section__eyebrow { color: #cdb489; }
.section--dusk .section__title { color: #f4efe4; }
.section--dusk .section__note,
.section--dusk .section__intro,
.section--dusk .field__label { color: #d8d0c1; }
.section--dusk .section__check { background: rgba(217,184,119,.16); color: #e9d3a2; }
.section--dusk .section__outro { border-left-color: #d9b877; background: rgba(255,255,255,.05); color: #ded7c8; }
.section--dusk .input, .section--dusk .textarea {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #f4efe4;
}
.section--dusk .input::placeholder, .section--dusk .textarea::placeholder { color: rgba(233,227,214,.4); }
.section--dusk .input:focus, .section--dusk .textarea:focus { border-color: #d9b877; box-shadow: 0 0 0 3px rgba(217,184,119,.22); background: rgba(255,255,255,.09); }
.section--dusk .prompt__q { color: #ecd9b4; }
.section--dusk .section__finish { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
.section--dusk .section__finish p { color: #ded7c8; }

/* ---------- Поля ---------- */
.field { display: flex; flex-direction: column; gap: 9px; }
.field__label { font-weight: 600; font-size: 1rem; color: var(--ink); line-height: 1.4; }
.field__hint { font-size: .84rem; color: var(--ink-soft); margin-top: -4px; }

.input, .textarea {
  font-family: var(--ff-body);
  font-size: 1.02rem;
  color: var(--ink);
  width: 100%;
  padding: 13px 15px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px var(--pine-tint);
  background: #fff;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }
.textarea { resize: none; overflow: hidden; line-height: 1.55; min-height: 50px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-right: 48px; }
.input-wrap__suffix { position: absolute; right: 15px; color: var(--ink-faint); font-size: .92rem; pointer-events: none; }

/* Radio / Checkbox — «чипсы» */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px 10px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper-2);
  cursor: pointer;
  font-size: .93rem; line-height: 1.2;
  transition: border-color .12s, background .12s, color .12s, box-shadow .12s;
  user-select: none;
}
.choice:hover { border-color: var(--brass); background: #fff; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid; place-items: center;
  transition: border-color .12s, background .12s;
}
.choice--check .choice__box { border-radius: 6px; }
.choice__box::after { content: ''; width: 8px; height: 8px; border-radius: inherit; background: transparent; transform: scale(0); transition: transform .12s; }
.choice--check .choice__box::after { width: 10px; height: 10px; border-radius: 2px; }
.choice input:checked ~ .choice__box { border-color: var(--pine); background: var(--pine); }
.choice input:checked ~ .choice__box::after { background: var(--paper-2); transform: scale(1); }
.choice:has(input:checked) { border-color: var(--pine); background: var(--pine-tint); color: var(--pine-deep); }
.choice input:focus-visible ~ .choice__box { box-shadow: 0 0 0 3px var(--pine-tint); }
.section--stop .choice:has(input:checked) { border-color: var(--clay); background: var(--clay-tint); color: var(--clay); }
.section--stop .choice input:checked ~ .choice__box { border-color: var(--clay); background: var(--clay); }

.other-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.other-row .input { max-width: 340px; }
.other-row__label { font-size: .88rem; color: var(--ink-soft); white-space: nowrap; }

/* Чипсы-подсказки */
.chips { display: flex; flex-direction: column; gap: 13px; }
.chips__row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px dashed var(--line-2);
  background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 7px 14px;
  font: inherit; font-size: .87rem; cursor: pointer;
  transition: all .12s;
}
.chip:hover { border-style: solid; border-color: var(--brass); color: var(--ink); background: var(--brass-tint); }
.chip::before { content: '+ '; color: var(--brass); font-weight: 700; }
.section--stop .chip:hover { border-color: var(--clay); background: var(--clay-tint); color: var(--clay); }
.section--stop .chip::before { color: var(--clay); }

/* «Что уже куплено» */
.goods { display: flex; flex-direction: column; gap: 11px; }
.good {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 14px; row-gap: 12px;
  padding: 13px 15px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}
.good:has(.good__detail:not([hidden])) { background: var(--paper-3); border-color: var(--line-2); }
.good__name { font-weight: 600; font-size: .96rem; }
.good__toggle { display: inline-flex; padding: 3px; background: var(--sunk); border-radius: 999px; gap: 2px; justify-self: end; }
.good__toggle button { border: 0; background: transparent; font: inherit; font-size: .84rem; padding: 6px 16px; border-radius: 999px; cursor: pointer; color: var(--ink-soft); transition: color .12s; }
.good__toggle button.is-on { background: var(--pine); color: #f4efe4; box-shadow: var(--shadow-s); }
/* поле «что именно» — на всю ширину отдельной строкой, просторное для подробного описания */
.good__detail { grid-column: 1 / -1; min-width: 0; }
.good__detail .textarea { background: var(--paper-2); min-height: 58px; }
.good__detail[hidden] { display: none; }

/* ---------- Вложения (фото/видео/PDF) ---------- */
.files { display: flex; flex-direction: column; gap: 14px; }
.files__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.files__list:empty { display: none; }
.file {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-s);
}
.file__thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--sunk);
  overflow: hidden;
}
.file__thumb img, .file__thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.file__thumb--doc { display: grid; place-items: center; background: var(--pine-tint); }
.file__thumb--doc span { font-weight: 700; color: var(--pine); font-size: .9rem; letter-spacing: .04em; }
.file__thumb--up { display: grid; place-items: center; background: var(--sunk); }
.file__thumb--up span { font-weight: 600; color: var(--pine); font-variant-numeric: tabular-nums; }
.file__meta { padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.file__name { font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file__size { font-size: .74rem; color: var(--ink-soft); }
.file__del {
  position: absolute; top: 7px; right: 7px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(20,22,24,.62); color: #fff; font-size: .8rem;
  display: grid; place-items: center;
  opacity: 0; transition: opacity .15s;
}
.file:hover .file__del { opacity: 1; }
.file__bar { height: 5px; background: var(--sunk); border-radius: 3px; overflow: hidden; margin-top: 2px; }
.file__bar-fill { height: 100%; background: var(--pine); transition: width .2s; }
.file--up { opacity: .85; }

.files__drop {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 26px 20px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--paper-2);
  cursor: pointer; text-align: center;
  color: var(--ink-soft);
  transition: border-color .15s, background .15s, color .15s;
}
.files__drop:hover, .files__drop.is-drag { border-color: var(--pine); background: var(--pine-tint); color: var(--ink); }
.files__drop-ic {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pine); color: #f2efe6; font-size: 1.1rem;
}
.files__drop-main { font-size: .95rem; }
.files__drop-main b { font-weight: 600; color: var(--ink); }
.files__drop-sub { font-size: .8rem; color: var(--ink-faint); }

/* ---------- Меню: акцентный пункт ---------- */
.menu__item--accent { color: var(--pine); }
.menu__item--accent:hover { background: var(--pine-tint); }
.btn--sm { padding: 6px 12px; font-size: .82rem; }

/* ============================================================
   Режим просмотра (для дизайнера)
   ============================================================ */
.viewbar {
  position: sticky; top: 62px; z-index: 15;
  display: flex; align-items: center; gap: 13px;
  padding: 11px var(--pad);
  background: var(--pine);
  color: #eaf1f0;
}
.viewbar__ic { font-size: 1.05rem; }
.viewbar__txt { display: flex; flex-direction: column; line-height: 1.25; flex: 1 1 auto; }
.viewbar__txt b { font-size: .9rem; }
.viewbar__txt span { font-size: .76rem; color: #b9d0cd; }
.viewbar .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.24); color: #fff; }
.viewbar .btn:hover { background: rgba(255,255,255,.22); }
.is-view .cover__hint { background: var(--pine-tint); border-color: transparent; }

/* Документ (только чтение) */
.doc { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.doc-qa { display: flex; flex-direction: column; gap: 5px; }
.doc-q { font-size: .82rem; font-weight: 600; letter-spacing: .01em; color: var(--ink-soft); }
.doc-a { font-size: 1.05rem; color: var(--ink); white-space: pre-wrap; }
.doc-a.is-empty { color: var(--ink-faint); font-style: italic; }
.files__list--view { margin-top: 2px; }
.files__list--view .file__del { display: none; }

/* Раздел 16 — подсказки-день */
.prompts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.prompt { display: flex; flex-direction: column; gap: 7px; }
.prompt__q { font-family: var(--ff-display); font-size: 1.1rem; font-weight: 600; color: var(--pine); }

/* ---------- Тост ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper);
  padding: 12px 22px; border-radius: 999px;
  font-size: .89rem; box-shadow: 0 14px 34px -12px rgba(0,0,0,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 60;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Мобильная навигация ---------- */
.spine-toggle { display: none; border: 1px solid var(--line-2); background: var(--paper-2); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 1rem; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(33,30,25,.42); z-index: 45; }
.scrim.is-show { display: block; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1040px) {
  .cover__grid { grid-template-columns: 1fr; gap: 30px; }
  .notecard { max-width: 460px; }
}

@media (max-width: 940px) {
  :root { --spine: 0px; --pad: 22px; }
  .layout { grid-template-columns: 1fr; }
  .spine {
    position: fixed; top: 0; left: 0;
    width: 308px; height: 100vh; z-index: 50;
    background: var(--paper);
    transform: translateX(-102%);
    transition: transform .25s ease;
    box-shadow: 0 0 44px -10px rgba(0,0,0,.32);
  }
  .spine.is-open { transform: translateX(0); }
  .spine-toggle { display: inline-flex; }
  .cover { padding-top: 36px; }
  .section--dusk { margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); }
  .prompts { grid-template-columns: 1fr; }
  .good { grid-template-columns: 1fr auto; }
  .good__detail { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .section { padding: 40px 0; }
  .section__head { grid-template-columns: 1fr; gap: 6px; }
  .section__ord { font-size: 2rem; }
  .btn__label { display: none; }
  .btn--lg .btn__label { display: inline; }
  .save__text { display: none; }
  .cover__title { font-size: clamp(2.3rem, 10vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
