:root {
  color-scheme: light;
  --ink: #1b2045;
  --muted: #474a57;
  --line: #798490;
  --line-soft: #d8dde3;
  --paper: #ffffff;
  --wash: #f6f7f9;
  --accent: #1b2045;
  --accent-dark: #11152f;
  --secondary: #474a57;
  --soft: #f5f6f8;
  --soft-strong: #e6e9ed;
  --danger: #8f2630;
  --danger-dark: #721c24;
  --focus: #798490;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--wash);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(27, 32, 69, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  min-width: 0;
}

.brand-logo {
  display: block;
  width: min(260px, 42vw);
  max-height: 64px;
  object-fit: contain;
}

.brand-title {
  color: var(--muted);
  font-size: clamp(1.15rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.steps {
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.steps li {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 11px;
}

.steps li.active {
  color: var(--paper);
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 800;
}

.panel {
  display: none;
  min-height: 560px;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 46px rgba(27, 32, 69, 0.08);
}

.panel.visible {
  display: block;
}

.intro {
  max-width: 660px;
  margin-bottom: 36px;
}

.section-heading {
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading h1,
[data-screen="done"] h1 {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
}

.lead {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.65;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

small {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

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

.date-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 14px 15px;
  color: var(--ink);
  background: #fbfcfd;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

textarea {
  resize: vertical;
}

input:hover,
textarea:hover {
  border-color: var(--line);
  background: var(--paper);
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(121, 132, 144, 0.35);
  outline-offset: 2px;
}

.item-fieldset {
  display: grid;
  gap: 14px;
  margin: 4px 0 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 18px;
  background: var(--soft);
}

.item-fieldset legend {
  padding: 0 6px;
  font-weight: 800;
}

.item-details,
.item-list {
  display: grid;
  gap: 12px;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 160px) 44px;
  gap: 12px;
  align-items: end;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  color: var(--secondary);
  background: var(--paper);
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--soft-strong);
}

.add-button {
  justify-self: start;
  min-height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--accent);
  background: var(--paper);
  font-weight: 800;
  cursor: pointer;
}

.add-button:hover {
  background: var(--soft-strong);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: var(--paper);
  font-weight: 600;
}

.checkline input {
  width: 18px;
  height: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-button {
  color: white;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(27, 32, 69, 0.18);
}

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-button.danger {
  background: var(--accent);
}

.primary-button.danger:hover {
  background: var(--accent-dark);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary-button {
  color: var(--ink);
  border-color: var(--line-soft);
  background: var(--soft);
}

.secondary-button:hover {
  background: var(--soft-strong);
}

.form-error {
  margin: 18px 0 0;
  color: var(--danger);
  font-weight: 800;
}

.summary {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.summary dt,
.summary dd {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.summary dt {
  color: var(--muted);
  background: var(--soft);
  font-weight: 800;
}

.summary dd {
  overflow-wrap: anywhere;
}

.summary dt:last-of-type,
.summary dd:last-of-type {
  border-bottom: 0;
}

.notice,
.receipt,
.privacy-note {
  margin-top: 22px;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  color: var(--ink);
  background: #fafbfc;
  line-height: 1.55;
}

.privacy-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.privacy-note a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.support-note a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.success-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--accent);
  font-size: 2rem;
  font-weight: 900;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 960px);
    padding: 16px 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .steps {
    width: 100%;
    overflow-x: auto;
  }

  .panel {
    min-height: auto;
  }

  .form-grid,
  .date-pair,
  .summary {
    grid-template-columns: 1fr;
  }

  .item-row {
    grid-template-columns: 1fr;
  }

  .icon-button {
    width: 100%;
  }

  .summary dt {
    border-bottom: 0;
  }

  .summary dd {
    background: white;
  }

  .actions {
    flex-direction: column-reverse;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
