/* Model-defects page module. Схема семи дефектов: карточки со шкалами. */
.df-legend {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-family: system-ui, sans-serif; font-size: 12.5px; color: var(--ink-soft);
  border: 1px dashed var(--rule); border-radius: 9px; padding: 9px 12px; margin: .9em 0 1.2em;
}
.df-legend .df-bar { width: 74px; flex: 0 0 auto; margin: 0; }

.df-fams { display: flex; flex-direction: column; gap: 18px; margin: 1em 0 1.3em; }
.df-fam-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.df-fam-head b {
  font-family: system-ui, sans-serif; font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.df-fam-head i { flex: 1 1 auto; height: 1px; background: var(--rule); font-style: normal; }
.df-fam-head em {
  font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft);
}

.df-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.df-card {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 9px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 9px;
}
.df-card.df-wide { grid-column: 1 / -1; }
.df-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.df-id {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--accent);
}
.df-title { font-size: .98rem; font-weight: 600; }

.df-bar {
  height: 8px; border-radius: 5px; background: var(--code-bg);
  position: relative; overflow: hidden; margin: 0;
}
.df-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.df-bar.weak span { background: var(--warn); }
.df-bar u {
  position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink-soft);
  text-decoration: none;
}

.df-scale { position: relative; height: 22px; }
.df-scale i {
  position: absolute; left: 0; right: 0; top: 8px; height: 6px; border-radius: 4px;
  background: var(--code-bg);
}
.df-scale b {
  position: absolute; top: 0; width: 2px; height: 22px; background: var(--ink-soft);
}
.df-scale b.real { background: var(--ink); }
.df-scale b.model { background: var(--warn); }

.df-nums {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft);
}
.df-nums strong { color: var(--ink); font-weight: 600; }
.df-nums .bad { color: var(--warn); font-weight: 600; }
.df-note { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--ink-soft); }

.df-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 1.2em 0 .6em; }
.df-foot > div {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  border-radius: 0 9px 9px 0; background: var(--panel); padding: 11px 14px;
}
.df-foot > div.fixable { border-left-color: var(--ok); }
.df-foot h3 {
  margin: 0 0 5px; font-family: system-ui, sans-serif; font-size: 11.5px;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600;
}
.df-foot p { margin: 0; font-size: .89rem; line-height: 1.45; color: var(--ink-soft); }

@media (max-width: 720px) {
  .df-cards, .df-foot { grid-template-columns: 1fr; }
  .df-nums { font-size: 12px; }
}
