:root {
  --ink: #12263a;
  --ink-2: #1b3a4b;
  --paper: #eef2f6;
  --card: #fbfcfd;
  --brass: #a68446;
  --brass-soft: #d9c59a;
  --seal: #8e1f2f;
  --seal-deep: #6e1522;
  --slate: #5a6b78;
  --line: #d5dce3;
  --ok: #2a6f4e;
  --warn: #8a5a12;
}

html,
body {
  background:
    radial-gradient(1200px 500px at 8% -10%, rgba(166, 132, 70, 0.08), transparent 50%),
    linear-gradient(180deg, #f7f9fb 0%, var(--paper) 100%);
  color: var(--ink);
}

.letterhead-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--seal) 0 18%, var(--brass) 18% 100%);
}

.double-rule {
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass-soft);
  height: 5px;
}

.wax-seal {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, #c44757 0%, var(--seal) 42%, var(--seal-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 8px 18px rgba(142, 31, 47, 0.28);
  color: #f7e6c4;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.wordmark {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(18, 38, 58, 0.06);
}

.progress-track {
  height: 10px;
  background: #e3e9ef;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ink) 0%, var(--brass) 100%);
  transition: width 400ms ease;
}

.progress-fill.is-failed {
  background: var(--seal);
}

.progress-fill.is-done {
  background: var(--ok);
}

.status-banner {
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  background: #f7f9fb;
}

.status-banner.is-scanning {
  border-color: var(--brass);
  background: #f8f3e8;
}

.status-banner.is-ready {
  border-color: var(--ok);
  background: #e8f3ec;
}

.status-banner.is-failed {
  border-color: var(--seal);
  background: #f8ecee;
}

.toast-host {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 22rem;
}

.toast {
  background: #fff;
  border: 1px solid var(--ok);
  border-left-width: 5px;
  box-shadow: 0 12px 30px rgba(18, 38, 58, 0.12);
  padding: 0.85rem 1rem;
}

.history-download {
  display: inline-block;
  background: #2a6f4e;
  color: #fff;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.download-hero {
  border: 3px solid #2a6f4e;
  background: #e8f3ec;
  padding: 1.4rem 1.5rem;
  text-align: center;
}

.download-hero.is-waiting {
  border-color: var(--brass);
  background: #f8f3e8;
}

.download-hero-btn {
  display: inline-block;
  margin-top: 0.85rem;
  background: #2a6f4e;
  color: #fff !important;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.95rem 1.6rem;
  text-decoration: none;
}

.download-hero-btn:hover {
  filter: brightness(1.08);
}

.download-hero-btn.outlook {
  background: #12263a;
  margin-left: 0.5rem;
}

.file-card {
  border: 2px solid #2a6f4e;
  background: #fff;
  padding: 1.1rem 1.2rem;
}

.remove-file-btn {
  display: inline-block;
  background: transparent;
  color: var(--seal);
  border: 1px solid var(--seal);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.remove-file-btn:hover {
  background: var(--seal);
  color: #fff;
}

input,
select,
textarea {
  font-family: "Source Sans 3", sans-serif;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill {
    transition: none;
  }
}
