/* CAVAA-RGS — interface styles, built on the MIMS brand tokens
   (templates/brand/brand.css). Light theme, teal accent, Montserrat.
   v0.3 rework: information / input / result zones, meter-style bars. */

:root {
  --brand:        #26a9b6;
  --brand-dark:   #1f8c97;
  --brand-soft:   #d9eef1;
  --bg:           #eceff0;
  --surface:      #ffffff;
  --surface-alt:  #f6f8f8;
  --text:         #1a1a1a;
  --muted:        #7c8388;
  --border:       #d7dcde;
  --border-strong:#b9c0c4;
  --ok:           #2e9e5b;
  --warn:         #d9822b;
  --danger:       #c0392b;
  /* series colors — validated (CVD + contrast) on white surface */
  --motor:        #c9711d;   /* motor accent */
  --motor-track:  #f3e2d0;   /* lighter step, same ramp (meter track) */
  --cognitive:    #5b6cc4;   /* cognitive accent */
  --cog-track:    #dde1f4;   /* lighter step, same ramp (meter track) */
  --ppf-track:    #d9eef1;   /* teal ramp track for PPF meters */
  --radius:       6px;
  --radius-lg:    12px;
  --shadow:       0 5px 15px rgba(16, 42, 47, .12);
  --shadow-sm:    0 1px 3px rgba(16, 42, 47, .07), 0 4px 14px rgba(16, 42, 47, .05);
  --shadow-hover: 0 2px 6px rgba(16, 42, 47, .09), 0 8px 22px rgba(16, 42, 47, .08);
  --font:         "Montserrat", system-ui, -apple-system, sans-serif;
  --header-h:     58px;
}

* { box-sizing: border-box; }
body.modal-open { overflow: hidden; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* ---- header ---- */
.app-header {
  height: var(--header-h);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  padding: 0 22px; position: sticky; top: 0; z-index: 10;
}
.brand-mark { display: flex; flex-direction: column; line-height: 1; }
.brand-mark .word { font-weight: 800; font-size: 25px; color: var(--brand); letter-spacing: .5px; }
.brand-mark .word .rgs { color: var(--text); }
.brand-mark .sub { color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.app-header .spacer { flex: 1; }
.app-header .who { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.app-header .who .org { font-weight: 600; font-size: .92rem; }
.app-header .who .user { color: var(--muted); font-size: .78em; }
.app-header .divider { width: 1px; height: 28px; background: var(--border); }
.app-header .meta { color: var(--muted); font-size: .8em; }
@media (max-width: 560px) {
  .app-header { padding: 0 14px; gap: 10px; }
  .app-header .divider, .app-header .meta, .brand-mark .sub { display: none; }
}

/* ---- zones layout ---- */
.page { max-width: 1560px; margin: 0 auto; padding: 22px 20px 8px; }
.zones {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-areas: "info input" "session session" "trans trans" "result result";
  gap: 20px; align-items: start;
}
/* never let a wide child stretch the page sideways */
.zone { min-width: 0; }
.zone .card { min-width: 0; }
.zone--info    { grid-area: info; }
.zone--input   { grid-area: input; }
.zone--session { grid-area: session; }
.zone--trans   { grid-area: trans; }
.zone--result  { grid-area: result; }
/* first row: patient card matches the targets card height */
.zone--info { align-self: stretch; display: flex; flex-direction: column; }
.zone--info .card { flex: 1; margin-bottom: 0; }
@media (max-width: 980px) {
  .zones { grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "input" "session" "trans" "result"; }
  .zone--info { display: block; }
}

/* transparency band: full width, directly under the parameters */
.trans-box {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 14px 22px;
}
.trans-box > summary {
  cursor: pointer; user-select: none; color: var(--muted); font-size: .85rem;
  font-weight: 600; display: inline-flex; align-items: center; gap: 7px;
}
.trans-box > summary:hover { color: var(--text); }
.trans-box[open] > summary { color: var(--brand-dark); }
/* vertical flow; long lists scroll vertically only */
#transparencyPanel { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tp-mems { min-width: 0; }
.tp-mems .tm-scroll { max-height: 400px; overflow-y: auto; overflow-x: hidden; }

/* narrow screens: drop the influence column (rank already encodes it) */
@media (max-width: 640px) {
  .tm-head, .tm-row { grid-template-columns: 20px 64px minmax(80px, 1.2fr) minmax(100px, 1fr); gap: 8px; }
  .tm-inf, .tm-oc, .tm-head span:nth-child(5), .tm-head span:nth-child(6) { display: none; }
  .fp-cell { width: 10px; height: 12px; }
  .fp-lab { width: 10px; font-size: 6.5px; }
  .fp-div { margin: 0 3px; }
  .tm-sim b { min-width: 26px; font-size: .68rem; }
  .tm-row { font-size: .72rem; padding: 4px 4px; }
}

.zone-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 2px 8px;
}
.step-num {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .66rem; font-weight: 800; letter-spacing: 0; color: #fff;
}
.zone--info   .step-num { background: var(--border-strong); }
.zone--input  .step-num { background: var(--brand); }
.zone--result .step-num { background: var(--text); opacity: .55; }

/* ---- cards ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 16px;
  transition: box-shadow .18s ease;
}
.card--input { border-top: 3px solid var(--brand); }
.card__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.card__title h2, .card__title h3 { margin: 0; }
.card h2 { font-size: 1.02rem; }
.card h3 { font-size: .92rem; }
h4 { margin: 14px 0 8px; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.label { color: var(--muted); font-size: .74em; text-transform: uppercase; letter-spacing: .05em; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.footnote { margin: 12px 0 0; line-height: 1.55; }

/* ---- identity ---- */
.identity { display: flex; align-items: center; gap: 12px; margin: 16px 2px 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--brand-soft); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem; letter-spacing: .02em;
}
.identity .id-name { font-weight: 700; font-size: .98rem; line-height: 1.2; }
.identity .id-sub { margin-top: 3px; }

.meta-grid { display: flex; flex-direction: column; gap: 1px; }
.pc-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: .82rem; padding: 6px 2px;
  border-top: 1px solid var(--surface-alt);
}
.pc-row .k { color: var(--muted); }
.pc-row .v { text-align: right; font-weight: 500; }

/* ---- badges ---- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .72em; font-weight: 600; white-space: nowrap; }
.badge--brand  { background: var(--brand-soft); color: var(--brand-dark); }
.badge--muted  { background: #edeff0; color: var(--muted); }
.badge--motor  { background: #f7ead9; color: #9c5613; }
.badge--cog    { background: #e4e7f7; color: #47549c; }
/* !important so it also wins over display:flex/grid component rules */
.hidden { display: none !important; }

/* ---- meter bars (memory inspector + reactive explanation) ---- */
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row {
  display: grid; grid-template-columns: 88px 1fr 44px;
  align-items: center; gap: 10px; font-size: .78rem;
}
.bar-track {
  display: block; height: 10px; border-radius: 5px; overflow: hidden;
  background: var(--surface-alt); border: 1px solid var(--border);
}
.bar-row.motor     .bar-track { background: var(--motor-track); border-color: transparent; }
.bar-row.cognitive .bar-track { background: var(--cog-track);  border-color: transparent; }
.bar-fill {
  display: block; height: 100%;
  border-radius: 0 4px 4px 0;             /* rounded data-end, square baseline */
  transition: width .45s cubic-bezier(.2,.7,.3,1);
}
.bar-row.motor     .bar-fill { background: var(--motor); }
.bar-row.cognitive .bar-fill { background: var(--cognitive); }
.bar-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .74rem; }
.bar-val b { color: var(--text); font-weight: 600; }

/* ---- merged capacity + target rows ----
   One track per dimension: fill = capacity (deficit = remainder of the
   track), draggable handle = this week's training target. */
.target-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 12px; font-size: .72rem; color: var(--muted); }
.target-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.target-legend .sw.score {
  font-size: .64rem; color: var(--muted); background: var(--surface-alt);
  border-radius: 999px; padding: 0 6px; font-variant-numeric: tabular-nums;
}
.target-legend .sw.score b { color: var(--text); }
.target-legend .sw.handle {
  width: 11px; height: 11px; border-radius: 50%; display: inline-block;
  background: #fff; border: 2.5px solid var(--border-strong);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.target-legend .sw.notch {
  width: 0; height: 0; display: inline-block;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 7px solid var(--border-strong);
}

/* plan: targets card (row 1) + full-width session options + generate */
.zone--input .card { margin-bottom: 0; height: 100%; }
.plan-col--session .session-row { margin-top: 0; padding-top: 0; border-top: 0; }
.plan-col--session .advanced:first-of-type { margin-top: 14px; }
.zone--session .card { margin-bottom: 0; }
.zone--session > .btn--block { margin-top: 14px; }
.zone--session > .draft-summary { margin: 12px 2px 0; }

.dim-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 34px; margin-top: 4px; }
@media (max-width: 900px) { .dim-groups { grid-template-columns: 1fr; } }
.dim-group h4 { display: flex; align-items: center; gap: 7px; color: var(--text); margin-top: 6px; }
.dim-group h4 .src { color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.dim-group h4 .group-score {
  margin-left: auto; font-size: .72rem; color: var(--muted);
  background: var(--surface-alt); border-radius: 999px; padding: 1px 8px;
  font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none;
}
.dim-group h4 .group-score b { color: var(--text); font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dot.motor { background: var(--motor); }
.dot.cognitive { background: var(--cognitive); }

.dim-row {
  display: grid; grid-template-columns: 82px 46px 1fr 40px;
  align-items: center; gap: 10px; font-size: .78rem; margin-bottom: 11px;
}
.dim-row.motor     { --c: var(--motor);     --ct: var(--motor-track); }
.dim-row.cognitive { --c: var(--cognitive); --ct: var(--cog-track); }
/* measured subscale score — the patient's state, next to the control */
.dim-score {
  font-size: .7rem; color: var(--muted); text-align: center;
  background: var(--ct); border-radius: 999px; padding: 1px 6px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dim-score b { color: var(--text); font-weight: 700; }
/* clearly deficient subscale (deficit ≥ 50%) — warm tone: focus here */
.dim-row.dim-hi .dim-score { background: #f9e3e0; color: var(--danger); }
.dim-row.dim-hi .dim-score b { color: var(--danger); }
.dim-row.dim-hi .dim-label { font-weight: 700; }
.dim-slider { position: relative; }
.dim-notch {
  position: absolute; bottom: -3px; transform: translateX(-50%);
  width: 0; height: 0; pointer-events: none;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 6px solid var(--border-strong);
  transition: left .45s cubic-bezier(.2,.7,.3,1);
}
/* per-group endpoint captions, aligned with the track column */
.dim-ends { display: grid; grid-template-columns: 82px 46px 1fr 40px; gap: 10px; margin-top: -3px; }
.dim-ends .ends { display: flex; justify-content: space-between; font-size: .68rem; color: var(--muted); }
.dim-val {
  font-weight: 700; font-variant-numeric: tabular-nums; font-size: .74rem;
  background: var(--surface-alt); border-radius: 999px; padding: 0 8px; text-align: center;
}

/* fill tone scales with the value: pale = train little, full = train hard */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 18px;
  background: transparent; cursor: pointer; margin: 0;
  --fill: color-mix(in srgb, var(--c, var(--brand)) var(--tone, 100%), var(--ct, var(--surface-alt)));
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--fill) var(--p, 0%), var(--ct, var(--surface-alt)) var(--p, 0%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; margin-top: -5px;
  background: #fff; border: 2.5px solid var(--fill);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .12s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(to right, var(--fill) var(--p, 0%), var(--ct, var(--surface-alt)) var(--p, 0%));
}
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--fill);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
input[type="range"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ---- session config: steppers + segmented ---- */
.session-row {
  display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--surface-alt);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { flex: 1; min-width: 230px; }
.field-label { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stepper button {
  width: 34px; border: 0; background: var(--surface-alt); color: var(--text);
  font-size: 1.05rem; font-family: inherit; cursor: pointer; transition: background .12s;
}
.stepper button:hover { background: var(--brand-soft); color: var(--brand-dark); }
.stepper input {
  width: 52px; border: 0; text-align: center; font-family: inherit; font-weight: 700;
  font-size: .95rem; color: var(--text); -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus, .stepper button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.seg { display: inline-flex; align-self: flex-start; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.seg button {
  border: 0; background: transparent; font-family: inherit; font-size: .78rem; font-weight: 600;
  color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--brand-dark); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---- reward priority presets ---- */
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 720px) { .preset-grid { grid-template-columns: 1fr; } }
.pcard {
  text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color .12s, box-shadow .12s;
}
.pcard:hover { border-color: var(--border-strong); }
.pcard.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pcard:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pcard .p-name { font-size: .8rem; font-weight: 700; color: var(--text); }
.pcard .p-ratio {
  font-size: .68rem; font-weight: 700; color: var(--brand-dark);
  background: var(--brand-soft); border-radius: 999px; padding: 1px 8px;
}
.pcard .p-mults { font-size: .68rem; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.pcard .p-mults button {
  font-family: inherit; font-size: .68rem; font-weight: 700; cursor: pointer;
  background: var(--surface-alt); color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px;
  transition: background .12s, color .12s, border-color .12s;
}
.pcard .p-mults button:hover { border-color: var(--brand); color: var(--text); }
.pcard .p-mults button.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.pcard .p-mults button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---- advanced + generate ---- */
select, input[type="number"] {
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text); border-radius: var(--radius); padding: 8px 10px;
  font-family: inherit; font-size: .9rem; width: 100%;
}
select:focus-visible, input[type="number"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.config-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.config-row label { font-size: .74rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.config-row .adv-name { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; color: var(--text); }
.config-row .range-ends { display: flex; justify-content: space-between; font-size: .68rem; color: var(--muted); }
.config-row input.w { max-width: 70px; }
.rangeval { color: var(--brand-dark); font-weight: 600; font-size: .78rem; }
.adv-hint { font-size: .72rem; color: var(--muted); margin: 10px 0 0; }
.advanced { margin-top: 16px; border-top: 1px solid var(--surface-alt); padding-top: 10px; }
.advanced summary {
  cursor: pointer; color: var(--muted); font-size: .8rem; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.advanced summary:hover { color: var(--text); }

.btn {
  font-family: inherit; font-size: 1em; font-weight: 600; color: #fff;
  background: var(--brand); border: 0; border-radius: var(--radius);
  padding: 11px 18px; display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--border); cursor: wait; transform: none; }
.btn:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.btn--ghost { background: transparent; color: var(--brand); padding: 6px 10px; font-size: .78em; }
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn--icon { font-size: 1.15rem; line-height: 1; padding: 4px 9px; }
.btn--block { width: 100%; justify-content: center; margin-top: 18px; font-size: 1.02em; }
.btn--gen { font-weight: 700; letter-spacing: .01em; }
.btn--gen .ic-gen { filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }

/* ---- result: schedule ---- */
/* dormant until the first schedule is generated */
.zone--result.dormant .card {
  background: transparent; box-shadow: none;
  border: 1.5px dashed var(--border);
}
.zone--result.dormant .card__title { opacity: .55; }
.zone--result.dormant .placeholder { border: 0; }

.result-meta { display: flex; align-items: center; gap: 10px; }
.mean-ppf { font-size: .78rem; color: var(--muted); }
.mean-ppf b { color: var(--text); font-weight: 700; }

.week-grid {
  display: grid; gap: 8px 10px; overflow-x: auto;
  /* breathing room so the 2px hover ring isn't clipped by overflow */
  padding: 3px 3px 6px;
  align-items: stretch;
}
.wg-head {
  margin: 0 0 2px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: var(--muted); text-align: center;
  background: var(--surface-alt); border-radius: 6px; padding: 6px 0;
}
.wg-empty { border: 1.5px dashed var(--border); border-radius: 8px; opacity: .4; }
.proto-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16,42,47,.06);
  padding: 10px 11px;
  transition: box-shadow .15s ease, transform .15s ease;
  animation: rise .3s ease both;
}
.proto-card { cursor: pointer; }
.proto-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
/* excluded from the coverage radar */
.proto-card.cov-off { opacity: .45; border-style: dashed; }
/* hover one protocol -> highlight its repetitions across the week */
.proto-card { transition: box-shadow .15s ease, transform .15s ease, opacity .15s ease; }
.week-grid.hovering .proto-card { opacity: .38; }
.week-grid.hovering .proto-card.hl {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--brand), var(--shadow-hover);
}
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.proto-card .pc-head { display: flex; gap: 8px; align-items: center; }
.proto-card .ticon { width: 46px; height: 34px; border-radius: 6px; font-size: .68rem; }
.proto-card .pname { font-size: .8rem; font-weight: 600; line-height: 1.3; }
.proto-card .pid { color: var(--muted); font-weight: 400; font-size: .68rem; }

.ppf-meter { display: grid; grid-template-columns: 26px 1fr 30px; align-items: center; gap: 6px; margin-top: 7px; }
.ppf-meter .t { font-size: .6rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.ppf-track { display: block; height: 6px; border-radius: 3px; background: var(--ppf-track); overflow: hidden; }
.ppf-fill { display: block; height: 100%; background: var(--brand); border-radius: 0 3px 3px 0; }
.ppf-num { font-size: .68rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.proto-card .chips { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 3px 8px; }
.proto-card .tdots { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 3px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .62rem; color: var(--muted); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--border-strong); }
.chip.m::before { background: var(--motor); }
.chip.c::before { background: var(--cognitive); }

/* ---- need-coverage radar ---- */
#coverageArea { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--surface-alt); }
#coverageArea h4 { margin: 0 0 4px; }
.cov-wrap { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.cov-svg { width: 320px; max-width: 100%; flex: none; }
.cov-grid { fill: none; stroke: var(--border); stroke-width: .7; opacity: .6; }
.cov-axis { stroke: var(--border); stroke-width: .7; opacity: .6; }
.cov-lab { font-size: 9px; font-weight: 600; font-family: var(--font); fill: var(--muted); }
.cov-lab.m { fill: var(--motor); }
.cov-lab.c { fill: var(--cognitive); }
.cov-max  { fill: none; stroke: var(--border-strong); stroke-width: 1.3; stroke-dasharray: 2 3; }
.cov-poly { fill: var(--brand); fill-opacity: .3; stroke: var(--brand); stroke-width: 1.6; }
.cov-def  { fill: none; stroke: var(--warn); stroke-width: 1.5; opacity: .85; }
.cov-need { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .75; }
/* hovered-similar overlay in the inspector radar */
.cov-alt { fill: rgba(91,108,196,.14); stroke: var(--cognitive); stroke-width: 1.7; stroke-dasharray: 5 3; }
.cov-legend .cl.alt { background: rgba(91,108,196,.25); border: 1.5px dashed var(--cognitive); }
.cov-side { flex: 1; min-width: 240px; }
.cov-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .72rem; color: var(--muted); margin-bottom: 10px; }
.cov-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.cov-legend .cl { display: inline-block; width: 16px; height: 10px; border-radius: 2px; }
.cov-legend .cl.def { background: none; border-top: 2px solid var(--warn); height: 0; opacity: .85; }
.cov-legend .cl.max { background: none; border-top: 2px dotted var(--border-strong); height: 0; }
.cov-legend .cl.need { background: none; border-top: 2px dashed var(--text); height: 0; opacity: .75; }
.cov-legend .cl.cov { background: var(--brand); opacity: .45; border: 1.5px solid var(--brand); }
.cov-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cov-chip {
  font-family: inherit; font-size: .74rem; font-weight: 600; cursor: pointer;
  background: var(--brand-soft); color: var(--brand-dark);
  border: 1.5px solid transparent; border-radius: 999px; padding: 4px 12px;
  transition: background .12s, color .12s, opacity .12s;
}
.cov-chip span { font-weight: 400; opacity: .75; }
.cov-chip:hover { border-color: var(--brand); }
.cov-chip.off { background: var(--surface-alt); color: var(--muted); text-decoration: line-through; opacity: .7; }
.cov-note { font-size: .7rem; color: var(--muted); margin: 10px 0 0; }

/* ---- explanation: clinician summary bar + research details ---- */
.explain-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding: 10px 14px;
  background: var(--surface-alt); border-radius: var(--radius-lg);
  font-size: .85rem;
}
.explain-summary b { font-weight: 700; }
.explain-warn {
  margin-top: 14px; padding: 9px 14px;
  border-radius: var(--radius); border-left: 3px solid var(--warn);
  background: #fbf1e5; color: #8a5416; font-size: .8rem;
}
#explainDetails { margin-top: 8px; }
#explainDetails.hidden { display: none; }

.explain-card {
  background: var(--surface-alt); border-radius: var(--radius-lg);
  padding: 16px 18px; margin-top: 14px; font-size: .85rem;
}
.explain-card h4:first-child { margin-top: 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, max-content)); gap: 4px 28px; color: var(--muted); font-size: .8rem; }
.kv span { display: block; }
.kv b { color: var(--text); font-weight: 700; font-size: .95rem; }
.kv .kvi { display: flex; flex-direction: column; }

.table { width: 100%; border-collapse: collapse; font-size: .82em; margin-top: 6px; }
.table th, .table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .72em; letter-spacing: .04em; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: #eef1f2; }

.explain-card .chips { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* retrieval view: one aligned list; similarity bars share a threshold tick */
.rank-chip {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.tm-out .rank-chip { background: var(--surface-alt); }

.tm-sim { display: inline-flex; align-items: center; gap: 8px; }
.tm-sim b { font-size: .74rem; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 30px; }
.sim-track {
  position: relative; flex: 1; height: 8px; border-radius: 4px;
  background: var(--surface-alt); overflow: visible;
}
.sim-fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  border-radius: 4px 2px 2px 4px; background: var(--brand);
}
.tm-out .sim-fill { background: var(--border-strong); }
.sim-tick {
  position: absolute; top: -3px; bottom: -3px; width: 0;
  border-left: 2px dashed var(--muted); transform: translateX(-1px);
}
.sim-tick-demo {
  display: inline-block; width: 0; height: 12px;
  border-left: 2px dashed var(--muted);
}
.tm-legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
  font-size: .7rem; color: var(--muted); margin: 8px 0 2px;
}
.tm-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.tm-legend .lg-chip { background: var(--brand); color: #fff; width: 16px; height: 16px; font-size: .6rem; }
.tm-legend .lg-diff { background: #eab676; width: 14px; height: 12px; }
.tm-out { opacity: .55; }
.tm-out .tm-row { cursor: default; }
.tm-out .tm-row:hover { background: transparent; }

/* live-preview banner while the threshold slider moves */
.rm-preview {
  margin: 8px 0 2px; padding: 7px 12px;
  border-radius: var(--radius); border-left: 3px solid var(--brand);
  background: var(--brand-soft); color: var(--brand-dark); font-size: .78rem;
}

/* transparency panel: memory rows with difference fingerprints.
   Fully fluid: fingerprint cells shrink with the viewport, so the list
   never needs a horizontal scrollbar. */
#transparencyPanel { margin-top: 10px; }
.tm-head, .tm-row {
  display: grid; grid-template-columns: 24px 72px max-content minmax(120px, 1fr) 84px 60px;
  align-items: center; gap: 12px;
}
.tm-head {
  font-size: .64rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin: 10px 0 4px; padding: 0 8px;
}
.tm-item + .tm-item { border-top: 1px solid var(--surface-alt); }
.tm-row { padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: .78rem; }
.tm-row:hover, .tm-row.hl { background: var(--brand-soft); }
.tm-id { font-weight: 600; white-space: nowrap; }
.tm-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.tm-caption { font-size: .7rem; color: var(--muted); margin: 8px 0 6px; }
.tm-fp, .fp-head { display: flex; gap: 2px; align-items: center; min-width: 0; }
.fp-lab {
  flex: none; width: 17px; overflow: hidden;
  text-align: center; font-size: 8.5px; font-weight: 600;
  color: var(--muted); text-transform: none; letter-spacing: 0;
}
.fp-lab.m { color: var(--motor); }
.fp-lab.c { color: var(--cognitive); }
.fp-cell { flex: none; width: 17px; height: 15px; border-radius: 3px; display: inline-block; }
.fp-div { flex: none; width: 1px; align-self: stretch; background: var(--border-strong); margin: 0 5px; }
.fp-none { font-size: .68rem; color: var(--muted); }
.tm-detail {
  background: var(--surface); border-left: 3px solid var(--brand);
  padding: 12px 14px; margin: 2px 0 8px; border-radius: 0 6px 6px 0;
  font-size: .85rem;
}
.tm-rejnote { font-size: .72rem; color: var(--muted); margin: 8px 0 2px; }

/* weight mini-bar inside the retrieval table */
.wcell { position: relative; }
.wtrack {
  display: inline-block; width: 46px; height: 5px; border-radius: 3px;
  background: var(--ppf-track); margin-right: 6px; vertical-align: 2px;
}
.wfill { display: block; height: 100%; border-radius: 0 2px 2px 0; background: var(--brand); }
.mem-row.hl { background: var(--brand-soft); }

/* memory inspector (expandable rows in the retrieval table) */
.mem-row { cursor: pointer; }
.mem-row .chev { display: inline-block; font-size: .68rem; color: var(--muted); transition: transform .15s ease; }
.mem-row.open .chev { transform: rotate(90deg); }
.mem-detail.hidden { display: none; }
.mem-detail > td { background: var(--surface); padding: 14px 16px; border-left: 3px solid var(--brand); }
/* compact memory story */
.mm-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-bottom: 10px; }
.mm-reward { font-size: .76rem; color: var(--muted); }
.mm-reward b { color: var(--text); }
.mm-body { display: flex; gap: 34px; flex-wrap: wrap; align-items: flex-start; }
.mm-block h4 { margin: 0 0 8px; }
.mm-sub { font-weight: 500; text-transform: none; letter-spacing: 0; }
.mm-cols { display: flex; gap: 4px; align-items: flex-end; }
.mm-col { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mm-col:nth-child(4) { margin-right: 9px; }
.mm-track { position: relative; width: 14px; height: 44px; background: var(--surface-alt); border-radius: 3px; }
.mm-fill { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 3px 3px 0 0; }
.mm-fill.m { background: var(--motor); }
.mm-fill.c { background: var(--cognitive); }
.mm-def { position: absolute; left: -2px; right: -2px; height: 0; border-top: 2px dashed var(--text); opacity: .55; }
.mm-lab { font-size: 7.5px; color: var(--muted); font-weight: 600; }
.mm-chips { display: flex; flex-wrap: wrap; gap: 5px; max-width: 360px; }
.mm-chip { font-size: .72rem; background: var(--surface-alt); border-radius: 999px; padding: 3px 10px; }
.md-ctx { font-size: .72rem; color: var(--muted); margin-top: 10px; }
.md-chips { font-size: .76rem; color: var(--muted); }
.md-chips b { color: var(--text); }

/* ---- game library modal (draft-style ban / promote) ---- */
.title-actions { display: flex; gap: 4px; }
.ic { flex: none; vertical-align: -1.5px; }
.mode-seg button, .btn--ghost { display: inline-flex; align-items: center; gap: 6px; }
.draft-summary {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;
  margin-top: 14px; font-size: .74rem; color: var(--muted);
}
.draft-summary .tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-weight: 600; font-size: .7rem;
}
.draft-summary .tag.ban { background: #f9e3e0; color: var(--danger); }
.draft-summary .tag.pro { background: #fdf3d8; color: #9a7208; }

.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26, 42, 48, .38);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 26px;
}
.modal.hidden { display: none; }
.modal-panel {
  --gold: #b8860b; --gold-soft: #fdf3d8;
  --ban-red: #c0392b; --ban-soft: #f9e3e0;
  width: min(1180px, 100%); max-height: 92vh;
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--text);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(16, 42, 47, .35);
  overflow: hidden;
  animation: modalIn .22s cubic-bezier(.2,.9,.3,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; } }

.modal-head {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.mh-title { flex: 1; min-width: 0; }
.modal-head h2 { margin: 0; font-size: 1.05rem; letter-spacing: .02em; }
.modal-head p { margin: 3px 0 0; font-size: .74rem; color: var(--muted); }
.modal-head input[type="search"] {
  width: 200px; background: var(--surface-alt); border: 1px solid var(--border);
  color: var(--text); border-radius: 999px; padding: 8px 14px;
  font-family: inherit; font-size: .82rem;
}
.modal-head input[type="search"]::placeholder { color: var(--muted); }
.modal-head input[type="search"]:focus-visible { outline: 2px solid var(--brand); }

.mode-seg { display: inline-flex; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.mode-seg button {
  border: 0; background: transparent; font-family: inherit; font-size: .78rem; font-weight: 700;
  color: var(--muted); padding: 7px 16px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s;
}
.mode-seg button.mode-ban.on { background: var(--ban-red); color: #fff; }
.mode-seg button.mode-pro.on { background: var(--gold); color: #fff; }
.mode-seg button:not(.on):hover { color: var(--text); }

.draft-strips { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.strip { display: flex; align-items: center; gap: 10px; padding: 10px 22px; min-height: 46px; }
.strip--ban { border-right: 1px solid var(--border); }
.strip-label { font-size: .64rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; flex: none; }
.strip--ban .strip-label { color: var(--ban-red); }
.strip--pro .strip-label { color: var(--gold); }
.strip-items { display: flex; flex-wrap: wrap; gap: 5px; }
.strip-empty { font-size: .72rem; color: var(--muted); opacity: .7; }
.strip-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .7rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  transition: border-color .12s;
}
.strip--ban .strip-chip { border-color: rgba(192,57,43,.45); color: var(--ban-red); }
.strip--pro .strip-chip { border-color: rgba(184,134,11,.45); color: var(--gold); }
.strip-chip:hover { border-color: currentColor; }
.strip-chip .x { opacity: .6; }

/* subskill filter chips */
.lib-dims {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 22px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.lib-dim {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: .72rem; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--muted);
  border: 1.5px solid var(--border); border-radius: 999px; padding: 4px 11px;
  transition: border-color .12s, color .12s, background .12s;
}
.lib-dim:hover { border-color: var(--border-strong); color: var(--text); }
.lib-dim.m.on { background: #f7ead9; border-color: var(--motor); color: #9c5613; }
.lib-dim.c.on { background: #e4e7f7; border-color: var(--cognitive); color: #47549c; }

.lib-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px; padding: 18px 22px; overflow-y: auto; flex: 1;
  background: var(--bg);
}
.lib-tile {
  position: relative; text-align: left; font-family: inherit;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 12px 10px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, filter .15s ease;
}
.lib-tile:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-hover); }
.lib-tile { display: flex; flex-direction: column; }
.lib-tile .thead { display: flex; gap: 10px; align-items: center; flex: 1; }
/* rectangular activity thumbnail (RGS style, ~4:3 landscape) */
.ticon {
  position: relative; width: 58px; height: 42px; border-radius: 7px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; letter-spacing: .02em; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(16,42,47,.06);
}
.ticon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lib-tile .tname { font-size: .8rem; font-weight: 700; line-height: 1.25; }
/* one aligned meta row: id left, trained-dimension dots right (names on hover) */
.lib-tile .tmeta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.lib-tile .tid { font-size: .64rem; color: var(--muted); }
.lib-tile .tdots { display: inline-flex; gap: 3px; }
.dim-mini { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.dim-mini.m { background: var(--motor); }
.dim-mini.c { background: var(--cognitive); }
.lib-tile .tstats {
  display: flex; align-items: baseline; gap: 8px; margin-top: 7px;
  padding-top: 7px; border-top: 1px solid var(--surface-alt);
  font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.lib-tile .ts-adh { margin-left: auto; }
.lib-tile .ts-plays { font-weight: 700; color: var(--text); }
.lib-tile .ts-trend { font-weight: 700; }
.lib-tile .ts-trend.up { color: var(--ok); }
.lib-tile .ts-trend.down { color: var(--danger); }
.lib-tile .ts-trend.flat { color: var(--muted); }
.lib-tile .ts-never { font-style: italic; opacity: .8; }
.lib-tile .state-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: .72rem; font-weight: 800; display: none;
}
/* banned: washed out + red strike */
.lib-tile.banned { filter: grayscale(.9); opacity: .75; background: var(--ban-soft); border-color: var(--ban-red); }
.lib-tile.banned::after {
  content: ""; position: absolute; inset: 0; border-radius: 8px;
  background:
    linear-gradient(45deg, transparent calc(50% - 1px), var(--ban-red) calc(50% - 1px), var(--ban-red) calc(50% + 1px), transparent calc(50% + 1px));
  pointer-events: none; opacity: .55;
}
.lib-tile.banned .state-badge { display: block; color: var(--ban-red); }
/* promoted: gold ring + star */
.lib-tile.promoted { background: var(--gold-soft); border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 4px 14px rgba(184,134,11,.22); }
.lib-tile.promoted .state-badge { display: block; color: var(--gold); }
.lib-tile.dimmed { opacity: .25; pointer-events: none; }

/* activity inspector (right-click) — overlays the library grid */
.inspector {
  position: absolute; inset: 0; z-index: 5; overflow-y: auto;
  background: var(--surface); padding: 16px 22px;
  animation: modalIn .18s cubic-bezier(.2,.9,.3,1);
}
.insp-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--surface-alt);
}
.insp-head .ticon { width: 86px; height: 62px; border-radius: 9px; font-size: 1rem; }
.insp-head h2 { margin: 0 0 4px; font-size: 1.05rem; }
.insp-head .pid { color: var(--muted); font-weight: 400; font-size: .78rem; }
.insp-head > button { margin-left: auto; }
.insp-grid {
  display: grid; gap: 12px; align-items: stretch;
  grid-template-columns: 1.1fr 1fr 1fr;
  grid-template-areas: "trains match stats" "history history sims";
}
@media (max-width: 1000px) {
  .insp-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "trains match" "history history" "stats sims"; }
}
@media (max-width: 640px) {
  .insp-grid { grid-template-columns: 1fr; grid-template-areas: "trains" "match" "history" "stats" "sims"; }
  .inspector { padding: 14px 16px; }
}
/* session history chart */
.hs-svg { width: 100%; height: auto; display: block; }
.hs-grid { stroke: var(--border); stroke-width: .6; opacity: .6; }
.hs-vgrid { opacity: .35; }
.hs-tick { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.hs-wk { font-size: 8.5px; opacity: .75; }
.hs-axis { font-size: 10.5px; font-weight: 600; fill: var(--muted); font-family: var(--font); }
.hs-line { fill: none; stroke-width: 2; }
.hs-line.hs-adh { stroke: var(--brand); }
.hs-line.hs-dm { stroke: var(--cognitive); }
.hs-dot { stroke: var(--surface); stroke-width: 1.4; }
.hs-dot.hs-adh { fill: var(--brand); }
.hs-dot.hs-dm { fill: var(--cognitive); }
.hs-legend { margin-top: 2px; }
.hs-legend .cl.hs-c-adh { background: var(--brand); height: 3px; border-radius: 2px; }
.hs-legend .cl.hs-c-dm { background: var(--cognitive); height: 3px; border-radius: 2px; }
.insp-card { background: var(--surface-alt); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.insp-card .bars { gap: 4px; }
.insp-card h4 { margin: 0 0 10px; }
.insp-card .bar-row { font-size: .76rem; }
.bar-zero { opacity: .4; }
/* hovered-similar ghost bar + value in the Trains panel */
.bar-track { position: relative; }
.bar-gain {
  position: absolute; top: 0; bottom: 0;
  border-radius: 0 4px 4px 0; outline-offset: -1px;
}
.bar-row.motor .bar-gain {
  background: rgba(201, 113, 29, .45); outline: 1px dashed var(--motor);
}
.bar-row.cognitive .bar-gain {
  background: rgba(91, 108, 196, .45); outline: 1px dashed var(--cognitive);
}
.bar-loss {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.85) 0 3px, transparent 3px 6px);
}
.bar-delta { font-style: normal; font-weight: 700; margin-left: 5px; font-size: .7rem; }
.bar-row.motor .bar-delta.pos { color: var(--motor); }
.bar-row.cognitive .bar-delta.pos { color: var(--cognitive); }
.bar-delta.neg { color: var(--muted); }
.insp-match { display: flex; flex-direction: column; align-items: center; }
.insp-match h4 { align-self: flex-start; }
.insp-match .cov-svg { max-width: 300px; }
.insp-match .cov-legend { justify-content: center; margin-top: 4px; }
.insp-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.insp-kpi {
  background: var(--surface); border-radius: 8px; padding: 8px 11px;
  display: flex; flex-direction: column; gap: 2px;
}
.insp-kpi b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.insp-kpi span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.insp-never { font-size: .8rem; color: var(--muted); grid-column: 1 / -1; }
.insp-sims { display: flex; flex-direction: column; gap: 6px; }
.insp-sim {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  font-family: inherit; font-size: .8rem; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1.5px solid transparent; border-radius: 8px; padding: 6px 10px;
}
.insp-sim:hover { border-color: var(--brand); }
.insp-sim .ticon { width: 40px; height: 29px; border-radius: 5px; font-size: .6rem; }
.insp-sim .is-name { flex: 1; }
.insp-sim .is-pct { color: var(--brand-dark); font-weight: 700; font-size: .74rem; }
.inspector .cov-svg { max-width: 300px; }

.modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; border-top: 1px solid var(--border);
}
.lib-count { font-size: .74rem; color: var(--muted); }

/* star marker on schedule cards for promoted games */
.proto-card .pname .star { color: #b8860b; font-size: .72rem; }

/* ---- placeholder + misc ---- */
.placeholder {
  color: var(--muted); text-align: center; padding: 44px 10px; line-height: 1.8;
  border: 1.5px dashed var(--border); border-radius: var(--radius-lg); font-size: .9rem;
}
.placeholder .ph-icon { font-size: 1.6rem; opacity: .45; margin-bottom: 4px; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.foot { text-align: center; color: var(--muted); font-size: .74rem; padding: 14px 16px 20px; }
