/* ==========================================================================
   Doctrina — app.css (2026-08-22)
   Єдина дизайн-система ПРОДУКТОВИХ сторінок: /step, /account, /login, /signup,
   /reset, /feedback, /gpt/chat. Ті самі токени, шрифти й компоненти, що на
   головній (home-assets/css/home.css), але для екранів, де дизайн СЛУЖИТЬ
   продукту, а не продає його.

   Порядок підключення: style_2.css (навбар) → new-look.css (.dlg*, .hint)
   → uicons → app.css. Сторінка вмикає систему класами
   <html class="app-page"> + <body class="app">, увесь вміст — у <main>.
   Навбар (#navbar + navbar.js) і .dlg (DoctrinaConfirm) живуть у своїх файлах;
   тут — лише їхня тема.

   Поверхні (рішення 2026-08-22):
     полотно   #121212 (--bg)          — фон кожної сторінки;
     плитка    --s1 + --line (.tile)   — налаштування, акаунт, службові блоки;
     папір     #f5f5f5 (.paper, .mdl)  — те, з чим працюють: буклети, списки,
                                         вікна, діалоги (система .dlg світла).
   Монохром: кольору в хромі немає; стан = вага, прозорість, контур, «!».
   ========================================================================== */

@font-face { font-family: 'Fixel Display'; src: url('/home-assets/fonts/FixelDisplay-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fixel Display'; src: url('/home-assets/fonts/FixelDisplay-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fixel Display'; src: url('/home-assets/fonts/FixelDisplay-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fixel Text'; src: url('/home-assets/fonts/FixelText-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fixel Text'; src: url('/home-assets/fonts/FixelText-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fixel Text'; src: url('/home-assets/fonts/FixelText-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* полотно й плитки — 1:1 з home.css */
  --bg: #121212;
  --s1: #171717;
  --s2: #1c1c1c;
  --s3: #242424;
  --fg: #f5f5f5;
  --fg-2: rgba(245, 245, 245, 0.70);
  --fg-3: rgba(245, 245, 245, 0.48);
  --line: rgba(245, 245, 245, 0.09);
  --line-2: rgba(245, 245, 245, 0.18);
  --line-3: rgba(245, 245, 245, 0.30);
  --fill: rgba(245, 245, 245, 0.06);
  --fill-2: rgba(245, 245, 245, 0.11);
  /* папір: світла поверхня (картки /step, вікна, діалоги) */
  --card: #f5f5f5;
  --ink: #121212;
  --ink-2: rgba(18, 18, 18, 0.66);
  --ink-3: rgba(18, 18, 18, 0.48);
  --ink-line: rgba(18, 18, 18, 0.10);
  --ink-line-2: rgba(18, 18, 18, 0.22);
  --ink-fill: rgba(18, 18, 18, 0.05);
  --ink-fill-2: rgba(18, 18, 18, 0.09);
  /* радіуси */
  --r-pill: 999px;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-xs: 8px;
  /* шрифти */
  --font-display: 'Fixel Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-text: 'Fixel Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* рух: входи — ease-out; на місці — ease-io; шторка — крива iOS */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --t-press: 160ms;
  --t-hover: 200ms;
  --t-in: 220ms;
  --t-out: 140ms;
  --t-sheet: 320ms;
  /* сітка */
  --nav-h: 50px;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --shadow-pop: 0 24px 64px -24px rgba(0, 0, 0, 0.75), 0 2px 8px rgba(0, 0, 0, 0.35);
  /* шари: випадайка → липке → підкладка → вікно → тост */
  --z-dropdown: 50;
  --z-sticky: 90;
  --z-backdrop: 200;
  --z-modal: 210;
  --z-toast: 300;
}

/* ---- база: перекриття style_2 / new-look ----------------------------------- */
html.app-page { background: var(--bg); color-scheme: dark; height: auto; min-height: 100%; width: auto; }
body.app {
  background: var(--bg); color: var(--fg);
  font-family: var(--font-text); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  height: auto; min-height: 100%; width: auto; margin: 0; overflow-x: clip;
}
/* new-look.css анімує все (`* { transition: .3s }`) і зменшує абзаци (`p { 90% }`):
   у межах вмісту сторінки повертаємо типові значення. Навбар лишається як є. */
/* :where() — нульова специфічність: скидання не перебиває компонентних правил інших файлів (chat-3.css). */
.app :where(main, .mdl-overlay, .toast, .dlg) *,
.app :where(main, .mdl-overlay, .toast, .dlg) *::before,
.app :where(main, .mdl-overlay, .toast, .dlg) *::after { transition: none; box-sizing: border-box; }
.app :where(main, .mdl-overlay, .toast, .dlg) { box-sizing: border-box; }
.app :where(main, .mdl-overlay, .dlg) :where(p) { font-size: inherit; margin: 0; }
.app :where(h1, h2, h3, h4) { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.022em; line-height: 1.1; text-wrap: balance; }
.app :where(main) :where(a) { color: inherit; text-decoration: none; }
.app :where(main) :where(img, svg) { max-width: 100%; display: block; }
/* new-look.css малює будь-який <nav> чорною абсолютною смугою (шапка раннера): у вмісті сторінки nav — звичайний блок */
.app :where(main) :where(nav) { position: static; width: auto; height: auto; background: none; }
.app :where(main) :is(ul, ol) { list-style: none; margin: 0; padding: 0; }
.app :where(main, .mdl-overlay, .toast) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app :where(main) :where(input, select, textarea) { font: inherit; color: inherit; }
.app :where(main, .toast) :focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: var(--r-sm); }
.app :is(.paper, .mdl-card, .dlg) :focus-visible { outline-color: var(--ink); }
.app .visually-hidden, .app .pill-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- сітка й типографіка ---------------------------------------------------- */
.app .shell { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.app .shell--narrow { width: min(720px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.app .shell--xs { width: min(440px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.app .app-main { position: relative; padding-top: calc(var(--nav-h) + clamp(24px, 4vw, 40px)); padding-bottom: clamp(72px, 10vw, 120px); min-height: 100svh; }
.app .page-head { text-align: center; margin-bottom: clamp(18px, 2.6vw, 26px); }
.app .page-head .t-lead { margin: 10px auto 0; max-width: 56ch; }

.app .t-h1 { font-size: clamp(1.875rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.app .t-h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); letter-spacing: -0.025em; }
.app .t-h3 { font-size: 1.125rem; letter-spacing: -0.015em; }
.app .t-lead { font-size: clamp(1rem, 1.2vw, 1.125rem); line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.app .t-muted { color: var(--fg-2); }
.app .t-dim { color: var(--fg-3); }
.app .t-num { font-variant-numeric: tabular-nums; }
.app .t-small { font-size: 0.875rem; }

/* ---- кнопки (.cta — 1:1 з головною + розміри) ------------------------------- */
.app .cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 26px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-family: var(--font-text); font-weight: 600; font-size: 1rem; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, border-color var(--t-hover) ease, color var(--t-hover) ease, opacity var(--t-hover) ease;
}
.app .cta:active { transform: scale(0.97); }
.app .cta i { font-size: 1.05em; line-height: 1; }
.app .cta--primary { background: var(--fg); color: var(--bg); }
.app .cta--ghost { background: var(--fill); color: var(--fg); border-color: var(--line-2); }
.app .cta--quiet { background: transparent; color: var(--fg-2); }
.app .cta--lg { height: 54px; padding: 0 32px; font-size: 1.0625rem; }
.app .cta--sm { height: 40px; padding: 0 18px; font-size: 0.9375rem; gap: 8px; }
.app .cta--xs { height: 34px; padding: 0 14px; font-size: 0.875rem; gap: 6px; }
.app .cta--full { width: 100%; }
.app .cta--icon { width: 44px; height: 44px; padding: 0; }
.app .cta--icon.cta--sm { width: 40px; height: 40px; }
.app .cta:disabled, .app .cta[aria-disabled="true"] { opacity: 0.5; cursor: default; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .app .cta--primary:hover { background: #ffffff; transform: translateY(-1px); }
  .app .cta--ghost:hover { background: var(--fill-2); border-color: var(--line-3); transform: translateY(-1px); }
  .app .cta--quiet:hover { color: var(--fg); background: var(--fill); }
  .app .cta:active { transform: scale(0.97); }
}
/* ті самі кнопки на папері */
.app :is(.paper, .mdl-card, .dlg) .cta--primary { background: var(--ink); color: var(--card); }
.app :is(.paper, .mdl-card, .dlg) .cta--ghost { background: transparent; color: var(--ink); border-color: var(--ink-line-2); }
.app :is(.paper, .mdl-card, .dlg) .cta--quiet { color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .app :is(.paper, .mdl-card, .dlg) .cta--primary:hover { background: #000; }
  .app :is(.paper, .mdl-card, .dlg) .cta--ghost:hover { background: var(--ink-fill); border-color: var(--ink-2); }
  .app :is(.paper, .mdl-card, .dlg) .cta--quiet:hover { color: var(--ink); background: var(--ink-fill); }
}
.app .btn-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.app .btn-group--center { justify-content: center; }

/* ---- поля форм --------------------------------------------------------------- */
.app .form { display: flex; flex-direction: column; gap: 18px; }
.app .form__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.app .fld { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.app .fld__label { font-size: 0.875rem; font-weight: 500; color: var(--fg-2); }
.app .fld__wrap { position: relative; display: flex; align-items: center; }
.app .fld__input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: rgba(245, 245, 245, 0.05); color: var(--fg);
  font-family: inherit; font-size: 1rem; line-height: 1.3; outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, box-shadow var(--t-hover) ease;
}
.app textarea.fld__input { height: auto; min-height: 150px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.app .fld__input::placeholder { color: var(--fg-3); }
.app .fld__input:hover { border-color: var(--line-3); }
.app .fld__input:focus { border-color: rgba(245, 245, 245, 0.72); background: rgba(245, 245, 245, 0.07); box-shadow: 0 0 0 4px rgba(245, 245, 245, 0.08); }
.app .fld__input:disabled { opacity: 0.5; cursor: default; }
.app .fld__input:-webkit-autofill, .app .fld__input:-webkit-autofill:focus { -webkit-text-fill-color: var(--fg); -webkit-box-shadow: 0 0 0 1000px #1f1f1f inset; caret-color: var(--fg); border-color: var(--line-3); }
.app .fld__wrap .fld__input { padding-right: 52px; }
.app .fld__eye { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--fg-3); font-size: 1.05rem; transition: color var(--t-hover) ease, background-color var(--t-hover) ease; }
.app .fld__eye:hover { color: var(--fg); background: var(--fill); }
.app .fld__hint { font-size: 0.8125rem; line-height: 1.45; color: var(--fg-3); }
.app .fld__hint--error { color: var(--fg); font-weight: 500; display: flex; gap: 6px; align-items: flex-start; }
.app .fld--error .fld__input { border-color: rgba(245, 245, 245, 0.72); }
.app select.fld__input { padding-right: 44px; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='.7'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; }
.app select.fld__input:disabled { background-image: none; }
.app .fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .app .fld-row { grid-template-columns: 1fr; } }
/* форми на папері (вікна) */
.app :is(.paper, .mdl-card) .fld__label { color: var(--ink-2); }
.app :is(.paper, .mdl-card) .fld__input { border-color: var(--ink-line-2); background: var(--ink-fill); color: var(--ink); }
.app :is(.paper, .mdl-card) .fld__input::placeholder { color: var(--ink-3); }
.app :is(.paper, .mdl-card) .fld__input:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px var(--ink-fill-2); }

/* ---- сегментований перемикач ------------------------------------------------- */
.app .tabs { position: relative; display: inline-flex; gap: 4px; padding: 4px; max-width: 100%; border-radius: var(--r-pill); background: var(--fill); border: 1px solid var(--line); }
.app .tab {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 18px; border: 0; border-radius: var(--r-pill); background: transparent;
  font-family: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--fg-2); white-space: nowrap; cursor: pointer;
  transition: color var(--t-hover) ease, background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.app .tab:active { transform: scale(0.97); }
.app .tab.active { background: var(--fg); color: var(--bg); }
.app .tabs.has-indicator .tab.active { background: transparent; }
.app .tabs--equal { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
/* пігулка-індикатор (JS ставить width один раз; вкладки рівної ширини, тож рухається ЛИШЕ transform) */
.app .tab-indicator { position: absolute; top: 0; left: 0; z-index: 0; border-radius: var(--r-pill); background: var(--fg); pointer-events: none; transition: transform 320ms var(--ease-out), opacity var(--t-hover) ease; }
.app .tab-off, .app .tab:disabled { opacity: 0.35; cursor: not-allowed; }
.app .tab-off:active, .app .tab:disabled:active { transform: none; }
.app .tab-badge { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; font-size: 0; flex: none; }
@media (hover: hover) and (pointer: fine) { .app .tab:not(:disabled):not(.active):hover { color: var(--fg); } }
.app :is(.paper, .mdl-card) .tabs { background: var(--ink-fill-2); border-color: transparent; }
.app :is(.paper, .mdl-card) .tab { color: var(--ink-2); }
.app :is(.paper, .mdl-card) .tab.active { background: var(--ink); color: var(--card); }
@media (hover: hover) and (pointer: fine) { .app :is(.paper, .mdl-card) .tab:not(:disabled):not(.active):hover { color: var(--ink); } }

/* ---- плитка (темна картка) і рядки ------------------------------------------- */
.app .tile { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(20px, 2.6vw, 26px); }
.app .tile--raised { background: var(--s2); }
.app .tile__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.app .tile__title { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.015em; }
.app .rows { display: flex; flex-direction: column; }
.app .row { display: flex; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.app .row:first-child { border-top: 0; padding-top: 0; }
.app .row:last-child { padding-bottom: 0; }
.app .row__label { width: 170px; flex: none; color: var(--fg-3); font-size: 0.875rem; font-weight: 500; }
.app .row__value { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 0.9375rem; font-weight: 500; word-break: break-word; }
@media (max-width: 720px) {
  .app .row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .app .row__label { width: 100%; }
}

/* ---- папір (світла картка) ----------------------------------------------------- */
.app .paper { background: var(--card); color: var(--ink); border-radius: var(--r-lg); padding: 24px 24px 20px; }
.app .paper__title { display: flex; align-items: baseline; gap: 8px; width: 100%; padding-bottom: 12px; margin: 0; border-bottom: 1px solid var(--ink-line); font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-align: left; }
.app .paper__count { margin-left: auto; font-family: var(--font-text); font-weight: 500; font-size: 0.875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.app .paper__count:empty { display: none; }

/* ---- стани й бейджі (монохром) ---------------------------------------------------- */
.app .status { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.app .status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fg); flex: none; }
.app .status--off { color: var(--fg-2); }
.app .status--off::before { background: transparent; border: 1.5px solid var(--fg-3); }
.app .status--warn::before { content: "!"; width: 16px; height: 16px; background: var(--fg); color: var(--bg); font-size: 11px; font-weight: 700; line-height: 1; display: grid; place-items: center; }
.app .badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 600; background: rgba(245, 245, 245, 0.1); color: var(--fg); white-space: nowrap; }
.app .badge--outline { background: transparent; border: 1px solid var(--line-2); color: var(--fg-2); }
.app .badge--dashed { background: transparent; border: 1px dashed var(--line-3); color: var(--fg-2); }
.app .note { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--s2); }
.app .note > i { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); font-size: 1rem; }
.app .note__title { font-weight: 600; font-size: 0.9375rem; }
.app .note__text { margin-top: 4px; color: var(--fg-2); font-size: 0.875rem; line-height: 1.5; }

/* ---- тост ---------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: var(--z-toast, 300);
  display: flex; align-items: center; gap: 12px; max-width: min(480px, calc(100vw - 32px));
  padding: 12px 12px 12px 18px; border-radius: var(--r-md, 16px);
  background: var(--card, #f5f5f5); color: var(--ink, #121212);
  font-family: var(--font-text); font-size: 0.9375rem; font-weight: 500; line-height: 1.4; text-align: left;
  box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transform: translate(-50%, 12px);
  transition: opacity var(--t-in, 220ms) var(--ease-out), transform var(--t-in, 220ms) var(--ease-out);
}
.toast.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast--top { bottom: auto; top: calc(var(--nav-h, 50px) + 14px); transform: translate(-50%, -12px); }
.toast--top.show { transform: translate(-50%, 0); }
.toast__icon { font-size: 1.15rem; flex: none; color: var(--ink-2); }
.toast__icon:empty:not([class*="fi-rr"]) { display: none; }
.toast__text { flex: 1; min-width: 0; }
.toast__close { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); font-size: 1.05rem; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.toast__close:hover { background: var(--ink-fill); color: var(--ink); }

/* ---- модальне вікно (папір) -----------------------------------------------------------
   Сторінки темні, а вікно — світлий аркуш, як і DoctrinaConfirm (.dlg): одна мова
   для всіх спливаючих поверхонь сайту. На телефоні — нижня шторка з ручкою.
   Хуки для JS: .mdl-overlay.open / .is-closing, [data-modal-close], [data-role]. */
.app .mdl-overlay {
  position: fixed; inset: 0; z-index: var(--z-backdrop); display: none; align-items: center; justify-content: center;
  padding: 20px; overflow: auto; overscroll-behavior: contain;
  background: rgba(8, 8, 8, 0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.app .mdl-overlay.open, .app .mdl-overlay.is-closing { display: flex; }
.app .mdl-overlay.open { animation: mdlFade var(--t-in) ease both; }
.app .mdl-overlay.is-closing { animation: mdlFadeOut var(--t-out) ease both; pointer-events: none; }
.app .mdl-card {
  position: relative; display: flex; flex-direction: column; width: 440px; max-width: 100%;
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  background: var(--card); color: var(--ink); border-radius: var(--r-xl); padding: 22px 24px 24px;
  box-shadow: var(--shadow-pop); text-align: left; outline: none;
}
.app .mdl-overlay.open .mdl-card { animation: mdlIn var(--t-in) var(--ease-out) both; }
.app .mdl-overlay.is-closing .mdl-card { animation: mdlOut var(--t-out) ease both; }
@keyframes mdlFade { from { opacity: 0; } }
@keyframes mdlFadeOut { to { opacity: 0; } }
@keyframes mdlIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } }
@keyframes mdlOut { to { opacity: 0; transform: scale(0.98) translateY(4px); } }
.app .mdl-head { display: flex; align-items: center; gap: 12px; flex: none; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--ink-line); }
.app .mdl-title { flex: 1; margin: 0; font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
.app .mdl-close { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ink-fill); color: var(--ink-2); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app .mdl-close:active { transform: scale(0.92); }
.app .mdl-close img { width: 18px; height: 18px; display: block; filter: none; opacity: 0.75; }
.app .mdl-close i { font-size: 1.15rem; }
@media (hover: hover) and (pointer: fine) { .app .mdl-close:hover { background: var(--ink-fill-2); color: var(--ink); } .app .mdl-close:hover img { opacity: 1; } }
.app .mdl-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; margin: -2px; padding: 2px; scrollbar-width: thin; scrollbar-color: var(--ink-line-2) transparent; }
.app .mdl-body::-webkit-scrollbar { width: 6px; }
.app .mdl-body::-webkit-scrollbar-thumb { background: var(--ink-line-2); border-radius: 3px; }
.app .mdl-sub { margin: -6px 0 18px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.app .mdl-group { margin-bottom: 18px; }
.app .mdl-group:last-child { margin-bottom: 0; }
.app .mdl-label { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); }
.app .mdl-note { color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; }
.app .mdl-actions { position: sticky; bottom: -2px; z-index: 1; display: flex; gap: 10px; margin: 20px -2px -2px; padding: 14px 2px 2px; background: var(--card); }
.app .mdl-actions::before { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; pointer-events: none; background: linear-gradient(to top, var(--card), rgba(245, 245, 245, 0)); }
.app .mdl-btn {
  display: flex; flex: 1 1 0; min-width: 0; align-items: center; justify-content: center; min-height: 50px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid transparent; font-family: var(--font-text); font-weight: 600; font-size: 1rem; line-height: 1.15;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, border-color var(--t-hover) ease, color var(--t-hover) ease;
}
.app .mdl-btn:active { transform: scale(0.97); }
.app .mdl-btn-main { background: var(--ink); color: var(--card); }
.app .mdl-btn-alt { background: transparent; border-color: var(--ink-line-2); color: var(--ink); }
.app .mdl-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .app .mdl-btn-main:hover { background: #000; }
  .app .mdl-btn-alt:hover { background: var(--ink-fill); border-color: var(--ink-2); }
}
/* список варіантів (вісь «Напрям», 3…25 рядків) */
.app .opt-list { position: relative; display: flex; flex-direction: column; gap: 2px; max-height: 268px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; background: var(--ink-fill); border: 1px solid var(--ink-line); border-radius: var(--r-md); scrollbar-width: thin; scrollbar-color: var(--ink-line-2) transparent; }
.app .opt-list::-webkit-scrollbar { width: 6px; }
.app .opt-list::-webkit-scrollbar-thumb { background: var(--ink-line-2); border-radius: 3px; }
.app .opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 9px 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font: inherit; font-size: 0.9375rem; font-weight: 500; text-align: left; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app .opt-name { flex: 1; line-height: 1.3; }
.app .opt-count { flex: none; font-size: 0.875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.app .opt:not(:disabled):active { transform: scale(0.985); }
.app .opt.active { background: var(--ink); color: var(--card); font-weight: 600; }
.app .opt.active .opt-count { color: rgba(245, 245, 245, 0.6); }
.app .opt-off, .app .opt:disabled { opacity: 0.35; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .app .opt:not(:disabled):not(.active):hover { background: var(--ink-fill-2); color: var(--ink); } }
/* статистика (3 колонки), незавершена спроба, історія, порожній стан */
.app .mdl-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center; margin-bottom: 16px; padding: 16px 4px; background: var(--ink-fill); border: 1px solid var(--ink-line); border-radius: var(--r-md); }
.app .mdl-stat { text-align: center; padding: 0 6px; }
.app .mdl-stat + .mdl-stat { border-left: 1px solid var(--ink-line); }
.app .mdl-stat b { display: block; font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.app .mdl-stat b i { font-style: normal; font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.app .mdl-stat span { display: block; margin-top: 5px; font-size: 0.8125rem; color: var(--ink-3); }
.app .mdl-resume { margin-bottom: 16px; padding: 14px; background: var(--ink-fill); border: 1px solid var(--ink-line); border-radius: var(--r-md); }
.app .mdl-resume-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.app .mdl-resume-top strong { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.app .mdl-resume-top b { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.app .mdl-bar { height: 5px; border-radius: 3px; background: var(--ink-line); overflow: hidden; }
.app .mdl-bar i { display: block; height: 100%; min-width: 3px; border-radius: 3px; background: var(--ink); }
.app .mdl-resume-sub { margin-top: 9px; font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.app .mdl-list { background: var(--ink-fill); border: 1px solid var(--ink-line); border-radius: var(--r-md); }
.app .mdl-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; }
.app .mdl-item + .mdl-item { border-top: 1px solid var(--ink-line); }
.app .mdl-item-main b { display: block; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.app .mdl-item-main span { display: block; margin-top: 3px; font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.app .mdl-score { flex: none; min-width: 54px; padding: 5px 10px; border-radius: var(--r-pill); background: var(--ink-fill-2); color: var(--ink); font-size: 0.8125rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.app .mdl-empty { padding: 16px; border: 1px dashed var(--ink-line-2); border-radius: var(--r-md); color: var(--ink-2); font-size: 0.875rem; line-height: 1.5; }
.app .mdl-empty b { display: block; margin-bottom: 3px; color: var(--ink); font-size: 0.9375rem; }
/* телефон: нижня шторка */
@media (max-width: 600px) {
  .app .mdl-overlay { padding: 0; }
  .app .mdl-overlay.open, .app .mdl-overlay.is-closing { align-items: flex-end; }
  .app .mdl-card { width: 100%; max-height: 90vh; max-height: 90dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); }
  .app .mdl-card::before { content: ""; flex: none; width: 36px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--ink-line-2); }
  .app .mdl-overlay.open .mdl-card { animation: mdlSheetIn var(--t-sheet) var(--ease-sheet) both; }
  .app .mdl-overlay.is-closing .mdl-card { animation: mdlSheetOut 220ms ease-in both; }
  .app .opt-list { max-height: 46vh; }
}
@keyframes mdlSheetIn { from { transform: translateY(100%); } }
@keyframes mdlSheetOut { to { transform: translateY(100%); } }

/* ---- тема спільного діалогу DoctrinaConfirm (.dlg із new-look.css) ------------------- */
.app .dlg { font-family: var(--font-text); }
.app .dlg-card { border-radius: var(--r-xl); padding: 24px 24px 22px; box-shadow: var(--shadow-pop); }
.app .dlg-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.app .dlg-text { font-size: 0.9375rem; color: var(--ink-2); }
.app .dlg-btn { min-height: 48px; font-size: 0.9375rem; font-weight: 600; border-color: var(--ink-line-2); }
.app .dlg-btn--primary { background: var(--ink); color: var(--card); border-color: transparent; }

/* ---- скелети й поява ------------------------------------------------------------------ */
.app .skel, .app .sk-line, .app .sector-skeleton .span, .app .mdl-skel, .app .fd-skeleton {
  display: block; border-radius: var(--r-xs); background: linear-gradient(90deg, var(--ink-fill) 25%, var(--ink-fill-2) 37%, var(--ink-fill) 63%);
  background-size: 400% 100%; animation: appSkeleton 1.4s ease infinite; pointer-events: none;
}
.app .tile .skel, .app .skel--dark { background: linear-gradient(90deg, rgba(245, 245, 245, 0.06) 25%, rgba(245, 245, 245, 0.12) 37%, rgba(245, 245, 245, 0.06) 63%); background-size: 400% 100%; }
@keyframes appSkeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.app .reveal { animation: appReveal 600ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes appReveal { from { opacity: 0; transform: translateY(10px); } }

/* ==========================================================================
   МОДУЛЬ /step — лендінг буклетів. Розмітку й класи малює step/landing_view.php
   + JS сторінки; тут лише вигляд. Картки лишаються паперовими (рішення
   користувача: дизайн подобається), вікна — теж папір, як уся система.
   ========================================================================== */
.app .step-main { padding-top: calc(var(--nav-h) + 26px); }
.app #adminLinkSlot { text-align: center; min-height: 18px; margin-bottom: 4px; }
.app #adminLinkSlot a span { display: block; width: fit-content; margin: 0 auto; color: var(--fg-3); font-size: 0.75rem; }
.app .subjName { display: flex; justify-content: center; align-items: center; padding: 0 16px; }
.app .exam-title { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.375rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-align: center; }

/* ряд дій над іспитом */
.app .learn-pill { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px; padding: 0 12px; }
.app .learn-pill a {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px 0 15px; border-radius: var(--r-pill);
  background: var(--fill); border: 1px solid var(--line-2); color: var(--fg); font-size: 0.9375rem; font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, border-color var(--t-hover) ease, opacity var(--t-hover) ease;
}
.app .learn-pill a span { display: inline-flex; align-items: center; gap: 9px; }
.app .learn-pill img { width: 16px; height: 16px; filter: invert(1); opacity: 0.85; }
.app .learn-pill a:active { transform: scale(0.97); }
.app .learn-pill a.pill-dim { opacity: 0.55; }
@media (hover: hover) and (pointer: fine) {
  .app .learn-pill a:hover { background: var(--fill-2); border-color: var(--line-3); transform: translateY(-1px); }
  .app .learn-pill a.pill-dim:hover { opacity: 0.8; }
}
@media (max-width: 600px) { .app .learn-pill { gap: 8px; } .app .learn-pill a { height: 42px; padding: 0 15px 0 13px; font-size: 0.875rem; } }

/* смуга «це ваш іспит?» */
.app .exam-setup { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 800px; margin: 14px auto 0; padding: 16px 20px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--fg); text-align: left; animation: appReveal var(--t-in) var(--ease-out); }
.app .exam-setup[hidden] { display: none; }
.app .exam-setup-text { flex: 1 1 320px; min-width: 0; }
.app .exam-setup-title { display: block; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.app .exam-setup-sub { display: block; margin-top: 4px; color: var(--fg-2); font-size: 0.875rem; line-height: 1.45; }
.app .exam-setup-sub b { color: var(--fg); font-weight: 600; }
.app .exam-setup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.app .es-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--fill); color: var(--fg); font-family: inherit; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, border-color var(--t-hover) ease; }
.app .es-btn-main { background: var(--fg); color: var(--bg); border-color: transparent; }
.app .es-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .app .es-btn:hover { background: var(--fill-2); border-color: var(--line-3); } .app .es-btn-main:hover { background: #fff; } }
@media (max-width: 560px) { .app .exam-setup { margin-left: 12px; margin-right: 12px; } .app .exam-setup-actions, .app .es-btn { width: 100%; } }

/* картки буклетів / спеціальностей / тем */
.app .cellulum-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 16px; padding: 0 16px; }
.app .cellulum { position: relative; display: inline-flex; flex-direction: column; gap: 14px; width: fit-content; max-width: 380px; background: var(--card); color: var(--ink); border-radius: var(--r-lg); padding: 24px 24px 20px; text-align: left; }
.app .cellulum[hidden] { display: none; }
.app .ts-card { width: 320px; max-width: 100%; align-items: stretch; }
.app .cellulum-title { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 0 0 12px; margin: 0; border-bottom: 1px solid var(--ink-line); font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); }
.app .cellulum-count { margin-left: auto; font-family: var(--font-text); font-weight: 500; font-size: 0.875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.app .cellulum-count:empty { display: none; }
.app #content[data-pane] { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; font-size: 100%; }
.app .sector { display: flex; align-items: center; justify-content: center; width: auto; height: auto; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: transparent; font: inherit; color: var(--ink); cursor: pointer; -webkit-user-select: none; user-select: none; text-decoration: none; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app .sector:active { transform: scale(0.97); }
.app .sector-skeleton:active { transform: none; }
@media (hover: hover) and (pointer: fine) { .app .sector:hover { background: var(--ink-fill-2); } }
.app .span { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.app .span-ai { display: flex; align-items: center; gap: 6px; }
.app .span-ai-icon { display: block; width: 14px; height: 14px; flex: none; background: url(https://doctrina.space/assets/Google_Gemini_icon_2025_black.png) center / contain no-repeat; }
.app .ts-list-wrap { position: relative; }
.app .ts-list-wrap::after { content: ""; position: absolute; left: 0; right: 8px; bottom: 0; height: 28px; pointer-events: none; background: linear-gradient(to bottom, rgba(245, 245, 245, 0), var(--card)); opacity: 0; transition: opacity var(--t-hover) ease; }
.app .ts-list-wrap[data-more="1"]::after { opacity: 1; }
.app .ts-list { position: relative; max-height: 300px; overflow: auto; overscroll-behavior: contain; text-align: left; scrollbar-width: thin; scrollbar-color: var(--ink-line-2) transparent; }
.app .ts-list::-webkit-scrollbar { width: 6px; }
.app .ts-list::-webkit-scrollbar-thumb { background: var(--ink-line-2); border-radius: 3px; }
.app .ts-row { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font: inherit; font-size: 0.9375rem; font-weight: 600; text-align: left; cursor: pointer; -webkit-user-select: none; user-select: none; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app .ts-row:active { transform: scale(0.99); }
.app .ts-row-skeleton:active { transform: none; }
@media (hover: hover) and (pointer: fine) { .app .ts-row:hover { background: var(--ink-fill-2); } }
.app .ts-row-name { flex: 1; line-height: 1.3; }
.app .ts-row-count { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.app .ts-empty { padding: 8px 12px; color: var(--ink-3); font-size: 0.9375rem; }
.app .ts-retry { margin-left: 8px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.app .sector-skeleton .span { width: 62px; height: 14px; border-radius: 7px; }
.app .sk-line { width: 100%; height: 14px; border-radius: 7px; }
.app .fd-skeleton { height: 34px; margin: 6px 0; }
@media (max-width: 1000px) { .app .cellulum { max-width: 400px; } }
@media (max-width: 480px) { .app .cellulum-row { padding: 0 12px; } .app .cellulum { width: 100%; padding: 20px 18px 16px; } .app .ts-card { width: 100%; } }

/* майстер вибору іспиту (у вікні) */
.app .xw-intro { margin: 0 0 16px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }
.app .xw-num { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--card); font-size: 0.6875rem; font-weight: 700; line-height: 1; }
.app .xw-preview { margin: 18px 0 0; padding: 14px 16px; border: 1px solid var(--ink-line); border-radius: var(--r-md); background: var(--ink-fill); font-size: 0.9375rem; line-height: 1.4; }
.app .xw-preview b { display: block; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.app .xw-preview span { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* папки у вікні (розмітка fd-* з folders.css, на папері) */
.app #foldersModal .folders-dropdown { position: static; display: block; background: none; border: 0; box-shadow: none; min-width: 0; margin: 0; padding: 0; animation: none; text-align: left; }
.app #foldersModal .fd-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 9px 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font-family: inherit; font-size: 0.9375rem; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; position: relative; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app #foldersModal .fd-link:active { transform: scale(0.99); }
.app #foldersModal .fd-link img { width: 16px; height: 16px; flex: none; filter: none; opacity: 0.7; transition: opacity var(--t-hover) ease; }
.app #foldersModal .fd-link.fd-dim { opacity: 0.55; }
.app #foldersModal .fd-link.fd-empty { opacity: 0.6; }
@media (hover: hover) and (pointer: fine) { .app #foldersModal .fd-link:hover { background: var(--ink-fill-2); } .app #foldersModal .fd-link:hover img { opacity: 1; } }
.app #foldersModal .fd-separator { height: 1px; margin: 6px 0; background: var(--ink-line); }
.app #foldersModal .fd-folder-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app #foldersModal .fd-right { margin-left: auto; display: grid; align-items: center; justify-items: end; }
.app #foldersModal .fd-right > * { grid-area: 1 / 1; transition: opacity var(--t-hover) ease; }
.app #foldersModal .fd-count { display: flex; align-items: center; justify-content: flex-end; font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.app #foldersModal .fd-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; opacity: 0; pointer-events: none; }
.app #foldersModal .fd-link:hover .fd-actions { opacity: 1; pointer-events: auto; }
.app #foldersModal .fd-link:hover .fd-count { opacity: 0; }
.app #foldersModal .fd-action-btn { width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--r-xs); background: var(--ink-fill-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color var(--t-hover) ease; }
.app #foldersModal .fd-action-btn:hover { background: var(--ink-line-2); }
.app #foldersModal .fd-action-btn img { width: 14px; height: 14px; filter: none; opacity: 0.8; }
.app #foldersModal .fd-create-form { display: none; padding: 8px 4px 4px; }
.app #foldersModal .fd-create-form.open { display: block; }
.app #foldersModal .fd-create-input, .app #foldersModal .fd-rename-input { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--ink-line-2); background: var(--ink-fill); color: var(--ink); font-family: inherit; font-size: 0.9375rem; outline: none; box-sizing: border-box; }
.app #foldersModal .fd-create-input { margin-bottom: 10px; }
.app #foldersModal .fd-rename-input { height: 34px; width: 140px; padding: 0 10px; }
.app #foldersModal .fd-create-input:focus, .app #foldersModal .fd-rename-input:focus { border-color: var(--ink); background: #fff; }
.app #foldersModal .fd-icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 10px; }
.app #foldersModal .fd-icon-opt { width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid transparent; background: var(--ink-fill); transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease; }
.app #foldersModal .fd-icon-opt:hover { background: var(--ink-fill-2); }
.app #foldersModal .fd-icon-opt.selected { background: var(--ink); border-color: var(--ink); }
.app #foldersModal .fd-icon-opt img { width: 16px; height: 16px; filter: none; opacity: 0.75; }
.app #foldersModal .fd-icon-opt.selected img { filter: invert(1); opacity: 1; }
.app #foldersModal .fd-create-submit { width: 100%; min-height: 46px; border: 0; border-radius: var(--r-pill); background: var(--ink); color: var(--card); font-family: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; transition: opacity var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app #foldersModal .fd-create-submit:active { transform: scale(0.97); }
.app #foldersModal .fd-create-submit:disabled { opacity: 0.4; }
.app #foldersModal .fd-error { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--ink-line-2); border-radius: var(--r-sm); background: var(--ink-fill); color: var(--ink); font-size: 0.875rem; font-weight: 600; }
.app #foldersModal .fd-confirm { display: flex; align-items: center; gap: 10px; margin: 2px 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ink-fill); border: 1px solid var(--ink-line-2); animation: appReveal var(--t-out) var(--ease-out); }
.app #foldersModal .fd-confirm-text { flex: 1 1 auto; min-width: 0; font-size: 0.875rem; line-height: 1.35; color: var(--ink-2); }
.app #foldersModal .fd-confirm-text strong { color: var(--ink); font-weight: 600; }
.app #foldersModal .fd-confirm-sub { display: block; font-size: 0.8125rem; color: var(--ink-3); }
.app #foldersModal .fd-confirm-actions { display: flex; gap: 6px; flex: none; }
.app #foldersModal .fd-confirm-btn { height: 34px; padding: 0 12px; border: 1px solid var(--ink-line-2); border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font-family: inherit; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.app #foldersModal .fd-confirm-btn:hover { background: var(--ink-fill-2); color: var(--ink); }
.app #foldersModal .fd-confirm-btn--go, .app #foldersModal .fd-confirm-btn--go:hover { background: var(--ink); border-color: var(--ink); color: var(--card); }
.app #foldersModal .fd-confirm-btn:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 430px) { .app #foldersModal .fd-confirm { flex-wrap: wrap; } .app #foldersModal .fd-confirm-actions { width: 100%; justify-content: flex-end; } }
@media (hover: none) {
  .app #foldersModal .fd-right { grid-auto-flow: column; gap: 10px; }
  .app #foldersModal .fd-right > * { grid-area: auto; }
  .app #foldersModal .fd-actions, .app #foldersModal .fd-link:hover .fd-actions { opacity: 1; pointer-events: auto; }
  .app #foldersModal .fd-link:hover .fd-count { opacity: 1; }
  .app #foldersModal .fd-action-btn { width: 34px; height: 34px; }
}

/* ==========================================================================
   МОДУЛЬ /account — плитки на полотні, папір лише у вікні підписки.
   Хуки JS: .tabs/.tab/.active/.tab-indicator, .panel, .info-row/.edit-mode,
   .acc-inp, .acc-uni-*, .plan-tile/.selected, .seg-opt/.active, .savedpick,
   .card-row/.selectable/.selected, .card-link, .msg-line, .dev-revoke.
   ========================================================================== */
.app .acc { display: flex; flex-direction: column; gap: 18px; }
.app .acc__name { text-align: center; overflow-wrap: anywhere; }
.app .acc__nav { display: flex; justify-content: center; align-items: center; gap: 10px; }
.app .panel { display: none; }
.app .panel.active { display: flex; flex-direction: column; gap: 18px; animation: appReveal 420ms var(--ease-out) both; }
.app .acc-inp { display: none; width: 100%; height: 44px; border-radius: var(--r-sm); }
.app .edit-mode .row__value { display: none; }
.app .edit-mode .acc-inp { display: block; }
.app .acc-flag { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); flex: none; }
.app .acc-empty { color: var(--fg-3); }
.app .acc-uni-wrap { position: relative; flex: 1; display: none; }
.app .edit-mode .acc-uni-wrap { display: block; }
.app .acc-uni-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: var(--z-dropdown); max-height: 220px; overflow-y: auto; padding: 6px; background: var(--s3); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-pop); transform-origin: top center; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); transition: opacity var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out), visibility 0s linear var(--t-in); }
.app .acc-uni-list.open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out); }
.app .acc-uni-opt { padding: 10px 12px; border-radius: var(--r-xs); color: var(--fg-2); font-size: 0.875rem; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.app .acc-uni-opt:hover { background: var(--fill-2); color: var(--fg); }
.app .acc-logout { display: flex; justify-content: center; margin-top: 6px; }
.app .acc-logout .cta { min-width: 240px; }
/* транзакції */
.app .tx-wrap { overflow-x: auto; margin: 0 -4px; }
.app .tx-table { width: 100%; border-collapse: collapse; }
.app .tx-table th { padding: 0 8px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.8125rem; font-weight: 600; color: var(--fg-3); white-space: nowrap; }
.app .tx-table td { padding: 13px 8px; border-bottom: 1px solid var(--line); font-size: 0.9375rem; white-space: nowrap; }
.app .tx-table tr:last-child td { border-bottom: 0; }
.app .tx-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.app .acc-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; color: var(--fg-2); background: var(--fill); }
.app .acc-badge--ok { color: var(--fg); background: rgba(245, 245, 245, 0.12); }
.app .acc-badge--fail { color: var(--fg-2); background: transparent; border: 1px solid var(--line-2); }
.app .acc-badge--refund { color: var(--fg-2); background: transparent; border: 1px dashed var(--line-3); }
.app .acc-badge--wait { color: var(--fg-2); background: var(--fill); }
/* пристрої */
.app .dev-list { display: flex; flex-direction: column; gap: 12px; }
.app .dev-card { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--s2); }
.app .dev-card.current { border-color: var(--line-3); }
.app .dev-ico { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--s3); }
.app .dev-ico img { width: 20px; filter: invert(1) opacity(0.75); }
.app .dev-info { flex: 1; min-width: 0; }
.app .dev-name { font-size: 0.9375rem; font-weight: 600; }
.app .dev-meta { margin-top: 3px; font-size: 0.8125rem; color: var(--fg-3); }
.app .dev-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.app .dev-cur { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(245, 245, 245, 0.12); color: var(--fg); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.app .dev-revoke { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: transparent; color: var(--fg-2); font-family: inherit; font-size: 0.875rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease, border-color var(--t-hover) ease; }
.app .dev-revoke:hover { color: var(--fg); background: var(--fill); border-color: var(--line-3); }
.app .dev-revoke:active:not(:disabled) { transform: scale(0.96); }
.app .dev-revoke:disabled { opacity: 0.5; cursor: default; }
/* збережені картки (у плитці та у вікні) */
.app .cards-list { display: flex; flex-direction: column; gap: 10px; }
.app .card-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--s2); transition: border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app .card-row.selectable { cursor: pointer; }
.app .card-row.selectable:active { transform: scale(0.99); }
.app .card-row.selected { border-color: var(--fg); }
.app .card-chip { width: 44px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--s3); color: var(--fg); font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.5px; }
.app .card-main { flex: 1; min-width: 0; }
.app .card-mask { font-family: var(--font-mono); font-size: 0.9375rem; letter-spacing: 1px; }
.app .card-sub { margin-top: 2px; font-size: 0.8125rem; color: var(--fg-3); }
.app .card-active-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(245, 245, 245, 0.12); color: var(--fg); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.app .card-acts { display: flex; align-items: center; gap: 10px; }
.app .card-link { height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: transparent; color: var(--fg-2); font-family: inherit; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease, border-color var(--t-hover) ease; }
.app .card-link:hover { color: var(--fg); background: var(--fill); border-color: var(--line-3); }
.app .card-link:active { transform: scale(0.96); }
.app .cards-empty { padding: 6px 0; color: var(--fg-3); font-size: 0.875rem; }
.app .card-skel { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.app .card-skel .skel-chip { width: 44px; height: 28px; flex: none; }
.app .card-skel .skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.app .card-skel .skel-line-1 { width: 55%; height: 13px; }
.app .card-skel .skel-line-2 { width: 32%; height: 10px; }
.app .msg-line { margin-top: 12px; font-size: 0.875rem; color: var(--fg-2); }
.app .msg-line:empty { margin-top: 0; }
.app .msg-line.ok { color: var(--fg); font-weight: 600; }
@media (max-width: 560px) {
  .app .card-row, .app .dev-card { flex-wrap: wrap; row-gap: 12px; }
  .app .card-acts { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
  .app .card-acts .card-link { width: 100%; text-align: center; }
  .app .card-active-pill { justify-self: start; }
  .app .dev-actions { flex-basis: 100%; justify-content: flex-end; }
  .app .dev-revoke { flex: 0 0 auto; min-width: 150px; }
}
/* вікно підписки (папір): план, спосіб оплати, що входить */
.app .prem-sub { margin: -4px 0 18px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.app .prem-label { margin: 0 0 10px; font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); }
.app .prem-incl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 22px; padding: 0; list-style: none; }
.app .prem-incl li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.875rem; font-weight: 500; line-height: 1.35; color: var(--ink); }
.app .prem-incl li i { flex: none; width: 20px; height: 20px; margin-top: -1px; border-radius: 50%; background: var(--ink-fill-2); display: grid; place-items: center; font-size: 0.625rem; color: var(--ink); }
.app .prem-rule { height: 1px; margin: 0 0 20px; background: var(--ink-line); }
.app .plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.app .plan-tile { position: relative; display: block; padding: 16px; border: 1px solid var(--ink-line-2); border-radius: var(--r-md); background: transparent; cursor: pointer; transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app .plan-tile:active { transform: scale(0.99); }
.app .plan-tile:hover { border-color: var(--ink-2); }
.app .plan-tile input { position: absolute; opacity: 0; pointer-events: none; }
.app .plan-tile.selected { border-color: var(--ink); background: var(--ink-fill); box-shadow: inset 0 0 0 1px var(--ink); }
.app .plan-name { margin-bottom: 6px; font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.app .plan-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.app .plan-per { margin-top: 3px; font-size: 0.8125rem; color: var(--ink-3); }
.app .plan-save { position: absolute; top: 12px; right: 12px; height: 22px; padding: 0 8px; border: 1px solid var(--ink-line-2); border-radius: var(--r-pill); display: inline-flex; align-items: center; font-size: 0.6875rem; font-weight: 700; color: var(--ink-2); }
.app .seg { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: var(--r-pill); background: var(--ink-fill-2); }
.app .seg-opt { flex: 1; height: 38px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font-family: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.app .seg-opt:active { transform: scale(0.97); }
.app .seg-opt.active { background: var(--ink); color: var(--card); }
.app .savedpick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.app .savedpick.hidden { display: none; }
.app .mdl-card .card-row { background: transparent; border-color: var(--ink-line-2); }
.app .mdl-card .card-row.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.app .mdl-card .card-chip { background: var(--ink); color: var(--card); }
.app .mdl-card .card-sub { color: var(--ink-3); }
.app .mdl-card .card-active-pill { background: var(--ink); color: var(--card); }
.app .mdl-card .cards-empty { color: var(--ink-3); }
.app .mdl-card .msg-line { color: var(--ink-2); }
.app .mdl-card .msg-line.ok { color: var(--ink); }
.app .prem-terms { margin-top: 16px; font-size: 0.75rem; line-height: 1.5; text-align: center; color: var(--ink-3); }
.app .prem-terms a { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 380px) { .app .prem-incl { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .app .acc__nav .tabs { flex: 1; } .app .acc__nav .tab { flex: 1; padding: 0 10px; font-size: 0.875rem; } }

/* ==========================================================================
   МОДУЛЬ auth — /login, /signup, /reset, /feedback: полотно без картки,
   серце-знак, заголовок Fixel Display, темні поля, біла пігулка дії.
   ========================================================================== */
.app .auth { width: min(420px, 100% - 2 * var(--gutter)); margin-inline: auto; padding-top: clamp(12px, 5vh, 48px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.app .auth--wide { width: min(560px, 100% - 2 * var(--gutter)); }
.app .auth__heart { width: 58px; height: auto; margin-bottom: 22px; filter: drop-shadow(0 0 26px rgba(245, 245, 245, 0.2)); }
.app .auth__title { font-size: clamp(1.875rem, 4vw, 2.375rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.app .auth__sub { margin-top: 10px; max-width: 36ch; color: var(--fg-2); font-size: 1rem; line-height: 1.5; text-wrap: pretty; }
.app .auth__form { width: 100%; margin-top: 28px; text-align: left; }
.app .auth__between { display: flex; justify-content: flex-end; margin-top: -6px; }
.app .auth__link { color: var(--fg-2); font-size: 0.875rem; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; transition: color var(--t-hover) ease; }
.app .auth__link:hover { color: var(--fg); }
.app .auth__alt { margin-top: 24px; color: var(--fg-3); font-size: 0.9375rem; }
.app .auth__alt a { color: var(--fg); font-weight: 600; }
.app .auth__done { width: 100%; margin-top: 28px; text-align: center; }
.app .auth__done .btn-group { margin-top: 18px; }
.app .auth__msg { width: 100%; margin-top: 24px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--s1); color: var(--fg); font-size: 0.9375rem; line-height: 1.5; text-align: left; }
.app .auth__group { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.app .auth__group-title { font-size: 0.9375rem; font-weight: 600; }
/* контакти на сторінці відгуку */
.app .contacts { width: 100%; margin-top: 34px; text-align: left; }
.app .contacts__title { margin-bottom: 4px; font-size: 1.125rem; }
.app .contact { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); color: inherit; }
.app .contact:first-of-type { border-top: 0; }
.app .contact i { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); border: 1px solid var(--line); font-size: 1.05rem; color: var(--fg-2); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.app .contact__txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app .contact__label { font-size: 0.8125rem; color: var(--fg-3); }
.app .contact__value { font-size: 0.9375rem; font-weight: 600; overflow-wrap: anywhere; }
.app .contact__arrow { margin-left: auto; color: var(--fg-3); font-size: 1rem; transition: transform var(--t-hover) var(--ease-out), color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .app a.contact:hover i { background: var(--fill-2); color: var(--fg); }
  .app a.contact:hover .contact__arrow { color: var(--fg); transform: translateX(3px); }
}

/* ---- зменшений рух: та сама сторінка без руху ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .app .reveal, .app .panel.active, .app .exam-setup { animation: none; }
  .app .mdl-overlay.open, .app .mdl-overlay.open .mdl-card, .app .mdl-overlay.is-closing, .app .mdl-overlay.is-closing .mdl-card { animation: none; }
  .app .mdl-overlay.is-closing { display: none; }
  .app .skel, .app .sk-line, .app .sector-skeleton .span, .app .mdl-skel, .app .fd-skeleton { animation: none; }
  .app .cta, .app .tab, .app .tab-indicator, .app .learn-pill a, .app .sector, .app .ts-row, .app .opt, .app .mdl-btn, .app .acc-uni-list, .toast { transition: none; }
}

/* ==========================================================================
   Режим «lite» — сторінки зі своїм великим CSS (stats, ai_testing, лекції,
   результат оплати, хвороби): беруть полотно, Fixel і токени, але БЕЗ скидань
   (їхні власні компоненти лишаються як є). Розмітку в <main> обгортати не треба.
   ========================================================================== */
html.app-page body.app-lite { background: var(--bg); color: var(--fg); font-family: var(--font-text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.app-lite :is(h1, h2, h3, h4) { font-family: var(--font-display); letter-spacing: -0.02em; }
.app-lite :is(input, textarea, select, button) { font-family: inherit; }

/* ==========================================================================
   Стаття (угода, політика, матеріали): вузька колонка прози на полотні.
   ========================================================================== */
.app .article { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.app .article__head { margin-bottom: clamp(22px, 3vw, 32px); }
.app .article__meta { margin-top: 10px; color: var(--fg-3); font-size: 0.9375rem; }
.app .prose { font-size: 1.0625rem; line-height: 1.65; color: var(--fg-2); text-wrap: pretty; }
.app .prose :is(h2, h3, h4) { color: var(--fg); margin: 34px 0 12px; line-height: 1.2; }
.app .prose h2 { font-size: clamp(1.375rem, 2vw, 1.625rem); }
.app .prose h3 { font-size: 1.1875rem; }
.app .prose h4 { font-size: 1.0625rem; font-family: var(--font-text); font-weight: 600; letter-spacing: 0; }
.app .prose > :first-child { margin-top: 0; }
.app .prose p { margin: 0 0 16px; }
.app .prose :is(ul, ol) { margin: 0 0 16px; padding-left: 24px; list-style: disc; }
.app .prose ol { list-style: decimal; }
.app .prose li { margin: 6px 0; }
.app .prose li::marker { color: var(--fg-3); }
.app .prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.app .prose a:hover { text-decoration-color: var(--fg); }
.app .prose strong, .app .prose b { color: var(--fg); font-weight: 600; }
.app .prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.app .prose blockquote { margin: 0 0 16px; padding: 4px 0 4px 18px; border-left: 2px solid var(--line-2); color: var(--fg-2); }
.app .prose code { font-family: var(--font-mono); font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: var(--fill); }
.app .prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 0.9375rem; }
.app .prose th, .app .prose td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.app .prose th { color: var(--fg); font-weight: 600; }
.app .prose img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.app .prose-wrap { overflow-x: auto; }
/* legal_render_html() друкує власний заголовок — на сторінці він уже в <h1> */
.app .prose .pageName { display: none; }

/* ==========================================================================
   Список посилань на полотні (предмети, курси, новини): рядок-плитка.
   ========================================================================== */
.app .linklist { display: flex; flex-direction: column; gap: 10px; }
.app .linkrow { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 12px 16px 12px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--s1); color: var(--fg); font-size: 1rem; font-weight: 600; text-decoration: none; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, border-color var(--t-hover) ease; }
.app .linkrow__num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font-family: var(--font-display); font-size: 0.9375rem; font-weight: 600; }
.app .linkrow__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app .linkrow__sub { color: var(--fg-3); font-size: 0.8125rem; font-weight: 500; }
.app .linkrow__go { flex: none; color: var(--fg-3); font-size: 1rem; transition: transform var(--t-hover) var(--ease-out), color var(--t-hover) ease; }
.app .linkrow:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .app .linkrow:hover { background: var(--s2); border-color: var(--line-2); }
  .app .linkrow:hover .linkrow__go { color: var(--fg); transform: translateX(3px); }
}
.app .linkgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .app .linkgrid { grid-template-columns: 1fr; } }
.app .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.app .chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--fill); color: var(--fg); font-size: 0.9375rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, border-color var(--t-hover) ease; }
.app .chip:active { transform: scale(0.97); }
.app .chip.is-active { background: var(--fg); color: var(--bg); border-color: transparent; }
@media (hover: hover) and (pointer: fine) { .app .chip:not(.is-active):hover { background: var(--fill-2); border-color: var(--line-3); } }
/* новини: дата + заголовок + текст у плитці */
.app .news-item { display: flex; flex-direction: column; gap: 10px; }
.app .news-item__date { color: var(--fg-3); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.app .news-item__title { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.app .news-item__title img { width: 22px; height: 22px; filter: invert(1); opacity: 0.85; }
.app .news-item__text { color: var(--fg-2); line-height: 1.6; }
.app .news-item__text p { margin: 10px 0 0; }
.app .news-item__text b { color: var(--fg); }
