/* Burotu: a palette drawn from plasma and venous blood. */
:root {
  --glass: #F6F7F4;      /* fond : verre de laboratoire */
  --ink: #1B2130;        /* texte : encre graphite */
  --ink-soft: #4A5263;
  --venous: #7A1F33;     /* venous blood: actions, methylated CpGs */
  --venous-deep: #5E1626;
  --plasma: #EFE2AE;     /* plasma paille */
  --plasma-soft: #F6EFD2;
  --line: #D6DDD9;       /* gris verre */
  --white: #FFFFFF;
  --focus: #2D5BD7;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.6rem, 6.2vw, 5.4rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 72rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--glass);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 42rem; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--step--1); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--white); padding: .5rem 1rem; }

/* Demo banner: discreet but always present. */
.demo-banner {
  background: var(--plasma);
  color: var(--ink);
  font-size: var(--step--1);
  padding: .45rem var(--gutter);
  text-align: center;
}

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem var(--gutter);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.35rem; text-decoration: none; letter-spacing: -0.03em; }
.brand svg { width: 34px; height: 11px; flex: none; }
.brand .o, .done-mark .o { fill: none; stroke: var(--ink); stroke-width: 2; }
.brand .f, .done-mark .f { fill: var(--venous); }
.nav { display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 1rem; }

.lang { position: relative; }
.lang summary { cursor: pointer; list-style: none; font-weight: 600; padding: .4rem .6rem; border: 1.5px solid var(--line); border-radius: var(--radius); }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: .4rem; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); min-width: 9rem; z-index: 5; }
.lang a { display: block; padding: .4rem .6rem; text-decoration: none; border-radius: 4px; }
.lang a:hover { background: var(--glass); }
.lang a[aria-current] { font-weight: 700; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--venous); color: var(--white);
  font: inherit; font-weight: 600; text-decoration: none;
  padding: .85rem 1.4rem; border: 0; border-radius: var(--radius); cursor: pointer;
}
.btn:hover { background: var(--venous-deep); }
.btn-small { padding: .5rem .9rem; font-size: var(--step--1); }
.btn-block { width: 100%; }
.btn-light { background: var(--plasma); color: var(--ink); }
.btn-light:hover { background: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--white); }
.link { font-weight: 600; text-underline-offset: 5px; }

/* Hero */
.hero { padding-top: clamp(2.5rem, 7vw, 6rem); }
.hero-title { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; max-width: 20ch; margin-bottom: 2.5rem; }
.hero-line { display: block; }
.hero-row { display: grid; grid-template-columns: minmax(0, 36rem) auto; gap: 2rem 4rem; align-items: end; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); margin: 0; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

/* Sequencing reads */
.reads { margin: clamp(3rem, 7vw, 5rem) 0 0; padding: 2.5rem 0 1.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); overflow: hidden; }
.reads svg { width: 100%; height: clamp(180px, 26vw, 330px); }
.read line { stroke: var(--line); stroke-width: 2; }
.cpg { fill: var(--white); stroke: var(--ink); stroke-width: 1.6; }
.cpg-on { fill: var(--ink-soft); stroke: var(--ink-soft); }
.cpg-tumour { fill: var(--venous); stroke: var(--venous); animation: methylate .5s ease-out both; }
.read-tumour line { stroke: #C9A3AC; }
.reads figcaption { margin-top: 1.25rem; font-size: var(--step--1); color: var(--ink-soft); max-width: 60ch; }
@keyframes methylate {
  from { fill: var(--white); stroke: var(--ink); }
  to { fill: var(--venous); stroke: var(--venous); }
}

/* Sections */
.section { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.section-lead { font-size: var(--step-1); color: var(--ink-soft); max-width: 40rem; margin-bottom: 3rem; }
.section-plasma { background: var(--plasma-soft); }
.section-ink { background: var(--ink); color: var(--glass); }
.section-ink .muted { color: #B9C0CC; }

/* Tube journey: a real sequence, hence numbered. */
.journey { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: none; }
.journey li { position: relative; padding: 0 1.75rem 0 0; }
.journey li::before { content: ""; position: absolute; top: 1.15rem; left: 2.75rem; right: .75rem; height: 2px; background: var(--line); }
.journey li:last-child::before { display: none; }
.journey-n { display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 2px solid var(--ink); font-weight: 700; margin-bottom: 1.25rem; background: var(--glass); position: relative; }
.journey li:nth-child(3) .journey-n { background: var(--venous); border-color: var(--venous); color: var(--white); }
.journey p { color: var(--ink-soft); }

.science { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem 5rem; }
.science-text p { max-width: 62ch; }
.cancers { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.cancers li { padding: .55rem 0 .55rem 1.6rem; position: relative; break-inside: avoid; border-bottom: 1px solid rgba(27,33,48,.12); }
.cancers li::before { content: ""; position: absolute; left: 0; top: 1rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--venous); }

.limits ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.limits li { border-left: 3px solid var(--plasma); padding-left: 1.1rem; color: var(--ink-soft); }

.offer { display: grid; grid-template-columns: 1fr auto; gap: 2rem 4rem; align-items: center; }
.offer p { max-width: 50ch; }
.offer-buy { text-align: right; }
.price { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 1.25rem; }

.faq { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem 4rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: var(--step-1); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--venous); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: .8rem 0 0; color: var(--ink-soft); max-width: 62ch; }

.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: var(--step--1); color: var(--ink-soft); }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-note { max-width: 52ch; margin: 0; }
.footer-meta { margin: 0; }
.langs a { margin-left: 1rem; }

/* Booking */
.book h1 { font-size: var(--step-3); }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 3rem 4rem; align-items: start; }
fieldset { border: 0; padding: 0; margin: 0 0 2.5rem; min-width: 0; }
legend { font-weight: 700; font-size: var(--step-1); margin-bottom: 1rem; padding: 0; }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.site { position: relative; cursor: pointer; }
.site input { position: absolute; opacity: 0; }
.site-body { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); height: 100%; }
.site-body .muted { font-size: var(--step--1); }
.site input:checked + .site-body { border-color: var(--venous); box-shadow: inset 0 0 0 1px var(--venous); }
.site input:focus-visible + .site-body { outline: 3px solid var(--focus); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: .35rem; font-weight: 500; font-size: var(--step--1); }
.field input, .field select {
  font: inherit; font-size: var(--step-0); color: var(--ink);
  padding: .7rem .8rem; background: var(--white);
  border: 1.5px solid var(--line); border-radius: var(--radius);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem 1.25rem; }
.field.wide { grid-column: 1 / -1; }
.when .field { max-width: 15rem; margin-bottom: 1.25rem; }
.slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; }
.slot span { display: inline-block; padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; font-weight: 500; }
.slot input:checked + span { background: var(--venous); border-color: var(--venous); color: var(--white); }
.slot input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.consent { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1.5rem; color: var(--ink-soft); }
.consent input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; accent-color: var(--venous); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.errors { background: #FBEDEF; border-left: 4px solid var(--venous); padding: 1rem 1.25rem; margin-bottom: 2rem; border-radius: 0 var(--radius) var(--radius) 0; }
.errors ul { margin: 0; padding-left: 1.1rem; }
.errors p { margin: 0; }

.summary { position: sticky; top: 1.5rem; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.summary h2 { font-size: var(--step-1); }
.summary-item, .summary-total { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .5rem; }
.summary-total { border-top: 1px solid var(--line); padding-top: .9rem; margin-top: 1rem; font-weight: 700; font-size: var(--step-1); }
.test-mode { font-size: var(--step--1); background: var(--plasma-soft); padding: .5rem .7rem; border-radius: 4px; }
.test-mode.inline { display: inline-block; margin-left: .5rem; padding: .1rem .5rem; }

.done h1 { font-size: var(--step-3); }
.done-mark { width: 120px; height: 20px; margin-bottom: 2rem; }
.done .lead { margin-bottom: 2rem; }
.ref { color: var(--ink); white-space: nowrap; }
.done-facts { display: grid; gap: 1rem; margin: 0 0 2rem; padding: 1.5rem; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); }
.done-facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
.done-facts dt { color: var(--ink-soft); }
.done-facts dd { margin: 0; font-weight: 500; }

/* Back-office */
.admin .topbar { border-bottom: 1px solid var(--line); background: var(--white); max-width: none; }
.admin-main { padding-top: 2rem; padding-bottom: 4rem; }
.admin h1 { font-size: var(--step-2); margin: 0; }
.admin h2 { font-size: var(--step-1); }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }

.filters { display: flex; gap: 1rem; align-items: flex-end; /* align the button with the fields */ flex-wrap: wrap; margin-bottom: 1.5rem; }
.filters .field { min-width: 14rem; }
.filters select { padding: .7rem .8rem; }
.filters .btn { padding: .78rem 1rem; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.table th { text-align: left; font-weight: 600; color: var(--ink-soft); padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.past td { opacity: .6; }
.table tr.status-cancelled td:not(:last-child) { text-decoration: line-through; color: var(--ink-soft); }
.empty { padding: 3rem; text-align: center; color: var(--ink-soft); background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); }
.site-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.site-card.inactive { opacity: .65; }
.days { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.25rem 0; }
.days legend { font-size: var(--step--1); font-weight: 600; margin-bottom: .5rem; }
.site-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.admin-split .site-card .fields { margin-bottom: 1rem; }
.closures { list-style: none; padding: 0; margin: 1rem 0 0; }
.closures li { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-top: 1px solid var(--line); }
.login { max-width: 24rem; margin: 4rem auto; display: grid; gap: 1rem; }

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .hero-row, .science, .offer, .faq, .book-grid, .admin-split { grid-template-columns: 1fr; }
  .offer-buy { text-align: left; }
  .journey { grid-template-columns: 1fr 1fr; gap: 2.5rem 0; }
  .journey li:nth-child(2)::before { display: none; }
  .limits ul { grid-template-columns: 1fr; gap: 1.25rem; }
  .summary { position: static; }
  }
@media (max-width: 560px) {
  .topbar { gap: 1rem; }
  .topbar-end .btn { display: none; }
  .journey { grid-template-columns: 1fr; }
  .journey li::before { display: none; }
  .cancers { columns: 1; }
  .done-facts div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cpg-tumour { animation: none; }
}

/* --- Tracking: sample journey ------------------------------------------- */
.brand-sub { font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.pipeline { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pipeline a { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; background: var(--white); text-decoration: none; height: 100%; }
.pipeline a:hover { background: var(--glass); }
.pipeline a[aria-current] { box-shadow: inset 0 -3px 0 var(--venous); }
.pipeline-n { font-size: var(--step-2); font-weight: 700; line-height: 1; }
.pipeline-l { font-size: var(--step--1); color: var(--ink-soft); }
.kpi-line { margin-bottom: 1.5rem; }
.row-link { text-decoration: none; }
.row-link:hover strong { text-decoration: underline; text-underline-offset: 4px; }

.badge { display: inline-block; font-size: var(--step--1); font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); white-space: nowrap; }
.badge-requested { background: #FBEDEF; border-color: #EBC4CC; color: var(--venous); }
.badge-confirmed { background: var(--plasma-soft); border-color: var(--plasma); }
.badge-drawn, .badge-in_lab, .badge-analysed { background: #E9EEF7; border-color: #C9D3E6; }
.badge-reported { background: var(--ink); border-color: var(--ink); color: var(--white); }
.badge-cancelled { color: var(--ink-soft); text-decoration: line-through; }

.progress { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; counter-reset: step; }
.progress li { counter-increment: step; font-size: var(--step--1); padding: .4rem .75rem .4rem .5rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink-soft); }
.progress li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; margin-right: .4rem; border-radius: 50%; border: 1.5px solid currentColor; font-size: .75rem; font-weight: 700; }
.progress li.is-done { color: var(--ink); }
.progress li.is-done::before { content: "\2713"; background: var(--ink); border-color: var(--ink); color: var(--white); }
.progress li.is-current { background: var(--venous); border-color: var(--venous); color: var(--white); font-weight: 600; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.facts { margin: 0 0 1.5rem; display: grid; gap: .6rem; }
.facts div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.facts dt { color: var(--ink-soft); font-size: var(--step--1); padding-top: .15rem; }
.facts dd { margin: 0; }
.stack { display: grid; gap: 1rem; justify-items: start; }
.stack .field { width: 100%; }
.field textarea { font: inherit; color: var(--ink); padding: .7rem .8rem; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); resize: vertical; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: .75rem 0 .75rem 1.25rem; border-left: 2px solid var(--line); position: relative; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 1.15rem; width: 10px; height: 10px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); }
.timeline li:first-child::before { background: var(--venous); border-color: var(--venous); }
.timeline p { flex-basis: 100%; margin: .25rem 0 0; }

@media (max-width: 960px) {
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .facts div { grid-template-columns: 1fr; gap: .1rem; }
}

/* --- Headline and 50-cancer coverage ---------------------------------------- */
.hero-note { margin: 2rem 0 0; font-size: var(--step--1); color: var(--ink-soft); max-width: 60ch; padding-left: .9rem; border-left: 3px solid var(--plasma); }
.coverage { width: 100%; max-width: 22rem; margin: .5rem 0 1rem; }
.coverage .o { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: .55; }
.coverage .f { fill: var(--venous); }
.coverage-note { font-size: var(--step--1); color: var(--ink-soft); max-width: 40ch; }
.coverage-now { font-size: var(--step-0); margin: 1.5rem 0 .25rem; }
