:root {
  --fto-line: rgba(148, 163, 184, 0.28);
  --fto-panel: rgba(8, 14, 24, 0.72);
  --fto-panel-strong: rgba(7, 11, 19, 0.9);
  --fto-accent: #f59e0b;
  --fto-accent-soft: rgba(245, 158, 11, 0.2);
  --fto-positive: #22c55e;
  --fto-negative: #ef4444;
  --fto-progress: #38bdf8;
}

.fto-hero {
  position: relative;
  overflow: hidden;
}

.fto-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(245, 158, 11, 0.16),
      transparent 45%
    ),
    radial-gradient(circle at 78% 0%, rgba(56, 189, 248, 0.12), transparent 42%);
  pointer-events: none;
}

.fto-hero > * {
  position: relative;
  z-index: 1;
}

.fto-meta-line {
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
}

.fto-feedback-popup {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: min(540px, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.42);
  background: linear-gradient(
    150deg,
    rgba(50, 10, 18, 0.98),
    rgba(23, 10, 17, 0.96)
  );
  color: #ffe4e6;
  box-shadow:
    0 18px 34px -22px rgba(15, 23, 42, 0.95),
    0 8px 20px -16px rgba(239, 68, 68, 0.9);
  z-index: 1400;
  animation: ftoFeedbackPopupEnter 0.18s ease-out;
}

.fto-feedback-popup.error {
  border-color: rgba(248, 113, 113, 0.45);
}

.fto-feedback-popup-copy {
  font-size: 0.9rem;
  line-height: 1.38;
}

.fto-feedback-popup-close {
  appearance: none;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.55);
  color: #ffe4e6;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fto-feedback-popup-close:hover,
.fto-feedback-popup-close:focus-visible {
  border-color: rgba(254, 202, 202, 0.7);
  background: rgba(153, 27, 27, 0.75);
}

@keyframes ftoFeedbackPopupEnter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .fto-feedback-popup {
    left: 0.7rem;
    right: 0.7rem;
    width: auto;
  }
}

.fto-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.72rem;
  margin-top: 0.9rem;
}

.fto-stat-card {
  border: 1px solid var(--fto-line);
  border-radius: 12px;
  background: linear-gradient(
    155deg,
    rgba(17, 24, 39, 0.85),
    rgba(2, 6, 23, 0.9)
  );
  padding: 0.72rem 0.82rem;
  display: grid;
  gap: 0.2rem;
}

.fto-stat-card strong {
  font-family: "Barlow Condensed", "Outfit", sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
  color: #f8fafc;
}

.fto-stat-card span {
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fto-stat-card.highlight {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.fto-table-wrap {
  border: 1px solid var(--fto-line);
  border-radius: 14px;
  background: var(--fto-panel-strong);
  overflow: auto;
  max-width: 100%;
}

.fto-table {
  width: 100%;
  min-width: 780px;
  table-layout: fixed;
}

.fto-table th,
.fto-table td {
  text-align: left;
  vertical-align: middle;
  white-space: normal;
  padding: 0.5rem 0.46rem;
  font-size: 0.8rem;
  line-height: 1.22;
}

.fto-table th:nth-child(1),
.fto-table td:nth-child(1) {
  width: 78px;
  text-align: center;
}

.fto-table th:nth-child(2),
.fto-table td:nth-child(2) {
  width: 210px;
}

.fto-table th:nth-child(3),
.fto-table td:nth-child(3) {
  width: auto;
}

.fto-table th:nth-child(4),
.fto-table td:nth-child(4) {
  width: 110px;
  text-align: center;
}

.fto-table th:nth-child(5),
.fto-table td:nth-child(5) {
  width: 100px;
  text-align: center;
}

.fto-table th:nth-child(6),
.fto-table td:nth-child(6) {
  width: 108px;
  text-align: center;
}

.fto-table td strong,
.fto-table td small {
  display: block;
}

.fto-table td strong {
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.fto-table td small {
  margin-top: 0.16rem;
  color: rgba(203, 213, 225, 0.8);
  font-size: 0.68rem;
  line-height: 1.16;
}

.fto-snapshot-wrap {
  margin-top: 0.4rem;
}

.fto-snapshot-table {
  width: 100%;
  min-width: 1040px;
  table-layout: auto;
}

.fto-snapshot-table th,
.fto-snapshot-table td {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  padding: 0.48rem 0.42rem;
  font-size: 0.78rem;
}

.fto-snapshot-table th:nth-child(1),
.fto-snapshot-table td:nth-child(1) {
  text-align: left;
  white-space: normal;
  min-width: 220px;
}

.fto-snapshot-table td strong,
.fto-snapshot-table td small {
  display: block;
}

.fto-snapshot-table td small {
  margin-top: 0.14rem;
  color: rgba(203, 213, 225, 0.8);
  font-size: 0.68rem;
  line-height: 1.15;
}

.fto-snapshot-row.is-selected td {
  background: rgba(30, 64, 175, 0.22);
}

.fto-snapshot-row-btn {
  width: 100%;
  border: 1px solid rgba(96, 165, 250, 0.42);
  background: rgba(15, 23, 42, 0.88);
  color: #dbeafe;
  border-radius: 10px;
  padding: 0.4rem 0.52rem;
  text-align: left;
  display: grid;
  gap: 0.14rem;
  cursor: pointer;
  font: inherit;
}

.fto-snapshot-row-btn:hover,
.fto-snapshot-row-btn:focus-visible {
  border-color: rgba(147, 197, 253, 0.7);
  background: rgba(23, 37, 84, 0.9);
}

.fto-snapshot-row-btn small,
.fto-snapshot-row-btn strong {
  display: block;
}

.fto-snapshot-modal {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.fto-snapshot-modal.hidden {
  display: none;
}

.fto-snapshot-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 6, 23, 0.72);
  cursor: pointer;
}

.fto-snapshot-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 14px;
  background: linear-gradient(
    150deg,
    rgba(9, 18, 34, 0.98),
    rgba(2, 8, 20, 0.98)
  );
  box-shadow:
    0 34px 60px -34px rgba(15, 23, 42, 0.96),
    0 14px 30px -24px rgba(59, 130, 246, 0.45);
  padding: 0.84rem;
}

.fto-snapshot-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.fto-snapshot-modal-head h3 {
  margin: 0;
  font-size: 1rem;
  color: #f8fafc;
}

.fto-snapshot-modal-table-wrap {
  margin-top: 0.45rem;
}

.fto-snapshot-modal-table {
  width: 100%;
  min-width: 760px;
  table-layout: auto;
}

.fto-snapshot-modal-table th,
.fto-snapshot-modal-table td {
  text-align: left;
  vertical-align: middle;
  padding: 0.44rem 0.42rem;
  font-size: 0.76rem;
}

.fto-snapshot-modal-table th:nth-child(2),
.fto-snapshot-modal-table td:nth-child(2) {
  min-width: 180px;
}

.fto-snapshot-modal-table th:nth-child(3),
.fto-snapshot-modal-table td:nth-child(3) {
  white-space: nowrap;
}

.fto-snapshot-modal-table th:nth-child(4),
.fto-snapshot-modal-table td:nth-child(4) {
  width: 84px;
  text-align: center;
}

.fto-snapshot-modal-table td small {
  margin-top: 0.14rem;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.67rem;
}

.fto-entry-summary-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  margin-top: 0.62rem;
}

.fto-entry-summary-meta p {
  margin: 0;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 8px;
  background: rgba(8, 24, 45, 0.56);
  color: #dbeafe;
  font-size: 0.74rem;
  line-height: 1.3;
  padding: 0.46rem 0.54rem;
}

.fto-entry-summary-table th:nth-child(1),
.fto-entry-summary-table td:nth-child(1) {
  width: 28%;
}

.fto-entry-summary-table th:nth-child(2),
.fto-entry-summary-table td:nth-child(2) {
  width: 24%;
}

.fto-entry-summary-table th:nth-child(3),
.fto-entry-summary-table td:nth-child(3) {
  width: 24%;
}

.fto-entry-summary-table th:nth-child(4),
.fto-entry-summary-table td:nth-child(4) {
  width: 12%;
  text-align: center;
  white-space: nowrap;
}

.fto-entry-summary-table th:nth-child(5),
.fto-entry-summary-table td:nth-child(5) {
  width: 12%;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .fto-snapshot-modal {
    padding: 0.55rem;
  }

  .fto-snapshot-modal-panel {
    width: calc(100vw - 1.1rem);
    max-height: calc(100vh - 1.1rem);
    padding: 0.66rem;
  }
}

.fto-stage-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.fto-stage-link {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(71, 85, 105, 0.25);
  color: #e2e8f0;
  text-decoration: none;
  padding: 0.2rem 0.46rem;
  line-height: 1;
}

.fto-stage-link-code {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.fto-stage-link-score {
  font-size: 0.6rem;
  opacity: 0.9;
}

.fto-stage-link.status-not-started {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(71, 85, 105, 0.3);
  color: #e2e8f0;
}

.fto-stage-link.status-in-progress {
  border-color: rgba(56, 189, 248, 0.46);
  background: rgba(14, 116, 144, 0.3);
  color: #e0f2fe;
}

.fto-stage-link.status-passed {
  border-color: rgba(34, 197, 94, 0.48);
  background: rgba(20, 83, 45, 0.36);
  color: #dcfce7;
}

.fto-stage-link.status-needs-remediation {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(120, 53, 15, 0.4);
  color: #fde68a;
}

.fto-stage-link.status-failed {
  border-color: rgba(239, 68, 68, 0.48);
  background: rgba(127, 29, 29, 0.4);
  color: #fecaca;
}

.fto-stage-link.status-exempt {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(88, 28, 135, 0.38);
  color: #f3e8ff;
}

.fto-stage-link:hover,
.fto-stage-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -14px rgba(148, 163, 184, 0.7);
}

.open-link,
.fto-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.12);
}

.open-link:hover,
.open-link:focus-visible,
.fto-action-link:hover,
.fto-action-link:focus-visible {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.7);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  max-width: 100%;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.62rem;
  line-height: 1;
  letter-spacing: 0.02em;
  font-weight: 700;
  text-transform: uppercase;
}

.status-not-started {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(71, 85, 105, 0.32);
  color: #e2e8f0;
}

.status-in-progress {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 116, 144, 0.32);
  color: #e0f2fe;
}

.status-passed {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(20, 83, 45, 0.38);
  color: #dcfce7;
}

.status-needs-remediation {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(120, 53, 15, 0.42);
  color: #fde68a;
}

.status-failed {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(127, 29, 29, 0.4);
  color: #fecaca;
}

.fto-form-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 0.85rem;
}

.fto-form-field {
  display: grid;
  gap: 0.35rem;
}

.fto-form-field > span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(203, 213, 225, 0.84);
}

.fto-form-field input,
.fto-form-field textarea,
.fto-form-field select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--fto-line);
  background: var(--fto-panel);
  color: #e2e8f0;
  padding: 0.52rem 0.6rem;
  font: inherit;
}

.fto-form-field input::placeholder,
.fto-form-field textarea::placeholder,
.fto-form-field select::placeholder {
  color: rgba(236, 244, 255, 0.82);
}

.fto-solo-window-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
  align-items: center;
  min-height: 2.22rem;
}

.fto-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(199, 162, 74, 0.48);
  border-radius: 999px;
  background: rgba(6, 12, 22, 0.72);
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.58rem;
}

.fto-inline-check input[type="checkbox"] {
  margin: 0;
  accent-color: #d9aa43;
}

.fto-form-field textarea {
  min-height: 104px;
  resize: vertical;
}

#trooper-probation-end-date[readonly] {
  border-color: rgba(215, 171, 73, 0.86);
  background: rgba(24, 20, 10, 0.8);
  color: #fde68a;
  font-weight: 700;
}

.fto-stage-table td,
.fto-stage-table th {
  text-align: left;
  font-size: 0.75rem;
  padding: 0.34rem 0.42rem;
}

.fto-stage-table td:nth-child(2),
.fto-stage-table th:nth-child(2),
.fto-stage-table td:nth-child(3),
.fto-stage-table th:nth-child(3) {
  text-align: center;
}

.fto-stage-row-compact td {
  vertical-align: middle;
}

.fto-stage-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(30, 41, 59, 0.58);
  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.18rem 0.42rem;
}

.status-exempt {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(88, 28, 135, 0.38);
  color: #f3e8ff;
}

.fto-stage-table select,
.fto-stage-table input[type="number"] {
  width: 100%;
  min-width: 102px;
  border-radius: 8px;
  border: 1px solid var(--fto-line);
  background: rgba(2, 6, 23, 0.76);
  color: #e2e8f0;
  padding: 0.36rem 0.42rem;
  font: inherit;
}

.fto-stage-table input[type="number"] {
  max-width: 92px;
  text-align: center;
}

.fto-stage-table select:disabled,
.fto-stage-table input[readonly] {
  opacity: 0.82;
  cursor: not-allowed;
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(30, 41, 59, 0.76);
}

.fto-stage-jump-btn {
  width: 100%;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(2, 6, 23, 0.74);
  color: #dbeafe;
  border-radius: 8px;
  padding: 0.34rem 0.48rem;
  font: inherit;
  font-size: 0.73rem;
  cursor: pointer;
}

.fto-stage-jump-btn:hover,
.fto-stage-jump-btn:focus-visible {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(15, 23, 42, 0.9);
}

.fto-stage-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.46rem;
}

.fto-stage-nav-btn {
  border: 1px solid var(--fto-line);
  border-radius: 10px;
  background: rgba(6, 12, 22, 0.84);
  color: #e2e8f0;
  text-align: left;
  padding: 0.5rem 0.58rem;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.fto-stage-nav-btn span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fto-stage-nav-btn small {
  font-size: 0.66rem;
  color: rgba(203, 213, 225, 0.88);
}

.fto-stage-nav-btn .fto-stage-nav-name {
  font-size: 0.64rem;
  color: rgba(191, 219, 254, 0.95);
  line-height: 1.22;
}

.fto-stage-nav-btn .fto-stage-nav-meta {
  font-size: 0.63rem;
  color: rgba(203, 213, 225, 0.88);
}

.fto-stage-nav-btn:hover,
.fto-stage-nav-btn:focus-visible,
.fto-stage-nav-btn.is-active {
  border-color: rgba(245, 158, 11, 0.62);
  background: rgba(30, 20, 5, 0.5);
}

.fto-stage-workspace {
  margin-top: 0.75rem;
  border: 1px solid var(--fto-line);
  border-radius: 12px;
  background: linear-gradient(
    160deg,
    rgba(8, 14, 24, 0.86),
    rgba(5, 9, 16, 0.94)
  );
  padding: 0.82rem;
}

.fto-stage-workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 0.76rem;
  align-items: flex-start;
}

.fto-stage-workspace-head h3 {
  margin: 0;
  font-size: 1rem;
  color: #f8fafc;
}

.fto-stage-summary {
  margin: 0;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  background: rgba(120, 53, 15, 0.28);
  color: #fde68a;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  padding: 0.42rem 0.58rem;
  white-space: nowrap;
}

.fto-checklist-table th,
.fto-checklist-table td {
  font-size: 0.78rem;
}

.fto-checklist-table td:nth-child(2),
.fto-checklist-table th:nth-child(2) {
  width: 170px;
}

.fto-checklist-table select,
.fto-checklist-table input[type="text"] {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--fto-line);
  background: rgba(2, 6, 23, 0.76);
  color: #e2e8f0;
  padding: 0.34rem 0.42rem;
  font: inherit;
}
.fto-signoff-cell {
  text-align: center;
}

.lspd-fto-stage-table th:nth-child(3),
.lspd-fto-stage-table td:nth-child(3) {
  width: 108px;
}

.lspd-fto-stage-table th:nth-child(4),
.lspd-fto-stage-table td:nth-child(4) {
  width: 132px;
}

.lspd-fto-stage-table th:nth-child(5),
.lspd-fto-stage-table td:nth-child(5) {
  width: 126px;
}

.lspd-fto-signoff-stack {
  display: grid;
  gap: 0.24rem;
  justify-items: center;
  min-width: 116px;
}

.lspd-fto-signoff-btn {
  border: 1px solid rgba(245, 158, 11, 0.9);
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(12, 30, 56, 0.96), rgba(7, 20, 40, 0.98));
  color: #f8fafc;
  font-family: "Barlow Condensed", "Outfit", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  inline-size: 116px;
  min-block-size: 29px;
  padding: 0.24rem 0.36rem;
  cursor: pointer;
}

.lspd-fto-signoff-btn.is-signed {
  background: linear-gradient(150deg, rgba(20, 83, 45, 0.95), rgba(21, 128, 61, 0.9));
  border-color: rgba(134, 239, 172, 0.92);
}

.lspd-fto-signoff-btn:hover,
.lspd-fto-signoff-btn:focus-visible {
  border-color: rgba(253, 224, 71, 0.95);
}

.lspd-fto-signoff-meta {
  display: block;
  inline-size: 116px;
  min-block-size: 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: transparent;
  padding: 0.14rem 0.3rem;
  font-size: 0.64rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  visibility: hidden;
}

.lspd-fto-signoff-meta.is-visible {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(20, 83, 45, 0.45);
  color: #dcfce7;
  visibility: visible;
}

.lspd-fto-signoff-date {
  display: inline-block;
  min-width: 92px;
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.9);
  white-space: nowrap;
}

.fto-written-actions {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
  align-items: center;
}

.fto-written-actions .section-copy {
  margin: 0;
  color: rgba(191, 219, 254, 0.92);
}

.fto-written-stats {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.54rem;
}

.fto-written-stats p {
  margin: 0;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  background: rgba(8, 20, 40, 0.62);
  color: #dbeafe;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  padding: 0.46rem 0.54rem;
}

.fto-written-table th:nth-child(1),
.fto-written-table td:nth-child(1) {
  width: 27%;
}

.fto-written-table th:nth-child(2),
.fto-written-table td:nth-child(2) {
  width: 31%;
}

.fto-written-table th:nth-child(3),
.fto-written-table td:nth-child(3) {
  width: 30%;
}

.fto-written-table th:nth-child(4),
.fto-written-table td:nth-child(4) {
  width: 12%;
}

.fto-written-table textarea,
.fto-written-table select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--fto-line);
  background: rgba(2, 6, 23, 0.76);
  color: #e2e8f0;
  padding: 0.34rem 0.42rem;
  font: inherit;
}

.fto-written-table textarea {
  min-height: 94px;
  resize: vertical;
}

.fto-written-question-label {
  display: flex;
  gap: 0.46rem;
  align-items: flex-start;
}

.fto-written-question-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(120, 53, 15, 0.35);
  color: #fcd34d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.16rem 0.46rem;
}

.fto-written-answer-key {
  margin: 0;
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 8px;
  background: rgba(120, 53, 15, 0.2);
  color: #fde68a;
  font-size: 0.72rem;
  line-height: 1.36;
  padding: 0.46rem 0.52rem;
}

.fto-written-response-preview {
  margin: 0;
  white-space: pre-wrap;
  color: #dbeafe;
  font-size: 0.74rem;
  line-height: 1.38;
}

.fto-written-empty {
  color: rgba(191, 219, 254, 0.76);
  font-style: italic;
}

body.sahp-fto-probie-mode
  main
  > .section:not(#trooper-stage-workspace-section) {
  display: none;
}

body.sahp-fto-probie-mode #trooper-refresh,
body.sahp-fto-probie-mode #trooper-save,
body.sahp-fto-probie-mode a[href="./fto-program.html"] {
  display: none;
}

body.sahp-fto-popup-open {
  overflow: hidden;
}

.fto-written-popup {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.fto-written-popup.hidden {
  display: none;
}

.fto-written-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(2px);
}

.fto-written-popup-dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 1px solid rgba(59, 130, 246, 0.36);
  border-radius: 14px;
  background: linear-gradient(
    160deg,
    rgba(9, 16, 28, 0.98),
    rgba(6, 11, 22, 0.97)
  );
  box-shadow:
    0 36px 72px -42px rgba(2, 6, 23, 0.94),
    0 20px 36px -28px rgba(30, 64, 175, 0.55);
  overflow: hidden;
}

.fto-written-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  padding: 0.84rem 0.96rem;
}

.fto-written-popup-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.04rem;
  letter-spacing: 0.01em;
}

.fto-written-popup-close {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.fto-written-popup-close:hover,
.fto-written-popup-close:focus-visible {
  border-color: rgba(191, 219, 254, 0.66);
  background: rgba(30, 41, 59, 0.88);
}

.fto-written-popup-meta {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.62rem 0.96rem;
}

.fto-written-popup-meta .section-copy {
  margin: 0;
}

.fto-written-popup-lock-note {
  margin-top: 0.35rem;
  color: rgba(251, 191, 36, 0.9);
  font-size: 0.72rem;
}

.fto-written-popup-body {
  overflow: auto;
  padding: 0.78rem 0.96rem 0.86rem;
  display: grid;
  gap: 0.68rem;
}

.fto-written-popup-item {
  display: grid;
  gap: 0.34rem;
}

.fto-written-popup-question {
  color: #dbeafe;
  font-size: 0.79rem;
  line-height: 1.34;
  font-weight: 600;
  user-select: none;
  -webkit-user-select: none;
}

.fto-written-popup-item textarea {
  width: 100%;
  min-height: 110px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(2, 6, 23, 0.74);
  color: #f8fafc;
  padding: 0.52rem 0.6rem;
  resize: vertical;
  font: inherit;
}

.fto-written-popup-item textarea:focus {
  outline: 2px solid rgba(59, 130, 246, 0.44);
  outline-offset: 1px;
}

.fto-written-popup-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.58rem;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.7);
  padding: 0.7rem 0.96rem;
}

.fto-parta-table th:nth-child(1),
.fto-parta-table td:nth-child(1) {
  width: 33%;
}

.fto-parta-table {
  border: 1px solid #c7a24a;
  background: #1d3149;
  table-layout: fixed;
}

.fto-parta-table th,
.fto-parta-table td {
  border: 1px solid #c7a24a !important;
  border-left: 1px solid #c7a24a !important;
  border-right: 1px solid #c7a24a !important;
}

.fto-parta-table thead th {
  background: #060606;
  color: #f8fafc;
  font-weight: 700;
}

.fto-parta-table tbody td {
  color: #f8fafc;
}

.fto-parta-table tbody td:nth-child(1) {
  background: #1e344d;
}

.fto-parta-table tbody td:nth-child(2) {
  background: #676a6f;
}

.fto-parta-table tbody td:nth-child(3),
.fto-parta-table tbody td:nth-child(4),
.fto-parta-table tbody td:nth-child(5) {
  background: #315376;
}

.fto-parta-table thead th:nth-child(4),
.fto-parta-table tbody td:nth-child(4) {
  background: linear-gradient(
    180deg,
    rgba(20, 37, 56, 0.96),
    rgba(13, 29, 48, 0.96)
  );
  border-left: 2px solid #d7ab49 !important;
  border-right: 2px solid #d7ab49 !important;
}

.fto-parta-table thead th:nth-child(5),
.fto-parta-table tbody td:nth-child(5) {
  border-left: 2px solid rgba(199, 162, 74, 0.86) !important;
}

.fto-parta-table th:nth-child(2),
.fto-parta-table td:nth-child(2),
.fto-parta-table th:nth-child(3),
.fto-parta-table td:nth-child(3) {
  width: 23%;
}

.fto-parta-table th:nth-child(4),
.fto-parta-table td:nth-child(4),
.fto-parta-table th:nth-child(5),
.fto-parta-table td:nth-child(5) {
  width: 10.5%;
  text-align: center;
}

.fto-parta-table textarea,
.fto-parta-table input[type="number"] {
  width: 100%;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #f8fafc;
  padding: 0.34rem 0.42rem;
  font: inherit;
}

.fto-parta-table textarea::placeholder,
.fto-parta-table input[type="number"]::placeholder {
  color: rgba(247, 250, 255, 0.88);
}

.fto-parta-table textarea {
  min-height: 62px;
  resize: vertical;
}

.fto-parta-table input[type="number"] {
  text-align: center;
  min-width: 64px;
  border: 1px solid rgba(215, 171, 73, 0.9);
  border-radius: 8px;
  background: rgba(8, 16, 28, 0.88);
  color: #ffe1a2;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 1px rgba(255, 217, 145, 0.2);
}

.fto-parta-task-label {
  font-weight: 700;
  color: #e4b548;
  line-height: 1.28;
}

.fto-exempt-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 250, 0.55);
  background: rgba(88, 28, 135, 0.32);
  color: #f3e8ff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fto-signoff-btn {
  margin-top: 0.35rem;
  width: 100%;
  border: 1px solid #c7a24a;
  border-radius: 8px;
  background: rgba(18, 37, 58, 0.92);
  color: #f5d27a;
  cursor: pointer;
  padding: 0.26rem 0.34rem;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fto-signoff-btn:hover,
.fto-signoff-btn:focus-visible {
  border-color: #e4b548;
  background: rgba(33, 56, 82, 0.95);
}

.fto-signoff-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.fto-signoff-meta {
  margin: 0.32rem 0 0;
  color: rgba(241, 245, 249, 0.9);
  font-size: 0.66rem;
  line-height: 1.22;
}

.fto-parta-total-row td {
  background: #0f1012;
  border-top: 1px solid #c7a24a;
  color: #f5d27a;
}

.fto-parta-meta-grid #active-stage-ftos {
  min-height: 86px;
}

.fto-parta-meta-grid #active-stage-ftos[readonly] {
  opacity: 0.9;
  background: rgba(15, 23, 42, 0.72);
  cursor: default;
}

.fto-parta-exempt-block {
  margin-top: 0.72rem;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  background: rgba(12, 20, 34, 0.72);
  padding: 0.58rem 0.64rem;
  display: grid;
  gap: 0.42rem;
}

.fto-parta-exempt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: #f8fafc;
  font-weight: 600;
}

.fto-parta-exempt-block input[type="text"] {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--fto-line);
  background: rgba(2, 6, 23, 0.76);
  color: #e2e8f0;
  padding: 0.36rem 0.44rem;
  font: inherit;
}

.fto-parta-exempt-meta {
  margin: 0;
  font-size: 0.68rem;
  color: rgba(191, 219, 254, 0.9);
}

.fto-eval-policy-note {
  margin: 0.58rem 0 0;
  border: 1px solid rgba(191, 219, 254, 0.34);
  border-radius: 9px;
  background: rgba(8, 20, 37, 0.68);
  color: #e2ecff;
  font-size: 0.71rem;
  line-height: 1.36;
  padding: 0.5rem 0.6rem;
}

.fto-parta-final-signoff {
  margin-top: 0.72rem;
  display: flex;
  gap: 0.62rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 10px;
  background: rgba(30, 20, 5, 0.46);
  padding: 0.58rem 0.66rem;
}

.fto-parta-final-state {
  margin: 0;
  font-size: 0.72rem;
  color: #fde68a;
}

.fto-parta-certification {
  margin-top: 0.62rem;
  display: flex;
  gap: 0.62rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.44);
  border-radius: 10px;
  background: rgba(10, 21, 38, 0.76);
  padding: 0.58rem 0.66rem;
}

@media (max-width: 1120px) {
  .fto-table {
    min-width: 760px;
  }
}

@media (max-width: 960px) {
  .fto-stat-card strong {
    font-size: 1.72rem;
  }

  .fto-written-actions {
    align-items: stretch;
  }

  .fto-written-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fto-stage-workspace-head {
    display: grid;
    gap: 0.58rem;
  }

  .fto-stage-summary {
    white-space: normal;
  }

  .fto-parta-final-signoff {
    display: grid;
    gap: 0.48rem;
  }

  .fto-parta-certification {
    display: grid;
    gap: 0.48rem;
  }
}

@media (max-width: 640px) {
  .fto-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fto-written-actions {
    display: grid;
  }

  .fto-written-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .fto-stage-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fto-written-popup {
    padding: 0.5rem;
  }

  .fto-written-popup-dialog {
    max-height: calc(100vh - 1rem);
  }

  .fto-written-popup-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .fto-written-popup-actions .btn {
    width: 100%;
  }
}
