:root {
  color-scheme: light;
  --ink: #15221c;
  --muted: #63716a;
  --forest: #173a2a;
  --forest-deep: #10281d;
  --green: #2f6a49;
  --mint: #dfece4;
  --cream: #f3f0e8;
  --paper: #fbfaf6;
  --line: #d9ddd8;
  --amber: #b87525;
  --shadow: 0 18px 48px rgba(17, 41, 30, 0.12);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% 4%, rgba(196, 217, 203, 0.55), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

.topbar {
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(20, 48, 35, 0.12);
  background: rgba(251, 250, 246, 0.88);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--forest);
  color: white;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.host-state {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.topnav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.topnav > a {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.topnav > a:hover {
  color: var(--green);
}

.state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4a9d6d;
  box-shadow: 0 0 0 4px rgba(74, 157, 109, 0.14);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: clamp(56px, 9vw, 112px) 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.7fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: end;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6.7vw, 82px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
}

.system-card {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--forest), var(--forest-deep));
  color: white;
  box-shadow: var(--shadow);
}

.card-label {
  margin-bottom: 18px;
  color: #bcd0c3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-title {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 22px;
}

.shield {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcecdf;
  color: var(--forest);
  font-weight: 900;
}

.system-title strong,
.system-title span {
  display: block;
}

.system-title strong {
  margin-bottom: 4px;
  font-size: 18px;
}

.system-title span {
  color: #bdd0c4;
  font-size: 13px;
}

dl {
  margin: 0;
}

dl div {
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

dt {
  color: #bdd0c4;
}

dd {
  margin: 0;
  font-weight: 700;
}

.section-heading {
  padding: 42px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  border-top: 1px solid var(--line);
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.section-heading > p {
  max-width: 420px;
  margin-bottom: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.module-card {
  min-height: 210px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

a.module-card {
  position: relative;
  color: inherit;
  text-decoration: none;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(18, 47, 33, 0.09);
}

.module-arrow {
  position: absolute;
  top: 20px;
  right: 22px;
  color: var(--green);
  font-size: 22px;
}

.module-number {
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

.module-card h3 {
  margin: 26px 0 10px;
  font-size: 20px;
}

.module-card p {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.5;
}

.module-state {
  margin-top: auto;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.decision-panel {
  margin: 72px 0;
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 72px);
  border-radius: 22px;
  background: var(--cream);
}

.decision-panel p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.decision-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: decisions;
}

.decision-panel li {
  padding: 15px 0 15px 44px;
  position: relative;
  border-bottom: 1px solid rgba(21, 34, 28, 0.12);
  line-height: 1.5;
  counter-increment: decisions;
}

.decision-panel li:first-child {
  padding-top: 0;
}

.decision-panel li::before {
  content: counter(decisions, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--amber);
  font-family: Georgia, serif;
  font-weight: 700;
}

footer {
  padding: 26px clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer span:first-child {
  color: var(--ink);
  font-weight: 800;
}

.page-intro {
  padding: 56px 0 38px;
  display: flex;
  justify-content: space-between;
  gap: 36px;
  align-items: end;
}

.page-intro h1 {
  margin-bottom: 0;
  font-size: clamp(42px, 6vw, 68px);
}

.page-intro > p {
  max-width: 470px;
  margin-bottom: 7px;
  color: var(--muted);
  line-height: 1.6;
}

.setup-grid {
  padding-bottom: 72px;
  display: grid;
  gap: 22px;
}

.setup-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.setup-panel-header {
  padding: 24px 26px 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.setup-panel-header h2 {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.setup-panel-header p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.count-badge {
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table th {
  background: rgba(239, 241, 237, 0.62);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table td.center,
.data-table th.center {
  text-align: center;
}

.person-cell strong,
.person-cell small {
  display: block;
}

.person-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.status-pill.inactive,
.status-pill.withdrawn {
  background: #ece8e4;
  color: #76675c;
}

.status-pill.awaiting {
  background: #f5e8ce;
  color: #8a5c1b;
}

.switch {
  width: 42px;
  height: 24px;
  display: inline-block;
  position: relative;
}

.switch input {
  width: 1px;
  height: 1px;
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c9cfca;
  cursor: pointer;
  transition: background 150ms ease;
}

.switch span::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: transform 150ms ease;
}

.switch input:checked + span {
  background: var(--green);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.switch input:focus-visible + span {
  outline: 3px solid rgba(47, 106, 73, 0.3);
  outline-offset: 2px;
}

.switch input:disabled + span {
  cursor: wait;
  opacity: 0.55;
}

.inline-form {
  padding: 18px 26px;
  display: flex;
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.45);
}

.field {
  display: grid;
  gap: 6px;
}

.field.grow {
  flex: 1;
}

.student-form {
  flex-wrap: wrap;
}

.planning-intro {
  align-items: center;
}

.week-picker {
  min-width: 280px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.week-picker label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.week-picker input {
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #bdc6bf;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.week-summary {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--forest);
  color: white;
  overflow: hidden;
}

.week-summary > div {
  min-height: 92px;
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.week-summary > div:last-child {
  border-right: 0;
}

.week-summary span,
.week-summary strong {
  display: block;
}

.week-summary span {
  margin-bottom: 9px;
  color: #bcd0c3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.week-summary strong {
  font-size: 13px;
  line-height: 1.45;
}

.planning-form {
  padding: 20px 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.45);
}

.planning-form .field small {
  max-width: 210px;
  color: var(--muted);
  font-size: 11px;
}

.panel-actions {
  padding: 17px 26px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.45);
}

.panel-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
}

a.button.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.button:disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mode-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--mint);
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.mode-pill.simulator {
  background: #e4e7f2;
  color: #4f5f8c;
}

.mode-pill.lct {
  background: #f5e8ce;
  color: #8a5c1b;
}

.mode-pill.other {
  background: #ece8e4;
  color: #76675c;
}

.locked-banner {
  padding: 13px 26px;
  border-bottom: 1px solid #e4c9a8;
  background: #fbefd9;
  color: #7f531b;
  font-size: 13px;
  font-weight: 700;
}

.schedule-table td {
  vertical-align: top;
}

.closeout-grid {
  min-width: 470px;
  display: grid;
  grid-template-columns: 1.2fr 72px 68px 1.4fr auto;
  gap: 7px;
  align-items: center;
}

.closeout-grid input,
.closeout-grid select {
  min-width: 0;
  height: 34px;
  padding: 5px 7px;
  border: 1px solid #c6cdc8;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.mini-button {
  height: 34px;
  padding: 5px 10px;
  border: 0;
  border-radius: 7px;
  background: var(--forest);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #bdc6bf;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(47, 106, 73, 0.12);
}

.button {
  min-height: 42px;
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  background: var(--forest);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.button:hover {
  background: #24523b;
}

.toast {
  min-height: 24px;
  margin: 0;
  padding: 0 clamp(20px, 5vw, 72px);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.toast.error {
  color: #a33d33;
}

.empty-row {
  color: var(--muted);
  text-align: center;
}

.gradebook-intro {
  align-items: center;
}

.gradebook-intro > div > p:last-child {
  max-width: 690px;
  color: var(--muted);
  line-height: 1.65;
}

.grade-rule-card {
  padding: 23px 25px;
  border: 1px solid #c8d5cd;
  border-radius: 14px;
  background: var(--mint);
}

.grade-rule-card span,
.record-summary span,
.daily-result span {
  color: var(--green);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.grade-rule-card strong {
  display: block;
  margin: 8px 0;
  color: var(--forest);
  font-size: 20px;
}

.grade-rule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.record-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(520px, 2.2fr);
  gap: 22px;
}

.student-record-list,
.student-record-detail {
  min-width: 0;
}

.student-filter {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.student-filter input,
.grade-toolbar input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #bdc6bf;
  border-radius: 9px;
  font: inherit;
}

.student-list {
  max-height: 650px;
  overflow: auto;
}

.student-record-button {
  width: 100%;
  padding: 13px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.student-record-button:hover,
.student-record-button.selected {
  background: var(--mint);
}

.student-record-button > span:first-child,
.student-record-status {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.student-record-button > span:first-child > span,
.student-record-status small {
  color: var(--muted);
  font-size: 12px;
}

.student-record-status {
  align-items: flex-end;
}

.record-header {
  align-items: center;
}

.record-actions,
.action-group {
  display: flex;
  gap: 9px;
}

.button.secondary {
  border: 1px solid #b7c5bc;
  background: white;
  color: var(--forest);
}

a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.45;
}

.record-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.record-summary > div {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.record-summary > div:last-child {
  border-right: 0;
}

.record-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.check-field {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.record-placeholder {
  margin: 0;
  padding: 38px 22px;
  color: var(--muted);
  text-align: center;
}

.sheet-history-row {
  width: 100%;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.sheet-history-row:hover {
  background: rgba(220, 235, 225, 0.45);
}

.sheet-history-row > span:nth-child(2) {
  color: var(--muted);
  font-size: 12px;
}

.grade-result {
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--mint);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.grade-result.unsat,
.daily-result.unsat {
  background: #f7d9d4;
  color: #9e382e;
}

.grade-editor {
  margin-top: 22px;
}

.weighting-panel {
  margin-top: 22px;
}

.weight-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weight-policy-card {
  padding: 22px 26px;
  border-right: 1px solid var(--line);
}

.weight-policy-card:last-child {
  border-right: 0;
}

.weight-policy-card > header,
.weight-policy-actions,
.weight-row {
  display: flex;
  align-items: center;
}

.weight-policy-card > header {
  justify-content: space-between;
  margin-bottom: 15px;
}

.weight-policy-card h3 {
  margin: 0;
}

.weight-total {
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--mint);
  color: var(--green);
  font-size: 13px;
}

.weight-total.invalid {
  background: #f7d9d4;
  color: #9e382e;
}

.weight-rows {
  display: grid;
  gap: 8px;
}

.weight-row {
  gap: 7px;
}

.weight-row input {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #bdc6bf;
  border-radius: 8px;
  font: inherit;
}

.weight-name {
  flex: 1;
}

.weight-value {
  width: 82px;
}

.weight-row span {
  color: var(--muted);
  font-size: 12px;
}

.weight-policy-actions {
  margin-top: 16px;
  justify-content: space-between;
  gap: 16px;
}

.weight-policy-actions > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.daily-result {
  min-width: 130px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--mint);
  text-align: center;
}

.daily-result strong {
  display: block;
  margin-top: 5px;
  font-size: 19px;
}

.grade-sheet-details {
  display: grid;
  grid-template-columns: 140px 140px 120px minmax(340px, 1fr) minmax(290px, 0.8fr);
  gap: 12px;
  align-items: start;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.45);
}

.grade-hours {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 6px;
}

.grade-hours strong {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.grade-hours label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.grade-hours input {
  min-width: 0;
  height: 34px;
  padding: 5px 7px;
  border: 1px solid #bdc6bf;
  border-radius: 7px;
  background: white;
  font: inherit;
}

.grade-toolbar {
  padding: 14px 22px;
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1fr;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.task-grade-table td:nth-child(2) {
  font-weight: 800;
}

.task-grade-select {
  min-width: 88px;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid #bdc6bf;
  border-radius: 7px;
  background: white;
  font: inherit;
}

.grade-notes {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
}

.grade-notes label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.grade-notes textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #bdc6bf;
  border-radius: 9px;
  font: inherit;
  resize: vertical;
}

.rcop-rule-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 280px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.rcop-rule-card span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.rcop-rule-card strong {
  margin: 6px 0 3px;
  font-size: 16px;
}

.rcop-rule-card small {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.4;
}

.rcop-workspace {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.rcop-panel {
  overflow: visible;
}

.rcop-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 26px;
}

.rcop-fields .span-2 {
  grid-column: span 2;
}

.rcop-fields .span-3 {
  grid-column: 1 / -1;
}

.crew-builder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.45);
}

.crew-builder-heading h3,
.crew-builder-heading p {
  margin: 0;
}

.crew-builder-heading h3 {
  font-size: 15px;
}

.crew-builder-heading p {
  max-width: 760px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.crew-line-list {
  display: grid;
  gap: 14px;
  padding: 18px 26px 26px;
}

.crew-line-card {
  overflow: hidden;
  border: 1px solid #c8d5cd;
  border-radius: 12px;
  background: var(--paper);
}

.crew-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--mint);
}

.crew-line-header > div {
  display: grid;
  gap: 2px;
}

.crew-line-title {
  color: var(--forest);
  font-size: 14px;
  font-weight: 900;
}

.crew-line-header small {
  color: var(--muted);
  font-size: 10px;
}

.crew-line-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
}

.crew-line-fields .span-2 {
  grid-column: span 2;
}

.aircraft-line-stack {
  display: grid;
  gap: 6px;
  min-width: 245px;
}

.aircraft-line-stack .table-actions {
  align-items: center;
}

.aircraft-line-stack small {
  min-width: 20px;
  color: var(--green);
  font-weight: 900;
}

.aircraft-line-stack select {
  min-width: 120px;
  height: 34px;
  border: 1px solid #c6cdc8;
  border-radius: 7px;
  background: white;
}

.student-picker {
  margin: 0;
  padding: 20px 26px 24px;
  border: 0;
  border-top: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.45);
}

.student-picker legend {
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.student-picker > p {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

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

.student-choice {
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  cursor: pointer;
}

.student-choice:has(input:checked) {
  border-color: var(--green);
  background: var(--mint);
}

.student-choice input {
  margin-top: 3px;
  accent-color: var(--green);
}

.student-choice > span {
  display: grid;
  min-width: 0;
}

.student-choice strong {
  color: var(--green);
  font-size: 11px;
}

.student-choice span span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-choice small {
  color: var(--muted);
  font-size: 10px;
}

.risk-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 26px;
}

.calculated-output {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #bdc6bf;
  border-radius: 9px;
  background: #f4f6f4;
  color: var(--green);
  font-weight: 900;
}

.calculated-output.medium {
  background: #fff6d9;
  color: #704d00;
}

.calculated-output.high {
  background: #f5dddd;
  color: #8b2d27;
}

.rcm-workbook {
  display: grid;
  gap: 18px;
  padding: 22px 26px 26px;
}

.rcm-crew-list {
  display: grid;
  gap: 14px;
}

.rcm-section {
  overflow: hidden;
  border: 1px solid #becbc3;
  border-radius: 12px;
  background: var(--paper);
}

.rcm-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #e7ebe8;
}

.rcm-section > header > div {
  display: grid;
  gap: 2px;
}

.rcm-section > header span:first-child {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.rcm-section > header strong {
  font-size: 14px;
}

.rcm-member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
}

.rcm-member {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.rcm-member[hidden] {
  display: none;
}

.rcm-member legend {
  padding: 0 6px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 900;
}

.rcm-member-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rcm-check {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f8f7;
  cursor: pointer;
}

.rcm-check:has(input:checked) {
  border-color: #c69b28;
  background: #fff4ce;
}

.rcm-check input,
.matrix-choice input {
  accent-color: var(--green);
}

.rcm-check span {
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.rcm-check small {
  color: #704d00;
  font-weight: 900;
}

.rcm-controls,
.rcm-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
  border-top: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.35);
}

.rcm-controls .span-2,
.rcm-detail-grid .span-2 {
  grid-column: span 2;
}

.rcm-section-body {
  display: grid;
}

.rcm-table-wrap {
  overflow-x: auto;
}

.rcm-matrix {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rcm-matrix th,
.rcm-matrix td {
  padding: 7px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.rcm-matrix th:first-child {
  width: 58%;
  text-align: left;
}

.rcm-matrix thead th {
  background: #223f31;
  color: white;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.rcm-matrix tbody th {
  font-size: 11px;
  font-weight: 750;
}

.matrix-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 54px;
  cursor: pointer;
}

.matrix-choice span {
  font-size: 11px;
  font-weight: 900;
}

.rcm-na {
  color: var(--muted);
  font-size: 10px;
}

.rcm-section-body h4 {
  margin: 0;
  padding: 14px 15px 0;
  color: var(--forest);
  font-size: 12px;
}

.rcm-weather-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 15px 15px;
}

.rcm-weather-card {
  display: grid;
  grid-template-columns: 0.45fr 1fr 1fr;
  gap: 9px;
  align-items: end;
  padding: 11px;
  border: 1px solid #aabeb2;
  border-radius: 9px;
  background: var(--mint);
}

.rcm-weather-card.inactive {
  border-color: var(--line);
  background: #f4f4f2;
  opacity: 0.62;
}

.rcm-weather-card > strong {
  align-self: center;
  color: var(--green);
  font-size: 11px;
}

.risk-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.risk-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.7);
  font-weight: 850;
}

.risk-card-fields {
  display: grid;
  grid-template-columns: 0.75fr 2fr 0.85fr;
  gap: 9px;
  padding: 14px;
}

.risk-result,
.risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.risk-result.low,
.risk-badge.low {
  background: #d7eee0;
  color: #185536;
}

.risk-result.medium,
.risk-badge.medium {
  background: #ffe8a6;
  color: #704d00;
}

.risk-result.high,
.risk-badge.high {
  background: #a83d35;
  color: #fff;
}

.authority-section {
  display: grid;
  grid-template-columns: 1fr 46px 1fr;
  gap: 14px;
  align-items: end;
  padding: 20px 26px;
  border-top: 1px solid var(--line);
}

.authority-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.rcop-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 26px;
  border-top: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.45);
}

.rcop-submit p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.rcop-history {
  margin-top: 22px;
}

.table-actions {
  display: flex;
  gap: 6px;
}

a.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.backup-summary strong {
  font-size: 13px;
}

.backup-grid {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  margin-top: 22px;
}

.backup-location-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.backup-location-form .button {
  justify-self: start;
}

.recovery-panel {
  align-self: start;
}

.recovery-content {
  padding: 22px 26px 26px;
}

.recovery-content p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.recovery-location {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mint);
}

.recovery-location span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.recovery-location strong {
  overflow-wrap: anywhere;
  color: var(--green);
  font-size: 12px;
}

.hash-cell {
  font-family: Consolas, monospace;
  font-size: 11px;
}

.official-rcop-main {
  width: min(1520px, calc(100% - 32px));
  padding: 34px 0 72px;
}

.official-form-heading {
  display: flex;
  gap: 30px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.official-form-heading h1 {
  margin: 4px 0 8px;
  font-family: Georgia, serif;
  font-size: clamp(29px, 4vw, 46px);
  line-height: 1.02;
}

.official-form-heading p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.official-page-key {
  min-width: 190px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.official-page-key span {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.official-page-key strong {
  font-size: 12px;
}

.official-record-controls {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
  padding: 13px 14px;
  border: 1px solid rgba(23, 58, 42, 0.2);
  border-radius: 12px;
  background: rgba(251, 250, 246, 0.96);
  box-shadow: 0 9px 28px rgba(17, 41, 30, 0.1);
  backdrop-filter: blur(10px);
}

.official-record-controls .field {
  min-width: 210px;
}

.official-record-controls .deviation-control {
  flex: 1;
}

.official-page-section {
  margin: 0 0 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #e6e7e4;
  box-shadow: var(--shadow);
}

.official-page-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.official-page-section > header span {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.official-page-section > header h2 {
  margin: 2px 0 0;
  font-size: 17px;
}

.official-page-section > header small {
  color: var(--muted);
}

.official-form-scroll {
  overflow-x: auto;
  padding: 16px;
}

.official-form-page {
  position: relative;
  width: 100%;
  min-width: 1180px;
  aspect-ratio: 22 / 17;
  margin: 0 auto;
  overflow: hidden;
  background: white;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.13);
  container-type: inline-size;
}

.official-form-page > img,
.official-form-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.official-form-page > img {
  z-index: 0;
  display: block;
}

.official-form-overlay {
  z-index: 1;
  pointer-events: none;
}

.official-field {
  position: absolute;
  z-index: 2;
  min-width: 0;
  margin: 0;
  padding: 0 0.18em;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 1px;
  outline: 0;
  background: rgba(255, 255, 255, 0.03);
  color: #06170d;
  font: 700 0.78cqw/1 Arial, sans-serif;
  text-align: left;
  pointer-events: auto;
}

select.official-field {
  padding-right: 0.85em;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(10, 65, 35, 0.55) 50%),
    linear-gradient(135deg, rgba(10, 65, 35, 0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 0.55em) 50%,
    calc(100% - 0.35em) 50%;
  background-size: 0.22em 0.22em, 0.22em 0.22em;
  background-repeat: no-repeat;
}

textarea.official-field {
  padding: 0.18em 0.25em;
  resize: none;
  line-height: 1.05;
}

.official-field:hover,
.official-field:focus {
  z-index: 6;
  border-color: #138147;
  background-color: rgba(235, 255, 241, 0.92);
  box-shadow: 0 0 0 1px rgba(19, 129, 71, 0.18);
}

.official-output {
  display: flex;
  align-items: center;
  padding: 0 0.18em;
  white-space: normal;
}

.official-output.risk-output,
.risk-select,
.center-control,
.approval-mark {
  justify-content: center;
  text-align: center;
}

.official-output[data-risk="L"],
.matrix-cell.selected[data-risk="L"] {
  color: #0c5e2e;
}

.official-output[data-risk="M"],
.matrix-cell.selected[data-risk="M"] {
  color: #8a5100;
}

.official-output[data-risk="H"],
.official-output[data-risk="EH"],
.matrix-cell.selected[data-risk="H"],
.matrix-cell.selected[data-risk="EH"] {
  color: #a11212;
}

.matrix-cell {
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  background: transparent;
  color: #0c5e2e;
  font-size: 0;
  font-weight: 900;
  text-align: center;
}

.matrix-cell:hover,
.matrix-cell:focus {
  border: 1px solid #138147;
  background: rgba(222, 249, 229, 0.72);
}

.matrix-cell.selected {
  border: 1px solid rgba(10, 99, 49, 0.48);
  background: rgba(206, 242, 216, 0.76);
  font-size: 0.92cqw;
}

.matrix-cell.selected::after {
  content: attr(data-risk-display);
}

.matrix-cell.selected[data-risk-display=""]::after {
  content: "X";
}

.official-form-page .compact-control {
  font-size: 0.66cqw;
}

.official-form-page input[type="date"]::-webkit-calendar-picker-indicator {
  width: 0.75em;
  height: 0.75em;
  margin: 0;
  padding: 0;
  opacity: 0.35;
}

.official-form-page input[type="date"]:not(.has-value):not(:focus) {
  color: transparent;
}

.official-form-page input[type="date"]:not(.has-value):not(:focus)::-webkit-calendar-picker-indicator {
  opacity: 0;
}

.official-form-page .approval-mark {
  font-size: 1.15cqw;
}

.rcop-history {
  margin-top: 36px;
}

.fillable-document-body {
  min-height: 100vh;
  background: #222;
}

.fillable-document-bar {
  min-height: 70px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #cfd6d1;
  background: var(--paper);
}

.fillable-document-bar strong,
.fillable-document-bar span {
  display: block;
}

.fillable-document-bar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.fillable-document-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
}

.fillable-document-bar .mini-button.active {
  border-color: var(--green);
  background: var(--mint);
  color: var(--forest);
}

.fillable-document-main {
  width: 100%;
  margin: 0;
}

.fillable-document-status {
  min-height: 32px;
  margin: 0;
  padding: 7px 20px;
  background: #e8f2eb;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.fillable-document-status.error {
  background: #f8e2df;
  color: #9a251c;
}

.fillable-web-scroll {
  overflow: auto;
  padding: 20px;
}

.fillable-source-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid #c8d2cd;
  background: #f4f8f5;
  color: #173e2d;
}

.fillable-source-bar label {
  font-weight: 800;
  white-space: nowrap;
}

.fillable-source-bar select {
  min-width: min(520px, 48vw);
  padding: 8px 10px;
  border: 1px solid #7e9589;
  border-radius: 5px;
  background: white;
  color: #111;
  font: inherit;
}

.fillable-source-bar span {
  color: #51665c;
  font-size: 0.9rem;
}

.fillable-web-page {
  position: relative;
  width: min(100%, 2200px);
  min-width: 1220px;
  aspect-ratio: 22 / 17;
  margin: 0 auto;
  overflow: hidden;
  background: white;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.38);
  container-type: inline-size;
}

.fillable-web-page > img,
.fillable-web-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fillable-web-page > img {
  display: block;
}

.fillable-web-field {
  position: absolute;
  min-width: 0;
  margin: 0;
  padding: 0 0.25em;
  overflow: hidden;
  border: 1px solid rgba(24, 108, 171, 0.4);
  border-radius: 1px;
  outline: 0;
  background: rgba(212, 235, 252, 0.32);
  color: #000;
  font: 650 0.62cqw/1 Arial, sans-serif;
}

.fillable-web-field.center {
  text-align: center;
}

.form-3062-page-2-field {
  padding: 0 0.16em;
  font-size: 0.72cqw;
  font-weight: 600;
}

.form-3062-page-1-field {
  padding: 0 0.3em;
  font-size: 0.68cqw;
  font-weight: 600;
}

.form-3062-request-date-label {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  padding-right: 0.25em;
  color: #000;
  font: 500 0.68cqw/1 Arial, sans-serif;
  pointer-events: none;
}

textarea.form-3062-page-1-field {
  padding: 0.3em 0.38em;
  resize: none;
  line-height: 1.12;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

select.form-3062-page-2-field {
  text-align-last: center;
}

.fillable-static-correction {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: #000;
  font: 650 0.60cqw/1 Arial, sans-serif;
  pointer-events: none;
}

.fillable-static-correction.static-band-gray {
  background: #bfbfbf;
}

.fillable-static-correction.static-band-white {
  background: #fff;
}

.fillable-web-field.ms-cell {
  border-color: #000;
  color: #000;
}

.fillable-web-field.ms-cell.ms-band-gray {
  background: #bfbfbf;
}

.fillable-web-field.ms-cell.ms-band-white {
  background: #fff;
}

.fillable-web-field.ms-cell:hover,
.fillable-web-field.ms-cell:focus {
  background: #eaf6ff;
}

select.fillable-web-field {
  cursor: pointer;
}

.fillable-web-field:hover {
  background: rgba(200, 231, 252, 0.64);
}

.fillable-web-field:focus {
  z-index: 3;
  border-color: #0a6fb4;
  background: rgba(235, 248, 255, 0.96);
  box-shadow: 0 0 0 2px rgba(10, 111, 180, 0.2);
}

.rcm-field {
  font-size: 0.56cqw;
  line-height: 1;
}

.rcm-field.center {
  text-align: center;
  text-align-last: center;
}

textarea.rcm-field {
  padding: 0.25em 0.35em;
  resize: none;
  line-height: 1.08;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.rcm-static-correction {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0 0.2em;
  overflow: hidden;
  color: #000;
  font: 650 0.55cqw/1.05 Arial, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.rcm-static-correction.action-instruction {
  background: #e5e5e5;
  font-size: 0.56cqw;
}

.rcm-static-correction.action-heading {
  background: #ccc;
  font-size: 0.56cqw;
  font-weight: 800;
}

.rcm-static-correction.mitigation-heading {
  background: #b7b7b7;
  font-size: 0.58cqw;
  font-weight: 800;
}

.rcm-static-correction.mission-row-label {
  justify-content: flex-start;
  padding-left: 0.25em;
  font-size: 0.54cqw;
  font-weight: 650;
  text-align: left;
  white-space: normal;
}

.rcm-static-correction.document-title {
  background: #fff;
  font-size: 1.05cqw;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.rcm-static-correction.whiteout {
  background: #fff;
}

.rcm-static-correction.planning-time-heading {
  background: #d8d8d8;
  font-size: 0.56cqw;
}

.rcm-static-correction.lunar-condition {
  background: #fff;
  font-size: 0.52cqw;
  text-align: center;
  white-space: nowrap;
}

.rcm-static-correction.row-white {
  background: #fff;
}

.rcm-static-correction.row-gray {
  background: #d8d8d8;
}

.rcm-matrix-cell {
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.rcm-matrix-cell.selected {
  border-color: #16804b;
  background: rgba(212, 235, 252, 0.88);
  color: #000;
  font-size: 0.72cqw;
}

.rcm-matrix-cell.selected::after {
  content: attr(data-risk);
}

.rcm-matrix-cell.selected[data-risk="L"],
.fillable-web-field[data-risk-tone="L"] {
  border-color: #07913a;
  background: #00e84a;
  color: #000;
}

.rcm-matrix-cell.selected[data-risk="M"],
.rcm-matrix-cell.selected[data-risk="M*"],
.fillable-web-field[data-risk-tone="M"] {
  border-color: #b08b00;
  background: #ffe600;
  color: #000;
}

.rcm-matrix-cell.selected[data-risk="H"],
.rcm-matrix-cell.selected[data-risk="H*"],
.rcm-matrix-cell.selected[data-risk="EH"],
.fillable-web-field[data-risk-tone="H"],
.fillable-web-field[data-risk-tone="EH"] {
  border-color: #a40000;
  background: #ff3b30;
  color: #000;
}

.rcm-field.computed-risk {
  pointer-events: none;
}

select.rcm-field.computed-risk {
  padding-right: 0.25em;
  appearance: none;
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: #000;
}

.fillable-web-field.computed-field {
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: #000;
}

select.fillable-web-field.computed-field {
  pointer-events: none;
  padding-right: 0.25em;
  appearance: none;
}

.fillable-static-correction.risk-summary-label,
.fillable-web-field.risk-summary-field {
  border: 0;
  border-radius: 0;
}

.fillable-static-correction.risk-summary-top-border {
  z-index: 2;
  border-top: 3px solid #000;
  background: transparent;
}

.fillable-web-field.approval-signature {
  border: 0;
  border-radius: 0;
  background: rgba(212, 235, 252, 0.28);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 0.72cqw;
  font-weight: 700;
}

input.fillable-web-field.voco-checkbox {
  appearance: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: #163f2f;
  cursor: pointer;
}

.fillable-web-field.voco-dtg {
  border: 0;
  border-radius: 0;
  background: rgba(212, 235, 252, 0.28);
  font-size: 0.56cqw;
  font-weight: 700;
}

.fillable-web-field.flight-summary-field {
  border-color: #000;
  border-radius: 0;
  background: rgba(212, 235, 252, 0.32);
  font-size: 0.64cqw;
  font-weight: 700;
}

[data-approval-locked="true"] .fillable-document-status {
  background: #fff0b8;
  color: #614600;
}

[data-approval-locked="true"] .fillable-web-field:disabled:not([data-risk-tone]):not(.selected):not(.rcm-action-required):not(.rcm-action-complete):not(.rcm-action-gfr) {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  -webkit-text-fill-color: #000;
}

[data-approval-locked="true"] .fillable-web-field:not(:disabled):not([data-risk-tone]) {
  border-color: rgba(24, 108, 171, 0.4);
  background: rgba(212, 235, 252, 0.32);
}

[data-approval-locked="true"] .fillable-web-field.postflight-required:not(:disabled):invalid {
  outline: 2px solid #b91c1c;
  outline-offset: -2px;
}

[data-approval-locked="true"] .fillable-web-field.ms-cell:not(:disabled) {
  border-color: #000;
}

[data-approval-locked="true"] .fillable-web-field.ms-cell.ms-band-gray,
.fillable-web-field.ms-cell.ms-band-gray {
  background: #bfbfbf !important;
}

[data-approval-locked="true"] .fillable-web-field.ms-cell.ms-band-white,
.fillable-web-field.ms-cell.ms-band-white {
  background: #fff !important;
}

[data-approval-locked="true"] .fillable-web-field.ms-cell:disabled {
  border-color: #000 !important;
  opacity: 1;
}

.close-rcop-dialog {
  width: min(92vw, 31rem);
  border: 1px solid #8b1f1f;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.close-rcop-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.close-rcop-dialog form {
  display: grid;
  gap: 0.9rem;
  padding: 1.25rem;
}

.close-rcop-dialog h2,
.close-rcop-dialog p {
  margin: 0;
}

.close-rcop-dialog label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.close-rcop-dialog input {
  min-height: 2.7rem;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.close-rcop-dialog .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.close-rcop-dialog .dialog-error {
  min-height: 1.25rem;
  color: #9f1239;
  font-weight: 700;
}

.flight-time-review strong,
.flight-time-review small {
  display: block;
  white-space: nowrap;
}

.flight-time-review small {
  margin-top: 0.2rem;
  color: #475569;
  font-weight: 650;
}

textarea.fillable-web-field.adjustment-notes-field {
  border: 0;
  border-radius: 0;
  resize: none;
  overflow: auto;
  padding: 0.45em 0.55em;
  background: rgba(212, 235, 252, 0.28);
  color: #000;
  font: 500 0.70cqw/1.25 Arial, sans-serif;
}

.fillable-static-correction.overall-risk-body-cover {
  background: #fff;
}

.fillable-static-correction.overall-risk-row-label {
  border: 0;
  border-top: 1px solid #000;
  border-right: 1px solid #000;
  font-size: 0.68cqw;
  font-weight: 500;
}

.fillable-web-field.overall-risk-cell {
  border: 0;
  border-top: 1px solid #000;
  border-radius: 0;
}

.fillable-static-correction.overall-risk-outer-border {
  z-index: 2;
  border: 3px solid #000;
  background: transparent;
}

.fillable-static-correction.overall-band-gray,
select.fillable-web-field.overall-band-gray:not([data-risk-tone]) {
  background: #bfbfbf;
}

.fillable-static-correction.overall-band-white,
select.fillable-web-field.overall-band-white:not([data-risk-tone]) {
  background: #fff;
}

textarea.rcm-field.crew-action-status {
  padding: 0.9em 0.25em 0.2em;
  font-size: 0.50cqw;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

textarea.rcm-field.section-risk-status {
  padding: 0.7em 0.2em 0.15em;
  font-size: 0.46cqw;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

.rcm-matrix-cell.rcm-action-choice.selected {
  border-color: #4d895b;
  background: #dff3e3;
  color: #000;
  font-size: 0.78cqw;
}

.fillable-web-field.rcm-action-required {
  border-color: #bb5a5a;
  background: #f7d7d7;
  color: #000;
}

.fillable-web-field.rcm-action-complete {
  border-color: #5d9569;
  background: #dff3e3;
  color: #000;
}

.fillable-web-field.rcm-action-gfr {
  border-color: #b28a25;
  background: #fff0b8;
  color: #000;
}

@media print {
  @page {
    size: letter landscape;
    margin: 0;
  }

  .fillable-document-bar,
  .fillable-source-bar,
  .fillable-document-status {
    display: none;
  }

  .fillable-document-body,
  .fillable-document-main,
  .fillable-web-scroll {
    margin: 0;
    padding: 0;
    overflow: visible;
    background: white;
  }

  .fillable-web-page {
    width: 11in;
    min-width: 0;
    height: 8.5in;
    box-shadow: none;
  }

  [data-active-document="rcm"] #fillable-5484-view,
  [data-active-document="5484"] #fillable-rcm-view {
    display: none !important;
  }

  .fillable-web-field {
    border-color: transparent;
    background: transparent;
    color: black;
    appearance: none;
  }

  .fillable-web-field.approval-signature,
  .fillable-web-field.voco-dtg,
  textarea.fillable-web-field.adjustment-notes-field {
    background: transparent;
  }

  .fillable-web-field.ms-cell.ms-band-gray {
    background: #bfbfbf;
  }

  .fillable-web-field.ms-cell.ms-band-white {
    background: #fff;
  }
}

@media (max-width: 900px) {
  .official-form-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .official-page-key {
    width: fit-content;
  }

  .official-record-controls {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .official-record-controls .field {
    width: 100%;
  }
}

@media (max-width: 850px) {
  .hero,
  .decision-panel,
  .page-intro {
    grid-template-columns: 1fr;
  }

  .page-intro {
    display: grid;
  }

  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .week-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .week-summary > div:nth-child(2) {
    border-right: 0;
  }

  .record-layout {
    grid-template-columns: 1fr;
  }

  .weight-policy-grid {
    grid-template-columns: 1fr;
  }

  .weight-policy-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rcop-fields,
  .crew-line-fields,
  .risk-section-grid,
  .rcm-member-grid,
  .rcm-member-fields,
  .rcm-controls,
  .rcm-detail-grid,
  .rcm-weather-grid {
    grid-template-columns: 1fr;
  }

  .rcop-fields .span-2,
  .rcop-fields .span-3,
  .crew-line-fields .span-2 {
    grid-column: auto;
  }

  .rcm-controls .span-2,
  .rcm-detail-grid .span-2 {
    grid-column: auto;
  }

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

  .backup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .host-state,
  footer span:last-child {
    display: none;
  }

  main {
    width: min(100% - 28px, 1180px);
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .week-summary {
    grid-template-columns: 1fr;
  }

  .week-summary > div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .record-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .grade-toolbar,
  .grade-sheet-details,
  .sheet-history-row {
    grid-template-columns: 1fr;
  }

  .student-choice-grid,
  .authority-section {
    grid-template-columns: 1fr;
  }

  .authority-separator {
    height: auto;
  }

  .rcop-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .crew-builder-heading {
    align-items: stretch;
    flex-direction: column;
  }
}
