:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1d2430;
  --muted: #667085;
  --line: #d8dee8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warn: #9a3412;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Noto Sans TC", sans-serif;
  line-height: 1.55;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

.test-mode-banner {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 6px;
  color: #9a3412;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.resume-mode-banner {
  background: #ecfdf3;
  border: 1px solid #86efac;
  border-radius: 6px;
  color: #166534;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.page-head {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

.copy,
.hint,
.status-text {
  color: var(--muted);
}

.copy {
  margin-bottom: 0;
}

.start-form {
  margin-top: 24px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.start-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.form-grid label {
  margin: 0;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.secondary-button {
  background: #e5e7eb;
  color: var(--text);
}

.secondary-button:hover {
  background: #d1d5db;
}

.page-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
}

.split-actions {
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  padding-top: 20px;
}

.response-preview {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 24px 0;
}

.response-preview div {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  padding: 16px;
}

.response-preview span,
.instruction-list {
  color: var(--muted);
}

.instruction-steps {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 24px;
}

.instruction-step {
  display: grid;
  gap: 14px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding-bottom: 30px;
  position: relative;
}

.instruction-step:not(:last-child)::before {
  background: var(--line);
  content: "";
  left: 19px;
  position: absolute;
  top: 38px;
  bottom: 0;
  width: 2px;
}

.step-marker {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 17px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  position: relative;
  width: 40px;
  z-index: 1;
}

.step-content {
  min-width: 0;
  padding-top: 5px;
}

.step-content h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.dimension-overview {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dimension-overview > div {
  min-width: 0;
  padding: 16px;
}

.dimension-overview > div + div {
  border-left: 1px solid var(--line);
}

.dimension-overview h3 {
  color: var(--accent-dark);
  margin-bottom: 7px;
}

.dimension-overview p,
.section-copy,
.data-note p {
  color: var(--muted);
  margin: 0;
}

.scale-table {
  border-collapse: collapse;
  margin-top: 14px;
  width: 100%;
}

.scale-table th,
.scale-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.scale-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.scale-table th:first-child,
.scale-table td:first-child {
  color: var(--accent-dark);
  font-weight: 700;
  width: 72px;
}

.data-note {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.instruction-list {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.instruction-list p {
  margin: 12px 0;
}

.instruction-list strong {
  color: var(--text);
}

.scale-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 18px;
}

.scale-summary strong {
  color: var(--accent-dark);
}

.hidden {
  display: none;
}

.survey-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.progress {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 12px;
  white-space: nowrap;
}

.question-step {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.section-label {
  font-size: 16px;
}

.case-id {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.situation {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 14px 0;
  padding: 14px;
}

.case-context {
  margin: 16px 0;
}

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

.context-grid > div {
  background: #f4f8f6;
  border: 1px solid #cbd9d1;
  border-radius: 6px;
  min-width: 0;
  padding: 11px 12px;
}

.context-grid dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.context-grid dd {
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

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

.answer {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  min-width: 0;
}

.answer-title {
  font-weight: 700;
  margin-bottom: 8px;
}

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

.score-grid fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0;
  padding: 12px;
}

.score-grid legend {
  font-weight: 700;
  padding: 0 4px;
}

.dimension-step {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}

.step-kicker {
  color: var(--accent-dark) !important;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px !important;
}

.dimension-heading p {
  color: var(--muted);
  margin: 5px 0 0;
}

.dimension-description {
  color: var(--text) !important;
  font-weight: 700;
  margin-top: 8px !important;
}

.dimension-criteria {
  color: var(--muted);
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.dimension-criteria li {
  padding-left: 3px;
}

.scale-guide {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 10px;
  padding: 9px 11px;
}

.scale-guide summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 700;
}

.scale-guide ol {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 12px 0 2px;
  padding: 0;
}

.scale-guide li {
  display: grid;
  gap: 2px;
  grid-template-columns: 44px minmax(0, 1fr);
}

.scale-guide li strong {
  color: var(--accent-dark);
}

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

.score-options label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  font-weight: 400;
  gap: 6px;
  margin: 0;
  min-height: 52px;
  padding: 8px;
}

.score-options label:has(input:checked) {
  background: #e6f5f2;
  border-color: var(--accent);
}

.score-options input {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.score-number {
  color: var(--accent-dark);
  font-weight: 700;
}

.optional-feedback {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.optional-feedback summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.optional-feedback label {
  margin-top: 12px;
}

.submit-bar {
  align-items: center;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  position: sticky;
  bottom: 0;
}

.status-text,
#submit-status {
  color: var(--warn);
}

.expert-instruction-steps .instruction-step {
  padding-bottom: 24px;
}

.expert-judgments {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.expert-judgments fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0;
  padding: 14px;
}

.expert-judgments legend {
  font-size: 17px;
  font-weight: 700;
  padding: 0 5px;
}

.expert-judgments fieldset > p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 10px;
}

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

.expert-choice {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 9px;
  margin: 0;
  min-width: 0;
  padding: 11px;
}

.expert-choice:has(input:checked),
.confidence-options label:has(input:checked) {
  background: #e6f5f2;
  border-color: var(--accent);
}

.expert-choice input,
.confidence-options input {
  flex: 0 0 auto;
  margin: 4px 0 0;
  width: auto;
}

.expert-choice span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.expert-choice small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

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

.confidence-options label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 7px;
  margin: 0;
  min-height: 50px;
  padding: 9px;
}

.confidence-options span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .answers,
  .score-grid,
  .form-grid,
  .start-row,
  .response-preview {
    grid-template-columns: 1fr;
  }

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

  .dimension-overview {
    grid-template-columns: 1fr;
  }

  .expert-choice-grid,
  .confidence-options {
    grid-template-columns: 1fr;
  }

  .dimension-overview > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .submit-bar {
    justify-content: stretch;
  }

  .submit-bar button {
    flex: 1 1 auto;
  }

  .submit-bar .status-text {
    flex-basis: 100%;
  }
}
