/* A medical lab's website (site/lab.html). Every chapter is one flat field: the lab's colour (--brand, set at runtime),
   a deep and a pale step of it, and the theme's paper and ink. The theme the lab picked (site/themes/*.css, loaded after
   this file) brings its own paper, ink, faces and corners through the same custom properties. */
:root {
  --brand: #4c6db4;
  --on-brand: #fff;
  --brand-50: color-mix(in oklab, var(--brand) 6%, #fff);
  --brand-100: color-mix(in oklab, var(--brand) 13%, #fff);
  --brand-200: color-mix(in oklab, var(--brand) 28%, #fff);
  --brand-300: color-mix(in oklab, var(--brand) 55%, #fff);
  --brand-600: color-mix(in oklab, var(--brand) 84%, #0b1220);
  --brand-700: color-mix(in oklab, var(--brand) 66%, #0b1220);
  --brand-900: color-mix(in oklab, var(--brand) 34%, #070b14);
  --brand-text: color-mix(in oklab, var(--brand) 82%, #0b1220);
  --ink: #0f1728;
  --ink-2: #3e475c;
  --muted: #5d6680;
  --bg: #f6f7fb;
  --ok: #138a52;
  --bad: #c4362c;
  --r-sm: 12px;
  --font: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --display: var(--font);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* one corner for every control on the page, from the theme (square in «فاخر», round in «عائلي») */
  --lb-r: min(var(--r-sm), 14px);
  --gut: clamp(16px, 2.4vw, 32px);
  /* the five sizes of the page */
  --t-1: clamp(30px, 6.2vw, 100px);
  --t-2: clamp(34px, 4.4vw, 64px);
  --t-3: clamp(21px, 1.8vw, 27px);
  --t-35: 20px;
  --t-4: 17px;
  --t-5: 15px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); font-size: var(--t-4); line-height: 1.55; color: var(--ink); background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); text-wrap: balance; }
h1, h2 { line-height: 1.04; letter-spacing: -.02em; font-weight: 700; }
h3 { line-height: 1.25; font-weight: 600; font-size: var(--t-3); }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--lb-r); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus, color-mix(in oklab, var(--brand) 70%, #fff)); outline-offset: 2px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 0; height: 0; padding: 0; border: 0; opacity: 0; }
html:not([data-bilingual]) [data-lang-switch] { display: none; }
.lb-frame { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gut); }
.lb-muted { color: var(--muted); }
[lang="en"] { font-family: var(--font); }

/* ---------- fields: each chapter is one colour, with its own ink ---------- */
.lb-paper { --f-bg: var(--bg); --f-ink: var(--ink); --f-soft: var(--ink-2); --f-step: color-mix(in oklab, var(--ink) 4.5%, var(--bg)); --btn-bg: var(--brand); --btn-ink: var(--on-brand); }
.lb-tint { --f-bg: var(--brand-100); --f-ink: var(--ink); --f-soft: var(--ink-2); --f-step: color-mix(in oklab, var(--brand) 22%, #fff); --btn-bg: var(--ink); --btn-ink: var(--bg); }
.lb-deep { --f-bg: var(--brand-900); --f-ink: #fff; --f-soft: rgb(255 255 255 / .82); --f-step: color-mix(in oklab, var(--brand-900) 86%, #fff); --btn-bg: #fff; --btn-ink: var(--brand-900); --focus: #fff; }
.lb-ink { --f-bg: var(--ink); --f-ink: var(--bg); --f-soft: color-mix(in oklab, var(--bg) 78%, var(--ink)); --f-step: color-mix(in oklab, var(--ink) 88%, var(--bg)); --btn-bg: var(--bg); --btn-ink: var(--ink); --focus: var(--bg); }
.lb-ch { background: var(--f-bg); color: var(--f-ink); padding-block: clamp(64px, 8.5vw, 128px); overflow-x: clip; }
.lb-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 34em); align-items: end; gap: 20px 48px; margin-bottom: clamp(36px, 4.5vw, 64px); }
@media (max-width: 900px) { .lb-head { grid-template-columns: minmax(0, 1fr); } }
.lb-head h2, .lb-split h2 { font-size: var(--t-2); }
.lb-head-note { color: var(--f-ink); max-width: 34em; }
.lb-say { font-size: var(--t-3); line-height: 1.45; color: var(--f-ink); max-width: 26em; margin-top: 24px; font-weight: 400; }

/* ---------- buttons and fields ---------- */
.lb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--lb-r);
  font-weight: 600; font-size: var(--t-4); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .18s var(--ease), background-color .18s, color .18s; }
.lb-btn:active { transform: translateY(1px) scale(.99); }
.lb-btn-solid { background: var(--btn-bg); color: var(--btn-ink); }
.lb-btn-solid:hover { background: color-mix(in oklab, var(--btn-bg) 86%, var(--f-ink)); }
.lb-btn-line { background: var(--f-step); color: var(--f-ink); }
.lb-btn-line:hover { background: var(--f-ink); color: var(--f-bg); }
.lb-btn-ink { background: var(--ink); color: #fff; }
.lb-btn-ink:hover { background: color-mix(in oklab, var(--ink) 80%, var(--brand)); }
.lb-btn[disabled] { opacity: .6; cursor: progress; }
.lb-field { display: grid; gap: 6px; font-size: var(--t-5); color: var(--f-soft); }
.lb-field small { font-size: inherit; opacity: .8; }
.lb-field input, .lb-field select, .lb-field textarea { width: 100%; min-height: 52px; padding: 12px 16px; border: 0; border-radius: var(--lb-r); background: #fff; color: var(--ink);
  font-size: var(--t-4); outline: 2px solid transparent; outline-offset: 0; transition: outline-color .15s; }
.lb-field textarea { min-height: 76px; resize: vertical; }
.lb-field input:focus, .lb-field select:focus, .lb-field textarea:focus { outline-color: var(--brand); }
.lb-field input[aria-invalid="true"] { outline-color: var(--bad); }
.lb-paper .lb-field input, .lb-paper .lb-field select { background: #fff; }
.lb-err { min-height: 1.4em; color: var(--bad); font-size: var(--t-5); font-weight: 500; }
.lb-deep .lb-err, .lb-ink .lb-err { color: #ffd2cc; }
.lb-note { font-size: var(--t-4); color: var(--f-ink); }
.lb-note:empty { display: none; }

/* ---------- header: takes the colour of the chapter under it ---------- */
.lb-top { position: sticky; top: 0; z-index: 30; --h-bg: var(--brand); --h-ink: var(--on-brand); background: var(--h-bg); color: var(--h-ink); transition: background-color .3s, color .3s; }
.lb-top[data-on="paper"] { --h-bg: var(--bg); --h-ink: var(--ink); }
.lb-top[data-on="deep"] { --h-bg: var(--brand-900); --h-ink: #fff; }
.lb-top[data-on="tint"] { --h-bg: var(--brand-100); --h-ink: var(--ink); }
.lb-top[data-on="ink"] { --h-bg: var(--ink); --h-ink: var(--bg); }
.lb-top-in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.lb-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-family: var(--display); font-size: var(--t-35); min-width: 0; margin-inline-end: auto; }
.lb-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-brand img { width: 36px; height: 36px; object-fit: cover; border-radius: var(--lb-r); background: #fff; flex: none; }
.lb-nav { display: flex; gap: 6px; }
.lb-nav a, .lb-lang { text-decoration: none; padding: 8px 12px; border-radius: var(--lb-r); font-size: var(--t-4); transition: background-color .15s; }
.lb-nav a:hover, .lb-lang:hover { background: color-mix(in oklab, var(--h-ink) 12%, transparent); }
.lb-btn-top { min-height: 44px; padding: 0 20px; font-size: var(--t-4); background: var(--h-ink); color: var(--h-bg); }
.lb-btn-top:hover { background: color-mix(in oklab, var(--h-ink) 85%, var(--h-bg)); }
@media (max-width: 1080px) { .lb-nav { display: none; } }
@media (max-width: 520px) { .lb-top-in { gap: 10px; min-height: 60px; } .lb-brand { font-size: var(--t-4); } .lb-btn-top { padding: 0 14px; font-size: var(--t-5); } .lb-lang { padding: 8px 6px; font-size: var(--t-5); } }

/* ---------- hero: the panel in the lab's colour, the chapters beside it ---------- */
.lb-hero { background: var(--bg); padding-block: 10px var(--gut); }
.lb-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(220px, 1fr); min-height: calc(100svh - 68px - 10px - var(--gut)); }
.lb-panel { --f-bg: var(--brand); --f-ink: var(--on-brand); background: var(--brand); color: var(--on-brand); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-areas: 'top top' 'bot rack'; grid-template-rows: auto 1fr; gap: 40px 56px;
  padding: clamp(32px, 4.4vw, 72px); align-items: end; border-start-start-radius: var(--lb-r); border-end-start-radius: var(--lb-r); }
.lb-panel-copy { display: contents; }
.lb-copy-top { grid-area: top; }
.lb-copy-bot { grid-area: bot; align-self: end; min-width: 0; }
.lb-rack { grid-area: rack; }
.lb-title { font-size: var(--t-1); letter-spacing: -.03em; line-height: 1; overflow-wrap: anywhere; max-width: 16ch; }
.lb-lead { font-size: var(--t-3); line-height: 1.4; max-width: 24em; font-weight: 400; }
.lb-status { display: flex; align-items: center; gap: 10px; font-size: var(--t-4); font-weight: 500; margin-top: 20px; }
.lb-status i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: .55; }
.lb-status.open i { background: #3ddc84; opacity: 1; }
.lb-find { display: flex; gap: 8px; margin-top: 40px; max-width: 640px; background: #fff; padding: 6px; border-radius: calc(var(--lb-r) + 4px); }
.lb-find input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font-size: var(--t-4); padding: 0 14px; min-height: 52px; }
.lb-find input:focus { outline: none; }
.lb-find:focus-within { outline: 3px solid color-mix(in oklab, var(--on-brand) 55%, transparent); outline-offset: 2px; }
.lb-hits { max-width: 640px; }
.lb-hits:not(:empty) { margin-top: 8px; background: #fff; color: var(--ink); border-radius: calc(var(--lb-r) + 4px); padding: 6px; }
.lb-hit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 14px; border-radius: var(--lb-r); text-decoration: none; }
.lb-hit:hover, .lb-hit:focus-visible { background: var(--brand-50); }
.lb-hit b { font-weight: 600; }
.lb-hit small { grid-column: 1 / -1; color: var(--muted); font-size: var(--t-5); }
.lb-hit em { font-style: normal; font-size: var(--t-5); color: var(--brand-text); align-self: center; }
.lb-hit-all { display: block; padding: 10px 14px; font-weight: 600; color: var(--brand-text); text-decoration: none; border-radius: var(--lb-r); }
.lb-hit-all:hover { background: var(--brand-50); }

/* the tube rack: one tube per kind the catalogue uses, its cap in its real colour */
.lb-rack { align-self: end; }
.lb-rack-row { display: flex; align-items: flex-end; justify-content: space-between; gap: clamp(6px, 1vw, 16px); min-height: 280px; }
.lb-tube { --cap: #888; --fill: #8d1b2a; display: grid; justify-items: center; gap: 10px; background: none; border: 0; padding: 6px 2px; color: inherit; cursor: pointer; border-radius: var(--lb-r); flex: 0 1 64px; min-width: 0; }
.lb-tube-glass { position: relative; width: clamp(30px, 3vw, 46px); height: var(--h, 200px); transition: transform .25s var(--ease); }
.lb-tube-cap { position: absolute; inset: 0 -4px auto; height: 26px; background: var(--cap); border-radius: 5px 5px 2px 2px; }
.lb-tube-body { position: absolute; inset: 22px 0 0; background: rgb(255 255 255 / .22); border-radius: 0 0 999px 999px; overflow: hidden; }
.lb-tube-body::after { content: ''; position: absolute; inset: auto 0 0; height: 58%; background: var(--fill); }
.lb-tube[data-sample="urine"] { --fill: #f0c540; } .lb-tube[data-sample="stool"] { --fill: #8a5a2b; } .lb-tube[data-sample="swab"] { --fill: rgb(255 255 255 / .55); }
.lb-tube[data-sample="swab"] .lb-tube-body::after { inset: 18% calc(50% - 3px) 0; height: auto; border-radius: 3px; }
.lb-tube b { font-size: var(--t-5); font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap; }
.lb-tube small { font-size: var(--t-5); opacity: .85; margin-top: -8px; font-variant-numeric: tabular-nums; }
.lb-tube:hover .lb-tube-glass, .lb-tube:focus-visible .lb-tube-glass { transform: translateY(-8px); }
.lb-rack figcaption { margin-top: 18px; font-size: var(--t-5); max-width: 30em; opacity: .9; }

.lb-swatches { display: grid; grid-auto-rows: 1fr; }
.sw { display: flex; flex-direction: column; gap: 4px; padding: 22px 22px; text-decoration: none; min-height: 96px; transition: padding .25s var(--ease); }
.sw b { font-size: var(--t-35); font-weight: 600; font-family: var(--display); }
.sw small { font-size: var(--t-5); opacity: .85; }
.sw:hover { padding-inline-start: 30px; }
.sw-paper { background: color-mix(in oklab, var(--ink) 6%, var(--bg)); color: var(--ink); }
.sw-deep { background: var(--brand-900); color: #fff; }
.sw-tint { background: var(--brand-100); color: var(--ink); }
.sw-ink { background: var(--ink); color: var(--bg); border-end-end-radius: var(--lb-r); }
.lb-swatches .sw:first-child { border-start-end-radius: var(--lb-r); }

@media (max-width: 1080px) {
  .lb-hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .lb-panel { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'top' 'bot' 'rack'; grid-template-rows: auto; border-radius: var(--lb-r) var(--lb-r) 0 0; padding-top: 48px; min-height: 72svh; }
  .lb-swatches { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .sw { min-height: 76px; padding: 16px; }
  .lb-swatches .sw:first-child { border-radius: 0; }
  .sw-ink { border-radius: 0 0 var(--lb-r) var(--lb-r); }
  .lb-swatches:has(.sw-tint[hidden]) .sw-ink { grid-column: 1 / -1; }
  .lb-rack-row { min-height: 0; overflow: visible; flex-wrap: wrap; gap: 4px 10px; }
  .lb-tube { flex: 0 0 auto; padding: 4px 0; }
  .lb-tube-glass { --h: 112px !important; width: 26px; }
  .lb-tube b { font-size: var(--t-5); }
}
@media (max-width: 560px) {
  .lb-hero { padding-top: 8px; }
  .lb-panel { padding: 36px 20px 28px; gap: 28px; }
  .lb-title { font-size: clamp(30px, 9vw, 52px); }
  .lb-status { margin-top: 16px; }
  .lb-find { margin-top: 24px; }
  .lb-find .lb-btn { padding: 0 16px; }
  /* the rack in rows of four, so no tube is left alone on a line */
  .lb-rack-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 18px 6px; }
  .lb-tube-glass { --h: 96px !important; }
  .lb-swatches { grid-template-columns: 1fr; }
  .sw { flex-direction: row; justify-content: space-between; align-items: baseline; min-height: 58px; padding: 16px 20px; }
  .sw small { text-align: end; }
}

/* ---------- catalogue ---------- */
.lb-cat { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 4vw, 72px); align-items: start; }
.lb-filters { position: sticky; top: 92px; display: grid; gap: 24px; }
.lb-search input { background: #fff; }
.lb-secs { display: grid; }
.lb-sec { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 14px; margin-inline: -14px; background: none; border: 0; border-radius: var(--lb-r);
  font-size: var(--t-3); font-family: var(--display); font-weight: 500; text-align: start; cursor: pointer; color: var(--f-ink); transition: background-color .15s, color .15s; }
.lb-sec small { font-family: var(--font); font-size: var(--t-5); color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-sec:hover { background: var(--f-step); }
.lb-sec[aria-pressed="true"] { color: var(--brand-text); font-weight: 700; }
.lb-sec[aria-pressed="true"] small { color: var(--brand-text); }
.lb-filter-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; font-size: var(--t-4); color: var(--ink-2); }
.lb-filter-line button { display: inline-flex; align-items: center; gap: 8px; background: var(--f-step); border: 0; border-radius: var(--lb-r); padding: 6px 12px; cursor: pointer; font-size: var(--t-5); }
.lb-filter-line svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.lb-filter-line button:hover { background: color-mix(in oklab, var(--ink) 10%, var(--bg)); }
.lb-list { display: grid; }
.lb-test { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 32px; padding: 22px 20px; border-radius: var(--lb-r); }
.lb-test:nth-child(odd) { background: var(--f-step); }
.lb-t-name h3 { font-size: var(--t-35); font-family: var(--font); font-weight: 600; }
.lb-t-en { display: block; color: var(--muted); font-size: var(--t-5); margin-top: 2px; }
.lb-t-mem { margin-top: 8px; font-size: var(--t-4); color: var(--ink-2); max-width: 60ch; }
.lb-t-facts { display: flex; gap: 22px; align-items: flex-start; text-align: start; }
.lb-t-facts div { display: grid; gap: 2px; min-width: 64px; }
.lb-t-facts dt { font-size: var(--t-5); color: var(--muted); }
.lb-t-facts dd { font-size: var(--t-4); font-weight: 500; display: flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-dot { width: 12px; height: 12px; border-radius: 3px 3px 6px 6px; background: var(--c); flex: none; }
.lb-t-prep { grid-column: 1 / -1; font-size: var(--t-4); color: var(--ink); background: color-mix(in oklab, var(--brand) 12%, #fff); padding: 10px 14px; border-radius: var(--lb-r); justify-self: start; }
.lb-t-prep b { font-weight: 600; }
.lb-add { grid-column: 1 / -1; justify-self: start; background: none; border: 0; padding: 4px 0; color: var(--brand-text); font-weight: 600; font-size: var(--t-5); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.lb-add[aria-pressed="true"] { color: var(--ok); text-decoration: none; }
.lb-more { margin-top: 28px; }
.lb-empty { padding: 28px 20px; background: var(--f-step); border-radius: var(--lb-r); }
@media (max-width: 900px) {
  .lb-cat { grid-template-columns: minmax(0, 1fr); }
  .lb-filters { position: static; }
  .lb-secs { display: flex; flex-wrap: wrap; gap: 8px; }
  .lb-sec { margin: 0; font-size: var(--t-4); padding: 8px 14px; background: var(--f-step); gap: 8px; }
  .lb-sec[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
  .lb-sec[aria-pressed="true"] small { color: inherit; }
}
@media (max-width: 640px) {
  .lb-test { grid-template-columns: 1fr; padding: 18px 16px; margin-inline: -16px; border-radius: 0; }
  .lb-t-facts { flex-wrap: wrap; gap: 12px 22px; }
}

/* ---------- result and home: split chapters ---------- */
.lb-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
.lb-form { display: grid; gap: 18px; background: var(--f-step); padding: clamp(24px, 3vw, 40px); border-radius: var(--lb-r); }
.lb-form h3 { font-size: var(--t-3); }
.lb-form-say { color: var(--f-soft); font-size: var(--t-4); margin-top: -8px; }
.lb-form-alt { margin-top: 24px; background: transparent; }
.lb-form .lb-btn { justify-self: start; }
.lb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lb-parts { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lb-parts legend { font-size: var(--t-5); color: var(--f-soft); margin-bottom: 6px; padding: 0; }
.lb-parts label { position: relative; }
.lb-parts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.lb-parts span { display: inline-flex; min-height: 46px; align-items: center; padding: 0 18px; background: #fff; color: var(--ink); border-radius: var(--lb-r); font-size: var(--t-4); transition: background-color .15s, color .15s; }
.lb-parts input:checked + span { background: var(--ink); color: var(--bg); }
.lb-parts input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.lb-consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-5); color: var(--f-soft); }
.lb-consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.lb-consent a { color: inherit; font-weight: 600; }

/* the slip, drawn: where the order number and the code are printed */
.lb-slip { margin-top: clamp(40px, 5vw, 72px); max-width: 440px; }
.lb-slip-paper { background: #fff; color: #0e1a33; padding: 24px 26px 26px; border-radius: 4px; transform: rotate(-1.6deg); transition: transform .4s var(--ease); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.lb-slip:hover .lb-slip-paper { transform: rotate(0deg); }
.lb-slip-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; background: #0e1a33; color: #fff; margin: -24px -26px 4px; padding: 14px 26px; border-radius: 4px 4px 0 0; }
.lb-slip-top b { font-size: var(--t-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.lb-slip-top span { font-size: var(--t-5); color: #c9d1e4; white-space: nowrap; }
.lb-slip-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: var(--t-5); color: #4a5672; }
.lb-slip-row b { color: #0e1a33; font-weight: 500; }
.lb-slip-mark { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; background: #fff2a8; padding: 10px 12px; border-radius: 3px; }
.lb-slip-mark span { font-size: var(--t-5); font-weight: 600; }
.lb-slip-mark b { font-size: var(--t-35); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.lb-slip figcaption { margin-top: 18px; font-size: var(--t-5); color: var(--f-soft); }

.lb-home-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 5vw, 96px); align-items: start; }
.lb-home-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(40px, 5vw, 96px); align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.lb-home-head .lb-say { margin-top: 20px; }
.lb-home-head h2 { font-size: var(--t-2); }
.lb-facts { display: grid; gap: 4px; }
.lb-facts div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 14px 0; }
.lb-facts dt { color: var(--f-soft); font-size: var(--t-4); }
.lb-facts dd { font-weight: 600; }
.lb-picked { margin-top: 8px; }
.lb-picked h3 { margin-bottom: 12px; }
.lb-picked ul { display: grid; gap: 6px; }
.lb-picked li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; padding: 10px 14px; border-radius: var(--lb-r); }
.lb-picked li button { background: none; border: 0; color: var(--bad); cursor: pointer; font-size: var(--t-5); padding: 4px 6px; }
@media (max-width: 900px) {
  .lb-split, .lb-home-grid, .lb-home-head { grid-template-columns: minmax(0, 1fr); }
  .lb-slip { margin-top: 36px; }
}
@media (max-width: 560px) { .lb-path .lb-step { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .lb-slip { padding-inline: 6px; } .lb-slip-paper { padding: 18px; transform: rotate(-1deg); } .lb-slip-top { margin: -18px -18px 4px; padding: 12px 18px; } .lb-slip-mark b { font-size: var(--t-35); }
  .lb-two { grid-template-columns: 1fr; } .lb-form { padding: 22px 18px; margin-inline: -4px; } .lb-facts div { grid-template-columns: 1fr; gap: 2px; padding: 10px 0; } }

/* ---------- from the sample to the result: three fields, dark to light ---------- */
.lb-path { display: grid; grid-template-columns: repeat(3, 1fr); }
.lb-step { min-height: clamp(260px, 24vw, 360px); padding: clamp(28px, 3vw, 48px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.lb-step h3 { font-size: var(--t-2); font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.lb-step p { max-width: 30ch; }
.lb-step.s1 { background: var(--brand-900); color: #fff; border-start-start-radius: var(--lb-r); border-end-start-radius: var(--lb-r); }
.lb-step.s2 { background: var(--brand-700); color: #fff; }
.lb-step.s3 { background: var(--brand-200); color: var(--ink); border-start-end-radius: var(--lb-r); border-end-end-radius: var(--lb-r); }
@media (max-width: 900px) {
  .lb-path { grid-template-columns: 1fr; }
  .lb-step { min-height: 0; gap: 18px 40px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: end; }
  .lb-step p { max-width: none; }
  .lb-step.s1 { border-radius: var(--lb-r) var(--lb-r) 0 0; } .lb-step.s3 { border-radius: 0 0 var(--lb-r) var(--lb-r); }
}

/* ---------- about: the lab's own words, its team and photographs ---------- */
.lb-about-ch { padding-top: 0; }
.lb-inset { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 96px); background: var(--brand-50); padding: clamp(32px, 5vw, 80px); border-radius: var(--lb-r); }
.lb-inset h2 { font-size: var(--t-2); margin-bottom: 28px; }
.lb-about { display: grid; gap: 16px; max-width: 38em; font-size: var(--t-4); }
.lb-about p:first-child { font-size: var(--t-3); line-height: 1.45; }
.lb-inset-b { display: grid; gap: 24px; align-content: start; }
.lb-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--lb-r); }
.lb-team ul { display: grid; gap: 2px; margin-top: 12px; }
.lb-team li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
.lb-team li b { font-weight: 600; }
.lb-team li span { color: var(--ink-2); }
@media (max-width: 900px) { .lb-inset { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .lb-inset { padding: 28px 20px; margin-inline: -6px; } }

/* ---------- visit: address, today's hours, phone and WhatsApp as large rows ---------- */
.lb-rows { display: grid; }
.lb-rows li:nth-child(odd) { background: var(--f-step); }
.lb-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; align-items: baseline; gap: 12px 32px; padding: clamp(18px, 2.2vw, 30px) clamp(16px, 2vw, 28px); text-decoration: none; border-radius: var(--lb-r); }
.lb-row small { font-size: var(--t-4); color: var(--f-soft); }
.lb-row b { font-size: var(--t-2); font-weight: 500; font-family: var(--display); line-height: 1.1; letter-spacing: -.015em; overflow-wrap: anywhere; }
.lb-row .go { font-size: var(--t-3); transition: transform .2s var(--ease); }
a.lb-row:hover .go { transform: translateX(-8px); }
html[dir="ltr"] a.lb-row:hover .go { transform: translateX(8px); }
.lb-row .lb-open { font-size: var(--t-4); font-weight: 600; color: #7ff0b0; margin-inline-start: 12px; font-family: var(--font); letter-spacing: 0; white-space: nowrap; }
.lb-visit-more { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); margin-top: clamp(48px, 6vw, 96px); align-items: start; }
.lb-week { width: 100%; border-collapse: collapse; font-size: var(--t-4); }
.lb-week th, .lb-week td { padding: 10px 0; text-align: start; font-weight: 400; }
.lb-week td { text-align: end; font-variant-numeric: tabular-nums; }
.lb-week tr.today th, .lb-week tr.today td { font-weight: 700; }
.lb-week tr.closed td { color: var(--f-soft); }
.lb-map iframe { width: 100%; height: 340px; border: 0; border-radius: var(--lb-r); display: block; filter: grayscale(.3); }
.lb-map a { display: inline-block; margin-top: 12px; font-weight: 600; }
@media (max-width: 900px) { .lb-row { grid-template-columns: 5.5em minmax(0, 1fr) auto; } .lb-visit-more { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .lb-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lb-row small { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .lb-row { margin-inline: -16px; border-radius: 0; padding-inline: 16px; } .lb-row b { font-size: clamp(26px, 7.6vw, 34px); } }

/* ---------- questions: a band each ---------- */
.lb-band { padding-block: clamp(36px, 4vw, 60px); background: var(--bg); color: var(--ink); }
.lb-band:nth-child(odd) { background: color-mix(in oklab, var(--ink) 4.5%, var(--bg)); }
.lb-band-head { background: var(--brand-100) !important; padding-block: clamp(64px, 8vw, 128px) clamp(28px, 3vw, 44px); }
.lb-band-head h2 { font-size: var(--t-2); }
.lb-qa { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(32px, 5vw, 96px); }
.lb-qa p { max-width: 40em; }
@media (max-width: 900px) { .lb-qa { grid-template-columns: 1fr; } }

/* ---------- footer: the name, then the ways to reach the lab ---------- */
.lb-foot { background: var(--brand); color: var(--on-brand); padding-block: clamp(72px, 9vw, 140px) 40px; overflow: hidden; }
.lb-foot-name { font-family: var(--display); font-weight: 700; font-size: var(--t-1); line-height: 1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.lb-foot-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 32px; margin-top: clamp(48px, 6vw, 96px); align-items: start; }
.lb-foot-reach { display: grid; gap: 8px; }
.lb-foot-reach a { font-size: var(--t-3); text-decoration: none; font-weight: 500; }
.lb-foot-reach a:hover { text-decoration: underline; text-underline-offset: 6px; }
.lb-foot-links { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: flex-end; font-size: var(--t-4); }
.lb-foot-links a { text-decoration: none; }
.lb-foot-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.lb-legal { margin-top: 64px; font-size: var(--t-5); opacity: .85; }
@media (max-width: 700px) { .lb-foot-row { grid-template-columns: 1fr; } .lb-foot-links { justify-content: flex-start; } }

/* ---------- entrances: parts of each chapter rise in turn, once ---------- */
html.js [data-rv] { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
html.js [data-rv].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html.js [data-rv] { opacity: 1; transform: none; }
}

/* ---------- themes: the same chapters in each theme's own voice ---------- */
html[data-theme="luxe"] { --lb-r: 2px; }
html[data-theme="luxe"] h1, html[data-theme="luxe"] h2, html[data-theme="luxe"] .lb-step h3, html[data-theme="luxe"] .lb-foot-name, html[data-theme="luxe"] .lb-row b { font-weight: 400; letter-spacing: 0; }
html[data-theme="luxe"] .lb-panel, html[data-theme="luxe"] .lb-foot { background: var(--night, #15110e); color: var(--ivory, #f5efe7); --on-brand: var(--ivory, #f5efe7); }
html[data-theme="luxe"] .lb-top:not([data-on]) { --h-bg: var(--night, #15110e); --h-ink: var(--ivory, #f5efe7); }
html[data-theme="luxe"] .lb-step.s1, html[data-theme="luxe"] .sw-deep, html[data-theme="luxe"] .lb-deep { background: color-mix(in oklab, var(--brand) 30%, #15110e); }
html[data-theme="family"] h1, html[data-theme="family"] h2 { letter-spacing: 0; font-weight: 800; }
html[data-theme="family"] .lb-btn { font-family: var(--display); font-weight: 700; }
html[data-theme="modern"] h1, html[data-theme="modern"] h2 { letter-spacing: -.03em; }
