/* VetLib.
 *
 * Hand-written, first-party, no framework. Every byte here is served from our
 * own domain: that is what lets the site ship without a cookie banner, and the
 * audience is often on mobile data in a clinic car park.
 *
 * The tone to aim for is a calm professional service rather than a startup:
 * vets and clinic managers are busy, not impressed by novelty, and deciding
 * whether to trust us with an identity document.
 */

/* ---------------------------------------------------------------- font
 * Inter, SIL Open Font License, self-hosted. Two subsets declared with
 * unicode-range, so a French visitor downloads only `latin` (71 KB) and
 * `latin-ext` is fetched solely for a name that needs it.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.4b73e2ff3024.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.084b211fc382.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light dark;

  /* Type. A 1.22 ratio: enough separation to build hierarchy, gentle enough
     that a dense legal page does not turn into a staircase. */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.4375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.125rem;

  /* Space, on a 4px grid. */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --measure: 38rem;      /* comfortable reading width for prose */
  --page: 70rem;

  /* Colour. A deep teal-green: medical without being clinical, and distinct
     from the corporate blue every other marketplace uses. Neutrals carry a
     faint warm cast so large white areas do not read as cold. */
  --brand-700: #0a5346;
  --brand-600: #0d6a58;
  --brand-500: #10836c;
  --brand-100: #daefe8;
  --brand-050: #eff8f5;

  --ink: #16211f;
  --ink-soft: #465653;
  --ink-faint: #6d7d7a;

  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-sunken: #f4f3f0;
  --line: #e4e2dd;
  --line-strong: #d2cfc8;

  --danger: #a8392c;
  --danger-bg: #fdf1ef;
  --warning: #8a6212;
  --warning-bg: #fdf6e6;
  --success: var(--brand-600);

  --shadow-sm: 0 1px 2px rgb(22 33 31 / 6%);
  --shadow: 0 1px 2px rgb(22 33 31 / 5%), 0 6px 20px -8px rgb(22 33 31 / 10%);
  --shadow-lg: 0 2px 4px rgb(22 33 31 / 5%), 0 18px 40px -16px rgb(22 33 31 / 16%);

  --focus: 0 0 0 3px var(--brand-100), 0 0 0 1px var(--brand-600);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Layered near-blacks rather than pure black: a flat #000 page makes every
       border and surface disappear, which is what the first version did. */
    --brand-700: #7fd8c2;
    --brand-600: #58c7ab;
    --brand-500: #3fb397;
    --brand-100: #12332c;
    --brand-050: #0f2823;

    --ink: #e9efed;
    --ink-soft: #a9bab6;
    --ink-faint: #7e908d;

    --bg: #0e1413;
    --surface: #151d1b;
    --surface-sunken: #111817;
    --line: #263331;
    --line-strong: #354542;

    --danger: #f0968a;
    --danger-bg: #2a1714;
    --warning: #e4be6b;
    --warning-bg: #261e0e;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px -8px rgb(0 0 0 / 55%);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 35%), 0 18px 40px -16px rgb(0 0 0 / 60%);

    --focus: 0 0 0 3px var(--brand-100), 0 0 0 1px var(--brand-500);
  }
}

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

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

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

body {
  /* A column so the footer sits at the bottom of short pages instead of
     floating halfway up an empty viewport. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-md);
  font-feature-settings: "cv11", "ss01";
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.018em;
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 var(--s3);
  text-wrap: balance;
}

h1 { font-size: clamp(1.85rem, 1.2rem + 2.4vw, var(--text-3xl)); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p { margin: 0 0 var(--s4); }
a { color: var(--brand-600); text-underline-offset: 2px; }
a:hover { color: var(--brand-700); }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-sm);
}

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

/* The browser's own [hidden] rule is an author-beatable display:none, so any
   component that sets its own display silently ignores the attribute. Toggling
   `hidden` in JavaScript is how several islands hide things, so it has to win.
   The language button reappeared in the header exactly this way. */
[hidden] { display: none !important; }

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

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: var(--s3); top: var(--s3);
  z-index: 20;
  padding: var(--s2) var(--s4);
  background: var(--brand-600);
  color: #fff;
  border-radius: var(--radius);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding: var(--s3) var(--s5);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-600);
  text-decoration: none;
  white-space: nowrap;
}
/* Sized by height so the header does not move if the wordmark is ever redrawn
   at a different width. */
.brand img { display: block; width: auto; height: 1.6rem; }
.brand:hover { opacity: 0.85; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav > a:not(.button) {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--s2) 0;
  white-space: nowrap;
}
.site-nav > a:not(.button):hover { color: var(--brand-600); }
/* :not(.button) rather than plain `> a`: the element+class selector would
   otherwise out-specify .button and paint the call-to-action's text grey. */
.site-nav > a.button { white-space: nowrap; }

.lang-form { display: flex; gap: var(--s2); align-items: center; }

/* On a phone the single row wrapped around the brand into three ragged lines.
   Stack it instead, and stop pinning it: a sticky header that tall eats a
   third of the screen on the devices most of this audience will use. */
@media (max-width: 48rem) {
  .site-header {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s3);
    padding: var(--s4) var(--s4) var(--s3);
  }
  .site-nav { justify-content: flex-start; gap: var(--s2) var(--s4); }
  main { padding-inline: var(--s4); }
  .messages { padding-inline: var(--s4); }
  .site-footer { padding-inline: var(--s4); }
}
.lang-form select {
  font-size: var(--text-xs);
  padding: var(--s1) var(--s2);
  border-radius: var(--radius-sm);
  border-color: transparent;
  background: transparent;
  color: var(--ink-faint);
  width: auto;
  cursor: pointer;
}
.lang-form select:hover { color: var(--ink); border-color: var(--line); }

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

/* `main` is the page container, rather than each child centring itself. That
   way every page shares one left rail: a narrow prose column and a full-width
   hero start at the same x, which they did not when the centring was per
   child. */
main {
  flex: 1;
  width: 100%;
  max-width: calc(var(--page) + var(--s5) * 2);
  margin-inline: auto;
  padding: var(--s7) var(--s5) var(--s8);
}

/* A soft wash behind the top of the page: some weight without an image to
   load. On `body`, which spans the viewport -- painting it on a centred box
   left a visible rectangular edge where the gradient was clipped. */
body.page-home {
  background:
    radial-gradient(48rem 26rem at 24% 0%, var(--brand-050), transparent 70%)
      no-repeat,
    var(--bg);
}

.prose { max-width: var(--measure); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s5); }
.prose li { margin-bottom: var(--s2); }
.prose > p:first-of-type { font-size: var(--text-md); }

.lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34rem;
}

.note { color: var(--ink-faint); font-size: var(--text-sm); }
.link { color: var(--brand-600); font-weight: 500; }

/* What is still needed, and what has arrived. The marker carries the state so
   it is not colour alone doing the work. */
.checklist li { padding-left: var(--s5); }
.checklist li strong { display: block; }
.checklist .is-done::before,
.checklist li.is-done::before { background: var(--brand-500); }
.checklist li.is-missing::before {
  background: var(--warning);
  width: 8px; height: 8px; border-radius: 50%; top: 0.5em;
}

/* ---------------------------------------------------------------- review queue */

/* Counts double as the navigation: a reviewer wants "what needs me", and the
   number beside it is the only way to know whether that is ten minutes or a
   day's work. */
.review-states { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.review-state {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  text-decoration: none;
}
.review-state strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.review-state.is-current { border-color: var(--brand-500); background: var(--brand-050); color: var(--brand-700); }

.review-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); }
.review-filters .field { margin: 0; }

.review-table td { vertical-align: top; }
.review-table .note { display: block; }

/* The verdict lives on the row it is about, so deciding is one click and the
   reviewer never has to hold "which row was I on" while they scroll. */
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.row-actions .button { white-space: nowrap; }

/* Honouring an objection erases a name, so it does not sit beside the two
   everyday answers where a stray click can reach it. */
.row-withdraw { flex-basis: 100%; }
.row-withdraw > summary {
  font-size: var(--text-xs);
  color: var(--ink-soft);
  cursor: pointer;
}
.row-withdraw > summary:hover { color: var(--danger); }
.row-withdraw .note { margin: var(--s2) 0; max-width: 18rem; }

/* A field somebody cannot type in has to look like one. Without this, "locked"
   is a property only the keyboard knows about. */
input[readonly],
textarea[readonly] {
  background: var(--surface-sunken);
  color: var(--ink-soft);
  cursor: not-allowed;
}

/* What the register says about whoever was picked. Quiet, but not a footnote:
   it is the answer to the question the field above it asked. */
.chosen {
  margin: calc(var(--s3) * -1) 0 var(--s4);
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--brand-500);
  background: var(--brand-050);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.chosen strong { display: block; }

/* ---------------------------------------------------------------- photographs */

/* Every rule here has to survive the photograph not being there: the tag
   renders nothing at all for a missing file, so these style an element that is
   frequently absent, and nothing else may depend on its presence. */
.photo {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.photo img {
  display: block;
  width: 100%;
  height: auto;
  /* The intrinsic ratio is on the element, so the space is reserved before the
     bytes arrive and nothing under a thumb moves as the page settles. */
  object-fit: cover;
}

@media (prefers-color-scheme: dark) {
  /* Dimmed rather than swapped. A photograph at full brightness on a near-black
     page is a lamp in a dark room; a second set of images would be two things
     to keep in step for no gain. */
  .photo img { filter: brightness(0.88) saturate(0.95); }
}

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

.hero {
  padding: var(--s7) 0 var(--s8);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s7);
}
.hero h1 { max-width: 24ch; }
.hero .lede { margin-bottom: var(--s5); }

/* A wide, shallow band above the words. Without it the hero is exactly what it
   is today, which is why the margin lives on the photograph rather than on the
   heading. */
.hero-photo {
  margin-bottom: var(--s6);
  box-shadow: var(--shadow);
}
.hero-photo img { aspect-ratio: 16 / 7; }
@media (min-width: 48rem) { .hero-photo img { aspect-ratio: 21 / 8; } }

.badge {
  display: inline-block;
  padding: var(--s1) var(--s3);
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
  font-weight: 600;
  font-size: var(--text-sm);
}

/* ---------------------------------------------------------------- columns */

.columns {
  display: grid;
  gap: var(--s5);
  margin-bottom: var(--s7);
}
@media (min-width: 48rem) { .columns { grid-template-columns: 1fr 1fr; } }

.columns > article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  box-shadow: var(--shadow-sm);
}
.columns > article > h2 { margin-top: 0; }

/* The card has padding; the photograph should not sit inside it. Pulled out to
   the card's edges and squared off at the top, so it reads as the card's
   header rather than as a picture somebody put in a box. */
.columns > article > .photo {
  margin: calc(var(--s5) * -1) calc(var(--s5) * -1) var(--s5);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.columns > article > .photo img { aspect-ratio: 4 / 3; }
@media (min-width: 48rem) { .columns > article > .photo img { aspect-ratio: 3 / 2; } }

/* Numbered steps, with the number as a quiet marker rather than a list glyph. */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 var(--s4); }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: var(--s6);
  margin-bottom: var(--s3);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
  font-size: var(--text-xs);
  font-weight: 700;
}

.plain { list-style: none; padding: 0; margin: 0 0 var(--s4); }
.plain li { padding-left: var(--s5); position: relative; margin-bottom: var(--s2); }
.plain li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 12px; height: 2px;
  border-radius: 2px;
  background: var(--brand-500);
}

.trust {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s6);
}
.trust h2 { margin-top: 0; }
.trust-text > :first-child { margin-top: 0; }
.trust-text > :last-child { margin-bottom: 0; }

/* Beside the text where there is room, above it where there is not. The grid
   only appears when the photograph does, so the section is unchanged without
   it. */
.trust:has(> .trust-photo) { display: grid; gap: var(--s5); align-items: center; }
@media (min-width: 48rem) {
  .trust:has(> .trust-photo) { grid-template-columns: 1fr 1fr; }
  .trust-photo { order: 2; }
}
.trust-photo img { aspect-ratio: 16 / 9; }

/* ---------------------------------------------------------------- messages */

.messages { max-width: calc(var(--page) + var(--s5) * 2); margin: var(--s4) auto 0; padding: 0 var(--s5); }
.message {
  margin: 0 0 var(--s2);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  border: 1px solid var(--brand-100);
  background: var(--brand-050);
  color: var(--brand-700);
  font-size: var(--text-sm);
  font-weight: 500;
}
.message--error { border-color: color-mix(in srgb, var(--danger) 30%, transparent); background: var(--danger-bg); color: var(--danger); }
.message--warning { border-color: color-mix(in srgb, var(--warning) 30%, transparent); background: var(--warning-bg); color: var(--warning); }

/* ---------------------------------------------------------------- banners */

.banner {
  padding: var(--s4) var(--s5);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: var(--s5);
}
.banner h2 { margin-top: 0; font-size: var(--text-base); }
.banner ul { margin-bottom: 0; }
.banner--warning {
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
  background: var(--warning-bg);
  color: var(--warning);
}

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

.cards { list-style: none; padding: 0; display: grid; gap: var(--s4); }
@media (min-width: 48rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4) var(--s5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 120ms ease, border-color 120ms ease;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h2 { margin: 0 0 var(--s1); font-size: var(--text-base); }
.card h2 a { text-decoration: none; }
.card p { margin: 0 0 var(--s2); }
.card p:last-child { margin-bottom: 0; }

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

.form { max-width: var(--measure); margin: var(--s5) 0; }
.form--inline {
  display: flex;
  gap: var(--s4);
  align-items: flex-end;
  flex-wrap: wrap;
  max-width: none;
  padding: var(--s4);
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.form--inline .field { margin-bottom: 0; }
.form--inline input, .form--inline select { width: auto; min-width: 9rem; }

.field { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.field label, .form label, main form label {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--ink);
}
.field .note { margin: 0; }

/* `input:not([type])` matters: an <input> with no type attribute defaults to
   text but is not matched by input[type="text"], so it rendered completely
   unstyled. */
input:not([type]), input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="search"],
input[type="file"], textarea, select {
  font: inherit;
  font-size: var(--text-base);
  padding: var(--s3) var(--s3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  max-width: var(--measure);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:not([type]):hover, input:hover, textarea:hover, select:hover { border-color: var(--ink-faint); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--focus);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
textarea { min-height: 9rem; resize: vertical; }

/* allauth renders checkboxes with the label above; keep them on one line. */
input[type="checkbox"], input[type="radio"] {
  width: auto;
  accent-color: var(--brand-600);
  margin-right: var(--s2);
}

.field--error input, .field--error textarea, .field--error select { border-color: var(--danger); }
.field-error, .form-errors { color: var(--danger); font-size: var(--text-sm); font-weight: 500; }
.form-errors {
  padding: var(--s3) var(--s4);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  background: var(--danger-bg);
  border-radius: var(--radius);
  margin-bottom: var(--s4);
}
.form-errors p { margin: 0; }
.honeypot { position: absolute; left: -9999px; }

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

/* Every button in the app carries .button -- our templates set it, and the
 * allauth override in templates/allauth/elements/button.html adds it to theirs.
 * An element selector like `main form button[type=submit]` used to be here as a
 * safety net, and it out-specified every .button--* modifier: the Google button
 * silently rendered as a primary action because of it.
 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  padding: var(--s3) var(--s5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--brand-600);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background 120ms ease, transform 60ms ease;
}
.button:hover { background: var(--brand-700); color: #fff; }
.button:active { transform: translateY(1px); }

@media (prefers-color-scheme: dark) {
  .button { color: #07211c; }
  .button:hover { color: #07211c; }
}

.button--small { padding: var(--s2) var(--s3); font-size: var(--text-sm); }
.button--danger { background: var(--danger); }
.button--danger:hover { background: color-mix(in srgb, var(--danger) 80%, black); }

/* A secondary action must not compete with the primary one. */
.button--quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.button--quiet:hover { background: var(--surface-sunken); color: var(--ink); border-color: var(--ink-faint); }

.link-button {
  border: 0; background: none; padding: 0;
  font: inherit; font-size: var(--text-sm); font-weight: 500;
  color: var(--ink-soft); cursor: pointer;
}
.link-button:hover { color: var(--brand-600); text-decoration: underline; }

.link--danger { color: var(--danger); font-weight: 500; }

/* ---------------------------------------------------------------- content */

.toc {
  border: 1px solid var(--line);
  background: var(--surface-sunken);
  border-radius: var(--radius);
  padding: var(--s4) var(--s5);
  margin-bottom: var(--s6);
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: var(--s1); }

.faq-entry { border-bottom: 1px solid var(--line); padding: var(--s4) 0; }
.faq-entry summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
}
.faq-entry summary::-webkit-details-marker { display: none; }
.faq-entry summary::after {
  content: "+";
  color: var(--brand-600);
  font-weight: 400;
  font-size: var(--text-lg);
  line-height: 1;
}
.faq-entry[open] summary::after { content: "\2212"; }
.faq-entry summary:hover { color: var(--brand-600); }
.faq-entry p { margin: var(--s3) 0 var(--s1); color: var(--ink-soft); }

.legal { display: grid; grid-template-columns: 1fr; gap: 0 var(--s5); margin-bottom: var(--s5); }
@media (min-width: 34rem) { .legal { grid-template-columns: minmax(10rem, max-content) 1fr; } }
.legal dt { font-weight: 600; font-size: var(--text-sm); padding: var(--s2) 0 0; }
.legal dd { margin: 0 0 var(--s3); color: var(--ink-soft); padding: var(--s2) 0 0; }

.table { width: 100%; border-collapse: collapse; margin: var(--s4) 0 var(--s5); font-size: var(--text-sm); }
.table th, .table td {
  text-align: left;
  padding: var(--s3);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table thead th {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  border-bottom-color: var(--line-strong);
}

.preview {
  margin-top: var(--s6);
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.preview h2 { margin-top: 0; }

.pagination { display: flex; gap: var(--s4); align-items: center; margin-top: var(--s5); }

/* ---------------------------------------------------------------- auth */

/* allauth's pages, made to read as one considered form rather than a stack of
   loose controls on an empty page.
 *
 * The card is `main` itself. allauth's templates override the `content` block
 * wholesale, so a wrapper element written in the layout would be discarded --
 * hence a body class and a rule here.
 */
.page-auth main {
  max-width: 27rem;
  margin: var(--s7) auto var(--s8);
  padding: var(--s6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.page-auth main > * { max-width: none; }
.page-auth h1 { font-size: var(--text-2xl); margin-bottom: var(--s4); }
.page-auth form { max-width: none; margin: var(--s4) 0 0; }
.page-auth main .button { width: 100%; }
.field--choice label { display: flex; align-items: center; gap: var(--s2); font-weight: 400; }
.button-group { display: flex; flex-direction: column; gap: var(--s2); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s5) 0 var(--s4);
  color: var(--ink-faint);
  font-size: var(--text-sm);
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.socialaccount_providers { list-style: none; padding: 0; margin: 0; }
.socialaccount_providers .provider { margin-bottom: var(--s2); }
.button--provider {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.button--provider:hover { background: var(--surface-sunken); color: var(--ink); border-color: var(--ink-faint); }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
  padding: var(--s7) var(--s5) var(--s6);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}
.footer-columns {
  display: grid;
  gap: var(--s5);
  max-width: var(--page);
  margin: 0 auto var(--s6);
}
@media (min-width: 40rem) { .footer-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer-columns h2 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  margin: 0 0 var(--s3);
}
.footer-columns ul { list-style: none; padding: 0; margin: 0; }
.footer-columns li { margin-bottom: var(--s2); }
.footer-columns a { color: var(--ink-soft); text-decoration: none; }
.footer-columns a:hover { color: var(--brand-600); text-decoration: underline; }
.footer-note {
  max-width: var(--page);
  margin: 0 auto;
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: var(--text-xs);
}

/* ---------------------------------------------------------------- motion */

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

/* ---------------------------------------------------------------- profile form */

.prose--wide { max-width: 50rem; }
.form--wide { max-width: none; }

.fieldset {
  padding: var(--s5);
  margin-bottom: var(--s5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.fieldset > h2 { margin: 0 0 var(--s4); font-size: var(--text-base); }

.choice-set { border: 0; padding: 0; margin: 0 0 var(--s5); }
.choice-set legend {
  padding: 0;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--s2);
}
.field-label { font-weight: 600; font-size: var(--text-sm); margin-bottom: var(--s2); }

.choice-grid { display: grid; gap: var(--s2); }
@media (min-width: 40rem) {
  .choice-grid--two { grid-template-columns: 1fr 1fr; }
  .choice-grid--dense { grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); }
}

/* A whole tappable row rather than a 13px box: this audience is often on a
   phone, and a checkbox alone is a small target. */
.choice {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--text-sm);
  cursor: pointer;
}
.choice:hover { border-color: var(--brand-500); }
.choice:has(input:checked) {
  border-color: var(--brand-600);
  background: var(--brand-050);
  color: var(--brand-700);
  font-weight: 500;
}
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice input { margin: 0; }

/* ---------------------------------------------------------------- map */

.map-frame {
  margin: var(--s3) 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
  padding: var(--s3);
}
.map-frame:empty { display: none; }
.map-frame svg { display: block; width: 100%; height: auto; }

.dept-map path {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.1;
  stroke-linejoin: round;
  transition: fill 100ms ease;
}
/* Only in département mode are the shapes controls; in radius mode they are
   the backdrop the circle is drawn on, and a pointer cursor would promise
   something clicking does not deliver. */
.dept-map.is-picking path { cursor: pointer; }
.dept-map.is-picking path:hover { fill: var(--brand-100); }
.dept-map path:focus-visible { outline: none; stroke: var(--brand-600); stroke-width: 2.5; }
.dept-map path.is-selected { fill: var(--brand-500); stroke: var(--brand-700); }
.dept-map.is-picking path.is-selected:hover { fill: var(--brand-600); }
.dept-map path.is-unavailable { fill: var(--surface-sunken); cursor: default; opacity: 0.5; }

/* The travel radius. Hidden until there is both a commune and a distance --
   a circle of unknown size around nowhere in particular helps no one. */
.dept-map__radius,
.dept-map__centre { display: none; pointer-events: none; }
.dept-map__radius.is-shown,
.dept-map__centre.is-shown { display: block; }
.dept-map__radius {
  fill: var(--brand-500);
  fill-opacity: 0.18;
  stroke: var(--brand-600);
  stroke-width: 2;
  transition: r 120ms ease;
}
.dept-map__centre { fill: var(--brand-700); }

.map-credit {
  margin: calc(-1 * var(--s2)) 0 var(--s3);
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

/* Once the map is up the list becomes a fallback, still present for assistive
   technology but folded away. */
.department-fallback { margin-top: var(--s3); }
.department-fallback summary {
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.department-fallback summary:hover { color: var(--brand-600); }

.coverage { margin-top: var(--s4); }

/* ---------------------------------------------------------------- tags */

/* What someone does, at a glance. A clinic scanning a list of locums is
   looking for "équine" or "urgences", not reading prose. */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s3) 0 0;
  padding: 0;
  list-style: none;
}
.tag {
  font-size: var(--text-xs);
  padding: 0.15rem var(--s2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--surface);
}
/* Said plainly, not hidden and not alarming: it is a fact about where someone
   is in the process, not a judgement about them. */
.tag--unverified {
  border-color: var(--warning-500, #d9a441);
  color: var(--warning-700, #7a5200);
  background: var(--warning-50, #fdf6e6);
}

.tag--species {
  border-color: var(--brand-500);
  color: var(--brand-700);
  background: var(--brand-100);
}

/* ------------------------------------------------------- shifts */

/* A day rate is the first thing anyone looks for on a listing, so it is the
   one number allowed to be loud. */
.rate {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink);
  margin: var(--s2) 0;
}

.facts { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); margin: var(--s4) 0; }
.facts dt { font-weight: 600; color: var(--ink-soft); }
.facts dd { margin: 0; }

@media (max-width: 30rem) {
  .facts { grid-template-columns: 1fr; gap: 0 0; }
  .facts dd { margin-bottom: var(--s3); }
}

/* The negotiation, oldest first. Superseded offers stay visible and are simply
   quieter: the history is the record of who offered what. */
.offers { list-style: none; padding: 0; margin: var(--s3) 0; }
.offer {
  border-left: 3px solid var(--brand-500);
  padding: var(--s2) var(--s3);
  margin-bottom: var(--s3);
  background: var(--surface);
}
.offer p { margin: 0 0 var(--s1); }
.offer--superseded { border-left-color: var(--line); opacity: 0.65; }

/* ---------------------------------------------------- staff dashboard */

/* Three numbers, big enough to read from across a desk. */
.stats { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0; }
.stat {
  flex: 1 1 8rem;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.stat strong { display: block; font-size: var(--text-xl); line-height: 1.1; }
.stat span { font-size: var(--text-xs); color: var(--ink-soft); }

/* Tables can be wider than the page; they scroll rather than squeezing the
   rest of the layout. */
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); margin: var(--s3) 0; }
.table th, .table td {
  text-align: left;
  padding: var(--s2) var(--s3) var(--s2) 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th { font-size: var(--text-xs); color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.table code { font-size: var(--text-xs); word-break: break-all; }
.row--bad td { background: var(--danger-50, #fdf1f0); }

/* On a phone the table scrolls inside its own box rather than squashing its
   columns into unreadable slivers -- and the page itself still never scrolls
   sideways. The min-width is what makes the overflow happen at all: without
   it a width:100% table just shrinks to fit. */
@media (max-width: 44rem) {
  .fieldset:has(.table) { overflow-x: auto; }
  .table { min-width: 34rem; }
}

/* The two things somebody can do from the landing page, side by side and
   wrapping rather than shrinking on a narrow screen. */
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* ------------------------------------------------- the choropleth */

/* Five bands rather than a continuous ramp: past about five, neighbouring
   shades stop being tellable apart at the size a département is drawn. */
.dept-map path.band-0 { fill: var(--surface); }
.dept-map path.band-1 { fill: var(--brand-050); }
.dept-map path.band-2 { fill: var(--brand-100); }
.dept-map path.band-3 { fill: color-mix(in srgb, var(--brand-500) 45%, var(--surface)); }
.dept-map path.band-4 { fill: color-mix(in srgb, var(--brand-500) 70%, var(--surface)); }
.dept-map path.band-5 { fill: var(--brand-600); }

/* The shapes are links here, not checkboxes. */
.dept-map path[role="link"] { cursor: pointer; }
.dept-map path[role="link"]:hover { stroke: var(--brand-700); stroke-width: 2; }
.dept-map path[role="link"].is-selected { stroke: var(--ink); stroke-width: 2.5; }

/* The map covers metropolitan France only; these carry the rest, the way a
   French map conventionally shows its DOM insets. */
.dom-tiles { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0 var(--s4); }
.dom-tile {
  flex: 1 1 8rem;
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--surface);
}
.dom-tile:hover { border-color: var(--brand-500); }
.dom-tile.is-selected { border-color: var(--ink); }
.dom-tile strong { display: block; font-size: var(--text-sm); }
.dom-tile span { font-size: var(--text-xs); color: var(--ink-soft); }

/* The list under the map: the no-JavaScript path, and what a screen reader
   walks. Folded away once the map is up, never removed. */
.dept-list { list-style: none; padding: 0; margin: var(--s3) 0 0; columns: 2; }
@media (min-width: 48rem) { .dept-list { columns: 3; } }
.dept-list li {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0.1rem 0;
}
.register-list li { padding: 0.15rem 0; }
/* `.plain` draws a small dash at left:0, positioned against a left padding
   this list does not want. Without turning it off the dash is painted over the
   first letter of every name. */
.register-list li::before { content: none; }
.register-list .withdraw { font-size: var(--text-sm); white-space: nowrap; }

/* Why a match was proposed, under the proposal itself. Quiet: it is evidence
   for the eye to skim, not a second name competing with the first. */
.match-because { font-variant: small-caps; letter-spacing: 0.02em; }
