:root {
  color-scheme: light;
  --ink: #202923;
  --muted: #657068;
  --line: #dce3dd;
  --paper: #ffffff;
  --wash: #f3f6f3;
  --brand: #245a3b;
  --brand-dark: #19442c;
  --danger: #9c2f2f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: 1rem max(1.25rem, calc((100% - 760px) / 2));
}

.site-header { align-items: center; display: flex; gap: 1.25rem; }
.site-header a { color: var(--brand); font-size: 1rem; font-weight: 750; text-decoration: none; }
.site-header a:first-child { font-size: 1.1rem; margin-right: auto; }
main { padding: 3rem 1.25rem 5rem; }
.card { max-width: 760px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.5rem, 5vw, 3rem); box-shadow: 0 12px 32px rgb(30 50 38 / 7%); }
.eyebrow { color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .1em; margin: 0 0 .4rem; text-transform: uppercase; }
h1 { font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.08; margin: 0; letter-spacing: -.035em; }
.lede { color: var(--muted); font-size: 1.08rem; margin: .9rem 0 2.2rem; max-width: 60ch; }
section { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.6rem; }
h2 { font-size: 1.05rem; margin: 0 0 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .9rem; font-weight: 700; }
input, select, textarea { border: 1px solid #aeb9b0; border-radius: 7px; color: var(--ink); font: inherit; padding: .68rem .75rem; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid rgb(36 90 59 / 15%); }
.help { color: var(--muted); font-size: .82rem; }
.errorlist { color: var(--danger); font-size: .84rem; list-style: none; margin: .15rem 0 0; padding: 0; }
.invalid input, .invalid select, .invalid textarea { border-color: var(--danger); }
.delivery fieldset { border: 0; margin: 0; padding: 0; }
.delivery legend { font-size: .9rem; font-weight: 700; margin-bottom: .45rem; }
.delivery #id_delivery { display: flex; gap: 1.25rem; }
.delivery label:has(input) { align-items: center; display: flex; font-weight: 500; gap: .45rem; }
.delivery input { width: auto; }
.mailing-fields { display: none; margin-top: 1rem; }
form:has(input[name="delivery"][value="mail"]:checked) .mailing-fields { display: grid; }
.input-prefix { align-items: center; display: flex; }
.input-prefix span { background: var(--wash); border: 1px solid #aeb9b0; border-radius: 7px 0 0 7px; padding: .68rem .75rem; }
.input-prefix input { border-left: 0; border-radius: 0 7px 7px 0; }
.notice { background: #fff8dd; border: 1px solid #e6d593; border-radius: 7px; margin-bottom: 1.5rem; padding: .8rem 1rem; }
button { background: var(--brand); border: 0; border-radius: 7px; color: white; cursor: pointer; font: inherit; font-weight: 750; margin-top: 2rem; padding: .8rem 1.2rem; }
button:hover { background: var(--brand-dark); }
button:disabled { cursor: not-allowed; opacity: .45; }
button.secondary { background: transparent; border: 1px solid var(--danger); color: var(--danger); margin-top: .35rem; }
button.danger { background: var(--danger); }
.confirmation > p { color: var(--muted); }
dl { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); margin: 2rem 0; }
dl div { display: flex; justify-content: space-between; gap: 2rem; padding: .8rem 0; }
dl div + div { border-top: 1px solid var(--line); }
dt { color: var(--muted); }
dd { font-weight: 700; margin: 0; text-align: right; }
.cancel-block { background: var(--wash); border-radius: 8px; margin: 2rem 0; padding: 1rem 1.2rem; }
.cancel-block p { margin-top: 0; }
.new-request { color: var(--brand); font-weight: 700; }
.page-heading, .queue-section { margin: 0 auto; max-width: 900px; }
.queue-section { border: 0; }
.request-list { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; list-style: none; margin: 0; overflow: hidden; padding: 0; }
.request-row { align-items: center; color: var(--ink); display: flex; justify-content: space-between; gap: 2rem; padding: 1rem 1.2rem; text-decoration: none; }
.request-list li + li { border-top: 1px solid var(--line); }
.request-row:hover { background: var(--wash); }
.request-row span { display: flex; flex-direction: column; }
.request-row small { color: var(--muted); }
.empty-state { color: var(--muted); margin: 0; padding: 1.2rem; }
.back-link { color: var(--brand); display: inline-block; font-weight: 700; margin-bottom: 1.5rem; text-decoration: none; }
.request-amount { color: var(--brand); font-size: 1.8rem; font-weight: 800; margin: .5rem 0 0; }
.fulfillment-card dd { max-width: 70%; }
.fulfillment-card section { margin-top: 1.5rem; }
.action-panel { background: var(--wash); border-radius: 8px; padding: 1.2rem; }
.action-panel button { margin-right: .5rem; margin-top: .75rem; }
.review-heading { align-items: start; display: flex; justify-content: space-between; gap: 2rem; }
.review-heading .request-amount { flex: none; }
.approval-progress { align-items: center; background: #e9f3ec; border: 1px solid #bdd5c4; border-radius: 8px; display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding: .85rem 1rem; }
.approval-progress span { color: var(--muted); }
.approval-list { border: 1px solid var(--line); border-radius: 8px; list-style: none; margin: 0; padding: 0; }
.approval-list li { align-items: center; display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; }
.approval-list li + li { border-top: 1px solid var(--line); }
.approval-list span { display: flex; flex-direction: column; }
.approval-list small { color: var(--muted); }
.approval-list form { margin: 0; }
button.text-danger { background: transparent; color: var(--danger); margin: 0; padding: .35rem .5rem; }
.primary-action { background: #e9f3ec; border-radius: 8px; padding: 1.2rem; }
.primary-action button { margin: 0; }
.danger-action { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.5rem; }
.danger-action summary { color: var(--danger); cursor: pointer; font-weight: 700; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { border-left: 2px solid var(--line); display: flex; flex-direction: column; padding: 0 0 1.2rem 1rem; }
.event-list span { color: var(--muted); font-size: .88rem; }
.event-list p { margin: .35rem 0 0; }

@media (max-width: 600px) {
  main { padding: 1.25rem .75rem 3rem; }
  .card { border-radius: 10px; }
  .grid { grid-template-columns: 1fr; }
  .review-heading, .approval-progress { align-items: flex-start; flex-direction: column; }
  .fulfillment-card dd, .review-card dd { max-width: 60%; }
}
