:root {
  --ink: #17332c;
  --muted: #65776e;
  --paper: #fffdf9;
  --cream: #f4f2ea;
  --green: #165c46;
  --green-dark: #104735;
  --mint: #e5f2e9;
  --line: #d9e1dc;
  --danger: #8e2f2f;
  --danger-bg: #fff1ef;
  --warning: #76521d;
  --warning-bg: #fff7e8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
select,
input,
textarea { font: inherit; }

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #80bda4;
  outline-offset: 2px;
}

.shell {
  max-width: 880px;
  margin: auto;
  padding: 0 24px 48px;
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #dfe2dc;
}

.mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font: 20px Georgia, serif;
}

.local {
  margin-left: auto;
  border: 1px solid #9bbcae;
  background: #e9f4ee;
  color: #285a48;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.intro {
  max-width: 680px;
  padding: 46px 0 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #4f7c6d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.intro h1 {
  font: 600 clamp(36px, 5vw, 58px) / 1.02 Georgia, serif;
  letter-spacing: -2px;
  margin: 0;
}

.intro > p:last-child {
  color: var(--muted);
  line-height: 1.55;
  max-width: 620px;
  margin: 16px 0 0;
  font-size: 17px;
}

.card {
  background: var(--paper);
  border: 1px solid #dfe3dd;
  border-radius: 14px;
  box-shadow: 0 8px 28px #2c41360d;
  padding: 24px;
}

.steps-card { display: grid; gap: 14px; }
.work-card { margin-top: 16px; }

.step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .15s, background-color .15s;
}

.step.ready {
  border-color: #9bc5ad;
  background: #f7fcf8;
}

.step-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.step.ready .step-number { font-size: 0; }
.step.ready .step-number::after { content: "✓"; font-size: 15px; }

.step-copy { display: grid; gap: 4px; min-width: 0; }
.step-copy small { color: var(--muted); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.step-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }

.button {
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s, transform .05s, opacity .15s;
}

.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .48; }

.secondary {
  padding: 10px 14px;
  background: #e4eee7;
  color: #295b49;
  font-size: 14px;
}

.secondary:hover { background: #d5e7dc; }

.quiet {
  padding: 9px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.quiet:hover { background: #f0f3f0; color: var(--ink); }

.primary {
  width: 100%;
  padding: 14px 17px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 4px 12px #165c4638;
}

.primary:hover:not(:disabled) { background: var(--green-dark); }
.primary span { margin-left: 8px; font-size: 17px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 2px 4px 0 44px;
  display: grid;
  gap: 7px;
}

.file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f4f7f4;
}

.file-item strong { font-size: 14px; overflow-wrap: anywhere; }
.file-item small { grid-column: 1; color: var(--muted); font-size: 13px; }
.remove-file { grid-column: 2; grid-row: 1 / span 2; }

.selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.selectors label {
  display: grid;
  gap: 7px;
  color: #53655c;
  font-size: 14px;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd7d0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea { resize: vertical; min-height: 78px; line-height: 1.45; }

input[aria-invalid="true"] {
  border-color: #c05a52;
  background: #fff8f7;
}

.summary {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 9px;
  background: #edf8f0;
  color: #275843;
  font-size: 14px;
  line-height: 1.4;
}

.summary strong { font: 600 21px Georgia, serif; text-transform: capitalize; }
.summary small { color: #527064; font-size: 13px; }

.issues {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #e6c1bb;
  border-radius: 9px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 14px;
  line-height: 1.45;
}

.profile-notices {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #e9d1a1;
  border-radius: 9px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 14px;
  line-height: 1.45;
}

.profile-notices strong { display: block; margin-bottom: 5px; }
.profile-notices ul { margin: 0; padding-left: 20px; }
.profile-notices li + li { margin-top: 5px; }

.issues strong { display: block; margin-bottom: 6px; }
.issues ul { margin: 0; padding-left: 20px; }
.issues li + li { margin-top: 5px; }

.corrections {
  margin-top: 14px;
  border: 1px solid #d8e2dc;
  border-radius: 9px;
  padding: 0 14px;
}

.profile-card {
  margin-top: 14px;
  border: 1px solid #d8e2dc;
  border-radius: 9px;
  background: #fbfcfa;
}

.profile-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 14px;
  font-weight: 700;
  color: #315d4d;
}

.profile-card > summary::marker { color: #668a7b; }

.profile-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8efea;
  color: #5a6d64;
  font-size: 12px;
  font-weight: 700;
}

.profile-body { padding: 0 14px 15px; }
.profile-body > p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px;
}

.profile-grid > label,
.profile-grid fieldset {
  display: grid;
  gap: 7px;
  margin: 0;
  min-width: 0;
  color: #53655c;
  font-size: 14px;
  font-weight: 700;
}

.profile-grid fieldset { padding: 0; border: 0; }
.profile-grid legend { padding: 0 0 7px; }
.profile-grid legend small { color: var(--muted); font-weight: 400; }
.profile-rules { grid-column: 1 / -1; }

.input-with-unit { position: relative; display: block; }
.input-with-unit input { padding-right: 54px; }
.input-with-unit > span { position: absolute; right: 12px; top: 12px; color: var(--muted); font-size: 13px; font-weight: 400; }

.day-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.day-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 8px;
  border: 1px solid #d5ded8;
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  font-weight: 400;
}
.day-checks input { width: auto; margin: 0; }

.profile-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.profile-actions small { flex: 1 1 240px; color: var(--muted); line-height: 1.35; }

.corrections summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 700;
  color: #315d4d;
}

.corrections p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.corrections > div { display: grid; gap: 8px; padding-bottom: 14px; }

.entry {
  display: grid;
  grid-template-columns: 94px 140px minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
}

.entry > span { font-size: 14px; color: var(--muted); }
.entry em { font-size: 14px; color: var(--muted); font-style: normal; padding: 9px; }
.entry input { padding: 9px 10px; }

.message {
  min-height: 20px;
  margin: 13px 0 0;
  color: #527064;
  font-size: 14px;
  line-height: 1.4;
}

.message.error { color: var(--danger); }
.message.warning { color: var(--warning); }

.batch-info {
  min-height: 20px;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.batch-problem {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.download-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.single-download {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #7ba28f;
  background: #f5faf6;
  color: var(--green);
}
.single-download:hover:not(:disabled) { background: #e8f2eb; }
.single-download span + span { margin-left: 7px; }

.privacy {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 3px solid #61a685;
  background: #eef6f0;
  color: #527064;
  font-size: 14px;
  line-height: 1.5;
}

.footer { margin-top: 16px; color: #7a8881; text-align: center; font-size: 12px; }
.hidden { display: none !important; }

@media (max-width: 680px) {
  .shell { padding: 0 16px 34px; }
  .topbar { min-height: 64px; }
  .local { display: none; }
  .intro { padding: 34px 0 22px; }
  .intro h1 { letter-spacing: -1.2px; }
  .card { padding: 17px; }
  .step { grid-template-columns: 30px minmax(0, 1fr); align-items: start; }
  .step-actions { grid-column: 2; justify-content: flex-start; }
  .file-list { padding-left: 0; }
  .selectors { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-rules { grid-column: auto; }
  .entry { grid-template-columns: 82px 1fr; }
  .entry input[data-note] { grid-column: 2; }
  .entry em { padding-left: 9px; }
  .download-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
