@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* The roles of RAPREMU_DESIGN.md, light then dark. */
:root {
  color-scheme: light dark;
  --bg: #fbf7f0;
  --surface: #ffffff;
  --line: #ded5ca;
  --line-strong: #91806b;
  --text: #211b19;
  --muted: #6d625d;
  --accent: #a63d24;
  --accent-hover: #812c1b;
  --on-accent: #ffffff;
  --cream: #f3ebdd;
  --soft: #f8e3dc;
  --danger: #b3261e;
  --warning: #9b6200;
  --success: #2f6e48;
  --nav: #312c2a;
  --nav-text: #fff9f2;
  --nav-muted: #cbbeb5;
  --nav-accent: #f0784d;
  --nav-line: #5f5450;
  --nav-line-strong: #9b8a7f;
  --font-heading: "Manrope", system-ui, sans-serif;
  --font-ui: "Source Sans 3", system-ui, sans-serif;
  --radius-card: 14px;
  --radius-control: 10px;
  --wrap: 1168px;
  --gutter: 24px;
  --show-on-light: block;
  --show-on-dark: none;
}

/* The theme follows the device, unless the visitor chose one with the switch (assets/theme.js sets data-theme).
   The dark roles are written twice, for the device and for the choice: tools/build.mjs's tests keep them equal. */
:root[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #181514;
    --surface: #211d1b;
    --line: #4a403b;
    --line-strong: #9b8a7f;
    --text: #fff9f2;
    --muted: #cbbeb5;
    --accent: #f0784d;
    --accent-hover: #ff916c;
    --on-accent: #181514;
    --cream: #332b27;
    --soft: #42251f;
    --danger: #ff827a;
    --warning: #f2b84b;
    --success: #7fc68e;
    --nav: #0f0d0c;
    --nav-line: #3a322e;
    --show-on-light: none;
    --show-on-dark: block;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181514;
  --surface: #211d1b;
  --line: #4a403b;
  --line-strong: #9b8a7f;
  --text: #fff9f2;
  --muted: #cbbeb5;
  --accent: #f0784d;
  --accent-hover: #ff916c;
  --on-accent: #181514;
  --cream: #332b27;
  --soft: #42251f;
  --danger: #ff827a;
  --warning: #f2b84b;
  --success: #7fc68e;
  --nav: #0f0d0c;
  --nav-line: #3a322e;
  --show-on-light: none;
  --show-on-dark: block;
}

.on-light {
  display: var(--show-on-light);
}

.on-dark {
  display: var(--show-on-dark);
}

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

[hidden] {
  display: none !important;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

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

main:focus {
  outline: none;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.eyebrow {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn-large {
  min-height: 52px;
  padding: 0 24px;
  font-size: 17px;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

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

.btn-secondary:hover {
  background: var(--cream);
  color: var(--text);
}

.btn:disabled {
  cursor: progress;
}

.btn-primary:disabled {
  background: var(--accent);
  opacity: 0.8;
}

.spin {
  animation: spin 0.9s linear infinite;
}

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

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

/* Header */

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 24px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.brand img {
  width: 196px;
  max-width: 100%;
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.segmented {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  overflow: hidden;
}

.segmented > a,
.segmented > button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}

.segmented > a:hover,
.segmented > button:hover {
  color: var(--text);
  background: var(--cream);
}

.segmented > [aria-current="true"],
.segmented > [aria-pressed="true"],
.segmented > [aria-current="true"]:hover,
.segmented > [aria-pressed="true"]:hover {
  background: var(--text);
  color: var(--bg);
}

.segmented > a:focus-visible,
.segmented > button:focus-visible {
  outline-offset: -4px;
}

/* Without JavaScript the switch could not work: it appears only when assets/theme.js has run. */
.theme-switch {
  display: none;
}

.js .theme-switch {
  display: flex;
}

@media (max-width: 420px) {
  .btn-login {
    width: 46px;
    padding: 0;
    justify-content: center;
  }

  .btn-login .login-label {
    display: none;
  }
}

/* Hero */

.hero {
  padding-top: clamp(48px, 8vw, 104px);
  padding-bottom: clamp(64px, 9vw, 120px);
}

.hero-title {
  max-width: 1100px;
  font-weight: 800;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-title span {
  display: block;
}

.hero-accent {
  color: var(--accent);
}

.hero-lead {
  margin: 28px 0 0;
  max-width: 640px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero-proof {
  margin: 48px 0 0;
  max-width: 640px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--muted);
}

.hero-proof strong {
  color: var(--text);
}

/* Modules */

.modules {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: 48px;
}

.section-head-main {
  flex: 1 1 520px;
  min-width: 0;
}

.section-head h2,
.steps-title,
.distribution h2 {
  font-weight: 800;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.section-lead {
  flex: 0 1 380px;
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--surface);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  background: var(--cream);
  color: var(--accent);
}

.card h3 {
  margin-top: 8px;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
}

.card p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* Steps */

.steps {
  background: var(--cream);
}

.steps-title {
  max-width: 720px;
}

.step-list {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 32px;
}

.step-list li {
  padding-top: 24px;
  border-top: 2px solid var(--text);
}

.step-number {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.step-list h3 {
  margin: 16px 0 8px;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
}

.step-list p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* Distribution */

.distribution {
  background: var(--nav);
  color: var(--nav-text);
}

.distribution-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-block: clamp(64px, 8vw, 104px);
}

.distribution-main {
  flex: 1 1 520px;
  min-width: 0;
}

.distribution .eyebrow {
  color: var(--nav-accent);
}

.distribution h2 {
  color: var(--nav-text);
}

.distribution-text {
  margin: 20px 0 0;
  max-width: 600px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--nav-muted);
}

.distribution :focus-visible {
  outline-color: var(--nav-accent);
}

.btn-on-nav {
  margin-top: 32px;
  border-color: var(--nav-line-strong);
  color: var(--nav-text);
}

.btn-on-nav:hover {
  background: var(--nav-line);
  color: var(--nav-text);
}

.chips {
  flex: 1 1 360px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips li {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--nav-line);
  font-size: 16px;
  font-weight: 600;
}

/* Contact */

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px 64px;
}

.contact-intro {
  flex: 1 1 340px;
  min-width: 0;
}

.contact-title {
  font-weight: 800;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.contact-text {
  margin: 20px 0 0;
  max-width: 560px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
}

.contact-already {
  margin: 32px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.contact-already a {
  font-weight: 700;
}

.contact-card {
  flex: 1 1 520px;
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--surface);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

.form-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-control);
  background: var(--soft);
  color: var(--text);
}

.form-alert-icon {
  flex: none;
  margin-top: 1px;
  color: var(--danger);
}

.form-alert p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.form-alert strong {
  display: block;
  color: var(--danger);
}

.form-alert.is-notice {
  background: var(--cream);
}

.form-alert.is-notice .form-alert-icon {
  color: var(--warning);
}

.form-alert.is-notice strong {
  color: var(--text);
}

.topics {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.topics legend,
.field label {
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.topics legend {
  margin: 0 0 10px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.pill input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.pill:has(input:checked) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--cream);
}

.pill:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.pill input:focus-visible {
  outline: none;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

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

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
}

.field textarea {
  min-height: 140px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline-offset: 1px;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.field input:read-only,
.field textarea:read-only {
  color: var(--muted);
}

/* Safari and Chrome paint a field they fill themselves yellow, whatever the theme: an inset shadow covers it. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  box-shadow: 0 0 0 1000px var(--bg) inset;
}

.field input[aria-invalid="true"]:-webkit-autofill {
  -webkit-box-shadow: inset 0 0 0 1px var(--danger), 0 0 0 1000px var(--bg) inset;
  box-shadow: inset 0 0 0 1px var(--danger), 0 0 0 1000px var(--bg) inset;
}

.field-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--danger);
}

.field-error::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background: currentColor;
  -webkit-mask: url("/assets/circle-alert.svg") center / contain no-repeat;
  mask: url("/assets/circle-alert.svg") center / contain no-repeat;
}

.topics .field-error {
  margin-top: 8px;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.human-check:empty {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 4px;
}

.form-note {
  flex: 1 1 220px;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.form-note a {
  color: var(--text);
  font-weight: 600;
}

.form-noscript {
  margin: 0;
  font-size: 15px;
  color: var(--danger);
}

.contact-sent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.contact-sent:focus {
  outline: none;
}

.sent-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--success);
}

.contact-sent h3 {
  margin-top: 8px;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.contact-sent p {
  margin: 0;
  max-width: 440px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.contact-sent .btn {
  margin-top: 12px;
}

/* Privacy and 404 */

.prose {
  max-width: calc(760px + 2 * var(--gutter));
  padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 112px);
}

.prose-title {
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.prose-updated {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.prose-intro {
  margin: 24px 0 0;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--muted);
}

.prose h2 {
  margin: 48px 0 12px;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
}

.prose p,
.prose li {
  font-size: 17.5px;
  line-height: 1.6;
}

.prose p {
  margin: 0;
}

.prose ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prose ul + p,
.prose p + p {
  margin-top: 12px;
}

.prose-aside {
  color: var(--muted);
}

.prose-back {
  margin-top: 56px !important;
}

.not-found {
  padding-block: clamp(64px, 10vw, 140px);
}

.not-found .prose-intro {
  max-width: 560px;
}

.not-found .btn {
  margin-top: 36px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 28px 36px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  font-size: 14px;
  color: var(--muted);
}

.footer-brand img {
  width: 72px;
  height: auto;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
