:root {
  --ink: #1a1a2e;
  --teal: #2b5e5a;
  --teal-deep: #1e4440;
  --mint: #eef5f3;
  --muted: #52525b;
  --faint: #71717a;
  --rule: #d4d4d8;
  --line: #e4e4e7;
  --flag: #fff3b0;
  --error: #9f1239;
  --paper: #ffffff;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: Inter, -apple-system, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: #f4f4f5;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
}

.page {
  max-width: 960px;
  margin: 24px auto 80px;
  background: var(--paper);
  padding: 28px 40px 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

header.brand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
  margin-bottom: 20px;
  gap: 16px;
}

.brand-bar img {
  height: 28px;
}

.brand-bar .tss {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal);
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
}

h1 {
  font-family: var(--serif);
  font-size: 28px;
  margin: 0;
}

.badge {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  border-radius: 3px;
  padding: 2px 8px;
}

.standing-note {
  background: var(--flag);
  border-radius: 4px;
  padding: 10px 14px;
  margin: 12px 0 24px;
  font-size: 15px;
}

.header-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
  margin-bottom: 28px;
}

section.step {
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  padding: 18px 22px 20px;
  margin-bottom: 22px;
}

section.step.mint {
  background: var(--mint);
}

section.step[hidden] {
  display: none;
}

.step-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.step-title .num {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.step-title .instruction {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  color: var(--muted);
}

.branches {
  display: grid;
  grid-template-columns: 1fr;
}

.branch[hidden] {
  display: none;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  min-width: 0;
}

legend,
label.q {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0;
}

.hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 15px;
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
  min-height: 44px;
}

.opt:has(input:checked) {
  border-color: var(--teal);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--teal);
}

.opt:has(input:focus-visible) {
  outline: 3px solid #7fb3ad;
  outline-offset: 2px;
}

.opt input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.opt .key {
  font-weight: 700;
  color: var(--teal);
}

input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
  font: inherit;
  color: var(--ink);
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  min-height: 44px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid #7fb3ad;
  outline-offset: 1px;
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.req::after {
  content: " *";
  color: var(--teal);
}

.workflows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px 16px;
  margin-bottom: 8px;
}

.workflow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  min-height: 48px;
}

.workflow:has(.pick:checked) {
  border-color: var(--teal);
}

.workflow:has(.star:checked) {
  background: var(--flag);
}

.workflow input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.workflow .star-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.workflow .star-label.off {
  opacity: 0.4;
  cursor: default;
}

.workflow .star-label .glyph {
  font-size: 18px;
  line-height: 1;
}

.workflow .star:checked + .glyph {
  color: #b7791f;
}

.something-else {
  margin: 4px 0 12px;
}

.sizing {
  border-top: 1px solid var(--rule);
  margin-top: 14px;
  padding-top: 14px;
}

.sizing h3 {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 12px;
}

.sizing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px;
}

.sizing-grid .wide {
  grid-column: 1 / -1;
}

.total {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1.5px solid var(--teal);
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  align-items: baseline;
}

.total .big {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
}

.total .how {
  color: var(--muted);
  font-size: 14px;
  flex-basis: 100%;
}

.reminder {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}

.attendee {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 8px;
  align-items: end;
}

.attendee label {
  font-size: 14px;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}

button {
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1.5px solid var(--teal);
  background: var(--paper);
  color: var(--teal);
  cursor: pointer;
  min-height: 44px;
}

button.primary {
  background: var(--teal);
  color: #fff;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

button.small {
  padding: 6px 12px;
  min-height: 36px;
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--mint);
  font-size: 15px;
}

.status.error {
  background: #fde8ec;
  color: var(--error);
}

.status.saved {
  background: var(--mint);
  border: 1.5px solid var(--teal);
}

.status ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.status a {
  color: var(--teal);
}

.autosave {
  font-size: 13px;
  color: var(--faint);
}

.notes {
  margin-top: 14px;
}

.notes textarea {
  min-height: 56px;
}

pre.summary {
  white-space: pre-wrap;
  font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  max-height: 320px;
  overflow: auto;
}

footer {
  margin-top: 28px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
  font-size: 13px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .page {
    padding: 18px 16px 32px;
    margin: 0 0 40px;
  }

  .header-grid,
  .sizing-grid {
    grid-template-columns: 1fr;
  }

  .attendee {
    grid-template-columns: 1fr;
  }
}
