* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-content: center;
  gap: 18px;
  padding: 32px;
  background: radial-gradient(circle at 50% 42%, #222a23 0, var(--bg) 46%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.app-loader.is-finished {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loader-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border: 1px solid rgba(105, 185, 31, 0.55);
  border-radius: 14px;
  background: rgba(105, 185, 31, 0.12);
  color: #a8e76c;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.app-loader-copy {
  display: grid;
  gap: 5px;
  text-align: center;
}

.app-loader-copy strong {
  font-size: 18px;
}

.app-loader-copy span {
  color: var(--muted);
  font-size: 14px;
}

.app-loader-progress {
  width: min(280px, 72vw);
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.app-loader-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  animation: app-loader-progress 900ms ease-in-out infinite alternate;
}

@keyframes app-loader-progress {
  from { transform: translateX(-15%); }
  to { transform: translateX(155%); }
}

@media (prefers-reduced-motion: reduce) {
  .app-loader-progress span {
    animation: none;
    width: 100%;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  color: var(--text);
}

button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #2a2e34;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

button:hover {
  border-color: #4d5662;
  background: #333840;
}

button:active {
  transform: translateY(1px);
}

:where(button, input, select, textarea, a, [role="button"]):focus-visible {
  outline: 3px solid #8bd9ff;
  outline-offset: 3px;
}

a {
  color: #7dcdf0;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border: 2px solid #8bd9ff;
  border-radius: 6px;
  background: #141619;
  color: var(--text);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 120ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #46505b;
  border-radius: 8px;
  background: #20252a;
  color: var(--green);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-block h1,
.brand-block p,
.panel h2,
.panel p {
  margin: 0;
}

.brand-block h1 {
  font-size: 25px;
  line-height: 1.05;
}

.brand-block p,
.panel p,
.profile-meta,
.range-text,
.status-line {
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar button,
.toolbar select,
.ghost-btn {
  min-height: 38px;
  padding: 0 12px;
}

.primary-action {
  border-color: var(--green);
  background: rgba(105, 185, 31, 0.18);
  color: #dff6c6;
  font-weight: 800;
}

.primary-action:hover {
  background: rgba(105, 185, 31, 0.28);
}

.toolbar select,
.input-card select,
.meta-editor select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #24282e;
}

main {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.view-block {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.view-block[hidden] {
  display: none;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.hero-left .radar-panel {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(460px, 620px) minmax(0, 1fr);
  gap: 18px 28px;
  align-items: center;
}

.hero-left .radar-panel canvas {
  width: 100%;
  max-width: 620px;
  margin: auto;
}

.hero-left .radar-panel .insight-columns {
  margin-top: 0;
}

.hero-left .radar-panel > .panel-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.insight-evidence {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.profile-panel {
  padding: 18px;
}

.athlete-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 8px;
  background: #2f3a2f;
  color: #ceff9a;
  font-size: 31px;
  font-weight: 900;
}

.identity {
  min-width: 0;
  flex: 1;
}

.name-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  outline: none;
}

.name-input:focus {
  border-bottom-color: var(--cyan);
}

.profile-meta {
  margin-top: 4px;
  font-size: 15px;
}

.archetype {
  margin-top: 8px;
  color: #dce8f5;
  font-size: 14px;
}

.hero-score {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: stretch;
  justify-content: space-between;
  margin-top: 16px;
}

.hero-ovr {
  display: grid;
  gap: 10px;
  flex: 1 1 300px;
  min-width: 0;
}

.hero-ovr > button {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.hero-ovr-number {
  display: inline-grid;
  min-width: 108px;
  min-height: 96px;
  place-items: center;
  border-radius: 12px;
  color: #07120a;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hero-ovr-number.is-estimate {
  background: transparent;
  border: 2px dashed currentColor;
  font-size: 46px;
}

.hero-ovr-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hero-ovr-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-ovr-tier {
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
}

.hero-ovr-sub {
  color: var(--muted);
  font-size: 12.5px;
}

.delta-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: #20242a;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.delta-chip-up {
  border-color: rgba(105, 185, 31, 0.5);
  background: rgba(105, 185, 31, 0.12);
  color: #9ade52;
}

.delta-chip-down {
  border-color: rgba(234, 57, 57, 0.5);
  background: rgba(234, 57, 57, 0.1);
  color: #ff8a8a;
}

.delta-chip-cta {
  border-color: rgba(244, 196, 49, 0.55);
  background: rgba(244, 196, 49, 0.1);
  color: var(--yellow);
  cursor: pointer;
}

.delta-chip-cta:hover {
  background: rgba(244, 196, 49, 0.18);
  border-color: var(--yellow);
}

.delta-chip-inline {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.hero-side-scores {
  display: grid;
  gap: 8px;
  align-content: start;
}

.hero-side-score {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #20242a;
  text-align: left;
}

.hero-side-score .mini-score {
  min-width: 40px;
  font-size: 16px;
}

.hero-side-copy {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}

.hero-side-copy strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.side-delta {
  font-size: 12.5px;
  font-style: normal;
  font-weight: 800;
}

.side-delta-up {
  color: #9ade52;
}

.side-delta-down {
  color: #ff8a8a;
}

.side-delta-flat {
  color: var(--muted-2);
}

.hero-caps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 16px;
}

.cap-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #1e2227;
  text-align: left;
}

.cap-chip .mini-score {
  min-width: 30px;
  padding: 2px 4px;
  font-size: 12.5px;
}

.cap-chip-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.cap-chip-label {
  overflow: hidden;
  flex: 1 1 auto;
  color: #dfe9f2;
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cap-chip-copy small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cap-context {
  min-width: 38px !important;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 9px !important;
}

.cap-chip-delta {
  flex: 0 0 auto;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.cap-delta-up {
  color: #9ade52;
}

.cap-delta-down {
  color: #ff8a8a;
}

.rating-number {
  display: inline-grid;
  min-width: 52px;
  min-height: 44px;
  place-items: center;
  border-radius: 6px;
  color: #07120a;
  font-size: 28px;
  font-weight: 900;
}

.confidence-band {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.band-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.progress-track {
  height: 9px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #101215;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.range-text {
  margin-top: 7px;
  font-size: 13px;
}

.insight-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.insight-columns h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.plain-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #d7e1eb;
  font-size: 14px;
}

.mini-score {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 2px 6px;
  border-radius: 5px;
  color: #061008;
  text-align: center;
  font-weight: 800;
}

.radar-panel {
  display: grid;
  grid-template-columns: minmax(420px, 620px) minmax(0, 1fr);
  gap: 18px 28px;
  align-items: center;
  padding: 16px;
}

.radar-panel > .panel-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.radar-panel canvas {
  max-width: 620px;
  margin: auto;
}

.radar-panel .insight-columns {
  margin-top: 0;
}

.body-panel {
  overflow: hidden;
  min-height: 620px;
  padding: 16px;
}

.body-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

.body-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.body-disclosure-summary::-webkit-details-marker {
  display: none;
}

.body-disclosure-summary span {
  display: grid;
  gap: 3px;
}

.body-disclosure-summary strong {
  color: var(--text);
  font-size: 16px;
}

.body-disclosure-summary small,
.body-disclosure-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.body-disclosure-summary em {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
  color: #dce6ef;
}

.body-panel[open] .body-disclosure-summary em {
  color: var(--green-2);
  font-size: 0;
}

.body-panel[open] .body-disclosure-summary em::after {
  content: "Cerrar mapa";
  font-size: 12px;
}

.body-panel[open] .body-inner {
  min-height: 720px;
}

.body-panel .body-map {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.body-panel .body-map > :not(.body-map-stage) {
  display: none;
}

.body-map-disclaimer {
  margin: 10px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.panel h2 {
  font-size: 18px;
}

.panel p {
  margin-top: 4px;
  font-size: 13px;
}

.ghost-btn {
  flex: 0 0 auto;
  color: #dce6ef;
}

canvas {
  display: block;
  width: 100%;
  max-width: 100%;
}

.body-map {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.body-map-stage {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 480px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 20%, rgba(64, 72, 82, 0.34), rgba(17, 20, 24, 0) 44%), #111418;
}

.body-atlas-svg {
  display: block;
  width: 100%;
  max-width: 272px;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.45));
}

.body-muscle {
  stroke: #39434e;
  stroke-width: 1.05;
  transition: fill 140ms ease, stroke 140ms ease, opacity 140ms ease;
}

.body-muscle-zone {
  cursor: pointer;
  stroke: rgba(9, 12, 15, 0.5);
  stroke-width: 1.25;
}

.body-muscle-zone:hover,
.body-zone-hit:hover .body-muscle-zone,
.body-zone-hit:focus-visible .body-muscle-zone {
  stroke: #eaf2fb;
  stroke-width: 2.4;
  outline: none;
}

.body-zone-hit {
  cursor: pointer;
  outline: none;
}

.body-muscle-active {
  stroke: rgba(246, 250, 255, 0.5);
  stroke-width: 1.7;
}

.body-muscle-muted {
  opacity: 0.48;
}

.body-muscle-joint,
.body-muscle-structure {
  stroke-width: 1.45;
}

.body-joint {
  cursor: pointer;
  stroke: rgba(8, 10, 12, 0.85);
  stroke-width: 2;
  transition: fill 140ms ease, stroke 140ms ease;
}

.body-joint-active {
  stroke: rgba(246, 250, 255, 0.6);
}

.body-joint-muted {
  opacity: 0.55;
}

.body-joint:hover,
.body-zone-hit:hover .body-joint,
.body-zone-hit:focus-visible .body-joint {
  stroke: #eaf2fb;
  outline: none;
}

.body-joint-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.26);
  stroke-width: 1.4;
  pointer-events: none;
}

.body-view-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.body-view-title {
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  padding: 5px 9px;
  background: rgba(24, 28, 33, 0.82);
  color: #dce8f5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.body-view-nav {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.body-view-nav button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(36, 40, 46, 0.86);
  color: #dce8f5;
  font-size: 20px;
  font-weight: 900;
}

.body-view-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.body-view-tabs button {
  min-height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #20242a;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.body-view-tabs button.is-active {
  border-color: rgba(143, 217, 239, 0.52);
  background: rgba(34, 167, 199, 0.14);
  color: #dff7ff;
}

.body-zone-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.body-zone-modes button {
  min-height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #181c21;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.body-zone-modes button.is-active {
  border-color: rgba(244, 196, 49, 0.54);
  background: rgba(244, 196, 49, 0.12);
  color: #fff2bd;
}

.body-region-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.body-region-tabs button {
  display: grid;
  min-width: 0;
  min-height: 38px;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 7px;
  background: #181c21;
  text-align: left;
}

.body-region-tabs button.is-active {
  border-color: rgba(34, 167, 199, 0.52);
  background: rgba(34, 167, 199, 0.12);
}

.body-region-tabs span {
  overflow: hidden;
  color: #dfe9f2;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.body-region-tabs small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.body-map-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 4px 10px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 9px 10px;
  background: #20242a;
  text-align: left;
}

.body-map-focus-joint {
  border-left-color: var(--cyan);
}

.body-map-focus-structure {
  border-left-color: var(--yellow);
}

.body-map-focus-muscle {
  border-left-color: var(--orange);
}

.body-map-focus span,
.body-map-focus em {
  min-width: 0;
}

.body-map-focus small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.body-map-focus strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #dfe9f2;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.body-map-focus b {
  justify-self: end;
  font-size: 18px;
  font-weight: 900;
}

.body-map-focus em {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.body-silhouette {
  fill: rgba(30, 36, 43, 0.78);
  stroke: rgba(151, 168, 185, 0.34);
  stroke-width: 1.4;
}

.body-map-grid path {
  fill: none;
  stroke: rgba(159, 172, 187, 0.08);
  stroke-width: 1;
}

.body-panel-frame {
  fill: rgba(10, 12, 15, 0.18);
  stroke: rgba(159, 172, 187, 0.1);
  stroke-width: 1;
}

.body-fiber,
.body-detail-lines path {
  fill: none;
  pointer-events: none;
  stroke: rgba(243, 247, 251, 0.38);
  stroke-linecap: round;
  stroke-width: 1.1;
}

.body-fiber-soft {
  opacity: 0.42;
}

.body-joint-rings circle {
  fill: none;
  pointer-events: none;
  stroke: rgba(243, 247, 251, 0.34);
  stroke-dasharray: 3 4;
  stroke-width: 1.2;
}

.zone-label {
  pointer-events: none;
  fill: rgba(230, 238, 247, 0.92);
  font-size: 10px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(8, 10, 12, 0.74);
  stroke-width: 3px;
  text-transform: uppercase;
}

.body-view-label {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.body-map-legend text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.body-zone-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.body-zone-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 7px 8px;
  background: #20242a;
  text-align: left;
}

.body-zone-chip span {
  display: block;
  overflow: hidden;
  color: #dfe9f2;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.body-zone-chip small {
  display: block;
  margin-bottom: 1px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.body-zone-chip-joint {
  border-color: rgba(143, 217, 239, 0.24);
}

.body-zone-chip-structure {
  border-color: rgba(244, 196, 49, 0.24);
}

.body-zone-chip strong {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
}

.body-atlas-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: #181c21;
}

.body-atlas-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.body-atlas-head small,
.body-atlas-head em {
  color: var(--muted-2);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.body-atlas-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
}

.body-atlas-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.body-atlas-stat {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  padding: 7px 8px;
  background: #20242a;
  text-align: left;
}

.body-atlas-stat-joint {
  border-left-color: var(--cyan);
}

.body-atlas-stat-structure {
  border-left-color: var(--yellow);
}

.body-atlas-coverage {
  border-left-color: var(--green-2);
}

.body-atlas-stat small {
  grid-column: 1 / -1;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.body-atlas-stat strong {
  overflow: hidden;
  color: #dfe9f2;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.body-atlas-stat span {
  font-size: 14px;
  font-weight: 900;
}

.body-atlas-list {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 2px;
}

.body-atlas-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid rgba(238, 123, 26, 0.62);
  border-radius: 8px;
  padding: 7px 8px;
  background: #20242a;
  text-align: left;
}

.body-atlas-row-joint {
  border-left-color: rgba(34, 167, 199, 0.7);
}

.body-atlas-row-structure {
  border-left-color: rgba(244, 196, 49, 0.7);
}

.body-atlas-kind {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.body-atlas-name {
  min-width: 0;
}

.body-atlas-name strong,
.body-atlas-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.body-atlas-name strong {
  color: #dfe9f2;
  font-size: 12px;
}

.body-atlas-name small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.body-atlas-row b {
  justify-self: end;
  font-size: 14px;
  font-weight: 900;
}

.body-zone-empty {
  grid-column: 1 / -1;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 10px;
  background: #20242a;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.body-map-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.body-map-note span {
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  padding: 3px 7px;
  background: #20242a;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
}

.activity-panel,
.score-explanation-panel {
  padding: 16px;
}

.score-explanation-panel > summary,
.assessment-main-summary,
.data-analysis-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.score-explanation-panel > summary::-webkit-details-marker,
.assessment-main-summary::-webkit-details-marker,
.data-analysis-summary::-webkit-details-marker {
  display: none;
}

.score-explanation-panel > summary span,
.assessment-main-summary span,
.data-analysis-summary span {
  display: grid;
  gap: 3px;
}

.score-explanation-panel > summary strong,
.assessment-main-summary strong,
.data-analysis-summary strong {
  color: var(--text);
  font-size: 16px;
}

.score-explanation-panel > summary small,
.score-explanation-panel > summary em,
.assessment-main-summary small,
.assessment-main-summary em,
.data-analysis-summary small,
.data-analysis-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.score-explanation-panel > summary em,
.assessment-main-summary em,
.data-analysis-summary em {
  flex: 0 0 auto;
  color: #dce6ef;
}

.score-explanation-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.data-analysis-panel {
  padding: 16px;
}

.data-analysis-body {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.analysis-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #1b1f24;
}

.rating-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rating-card button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.rating-card .rating-number {
  min-width: 44px;
  min-height: 38px;
  font-size: 24px;
}

.rating-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rating-confidence {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.rating-title {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
}

.rating-caption {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.rating-decision {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.rating-decision-urgent {
  background: rgba(234, 57, 57, 0.14);
  color: #ff8a8a;
}

.rating-decision-watch {
  background: rgba(244, 196, 49, 0.13);
  color: #f3d08a;
}

.rating-decision-normal {
  background: rgba(47, 168, 79, 0.13);
  color: #94d77e;
}

.rating-decision-strong {
  background: rgba(105, 185, 31, 0.16);
  color: #b9f28f;
}

.rating-limiter {
  display: block;
  margin-top: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 7px;
  color: #dce6ef;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(320px, 0.9fr) minmax(340px, 1fr);
  gap: 18px;
}

.diagnostic-grid-two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.diagnostic-panel {
  padding: 16px;
}

.score-breakdown,
.data-quality-panel,
.next-tests-panel {
  display: grid;
  gap: 12px;
}

.breakdown-headline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.breakdown-headline div {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: #20242a;
}

.breakdown-headline span,
.penalty-stack span,
.quality-row span,
.quality-foot span,
.next-test-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.next-test-row .protocol-badge {
  margin-top: 3px;
  color: #8fd9ef;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.breakdown-headline strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.breakdown-meter,
.thin-track {
  overflow: hidden;
  border-radius: 99px;
  background: #101215;
}

.breakdown-meter {
  height: 10px;
}

.breakdown-meter span,
.thin-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.penalty-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.penalty-stack div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  padding: 6px 0;
}

.penalty-stack strong {
  color: #f3d08a;
  font-size: 13px;
}

.priority-list,
.quality-bars {
  display: grid;
  gap: 7px;
}

.priority-list.compact {
  gap: 5px;
}

.penalty-row,
.next-test-row {
  display: grid;
  width: 100%;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #20242a;
  text-align: left;
}

.penalty-row {
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
}

.penalty-row span,
.next-test-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.penalty-row strong {
  color: #f3d08a;
  text-align: right;
}

.quality-status {
  border-left: 3px solid var(--cyan);
  padding-left: 10px;
}

.quality-status strong {
  display: block;
  font-size: 18px;
}

.quality-status span {
  display: block;
  margin-top: 4px;
  color: #cbd6e1;
  font-size: 13px;
  line-height: 1.35;
}

.quality-row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.quality-row div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.quality-row strong {
  color: var(--text);
  font-size: 13px;
}

.thin-track {
  height: 7px;
}

.quality-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quality-foot span {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 8px;
  color: #dce6ef;
}

.next-test-row {
  grid-template-columns: 28px minmax(0, 1fr) 52px;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px;
}

.next-test-row .rank {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: #303640;
  color: #dce6ef;
  font-weight: 900;
}

.next-test-row em {
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.priority-plan-panel {
  padding: 16px;
}

.target-panel {
  padding: 16px;
}

.priority-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-lane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: #20242a;
}

.plan-lane-head span,
.plan-lane-head small,
.plan-copy small {
  display: block;
  color: var(--muted);
}

.plan-lane-head span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.plan-lane-head strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.plan-lane-head small {
  margin-top: 5px;
  min-height: 34px;
  font-size: 12px;
  line-height: 1.35;
}

.plan-rows {
  display: grid;
  align-content: start;
  gap: 8px;
}

.plan-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 86px;
  gap: 10px;
  width: 100%;
  min-height: 74px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 9px 10px;
  background: #181b1f;
  text-align: left;
}

div.plan-row {
  cursor: default;
}

.plan-row-urgent {
  border-left-color: var(--red);
}

.plan-row-watch {
  border-left-color: var(--yellow);
}

.plan-row-normal {
  border-left-color: var(--cyan);
}

.plan-marker {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  background: #303640;
  color: #dce6ef;
  font-weight: 900;
}

.plan-copy {
  min-width: 0;
}

.plan-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-copy small {
  overflow: hidden;
  max-height: 50px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.plan-row em {
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: right;
  text-transform: uppercase;
  white-space: normal;
}

.plan-row-urgent em {
  color: #ff8a8a;
}

.plan-row-watch em {
  color: #f3d08a;
}

.target-board {
  display: grid;
  gap: 12px;
}

.target-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 11px 12px;
  background: #20242a;
}

.target-summary strong {
  color: var(--text);
  font-size: 16px;
}

.target-summary span,
.target-disclaimer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.target-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.target-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 154px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 11px;
  background: #20242a;
  text-align: left;
}

.target-card-urgent {
  border-left-color: var(--red);
}

.target-card-watch {
  border-left-color: var(--yellow);
}

.target-card-normal {
  border-left-color: var(--cyan);
}

.target-card-strong {
  border-left-color: var(--green-2);
}

.target-card-head {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.target-card-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-card-head em {
  color: var(--muted-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.target-scoreline {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.target-scoreline b {
  display: grid;
  min-width: 34px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  color: #061008;
  font-size: 15px;
  font-weight: 900;
}

.target-scoreline i {
  color: var(--muted-2);
  font-style: normal;
  font-weight: 900;
}

.target-values {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.target-values span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.target-values strong {
  overflow: hidden;
  color: #dce8f5;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-card small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.target-disclaimer {
  margin: 0;
}

.reliability-panel {
  padding: 16px;
}

.reliability-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.reliability-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.reliability-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.legend-measured {
  background: var(--green-2);
}

.legend-wearable {
  background: var(--cyan);
}

.legend-estimated {
  background: var(--yellow);
}

.legend-subjective {
  background: var(--blue);
}

.reliability-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.reliability-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 122px;
  border-left: 3px solid var(--cyan);
  padding: 11px;
  background: #20242a;
  text-align: left;
}

.reliability-weak {
  border-left-color: var(--red);
}

.reliability-watch {
  border-left-color: var(--yellow);
}

.reliability-strong {
  border-left-color: var(--green-2);
}

.reliability-head,
.reliability-scores {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reliability-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reliability-head em {
  color: var(--muted-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.reliability-scores span {
  min-width: 0;
}

.reliability-scores b,
.reliability-scores small {
  display: block;
}

.reliability-scores b {
  color: #dce6ef;
  font-size: 16px;
  line-height: 1;
}

.reliability-scores small {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.reliability-bars {
  display: flex;
  overflow: hidden;
  height: 7px;
  border-radius: 99px;
  background: #101215;
}

.reliability-bars span {
  min-width: 0;
  height: 100%;
}

.bar-measured {
  background: var(--green-2);
}

.bar-wearable {
  background: var(--cyan);
}

.bar-estimated {
  background: var(--yellow);
}

.bar-subjective {
  background: var(--blue);
}

.reliability-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #cdd7e2;
  font-size: 12px;
  line-height: 1.3;
}

.reliability-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reliability-foot em {
  color: var(--muted-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.two-column > .panel,
.data-panel,
.source-panel {
  padding: 16px;
}

.progress-panel {
  padding: 16px;
}

.metric-trends-panel {
  padding: 16px;
}

.longitudinal-panel {
  padding: 16px;
}

.longitudinal-assessment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.longitudinal-assessment > .empty-state,
.metric-trends > .empty-state {
  grid-column: 1 / -1;
}

.longitudinal-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 11px 12px;
  background: #181b1f;
  text-align: left;
}

.longitudinal-card-up {
  border-left-color: var(--green-2);
}

.longitudinal-card-down {
  border-left-color: var(--red);
}

.longitudinal-card-watch {
  border-left-color: var(--yellow);
}

.longitudinal-card-stable {
  border-left-color: var(--muted-2);
}

.longitudinal-card-head,
.longitudinal-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.longitudinal-card-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.longitudinal-card-head em {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.longitudinal-card-title {
  color: #dfe9f2;
  font-size: 14px;
  font-weight: 900;
}

.longitudinal-card-detail,
.longitudinal-card-foot,
.longitudinal-boundary {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.longitudinal-card-foot {
  padding-top: 3px;
  border-top: 1px solid var(--line-soft);
}

.longitudinal-boundary {
  margin: 10px 0 0;
}

.metric-longitudinal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  margin: 10px 0;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 10px;
  background: #181b1f;
}

.metric-longitudinal > span small,
.metric-longitudinal > span strong {
  display: block;
}

.metric-longitudinal > span small,
.metric-longitudinal > em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-longitudinal > span strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 13px;
}

.metric-longitudinal > p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}

.metric-longitudinal-up {
  border-left-color: var(--green-2);
}

.metric-longitudinal-down {
  border-left-color: var(--red);
}

.metric-longitudinal-watch {
  border-left-color: var(--yellow);
}

.metric-longitudinal-stable {
  border-left-color: var(--muted-2);
}

.metric-trends {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trend-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(90px, 0.8fr) 58px;
  gap: 12px;
  align-items: center;
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--muted-2);
  border-radius: 8px;
  background: #181b1f;
  text-align: left;
}

.trend-row-up {
  border-left-color: var(--green-2);
}

.trend-row-down {
  border-left-color: var(--red);
}

.trend-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.trend-main strong {
  overflow: hidden;
  color: #dfe9f2;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-main small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-spark {
  height: 42px;
  padding: 6px;
}

.trend-score {
  display: grid;
  justify-items: center;
  gap: 0;
  font-size: 15px;
  font-weight: 900;
}

.trend-score small {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trend-score-up {
  color: #9ade52;
}

.trend-score-down {
  color: #ff8a8a;
}

.trend-score-flat {
  color: var(--muted);
}

.capability-movers {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.capability-movers-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.capability-movers-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mover-chip {
  min-height: 0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
}

.mover-chip-up {
  border-color: rgba(105, 185, 31, 0.5);
  background: rgba(105, 185, 31, 0.12);
  color: #9ade52;
}

.mover-chip-down {
  border-color: rgba(234, 57, 57, 0.5);
  background: rgba(234, 57, 57, 0.1);
  color: #ff8a8a;
}

.capability-movers-note {
  margin: 12px 0;
  color: var(--muted-2);
  font-size: 12.5px;
}

.ovr-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #21262c;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  animation: toast-in 180ms ease-out;
}

.ovr-toast-up {
  border-color: rgba(105, 185, 31, 0.6);
  color: #b4e87d;
}

.ovr-toast-down {
  border-color: rgba(234, 57, 57, 0.6);
  color: #ffa3a3;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.history-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22px, 1fr));
  gap: 4px;
  margin-bottom: 14px;
}

.history-heatmap[hidden],
#historyCanvas[hidden] {
  display: none !important;
}

.history-cell {
  min-height: 18px;
  border-radius: 4px;
  background: #2b3035;
}

.history-delta {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.history-empty,
.history-delta-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 10px 11px;
  background: #20242a;
}

.history-empty {
  display: grid;
  align-items: start;
}

.history-empty strong,
.history-delta-head strong {
  color: var(--text);
  font-size: 13px;
}

.history-empty span,
.history-delta-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.delta-verdict {
  display: grid;
  gap: 3px;
  margin: 10px 0;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-left-width: 3px;
  border-radius: 8px;
  background: #20242a;
}

.delta-verdict p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.delta-verdict-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.delta-verdict-noise {
  border-left-color: var(--muted-2);
}

.delta-verdict-noise .delta-verdict-tag {
  color: var(--muted);
}

.delta-verdict-real-up {
  border-left-color: var(--green-2);
}

.delta-verdict-real-up .delta-verdict-tag {
  color: var(--green);
}

.delta-verdict-real-down {
  border-left-color: var(--red);
}

.delta-verdict-real-down .delta-verdict-tag {
  color: var(--red);
}

.history-delta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.history-delta-item {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 10px;
  background: #20242a;
}

.history-delta-item span,
.history-delta-item em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-delta-item strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.history-delta-up strong {
  color: var(--green-2);
}

.history-delta-down strong {
  color: var(--red);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.segmented button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
}

.segmented button.is-active {
  color: var(--text);
  border-color: #66717d;
  background: #343a42;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 10px;
}

.input-grid:has(> :only-child) {
  grid-template-columns: minmax(0, 1fr);
}

.input-grid:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(230px, 1fr));
}

.input-card {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px;
  background: #1d2126;
}

.input-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
}

.input-card label {
  display: block;
  color: #dce6ef;
  font-size: 14px;
  font-weight: 800;
}

.input-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12px;
}

.input-card input,
.input-card select,
.meta-editor input,
.meta-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15181c;
  color: var(--text);
  outline: none;
}

.input-card .structured-entry-button {
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: start;
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  white-space: normal;
  text-align: left;
}

.structured-entry-button strong,
.structured-entry-button span {
  display: block;
  max-width: 100%;
  line-height: 1.25;
}

.structured-entry-button span {
  color: var(--muted);
  font-size: 11px;
}

.input-card input,
.input-card select {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  padding: 0 10px;
}

.input-card input:focus,
.input-card select:focus,
.meta-editor input:focus,
.meta-editor textarea:focus {
  border-color: var(--cyan);
}

.quality-pill {
  flex: 0 0 auto;
  border-radius: 99px;
  padding: 3px 7px;
  background: #303640;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.quality-pill:empty {
  display: none;
}

.input-top-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-info-btn {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #262b31;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.metric-info-btn:hover,
.metric-info-btn:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(34, 167, 199, 0.12);
  outline: none;
}

.tag.tag-inferred {
  border-style: dashed;
  color: var(--muted);
}

.inference-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.42;
}

.evidence-badge {
  display: none;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #181b1f;
}

.evidence-badge span,
.evidence-tier span {
  color: #dce6ef;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.evidence-badge small,
.evidence-tier small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-strong {
  border-left-color: var(--green-2);
}

.evidence-normal {
  border-left-color: var(--cyan);
}

.evidence-watch {
  border-left-color: var(--yellow);
}

.evidence-neutral {
  border-left-color: var(--blue);
}

.evidence-muted {
  border-left-color: var(--line);
}

.target-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  margin-top: 8px;
  border-radius: 7px;
  padding: 7px 8px;
  background: #171a1f;
}

.target-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.target-strip strong {
  color: #dce8f5;
  font-size: 12px;
  text-align: right;
}

.target-strip small {
  grid-column: 1 / -1;
  margin-top: 0;
  color: var(--muted-2);
  text-align: right;
}

.metric-trace {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.metric-trace span {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 5px 6px;
  background: #181b1f;
}

.metric-trace small,
.metric-trace strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-trace small {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-trace strong {
  margin-top: 2px;
  color: #dce8f5;
  font-size: 11px;
}

.metric-trace .trace-good {
  border-color: rgba(47, 168, 79, 0.34);
}

.metric-trace .trace-warning {
  border-color: rgba(244, 196, 49, 0.38);
}

.metric-trace .trace-info {
  border-color: rgba(34, 167, 199, 0.34);
}

.metric-trace .trace-muted {
  border-color: var(--line-soft);
}

.metric-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  padding: 8px 0;
}

.metric-history-row:first-of-type {
  padding-top: 0;
}

.metric-history-copy {
  min-width: 0;
}

.metric-history-row strong,
.metric-history-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-history-row strong {
  color: #dce8f5;
  font-size: 13px;
}

.metric-history-row small,
.metric-history-row em {
  color: var(--muted);
  font-size: 11px;
}

.metric-history-row em {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 800;
}

.metric-trend {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 10px;
  background: #181b1f;
}

.metric-trend-positive {
  border-left-color: var(--green-2);
}

.metric-trend-negative {
  border-left-color: var(--red);
}

.metric-trend-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.metric-trend-summary span {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 7px 8px;
  background: #20242a;
}

.metric-trend-summary small,
.metric-trend-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-trend-summary small {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-trend-summary strong {
  margin-top: 3px;
  color: #dce8f5;
  font-size: 13px;
}

.metric-sparkline {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 54px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px;
  background: #111419;
}

.metric-sparkline span {
  flex: 1 1 0;
  min-width: 8px;
  border-radius: 4px 4px 2px 2px;
  background: rgba(159, 172, 187, 0.34);
}

.metric-sparkline span.is-current {
  background: var(--cyan);
}

#jsonEditor {
  width: 100%;
  min-height: 350px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #111317;
  color: #dce8f5;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.status-line {
  min-height: 20px;
  margin-top: 8px;
  font-size: 13px;
}

.json-download-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid rgba(124, 179, 66, 0.42);
  border-radius: 6px;
  background: rgba(124, 179, 66, 0.1);
  color: #d7f1b8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.json-download-link[hidden] {
  display: none;
}

.debug-table {
  overflow-x: auto;
}

.debug-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.debug-table th,
.debug-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 8px;
  color: #dce6ef;
  font-size: 13px;
  text-align: left;
}

.debug-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.evidence-summary {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: #20242a;
}

.evidence-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.evidence-summary-head strong {
  color: var(--text);
  font-size: 15px;
}

.evidence-summary-head span,
.evidence-summary p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.evidence-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.evidence-tier {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #181b1f;
}

.evidence-tier strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.evidence-tier small {
  text-align: left;
  white-space: normal;
}

.score-calibration-summary {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.score-calibration-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.score-calibration-head span,
.score-calibration-summary > p,
.score-sensitivity-block > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.score-calibration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.score-calibration-grid > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: #181c21;
}

.score-calibration-grid span,
.score-calibration-grid small {
  color: var(--muted);
  font-size: 10px;
}

.score-calibration-grid strong {
  font-size: 19px;
}

.score-sensitivity-block {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.score-sensitivity-block h4,
.score-sensitivity-block p {
  margin: 0;
}

.source-item {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: #20242a;
}

.source-item strong {
  display: block;
  font-size: 14px;
}

.source-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: min(520px, 100%);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #171a1f;
  box-shadow: -26px 0 70px rgba(0, 0, 0, 0.46);
  transform: translateX(104%);
  transition: transform 180ms ease;
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(0, 0, 0, 0.48);
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(23, 26, 31, 0.97);
  backdrop-filter: blur(14px);
}

.drawer-head > div {
  min-width: 0;
}

.drawer-head-status {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  background: #20252b;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.drawer-head-status-up {
  border-color: rgba(105, 185, 31, 0.55);
  color: #b4e87d;
}

.drawer-head-status-down {
  border-color: rgba(234, 57, 57, 0.55);
  color: #ffa3a3;
}

.drawer-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.drawer-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 25px;
  line-height: 1;
}

.drawer-content {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.detail-block {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: #20242a;
}

.detail-block h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.reference-percentile-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.reference-percentile-value span {
  color: var(--muted);
  font-size: 13px;
}

.metric-howto {
  scroll-margin-top: 96px;
  border-color: rgba(34, 167, 199, 0.35);
  background: linear-gradient(180deg, rgba(34, 167, 199, 0.08), #20242a 60%);
}

.metric-howto .howto-unit {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.detail-block-flash {
  animation: detailFlash 1.5s ease;
}

@keyframes detailFlash {
  0% { box-shadow: 0 0 0 0 rgba(34, 167, 199, 0.55); }
  30% { box-shadow: 0 0 0 3px rgba(34, 167, 199, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(34, 167, 199, 0); }
}

.detail-block p,
.detail-block li {
  color: #cdd7e2;
  font-size: 14px;
  line-height: 1.45;
}

.detail-block ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.protocol-list {
  display: grid;
  gap: 8px;
}

.protocol-step {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}

.protocol-step strong {
  color: #dce6ef;
  font-size: 13px;
}

.protocol-step span,
.protocol-note {
  color: #cdd7e2;
  font-size: 13px;
  line-height: 1.42;
}

.protocol-note {
  margin: 10px 0 0;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.evidence-row {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px;
  background: #181b1f;
}

.evidence-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.evidence-row strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #dce6ef;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-model-basis {
  grid-column: 1 / -1;
  border-color: rgba(34, 167, 199, 0.34);
}

.score-model-basis strong {
  overflow: visible;
  color: #bfeefa;
  white-space: normal;
}

.score-model-detail .evidence-row strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.target-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.target-drawer-grid div {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px;
  background: #181b1f;
}

.target-drawer-grid span,
.target-drawer-grid strong {
  display: block;
}

.target-drawer-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.target-drawer-grid strong {
  overflow: hidden;
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-drawer-grid .rfess-side-fields {
  display: grid;
  gap: 9px;
}

.rfess-side-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.rfess-side-fields input {
  width: 100%;
}

.evidence-note {
  margin: 10px 0 0;
  color: #cdd7e2;
  font-size: 13px;
  line-height: 1.42;
}

.readiness-decision-card {
  display: grid;
  gap: 6px;
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 10px;
  background: #181b1f;
}

.readiness-decision-card strong,
.next-action-card strong {
  color: #f4f7fb;
  font-size: 14px;
}

.readiness-decision-card span,
.readiness-decision-card em,
.next-action-card small {
  color: #cdd7e2;
  font-size: 13px;
  line-height: 1.4;
}

.readiness-decision-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.readiness-decision-urgent {
  border-left-color: var(--red);
}

.readiness-decision-watch {
  border-left-color: var(--yellow);
}

.readiness-decision-normal {
  border-left-color: var(--green-2);
}

.readiness-decision-strong {
  border-left-color: var(--green);
}

.readiness-next-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.readiness-safety-context {
  border-left: 3px solid var(--yellow);
}

.readiness-safety-context.safety-callout {
  border-left-color: var(--red);
}

.readiness-safety-item + .readiness-safety-item {
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.readiness-safety-item p {
  margin: 6px 0 0;
}

.next-action-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: #181b1f;
  text-align: left;
}

.next-action-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.next-action-card strong,
.next-action-card small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 52px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 0;
}

.metric-detail-row-rich {
  grid-template-columns: minmax(0, 1fr) 44px 62px;
  min-height: 46px;
}

.metric-detail-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-detail-main {
  display: grid;
  gap: 3px;
  white-space: normal;
}

.metric-detail-main strong,
.metric-detail-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-detail-main strong {
  color: #dfe9f2;
  font-size: 13px;
}

.metric-detail-main small {
  color: var(--muted);
  font-size: 12px;
}

.metric-detail-row .structured-history-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  overflow: visible;
  white-space: normal;
}

.structured-history-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 800;
}

.drawer-reliability-bars {
  margin: 10px 0;
}

.meta-editor {
  display: grid;
  gap: 10px;
}

.meta-editor label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta-editor input,
.meta-editor select {
  min-height: 38px;
  padding: 0 9px;
}

.meta-editor textarea {
  min-height: 90px;
  resize: vertical;
  padding: 9px;
}

.strength-rm-estimator .assessment-check {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding-top: 0;
  line-height: 1.35;
}

.strength-rm-estimator .assessment-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

.strength-rm-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 9px 10px;
  background: #171a1f;
}

.strength-rm-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.strength-rm-result strong {
  font-size: 18px;
}

.strength-estimate-basis,
.source-verification {
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.strength-estimate-verified,
.source-verification-verified {
  color: #91e45d;
}

.strength-estimate-inferred,
.source-verification-limited {
  color: var(--cyan);
}

.strength-estimate-pending,
.source-verification-candidate {
  color: var(--muted);
}

.source-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.advanced-metadata {
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}

.advanced-metadata > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.advanced-metadata[open] > summary {
  margin-bottom: 10px;
  color: #dce6ef;
}

.reference-route-summary {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  border: 1px solid rgba(34, 167, 199, 0.28);
  border-radius: 8px;
  padding: 10px;
  background: rgba(34, 167, 199, 0.07);
}

.reference-route-summary span,
.reference-route-summary small {
  color: var(--muted);
  font-size: 11px;
}

.reference-route-summary strong {
  color: #dceef4;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 8px;
  color: #dce6ef;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .hero-grid,
  .diagnostic-grid,
  .priority-plan,
  .reliability-matrix,
  .target-card-grid,
  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .body-panel {
    position: static;
    min-height: 0;
    padding: 16px;
  }

  .body-inner {
    position: static;
    inset: auto;
  }

  .body-panel .body-map {
    flex: none;
    max-height: 640px;
  }

  .radar-panel {
    display: flex;
    flex-direction: column;
  }

  .radar-panel > .panel-head {
    width: 100%;
    margin-bottom: 12px;
  }

  .radar-panel .insight-columns {
    width: 100%;
    margin-top: 16px;
  }

  .hero-left .radar-panel {
    display: flex;
    flex-direction: column;
  }

  .hero-left .radar-panel > .panel-head {
    margin-bottom: 12px;
  }

  .hero-left .radar-panel .insight-columns {
    margin-top: 16px;
  }

  .rating-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .input-grid,
  .source-list {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }

  .hero-caps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .body-map {
    grid-template-columns: 1fr;
  }

  .body-map-stage {
    grid-row: auto;
  }

  .body-zone-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1500px);
    padding-top: 12px;
  }

  .topbar,
  .athlete-row,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .toolbar button,
  .toolbar select {
    flex: 1 1 130px;
  }

  .insight-columns,
  .input-grid,
  .source-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .input-grid:has(> :nth-child(2):last-child) {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-caps,
  .metric-trends,
  .longitudinal-assessment {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-ovr-number {
    min-width: 84px;
    min-height: 76px;
    font-size: 42px;
  }

  .rating-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .segmented {
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  .rating-grid {
    grid-template-columns: 1fr;
  }
}

html {
  scroll-behavior: smooth;
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 12px;
  padding: 9px 2px;
  background: rgba(20, 22, 25, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: thin;
}

.section-nav a,
.view-nav button {
  flex: 0 0 auto;
  padding: 7px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.section-nav a:hover,
.view-nav button:hover {
  color: var(--text);
  border-color: #4d5662;
  background: transparent;
  text-decoration: none;
}

.section-nav a.is-active,
.view-nav button.is-active {
  color: #0c1710;
  background: var(--green);
  border-color: var(--green);
}

.view-nav button.is-active:hover {
  color: #0c1710;
  background: var(--green);
  border-color: var(--green);
}

main section {
  scroll-margin-top: 66px;
}

.start-here {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-left: 3px solid var(--muted-2);
}

.start-here.tone-explore {
  border-left-color: var(--yellow);
}

.start-here.tone-mixed {
  border-left-color: var(--cyan);
}

.start-here.tone-solid {
  border-left-color: var(--green-2);
}

.start-here-main {
  display: grid;
  gap: 3px;
  flex: 1 1 340px;
  min-width: 240px;
}

.start-here-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.start-here-main strong {
  font-size: 18px;
  line-height: 1.2;
}

.start-here-sub {
  color: var(--muted);
  font-size: 13px;
}

.start-here-tests {
  display: grid;
  gap: 6px;
  flex: 1 1 320px;
}

.sh-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sh-chip {
  display: grid;
  gap: 1px;
  max-width: 240px;
  padding: 7px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #20242a;
  text-align: left;
}

.sh-chip strong {
  font-size: 13px;
}

.sh-chip small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-chip:hover {
  border-color: #4d5662;
  background: #262b31;
}

.sh-chip-alto {
  border-color: rgba(234, 57, 57, 0.5);
}

.sh-empty {
  color: var(--muted);
  font-size: 13px;
}

.rating-number.is-estimate,
.mini-score.is-estimate {
  background: transparent;
  border: 1px dashed currentColor;
}

@media (max-width: 760px) {
  .start-here-tests {
    flex-basis: 100%;
  }

  .sh-chip {
    max-width: none;
  }
}

.storage-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #20242a;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.storage-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.storage-pill span {
  color: var(--text);
}

.storage-pill.is-disk {
  color: var(--green-2);
  border-color: rgba(47, 168, 79, 0.5);
}

.storage-pill.is-local {
  color: var(--orange);
  border-color: rgba(238, 123, 26, 0.45);
  cursor: pointer;
}

.storage-pill.is-local:hover {
  background: #262b31;
}

.storage-pill.is-demo {
  color: var(--cyan);
  border-color: rgba(34, 167, 199, 0.5);
}

.autosave-explanation {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 167, 199, 0.3);
  border-radius: 8px;
  background: rgba(34, 167, 199, 0.07);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.autosave-explanation strong {
  color: var(--text);
}

.settings-panel {
  padding: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.assessment-setup {
  padding: 16px;
}

.assessment-setup-body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.assessment-setup-body > .panel-head {
  margin-bottom: 0;
}

.assessment-config-note,
.data-entry-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.data-entry-hint {
  margin: 0 0 12px;
  border: 1px solid rgba(34, 167, 199, 0.24);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(34, 167, 199, 0.055);
}

.data-entry-hint strong {
  color: var(--cyan);
}

.assessment-config {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #191d22;
}

.assessment-config > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.assessment-config > summary::-webkit-details-marker {
  display: none;
}

.assessment-config > summary span {
  display: grid;
  gap: 3px;
}

.assessment-config > summary strong {
  color: var(--text);
  font-size: 13px;
}

.assessment-config > summary small,
.assessment-config > summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.assessment-config > summary em {
  flex: 0 0 auto;
  color: #dce6ef;
}

.assessment-config[open] > summary em {
  color: var(--green-2);
}

.assessment-config-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line-soft);
}

.assessment-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.prediction-content,
.prediction-history {
  display: grid;
  gap: 12px;
}

.prediction-card,
.prediction-state,
.prediction-review {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.prediction-badge {
  display: inline-flex;
  margin-bottom: 10px;
  color: #f2c96d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.prediction-value {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.prediction-value strong {
  font-size: 34px;
}

.prediction-card p,
.prediction-state p {
  color: var(--muted);
}

.prediction-history h3 {
  margin: 4px 0 0;
  font-size: 14px;
}

.personal-calibration-summary .evidence-row span small {
  display: block;
  margin-top: 4px;
  color: #c3ceda;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
}

.prediction-review {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) 1fr;
  gap: 14px;
}

.prediction-review span {
  display: grid;
  gap: 4px;
}

.prediction-review small {
  color: var(--muted);
}

.prediction-review-good { border-color: rgba(105, 185, 31, .55); }
.prediction-review-bad { border-color: rgba(220, 84, 84, .7); }
.prediction-review-warn { border-color: rgba(242, 201, 109, .55); }

@media (max-width: 760px) {
  .prediction-review {
    grid-template-columns: 1fr;
  }
}

.recommendation-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}

.recommendation-card h3 {
  margin: 0 0 8px;
}

.recommendation-action {
  color: var(--text);
  line-height: 1.55;
}

.recommendation-card details {
  margin-top: 14px;
}

.recommendation-details {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.recommendation-details div {
  display: grid;
  grid-template-columns: minmax(100px, .25fr) 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.recommendation-details span {
  color: var(--muted);
}

.assessment-controls label,
.equipment-fieldset label {
  color: var(--muted);
  font-size: 12px;
}

.assessment-controls select,
.context-fieldset select {
  display: block;
  width: 100%;
  height: 38px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 34px 0 10px;
  background: #14171b;
  color: var(--text);
  outline: none;
}

.assessment-controls select:focus,
.context-fieldset select:focus {
  border-color: var(--cyan);
}

.assessment-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
}

.equipment-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.equipment-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.equipment-fieldset label,
.assessment-check {
  cursor: pointer;
}

.context-fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.context-fieldset legend,
.context-fieldset label,
.context-fieldset p {
  color: var(--muted);
  font-size: 12px;
}

.context-fieldset p {
  grid-column: 1 / -1;
  margin: 0;
}

.assessment-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.assessment-summary strong {
  color: var(--text);
}

.assessment-onboarding {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
}

.assessment-routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.assessment-route {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  background: var(--panel-soft);
  border-color: var(--line);
}

.assessment-route span,
.assessment-route small {
  display: block;
}

.assessment-route small,
.assessment-route em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.assessment-gaps {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .assessment-controls {
    grid-template-columns: 1fr;
  }

  .assessment-check {
    padding-top: 0;
  }

  .assessment-summary {
    flex-direction: column;
  }
}

.settings-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #191c20;
}

.settings-card h3,
.settings-card p {
  margin: 0;
}

.settings-card h3 {
  font-size: 16px;
}

.settings-card p {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.settings-card button,
.advanced-content select {
  min-height: 38px;
  padding: 0 12px;
}

.settings-card button:disabled {
  cursor: default;
  opacity: 0.5;
}

.settings-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.danger-card {
  border-color: rgba(234, 57, 57, 0.35);
  background: rgba(234, 57, 57, 0.045);
}

.danger-button {
  border-color: rgba(234, 57, 57, 0.7) !important;
  background: rgba(234, 57, 57, 0.16) !important;
  color: #ffb0b0 !important;
}

.danger-button:hover {
  background: rgba(234, 57, 57, 0.26) !important;
}

.advanced-panel {
  overflow: hidden;
}

.advanced-panel > summary {
  padding: 16px 18px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.advanced-content {
  display: grid;
  gap: 18px;
  padding: 0 18px 18px;
}

.advanced-content article {
  min-width: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.advanced-content h2,
.advanced-content p {
  margin: 0;
}

.advanced-content p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.advanced-content select {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #24282e;
  color: var(--text);
}

.action-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 10, 13, 0.82);
  backdrop-filter: blur(5px);
}

.action-dialog[hidden] {
  display: none;
}

.action-dialog-card {
  width: min(480px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.action-dialog-card h2 {
  margin: 6px 0 8px;
}

.action-dialog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.action-dialog-details {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #15181c;
  color: #dce6ef;
  font-size: 12.5px;
}

.action-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.action-dialog-actions button {
  min-height: 40px;
  padding: 0 14px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

.metric-history-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .metric-history-row > em {
    display: none;
  }

  .metric-history-actions {
    grid-column: 1 / -1;
  }

  .metric-history-editor {
    grid-template-columns: minmax(0, 1fr);
  }
}

.metric-history-actions,
.metric-history-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.metric-history-actions button,
.metric-history-editor-actions button,
.current-metric-delete {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 800;
}

.history-delete {
  border-color: rgba(234, 57, 57, 0.42);
  background: rgba(234, 57, 57, 0.08);
  color: #ffaaaa;
}

.current-metric-delete {
  margin-top: 10px;
}

.metric-history-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px;
  background: #15181c;
}

.metric-history-editor[hidden] {
  display: none;
}

.metric-history-editor label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.metric-history-editor input,
.metric-history-editor select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #101317;
  color: var(--text);
}

.quick-entry {
  border: 1px solid rgba(34, 167, 199, 0.35);
  border-radius: 8px;
  padding: 12px;
  background: rgba(34, 167, 199, 0.06);
}

.quick-entry > label {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-entry > label input,
.quick-entry > label select,
.quick-entry > label textarea {
  width: 100%;
}

.quick-entry > label textarea {
  min-height: 84px;
  padding: 9px;
  resize: vertical;
}

.attempt-fieldset {
  min-width: 0;
  margin: 12px 0 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
}

.attempt-fieldset legend {
  padding: 0 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.attempt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 9px;
}

.attempt-grid label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.attempt-grid input,
.attempt-grid select {
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.criteria-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 8px;
  color: #cdd7e2;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.criteria-grid input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
}

.quick-entry-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}

.quick-entry-input {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15181c;
}

.quick-entry-input:focus-within {
  border-color: var(--cyan);
}

.quick-entry-input input,
.quick-entry-input select {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.quick-entry-input input:focus,
.quick-entry-input select:focus {
  outline: none;
}

.quick-entry-unit {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.quick-entry button {
  flex: 0 0 auto;
  padding: 0 16px;
  border-color: var(--cyan);
  background: rgba(34, 167, 199, 0.16);
  color: #d6f2fa;
  font-weight: 700;
}

.quick-entry button:hover {
  background: rgba(34, 167, 199, 0.26);
}

.quick-entry-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.quick-entry-status {
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.quick-entry-status-ok {
  background: rgba(47, 168, 79, 0.16);
  color: #a7e6bb;
}

.quick-entry-status-warn {
  background: rgba(238, 123, 26, 0.16);
  color: #f4c08a;
}

@media (max-width: 760px) {
  .attempt-grid,
  .criteria-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-entry-row {
    flex-direction: column;
  }

  .quick-entry-row button {
    min-height: 42px;
  }
}

.state-intro {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(34, 167, 199, 0.08);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.state-intro strong {
  color: var(--text);
}

.state-card .state-baseline {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.state-card .state-baseline strong {
  color: var(--text);
}

.state-card .state-spark {
  margin-top: 9px;
  height: 42px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #111419;
  cursor: pointer;
  font-size: 13px;
}

.checklist-item input {
  width: 17px;
  height: 17px;
  accent-color: var(--cyan);
  flex: 0 0 auto;
}

.checklist-score {
  flex: 1 1 auto;
  font-weight: 700;
  color: #d6f2fa;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 10, 13, 0.86);
  backdrop-filter: blur(4px);
}

.login-overlay.is-open {
  display: flex;
}

.login-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel, #14171c);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.login-card h2 {
  margin: 0;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.login-card input {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111317;
  color: var(--text);
  font-size: 14px;
}

.login-card input:focus {
  outline: none;
  border-color: var(--cyan);
}

.login-card button {
  margin-top: 4px;
  padding: 11px 16px;
  border: 1px solid var(--cyan);
  border-radius: 8px;
  background: rgba(34, 167, 199, 0.18);
  color: #d6f2fa;
  font-weight: 700;
  cursor: pointer;
}

.login-card button:hover {
  background: rgba(34, 167, 199, 0.28);
}

.login-card button:disabled {
  opacity: 0.6;
  cursor: default;
}

.login-error {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(234, 57, 57, 0.16);
  color: #f2a9a9;
  font-size: 12px;
}

@media (max-width: 430px) {
  .view-nav {
    gap: 4px;
  }

  .view-nav button {
    padding-inline: 7px;
    font-size: 11.5px;
  }

  .history-delta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-model-detail > .evidence-grid,
  .score-model-detail .score-sensitivity-block .evidence-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .evidence-summary-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .evidence-tier-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .evidence-tier:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .score-calibration-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .score-calibration-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}
