:root {
  --charcoal: #1d1d1b;
  --red: #b60011;
  --green: #006600;
  --blue: #0047af;
  --focus: #095aa2;
  --pale: #eef0f0;
  --line: #e0e0e0;
  --muted: #585958;
  color: var(--charcoal);
  background: #fff;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
}

.service-bar {
  background: var(--red);
  height: 6px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: inherit;
  text-decoration: none;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.brand strong {
  font-size: 1.35rem;
  font-weight: 700;
}

.languages, .account-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.languages form { margin: 0; }

.link, button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

main.wide { max-width: 70rem; }

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 1.5rem 0 0.5rem;
}

.lede, .notice, .error {
  margin: 0 0 1.25rem;
}

.lede { font-size: 1.25rem; }

.facts {
  list-style: none;
  padding: 0.9rem 1rem;
  margin: 1.5rem 0;
  background: var(--pale);
  border-left: 6px solid var(--red);
}

.facts li { margin: 0.35rem 0; }

.on-this-page a { margin-right: 1rem; }

.home-section, section { margin-top: 0.5rem; }

.steps li, main ul li { margin: 0.45rem 0; }

ol.stages {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
}

ol.stages li {
  margin: 0;
  padding: 0.65rem 0 0.65rem 0.8rem;
  border-left: 4px solid var(--line);
}

ol.stages li.current { border-left-color: var(--green); }

ol.stages li.done { color: var(--muted); }

ol.stages .hint { display: block; }

.message { white-space: pre-wrap; display: block; }

.tick { display: inline-block; width: 1.1rem; height: 1.1rem; border: 2px solid var(--ink); margin-right: 0.35rem; vertical-align: -0.15rem; }

.sign-line { margin-top: 2rem; border-bottom: 1px solid var(--ink); height: 2.5rem; }

@media print {
  .service-bar, header, footer, .no-print { display: none; }
  main { max-width: none; padding: 0; }
}

details {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
}

summary {
  font-weight: 700;
  cursor: pointer;
}

summary:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.notice {
  background: var(--pale);
  padding: 0.9rem 1rem;
  border-left: 6px solid var(--blue);
}

.error {
  border-left: 6px solid var(--red);
  padding-left: 0.75rem;
}

label {
  display: block;
  font-weight: 700;
  margin: 1rem 0 0.35rem;
}

input, select {
  width: 100%;
  max-width: 28rem;
  font: inherit;
  padding: 0.55rem 0.6rem;
  border: 2px solid var(--charcoal);
  border-radius: 0;
  background: #fff;
}

input:focus, select:focus, button:focus, a:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.hint { color: var(--muted); font-size: 1rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

button, .button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  padding: 0.55rem 1rem;
  cursor: pointer;
}

.button-primary, button.primary {
  background: var(--green);
  color: #fff;
}

.button-secondary, button.secondary {
  background: var(--blue);
  color: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.5rem;
}

th { font-size: 0.95rem; }

td form { margin: 0 0 0.4rem; }

td select, td input { max-width: 11rem; }

.secret {
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  background: var(--pale);
  padding: 0.8rem 1rem;
}

.qr { width: 220px; height: 220px; }

.codes { padding-left: 1.2rem; }

textarea {
  width: 100%;
  max-width: 28rem;
  min-height: 8rem;
  font: inherit;
  padding: 0.55rem 0.6rem;
  border: 2px solid var(--charcoal);
  border-radius: 0;
  background: #fff;
}

input[type="radio"],
input[type="checkbox"],
input[type="file"] {
  width: auto;
  max-width: none;
}

fieldset {
  border: 0;
  margin: 1rem 0;
  padding: 0;
}

legend {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

label.choice {
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.progress {
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.review dt {
  font-weight: 700;
  margin-top: 0.9rem;
}

.review dd {
  margin: 0.15rem 0 0;
}

.preview {
  display: block;
  max-width: 240px;
  height: auto;
  margin: 0.5rem 0;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.25rem 1.5rem 2rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-bottom: 0.75rem;
}

footer nav a { color: var(--blue); }

.header { flex-wrap: wrap; }
