/* ---- V4: Vault health — the card on the Vault page, the Health view, the generator row in the
   login panel. Quiet Glass tokens (quiet-glass.css), light and dark. Calm on purpose: no red,
   the ring fills in the "ok" green, issues read as easy wins. */

/* the score ring: a conic fill behind a glass hole */
.vh-ring {
  --p: 0; --size: 44px;
  position: relative; display: grid; place-items: center; flex: none;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--raised) 0);
}
.vh-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface-solid, var(--bg)); }
.vh-ring b { position: relative; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vh-ring.big { --size: 96px; }
.vh-ring.big::before { inset: 9px; }
.vh-ring.big b { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }

/* the card under the Vault header */
.vh-card {
  display: flex; align-items: center; gap: 14px; min-height: 64px; margin: 16px 0 4px; padding: 10px 14px;
  border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--elevation); color: var(--text); text-decoration: none;
  transition: transform 120ms ease-out, background-color 120ms;
}
.vh-card[hidden] { display: none; }
.vh-card:hover { background: var(--raised); }
.vh-card:active { transform: scale(0.99); }
.vh-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vh-card-text { flex: 1 1 auto; min-width: 0; }
.vh-card-text b { display: block; font-weight: 600; }
.vh-card-text small { display: block; color: var(--muted); font-size: var(--fs-meta); line-height: 20px; }
.vh-card-go { display: grid; place-items: center; width: 44px; height: 44px; flex: none; color: var(--muted); }
.vh-card-go svg { width: 20px; height: 20px; }

/* the Health view */
.vh-main { max-width: 820px; }
.vh-main .main-head h2 { font-size: clamp(2rem, 4vw, 2.625rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.vh-main .main-head .muted { margin-top: 6px; font-size: var(--fs-meta); }
.vh-hero { flex-direction: row; align-items: center; gap: 24px; }
.vh-hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vh-hero-score { font-size: var(--fs-lead); font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.vh-wins { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.vh-wins li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-meta); }
.vh-wins svg { width: 18px; height: 18px; flex: none; color: var(--ok); }
.vh-status { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.vh-status a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.vh-sec { gap: 8px; }
.vh-sec h3 { display: flex; align-items: center; gap: 8px; }
.vh-sec h3 .count { padding: 0 8px; border-radius: var(--r-chip); background: var(--raised); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 22px; }
.vh-list { display: flex; flex-direction: column; margin-top: 4px; }
.vh-group { margin: 10px 0 2px; color: var(--muted); font-size: var(--fs-cap); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.vh-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; border-top: 1px solid var(--line); }
.vh-list > .vh-row:first-child, .vh-group + .vh-row { border-top: 0; }
.vh-row-text { flex: 1 1 auto; min-width: 0; }
.vh-row-text b, .vh-row-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-row-text b { font-weight: 600; }
.vh-row-text small { color: var(--muted); font-size: 13px; line-height: 18px; }
.vh-row .btn { flex: none; height: var(--btn-h); min-height: 44px; }
.vh-viewonly { flex: none; color: var(--muted); font-size: 13px; }

/* the generator row in the login panel */
.vh-gen-field[hidden], .vh-gen[hidden], .vh-gen-open[hidden] { display: none; }
.vh-gen-open { align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-meta); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.vh-gen-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.vh-gen { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--ok-soft); }
.vh-gen-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vh-gen-top b { font-weight: 600; }
.vh-gen-top small { color: var(--muted); font-size: 13px; }
.vh-gen-value { display: block; overflow-wrap: anywhere; font-size: 15px; line-height: 22px; }
.vh-gen-hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 18px; }

@media (max-width: 760px) {
  .vh-card { margin-top: 12px; }
  .vh-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .vh-row { flex-wrap: wrap; }
  .vh-row .btn { margin-left: 44px; }
}
