/*
 * Каталог задач: предметы экзамена.
 *
 * Из макета subjects_c.html взята нижняя половина — плитки предметов по
 * семьям и строка про полный список. Верхняя половина макета («мои предметы»
 * с готовностью и слабыми темами) считается по решениям ученика, поэтому
 * стилей под неё здесь нет: на её месте один блок «скоро».
 */

  .page.subjects { padding-top: 40px; padding-bottom: 76px; }

  /* ---------- заголовок страницы ---------- */
  .page-h { align-items: flex-end; margin-bottom: 30px; margin-top: 0; }
  .page-h h2 { font-size: 32px; }
  /* Заголовок каталога — h1 страницы, но выглядит как h2 раздела в app.css. */
  .page-h h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.015em; }
  .page-h h1 em {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
  }
  .page-h .lede {
    margin-top: 7px;
    max-width: 62ch;
    font-size: 14px;
    color: var(--muted);
  }
  .page-h .right-actions {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  /* ---------- семья предметов ---------- */
  .grp { margin-top: 34px; margin-bottom: 14px; }
  .grp h2 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .grp .right-actions {
    font-size: 12px;
    color: var(--muted-2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  .tile {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 17px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, background 0.2s;
  }
  a.tile:hover { border-color: var(--border-strong); background: var(--surface-2); }

  /* Предмет без задач: та же плитка, но приглушённая и без нажатия. */
  .tile[aria-disabled="true"] {
    background: transparent;
    border-style: dashed;
    color: var(--muted-2);
    cursor: default;
  }
  .tile[aria-disabled="true"] .tile-mark { background: var(--surface-2); color: var(--muted-2); }

  .tile-mark {
    flex: none;
    width: 32px; height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-size: 17px;
    line-height: 1;
  }
  .tile-body { min-width: 0; }
  .tile-nm {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.005em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tile-n {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }

  /* ---------- личный блок ---------- */
  .personal { margin-top: 44px; }

  /* ---------- нижняя строка про полный список ---------- */
  .all-line {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 26px 28px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .all-line:hover { border-color: var(--accent-200); box-shadow: var(--shadow); }
  .all-line .q { color: var(--muted); }
  .all-line b { font-weight: 600; font-variant-numeric: tabular-nums; }
  .all-line .mi { flex: none; margin-left: auto; font-size: 21px; color: var(--accent); }

  /* ---------- узкие экраны ---------- */
  @media (max-width: 1100px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-h { display: block; }
    .page-h .right-actions { margin-top: 10px; }
  }
  @media (max-width: 660px) {
    .page-h h2, .page-h h1 { font-size: 25px; }
    .section-h { flex-wrap: wrap; gap: 6px 14px; }
    .section-h .right-actions { flex-wrap: wrap; gap: 6px 12px; }
    .tiles { grid-template-columns: 1fr; }
    .grp { flex-wrap: wrap; gap: 4px 12px; }
    .all-line { align-items: flex-start; padding: 18px 18px; }
    .all-line .mi { margin-top: 2px; }
  }
