:root {
  color-scheme: light;
  --ink: #1f2937;
  --blue: #1f6fb2;
  --deep: #1a3f66;
  --line: #d8e0eb;
  --bg: #f4f7fb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.45 "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
header, main, footer { width: min(880px, calc(100% - 32px)); margin: 0 auto; }
header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 28px 0 8px;
}
header img { height: 48px; width: auto; }
h1 { margin: 0; font-size: 1.6rem; color: var(--deep); }
header p, footer { color: #526070; }
main { padding-bottom: 32px; }
section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px 18px;
  margin-top: 14px;
}
h2 { margin: 0 0 12px; font-size: 1.05rem; color: var(--deep); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wide { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem; font-weight: 600; }
input, select {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}
button {
  margin-top: 16px;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button:disabled { background: #9bb6cf; cursor: wait; }
#status { margin-top: 14px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats div {
  background: #f8fbff;
  border: 1px solid #d6e6f5;
  border-radius: 8px;
  padding: 14px;
}
.stats span { display: block; font-size: 2rem; font-weight: 700; color: var(--deep); }
.stats small { color: #526070; }
#pdf { color: var(--blue); font-weight: 700; }
.hp { position: absolute; left: -9999px; }
.disclaimer {
  margin: 18px 0 0;
  color: #526070;
  font-size: 0.82rem;
  line-height: 1.45;
}
[hidden] { display: none !important; }
footer { padding: 8px 0 28px; font-size: 0.9rem; }
@media (max-width: 700px) {
  .grid, .stats { grid-template-columns: 1fr; }
  header { align-items: flex-start; }
}
