/*
 * View styles — self-healing (sample review queue).
 * Scoped under .v-healing. Mirrors the Healing artboard.
 */

.v-healing .view-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.v-healing .page-header {
  margin-bottom: 0;
}

.v-healing .page-header__main {
  flex: 1 1 480px;
}

.v-healing .page-header__meta {
  margin-bottom: 6px;
}

.v-healing .page-header__sub {
  max-width: 720px;
  color: var(--text-1);
  line-height: 1.55;
}

.v-healing .page-header .chip {
  padding: 4px 8px;
  font-weight: var(--fw-regular);
}

.v-healing .page-header .btn {
  font-size: var(--fz-sm);
  font-weight: var(--fw-medium);
}

/* ------------------------------------------------------------ summary */

.hl-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border: 1px solid var(--line-0);
  border-radius: var(--r-2);
}

.hl-kpi {
  min-width: 0;
  padding: 18px var(--sp-5);
  border-right: 1px solid var(--line-0);
}

.hl-kpi:last-child {
  border-right: 0;
}

.hl-kpi__label,
.hl-kpi__note {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fz-xs);
}

.hl-kpi__note {
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.hl-kpi__value {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fz-3xl);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* -------------------------------------------------- live local log (JS) */

.v-healing .hl-live-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--line-0);
  background: var(--line-0);
}

.v-healing .hl-live-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--paper-0);
}

.v-healing .hl-live-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.v-healing .hl-live-item__title {
  color: var(--text-0);
  font-size: var(--fz-sm);
  font-weight: var(--fw-semibold);
}

.v-healing .hl-live-item__selectors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
}

.v-healing .hl-live-item__selectors code {
  color: var(--text-1);
  overflow-wrap: anywhere;
}

/* -------------------------------------------------------- review queue */

.hl-queue__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.hl-queue__title {
  margin: 0;
  font-size: 17px;
  font-weight: var(--fw-semibold);
}

.hl-queue__meta {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: var(--fz-xs);
}

.hl-waiting {
  flex: none;
  padding: 3px 8px;
  border-radius: var(--r-1);
  background: var(--signal-soft);
  color: var(--signal-hover);
  font-family: var(--font-mono);
  font-size: var(--fz-2xs);
  white-space: nowrap;
}

.hl-queue__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.hl-card {
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  border: 1px solid var(--line-0);
  border-radius: var(--r-2);
}

.hl-card__main {
  flex: 2 1 420px;
  min-width: 0;
  padding: 18px var(--sp-5);
}

.hl-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.hl-clue {
  padding: 2px 7px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-1);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: var(--fz-2xs);
}

.hl-state {
  padding: 2px 7px;
  border-radius: var(--r-1);
  font-family: var(--font-mono);
  font-size: var(--fz-2xs);
}

.hl-state--wait {
  background: var(--warn-soft);
  color: var(--warn);
}

.hl-state--acc {
  background: var(--ok-soft);
  color: var(--ok);
}

.hl-state--rej {
  background: var(--bad-soft);
  color: var(--bad);
}

.hl-card__title {
  margin: 10px 0 0;
  font-size: var(--fz-lg);
  font-weight: var(--fw-semibold);
}

.hl-card__meta {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: var(--fz-xs);
}

.hl-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: 14px;
}

.hl-pair__was,
.hl-pair__now {
  min-width: 0;
  padding: 10px var(--sp-3);
  border-radius: var(--r-2);
}

.hl-pair__was {
  border: 1px dashed var(--line-2);
}

.hl-pair__now {
  border: 1px solid var(--signal-ink);
  background: #f4f7ff;
}

.hl-pair__label {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fz-2xs);
}

.hl-pair__now .hl-pair__label {
  color: var(--signal-hover);
}

.hl-pair__code {
  margin: 4px 0 0;
  color: var(--text-0);
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.hl-pair__was .hl-pair__code {
  color: var(--text-1);
}

.hl-diff {
  margin-top: var(--sp-3);
  padding: 10px 14px;
  border-radius: var(--r-2);
  background: var(--ink-0);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.hl-diff__old {
  color: #ffb4ad;
}

.hl-diff__new {
  color: #9fe0bd;
}

.hl-card__side {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-3);
  min-width: 0;
  padding: 18px var(--sp-5);
  background: var(--paper-2);
}

.hl-match__label {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fz-xs);
}

.hl-match__value {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.hl-match__track {
  position: relative;
  height: 4px;
  margin-top: 6px;
  background: #e3dccd;
}

.hl-match__bar {
  display: block;
  height: 4px;
  background: var(--signal);
}

.hl-match__bar--94 { width: 94%; }
.hl-match__bar--88 { width: 88%; }
.hl-match__bar--81 { width: 81%; }

.hl-match__thr {
  position: absolute;
  top: -4px;
  left: 80%;
  width: 1px;
  height: 12px;
  background: var(--ink-0);
}

.hl-match__thr-label {
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: var(--fz-2xs);
}

.hl-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.hl-card__actions .btn {
  font-size: var(--fz-sm);
  font-weight: var(--fw-medium);
}

/* ------------------------------------------------------- how it works */

.hl-how {
  border: 1px solid var(--line-0);
  border-radius: var(--r-2);
}

.hl-how__head {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line-0);
}

.hl-how__title {
  margin: 0;
  font-size: 15px;
  font-weight: var(--fw-semibold);
}

.hl-how__meta {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: var(--fz-xs);
}

.hl-how__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.hl-how__item {
  min-width: 0;
  padding: 18px var(--sp-5);
  border-right: 1px solid var(--line-0);
}

.hl-how__item:last-child {
  border-right: 0;
}

.hl-how__key {
  margin: 0;
  color: var(--signal-ink);
  font-family: var(--font-mono);
  font-size: var(--fz-2xs);
}

.hl-how__name {
  margin: 6px 0 0;
  font-size: var(--fz-md);
  font-weight: var(--fw-medium);
}

.hl-how__desc {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: var(--fz-xs);
}

/* ------------------------------------------------------------- phone */

@media (max-width: 720px) {
  .hl-kpi,
  .hl-how__item {
    border-right: 0;
    border-bottom: 1px solid var(--line-0);
  }

  .hl-kpi:last-child,
  .hl-how__item:last-child {
    border-bottom: 0;
  }

  .hl-queue__head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .hl-card__main,
  .hl-card__side {
    flex-basis: 100%;
    padding: var(--sp-4);
  }

  .hl-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}
