/* Компоненты и экраны SkyID. Прототип: данные моковые, вёрстка боевая. */

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--corp); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------- Логотип ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--text); }
.logo__mark { width: 30px; height: 30px; flex: none; }
.logo--sm { font-size: 16px; }
.logo--sm .logo__mark { width: 24px; height: 24px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: var(--fs-body); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--brand); color: var(--text-inverse); }
.btn--primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn--primary:active:not(:disabled) { background: var(--brand-press); }
.btn--corp { background: var(--corp); color: var(--text-inverse); }
.btn--corp:hover:not(:disabled) { filter: brightness(.94); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover:not(:disabled) { background: var(--surface-alt); border-color: var(--text-disabled); }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }

/* ---------- Поля ---------- */
.field { display: block; margin-bottom: 16px; }
.field__label { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface); font-size: var(--fs-body); font-family: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: var(--lh-normal); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.input::placeholder { color: var(--text-disabled); }
.phone-row { display: flex; gap: 8px; }
.phone-row .phone-cc {
  width: 84px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface);
  font-weight: 500; flex: none;
}

/* ---------- Карточки ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.card--flat { box-shadow: none; }
.card--pad-lg { padding: 26px; }
.card__title { font-size: var(--fs-h3); font-weight: 650; margin-bottom: 4px; }
.card__sub { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- Бейджи ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; white-space: nowrap;
  border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .01em;
}
.badge--brand   { background: var(--brand-soft); color: var(--brand); }
.badge--success { background: var(--success-soft); color: #027A48; }
.badge--warning { background: var(--warning-soft); color: #B54708; }
.badge--danger  { background: var(--danger-soft); color: #B42318; }
.badge--info    { background: var(--info-soft); color: #175CD3; }
.badge--muted   { background: var(--tile-gray); color: var(--text-muted); }
.badge--accent  { background: var(--accent-soft); color: var(--accent); }

/* ---------- Каркас приложения ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: var(--surface);
  border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar__logo { padding: 4px 8px 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
  display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px;
  border-radius: var(--r-sm); color: var(--text-secondary); font-weight: 500; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left; font-size: var(--fs-body);
}
.nav__item:hover { background: var(--surface-alt); color: var(--text); }
.nav__item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav__item svg { flex: none; }
.nav__sep { height: 1px; background: var(--border); margin: 12px 8px; }
.sidebar__bottom { margin-top: auto; }

.plan-card { background: var(--brand-soft); border: 1px solid var(--brand-border); border-radius: var(--r-md); padding: 14px; }
.plan-card__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.plan-card__name { font-weight: 650; font-size: var(--fs-sm); color: var(--brand); }
.plan-card__count { font-size: var(--fs-xs); color: var(--text-secondary); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h); flex: none; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
}
.topbar__search { flex: 1; max-width: 420px; position: relative; }
.topbar__search .input { height: 38px; padding-left: 38px; background: var(--bg); border-color: transparent; }
.topbar__search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-disabled); }
.topbar__spacer { flex: 1; }
.userchip { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.userchip__name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.25; }
.userchip__role { font-size: var(--fs-xs); color: var(--text-muted); }
.avatar { width: 38px; height: 38px; border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.avatar--sm { width: 30px; height: 30px; font-size: var(--fs-xs); }
.avatar--lg { width: 72px; height: 72px; font-size: 24px; }

.page { padding: 28px; max-width: var(--page-max); width: 100%; }
.page__head { margin-bottom: 22px; display: flex; align-items: flex-start; gap: 16px; }
.page__title { font-size: var(--fs-h1); font-weight: 700; }
.page__sub { color: var(--text-muted); margin-top: 5px; }
.page__actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- Сетки ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2-1 { grid-template-columns: 1fr 1fr; }
.grid--main { grid-template-columns: 1.55fr 1fr; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }

/* ---------- Метрики ---------- */
.metric { display: flex; align-items: center; gap: 14px; }
.metric__icon { width: 46px; height: 46px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex: none; font-size: 20px; }
.metric__label { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 2px; }
.metric__value { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.metric__unit { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.metric__delta { font-size: var(--fs-sm); font-weight: 650; color: var(--success); margin-left: 6px; }

/* ---------- Прогресс ---------- */
.progress { height: 7px; background: var(--tile-gray); border-radius: var(--r-full); overflow: hidden; }
.progress__bar { height: 100%; background: var(--brand); border-radius: var(--r-full); transition: width .4s; }
.progress__bar--accent { background: var(--accent); }
.progress__bar--warning { background: var(--warning); }
.progress__bar--danger { background: var(--danger); }

/* ---------- Плитка кейса ---------- */
.case { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s, border-color .18s; }
.case:hover { box-shadow: var(--sh-md); transform: translateY(-2px); border-color: var(--border-strong); }
.case__cover { height: 108px; padding: 13px; display: flex; align-items: flex-start; justify-content: space-between; }
.case__tag { background: rgba(255,255,255,.72); color: var(--text-secondary); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--r-full); }
.case__emoji { font-size: 30px; line-height: 1; }
.case__body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.case__name { font-weight: 650; margin-bottom: 5px; }
.case__desc { font-size: var(--fs-sm); color: var(--text-muted); flex: 1; }
.case__foot { display: flex; align-items: center; gap: 10px; margin-top: 13px; font-size: var(--fs-xs); color: var(--text-muted); }
.case__lock { position: absolute; inset: 0; background: rgba(255,255,255,.72); display: flex; align-items: center; justify-content: center; }
.case-wrap { position: relative; }

/* ---------- Диалог тренировки ---------- */
.train { display: grid; grid-template-columns: 1fr 316px; gap: 20px; height: calc(100vh - var(--header-h)); padding: 20px 28px; }
.chat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 0; }
.chat__head { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.chat__who { font-weight: 650; }
.chat__meta { font-size: var(--fs-xs); color: var(--text-muted); }
.chat__timer { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text-secondary); }
.chat__body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 76%; display: flex; gap: 10px; }
.msg__bubble { padding: 11px 15px; border-radius: 14px; font-size: var(--fs-body); }
.msg--in .msg__bubble { background: var(--bg); border-bottom-left-radius: 4px; }
.msg--out { align-self: flex-end; flex-direction: row-reverse; }
.msg--out .msg__bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg--sys { align-self: center; max-width: 100%; }
.msg--sys .msg__bubble { background: var(--warning-soft); color: #B54708; font-size: var(--fs-sm); text-align: center; }
.chat__foot { padding: 14px 20px; border-top: 1px solid var(--border); }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer .textarea { min-height: 46px; max-height: 120px; }
.mic { width: 46px; height: 46px; border-radius: var(--r-full); border: 1px solid var(--border-strong); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; color: var(--text-secondary); }
.mic.is-rec { background: var(--danger); border-color: var(--danger); color: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(240,68,56,.5); } 50% { box-shadow: 0 0 0 9px rgba(240,68,56,0); } }

.livepanel { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.crit { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.crit__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--border-strong); }
.crit__dot.is-ok { background: var(--success); }
.crit__dot.is-miss { background: var(--danger); }
.crit__name { font-size: var(--fs-sm); flex: 1; }
.crit__val { font-size: var(--fs-sm); font-weight: 650; color: var(--text-secondary); }
.mood { height: 8px; border-radius: var(--r-full); background: linear-gradient(90deg, var(--danger) 0%, var(--warning) 50%, var(--success) 100%); position: relative; }
.mood__pin { position: absolute; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--text); transform: translateX(-50%); transition: left .5s; }

/* ---------- Разбор ---------- */
.score-ring { width: 132px; height: 132px; flex: none; }
.crit-row { display: grid; grid-template-columns: 1fr 92px 46px; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.crit-row:last-child { border-bottom: none; }
.quote { border-left: 3px solid var(--border-strong); padding: 3px 0 3px 13px; color: var(--text-secondary); font-size: var(--fs-sm); margin: 7px 0; }
.quote--bad { border-color: var(--danger); }
.quote--good { border-color: var(--success); }

/* ---------- Достижения ---------- */
.ach { text-align: center; }
.ach__medal { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--accent-soft); }
.ach--locked .ach__medal { background: var(--tile-gray); filter: grayscale(1); opacity: .55; }
.ach--locked .ach__name { color: var(--text-disabled); }
.ach__name { font-size: var(--fs-sm); font-weight: 650; }
.ach__meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

/* ---------- Тарифы ---------- */
.plan { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; background: var(--surface); display: flex; flex-direction: column; }
.plan.is-featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); position: relative; }
.plan__flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.plan__name { font-weight: 700; font-size: var(--fs-h3); }
.plan__price { font-size: 36px; font-weight: 750; letter-spacing: -0.03em; margin: 12px 0 2px; }
.plan__per { color: var(--text-muted); font-size: var(--fs-sm); }
.plan__list { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.plan__list li { display: flex; gap: 9px; font-size: var(--fs-sm); color: var(--text-secondary); }
.plan__list li::before { content: '✓'; color: var(--brand); font-weight: 700; flex: none; }
.plan__list li.is-off { color: var(--text-disabled); }
.plan__list li.is-off::before { content: '×'; color: var(--text-disabled); }

/* ---------- Экраны входа ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth__body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth__card { width: 100%; max-width: 424px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 34px; }
.auth__logo { display: flex; justify-content: center; margin-bottom: 20px; }
.auth__title { text-align: center; font-size: var(--fs-h2); font-weight: 700; }
.auth__sub { text-align: center; color: var(--text-muted); font-size: var(--fs-sm); margin-top: 5px; margin-bottom: 26px; }
.auth__legal { text-align: center; color: var(--text-muted); font-size: var(--fs-sm); max-width: 424px; margin: 22px auto 0; }
.auth__divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-disabled); font-size: var(--fs-sm); }
.auth__divider::before, .auth__divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.footer-legal { padding: 22px 28px; border-top: 1px solid var(--border); display: flex; gap: 22px; align-items: center; font-size: var(--fs-sm); color: var(--text-muted); }
.footer-legal .spacer { flex: 1; }

.code-inputs { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }
.code-inputs input {
  width: 52px; height: 60px; text-align: center; font-size: 24px; font-weight: 700;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface);
}
.code-inputs input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Развилка входа */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; width: 100%; }
.split__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; }
.split__icon { width: 48px; height: 48px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 18px; }

/* ---------- Онбординг ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 28px; }
.steps__dot { height: 4px; flex: 1; background: var(--border); border-radius: var(--r-full); }
.steps__dot.is-done { background: var(--brand); }
.pick { border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 16px; cursor: pointer; display: flex; gap: 13px; align-items: center; background: var(--surface); transition: border-color .15s, background .15s; }
.pick:hover { border-color: var(--brand); background: var(--brand-soft); }
.pick.is-picked { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.pick__emoji { font-size: 26px; }
.pick__name { font-weight: 650; }
.pick__desc { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- Лендинг ---------- */
.lp-nav { height: 72px; display: flex; align-items: center; gap: 28px; padding: 0 32px; max-width: 1200px; margin: 0 auto; }
.lp-nav__links { display: flex; gap: 24px; margin-left: 22px; }
.lp-nav__links a { color: var(--text-secondary); font-weight: 500; }
.lp-hero { text-align: center; padding: 68px 24px 56px; max-width: 820px; margin: 0 auto; }
.lp-hero h1 { font-size: 46px; font-weight: 780; letter-spacing: -0.035em; line-height: 1.1; }
.lp-hero p { font-size: 18px; color: var(--text-secondary); margin: 20px auto 30px; max-width: 640px; }
.lp-section { max-width: 1140px; margin: 0 auto; padding: 56px 32px; }
.lp-section__title { font-size: var(--fs-h1); font-weight: 720; text-align: center; }
.lp-section__sub { text-align: center; color: var(--text-muted); margin: 10px auto 34px; max-width: 620px; }
.lp-feature { text-align: left; }
.lp-feature__icon { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--brand-soft); display: flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 14px; }
.lp-shot { border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); background: var(--surface); }

/* ---------- Мелочи ---------- */
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.b { font-weight: 650; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty__emoji { font-size: 38px; margin-bottom: 10px; }
.tabs { display: flex; gap: 6px; background: var(--tile-gray); padding: 4px; border-radius: var(--r-sm); }
.tab { border: none; background: none; padding: 8px 15px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }

.modal-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: var(--surface); border-radius: var(--r-lg); padding: 28px; max-width: 460px; width: 100%; box-shadow: var(--sh-lg); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 20px; border-radius: var(--r-sm); font-size: var(--fs-sm); z-index: 60; box-shadow: var(--sh-lg); }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--main { grid-template-columns: 1fr; }
  .train { grid-template-columns: 1fr; height: auto; }
}
@media (max-width: 860px) {
  /* Сайдбар на мобильном скрыт: навигация уезжает в нижнюю панель. */
  .sidebar { display: none; }
  .shell { padding-bottom: 68px; }
  .grid--3, .grid--2-1, .grid--4, .split { grid-template-columns: 1fr; }
  .page { padding: 18px 16px; }
  .topbar { padding: 0 16px; gap: 10px; }
  /* Поиск на мобильном убран из шапки: в узкой колонке от него остаётся
     обрезок плейсхолдера. Место под него - отдельная строка на экране кейсов. */
  .topbar__search { display: none; }
  .lp-hero h1 { font-size: 32px; }
  .lp-nav { padding: 0 16px; gap: 12px; }
  .lp-nav__links { display: none; }
  .lp-section { padding: 36px 16px; }

  .page__head { flex-wrap: wrap; }
  .page__actions { margin-left: 0; width: 100%; }
  .page__actions .btn { flex: 1; }
  .page__title { font-size: 24px; }

  .card, .plan { padding: 16px; }
  .card--pad-lg { padding: 18px; }
  .metric__value { font-size: 22px; }
  .msg { max-width: 88%; }
  .train { padding: 14px 16px; gap: 14px; }
  .crit-row { grid-template-columns: 1fr 70px 34px; gap: 8px; }
  .auth__card { padding: 22px; }
  .code-inputs input { width: 46px; height: 54px; font-size: 21px; }

  /* Нижняя навигация вместо сайдбара */
  .mobile-nav {
    position: fixed; left: 0; right: 0; bottom: 0; height: 60px; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--border);
    display: flex; align-items: stretch; padding: 0 4px;
  }
  .mobile-nav__item {
    flex: 1; border: none; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--text-muted); font-size: 10px; font-weight: 600; padding: 0;
  }
  .mobile-nav__item.is-active { color: var(--brand); }
}
@media (min-width: 861px) { .mobile-nav { display: none; } }

/* Ничто не должно выпирать за экран по горизонтали.
   min-width:0 на детях сетки обязателен: по умолчанию grid-элемент не сжимается
   меньше своего контента, и длинный заголовок распирает колонку за край экрана. */
html, body { overflow-x: hidden; max-width: 100%; }
.page, .card, .train { min-width: 0; }
.grid > *, .stack > *, .shell > *, .main > * { min-width: 0; }
.card, .plan, .case { overflow-wrap: anywhere; }
