/* Focus Immersion — coverage tracker styles.
   Uses the site's existing design tokens (--ink, --cream, --gold, --rule, --disp).
   Link this after styles.css, or paste its contents at the end of styles.css. */

/* ---- meter: ring + counter, sits directly above the word table ---- */
.fi-cov {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0 0 1.1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: rgba(196, 163, 92, 0.035);
}

.fi-cov-ringwrap {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
}

.fi-cov-ring { display: block; }

.fi-cov-track {
  stroke: var(--rule-strong);
  stroke-width: 5;
}

.fi-cov-arc {
  stroke: var(--gold);
  stroke-width: 5;
  transition: stroke-dashoffset 0.45s ease;
}

.fi-cov-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: "DM Mono", var(--ff-mono, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.fi-cov-copy { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }

.fi-cov-label {
  margin: 0;
  color: var(--cream-faint);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fi-cov-count {
  margin: 0;
  color: var(--cream-dim);
  font-family: var(--disp);
  font-size: 1.25rem;
  line-height: 1.2;
}

.fi-cov-count strong { color: var(--cream); font-weight: 500; }

.fi-cov-hint {
  margin: 0.1rem 0 0;
  color: var(--cream-faint);
  font-size: 0.78rem;
  font-style: italic;
}

.fi-cov-reset {
  align-self: flex-start;
  margin-top: 0.4rem;
  padding: 0.15rem 0;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.fi-cov-reset:hover { color: var(--cream); }

/* ---- per-row toggle button (replaces the plain rank number) ---- */
.fi-cov-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: none;
  color: var(--gold);
  font: inherit;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.fi-cov-mark:hover { border-color: var(--rule-strong); }

.fi-cov-mark:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.fi-cov-mark-tick {
  display: none;
  font-style: normal;
  font-size: 0.82rem;
}

/* known state: the row dims slightly; the marker turns gold-filled with a tick */
.fi-cov-mark[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--ink);
  font-style: normal;
}
.fi-cov-mark[aria-pressed="true"] .fi-cov-mark-n { display: none; }
.fi-cov-mark[aria-pressed="true"] .fi-cov-mark-tick { display: inline; }

.word-table tr.is-known td:not(.rank) { color: var(--cream-faint); }

/* ---- mobile: rank cell is absolutely positioned; keep the button tappable ---- */
@media (max-width: 640px) {
  .word-table .rank .fi-cov-mark {
    min-width: 1.9rem;
    height: 1.7rem;
  }
  .fi-cov { flex-wrap: wrap; }
}
