/* ============================================================================
   Токены FinCoreX — единственный источник палитры (язык «Раскладка»)
   и общий знак бренда (кольцо + имя, разметку даёт brandHtml() в helpers.php).
   Подключается отдельным <link> ПЕРЕД app.css / landing.css на каждой странице.
   Специфичные токены страниц (--measure и т.п.) живут в их собственных файлах.
   ============================================================================ */

:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --ink: #0d1318;
  --ink-soft: #18222b;
  --muted: #5b6a78;
  --line: #e0e6ec;

  /* Акцент — цвет отложенного, а не потраченного. */
  --volt: #0f6e52;
  --volt-dark: #0b573f;
  --volt-soft: rgba(15, 110, 82, .09);
  --mint: #14875f;
  --amber: #b9741a;
  --coral: #c2453c;
  --slate: #35566e;

  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(13,19,24,.05), 0 22px 50px -34px rgba(13,19,24,.45);
}

/* ------------------------------------------------------------------- бренд */

.brand-ring { width: 28px; height: 28px; flex: none; }
.brand-core { color: var(--volt); }

/* -------------------------------------------------------------- чек-атом
   Кассовый чек раскладки: журнал поступлений, предпросмотр на обзоре,
   калькулятор, страницы схем, шорткоды блога. Документ события, не форма. */

/* «Поступления» — кассовые чеки (вариант A, выбор Александра).
   Зубцы — полоски-градиенты цветом бумаги над и под чеком; тень drop-shadow
   повторяет зубчатый контур. Имя .receipt занято формой «Правил». */
.cheque-feed { max-width: 460px; margin: 0 auto; }
.cheque { margin-bottom: 1.4rem; filter: drop-shadow(0 10px 22px rgba(13, 19, 24, .22)); }
.cheque-zig {
  height: 10px;
  background-image:
    linear-gradient(135deg, var(--card) 50%, transparent 50%),
    linear-gradient(-135deg, var(--card) 50%, transparent 50%);
  background-size: 14px 10px; background-repeat: repeat-x;
}
.cheque-zig.top { transform: scaleY(-1); }
.cheque-paper { background: var(--card); padding: 1.2rem 1.15rem 1.3rem; font: 400 0.85rem 'JetBrains', monospace; }
.cheque-head { text-align: center; margin-bottom: 0.9rem; }
.cheque-head b { letter-spacing: 0.08em; text-transform: uppercase; }
.cheque-head .sub { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.06em; }
.cheque-paper hr { border: 0; border-top: 1px dashed #c9d2da; margin: 0.7rem 0; }
.cheque-line { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.18rem 0; }
.cheque-line .n { overflow: hidden; white-space: nowrap; }
.cheque-line .n::after { content: ' ........................................'; color: #c9d2da; }
.cheque-line .s { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cheque-total { display: flex; justify-content: space-between; gap: 0.6rem; font-weight: 700; font-size: 1rem; padding-top: 0.5rem; }
.cheque-total span:last-child { white-space: nowrap; }
.cheque-meta { text-align: center; color: var(--muted); font-size: 0.74rem; margin-top: 0.9rem; letter-spacing: 0.04em; }
.cheque-meta form { display: inline; }
.cheque-del {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 2px; padding: 0;
}
.cheque-del:hover { color: var(--coral); }
.cheque-note { color: var(--muted); font-size: 0.68rem; margin: -0.1rem 0 0.15rem; }

/* Подзаголовок группы строк («приход», «снято») — как в кассовом Z-отчёте. */
.cheque-group {
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0.4rem 0 0.1rem;
}
.cheque-line .pc { color: var(--muted); font-size: 0.68rem; margin-right: 0.2rem; }

/* Точка цвета корзины — на бумаге корзина названа цветом, а не словом:
   в строку чека на 350px слово не влезает. Расшифровка — в .cheque-legend. */
.cheque-dot {
  display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%;
  margin-right: 0.45em; vertical-align: 0.05em; flex: none;
}
.cheque-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.1rem 0.7rem;
  margin-top: 0.35rem;
}

/* Свёрнутый день: строка-итог раскрывается в траты этого дня.
   summary сам по себе .cheque-line — лидеры и раскладка достаются от атома. */
.cheque-fold { border-top: 1px dashed #c9d2da; }
.cheque-fold > summary { list-style: none; cursor: pointer; padding: 0.4rem 0; }
.cheque-fold > summary::-webkit-details-marker { display: none; }
.cheque-fold > summary:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }
.cheque-fold .car { color: var(--muted); font-size: 0.72rem; }
.cheque-fold[open] .car { display: inline-block; transform: rotate(180deg); }
/* Небольшой сдвиг вправо: видно, что это состав дня, а не соседние дни. */
.cheque-fold .fold-body { padding: 0 0 0.35rem 0.6rem; }

/* Удаление прямо в строке — иначе до траты не добраться без раскрытий. */
.cheque-line form { display: flex; flex: none; }
.cheque-x {
  border: 0; background: none; padding: 0 0 0 0.2rem; margin: 0; cursor: pointer;
  font: inherit; line-height: 1.45; color: #9aa7b3;
}
.cheque-x:hover { color: var(--coral); }
