@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-background: oklch(0.975 0.012 85);
  --color-surface: oklch(0.995 0.005 85);
  --color-text: oklch(0.24 0.02 150);
  --color-text-muted: oklch(0.47 0.02 130);
  --color-primary: oklch(0.38 0.07 160);
  --color-primary-text: oklch(0.985 0.008 90);
  --color-border: oklch(0.88 0.015 90);
  --color-highlight: oklch(0.92 0.15 118);

  --color-success: oklch(0.5 0.12 155);
  --color-warning: oklch(0.5 0.12 65);
  --color-error: oklch(0.5 0.17 27);

  --radius: 12px;
  --radius-large: 20px;
  --space: 1rem;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* Keeps the footer at the bottom of the window on short pages. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.75rem, 6.5vw, 5.25rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

a {
  color: var(--color-primary);
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.container {
  max-width: 40rem;
  margin: 0 auto;
  padding: calc(var(--space) * 3) var(--space);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Header */

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

.site-header-inner {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 2);
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: calc(var(--space) * 1.75);
  margin-left: auto;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--color-text);
}

.language-switcher details {
  position: relative;
}

.language-switcher summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.language-switcher abbr {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.language-switcher summary::-webkit-details-marker {
  display: none;
}

.language-switcher summary:hover,
.language-switcher details[open] summary {
  background: color-mix(in srgb, var(--color-primary) 7%, transparent);
  color: var(--color-text);
}

.language-chevron {
  transition: transform 0.2s;
}

.language-switcher details[open] .language-chevron {
  transform: rotate(180deg);
}

/* A short list today; it scrolls instead of growing past the screen when
   more languages are added. */
.language-switcher ul {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 30;
  min-width: 11rem;
  max-height: min(20rem, 70vh);
  margin: 0;
  padding: 0.35rem;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 20px 40px -24px color-mix(in srgb, var(--color-text) 45%, transparent);
  list-style: none;
}

.language-switcher li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.65rem;
  border-radius: calc(var(--radius) - 0.25rem);
  color: var(--color-text);
  font-size: 0.9rem;
  text-decoration: none;
}

.language-switcher li a:hover {
  background: color-mix(in srgb, var(--color-primary) 7%, transparent);
}

.language-switcher li a[aria-current] {
  color: var(--color-primary);
  font-weight: 700;
}

.language-switcher li a[aria-current]::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-primary);
}

/* Forms */

label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--color-background) 55%, var(--color-surface));
  color: var(--color-text);
  font: inherit;
  transition: border-color 0.2s, background-color 0.2s;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--color-text-muted) 70%, transparent);
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="email"]:hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

textarea {
  resize: vertical;
}

select {
  padding-right: 2.5rem;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.95rem) 50%;
  background-size: 0.3rem 0.3rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field {
  margin-bottom: var(--space);
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-primary-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
}

.button::after {
  content: "\2192" / "";
  transition: transform 0.25s var(--ease-out);
}

.button:hover {
  background: color-mix(in srgb, var(--color-primary) 88%, var(--color-text));
  transform: translateY(-1px);
}

.button:hover::after {
  transform: translateX(3px);
}

.button:disabled {
  background: color-mix(in srgb, var(--color-primary) 45%, var(--color-background));
  cursor: default;
  transform: none;
}

.button:disabled::after {
  display: none;
}

.button[aria-busy]::after {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Full-page wait while the next page is being prepared */

.wait-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: color-mix(in srgb, var(--color-background) 94%, transparent);
  animation: fade-in 0.3s var(--ease-out) both;
}

.wait-overlay[hidden] {
  display: none;
}

.wait-overlay img {
  animation: trot 1.2s ease-in-out infinite;
}

.wait-overlay p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--color-text);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes trot {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}

.button-wait {
  display: none;
}

form[data-uploading] .button-label {
  display: none;
}

form[data-uploading] .button-wait {
  display: inline;
}

.button-wait output {
  font-variant-numeric: tabular-nums;
}

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

/* Hero */

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

.hero-copy {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.hero h1 {
  max-width: 18ch;
  margin-inline: auto;
}

h1 em {
  background: linear-gradient(
    transparent 58%,
    var(--color-highlight) 58%,
    var(--color-highlight) 92%,
    transparent 92%
  );
  padding-inline: 0.08em;
  margin-inline: -0.08em;
}

.lead {
  max-width: 34rem;
  margin: 1.5rem auto 0;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.hero h1,
.lead,
.sheet {
  animation: rise 0.9s var(--ease-out) both;
}

.lead {
  animation-delay: 0.12s;
}

.sheet {
  animation-delay: 0.25s;
}

/* The form sheet */

.sheet {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
}

.sheet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.sheet-column {
  display: flex;
  flex-direction: column;
}

.sheet-column + .sheet-column {
  padding-left: clamp(1.5rem, 4vw, 3rem);
  border-left: 1px solid var(--color-border);
}

.sheet-column:first-child > .field:last-child {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-bottom: 0;
}

.sheet-column:first-child textarea {
  flex: 1;
  min-height: 11rem;
}

.sheet-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 700;
}

.sheet-step span {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-text);
  font-size: 0.8rem;
}

.sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding-top: clamp(1rem, 2.5vw, 1.5rem);
  border-top: 1px solid var(--color-border);
}

.sheet-footer p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Selected files */

.files {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.files-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.files-header p {
  margin: 0;
  color: var(--color-text-muted);
}

.files-header output {
  margin-left: 0.25rem;
  color: var(--color-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.link-button {
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: var(--color-primary);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.link-button:disabled {
  color: var(--color-text-muted);
  cursor: default;
}

.file-list {
  max-height: 16rem;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem 0.35rem 0.9rem;
}

.file + .file {
  border-top: 1px solid var(--color-border);
}

.file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
}

.file-size {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.file-error {
  min-width: 0;
  overflow: hidden;
  color: var(--color-error);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-status {
  display: none;
  align-items: center;
  width: 1.1rem;
  height: 1.1rem;
  justify-content: center;
}

.file[data-state="waiting"] .file-status--waiting,
.file[data-state="uploading"] .file-status--uploading,
.file[data-state="done"] .file-status--done,
.file[data-state="failed"] .file-status--failed {
  display: inline-flex;
}

.file[data-state="failed"] .file-status {
  color: var(--color-error);
}

.file[data-state="done"] .file-status {
  color: var(--color-success);
}

.file-status .spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid color-mix(in srgb, var(--color-warning) 25%, transparent);
  border-top-color: var(--color-warning);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.file-retry {
  display: none;
  flex: none;
}

.file[data-retry] .file-retry {
  display: inline;
}

.file-remove {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.file-remove:hover {
  background: color-mix(in srgb, var(--color-error) 12%, transparent);
  color: var(--color-error);
}

/* While the job is being created nothing can change. */
form[data-busy] .file-remove,
form[data-busy] .file-retry,
form[data-busy] [data-remove-all] {
  visibility: hidden;
}

form[data-busy] .dropzone {
  opacity: 0.5;
  pointer-events: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .file-status .spinner {
    animation: none;
  }
}

/* Dropzone */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 18rem;
  padding: 2rem 1.5rem;
  border: 1.5px dashed color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  border-radius: 16px;
  background: color-mix(in srgb, var(--color-highlight) 14%, var(--color-surface));
  text-align: center;
  transition: border-color 0.2s, background-color 0.2s;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-highlight) 30%, var(--color-surface));
}

/* While files are dragged over the zone, so the visitor sees it is ready. */
.dropzone--over {
  border-style: solid;
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.dropzone--over .dropzone-icon {
  color: inherit;
}

.dropzone--over > :not(input, .dropzone-icon, .dropzone-drop) {
  display: none;
}

.dropzone-drop {
  display: none;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.dropzone--over .dropzone-drop {
  display: block;
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-more {
  display: none;
  margin: 0;
  font-weight: 600;
}

.dropzone--compact {
  flex-direction: row;
  flex: none;
  gap: 0.75rem;
  min-height: 0;
  padding: 0.9rem 1.25rem;
}

.dropzone--compact .dropzone-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.dropzone--compact .dropzone-title,
.dropzone--compact .dropzone-hint {
  display: none;
}

.dropzone--compact .dropzone-more {
  display: block;
}

.dropzone-icon {
  color: var(--color-primary);
}

.dropzone-title {
  margin: 1rem 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.dropzone-hint {
  margin: 0;
  color: var(--color-text-muted);
}

/* Refine and thanks pages */

.page {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
}

.page-head {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.page-head h1 {
  max-width: 18ch;
  margin-inline: auto;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
}

.page-head .lead {
  margin-top: 1.25rem;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 2rem;
  padding: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}

.progress-steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-steps li + li::before {
  content: "";
  width: clamp(1rem, 5vw, 2.5rem);
  height: 1px;
  margin-right: 0.25rem;
  background: var(--color-border);
}

.progress-steps span {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  font-size: 0.8rem;
}

.progress-steps a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.progress-steps a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.progress-steps .is-done {
  color: var(--color-primary);
}

.progress-steps .is-done span {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
}

.progress-steps [aria-current] {
  color: var(--color-text);
}

.progress-steps [aria-current] span {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.refine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.form-section {
  padding-block: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--color-border);
}

.form-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.form-section:last-child {
  padding-bottom: 0;
}

.form-section h2 {
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
}

.form-section h2:has(+ .form-section-hint) {
  margin-bottom: 0;
}

.form-section-hint {
  margin: 0.3rem 0 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space);
}

.field-row + .form-section-hint {
  margin: -0.25rem 0 0;
}

.field-label {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.segmented {
  position: relative;
  display: flex;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-background) 55%, var(--color-surface));
}

.segmented input,
.chips input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  flex: 1;
  margin: 0;
  padding: 0.5rem 0.5rem;
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.segmented label:hover {
  color: var(--color-text);
}

.segmented input:checked + label {
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips label {
  margin: 0;
  padding: 0.45rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.chips label:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.chips input:checked + label {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.segmented input:focus-visible + label,
.chips input:focus-visible + label {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.range {
  --from: 0%;
  --to: 100%;
}

.range-values {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
}

.range-track {
  position: relative;
  height: 1.5rem;
}

.range-track::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--color-border) var(--from),
    var(--color-primary) var(--from),
    var(--color-primary) var(--to),
    var(--color-border) var(--to)
  );
  transform: translateY(-50%);
}

.range-track input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: none;
  pointer-events: none;
}

.range-track input::-webkit-slider-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  appearance: none;
  background: var(--color-surface);
  pointer-events: auto;
  cursor: grab;
}

.range-track input::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  background: var(--color-surface);
  pointer-events: auto;
  cursor: grab;
}

.range-track input:focus-visible {
  outline: none;
}

.range-track input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.range-track input:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.order {
  position: sticky;
  top: 6rem;
  padding: 1.75rem;
  border-radius: var(--radius-large);
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-background));
}

.order h2 {
  font-size: 1.75rem;
}

.order-job {
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.order-lines {
  margin: 0.75rem 0 0;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  list-style: none;
}

.order-lines li,
.order-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.order-total {
  margin: 1rem 0 1.5rem;
  font-weight: 600;
}

.order-total strong {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
}

.button--block {
  width: 100%;
  justify-content: center;
}

.button--ghost {
  border: 1.5px solid var(--color-primary);
  background: none;
  color: var(--color-primary);
  text-decoration: none;
}

.button--ghost:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.button--small {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Cookie banner */

.cookie-banner {
  position: fixed;
  bottom: var(--space);
  left: var(--space);
  z-index: 20;
  display: flex;
  gap: 0.9rem;
  width: calc(100% - 2 * var(--space));
  max-width: 24rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: 0 12px 32px -12px color-mix(in srgb, var(--color-text) 30%, transparent);
  animation: rise 0.5s var(--ease-out);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-icon {
  flex: none;
  color: var(--color-primary);
}

.cookie-banner-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
}

.cookie-banner-text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.cookie-banner-actions .button::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    animation: none;
  }
}

.order-note {
  margin: 1rem 0 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.order-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.thanks .lead {
  max-width: 36rem;
}

.next-steps {
  max-width: 40rem;
  margin: 0 auto;
}

.thanks-actions {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  text-align: center;
}

/* How it works */

.section {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.section--tinted {
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-background));
}

.story h2 {
  max-width: 18ch;
}

.story-lead {
  max-width: 60ch;
  margin: 1.25rem 0 0;
}

.story-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 9rem minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

/* The pile: whole CV sheets dropped on top of each other, no order */

/* Sheets spread across whatever width the column has: --x is a fraction
   of the free space, so the pile never spills into the donkey. */
.pile {
  --sheet: 14rem;
  container-type: inline-size;
  position: relative;
  height: 32rem;
}

.cv-sheet {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--sheet);
  aspect-ratio: 1 / 1.414;
  padding: 1.4rem 1.4rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  box-shadow: 0 18px 30px -22px color-mix(in srgb, var(--color-text) 45%, transparent);
  transform: translate(calc(1rem + (100cqi - var(--sheet) - 2rem) * var(--x)), var(--y)) rotate(var(--r));
}

.cv-sheet:nth-child(1) { --x: 0.92; --y: 8.5rem; --r: 9deg; }
.cv-sheet:nth-child(2) { --x: 0.04; --y: 0.5rem; --r: -10deg; }
.cv-sheet:nth-child(3) { --x: 1; --y: 0.5rem; --r: 7deg; }
.cv-sheet:nth-child(4) { --x: 0; --y: 9.5rem; --r: -6deg; }
.cv-sheet:nth-child(5) { --x: 0.62; --y: 1.5rem; --r: -3deg; }
.cv-sheet:nth-child(6) { --x: 0.19; --y: 5rem; --r: 4deg; }
.cv-sheet:nth-child(7) { --x: 0.81; --y: 5.5rem; --r: -7deg; }
.cv-sheet:nth-child(8) { --x: 0.42; --y: 7rem; --r: 2deg; }

.cv-sheet--best {
  border-color: var(--color-highlight);
  background: color-mix(in srgb, var(--color-highlight) 14%, var(--color-surface));
}

.cv-sheet p {
  margin: 0;
}

.cv-file {
  color: var(--color-text-muted);
  font-size: 0.62rem;
}

.cv-file::before {
  content: "PDF";
  margin-right: 0.35rem;
  color: var(--color-error);
  font-weight: 800;
}

.cv-sheet .cv-name {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.05;
}

.cv-role {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.cv-sheet .cv-section {
  margin-top: 1rem;
  margin-bottom: 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cv-line {
  display: block;
  height: 0.4rem;
  margin-bottom: 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-border) 80%, transparent);
}

.cv-line:nth-of-type(2n) {
  width: 78%;
}

.cv-line:nth-of-type(3n) {
  width: 62%;
}

/* The donkey in the middle, where the pile turns into the report */

.story-donkey {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  gap: 1rem;
  text-align: center;
}

.story-donkey-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 6.5rem;
  height: 6.5rem;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
}

.story-donkey-mark::before,
.story-donkey-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2rem;
  height: 2px;
  background: var(--color-primary);
}

.story-donkey-mark::before {
  right: calc(100% + 0.5rem);
}

.story-donkey-mark::after {
  left: calc(100% + 0.5rem);
}

.story-donkey p {
  max-width: 10rem;
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.story-donkey strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.1;
}

/* The report: the PDF's candidate cards, in order */

.example-report {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: 0 40px 70px -45px color-mix(in srgb, var(--color-text) 50%, transparent);
}

.example-cover {
  padding: 0.9rem 1.25rem 1.25rem;
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.example-cover-file {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.example-cover-eyebrow {
  margin: 1.1rem 0 0;
  color: var(--color-highlight);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.example-cover-title {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.example-file-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
  font-weight: 700;
}

.example-report-body {
  padding: 1.25rem;
}

.file-badge {
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: var(--color-primary);
  color: var(--color-primary-text);
  font-size: 0.65rem;
  font-weight: 800;
}

.file-badge--sheet {
  background: var(--color-highlight);
  color: var(--color-primary);
}

.example-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.example-card + .example-card {
  margin-top: 0.6rem;
}

.example-card--best {
  border-color: var(--color-highlight);
  background: color-mix(in srgb, var(--color-highlight) 24%, var(--color-surface));
  box-shadow: 0 14px 28px -20px color-mix(in srgb, var(--color-primary) 60%, transparent);
}

.example-card p {
  grid-column: 1;
  margin: 0;
}

.example-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.1;
}

.example-name span {
  margin-right: 0.4rem;
  color: var(--color-primary);
}

.example-card .example-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
  grid-column: 1 / -1;
  margin-top: 0.7rem;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.example-card .example-summary {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.example-card .example-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  grid-column: 1 / -1;
  margin-top: 0.55rem;
}

.example-skills span {
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: 0.72rem;
  font-weight: 600;
}

.example-ring {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  width: 3.6rem;
  height: 3.6rem;
}

.example-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
}

.example-ring circle:first-child {
  opacity: 0.16;
}

.example-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.example-ring--high {
  color: var(--color-success);
}

.example-ring--medium {
  color: var(--color-warning);
}

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

.example-more {
  margin: 0.9rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* The spreadsheet that comes with the PDF */

.spreadsheet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.spreadsheet-layout h2 {
  margin-bottom: 1.25rem;
}

.spreadsheet-layout .lead {
  margin: 0;
}

/* The sheet goes first on wide screens, the text first when stacked */
.spreadsheet-layout .example-sheet {
  order: -1;
}

.example-sheet {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: 0 40px 70px -45px color-mix(in srgb, var(--color-text) 50%, transparent);
}

/* Fades out on the right: the real sheet has more columns than fit here */
.example-sheet-scroll {
  overflow: hidden;
  mask-image: linear-gradient(to right, var(--color-text) 80%, transparent);
}

.example-sheet table {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.example-sheet th,
.example-sheet td {
  padding: 0.5rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
  text-align: left;
  white-space: nowrap;
}

.example-sheet th {
  background: color-mix(in srgb, var(--color-border) 30%, var(--color-surface));
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
}

.example-sheet td:nth-child(5) {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.example-sheet-head td {
  font-weight: 700;
}

.example-sheet-best td {
  background: color-mix(in srgb, var(--color-highlight) 22%, var(--color-surface));
}

/* The demo video, played only when the visitor asks for it */

/* A recap of the two sections above, not a new topic: centered, with
   no eyebrow or lead */
.demo-layout {
  max-width: 56rem;
}

.demo-title {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
}

.demo-video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: 0 40px 70px -45px color-mix(in srgb, var(--color-text) 50%, transparent);
}

.reasons {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reasons li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--color-border);
}

.reasons li:first-child {
  padding-top: 0;
  border-top: 0;
}

.reasons p {
  margin: 0;
  color: var(--color-text-muted);
}

.reasons .reason-label {
  grid-row: 1 / span 2;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-style: italic;
  line-height: 1;
}

/* FAQ */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 6rem);
}

.faq-heading {
  position: sticky;
  top: 6rem;
}

.faq details {
  border-bottom: 1px solid var(--color-border);
}

.faq details:first-child {
  border-top: 1px solid var(--color-border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  padding-block: 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--color-primary);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.3s var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 60ch;
  margin: 0;
  padding-bottom: 1.25rem;
  color: var(--color-text-muted);
}

/* Footer */

.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) var(--space);
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.site-footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(var(--space) * 2);
}

.site-footer-identity {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.site-footer-mark {
  flex: none;
  width: clamp(3.75rem, 7vw, 5rem);
  height: auto;
}

.site-footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
}

.site-footer-tagline {
  margin: 0.6rem 0 0;
  color: color-mix(in srgb, var(--color-primary-text) 70%, transparent);
}

.site-footer-email {
  margin: 0.3rem 0 0;
}

.site-footer-email a {
  color: color-mix(in srgb, var(--color-primary-text) 85%, transparent);
  text-decoration: none;
}

.site-footer-email a:hover {
  color: var(--color-primary-text);
  text-decoration: underline;
}

.site-footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.site-footer-nav a {
  color: color-mix(in srgb, var(--color-primary-text) 85%, transparent);
  text-decoration: none;
}

.site-footer-nav a:hover {
  color: var(--color-primary-text);
  text-decoration: underline;
}

.site-footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem var(--space);
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: var(--space);
  border-top: 1px solid color-mix(in srgb, var(--color-primary-text) 20%, transparent);
  color: color-mix(in srgb, var(--color-primary-text) 65%, transparent);
}

.site-footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.85rem;
}

.site-footer-legal-nav a,
.site-footer-legal-nav button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.site-footer-legal-nav a:hover,
.site-footer-legal-nav button:hover {
  color: var(--color-primary-text);
  text-decoration: underline;
}

/* Legal pages and errors */

.legal-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

.legal-updated {
  margin: 0.75rem 0 clamp(2rem, 5vw, 3rem);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.legal-body h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.75rem;
}

.legal-body p,
.legal-body li {
  line-height: 1.7;
}

.legal-body ul {
  padding-left: 1.25rem;
}

.legal-body li {
  margin-bottom: 0.5rem;
}

.legal-body table {
  display: block;
  margin: 1rem 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal-body th,
.legal-body td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.legal-body th {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-actions {
  margin: 2rem 0 0;
}

/* Responsive */

@media (max-width: 60rem) {
  .refine-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .order {
    position: static;
  }

  .spreadsheet-layout .example-sheet {
    order: 0;
  }

  .faq-layout,
  .spreadsheet-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-heading {
    position: static;
  }

  .story-flow {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    max-width: 34rem;
  }

  .pile {
    --sheet: 13.5rem;
    height: 30rem;
  }

  .story-donkey {
    margin-block: 1rem;
  }

  .story-donkey-mark::before,
  .story-donkey-mark::after {
    top: auto;
    left: 50%;
    right: auto;
    width: 2px;
    height: 1.5rem;
  }

  .story-donkey-mark::before {
    bottom: calc(100% + 0.5rem);
  }

  .story-donkey-mark::after {
    top: calc(100% + 0.5rem);
  }

  .story-donkey p {
    max-width: none;
    margin-top: 2rem;
  }

  .sheet-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sheet-column + .sheet-column {
    padding-left: 0;
    padding-top: 1.5rem;
    border-left: 0;
    border-top: 1px solid var(--color-border);
  }
}

@media (max-width: 40rem) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 0.5rem var(--space);
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .language-switcher {
    margin-left: auto;
  }

  .sheet-footer,
  .site-footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .sheet-footer .button {
    justify-content: center;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .reasons li {
    grid-template-columns: minmax(0, 1fr);
  }

  .reasons .reason-label {
    grid-row: auto;
    margin-bottom: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 30rem) {
  .file {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .file-error {
    order: 5;
    flex-basis: 100%;
    padding-bottom: 0.2rem;
    white-space: normal;
  }
}
