@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #f2f5f4;
  --sheet: #ffffff;
  --ink: #14272b;
  --muted: #53676a;
  --line: #cfd8d6;
  --petrol: #0b5560;
  --petrol-deep: #083e47;
  --amber: #b97a00;
  --amber-fill: #fdeec4;
  --green: #17734b;
  --green-fill: #d9f0e3;
  --red: #a8321f;

  /* file-divider tab colours, in the order sections appear */
  --tab-1: #f4c95d;
  --tab-2: #8fc5d9;
  --tab-3: #f2a07b;
  --tab-4: #9dd3a8;
  --tab-5: #c4b1e0;
  --tab-6: #f0b6c8;
  --tab-7: #b9c4c2;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: 3.052rem;
  --step-6: 3.815rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Segoe UI", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-stretch: 100%;
}

h1, h2, h3 { margin: 0; line-height: 1.1; font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--petrol); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--petrol); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.55rem 1.1rem;
  border: 2px solid var(--ink); border-radius: 3px;
  background: var(--sheet); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}
.btn:hover { background: #e7eeed; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-deep); border-color: var(--petrol-deep); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: #e1e9e7; }
.btn-small { min-height: 2.25rem; padding: 0.3rem 0.75rem; font-size: var(--step--1); }

.wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 800; font-stretch: 118%; font-size: 1.2rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.wordmark svg { width: 1.7rem; height: 1.7rem; flex: none; }

dialog {
  border: 2px solid var(--ink); border-radius: 4px; padding: 0;
  background: var(--sheet); color: var(--ink);
  width: min(30rem, calc(100vw - 2rem));
  box-shadow: 10px 10px 0 rgba(20, 39, 43, 0.18);
}
dialog::backdrop { background: rgba(20, 39, 43, 0.55); }
dialog .dialog-body { padding: 1.5rem; display: grid; gap: 1rem; }
dialog h2 { font-size: var(--step-2); }
dialog .dialog-actions { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }

.field { display: grid; gap: 0.3rem; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field input, .field textarea, .field select {
  min-height: 2.75rem; padding: 0.5rem 0.7rem;
  border: 1.5px solid #8b9c9c; border-radius: 3px; background: #fff;
}
.field .hint { font-size: var(--step--1); color: var(--muted); }
.error { color: var(--red); font-weight: 600; font-size: var(--step--1); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
