@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-700.woff2") format("woff2");
}

:root {
  --navy: #00052e;
  --navy-2: #0b1138;
  --brand: #141e5f;
  --action: #1a42e5;
  --action-hover: #3f76ed;
  --orange: #ff7440;
  --orange-hover: #dd6234;
  --tint: #d9e8ff;
  --panel: #f5fbff;
  --beige: #fff5eb;
  --paper: #fafafa;
  --ink: #3e444d;
  --muted: #6b7280;
  --line: #ccd2d4;
  --card: #ffffff;
  --blue: #0000cc;
  --red: #cc0000;
  --green: #008a00;
  --focus: #1a42e5;
  color-scheme: light;
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
a { color: var(--action); }
a:hover { color: var(--action-hover); }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: white;
  color: var(--brand);
  padding: 8px 12px;
  z-index: 5;
  border-radius: 8px;
}
.skip:focus { top: 12px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 40px;
  background: var(--navy);
  color: white;
}
.brand { display: flex; align-items: center; gap: 18px; }
.wordmark { display: block; height: 24px; width: auto; max-width: none; flex-shrink: 0; }
.product-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: white;
}
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: white; text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #d9e8ff; }

.privacy {
  margin: 28px auto 0;
  width: min(1040px, calc(100% - 48px));
  padding: 14px 18px;
  background: var(--beige);
  color: var(--brand);
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 600;
}

main {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 80px;
  flex: 1;
}
.intro h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1.15;
}
.intro p {
  margin: 0 0 28px;
  max-width: 66ch;
  line-height: 1.6;
  color: var(--muted);
  font-size: 1.05rem;
}

.files { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.drop {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 168px;
  padding: 22px;
  background: var(--panel);
  border: 1.5px solid var(--tint);
  border-radius: 18px;
  cursor: pointer;
}
.drop:hover, .drop.drag { border-color: var(--action); background: white; }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop.has-file { border-style: solid; border-color: var(--action); background: white; }
.drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.drop-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.drop-title { font-size: 1.08rem; font-weight: 650; color: var(--brand); }
.drop-hint { color: var(--muted); font-size: 0.92rem; }

.author-row { margin-top: 22px; display: grid; gap: 8px; }
.author-row label { font-size: 0.95rem; font-weight: 600; color: var(--brand); }
.author-row input {
  width: min(440px, 100%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
}
.author-row input:focus { outline: 2px solid var(--focus); border-color: transparent; }

.actions, .examples div { display: flex; flex-wrap: wrap; gap: 12px; }
.actions { margin-top: 22px; }
.examples { margin-top: 28px; }
.examples p {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 13px 22px;
  background: var(--action);
  color: white;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--action-hover); }
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button:disabled { background: #b7c0d4; cursor: not-allowed; }
button#go { background: var(--orange); }
button#go:hover { background: var(--orange-hover); }
button#go:disabled { background: #f0c2b0; }
button.secondary { background: white; color: var(--action); border: 1.5px solid var(--action); }
button.secondary:hover { background: var(--panel); }
button.ghost { background: white; color: var(--brand); border: 1.5px solid var(--line); }
button.ghost:hover { border-color: var(--action); color: var(--action); background: var(--panel); }

.form-error { color: #b42318; margin: 14px 0 0; font-weight: 600; }

.status, .result, .failure, .form-success {
  margin-top: 32px;
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.status p { margin: 0; }
.status-note, .result-note { margin-top: 12px; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.bar {
  margin-top: 14px;
  height: 8px;
  background: var(--tint);
  border-radius: 99px;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--action);
  transition: width 0.25s ease;
}

.result h2, .failure h2, .form-success h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
}
.counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0;
}
.counts div {
  padding: 16px;
  background: var(--panel);
  border-radius: 14px;
  border: 1px solid var(--tint);
}
.counts dt {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.counts dd { margin: 6px 0 0; font-size: 1.9rem; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); }
.counts div:nth-child(1) dd { color: var(--blue); }
.counts div:nth-child(2) dd { color: var(--red); }
.counts div:nth-child(3) dd { color: var(--green); }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.legend { margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.95rem; }
.legend li { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.swatch { width: 18px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.ins { background: var(--blue); box-shadow: inset 0 -3px 0 white, inset 0 -5px 0 var(--blue); }
.swatch.del { background: var(--red); }
.swatch.move { background: var(--green); }
.failure { border-color: #f0c9c4; }

.site-footer {
  padding: 28px 40px 36px;
  background: var(--navy-2);
  color: #d5dbe8;
  font-size: 0.92rem;
}
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: white; }

.contact-form { display: grid; gap: 16px; max-width: 680px; }
.contact-form label { display: grid; gap: 8px; font-size: 0.95rem; font-weight: 600; color: var(--brand); }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font-weight: 400;
}
.contact-form textarea { min-height: 180px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--focus); border-color: transparent; }
.contact-form label.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink);
  font-weight: 500;
}
.consent input { margin-top: 3px; width: auto; }
.turnstile { min-height: 65px; }
#send { justify-self: start; background: var(--orange); }
#send:hover { background: var(--orange-hover); }

main h2 { color: var(--brand); }

@media (max-width: 800px) {
  .site-header, .site-footer { padding-left: 18px; padding-right: 18px; }
  .site-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .privacy, main { width: min(1040px, calc(100% - 32px)); }
  .files, .counts { grid-template-columns: 1fr; }
  .actions, .downloads, .examples div { flex-direction: column; }
  .actions button, .downloads button, .examples button, #send { width: 100%; }
}
