.work-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.work-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.work-form input,
.work-form select,
.work-form textarea {
  font: inherit;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #becfca;
  border-radius: 7px;
  padding: 10px;
  color: var(--ink);
  background: white;
}
.work-form input[type="checkbox"] {
  width: auto;
}
.work-form .full {
  grid-column: 1/-1;
}
.work-form textarea {
  min-height: 90px;
  resize: vertical;
}
.work-form select[multiple] {
  min-height: 125px;
}
.work-form button {
  justify-self: start;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.work-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.work-list pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.work-list .card {
  min-width: 0;
}
.work-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
fieldset {
  border: 1px solid #c8d7d2;
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}
@media (max-width: 700px) {
  .work-form {
    grid-template-columns: 1fr;
  }
  .work-form .full {
    grid-column: auto;
  }
}

/* Guided JEV evaluation: scoped to avoid altering licenses and occurrence screens. */
.jev-page main {
  max-width: 1180px;
}
.jev-page [hidden] {
  display: none !important;
}
.jev-page button,
.jev-page select,
.jev-page textarea,
.jev-page input {
  font-size: 15px;
}
.jev-page button {
  min-height: 44px;
}
.jev-page button:disabled {
  cursor: not-allowed;
}
.jev-page select {
  max-width: 100%;
  min-width: 0;
}
.jev-page #notice {
  position: sticky;
  top: 8px;
  z-index: 3;
  padding: 14px 18px;
  border: 1px solid #b8d7c5;
  background: #edf7ef;
  border-radius: 10px;
  margin-bottom: 20px;
}
.jev-page #notice.error {
  background: #fff1ed;
  border-color: #ebc6bb;
  color: #8d2c1c;
}
.evaluation-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  gap: 12px;
  margin: 0 0 28px;
}
.evaluation-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.evaluation-steps li > span {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #edf1ee;
  font-weight: 700;
}
.evaluation-steps small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.evaluation-steps li[aria-current="step"] {
  border-color: var(--teal);
  background: #e9f5ef;
}
.evaluation-steps li[aria-current="step"] > span {
  background: var(--teal);
  color: white;
}
.evaluation-steps li.done > span {
  background: #d1e9da;
}
.jev-page .start-card {
  border-left: 5px solid var(--teal);
  padding: 32px;
  max-width: 820px;
}
.jev-page .start-card h2 {
  font-size: 26px;
}
.jev-page .start-card button {
  padding: 15px 22px;
}
.evaluation-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.evaluation-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.evaluation-toolbar select,
.sample-navigation select {
  padding: 10px;
  border: 1px solid #b6cbc3;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.evaluation-progress {
  margin: 22px 0;
}
.evaluation-progress p {
  font-weight: 650;
  margin-bottom: 8px;
}
.evaluation-progress progress {
  width: 100%;
  height: 10px;
  accent-color: var(--teal);
}
.next-step {
  background: #eef6f0;
  border-radius: 10px;
  padding: 20px;
}
.next-step p:last-child {
  margin-bottom: 0;
}
.next-step h2 {
  margin-bottom: 8px;
}
.jev-page details summary {
  cursor: pointer;
  font-weight: 600;
}
.jev-page details[open] > summary {
  margin-bottom: 18px;
}
.sample-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sample-state {
  padding: 5px 12px;
  border-radius: 18px;
  background: #eaf2ed;
  font-size: 13px;
  white-space: nowrap;
}
.sample-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.sample-navigation select {
  flex: 1;
  min-width: 200px;
}
.evaluation-source {
  padding: 26px;
  border: 1px solid #d4e1db;
  border-left: 4px solid var(--teal);
  border-radius: 12px;
  background: #f7faf8;
  margin: 20px 0 28px;
}
.evaluation-source #sample-text {
  font-size: 19px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reference-context {
  border-top: 1px solid #d4e1db;
  padding-top: 16px;
  color: var(--muted);
  margin-bottom: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.jev-page .work-form {
  gap: 22px;
  border: 0;
  padding: 0;
}
.jev-page .work-form legend {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 15px;
}
.jev-page .work-form label {
  font-size: 15px;
}
.jev-page .work-form small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}
.jev-page .field-intro {
  margin: 0;
  color: var(--muted);
}
.jev-page .evaluation-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  margin: 18px 0;
}
.jev-page .evaluation-check input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 4px;
}
.save-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#save-state {
  font-size: 13px;
  color: var(--muted);
}
.evaluation-scope {
  font-size: 13px;
  color: var(--muted);
  margin-top: 28px;
}
.jev-page #sample-result pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
@media (max-width: 800px) {
  .evaluation-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .evaluation-toolbar {
    align-items: stretch;
  }
  .evaluation-toolbar label {
    flex-basis: 100%;
  }
}
@media (max-width: 500px) {
  .jev-page main {
    padding: 24px 14px;
  }
  .jev-page header {
    padding: 16px;
    flex-wrap: wrap;
  }
  .jev-page .card {
    padding: 18px;
  }
  .evaluation-steps {
    gap: 8px;
  }
  .evaluation-steps li {
    padding: 10px;
    gap: 8px;
    font-size: 12px;
  }
  .evaluation-steps small {
    font-size: 11px;
  }
  .sample-heading {
    align-items: start;
  }
  .sample-navigation select {
    flex-basis: 100%;
  }
  .evaluation-source {
    padding: 18px;
  }
  .evaluation-source #sample-text {
    font-size: 17px;
  }
  .next-step {
    padding: 16px;
  }
}

.jev-page #sample-panel {
  scroll-margin-top: 90px;
}
.jev-page .work-form label {
  align-content: start;
}
