/* «Примеры». Токены и базовые компоненты из ../styles.css: здесь только раскладка страницы. */

.ex-top-cta { text-decoration: none; }
@media (max-width: 520px) {
  .ex-top-cta span { display: inline; }
  .ex-top-cta { width: auto; padding: 0 14px; font-size: 14px; }
}

.ex-main { padding-top: 16px; }

.ex-hero { padding: 16px 0 4px; }
.ex-hero h1 {
  margin-top: 8px;
  font-size: clamp(32px, 8.5vw, 52px);
  line-height: 1.02;
}
.ex-sub { margin-top: 12px; max-width: 54ch; color: var(--text-2); font-size: 17px; }

/* ---------- Фильтр ---------- */

.ex-filters {
  display: flex;
  gap: 8px;
  margin: 24px -16px 0;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.ex-filters::-webkit-scrollbar { display: none; }
.ex-chip { flex: none; scroll-snap-align: start; min-height: 40px; padding: 0 14px; font-size: 15px; }
.ex-chip .icon { width: 18px; height: 18px; color: var(--text-2); }
.ex-chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.ex-chip[aria-pressed="true"] .icon { color: var(--bg); }
@media (min-width: 720px) {
  .ex-filters { flex-wrap: wrap; overflow: visible; margin: 28px 0 0; padding: 0; }
}

/* ---------- Карточки ---------- */

.ex-grid {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
@media (min-width: 600px) {
  .ex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ex-grid > li { display: flex; }

.ex-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 16px;
  text-align: left;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--highlight), var(--shadow);
  transition: border-color .2s, transform .15s var(--ease);
  animation: enter .45s var(--ease) both;
}
.ex-card:hover { border-color: var(--line-strong); }
.ex-card:active { transform: scale(.98); }

.ex-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ex-card-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
}
.ex-card-icon .icon { width: 22px; height: 22px; }

.ex-amount-wrap { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ex-amount {
  font-size: clamp(32px, 9vw, 40px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
  color: var(--money);
  white-space: nowrap;
}
.ex-amount.is-zero, .ex-sheet-amount.is-zero { color: var(--text); }
.ex-caption { font-size: 14px; color: var(--text-2); }
.ex-card-title { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.ex-persona { font-size: 14px; color: var(--text-2); }
.ex-how {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.ex-how .icon { width: 16px; height: 16px; flex: none; }

.ex-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text);
}
.ex-badge.is-easy { background: var(--money-soft); color: var(--money); }
.ex-badge.is-hard { background: var(--amber-soft); color: var(--amber); }

.ex-skeleton {
  height: 220px;
  border-radius: var(--r-card);
  background: var(--surface);
  animation: pulse 1.2s ease-in-out infinite;
}
.ex-error { display: grid; gap: 12px; justify-items: start; padding: 16px; color: var(--text-2); }

.ex-bottom {
  margin-top: 32px;
  padding: 24px;
  border-radius: var(--r-hero);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--highlight), var(--shadow);
  display: grid;
  gap: 10px;
  justify-items: start;
}
.ex-bottom h2 { font-size: 24px; line-height: 1.15; }
.ex-bottom p { color: var(--text-2); }
.ex-bottom .btn { margin-top: 6px; text-decoration: none; }

/* ---------- Лист ---------- */

dialog.ex-sheet { width: min(560px, calc(100% - 32px)); padding: 12px 24px 24px; overscroll-behavior: contain; }
.ex-sheet-head { display: flex; align-items: center; gap: 8px; margin-right: -12px; }
.ex-sheet-tags { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.ex-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
}
dialog.ex-sheet h2 { margin-top: 8px; font-size: 24px; line-height: 1.2; }
dialog.ex-sheet .ex-persona { margin-top: 6px; }
.ex-sheet-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ex-sheet-amount {
  font-size: clamp(40px, 12vw, 56px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--money);
}
dialog.ex-sheet p.ex-story { margin-top: 14px; color: var(--text); font-size: 16px; }

.ex-block { margin-top: 22px; }
.ex-block h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
}

dialog.ex-sheet ul.ex-calc,
dialog.ex-sheet ul.ex-docs { list-style: none; padding: 0; margin: 10px 0 0; gap: 0; color: var(--text); }
.ex-calc li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.ex-calc-what b { font-weight: 600; margin-right: 2px; }
.ex-calc small { display: block; color: var(--text-2); font-size: 13px; }
.ex-calc-sum, .ex-money { color: var(--money); font-weight: 600; white-space: nowrap; }
.ex-calc .num { white-space: nowrap; }
.ex-calc-total { font-weight: 600; border-top-color: var(--line-strong) !important; }
.ex-calc li.is-best .num { color: var(--money); font-weight: 600; }
.ex-calc li.is-best small { color: var(--money); }

dialog.ex-sheet p.ex-note,
dialog.ex-sheet p.ex-how-line {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 10px;
  font-size: 14px;
}
.ex-note .icon, .ex-how-line .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; }
dialog.ex-sheet p.ex-how-line { color: var(--text); font-size: 16px; }
dialog.ex-sheet p.ex-note.is-warn { color: var(--amber); }

.ex-docs li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 15px; }
.ex-docs .icon { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--money); }

.ex-mistake {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: var(--r-card);
  background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
}
.ex-mistake .icon { flex: none; margin-top: 2px; color: var(--amber); }
.ex-mistake b { font-size: 15px; }
dialog.ex-sheet .ex-mistake p { margin-top: 4px; color: var(--text); }

.ex-sheet-actions { margin-top: 24px; display: grid; gap: 8px; }
.ex-sheet-actions .btn { text-decoration: none; }
dialog.ex-sheet p.ex-hint { margin: 0; font-size: 13px; text-align: center; }

@media (max-width: 520px) {
  dialog.ex-sheet { width: 100%; padding: 8px 16px calc(20px + var(--safe-b)); max-height: 92dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .ex-card, .ex-skeleton { animation: none; }
}
