:root {
  color-scheme: light;
  color: #232e27;
  background: #faf8f3;
  font: 100%/1.5 system-ui, sans-serif;
  --green: #294c3d;
  --deep: #1d392e;
  --muted: #506055;
  --line: #cdd5c9;
  --paper: #fffefa;
  --wash: #ebf0e7;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #50684d; outline-offset: 4px; }
.account-navigation:empty { display: none; }
.account-navigation { margin-bottom: 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .85rem; }
.account-navigation a, .account-navigation button { font-size: .9rem; }
.account-navigation a { display: inline-flex; min-height: 44px; align-items: center; }
.account-navigation a[aria-current="page"] { font-weight: 700; }
.portal { width: min(1040px, calc(100% - 36px)); margin: 0 auto; flex: 1; padding: clamp(1.4rem, 4vw, 3.2rem) 0 3rem; }
.portal h1, .portal h2 { font-family: Georgia, serif; font-weight: 400; line-height: 1.1; margin: 0; }
.portal h1 { font-size: clamp(2.35rem, 5vw, 3.75rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.portal h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.025em; overflow-wrap: anywhere; }
.portal p { margin: .55rem 0 0; overflow-wrap: anywhere; }
.portal .intro { color: var(--muted); max-width: 62ch; }
.portal h2 + p { color: var(--muted); }
.portal .masthead { border-bottom: 1px solid var(--line); padding-bottom: 1.3rem; margin-bottom: 1.35rem; }
.portal .masthead a:first-child { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: .4rem; }
.portal .masthead .subtitle { color: var(--muted); margin-bottom: .25rem; font-size: .92rem; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); align-items: start; }
.portal-grid > *, .stack > * { min-width: 0; }
.stack { display: grid; gap: 1rem; }
.panel { border: 1px solid var(--line); border-radius: .65rem; padding: clamp(1rem, 3vw, 1.55rem); background: var(--paper); }
.panel.accent { background: var(--wash); }
.sign-in { display: grid; grid-template-columns: 1fr minmax(0, .85fr); gap: clamp(1rem, 5vw, 5rem); align-items: center; min-height: 18rem; }
.sign-in .panel { max-width: 31rem; width: 100%; justify-self: end; }
.sign-in .panel button { margin-top: 1rem; }
.sign-in .panel .intro { margin-top: 1rem; font-size: .9rem; }
.portal .form { margin-top: 1rem; display: grid; gap: .95rem; }
.form label { display: grid; gap: .26rem; font-weight: 600; min-width: 0; }
.form small { color: var(--muted); font-weight: 400; line-height: 1.4; font-size: .875rem; }
.form input, .form textarea, .form select { min-width: 0; width: 100%; }
input, textarea, select {
  font: inherit;
  color: inherit;
  background: white;
  border: 1px solid #849488;
  border-radius: .35rem;
  padding: .55rem .65rem;
  min-height: 44px;
}
textarea { resize: vertical; }
.form .checkbox { grid-template-columns: auto 1fr; align-items: start; font-weight: 400; }
.form .checkbox input { width: 1.15rem; min-height: 0; height: 1.15rem; margin: .2rem .25rem 0 0; accent-color: var(--green); }
input[type="file"] { padding: .4em; font-size: .9rem; }
input::file-selector-button { padding: .28rem .5rem; border-radius: .25rem; border: 1px solid #90a092; background: #f0f4ed; font: inherit; color: inherit; margin-right: .5em; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--green);
  font: 650 .95rem/1.3 system-ui, sans-serif;
  border: 1px solid var(--green);
  border-radius: .35rem;
  padding: .62rem .95rem;
  min-height: 44px;
  cursor: pointer;
}
.button:hover { background: var(--deep); }
.button.secondary { color: var(--green); background: var(--paper); border-color: #889c8a; }
.button.secondary:hover { background: var(--wash); }
.button:disabled { opacity: .65; cursor: wait; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; margin: 1rem 0; }
.inline-form label { display: grid; gap: .2rem; font-size: .9rem; font-weight: 600; flex: 1 1 12rem; }
.inline-form input, .inline-form select { width: 100%; min-width: 0; font-size: 1rem; }
.list { list-style: none; margin: .7rem 0 0; padding: 0; }
.list > li { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .5rem .9rem; border-top: 1px solid var(--line); padding: .8rem 0; }
.list .label { font-weight: 670; overflow-wrap: anywhere; }
.list .intro { margin: .2rem 0 0; font-size: .9rem; }
.list .label, .list > li > div { min-width: 0; }
.file-link { display: inline-flex; align-items: center; min-height: 44px; }
.badge { display: inline-block; align-self: start; padding: .18rem .55rem; border-radius: .3rem; color: #354a3d; background: #e7ece4; white-space: nowrap; font-size: .825rem; font-weight: 650; }
.badge.in_progress { color: #62400f; background: #faedd4; }
.badge.ready { color: #1e4d39; background: #dceee1; }
.details { display: grid; gap: .85rem; margin: 1rem 0; }
.details div { min-width: 0; }
.details dt { font-size: .9rem; font-weight: 650; }
.details dd { margin: .1rem 0 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.pagination { display: flex; gap: .6rem; margin-top: .9rem; align-items: center; }
.notice-box { border: 1px solid #90a092; border-radius: .4rem; background: var(--wash); padding: .9rem; margin-top: 1rem; }
#messages > p { padding: .7rem .9rem; margin: 0 0 .9rem; border-radius: .35rem; }
#notice { color: #244d36; background: #dfefe3; }
#error { color: #782e25; background: #f8e5df; }
@media (max-width: 720px) {
  .sign-in, .portal-grid { grid-template-columns: 1fr; }
  .sign-in .panel { justify-self: start; }
}
