:root {
  color-scheme: light;
  font-family: "VRT Roobert", "Roobert", "Avenir Next", Inter, system-ui, sans-serif;
  line-height: 1.4;
  --vrt-bg: #8ea1e1;
  --vrt-pink: #ff0f8d;
  --vrt-purple: #7b4dff;
  --vrt-blue: #2274dc;
  --vrt-teal: #21d0ba;
  --vrt-card: rgba(255, 255, 255, 0.92);
  --vrt-text: #17203a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--vrt-purple), var(--vrt-pink) 40%, var(--vrt-teal));
  color: var(--vrt-text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
  display: grid;
  gap: 1rem;
}

.hero,
.panel {
  background: var(--vrt-card);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 14px 35px rgba(49, 21, 95, 0.22);
}

.hero-kicker {
  margin: 0;
  color: #44328a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h2 {
  margin-top: 0;
}

.tabs {
  display: inline-flex;
  gap: 0.4rem;
  background: #e9edfa;
  padding: 0.3rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.tab-button {
  width: auto;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #27324a;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.tab-button.active {
  background: #243e9e;
  color: white;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

label,
legend {
  font-weight: 700;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid #c5cddd;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  margin-top: 0.25rem;
  background: #fff;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid #1f74ff;
  outline-offset: 1px;
}

.button-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

button {
  width: fit-content;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #3672ff, #21d0ba);
  color: white;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-weight: 700;
}

button.ghost {
  background: #e7ebf8;
  color: #27324a;
}

.score-group {
  border: 1px solid #dbe2f4;
  border-radius: 12px;
  padding: 0.7rem;
  margin: 0;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.contribution-grid {
  display: grid;
  gap: 0.5rem;
}

.contribution-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
}

.contribution-title {
  flex: 1;
  min-width: 0;
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.35;
  color: #33405f;
}

.contribution-select {
  width: 4.25rem;
  min-width: 4.25rem;
  margin-top: 0;
  text-align: center;
  padding: 0.35rem 0.45rem;
}

.score-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.score-grid.compact label {
  font-size: 0.9rem;
}

.compact-scores select {
  margin-top: 0.2rem;
  padding: 0.45rem 0.5rem;
}

.field-hint {
  margin: 0.1rem 0 0.7rem;
  color: #5a6484;
}

.form-message,
.io-message {
  min-height: 1.2rem;
  margin: 0;
  font-weight: 700;
}

.form-message.error,
.io-message.error {
  color: #b42318;
}

.form-message.success,
.io-message.success {
  color: #107a39;
}

.io-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.file-import-label {
  display: inline-flex;
  align-items: center;
  background: #243e9e;
  color: white;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-weight: 700;
}

#import-xlsx-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.list-item {
  border: 1px solid #dae2f5;
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.objective-summary {
  min-width: 0;
}

.objective-summary strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3a58;
}

.objective-summary small {
  color: #5a6484;
}

.sortable-list .list-item {
  cursor: default;
}

.sortable-list .objective-summary {
  cursor: grab;
}

.sortable-list .list-item.dragging {
  opacity: 0.5;
}

.compact-list .list-item {
  align-items: center;
  padding: 0.55rem 0.7rem;
  flex-wrap: nowrap;
}

.initiative-summary {
  display: grid;
  min-width: 0;
  flex: 1;
}

.initiative-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.initiative-summary small {
  color: #4e5b7d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.initiative-metrics {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.initiative-metrics span {
  font-size: 0.78rem;
  background: #f0f3fc;
  border: 1px solid #d7deef;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}


.inline-initiative-form {
  display: grid;
  gap: 0.6rem;
  width: 100%;
}

.inline-initiative-form > label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #24324d;
}

.inline-score-grid {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.inline-score-grid label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
}
.list-item-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.compact-actions {
  justify-content: flex-end;
}

.compact-actions button {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.chart {
  width: 100%;
  min-height: 500px;
  border: 1px solid #dce1eb;
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 860px) {
  .compact-list .list-item {
    flex-wrap: wrap;
  }

  .initiative-summary small,
  .initiative-title {
    white-space: normal;
  }
}

.score-rules {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.score-rule {
  border: 1px solid #dbe2f4;
  border-radius: 12px;
  padding: 0.7rem;
}

.parameter-checkbox-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.4rem;
}

.parameter-checkbox-grid label {
  font-weight: 500;
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.parameter-checkbox-grid input[type="checkbox"] {
  margin: 0;
  width: auto;
}

.scatter-legend {
  margin-top: 0.8rem;
  border: 1px solid #dce1eb;
  border-radius: 10px;
  background: #f9fbff;
  padding: 0.7rem 0.8rem;
}

.scatter-legend-title {
  margin: 0 0 0.45rem;
  font-weight: 700;
  color: #24324d;
}

.scatter-legend-list {
  margin: 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.3rem;
}

.scatter-legend-list li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.scatter-legend-number {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: #dce6ff;
  color: #233152;
  font-size: 0.75rem;
  font-weight: 700;
}

.scatter-legend-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scatter-legend-list small {
  color: #526184;
}
