:root {
  --navy: #27304b;
  --navy-deep: #1d2338;
  --gold: #d59b2d;
  --gold-hover: #c58d24;
  --gold-ink: #8a5d13;
  --cream: #fff5ec;
  --paper: #ffffff;
  --ink: #1e2539;
  --muted: #566076;
  --line: #e9dfcf;
  --error: #b3261e;
  --ok: #1f7a3f;
  --radius: 12px;
  --shadow: 0 14px 40px rgba(29, 35, 56, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--navy);
  margin: 0;
  line-height: 1.12;
}

.wrap { max-width: 1060px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.masthead { background: var(--navy); border-bottom: 3px solid var(--gold); }
.masthead-inner { display: flex; align-items: center; padding-top: 16px; padding-bottom: 16px; }
.logo-chip {
  display: inline-block;
  background: var(--cream);
  border-radius: 10px;
  padding: 10px 20px;
}
.logo { height: 48px; width: auto; display: block; }

.hero { padding: 64px 0 76px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.2rem); font-weight: 800; }
.rule { width: 72px; height: 5px; background: var(--gold); border-radius: 3px; margin: 22px 0; }
.subtitle { margin: 0; font-size: 1.2rem; color: var(--muted); font-weight: 500; max-width: 40ch; }
.advisory { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.advisory li { position: relative; padding-left: 26px; color: var(--muted); font-size: 15.5px; font-weight: 600; }
.advisory li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--gold);
}

.tool-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}
.tool-card h2 { font-size: 1.4rem; }
.field-label {
  display: block;
  margin: 20px 0 8px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
#csv-file {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.dropzone {
  display: block;
  border: 1.5px dashed #cdbfa8;
  border-radius: 10px;
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  background: #fdfaf4;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover { border-color: var(--navy); }
.dropzone.dragover { border-color: var(--gold); background: #fdf3e0; }
.dz-title { display: block; font-weight: 800; color: var(--navy); }
.dz-sub { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); }
.file-hint {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.file-hint strong { color: var(--navy); font-weight: 800; }
.file-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #f3ece0;
  padding: 1px 6px;
  border-radius: 5px;
}
.file-name {
  min-height: 1.5em;
  margin: 10px 0 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.actions { display: grid; gap: 10px; margin-top: 14px; }
.btn {
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  border-radius: 9px;
  padding: 13px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  width: 100%;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-primary { background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover:not(:disabled) { background: var(--gold-hover); }
.btn-secondary { background: var(--navy); color: #ffffff; }
.btn-secondary:hover:not(:disabled) { background: #343f63; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible, .dropzone:focus-within { outline: 3px solid var(--navy); outline-offset: 2px; }
.status { min-height: 1.6em; margin: 14px 0 0; font-weight: 700; color: var(--navy); }
.status.done { color: var(--ok); }
.error { margin: 6px 0 0; font-weight: 700; color: var(--error); }

.security { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 68px 0; }
.security h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.security-lead { margin: 12px 0 10px; font-size: 1.08rem; color: var(--muted); font-weight: 600; max-width: 56ch; }
.security-optional {
  margin: 0 0 30px;
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 56ch;
}
.security-optional strong { color: var(--gold-ink); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-weight: 800;
  font-size: 18px;
  display: grid;
  place-items: center;
}
.step-text { padding-top: 7px; font-weight: 700; }

.spec { padding: 64px 0 80px; }
.spec-box {
  background: var(--navy);
  color: #f3ede1;
  border-radius: var(--radius);
  padding: 30px 34px;
  box-shadow: var(--shadow);
}
.spec-label {
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.spec-box p { margin: 0 0 10px; }
.spec-box p:last-child { margin-bottom: 0; }
.spec-box strong { color: #ffffff; }
.spec-note {
  font-size: 0.95rem;
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}
.spec-note strong { color: var(--gold); }
.spec-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.14);
  padding: 2px 7px;
  border-radius: 5px;
}

.footer { background: var(--navy-deep); color: #c9cfe2; padding: 30px 0; font-size: 15px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer-credit a { color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.footer-credit a:hover { color: #eab54e; }
.footer-note { font-size: 13.5px; color: #9aa2bd; }

@media (max-width: 920px) {
  .hero { padding: 44px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 680px) {
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .security { padding: 52px 0; }
  .tool-card { padding: 22px; }
  .logo { height: 38px; }
  .logo-chip { padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
