/* ================================================================
   Компоненты безопасности и «прогресс без веса» — линия «Стандарты».
   Только токены (brand.css): --esc-*, --crisis, --pause, --day-*, --stone.
   ================================================================ */

/* ── Дисклеймер ───────────────────────────────────────────────── */
.st-disclaimer {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--text-muted);
}
.st-disclaimer svg { flex-shrink: 0; margin-top: 1px; }
.st-disclaimer--full {
  flex-direction: column; gap: 6px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg-warm); border: 1px solid var(--border-light);
  font-size: 13px;
}
.st-disclaimer__line { display: flex; gap: 8px; margin: 0; color: var(--text-dim); }
.st-disclaimer__line svg { flex-shrink: 0; margin-top: 2px; color: var(--dom-mind); }
.st-disclaimer__title { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 2px; }
.st-disclaimer__list { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 12.5px; }
.st-disclaimer__list li { margin-top: 2px; }

/* ── «Это рекомендация — решаешь ты» (variant="notice") ─────────
   04.10: тише. Была сиреневая плашка на треть экрана на каждой странице программы,
   челленджа и практики. Теперь одна строка со щитом, текст и ссылка — по раскрытию
   (details.disclosure). Без заливки и коралла: это правило, а не опасность и не действие. */
.st-notice {
  display: flex; gap: var(--space-2); align-items: flex-start;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
}
.st-notice__ic { flex-shrink: 0; color: var(--text-muted); margin-top: 14px; }
.st-notice__body { min-width: 0; flex: 1; }
html:root details.disclosure.st-notice__body > summary { color: var(--text-dim); text-decoration: none; }
.st-notice__title { font-size: var(--fs-caption); font-weight: 600; }
.st-notice__text { margin: 0; font-size: var(--fs-caption); line-height: 1.5; color: var(--text-dim); }
.st-notice__link { display: inline-block; margin: var(--space-1) 0 var(--space-2); font-size: var(--fs-caption);
  color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

/* ── E1 плашка / E2 шторка ────────────────────────────────────── */
.st-esc {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--esc-c) 35%, transparent);
  background: color-mix(in srgb, var(--esc-c) 10%, var(--card));
}
.st-esc--e1 { --esc-c: var(--esc-e1); }
.st-esc--e2 { --esc-c: var(--esc-e2); border: 0; background: none; padding: 4px 0 0; }
.st-esc__ic { flex-shrink: 0; color: var(--esc-c); margin-top: 1px; }
.st-esc__body { min-width: 0; }
.st-esc__title { font-size: 14px; font-weight: 700; color: var(--text); }
.st-esc__text { margin: 2px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
.st-esc--e2 .st-esc__text { font-size: 15px; color: var(--text); }
.st-esc__ack { margin-top: 10px; }
.st-esc__ok { margin-top: 16px; height: var(--btn-h); }

/* ── E3 и кризис: полный экран, без анимаций ─────────────────── */
.st-full {
  position: fixed; inset: 0; z-index: var(--z-topmost);
  background: var(--bg); color: var(--text);
  overflow-y: auto; overscroll-behavior: contain;
  padding: calc(env(safe-area-inset-top, 0px) + 32px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.st-full--e3     { --full-c: var(--esc-e3); }
.st-full--crisis { --full-c: var(--crisis); }
.st-full__inner { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.st-full__ic { color: var(--full-c); }
.st-full__title { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; }
.st-full__text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-dim); }
.st-full__note { margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }
.st-full__calls { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.st-full__close { align-self: center; margin-top: 8px; }
/* /help: тихий выход вместо шапки — без меню и бренда, но человек не заперт. */
.st-full__back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 2px;
  min-height: 44px; margin: -12px 0 0 -8px; padding: 0 8px;
  background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--text-muted); font: inherit; font-size: 15px; cursor: pointer;
}
.st-full__back:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.st-call {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
  min-height: 64px; padding: 12px 16px; border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  background: color-mix(in srgb, var(--full-c) 12%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--full-c) 45%, transparent);
}
.st-call svg { grid-row: span 2; color: var(--full-c); }
.st-call__num { font-size: 22px; font-weight: 800; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.st-call__label { font-size: 12.5px; color: var(--text-muted); }
/* Режим работы и плата за звонок — отдельной строкой под названием службы. */
.st-call__note { display: block; font-style: normal; font-size: 12px; margin-top: 2px; }
.st-full__note--dim { font-size: 12px; }
.st-call--e3:first-child { background: var(--full-c); border-color: var(--full-c); color: var(--btn-text); }
.st-call--e3:first-child svg, .st-call--e3:first-child .st-call__label { color: var(--btn-text); }
.st-call:active { filter: brightness(.95); }

/* ── Неделя «X из 7» ──────────────────────────────────────────── */
.st-week { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 10px; align-items: baseline; }
.st-week__count { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: var(--fs-body-lg); }
.st-week__count b { line-height: 1; }   /* .bk-num — Unbounded и размер */
.st-week__title { font-size: var(--fs-caption); color: var(--text-muted); }
.st-week__days { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.st-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.st-day__dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--bg);
  border: 2px solid var(--day-empty); box-sizing: border-box;
}
.st-day--done   .st-day__dot { background: var(--day-done); border-color: var(--day-done); }
.st-day--rest   .st-day__dot { background: var(--day-rest); border-color: var(--day-rest); }
.st-day--pause  .st-day__dot { background: var(--pause); border-color: var(--pause); }
.st-day--missed .st-day__dot { background: none; }                      /* не красим — пропуск не провал */
.st-day--future .st-day__dot { background: none; border-style: dashed; }
.st-day.is-today .st-day__dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--sel-line); }
.st-day__wd { font-size: var(--fs-min); color: var(--text-muted); }
.st-day.is-today .st-day__wd { color: var(--text); font-weight: 700; }

/* ── «Ваза с камнями» ─────────────────────────────────────────── */
.st-jar { display: flex; align-items: center; gap: 14px; }
.st-jar__vase {
  width: 84px; height: 104px; flex-shrink: 0; position: relative;
  border: 2px solid var(--border); border-top: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 30px 30px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  overflow: hidden;
}
.st-jar__vase::before {   /* горлышко */
  content: ''; position: absolute; top: 0; left: -2px; right: -2px; height: 2px; background: var(--border);
}
.st-jar__stones {
  position: absolute; left: 6px; right: 6px; bottom: 6px;
  display: flex; flex-wrap: wrap-reverse; gap: 3px; justify-content: center;
}
.st-jar__stone {
  width: 14px; height: 11px; border-radius: 50% 45% 50% 45%;
  background: var(--stone);
}
.st-jar__stone:nth-child(3n)   { background: color-mix(in srgb, var(--stone) 75%, var(--card)); width: 16px; }
.st-jar__stone:nth-child(4n+1) { background: color-mix(in srgb, var(--stone) 88%, var(--text)); width: 12px; }
.st-jar__text { font-size: var(--fs-body-lg); color: var(--text); }
.st-jar__text b { margin-right: var(--space-1); }
.st-jar__text small { display: block; margin-top: 4px; font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.4; }

/* ── Пауза ─────────────────────────────────────────────────────── */
.st-pause {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--pause-bg); color: var(--pause);
  font-size: var(--fs-min); font-weight: var(--fw-bold);
}

/* ── Ты против тебя месяц назад ───────────────────────────────── */
.st-vs { display: grid; grid-template-columns: auto auto auto 1fr; align-items: end; column-gap: 12px; row-gap: 6px; }
.st-vs__col { display: flex; flex-direction: column; }
.st-vs__col small { font-size: var(--fs-min); color: var(--text-muted); }
.st-vs__col b { color: var(--text-dim); }
.st-vs__col--now b { color: var(--loop-body-text); }
.st-vs__arrow { color: var(--text-muted); padding-bottom: 4px; }
.st-vs__note { grid-column: 1 / -1; font-size: var(--fs-caption); color: var(--text-muted); }

/* Поиск на странице «как в Telegram» (dn_1c00f4745327): свёрнут до жеста «потянуть вниз», 40 px поле */
.page-search { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.22s var(--ease-out); padding: 0 var(--space-3); }
.page-search.is-open { grid-template-rows: 1fr; }
.page-search > .page-search-field { overflow: hidden; min-height: 0; }
.page-search.is-open > .page-search-field { margin: var(--space-2) 0; }
.page-search-field > input { height: 40px; padding-right: 36px; }
.page-search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; border: none; background: none; color: var(--text-muted); cursor: pointer; }
.page-search-field > input::-webkit-search-cancel-button, .page-search-field > input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.page-search-clear { border: 0; background: transparent; }
@media (prefers-reduced-motion: reduce) { .page-search { transition: none; } }

/* Иллюстрация пустого экрана: 3D-предмет на мягком круге — в светлой теме даёт белым предметам край */
.empty-art { display: inline-grid; place-items: center; border-radius: 50%; margin-inline: auto;
  background: color-mix(in srgb, var(--text) 6%, var(--bg)); }
html:root[data-theme="dark"] .empty-art { background: color-mix(in srgb, var(--text) 4%, var(--bg)); }
.empty-art img { display: block; object-fit: contain; }
