/* Стили, специфичные для статьи «Модели ChatGPT и Claude». Общие компоненты — в shared/css. */

/* ---------- Метка ступени: «пилюля» с точкой, цвет по ступени ---------- */

.tier {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 9px;
  border-radius: 99px;
  background: var(--bg);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.tier::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.tier--4::before { background: var(--signal); }
.tier--3::before { background: var(--primary-fg); }
.tier--2::before { background: var(--mint-fg); }
.tier--1::before { background: var(--muted); }

/* ---------- Таблица сравнения ---------- */

.compare {
  margin: 28px 0 32px;
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.compare:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.compare__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  line-height: 1.45;
}
.compare__table th,
.compare__table td {
  padding: 14px 14px;
  text-align: left;
  vertical-align: top;
}
.compare__table thead th {
  padding-top: 12px;
  padding-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.compare__table tbody tr > * { background: var(--panel); border-top: 1px solid var(--border); }
.compare__table tbody tr:first-child > * { border-top: 0; }
.compare__table tbody tr:first-child > :first-child { border-top-left-radius: var(--radius); }
.compare__table tbody tr:first-child > :last-child { border-top-right-radius: var(--radius); }
.compare__table tbody tr:last-child > :first-child { border-bottom-left-radius: var(--radius); }
.compare__table tbody tr:last-child > :last-child { border-bottom-right-radius: var(--radius); }
.compare__table tbody th { font-weight: 400; }
.compare__table b { font-family: var(--font-heading); font-weight: 500; font-size: 16px; white-space: nowrap; }
.compare__table td:nth-child(4) { color: var(--muted); font-size: 14px; }
.compare__num { font-family: var(--font-mono); font-size: 13.5px; white-space: nowrap; }
.compare__table thead .compare__num { text-align: right; }
.compare__table td.compare__num { text-align: right; }
.compare__table--sheet td:nth-child(4) { color: var(--text); font-size: 15px; }
.compare__table--sheet tbody th { font-weight: 500; font-family: var(--font-heading); }
.compare__table--sheet td:last-child { color: var(--muted); }
.compare__note {
  margin: 10px 12px 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* Узкий экран: строка таблицы превращается в карточку с подписями */
@media (max-width: 760px) {
  .compare__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare__table, .compare__table tbody, .compare__table tr, .compare__table th, .compare__table td { display: block; }
  .compare__table tbody { display: grid; gap: 8px; }
  .compare__table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--panel);
  }
  .compare__table tbody tr > * { background: none; border: 0 !important; border-radius: 0 !important; padding: 6px 0; }
  .compare__table tbody th { grid-column: 1 / -1; padding-bottom: 8px; }
  .compare__table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .compare__table td:nth-child(4) { grid-column: 1 / -1; }
  .compare__table td.compare__num { text-align: left; }
  .compare__table--sheet td:nth-child(4) { grid-column: auto; }
  .compare__table--sheet tbody th { font-size: 16px; }
}

/* ---------- Hero: две линейки, пары подсвечиваются по очереди ---------- */

.hero__visual { display: flex; align-items: center; justify-content: center; }
.hero-pairs { width: 100%; max-width: 440px; box-shadow: var(--shadow); }
.hero-pairs .window__body { display: grid; gap: 8px; padding: 16px; }
.hero-pairs__head,
.hero-pairs__row {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: 6px;
}
.hero-pairs__head { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 0 4px 2px; }
.hero-pairs__head span:last-child { text-align: right; }
.hero-pairs__cell {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  transition: background .35s var(--ease-out), border-color .35s var(--ease-out), opacity .35s var(--ease-out);
}
.hero-pairs__cell small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.hero-pairs__row > :last-child { text-align: right; }
.hero-pairs__eq { text-align: center; font-family: var(--font-mono); color: var(--muted); transition: color .35s; }
.hero-pairs__row.is-dim .hero-pairs__cell { opacity: .45; }
.hero-pairs__row.is-on .hero-pairs__cell { background: var(--primary-soft); border-color: var(--primary); }
.hero-pairs__row.is-on .hero-pairs__eq { color: var(--primary-fg); }
.hero-pairs__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}
.hero-pairs__foot b { font-weight: 500; color: var(--text); font-family: var(--font-mono); }
@media (max-width: 420px) {
  .hero-pairs__cell { font-size: 14px; padding: 9px 10px; }
  .hero-pairs__cell small { display: none; }
}

/* Цена под названием модели в таблице пар */
.compare__price { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.compare__table:not(.compare__table--sheet) td:nth-child(2),
.compare__table:not(.compare__table--sheet) td:nth-child(3) { white-space: nowrap; }
.compare__table:not(.compare__table--sheet) td:nth-child(4) { width: 44%; }
@media (max-width: 760px) {
  .compare__table:not(.compare__table--sheet) td:nth-child(4) { width: auto; }
}
