@font-face {
  font-family: 'Switzer';
  src: url('/assets/fonts/switzer-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('/assets/fonts/switzer-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('/assets/fonts/switzer-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('/assets/fonts/switzer-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f9f8f4;
  --paper: #ffffff;
  --tint: #eef2ee;
  --ink: #0d1f18;
  --soft: #3f524a;
  --faint: #5f736b;
  --line: #cad5cf;
  --line-strong: #0d1f18;
  --accent: #0f5d46;
  --accent-ink: #ffffff;
  --ok: #0b6b43;
  --ok-bg: #ecfdf5;
  --alert: #b91c1c;
  --alert-bg: #fef2f2;
  --warn: #8c5a08;
  --warn-bg: #fef9ec;
  --font: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.wl-bar {
  background: #0d1f18;
  color: #f8fafc;
  padding: 9px 18px;
  border-bottom: 2px solid #10b981;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin: 0 0 4px;
}
.wl-bar strong {
  color: #ffffff;
  font-weight: 700;
}
.wl-badge {
  background: #163328;
  border: 1px solid #285745;
  color: #6ee7b7;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}

.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0 16px;
  border-bottom: 2px solid var(--ink);
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.025em;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo span {
  color: var(--accent);
}
.logo small {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--soft);
  letter-spacing: 0;
  margin-top: 3px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
nav a:hover {
  color: var(--accent);
}
nav a.navcta {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 700;
}
nav a.navcta:hover {
  border-color: var(--ink);
}

.crumbs {
  font-size: 12.5px;
  color: var(--soft);
  margin: 16px 0 6px;
}
.crumbs a {
  color: var(--soft);
  text-decoration: none;
}
.crumbs a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 10px;
}

fieldset {
  border: 1px solid var(--line);
  border-top: 2px solid var(--ink);
  background: var(--paper);
  border-radius: 4px;
  padding: 18px 20px 20px;
  margin: 0 0 18px;
}

legend {
  font-weight: 800;
  font-size: 14.5px;
  padding: 0 8px;
  color: var(--ink);
}

.grid {
  display: grid;
  gap: 14px;
}
.g2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
label .req {
  color: var(--alert);
}

/* Modern Web Guidance: Format hints placed ABOVE inputs */
.hint {
  display: block;
  font-size: 12px;
  color: var(--soft);
  margin-bottom: 5px;
  line-height: 1.35;
}

.error-msg {
  display: none;
  color: var(--alert);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 4px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  font-family: var(--font);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #8ea39a;
  border-radius: 4px;
  transition: border-color 0.12s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

/* Modern Web Guidance: Deferred validation via :user-invalid and :user-valid */
input:user-invalid,
input.user-invalid-fallback {
  border-color: var(--alert);
  background-color: var(--alert-bg);
}

input:user-invalid + .error-msg,
input.user-invalid-fallback + .error-msg {
  display: block;
}

input:user-valid {
  border-color: var(--ok);
}

button,
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 4px;
  border: 1px solid #8ea39a;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.cta:hover {
  border-color: var(--ink);
  background: var(--tint);
}
button.primary,
.cta {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
button.primary:hover,
.cta:hover {
  background: #094231;
  border-color: #094231;
}

/* Modern Web Guidance: Responsive sticky table wrapper with @container stacked layout */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 80vh);
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

caption {
  text-align: left;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--soft);
  background: var(--tint);
  border-bottom: 1px solid var(--line);
}

thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: var(--ink);
  color: #ffffff;
}

th, td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--paper);
  z-index: 1;
  font-weight: 700;
  min-width: 210px;
}

@container (width < 600px) {
  .table-wrapper table.stackable,
  .table-wrapper table.stackable thead,
  .table-wrapper table.stackable tbody,
  .table-wrapper table.stackable tr,
  .table-wrapper table.stackable th,
  .table-wrapper table.stackable td {
    display: block;
  }
  .table-wrapper table.stackable thead {
    display: none;
  }
  .table-wrapper table.stackable tr {
    margin-block-end: 12px;
    border-bottom: 2px solid var(--line);
  }
  .table-wrapper table.stackable td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--ink);
  }
}

.workbench {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}
@media (max-width: 920px) {
  .workbench { grid-template-columns: 1fr; }
}

.sched-sheet {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 20px;
  position: sticky;
  top: 16px;
}
.sched-header {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sched-part {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--ink);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 3px;
  margin: 12px 0 8px;
}
.sched-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.sched-line strong {
  white-space: nowrap;
}
.sched-total {
  background: var(--ok-bg);
  border: 1.5px solid var(--ok);
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 14px;
}

.article {
  max-width: 780px;
  padding: 20px 0 12px;
}
.article h1 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
}
.byline {
  font-size: 13px;
  color: var(--soft);
  margin: 6px 0 18px;
}
.answer {
  background: var(--paper);
  border-left: 4px solid var(--accent);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 18px;
  border-radius: 0 4px 4px 0;
  margin: 18px 0 26px;
}
.answer .q {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--ink);
  margin: 0 0 6px;
}
.answer p {
  margin: 0;
  font-size: 15px;
}
.body h2 {
  font-size: 21px;
  margin: 28px 0 10px;
}
.body table {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0 22px;
}
.body th {
  background: var(--tint);
  color: var(--ink);
  font-weight: 700;
}

.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
}
.faq details p {
  margin: 8px 0 0;
  color: var(--soft);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.cards a {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: 4px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
}
.cards a:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
}
.cards h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 5px;
}
.cards p {
  font-size: 13px;
  color: var(--soft);
  margin: 0;
}

.band {
  background: var(--ink);
  color: #ffffff;
  border-radius: 6px;
  padding: 24px 28px;
  margin: 36px 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.band h2 {
  color: #ffffff;
  font-size: 21px;
  margin: 0 0 6px;
}
.band p {
  color: #cbd5e1;
  margin: 0;
  max-width: 58ch;
}
.band .subnote {
  font-size: 12px;
  margin-top: 6px;
  text-align: center;
}

footer {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 36px;
  font-size: 13px;
  color: var(--soft);
}
footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.code-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--tint);
  border: 1px solid var(--line);
  color: var(--ink);
}

.dispatch-ledger {
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  background: #ffffff;
  border-radius: 4px;
  padding: 16px 20px;
  margin: 18px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dispatch-meta {
  flex: 1 1 420px;
}
.dispatch-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 7px;
  border-radius: 3px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dispatch-meta strong {
  display: block;
  font-size: 15.5px;
  color: var(--ink);
  margin-bottom: 4px;
}
.dispatch-meta p {
  font-size: 13px;
  color: var(--soft);
  margin: 0;
  max-width: 66ch;
}
.dispatch-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.dispatch-sub {
  font-size: 11.5px;
  color: var(--soft);
}


/* === Ultra-Clean Mobile & Thin-Screen (320px-480px) Optimization === */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
.workbench > *,
.grid > *,
.cards > *,
fieldset,
section,
article,
.card {
  min-width: 0;
  max-width: 100%;
}
.workbench:has(> section.card) {
  grid-template-columns: 1fr;
}
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
td.r, th.r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dispatch-meta {
  flex: 1 1 min(100%, 380px);
  min-width: 0;
}
button, .cta {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}
select, input {
  max-width: 100%;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 14px 48px !important;
  }
  .wl-bar {
    padding: 8px 12px;
    font-size: 12px;
    gap: 6px;
  }
  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 0 12px;
  }
  .logo {
    font-size: 20px;
  }
  .logo small {
    font-size: 11px;
    line-height: 1.3;
  }
  nav, .top nav {
    width: 100%;
    gap: 6px 10px;
  }
  nav a, .top nav a {
    font-size: 13px;
    padding: 4px 0;
  }
  nav a.navcta, .top nav a.navcta {
    width: 100%;
    text-align: center;
    justify-content: center;
    margin-top: 2px;
  }
  h1, .article h1 {
    font-size: clamp(22px, 6.2vw, 28px) !important;
    line-height: 1.2;
    overflow-wrap: break-word;
  }
  fieldset {
    padding: 12px 12px 14px;
    margin: 0 0 14px;
  }
  legend {
    font-size: 13px;
    line-height: 1.3;
    max-width: 100%;
    white-space: normal;
  }
  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px;
    padding: 9px 10px;
  }
  button.primary,
  .WorkbenchToolbar button,
  .WorkbenchToolbar .cta,
  .band .cta,
  .dispatch-actions .cta {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    font-size: 13.5px;
  }
  .dispatch-ledger {
    padding: 14px 12px;
    gap: 12px;
  }
  .dispatch-actions {
    width: 100%;
    align-items: stretch;
  }
  .dispatch-actions > div {
    flex-direction: column;
    width: 100%;
  }
  .band {
    padding: 16px 14px !important;
    margin: 22px 0 18px;
    gap: 14px;
  }
  .band > div {
    width: 100%;
    text-align: left !important;
  }
  table {
    font-size: 12.5px;
  }
  th, td, .body th, .body td {
    padding: 7px 6px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  td.r, th.r {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    padding-left: 8px;
  }
}