/* ============================================================================
   Remi Data Room — xREMI interactive model pages (overview · tokenomics · staking)
   ----------------------------------------------------------------------------
   Loaded AFTER dataroom.css, ONLY on the three xREMI pages. Adds the few pieces
   the core DS doesn't carry: themed range sliders, the control panel layout, and
   live calculator stat cards / chart frames. Everything is namespaced `.xr-*`
   and built from DS tokens, so the shared DS files stay byte-identical to
   upstream and both Paper/Ink themes are honoured automatically.
   ============================================================================ */

/* model layout — control column + outputs */
.xr-model { display: grid; gap: clamp(1.4rem, 3vw, 2rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1040px) { .xr-model { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); } }

/* control panel — a flat bordered surface that echoes .bpanel--bare */
.xr-controls {
  border: 1px solid var(--remi-line); border-radius: var(--radius-lg);
  background: var(--remi-surface); padding: clamp(1.3rem, 2.4vw, 1.7rem);
}
.xr-controls__title {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--remi-accent);
  margin: 0 0 1.3rem; padding-bottom: .8rem; border-bottom: 1px solid var(--remi-line);
}
.xr-fields { display: grid; gap: 1.3rem; }
.xr-field { display: grid; gap: .5rem; }
.xr-field__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.xr-field__label { font-size: .9rem; font-weight: 600; color: var(--remi-ink); letter-spacing: var(--ls-snug); }
.xr-field__val { font-family: var(--font-mono); font-weight: 600; font-size: .95rem; color: var(--remi-accent); white-space: nowrap; }

/* themed range slider — token-driven track + thumb, works in Paper & Ink */
.xr-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  border-radius: var(--radius-pill); outline: none; cursor: pointer;
  background: var(--remi-surface-2); border: 1px solid var(--remi-line);
}
.xr-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--remi-accent); border: 2px solid var(--remi-surface);
  box-shadow: 0 0 0 1px var(--remi-accent-border); cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.xr-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.xr-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--remi-accent);
  border: 2px solid var(--remi-surface); box-shadow: 0 0 0 1px var(--remi-accent-border); cursor: pointer;
}
.xr-range:focus-visible { box-shadow: var(--focus-ring); }

/* allocation total row */
.xr-total {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: .3rem; padding-top: 1.1rem; border-top: 1px solid var(--remi-line);
  font-weight: 700; font-size: 1.02rem; color: var(--remi-ink); letter-spacing: var(--ls-snug);
}
.xr-total__val { font-family: var(--font-mono); color: var(--remi-success); }
.xr-total__val.is-off { color: var(--remi-danger); }

/* live output stat cards (calculator results) */
.xr-stats { display: grid; gap: clamp(1rem, 2vw, 1.4rem); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.xr-stat {
  display: flex; gap: 1rem; align-items: flex-start;
  border: 1px solid var(--remi-line); border-radius: var(--radius-md);
  background: var(--remi-surface); padding: 1.2rem 1.3rem;
}
.xr-stat__icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  color: var(--remi-accent); background: var(--remi-accent-soft); border: 1px solid var(--remi-accent-border);
}
.xr-stat__icon svg { width: 20px; height: 20px; }
.xr-stat__k { font: 600 .66rem var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--remi-muted-2); margin: 0 0 .35rem; }
.xr-stat__v { font-family: var(--font-mono); font-weight: 600; font-size: 1.4rem; letter-spacing: -.01em; color: var(--remi-ink); margin: 0; }
.xr-stat__v.is-accent { color: var(--remi-accent); }

/* chart frame */
.xr-chart { border: 1px solid var(--remi-line); border-radius: var(--radius-md); background: var(--remi-surface); padding: 1.3rem; }
.xr-chart__title { font-size: 1.08rem; font-weight: 700; letter-spacing: var(--ls-snug); color: var(--remi-ink); margin: 0 0 1rem; }
.xr-chart .chart-box { height: 400px; }
.xr-chart .chart-box--tall { height: 420px; }

/* numeric emphasis inside .dr-table generated rows */
.dr-table td .xr-pos { color: var(--remi-success); font-weight: 600; }
.dr-table td strong { color: var(--remi-ink); font-weight: 700; }
