:root {
  color: #18322d;
  background: #f3f6f4;
  font: 16px/1.55 system-ui, sans-serif;
  --surface: #fff;
  --border: #d2ded7;
  --muted: #465e54;
  --green: #205843;
  --focus: #22669a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }

.page {
  width: min(56rem, 100% - 2rem);
  margin: 2.5rem auto;
}

.masthead {
  padding: clamp(1.25rem, 4.5vw, 2.5rem);
  border-radius: 1rem 1rem 0 0;
  background: #173d30;
  color: #f4faf7;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 5vw, 2.65rem); line-height: 1.16; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
.brand { margin-bottom: .6rem; color: #c0dfd0; font-size: .76rem; font-weight: 750; letter-spacing: .16em; }
.intro { margin-top: .65rem; color: #e1eee8; }
.muted { color: var(--muted); }

.session, .card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: clamp(1rem, 2.8vw, 1.5rem);
}

.session, .workflow-heading, .submit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem 1rem;
  align-items: center;
}

.session { border-top: 0; border-radius: 0 0 1rem 1rem; }
#identity { margin-top: .2rem; color: var(--muted); overflow-wrap: anywhere; }
#workflow { margin-top: 1.5rem; }
.workflow-heading { margin-bottom: .8rem; }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.card { margin: 0; border-radius: .85rem; }
.steps .card { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.target { font-size: 1.04rem; font-weight: 650; overflow-wrap: anywhere; }
.submit { margin-top: .8rem; }
.session .status, .submit .status, .receipts { grid-column: 1 / -1; }

button {
  min-height: 2.75rem;
  max-width: 100%;
  border: 1px solid var(--green);
  border-radius: .45rem;
  color: var(--green);
  background: var(--surface);
  padding: .5rem .85rem;
  font: inherit;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
}

.primary { color: #fff; background: var(--green); }
button:not(:disabled):hover { text-decoration: underline; text-underline-offset: .18em; }
button:disabled { border-color: #698277; background: #edf1ef; color: #4f655b; cursor: default; }
:where(button, a):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.status {
  width: 100%;
  padding: .55rem .65rem;
  border-radius: .4rem;
  background: #e9f4ed;
  color: #214a36;
  overflow-wrap: anywhere;
}

.status.error { color: #7c3525; background: #fff0e9; }
figure { margin: 0; max-width: 100%; }
#preview { display: block; max-width: 100%; max-height: 18rem; border-radius: .35rem; border: 1px solid var(--border); }
figcaption { margin-top: .35rem; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.receipts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem .85rem; margin: 0; }
.receipts dd { margin: 0; overflow-wrap: anywhere; }
a { color: var(--green); text-underline-offset: .18em; }

@media (max-width: 38rem) {
  .page { margin-block: 1rem; }
  .steps, .session, .workflow-heading, .submit { grid-template-columns: minmax(0, 1fr); }
  .session button, .workflow-heading button, .submit button { justify-self: start; }
}
