:root {
  --ink: #1b2430;
  --muted: #556070;
  --line: #d5dbe3;
  --paper: #ffffff;
  --wash: #f4f6f9;
  --accent: #0b5cad;
  --accent-ink: #ffffff;
  --note: #fff1d6;
  --note-line: #c98a1b;
  --bad: #9b1c1c;
  --bad-wash: #fdecec;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

.site-header,
main,
.site-footer {
  max-width: 58rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.92rem;
}

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

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

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 2rem 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.08rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
  max-width: 46rem;
}

li {
  margin-bottom: 0.4rem;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  overflow-wrap: anywhere;
}

pre {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 1em;
  overflow-wrap: normal;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--wash);
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}

td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.notice {
  max-width: 46rem;
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem 0.1rem;
  background: var(--note);
  border: 1px solid var(--note-line);
  border-radius: 6px;
}

p.notice {
  padding-bottom: 0.9rem;
}

.notice h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.7rem;
  background: var(--note);
  border: 1px solid var(--note-line);
  border-radius: 6px;
  font-weight: 600;
}

.order {
  max-width: 46rem;
  margin: 2rem 0;
  padding: 0.25rem 1.25rem 1.25rem;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order h2 {
  margin-top: 1.25rem;
}

.price {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.terms {
  font-size: 0.92rem;
  color: var(--muted);
}

.doc {
  max-width: 50rem;
  margin: 0 0 1.5rem;
  padding: 0.25rem 1.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc h3 {
  font-size: 1.15rem;
  margin-top: 1.25rem;
}

.doc h4 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

/* The generator: form panels, the free result and the pack. */

.panel {
  max-width: 50rem;
  margin: 1.25rem 0;
  padding: 0.25rem 1.25rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel h2 {
  margin-top: 1.1rem;
  font-size: 1.2rem;
}

.panel p {
  margin-bottom: 0.5rem;
}

label {
  font-weight: 600;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #8a94a3;
  border-radius: 6px;
  font: inherit;
  background: var(--paper);
  color: inherit;
}

textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
}

button {
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

button:disabled {
  background: #8b95a5;
  cursor: default;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.attest {
  padding: 0.6rem 0.8rem;
  background: var(--note);
  border: 1px solid var(--note-line);
  border-radius: 6px;
}

.errors {
  border: 1px solid var(--bad);
  border-radius: 6px;
  background: var(--bad-wash);
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
}

.error {
  color: var(--bad);
}

.selftest-notice {
  max-width: 46rem;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 2px solid var(--bad);
  border-radius: 6px;
  background: var(--bad-wash);
  color: var(--bad);
  font-weight: 700;
}

.score {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0;
}

.fix,
.file {
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}

.fix h3,
.file h3 {
  margin-top: 0;
}

.priority-1 {
  border-left-color: #c53030;
}

.priority-2 {
  border-left-color: #c77700;
}

.priority-3 {
  border-left-color: #4b7bd0;
}

.label {
  font-weight: 600;
}

.evidence li {
  margin-bottom: 0.35rem;
}

.where {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.preview {
  max-height: 18rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.download {
  display: inline-block;
  margin: 0.25rem 0 0.5rem;
  font-weight: 600;
}

.more,
.status {
  font-weight: 600;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }
}

/* Keep this rule last. The buy link is hidden in the HTML source and shown
   only after the start-up check passes; !important beats every class above
   that sets display (.btn, .badge, .download, .where). */
[hidden] {
  display: none !important;
}
