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

.progress-input-grid .field--full {
  grid-column: 1 / -1;
}

.progress-input-grid .field {
  align-content: start;
}

.progress-choice-field {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.progress-choice-field legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.93rem;
  font-weight: 800;
}

.progress-segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  padding: 4px;
  background: var(--surface-soft);
}

.progress-segmented-control label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.progress-segmented-control input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.progress-segmented-control span {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: calc(var(--control-radius) - 4px);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.progress-segmented-control label:hover span {
  color: var(--text);
}

.progress-segmented-control input:checked + span {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.progress-segmented-control input:focus-visible + span {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
  border-color: var(--accent-strong);
}

.progress-loading {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.progress-result-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 0.86rem;
}

.progress-result-table th:first-child,
.progress-result-table td:first-child {
  width: auto;
}

.progress-result-table th:last-child,
.progress-result-table td:last-child {
  width: auto;
  text-align: right;
}

.progress-result-table th:not(:first-child),
.progress-result-table td:not(:first-child) {
  text-align: right;
  white-space: normal;
}

.table-header-note {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.progress-method-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.progress-method-list li {
  padding-left: 4px;
}

.progress-data-note {
  margin-top: 18px;
  border-left: 4px solid var(--accent-strong);
  padding: 2px 0 2px 16px;
  color: var(--muted);
}

.progress-debug-section > summary {
  cursor: pointer;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 850;
}

.progress-debug-section > summary::marker {
  color: var(--accent-strong);
}

.progress-debug-content {
  margin-top: 18px;
}

.progress-debug-content > p:first-child {
  color: var(--muted);
}

.debug-table-scroll {
  border: 1px solid var(--border);
  border-radius: 12px;
}

.progress-debug-table {
  min-width: 1280px;
  font-size: 0.78rem;
}

.progress-debug-table th,
.progress-debug-table td {
  padding: 9px 10px;
  text-align: right;
  white-space: nowrap;
}

.progress-debug-table th:first-child,
.progress-debug-table td:first-child {
  width: 58px;
  text-align: left;
}

.progress-debug-table th:last-child,
.progress-debug-table td:last-child {
  width: 120px;
  text-align: right;
}

.progress-debug-table th:nth-child(n + 8),
.progress-debug-table td:nth-child(n + 8) {
  min-width: 120px;
}

.progress-debug-table .debug-change {
  color: var(--text);
  font-weight: 600;
}

.debug-table-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

  .progress-input-grid .field--full {
    grid-column: auto;
  }

  .progress-result-table {
    min-width: 690px;
    table-layout: auto;
  }

  .progress-result-table th:not(:first-child),
  .progress-result-table td:not(:first-child) {
    white-space: nowrap;
  }
}
