/* pdfpress - the factory standard brand (same tokens as fact-finder and medic):
 * earthy olive-green + copper/gold + cream, resolved from veteransfirstconsulting.com. Public Sans is
 * served from this site (@fontsource/public-sans, OFL-1.1), so the CSP needs no font host.
 */
@font-face { font-family: 'Public Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url('/fonts/public-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url('/fonts/public-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url('/fonts/public-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url('/fonts/public-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #f5f1ef;
  --panel: #ffffff;
  --ink: #272b21;
  --muted: #6b6f60;
  --line: #e7ded7;
  --brand: #aa6230;
  --brand-hover: #bb7f55;
  --brand-ink: #ffffff;
  --header: #272b21;
  --header-ink: #f5f1ef;
  --sand: #ddac8a;
  --sage: #8d957e;
  --err: #ea384c;
  --ok: #3a6b46;
  --radius: 10px;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: var(--header); color: var(--header-ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.18);
}
.brand { font-size: 19px; font-weight: 700; letter-spacing: 0.3px; line-height: 1; margin: 0; }
.brand span { font-weight: 500; color: var(--sand); }
.topbar__right { display: flex; align-items: center; gap: 16px; }
.topbar__right .muted { color: #cdc9bf; font-size: 14px; }

.content { flex: 1; width: 100%; max-width: 780px; margin: 0 auto; padding: 32px 20px; }
.footer { padding: 20px 24px; text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.footer a { color: var(--muted); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: 0 2px 10px rgba(39,43,33,0.05);
}
.panel.center { text-align: center; max-width: 480px; margin: 64px auto; }

h2 { margin: 0 0 6px; font-size: 23px; font-weight: 700; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

.notice {
  margin: 0 0 20px; padding: 10px 12px; background: #e7ede2; border: 1px solid #cdd8c4;
  border-radius: 7px; color: var(--ok); font-size: 14px;
}

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.field__label { font-weight: 600; font-size: 15px; margin-bottom: 4px; padding: 0; }
.field__radios { display: flex; flex-wrap: wrap; gap: 18px; padding: 4px 0; }
.radio { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.radio input { accent-color: var(--brand); }

.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); background: #faf7f4;
  padding: 28px; text-align: center; transition: border-color 0.12s ease, background 0.12s ease;
}
.drop.over { border-color: var(--brand); background: #f6ece4; }
.drop p { margin: 0 0 12px; color: var(--muted); }

.btn {
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn--primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn--primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--brand); text-decoration: underline; padding: 4px 0; }
.btn--ghost:hover:not(:disabled) { color: var(--brand-hover); border-color: transparent; }
.topbar .btn--ghost { color: #cdc9bf; }
.topbar .btn--ghost:hover:not(:disabled) { color: #fff; }

.busy { margin-top: 18px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.error { color: var(--err); margin: 16px 0 0; }
.result { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.result p { margin: 0 0 12px; font-weight: 600; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
