/* The two brand tokens below are darkened in high-contrast mode, but the
   override lives in assets/scss/utilities/_high-contrast.scss so the whole
   darkened palette stays in one file. It reaches them because
   html[data-contrast="high"] (0,1,1) outranks this :root (0,1,0), whichever
   stylesheet loads last. Change a value there, not here. */
:root {
  --error-primary: #03aaa3;
  --error-primary-dark: #028a85;
  --error-bg: #f5fbfb;
  --error-text: #1f2937;
  --error-muted: #6b7280;
}

body {
  background-color: var(--error-bg);
}

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.error-page__main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding: 3rem 1rem;
}

.error-card {
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgb(3 170 163 / 12%);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.error-code {
  display: block;
  font-size: clamp(4.5rem, 14vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--error-primary);
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--error-text);
  margin-bottom: 1rem;
}

.error-lead {
  color: var(--error-text);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.error-btn-primary,
.error-btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.error-btn-primary {
  background-color: var(--error-primary);
  color: #fff;
  border: 1px solid var(--error-primary);
}

.error-btn-primary:hover,
.error-btn-primary:focus-visible {
  background-color: var(--error-primary-dark);
  border-color: var(--error-primary-dark);
  color: #fff;
}

.error-btn-secondary {
  background-color: transparent;
  color: var(--error-primary);
  border: 1px solid var(--error-primary);
}

.error-btn-secondary:hover,
.error-btn-secondary:focus-visible {
  background-color: var(--error-primary);
  color: #fff;
}

.error-meta {
  color: var(--error-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Underlined, not merely coloured. The link sits inside a sentence of
   --error-muted body text, and colour alone was the only thing telling them
   apart: measured 1.68:1 in the normal palette and 1.03:1 in high contrast,
   both far under the 3:1 that 1.4.1 asks for when colour carries the
   difference on its own. The high-contrast mode made it worse, not better -
   darkening the turquoise moved it towards the grey. The underline settles it
   outright, because colour is then no longer the only signal. */
.error-meta a {
  color: var(--error-primary);
  text-decoration: underline;
}

/* The underline is permanent now, so hover needs its own signal. */
.error-meta a:hover,
.error-meta a:focus-visible {
  color: var(--error-primary-dark);
}
