/* ==========================================================================
   PlainLetter — styles
   Palette:
     --ink       #1B2A4A  (deep navy: headings, buttons — official but calm)
     --paper     #FBFAF6  (warm paper white: page background)
     --text      #3A4356  (body text)
     --line      #DDDCD4  (borders)
     --highlight #FFE566  (highlighter yellow: the one accent, used sparingly)
     --ok        #2E7D4F  (green: positive states only)
   Type:
     Public Sans  — body & UI (the U.S. government's own open-source typeface)
     Courier Prime — "the letter says" excerpts only (typewriter voice)
   ========================================================================== */

:root {
  --ink: #1B2A4A;
  --paper: #FBFAF6;
  --text: #3A4356;
  --line: #DDDCD4;
  --highlight: #FFE566;
  --ok: #2E7D4F;
  --warn-bg: #FFF7E0;
  --danger-bg: #FDEEEE;
  --danger: #A33A3A;
  --max: 720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Public Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2 { color: var(--ink); line-height: 1.15; }
h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }

a { color: var(--ink); }

main > section { max-width: var(--max); margin: 0 auto; padding: 3.5rem 1.25rem 0; }

/* ---------- Navigation ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }

.nav {
  max-width: 960px; margin: 0 auto; padding: 0.9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}

.brand {
  font-weight: 800; font-size: 1.15rem; color: var(--ink);
  text-decoration: none; letter-spacing: -0.02em;
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { text-decoration: underline; }

.nav-cta {
  background: var(--ink); color: #fff !important; padding: 0.5rem 1rem;
  border-radius: 6px; font-weight: 600;
}
.nav-cta:hover { text-decoration: none !important; opacity: 0.92; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: 4rem; }

.hero h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; }

/* The one accent: a highlighter stroke, like people mark deadlines on letters */
.hl {
  background: linear-gradient(transparent 55%, var(--highlight) 55%, var(--highlight) 92%, transparent 92%);
  padding: 0 0.15em;
}

.sub { margin: 1rem auto 2rem; font-size: 1.1rem; max-width: 32em; }

/* ---------- Upload card (the product itself) ---------- */
.upload-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 1.5rem; max-width: 560px; margin: 0 auto;
  box-shadow: 0 2px 12px rgba(27, 42, 74, 0.06);
  text-align: left;
}

.drop-zone {
  border: 2px dashed var(--line); border-radius: 10px;
  padding: 2rem 1.25rem; text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop-zone.dragover { border-color: var(--ink); background: #F4F6FA; }

.drop-title { font-weight: 700; color: var(--ink); font-size: 1.15rem; }
.drop-hint { font-size: 0.9rem; margin: 0.25rem 0 1rem; }

.upload-btn {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--ink); color: #fff; border: none;
  padding: 0.75rem 1.5rem; border-radius: 8px;
}
.upload-btn:hover { opacity: 0.92; }
.upload-btn:focus-visible,
.lang-btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--highlight); outline-offset: 2px;
}

.drop-tip { font-size: 0.85rem; margin-top: 1rem; color: #6A7286; }

.lang-row {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  margin-top: 1.1rem; flex-wrap: wrap;
}
.lang-label { font-size: 0.9rem; }

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-btn {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  background: #fff; color: var(--text); border: none; padding: 0.4rem 0.9rem;
}
.lang-btn.active { background: var(--ink); color: #fff; }

/* ---------- Triage result states (rendered by app.js) ---------- */
.triage-result { margin-top: 1.1rem; border-radius: 10px; padding: 1rem 1.1rem; font-size: 0.95rem; }
.triage-result.checking { background: #F4F6FA; }
.triage-result.ok { background: #EFF7F1; border: 1px solid #CBE3D3; }
.triage-result.warn { background: var(--warn-bg); border: 1px solid #EFDFA8; }
.triage-result.blocked { background: var(--danger-bg); border: 1px solid #EFC9C9; }
.triage-result p + p { margin-top: 0.6rem; }

.result-actions { display: flex; gap: 0.6rem; margin-top: 0.9rem; flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px;
  padding: 0.6rem 1.1rem; border: none; text-decoration: none; display: inline-block;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { opacity: 0.92; }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--ink); }

/* ---------- Trust strip ---------- */
.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.75rem;
  padding-top: 2.25rem !important; font-size: 0.9rem; font-weight: 500;
}
.trust-item::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* ---------- Sample: before / after ---------- */
.section-sub { margin-bottom: 1.5rem; }

.sample-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.panel { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem; background: #fff; }

.panel-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #6A7286; margin-bottom: 0.75rem;
}

/* The letter speaks in typewriter; we answer in plain sans — that contrast is the product */
.letter-excerpt {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.85rem; line-height: 1.55; color: #4A4A44;
  background: #F7F5EC; border-radius: 6px; padding: 0.9rem;
}
.letter-excerpt p + p { margin-top: 0.7rem; }

.output-excerpt { font-size: 0.92rem; }
.output-excerpt p + p { margin-top: 0.65rem; }

.badge-yes {
  background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 0.1rem 0.5rem; border-radius: 4px; text-transform: uppercase;
}

mark { background: var(--highlight); padding: 0 0.2em; }

/* ---------- How it works ---------- */
.steps { list-style: none; counter-reset: step; margin-top: 1.25rem; }

.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 1.5rem 3.25rem;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-title { font-weight: 700; color: var(--ink); }

/* ---------- Pricing ---------- */
.pricing { text-align: center; }
.price-line { font-size: 1.15rem; max-width: 34em; margin: 0 auto; }
.price-line strong { color: var(--ink); }

/* ---------- Agencies ---------- */
.agencies { text-align: center; }
.agency-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem;
  font-weight: 700; color: var(--ink); font-size: 1.1rem; margin-top: 1rem;
}
.dot { color: var(--line); }
.agency-note { margin-top: 0.5rem; font-size: 0.9rem; }

/* ---------- Mini FAQ ---------- */
.mini-faq details {
  border-bottom: 1px solid var(--line); padding: 0.9rem 0;
}
.mini-faq summary {
  font-weight: 600; color: var(--ink); cursor: pointer; list-style-position: outside;
}
.mini-faq details p { margin-top: 0.6rem; font-size: 0.95rem; }
.faq-more { margin-top: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 4rem; border-top: 1px solid var(--line);
  padding: 2rem 1.25rem 2.5rem; text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; font-size: 0.9rem; }
.footer-note { margin-top: 1rem; font-size: 0.8rem; color: #6A7286; max-width: 40em; margin-left: auto; margin-right: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .sample-panels { grid-template-columns: 1fr; }
  .nav-links { gap: 0.9rem; font-size: 0.9rem; }
}

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