/* The tokens of "the valley" (docs/landing-v2-direction.md): the one source of colour, type, shape, motion and
   paper for the home page, the booking page and the consultation form. A component never sets a value of its own.
   home.css, global.css and the booking sheets import this file. */

:root {
  --vl-paper: #f4f1e8;
  --vl-paper-2: #eae6d9;
  --vl-ink: #17231c;
  --vl-ink-2: #46544b;
  --vl-line: rgba(23, 35, 28, 0.14);
  --vl-green: #144230;
  --vl-green-hover: #0e3424;
  --vl-field: #3f6b45;
  --vl-sky: #cfcfc9;
  --vl-gorse: #d89c1e;
  --vl-night: #10201a;
  /* the ground under the phone scene, between its darker left and lighter right edge */
  --vl-ground: #222b20;
  --vl-on-dark: #f4f1e8;
  --vl-on-dark-2: #c9cdc3;
  --vl-error: #a3341f;

  --vl-display: 'Jost Variable', 'Jost', ui-sans-serif, system-ui, sans-serif;
  --vl-text: 'Onest Variable', 'Onest', ui-sans-serif, system-ui, sans-serif;

  --vl-r: 16px;
  --vl-r-in: 8px;
  --vl-r-btn: 14px;
  --vl-arch: 999px 999px 16px 16px;
  --vl-shadow: 0 0 0 1px rgba(23, 35, 28, 0.06), 0 1px 2px rgba(23, 35, 28, 0.08), 0 8px 24px rgba(23, 35, 28, 0.08);
  --vl-ease: cubic-bezier(0.2, 0, 0, 1);
  /* paper: a real sheet's grain, grey around 128, laid over the colour in soft-light, so the colour stays and
     only the relief shows. Cards, photos, drawings and the scene stay smooth. Until it loads the colour alone shows. */
  --vl-tex: url('/v2/paper.webp');
  --vl-tex-dark: url('/v2/paper-soft.webp');
  --vl-tex-size: 256px 256px;

  --vl-gutter: 16px;
  --vl-max: 1280px;
  --vl-sec: 64px;
  /* text 17, secondary 15, captions 13 on a phone; 18 / 16 / 14 on a desktop */
  --vl-fs: 17px;
  --vl-fs-2: 15px;
  --vl-fs-3: 13px;
  --vl-head-h: 64px;
  --vl-bar-h: 64px;
}
@media (min-width: 600px) {
  :root { --vl-gutter: 24px; --vl-sec: 96px; }
}
@media (min-width: 1024px) {
  :root { --vl-gutter: 56px; --vl-sec: 104px; --vl-head-h: 72px; --vl-fs: 18px; --vl-fs-2: 16px; --vl-fs-3: 14px; }
}

/* What the forms (booking, consultation) add to the valley. The home page does not use these.
   Contrast by the WCAG formula, against the paper #f4f1e8 and the field white #fff (docs/design-direction.md). */
:root {
  /* a control's own ground: fields, options, days, times sit white on the paper card, as on the home form */
  --vl-field-bg: #fff;
  /* the boundary of every control: 3.91:1 on paper, 4.42:1 on white, 3.60:1 on the green tint (>= 3:1) */
  --vl-edge: #707b70;
  /* a chosen answer, the current step: green ink 9.24:1, ink 13.22:1, secondary ink 6.50:1 on it */
  --vl-green-tint: #e3eadf;
  /* an error box: the error colour 5.66:1, ink 13.43:1 on it */
  --vl-error-bg: #f8e6df;
  /* a quiet note in the colour of the gorse: ink 13.13:1, secondary ink 6.46:1 on it */
  --vl-note-bg: #f5e6c2;
  /* status of a booking, in the same gamut: text 6.60 / 5.93 / 6.06 :1 on paper */
  --vl-ok: #2f5f3a;
  --vl-wait: #7a5510;
  /* a quiet hover behind a link or a row */
  --vl-hover: rgba(23, 35, 28, 0.06);
  /* fields and small buttons (the home form's 12px) */
  --vl-r-field: 12px;
  /* the focus ring: 3px, green on paper and white, gorse on the dark */
  --vl-focus: 3px;
}
/* ===== the valley desk: prefix .cv-, data-cv-* ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background-color: var(--vl-paper-2); }
body.cv-page {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--vl-paper-2);
  background-image: var(--vl-tex);
  background-size: var(--vl-tex-size);
  background-blend-mode: soft-light;
  color: var(--vl-ink);
  font: 400 var(--vl-fs)/1.55 var(--vl-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
.cv-page :where(h1, h2, h3, p, ul, ol, dl, dd, figure) { margin: 0; }
.cv-page :where(ul, ol) { padding: 0; list-style: none; }
.cv-page img { display: block; max-width: 100%; height: auto; }
.cv-page :where(button, input, select, textarea) { font: inherit; color: inherit; }
.cv-page [hidden] { display: none !important; }
.cv-num { font-variant-numeric: tabular-nums; }
.cv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cv-page :where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--vl-green); outline-offset: 3px; }
.cv-side :where(a, button):focus-visible, .cv-tab :where(a, button):focus-visible { outline-color: var(--vl-gorse); }
.cv-only-wide { display: none; }
@media (min-width: 1024px) { .cv-only-wide { display: block; } .cv-only-narrow { display: none; } }

/* ----- the frame: a green band of the site's dark green with a brush edge (an image), the work on paper ----- */
.cv-side { display: none; }
.cv-main {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(var(--vl-bar-h) + 64px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
@media (min-width: 1024px) {
  .cv-app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100dvh; }
  .cv-side {
    display: block;
    position: relative;
    z-index: 5;
    background-color: var(--vl-green);
    background-image: var(--vl-tex-dark);
    background-size: var(--vl-tex-size);
    background-blend-mode: soft-light;
    color: var(--vl-on-dark);
  }
  /* the edge of the band: the site's brush edge (edge-1) turned on its side, painted in the band's green */
  .cv-side::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: 22px;
    pointer-events: none;
    background-color: var(--vl-green);
    background-image: var(--vl-tex-dark);
    background-size: var(--vl-tex-size);
    background-blend-mode: soft-light;
    -webkit-mask: url('/assets/edge-v-DKLedtHl.webp') repeat-y 0 37% / 100% auto;
    mask: url('/assets/edge-v-DKLedtHl.webp') repeat-y 0 37% / 100% auto;
  }
  .cv-main { padding: 48px 56px 96px 80px; }
}
.cv-side-in { position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; padding: 28px 20px 28px 24px; }
.cv-brand { display: flex; align-items: center; gap: 12px; padding: 0 0 0 4px; }
.cv-brand img { width: 48px; }
.cv-brand b { display: block; font: 600 20px/1.1 var(--vl-display); letter-spacing: -0.01em; color: var(--vl-on-dark); }
.cv-brand span { display: block; margin-top: 2px; font: 400 14px/1.2 var(--vl-text); color: var(--vl-on-dark-2); }
.cv-side nav { margin-top: 36px; }
.cv-ngroup + .cv-ngroup { margin-top: 22px; }
.cv-ngroup-label { margin: 0 0 4px 12px; font: 500 13px/1.3 var(--vl-text); letter-spacing: 0.02em; color: var(--vl-on-dark-2); }
.cv-side nav button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--vl-r-in);
  background-color: transparent;
  color: var(--vl-on-dark-2);
  font: 500 16px/1.2 var(--vl-text);
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms var(--vl-ease), color 150ms var(--vl-ease);
}
.cv-side nav button:hover { background-color: color-mix(in srgb, var(--vl-on-dark) 10%, transparent); color: var(--vl-on-dark); }
/* where you are: the word in full white, and the site's yellow gouache stroke under it (an image) */
.cv-side nav [aria-current='page'], .cv-tab [aria-current='page'] { color: var(--vl-on-dark); font-weight: 600; }
.cv-side nav [aria-current='page'] span, .cv-tab [aria-current='page'] span {
  padding-bottom: 0.3em;
  background: url('/v2/stroke-yellow-thin-600.webp') no-repeat 0 100% / 100% 0.42em;
}

/* the phone: a green bar at the foot with the site's brush edge on top; no fixed header, so Telegram's own bar
   and the phone's notch have the top to themselves */
.cv-tab {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px max(4px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
  background-color: var(--vl-green);
  background-image: var(--vl-tex-dark);
  background-size: var(--vl-tex-size);
  background-blend-mode: soft-light;
}
.cv-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 18px;
  pointer-events: none;
  background-color: var(--vl-green);
  background-image: var(--vl-tex-dark);
  background-size: var(--vl-tex-size);
  background-blend-mode: soft-light;
  -webkit-mask: url('/v2/edge-1.webp') repeat-x 30% 100% / auto 100%;
  mask: url('/v2/edge-1.webp') repeat-x 30% 100% / auto 100%;
}
.cv-tab button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 52px;
  padding: 0 2px;
  border: 0;
  background-color: transparent;
  color: var(--vl-on-dark-2);
  font: 500 13px/1.2 var(--vl-text);
  cursor: pointer;
}
@media (min-width: 1024px) { .cv-tab { display: none; } }
body.cv-is-login .cv-side, body.cv-is-login .cv-tab { display: none; }
body.cv-is-login .cv-app { display: block; }
body.cv-is-login .cv-main { max-width: none; padding: 0; }

/* ----- the head of a screen: the title with one word on the site's yellow stroke, a line of what matters, one
   main action, and one of Sasha's drawings ----- */
.cv-head { display: grid; grid-template-columns: minmax(0, 1fr) 96px; column-gap: 16px; row-gap: 18px; align-items: end; }
.cv-head h1 { font: 600 30px/1.1 var(--vl-display); letter-spacing: -0.015em; text-wrap: balance; }
.cv-lead { margin-top: 10px; max-width: 40em; color: var(--vl-ink-2); font-size: var(--vl-fs); text-wrap: pretty; }
.cv-head-pic { width: 96px; }
.cv-head-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
.cv-head-act .cv-btn { flex: 1 1 auto; }
.cv-stroke {
  padding-inline: 0.1em;
  margin-inline: -0.1em;
  background: url('/v2/stroke-yellow-thin-600.webp') no-repeat 0 1.09em / 100% 0.3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (min-width: 1024px) {
  .cv-head { grid-template-columns: minmax(0, 1fr) 210px; column-gap: 40px; row-gap: 24px; }
  .cv-head h1 { font-size: 44px; line-height: 1.05; letter-spacing: -0.02em; }
  .cv-head-pic { grid-column: 2; grid-row: 1 / span 2; width: 210px; align-self: end; }
  .cv-head-act { grid-column: 1; }
  .cv-head-act .cv-btn { flex: none; }
}
.cv-back { margin-bottom: 12px; }

/* ----- a block: it opens with a green hand-drawn line (an image), then its name and what it is for; on a desktop
   the name stands in a left column beside its cards, as the site's session groups do ----- */
.cv-blk { margin-top: 36px; }
.cv-line { height: 14px; margin-bottom: 18px; background: url('/assets/line-green-1-Ir0reFZj.webp') no-repeat 0 50% / 100% 100%; }
.cv-blk:nth-of-type(even) > .cv-line { background-image: url('/assets/line-green-2-CXGQ9rqQ.webp'); }
.cv-blk-head h2 { font: 600 22px/1.2 var(--vl-display); letter-spacing: -0.01em; }
.cv-n { margin-left: 6px; color: var(--vl-ink-2); font-weight: 500; }
.cv-blk-hint { margin-top: 6px; max-width: 34em; color: var(--vl-ink-2); font-size: 15px; line-height: 1.45; }
.cv-blk .cv-blk-pic { display: none; }
.cv-blk-body { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; margin-top: 16px; min-width: 0; }
@media (min-width: 1024px) {
  .cv-blk { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; column-gap: 40px; margin-top: 48px; }
  .cv-line { grid-column: 1 / -1; height: 16px; margin-bottom: 24px; }
  .cv-blk-head h2 { font-size: 26px; }
  .cv-blk-body { margin-top: 0; }
  .cv-blk .cv-blk-pic { display: block; width: 176px; margin: 20px 0 0 -8px; }
  .cv-blk.is-wide { grid-template-columns: minmax(0, 1fr); }
  .cv-blk.is-wide .cv-blk-body { margin-top: 20px; }
}

/* ----- a card: clean paper, no grain, its edge cut by the site's brush mask as a nine-slice border, so the
   fringe is one width on a card of any size. Firefox has no mask-box-image: it gets the mask stretched. ----- */
.cv-card { --cv-mask: url('/v2/mask-land-1-480.webp'); position: relative; isolation: isolate; min-width: 0; padding: 20px 22px; }
.cv-card:nth-child(3n+2) { --cv-mask: url('/v2/mask-land-2-480.webp'); }
.cv-card:nth-child(3n) { --cv-mask: url('/v2/mask-land-3-480.webp'); }
.cv-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--vl-paper);
  -webkit-mask: var(--cv-mask) no-repeat 0 0 / 100% 100%;
  mask: var(--cv-mask) no-repeat 0 0 / 100% 100%;
}
@supports (-webkit-mask-box-image: none) {
  .cv-card::before { -webkit-mask: none; mask: none; -webkit-mask-box-image: var(--cv-mask) 40 fill / 14px stretch; }
}
.cv-card > * + * { margin-top: 12px; }
.cv-name { font: 600 17px/1.3 var(--vl-text); }
.cv-sub { color: var(--vl-ink-2); font-size: 15px; line-height: 1.45; }
.cv-cap { color: var(--vl-ink-2); font-size: 14px; line-height: 1.35; }
.cv-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cv-acts .cv-btn { flex: 1 1 auto; }
@media (min-width: 600px) { .cv-acts { justify-content: flex-end; } .cv-acts .cv-btn { flex: none; } .cv-acts.is-start { justify-content: flex-start; } }

/* ----- a booking on a card ----- */
.cv-bk { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: 'time who' 'time pill' 'meta meta' 'act act'; column-gap: 14px; row-gap: 8px; }
.cv-bk > * + * { margin-top: 0; }
.cv-bk-time { grid-area: time; font: 600 22px/1.15 var(--vl-display); font-variant-numeric: tabular-nums; }
.cv-bk-time small { display: block; margin-top: 4px; font: 400 15px/1.3 var(--vl-text); color: var(--vl-ink-2); }
.cv-bk-who { grid-area: who; min-width: 0; }
.cv-bk-pill { grid-area: pill; justify-self: start; }
.cv-bk-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.cv-bk-act { grid-area: act; }
.cv-addr { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; line-height: 1.4; }
@media (min-width: 600px) {
  .cv-bk { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: 'time who pill' 'time meta meta' 'time act act'; column-gap: 20px; }
  .cv-bk-time { font-size: 26px; }
  .cv-bk-pill { justify-self: end; }
}

/* ----- statuses: a word on its colour, never colour alone ----- */
.cv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--vl-r-btn);
  font: 500 13px/1.2 var(--vl-text);
  white-space: nowrap;
}
.cv-pill::before { content: ''; width: 7px; height: 7px; border-radius: var(--vl-r-in); background-color: currentColor; }
[data-cv-tone='ok'] { color: var(--vl-ok); background-color: var(--vl-green-tint); }
[data-cv-tone='wait'] { color: var(--vl-wait); background-color: var(--vl-note-bg); }
[data-cv-tone='stop'] { color: var(--vl-error); background-color: var(--vl-error-bg); }
[data-cv-tone='idle'] { color: var(--vl-ink-2); background-color: var(--vl-paper-2); }
[data-cv-tone='now'] { color: var(--vl-paper); background-color: var(--vl-green); }

/* ----- buttons: one main (green fill) per card, the rest outlined or a link, every one in words ----- */
.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--vl-r-btn);
  background-color: transparent;
  font: 500 16px/1.15 var(--vl-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms var(--vl-ease), box-shadow 150ms var(--vl-ease), transform 150ms var(--vl-ease);
}
.cv-btn:active { transform: scale(0.97); }
.cv-btn-main { background-color: var(--vl-green); color: var(--vl-paper); }
.cv-btn-main:hover { background-color: var(--vl-green-hover); }
.cv-btn-line { color: var(--vl-green); box-shadow: inset 0 0 0 1.5px var(--vl-green); }
.cv-btn-line:hover { background-color: color-mix(in srgb, var(--vl-green) 7%, transparent); }
.cv-btn-stop { color: var(--vl-error); box-shadow: inset 0 0 0 1.5px var(--vl-error); }
.cv-btn-s { min-height: 44px; padding: 0 16px; }
.cv-btn-wide { width: 100%; }
.cv-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: var(--vl-green);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) { .cv-btn, .cv-side nav button { transition: none; } .cv-btn:active { transform: none; } }

/* ----- chips and a two- or three-way switch ----- */
.cv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cv-chip, .cv-seg button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--vl-r-btn);
  background-color: var(--vl-paper);
  color: var(--vl-ink);
  font: 500 15px/1.2 var(--vl-text);
  cursor: pointer;
}
.cv-chip[aria-pressed='true'], .cv-seg [aria-pressed='true'] { background-color: var(--vl-green); color: var(--vl-paper); }
.cv-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--vl-r-btn); background-color: var(--vl-paper-2); }
.cv-seg button { background-color: transparent; border-radius: var(--vl-r-in); }
.cv-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 24px; }
.cv-tools .cv-acts { justify-content: flex-start; }
.cv-tools .cv-seg { background-color: var(--vl-paper); }

/* ----- fields ----- */
.cv-field { display: grid; gap: 6px; }
.cv-field label, .cv-field .cv-label { font: 500 15px/1.3 var(--vl-text); }
.cv-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--vl-r-field);
  background-color: var(--vl-field-bg);
  box-shadow: inset 0 0 0 1px var(--vl-edge);
  font: 400 17px/1.3 var(--vl-text);
}
textarea.cv-input { min-height: 120px; padding: 12px 14px; resize: vertical; }
.cv-input[aria-invalid='true'] { box-shadow: inset 0 0 0 2px var(--vl-error); }
.cv-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.cv-err { color: var(--vl-error); font-weight: 500; font-size: 15px; }
.cv-note { padding: 14px 16px; border-radius: var(--vl-r-in); background-color: var(--vl-note-bg); font-size: 15px; line-height: 1.5; }
.cv-note[data-cv-tone] { color: var(--vl-ink); }
.cv-note[data-cv-tone='ok'] { background-color: var(--vl-green-tint); }
.cv-saved { color: var(--vl-ok); font-weight: 500; font-size: 15px; }
.cv-kv > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--vl-line); }
.cv-kv > div:first-child { border-top: 0; padding-top: 0; }
.cv-kv dt { color: var(--vl-ink-2); font-size: 15px; }
.cv-kv dd { font-weight: 600; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.cv-kv dd span { display: block; font-weight: 400; color: var(--vl-ink-2); font-size: 15px; }
.cv-radio { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 16px; }
.cv-radio input { width: 22px; height: 22px; margin: 0; accent-color: var(--vl-green); }
.cv-hours > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 56px; border-top: 1px solid var(--vl-line); }
.cv-hours > div:first-child { border-top: 0; }
.cv-hours input { min-width: 0; }

/* ----- figures ----- */
.cv-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.cv-facts dt { color: var(--vl-ink-2); font-size: 15px; }
.cv-facts dd { margin-top: 2px; font: 600 30px/1.1 var(--vl-display); font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { .cv-facts.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* price in parts: service, travel surcharge, total (a studio booking shows its price alone) */
.cv-price { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 15px; line-height: 1.45; color: var(--vl-ink-2); font-variant-numeric: tabular-nums; }
.cv-price b { color: var(--vl-ink); font-weight: 600; }
.cv-parts { display: grid; gap: 4px; }
.cv-parts > div { display: flex; justify-content: space-between; gap: 12px; font-weight: 400; font-size: 15px; color: var(--vl-ink); font-variant-numeric: tabular-nums; }
.cv-parts > div > span:last-child { flex: none; white-space: nowrap; }
.cv-parts > div:last-child { padding-top: 6px; border-top: 1px solid var(--vl-line); font-weight: 600; font-size: 16px; }
.cv-ex { color: var(--vl-ink-2); font-weight: 400; }
.cv-days { display: flex; flex-wrap: wrap; gap: 0 18px; }
.cv-zone .cv-price { margin-top: 8px; }
.cv-kv dd .cv-parts span { display: inline; color: inherit; font-size: inherit; font-weight: inherit; }
.cv-kv dd .cv-parts .cv-ex { color: var(--vl-ink-2); font-weight: 400; }
.cv-amount { font: 600 22px/1.1 var(--vl-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; }
.cv-row > * + * { margin-top: 0; }
@media (max-width: 599px) { .cv-row > .cv-acts, .cv-row > .cv-seg { grid-column: 1 / -1; justify-self: start; } }

/* ----- empty, loading, error ----- */
.cv-empty { display: grid; justify-items: start; gap: 12px; }
.cv-empty img { width: 220px; }
.cv-empty h2 { font: 600 24px/1.2 var(--vl-display); }
.cv-ph { display: block; height: 14px; border-radius: var(--vl-r-in); background-color: var(--vl-line); }
.cv-ph.is-w1 { width: 40%; } .cv-ph.is-w2 { width: 70%; } .cv-ph.is-w3 { width: 25%; height: 24px; }

/* ----- calendar ----- */
.cv-cal { position: relative; }
.cv-hr { display: grid; grid-template-columns: 52px minmax(0, 1fr); height: 72px; border-top: 1px solid var(--vl-line); }
.cv-hour { padding-top: 6px; color: var(--vl-ink-2); font: 500 14px/1 var(--vl-text); font-variant-numeric: tabular-nums; }
.cv-free {
  display: flex;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--vl-r-in);
  background-color: transparent;
  color: var(--vl-ink-2);
  font: 400 15px/1.2 var(--vl-text);
  text-align: left;
  cursor: pointer;
}
.cv-free:hover { background-color: var(--vl-hover); }
.cv-ev {
  position: absolute;
  left: 60px;
  right: 4px;
  top: calc(var(--s) * 72px / 60 + 3px);
  height: calc(var(--d) * 72px / 60 - 6px);
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 6px 12px 6px 16px;
  border: 0;
  border-radius: var(--vl-r-in);
  color: var(--vl-ink);
  font: 400 15px/1.3 var(--vl-text);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
}
.cv-ev b { font-weight: 600; }
.cv-ev span { color: var(--vl-ink-2); }
.cv-ev[data-cv-tone='ok'] { background-color: var(--vl-green-tint); box-shadow: inset 4px 0 0 var(--vl-ok); }
.cv-ev[data-cv-tone='wait'] { background-color: var(--vl-note-bg); box-shadow: inset 4px 0 0 var(--vl-wait); }
.cv-ev[data-cv-tone='idle'] { background-color: var(--vl-paper-2); box-shadow: inset 4px 0 0 var(--vl-ink-2); }
.cv-ev-st { font-weight: 600; }
.cv-ev[data-cv-tone='ok'] .cv-ev-st { color: var(--vl-ok); }
.cv-ev[data-cv-tone='wait'] .cv-ev-st { color: var(--vl-wait); }
.cv-wk { position: relative; display: grid; grid-template-columns: 52px repeat(6, minmax(0, 1fr)); }
.cv-wk-head { padding: 0 6px 10px; color: var(--vl-ink-2); font: 500 14px/1.2 var(--vl-text); }
.cv-wk-head b { display: block; color: var(--vl-ink); font: 600 22px/1.1 var(--vl-display); }
.cv-wk-head.is-today b { color: var(--vl-green); }
.cv-wk-col { position: relative; border-left: 1px solid var(--vl-line); }
.cv-wk-hours > div { height: 72px; border-top: 1px solid var(--vl-line); }
.cv-cell { display: block; width: 100%; height: 72px; padding: 6px 8px; border: 0; border-top: 1px solid var(--vl-line); background-color: transparent; color: var(--vl-ink-2); font: 400 15px/1.2 var(--vl-text); text-align: left; cursor: pointer; }
.cv-cell span { opacity: 0; transition: opacity 150ms var(--vl-ease); }
.cv-cell:hover span, .cv-cell:focus-visible span { opacity: 1; }
.cv-cell:hover { background-color: var(--vl-hover); }
/* a touch screen (a tablet, Telegram) has no hover: every free hour says its word */
@media (hover: none) { .cv-cell span { opacity: 1; } }
.cv-cell-busy { height: 72px; border-top: 1px solid var(--vl-line); }
.cv-wk .cv-ev span { display: none; }
.cv-wk .cv-ev { left: 3px; right: 3px; top: calc(var(--s) * 72px / 60 + 3px); height: calc(var(--d) * 72px / 60 - 6px); padding: 4px 6px 4px 10px; font-size: 15px; line-height: 1.2; }

/* ----- reports ----- */
.cv-bars { display: none; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 8px; align-items: end; height: 240px; }
.cv-bar { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; text-align: center; }
.cv-bar-v, .cv-bar-p { color: var(--vl-ink-2); font: 500 13px/1.6 var(--vl-text); font-variant-numeric: tabular-nums; }
.cv-bar-fill { align-self: end; min-height: 2px; background-color: var(--vl-green); border-top-left-radius: var(--vl-r-in); border-top-right-radius: var(--vl-r-in); }
@media (min-width: 1024px) { .cv-bars { display: grid; } }
.cv-hbars > div { display: grid; grid-template-columns: 64px minmax(0, 1fr) 56px; gap: 10px; align-items: center; min-height: 30px; font-size: 15px; }
.cv-track { height: 12px; border-radius: var(--vl-r-in); background-color: var(--vl-paper-2); overflow: hidden; }
.cv-track i { display: block; height: 100%; background-color: var(--vl-green); border-radius: var(--vl-r-in); }
.cv-total { font: 600 36px/1.1 var(--vl-display); font-variant-numeric: tabular-nums; }

/* ----- the sheet: a native dialog, a panel on the right on a desktop, from the bottom on a phone ----- */
.cv-sheet {
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-top-left-radius: var(--vl-r);
  border-top-right-radius: var(--vl-r);
  background-color: var(--vl-paper-2);
  background-image: var(--vl-tex);
  background-size: var(--vl-tex-size);
  background-blend-mode: soft-light;
  color: var(--vl-ink);
}
.cv-sheet::backdrop { background-color: color-mix(in srgb, var(--vl-ink) 45%, transparent); }
.cv-sheet-in { padding: 20px max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.cv-shead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.cv-shead h2 { padding-top: 6px; font: 600 26px/1.15 var(--vl-display); letter-spacing: -0.01em; }
.cv-sheet .cv-blk { display: block; margin-top: 24px; }
.cv-sheet .cv-line { height: 14px; margin-bottom: 14px; }
.cv-sheet .cv-blk-head h2 { font-size: 20px; }
.cv-sheet .cv-blk-body { margin-top: 12px; }
.cv-sheet-acts { display: grid; gap: 10px; margin-top: 24px; }
@media (min-width: 1024px) {
  .cv-sheet { width: 480px; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-top-left-radius: 0; border-top-right-radius: 0; }
  .cv-sheet-in { padding: 28px 32px 32px; }
}

/* ----- sign in ----- */
.cv-login { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 20px; min-height: 100dvh; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.cv-login-pic { width: min(240px, 64%); justify-self: center; }
.cv-login .cv-card { width: 100%; max-width: 440px; justify-self: center; padding: 28px 24px; }
.cv-login h1 { font: 600 32px/1.1 var(--vl-display); letter-spacing: -0.015em; }
.cv-login .cv-brand b { color: var(--vl-ink); }
.cv-login .cv-brand img { width: 44px; }
.cv-lang { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (min-width: 1024px) {
  .cv-login { grid-template-columns: minmax(0, 1fr) 440px; column-gap: 80px; max-width: 1120px; margin-inline: auto; align-items: center; }
  .cv-login-pic { width: 460px; justify-self: end; }
}
/* What the approved page (../design/bogdan/crm-valley/index.html) does not draw: an empty error line, a write
   in flight, the sheet's rise, the sheets it leaves to the build (payment, move, service, gift). Layout and states
   only, on the --vl-* tokens of tokens.css; no colour, family or radius of its own. */

/* a line that says nothing yet takes no room */
.cv-err:empty, .cv-state:empty { display: none; }
.cv-state { color: var(--vl-ink-2); font-size: 15px; line-height: 1.45; }
.cv-sheet-acts .cv-err, .cv-sheet-acts .cv-state { margin: 0; }

/* a control while its write runs, or one that cannot be pressed yet */
.cv-btn:disabled, .cv-chip:disabled, .cv-seg button:disabled { opacity: 0.55; cursor: default; }
.cv-btn:disabled:active { transform: none; }
.cv-input:disabled { opacity: 0.7; }

/* the second press of a two press action (cancel, no show, delete health data) */
.cv-btn[data-cr-armed] { background-color: var(--vl-error-bg); }

/* a link that reads as a button keeps the underline off */
a.cv-btn { text-decoration: none; }
.cv-link[href] { word-break: break-word; }

/* the sheet rises 16 px in 200 ms (DESIGN.md section 6) and fades as it leaves */
@keyframes cv-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cv-fall { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(16px); } }
.cv-sheet[open] { animation: cv-rise 200ms var(--vl-ease); }
.cv-sheet[data-cr-closing] { animation: cv-fall 200ms var(--vl-ease) forwards; }
@media (prefers-reduced-motion: reduce) { .cv-sheet[open], .cv-sheet[data-cr-closing] { animation: none; } }

/* a block or sheet text that comes before the first block */
.cv-sheet-in > .cv-note, .cv-sheet-in > .cv-sub, .cv-sheet-in > .cv-err { margin-top: 12px; }
.cv-blk-body > .cv-field + .cv-field, .cv-card > .cv-field + .cv-field { margin-top: 14px; }
.cv-sheet .cv-blk-body > * + * { margin-top: 0; }
.cv-sheet form > .cv-blk:first-child { margin-top: 16px; }

/* the consultation form: a question is long, so its answer goes under it */
.cv-kv.cv-formkv > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.cv-kv.cv-formkv dd { white-space: pre-wrap; }

/* a time and an amount side by side in a field pair with no "to" between */
.cv-pair.is-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* gift codes: spaced out so they read character by character */
.cv-code { letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

/* a status line under a card's facts */
.cv-row > .cv-amount small { font: 400 15px/1.3 var(--vl-text); color: var(--vl-ink-2); }
.cv-endcol { display: grid; justify-items: end; gap: 6px; }

/* a list of plain lines inside a field (the refund scale) */
.cv-lines { display: grid; gap: 4px; font-size: 15px; }

/* the enquiry message keeps its line breaks */
.cv-msg { white-space: pre-wrap; overflow-wrap: anywhere; }

/* the More sheet: section words start at the left */
.cv-btn.is-start { justify-content: flex-start; }

/* fields without their own box in a fieldset */
.cv-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cv-fieldset legend { padding: 0; font: 500 15px/1.3 var(--vl-text); }
