/*
 * Opteamax design tokens.
 *
 * The identity comes straight from the logo: a black ring with a red X.
 * Everything else is neutral greys so the red only ever marks what matters.
 * Both colour schemes are first-class; `data-theme` on <html> wins over the
 * media query so the manual toggle works in either direction.
 */

:root {
  color-scheme: light dark;

  --brand: #e00000;
  --brand-strong: #b80000;
  --brand-contrast: #ffffff;

  --bg: #ffffff;
  --bg-sunken: #f4f4f5;
  --bg-raised: #ffffff;
  --bg-inverse: #0b0b0d;

  --text: #16161a;
  --text-muted: #55555f;
  --text-inverse: #f5f5f6;
  --text-inverse-muted: #a5a5ae;

  --border: #e2e2e6;
  --border-strong: #c9c9d1;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.07), 0 2px 4px rgb(0 0 0 / 0.04);

  --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --measure: 68ch;
  --page-max: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 10px;
  --radius-lg: 16px;

  --header-height: 4.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff5347;
    --brand-strong: #ff7a70;
    --brand-contrast: #16161a;

    --bg: #0b0b0d;
    --bg-sunken: #121216;
    --bg-raised: #17171c;
    --bg-inverse: #f5f5f6;

    --text: #ececef;
    --text-muted: #a1a1ab;
    --text-inverse: #16161a;
    --text-inverse-muted: #55555f;

    --border: #26262d;
    --border-strong: #3a3a44;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 16px rgb(0 0 0 / 0.55);
  }
}

:root[data-theme='light'] {
  color-scheme: light;
  --brand: #e00000;
  --brand-strong: #b80000;
  --brand-contrast: #ffffff;
  --bg: #ffffff;
  --bg-sunken: #f4f4f5;
  --bg-raised: #ffffff;
  --bg-inverse: #0b0b0d;
  --text: #16161a;
  --text-muted: #55555f;
  --text-inverse: #f5f5f6;
  --text-inverse-muted: #a5a5ae;
  --border: #e2e2e6;
  --border-strong: #c9c9d1;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.04);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.07), 0 2px 4px rgb(0 0 0 / 0.04);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --brand: #ff5347;
  --brand-strong: #ff7a70;
  --brand-contrast: #16161a;
  --bg: #0b0b0d;
  --bg-sunken: #121216;
  --bg-raised: #17171c;
  --bg-inverse: #f5f5f6;
  --text: #ececef;
  --text-muted: #a1a1ab;
  --text-inverse: #16161a;
  --text-inverse-muted: #55555f;
  --border: #26262d;
  --border-strong: #3a3a44;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 16px rgb(0 0 0 / 0.55);
}

/* ---------------------------------------------------------------- base --- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

h1,
h2,
h3,
h4 {
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: -0.018em;
  text-wrap: balance;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
}
h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
}
h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
}

p,
ul,
ol,
dl,
table {
  margin: 0 0 1.15em;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--brand) 55%, transparent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: var(--brand);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

img,
svg,
picture {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ------------------------------------------------------------- layout --- */

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 52rem;
}

main {
  flex: 1 0 auto;
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--sunken {
  background: var(--bg-sunken);
  border-block: 1px solid var(--border);
}

.section__head {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

.section__head > :last-child {
  margin-bottom: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: var(--brand-contrast);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------------------------------------------------------- typography --- */

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.9rem;
}

.lead {
  font-size: clamp(1.075rem, 1rem + 0.4vw, 1.3rem);
  color: var(--text);
  max-width: var(--measure);
}

.muted {
  color: var(--text-muted);
}

/* ------------------------------------------------------------ buttons --- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  background: var(--brand);
  color: var(--brand-contrast);
}

.button--primary:hover {
  background: var(--brand-strong);
}

.button--secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.button--secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* -------------------------------------------------------------- cards --- */

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.card {
  text-decoration: none;
}

a.card:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.card__more {
  margin-top: auto;
  font-weight: 600;
  color: var(--brand);
  font-size: 0.95rem;
}

.card__more::after {
  content: ' \2192';
}

/* -------------------------------------------------------------- facts --- */

.facts {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.fact {
  background: var(--bg);
  padding: 1.5rem;
}

.fact__value {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  font-weight: 680;
  letter-spacing: -0.02em;
  color: var(--brand);
  line-height: 1.1;
}

.fact__label {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------- prose --- */

.prose {
  max-width: var(--measure);
}

.prose > h2 {
  margin-top: 2.4em;
  padding-top: 0.2em;
}

.prose > h3 {
  margin-top: 1.9em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--brand);
}

.prose a {
  color: var(--brand);
}

/* Numbered legal sections read better with a visible hierarchy. */
.prose--legal > h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
}

.prose--legal > h3 {
  font-size: 1.075rem;
  color: var(--text);
}

/* ------------------------------------------------------------ address --- */

.address-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin-bottom: 2rem;
}

.address-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
}

.address-card h2,
.address-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.9rem;
}

.address-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
  font-size: 0.95rem;
}

.address-card dt {
  color: var(--text-muted);
}

.address-card dd {
  margin: 0;
}

.address-card address {
  font-style: normal;
  margin-bottom: 1rem;
}

/* -------------------------------------------------------------- table --- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  margin: 0;
}

caption {
  caption-side: bottom;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.85rem 1rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: baseline;
}

thead th {
  background: var(--bg-sunken);
  font-weight: 620;
  white-space: nowrap;
}

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

td.addr,
th.addr {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: nowrap;
}

.ix-group th {
  background: var(--bg-sunken);
  font-weight: 620;
}

/* --------------------------------------------------------------- forms --- */

.form {
  max-width: 38rem;
}

.field {
  margin-bottom: 1.15rem;
}

.field > label {
  display: block;
  font-weight: 600;
  font-size: 0.925rem;
  margin-bottom: 0.35rem;
}

.field__hint {
  font-weight: 400;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--brand);
}

.field[data-invalid] input,
.field[data-invalid] select,
.field[data-invalid] textarea {
  border-color: var(--brand);
}

.field__error {
  display: none;
  color: var(--brand);
  font-size: 0.875rem;
  margin-top: 0.3rem;
}

.field[data-invalid] .field__error {
  display: block;
}

.field--consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.925rem;
}

.field--consent input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.25rem;
}

/* Honeypot: hidden from humans, present for bots. Deliberately not
   `display:none`, which many bots skip. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__status {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-sunken);
}

.form__status[data-state='error'] {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, var(--bg));
}

.form__status[data-state='success'] {
  border-color: color-mix(in srgb, currentColor 25%, transparent);
}

.form__status h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.form__status p:last-child {
  margin-bottom: 0;
}

.form__verify {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* The block is served with `hidden` and only revealed when a submit has to
   wait for the proof of work. Without this the `display: flex` above beats
   the browser's own [hidden] rule and the spinner turns on the moment the
   page loads, on every form. */
.form__verify[hidden] {
  display: none;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------ looking glass --- */

/* Three short fields belong on one line where there is room for them, so the
   whole query reads as one sentence rather than as a stack of questions. */
.lg-form {
  max-width: none;
}

.lg-form__row {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: minmax(14rem, 1.2fr) minmax(10rem, 0.8fr) minmax(16rem, 1.4fr);
  align-items: start;
}

@media (max-width: 46rem) {
  .lg-form__row {
    grid-template-columns: 1fr;
  }
}

.lg-form__row .field input {
  font-family: var(--font-mono);
}

/* The script fills this in as you type, so it is shown on its own rather
   than only when the server has marked the field invalid — and stays hidden
   while it has nothing to say, even if the field is marked invalid by the
   server for another reason. */
.lg-form [data-lg-message]:not([hidden]) {
  display: block;
}

.lg-form [data-lg-message][hidden] {
  display: none;
}

.lg-result {
  margin-top: 2.5rem;
}

.lg-result__head {
  font-size: 1.05rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lg-result__head .muted {
  font-size: 0.875rem;
  font-weight: 400;
}

.lg-result__body {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-sunken);
  /* Router output is fixed-width and can be very wide; it scrolls inside its
     own box so the page itself never does. */
  overflow-x: auto;
  max-height: 34rem;
  overflow-y: auto;
}

.lg-result__body pre {
  margin: 0;
  padding: 1rem 1.15rem;
}

.lg-result__body code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre;
  tab-size: 4;
}

.lg-notes {
  margin-top: 3rem;
  max-width: var(--measure);
}

.lg-notes h2 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.lg-notes ul {
  color: var(--text-muted);
  font-size: 0.925rem;
  padding-left: 1.1rem;
}

.lg-notes li {
  margin-bottom: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Site chrome
   These rules lived in Astro component <style> blocks before the site moved
   to Django templates; they are plain global CSS now.
   ========================================================================== */

/* --------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  color: var(--text);
}

.site-footer .brand {
  margin-right: 0;
  margin-bottom: 0.75rem;
}

/* The wordmark carries the company name, so there is no text beside it.
   Two files because an <img> cannot inherit currentColor; the pair is swapped
   by colour scheme, with the manual data-theme override winning over the
   media query in both directions. */
.brand__logo {
  display: block;
  height: auto;
  width: clamp(6.5rem, 5rem + 4vw, 7.75rem);
}

.site-footer .brand__logo {
  width: 7rem;
}

/* The OX mark, used in the footer beside the company name. */
.brand__mark {
  display: block;
  width: 2.1rem;
  height: auto;
  flex: none;
}

.site-footer .brand {
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand__name {
  color: var(--text);
}

.brand__mark--dark {
  display: none;
}

:root[data-theme='dark'] .brand__mark--light {
  display: none;
}

:root[data-theme='dark'] .brand__mark--dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  .brand__mark--light {
    display: none;
  }

  .brand__mark--dark {
    display: block;
  }

  :root[data-theme='light'] .brand__mark--light {
    display: block;
  }

  :root[data-theme='light'] .brand__mark--dark {
    display: none;
  }
}

.brand__logo--dark {
  display: none;
}

:root[data-theme='dark'] .brand__logo--light {
  display: none;
}

:root[data-theme='dark'] .brand__logo--dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  .brand__logo--light {
    display: none;
  }

  .brand__logo--dark {
    display: block;
  }

  :root[data-theme='light'] .brand__logo--light {
    display: block;
  }

  :root[data-theme='light'] .brand__logo--dark {
    display: none;
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 20px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 550;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
}

.site-nav__link:hover {
  background: var(--bg-sunken);
}

.site-nav__link[data-active] {
  color: var(--brand);
}

.site-nav__sub {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 13rem;
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.13s ease, transform 0.13s ease, visibility 0.13s;
}

.site-nav__item:hover .site-nav__sub,
.site-nav__item:focus-within .site-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.site-nav__sublink {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.925rem;
  color: var(--text);
}

.site-nav__sublink:hover,
.site-nav__sublink[aria-current='page'] {
  color: var(--brand);
}

.site-nav__sublink:hover {
  background: var(--bg-sunken);
}

.site-nav__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Customer portal. Sized down from the default button so it sits with the
   language switcher and theme toggle rather than competing with the nav. */
.site-nav__login {
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* ------------------------------------------------------ language switch --- */

.lang {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang__item {
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  background: none;
}

.lang__item:last-child {
  border-right: 0;
}

.lang__item:hover {
  background: var(--bg-sunken);
  color: var(--text);
}

.lang__item[aria-current='true'] {
  background: var(--brand);
  color: var(--brand-contrast);
}

.lang__item abbr {
  text-decoration: none;
  border: 0;
}

/* --------------------------------------------------------- theme toggle --- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--brand);
}

/* Show whichever icon represents the scheme you would switch *to*. */
.theme-toggle__sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle__sun {
  display: block;
}

:root[data-theme='dark'] .theme-toggle__moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .theme-toggle__sun {
    display: block;
  }

  .theme-toggle__moon {
    display: none;
  }

  :root[data-theme='light'] .theme-toggle__sun {
    display: none;
  }

  :root[data-theme='light'] .theme-toggle__moon {
    display: block;
  }
}

@media (max-width: 62rem) {
  .nav-toggle {
    display: block;
    order: 2;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-block: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
  }

  .site-nav[data-open] {
    display: flex;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .site-nav__link {
    padding-inline: 0.5rem;
    font-size: 1rem;
  }

  /* No hover affordance on touch — always show the second level. */
  .site-nav__sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    margin: 0.1rem 0 0.35rem 0.75rem;
    padding: 0 0 0 0.5rem;
    min-width: 0;
    background: none;
  }

  .site-nav__tools {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }

  /* Full width on a narrow screen: it is the one action in this row. */
  .site-nav__login {
    order: -1;
    flex-basis: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  margin-top: auto;
  font-size: 0.95rem;
}

.site-footer__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.site-footer__brand {
  max-width: 24rem;
}

.site-footer address {
  font-style: normal;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.8;
}

.site-footer__nav h2 {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer__nav a {
  text-decoration: none;
  color: var(--text);
}

.site-footer__nav a:hover {
  color: var(--brand);
}

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.site-footer__bar p {
  margin: 0;
}

@media (min-width: 60rem) {
  .site-footer__inner {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

/* ----------------------------------------------------------------- hero --- */

.page-hero {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}

.page-hero h1 {
  margin-bottom: 0;
}

.hero {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero__inner {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero__text > .lead {
  margin-bottom: 1rem;
}

.hero__text > .muted {
  max-width: var(--measure);
}

.hero__art {
  display: none;
}

.hero__art svg {
  width: 100%;
  height: auto;
}

@media (min-width: 60rem) {
  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero__art {
    display: block;
  }
}

/* --------------------------------------------------- translation notice --- */

.translation-notice {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
  padding: 1.1rem 1.35rem;
  border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--border));
  border-left-width: 4px;
  border-left-color: var(--brand);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--brand) 6%, var(--bg));
  font-size: 0.925rem;
}

.translation-notice p {
  margin-bottom: 0.5rem;
}

.translation-notice p:last-child {
  margin-bottom: 0;
}

.translation-notice__label {
  font-weight: 680;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.translation-notice a {
  color: var(--brand);
  font-weight: 600;
}

/* --------------------------------------------------------- page layouts --- */

.prose-lead {
  max-width: var(--measure);
  margin-bottom: 2rem;
}

.contact {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.contact__aside {
  display: grid;
  gap: 1.25rem;
}

.address-card__note {
  font-size: 0.9rem;
  margin: 0;
}

@media (min-width: 58rem) {
  .contact {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}

.job {
  max-width: var(--measure);
}

.job h3 {
  margin-top: 2rem;
}

.job li::marker {
  color: var(--brand);
}

.form__hint {
  font-size: 0.85rem;
}

/* Django renders checkboxes before their label; keep the grid order right. */
.field--consent input[type='checkbox'] {
  grid-column: 1;
}

.field--consent label {
  grid-column: 2;
  font-weight: 400;
}

/* ---------------------------------------------------------- testimonial --- */

.testimonial {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 58rem;
}

.testimonial__photo {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  object-fit: cover;
  /* The source is a photograph on a busy background; a hairline ring stops it
     bleeding into the card on both colour schemes. */
  box-shadow: 0 0 0 1px var(--border);
}

.testimonial__body > :last-child {
  margin-bottom: 0;
}

.testimonial__quote {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  max-width: var(--measure);
}

.testimonial__quote p {
  color: var(--text-muted);
}

.testimonial__quote p:last-child {
  margin-bottom: 0;
}

.testimonial__heading {
  font-weight: 650;
  font-size: 1.075rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Opening quote mark, purely decorative — hence the aria-free ::before. */
.testimonial__heading::before {
  content: '\201C';
  color: var(--brand);
  font-size: 1.6em;
  line-height: 0;
  vertical-align: -0.25em;
  margin-right: 0.1em;
}

.testimonial__author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.925rem;
}

.testimonial__name {
  font-weight: 650;
  color: var(--text);
}

.testimonial__role {
  color: var(--text-muted);
}

.testimonial__role a {
  color: inherit;
}

.testimonial__role a:hover {
  color: var(--brand);
}

.testimonial__translated {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (min-width: 44rem) {
  .testimonial {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .testimonial__photo {
    width: 7rem;
    height: 7rem;
  }
}
