.dfr-main {
  width: min(100% - 48px, 1080px);
  margin: 50px auto;
  padding: 0;
}

.dfr-main h1 { margin: 0 0 26px; }
.dfr-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dfr-panel { padding: clamp(20px, 3vw, 34px); background: white; border: 1px solid var(--line); border-radius: 16px; }
.dfr-panel h2 { font: 700 24px/1.3 Manrope, sans-serif; letter-spacing: -.7px; margin: 0; }
.dfr-help { color: #536358; font-size: 14px; line-height: 1.5; margin: 6px 0 0; }
.dfr-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 22px 0 10px; }
.dfr-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dfr-practice-label { grid-row: 2; grid-column: 1; align-self: center; color: #325b4d; font-weight: 700; }
.dfr-fields > div { display: flex; flex-direction: column; min-width: 0; }
.dfr-fields label { text-align: center; margin-bottom: 7px; font-size: 16px; line-height: 1.3; font-weight: 700; }
.dfr-fields input, .dfr-fields output {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 3px; text-align: center;
  font: 500 20px/1.25 var(--mono); color: var(--ink); border-radius: 7px;
}
.dfr-fields input { margin-top: auto; background: #fff; border: 1px solid #acbaaf; }
.dfr-fields output { display: grid; place-items: center; background: #eff5ee; }
#practiceUp { grid-row: 2; grid-column: 2; }
#practiceDown { grid-row: 2; grid-column: 3; }
.dfr-fields input::placeholder { color: #78867c; }
.dfr-fields input[aria-invalid="true"] { border-color: #a13e21; }
.dfr-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.dfr-actions button {
  min-height: 44px; padding: 8px 12px; font: inherit; font-weight: 650; color: var(--ink);
  background: #f3f6ee; border: 1px solid #b4c2b2; border-radius: 7px;
}
.dfr-actions button:hover { background: #e5edde; }
.dfr-actions button:focus-visible { outline: 3px solid #8daea0; outline-offset: 3px; }
#dfr-status { color: #863d22; margin: 12px 0 0; }
#dfr-status:empty { margin: 0; }
.dfr-results { background: #edf3e9; border-color: #ceddcd; }
.dfr-total { padding: 18px 0; border-bottom: 1px solid #cbdcc9; }
.dfr-total h3 { margin: 0; font-size: 15px; font-weight: 650; }
.dfr-total output { font: 650 clamp(36px, 5vw, 54px)/1.2 Manrope, sans-serif; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.dfr-total span { color: #526658; }
#flight-decimal { white-space: nowrap; }
@media (max-width: 720px) {
  .dfr-main { width: calc(100% - 32px); margin-top: 30px; }
  .dfr-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dfr-worksheet-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  .dfr-fields { gap: 7px 4px; }
  .dfr-fields label { font-size: 14px; }
  .dfr-fields input, .dfr-fields output { font-size: 16px; }
  .dfr-practice-label { font-size: 13px; }
}
@media (max-width: 380px) {
  .dfr-main { width: calc(100% - 20px); }
  .dfr-panel { padding: 15px 12px; }
}

.clock-period, .meter-unit { min-height: 1.4em; margin-top: 4px; font: 650 13px/1.4 Manrope,sans-serif; color: #325b4d; text-align: center; }
.meter-unit { font-weight: 450; color: #536358; }
.night-total { margin: 9px 0 0; display: flex; align-items: baseline; gap: 3px 8px; flex-wrap: wrap; }
.night-total span { color: var(--ink); font-size: 14px; }
.dfr-total .night-total output { font: 700 16px/1.35 Manrope,sans-serif; letter-spacing: normal; }
.overnight-row { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.overnight-row input { width: auto; }
.overnight-row[hidden] { display: none; }

.dfr-allocation { margin-top: 22px; }
.dfr-allocation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dfr-allocation-heading h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.dfr-allocation-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 12px; }
.dfr-allocation-table th, .dfr-allocation-table td { padding: 10px 4px; text-align: left; vertical-align: top; }
.dfr-allocation-table thead { border-bottom: 1px solid #cbdcc9; color: #526658; font-size: 12px; }
.dfr-allocation-table th:first-child { width: 19%; }
.dfr-allocation-table th:nth-child(2) { width: 19%; }
.dfr-allocation-table th:nth-child(3) { width: 27%; }
.dfr-allocation-table tbody th { padding-top: 23px; font-size: 14px; }
.dfr-allocation-table output { display: block; padding-top: 12px; font: 700 18px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.dfr-allocation-table input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #acbaaf; border-radius: 7px; padding: 10px 7px; background: #fff; color: var(--ink); font: 600 18px/1.2 var(--mono); }
.dfr-allocation-table input::placeholder { color: #78867c; }
.dfr-allocation-table input:disabled { background: #e5eadd; }
.dfr-allocation-table input[aria-invalid="true"] { border-color: #a13e21; }
.dfr-allocation input:focus-visible { outline: 3px solid #8daea0; outline-offset: 2px; }
.dfr-allocation-category { display: block; margin-top: 5px; font-size: 11px; line-height: 1.4; color: #526658; }
.dfr-allocation-error-row td { padding: 0; }
.dfr-allocation-error-row p { margin: 0; color: #863d22; font-size: 13px; line-height: 1.4; }
.dfr-allocation-error-row p:not(:empty) { padding: 0 4px 8px; }
#allocation-status:empty { display: none; }
