/* =========================================================================
   TherapyFlow Website V2 — homepage + personal-demo surfaces
   -------------------------------------------------------------------------
   Scoped under body.v2 so no existing page inherits these rules.
   Builds on css/style.css tokens so light/dark theme switching keeps working.
   Logical properties only: the same rules serve HE (rtl) and EN (ltr).

   Visual system
   - Two layers:  clinic blue  = the CRM foundation (records, plans, platform)
                  Flow teal    = the assistant layer and the one primary action
   - Two levels:  level 1 = flat surface + hairline      (clinic records)
                  level 2 = same surface + soft shadow   (Flow surfaces)
   - Flow mark:   confirm-in-circle glyph (#i-flow-confirm), not a sparkle
   - Signal rail: 3px inline-start bar; teal / amber / slate
   - Display:     Rubik (HE + EN); body and forms stay on the system stack
   ========================================================================= */

/* ---------- Rubik (self-hosted, SIL OFL 1.1 — see assets/fonts/rubik/OFL.txt) ----------
   One variable file per script covers both weights used (500, 700). */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../assets/fonts/rubik/rubik-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../assets/fonts/rubik/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body.v2 {
  --v2-wrap: 1180px;
  --v2-display: "Rubik", var(--font);
  --v2-ink: var(--text-main);
  --v2-body: #334155;
  --v2-muted: var(--text-muted);
  --v2-line: var(--border-soft);
  --v2-surface: var(--bg-card);
  --v2-canvas: var(--bg-page);

  /* Flow layer */
  --v2-brand: #20c997;
  --v2-brand-ink: #0b7d61;
  --v2-brand-soft: rgba(32, 201, 151, 0.09);
  --v2-brand-line: rgba(32, 201, 151, 0.28);

  /* Clinic layer (text-safe shade of the logo gradient) */
  --v2-clinic: #0b63ce;
  --v2-clinic-soft: rgba(11, 99, 206, 0.065);
  --v2-clinic-line: rgba(11, 99, 206, 0.2);

  /* Signal rail */
  --v2-rail-teal: #20c997;
  --v2-rail-amber: #f59e0b;
  --v2-rail-slate: #94a3b8;
  --v2-amber-ink: #b45309;
  --v2-amber-soft: rgba(245, 158, 11, 0.12);
  --v2-slate-soft: rgba(100, 116, 139, 0.1);

  /* Surfaces */
  --v2-panel: var(--bg-page);
  --v2-ui-row: var(--bg-card);
  --v2-note: #fbfbfa;
  --v2-note-line: #cbd5e1;
  --v2-shadow-ui: 0 1px 2px rgba(2, 6, 23, 0.05), 0 26px 60px -30px rgba(2, 6, 23, 0.28);
  --v2-radius-ui: 18px;
  --v2-section-y: clamp(64px, 9vw, 116px);

  /* Final CTA */
  --v2-final-bg: #0f172a;
  --v2-final-line: transparent;
}

html[data-theme="dark"] body.v2 {
  --v2-body: #cbd5e1;
  --v2-brand-ink: #4ade9f;
  --v2-brand-soft: rgba(32, 201, 151, 0.12);
  --v2-brand-line: rgba(32, 201, 151, 0.34);
  --v2-clinic: #7cb7ff;
  --v2-clinic-soft: rgba(96, 165, 250, 0.1);
  --v2-clinic-line: rgba(96, 165, 250, 0.28);
  --v2-amber-ink: #fbbf24;
  --v2-amber-soft: rgba(245, 158, 11, 0.16);
  --v2-slate-soft: rgba(148, 163, 184, 0.14);
  --v2-panel: #182336;
  --v2-ui-row: #1a2333;
  --v2-note: #0f1621;
  --v2-note-line: #3b4a5f;
  --v2-shadow-ui: 0 1px 2px rgba(0, 0, 0, 0.45), 0 26px 60px -28px rgba(0, 0, 0, 0.85);
  --v2-final-bg: #0f3b31;
  --v2-final-line: rgba(32, 201, 151, 0.35);
}

/* ---------- layout primitives ---------- */

.v2-wrap {
  width: min(var(--v2-wrap), calc(100% - 40px));
  margin-inline: auto;
}

.v2-section {
  padding-block: var(--v2-section-y);
}

.v2-section--band {
  background: var(--v2-surface);
  border-block: 1px solid var(--v2-line);
}

.v2-section--tight-top {
  padding-block-start: clamp(32px, 4vw, 56px);
}

.v2-section--tight-bottom {
  padding-block-end: clamp(40px, 5vw, 64px);
}

/* ---------- typography ---------- */

.v2-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--v2-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--v2-brand-ink);
}
.v2-eyebrow .icon {
  width: 17px;
  height: 17px;
}
.v2-eyebrow--clinic {
  color: var(--v2-clinic);
}
html[lang="en"] .v2-eyebrow {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.v2-h1 {
  margin: 12px 0 18px;
  font-family: var(--v2-display);
  font-size: clamp(2.3rem, 4.6vw, 3.85rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--v2-ink);
  text-wrap: balance;
}
html[lang="en"] .v2-h1 {
  font-size: clamp(2.3rem, 4.1vw, 3.45rem);
  letter-spacing: -0.025em;
  line-height: 1.06;
}

.v2-h2 {
  margin: 0 0 16px;
  font-family: var(--v2-display);
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--v2-ink);
  text-wrap: balance;
}
html[lang="en"] .v2-h2 {
  letter-spacing: -0.02em;
}

.v2-h3 {
  margin: 0 0 8px;
  font-family: var(--v2-display);
  font-size: 1.14rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--v2-ink);
}

.v2-lead {
  margin: 0;
  max-width: 58ch;
  font-size: clamp(1.04rem, 1.3vw, 1.17rem);
  line-height: 1.75;
  color: var(--v2-body);
}

.v2-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--v2-body);
}

.v2-small {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--v2-muted);
}

.v2-head {
  max-width: 760px;
  margin-block-end: clamp(36px, 5vw, 56px);
}
.v2-head--center {
  margin-inline: auto;
  text-align: center;
}
.v2-head--center .v2-lead {
  margin-inline: auto;
}

/* ---------- actions ---------- */

.v2-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

body.v2 .v2-btn-secondary {
  height: 48px;
  min-height: 48px;
  padding-block: 0;
  padding-inline: 24px;
  border-radius: 9999px;
  border: 1.5px solid rgba(100, 116, 139, 0.4);
  border: 1.5px solid color-mix(in srgb, var(--v2-ink) 20%, transparent);
  background: transparent;
  color: var(--v2-ink);
  font-weight: 700;
}
body.v2 .v2-btn-secondary:hover {
  border-color: var(--v2-ink);
  background: var(--v2-slate-soft);
  box-shadow: none;
}

.v2-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--v2-brand-ink);
  text-decoration: none;
  border-block-end: 1px solid transparent;
}
.v2-link:hover {
  border-block-end-color: currentColor;
}
.v2-link .icon {
  width: 16px;
  height: 16px;
}

/* Tertiary: ink text link (teal is reserved for the primary action nearby) */
.v2-link--ink {
  color: var(--v2-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  border: 0;
}
.v2-link--ink:hover {
  text-decoration-thickness: 2px;
}

/* ---------- Flow mark ---------- */

.v2-flowbadge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 8px;
  border-radius: 999px;
  background: var(--v2-brand-soft);
  color: var(--v2-brand-ink);
  font-family: var(--v2-display);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.v2-flowbadge .icon {
  width: 14px;
  height: 14px;
}

/* ======================================================================
   1 · HERO
   ====================================================================== */

.v2-hero {
  position: relative;
  padding-block: clamp(36px, 5.5vw, 84px) clamp(64px, 8vw, 108px);
}

.v2-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
}

.v2-kicker {
  display: inline-block;
  font-family: var(--v2-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--v2-clinic);
}
html[lang="en"] .v2-kicker {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* the decision block: boundary + actions, bound by the Flow rail */
.v2-decide {
  position: relative;
  margin-block-start: 26px;
  padding-inline-start: 20px;
}
.v2-decide::before {
  content: "";
  position: absolute;
  inset-block: 2px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 99px;
  background: var(--v2-rail-teal);
}

.v2-boundary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 13px 16px;
  max-width: 50ch;
  border: 1px solid var(--v2-brand-line);
  border-radius: 14px;
  background: var(--v2-brand-soft);
  color: var(--v2-ink);
  font-weight: 600;
  line-height: 1.55;
}
.v2-boundary .icon {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--v2-brand-ink);
}

.v2-hero__actions {
  margin-block-start: 22px;
}

.v2-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-block-start: 18px;
}
.v2-hero__meta .v2-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.v2-hero__meta .v2-small .icon {
  width: 15px;
  height: 15px;
  color: var(--v2-brand-ink);
}
.v2-hero__meta .v2-link--ink {
  font-size: 0.93rem;
}

.v2-hero__visual {
  position: relative;
  min-width: 0;
}

/* ======================================================================
   PRODUCT ILLUSTRATIONS (built from real Flow UI strings)
   Illustrations are never interactive.
   ====================================================================== */

.v2-ui {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-ui);
  background: var(--v2-surface);
  color: var(--v2-ink);
  font-size: 14px;
  line-height: 1.5;
  text-align: start;
}
/* level 2: Flow surfaces sit one step above the clinic layer */
.v2-ui--flow {
  box-shadow: var(--v2-shadow-ui);
}
/* level 1: clinic records */
.v2-ui--clinic {
  box-shadow: none;
  border-color: var(--v2-clinic-line);
}

.v2-ui__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-block-end: 1px solid var(--v2-line);
}
.v2-ui--clinic .v2-ui__top {
  background: var(--v2-clinic-soft);
  border-block-end-color: var(--v2-clinic-line);
}
.v2-ui__title {
  margin: 0;
  font-family: var(--v2-display);
  font-size: 15px;
  font-weight: 500;
}
.v2-ui__sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--v2-muted);
}

.v2-ui__pulse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 18px;
  background: var(--v2-canvas);
  border-block-end: 1px solid var(--v2-line);
  font-size: 13px;
  color: var(--v2-body);
}
.v2-ui__pulse strong {
  color: var(--v2-ink);
  font-weight: 700;
}
.v2-ui__pulse-sep {
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background: var(--v2-muted);
  opacity: 0.5;
}

.v2-ui__body {
  padding: 14px 18px 18px;
}

.v2-ui__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.v2-ui__tab {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--v2-muted);
}
.v2-ui__tab--on {
  background: var(--v2-slate-soft);
  color: var(--v2-ink);
}

.v2-ui__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v2-ui__item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-block: 11px;
  padding-inline: 16px 12px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--v2-ui-row);
}
.v2-ui__item::before {
  content: "";
  position: absolute;
  inset-block: 10px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 99px;
  background: var(--v2-rail-teal);
}
.v2-ui__item--amber::before {
  background: var(--v2-rail-amber);
}
.v2-ui__item--slate::before {
  background: var(--v2-rail-slate);
}

.v2-ui__item-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
}
.v2-ui__item-text {
  display: block;
  margin-block-start: 1px;
  font-size: 12.5px;
  color: var(--v2-muted);
}
.v2-ui__item-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-block-start: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--v2-body);
}
.v2-ui__chip {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--v2-clinic-soft);
  font-size: 11px;
  font-weight: 700;
  color: var(--v2-clinic);
}

/* depicted controls: flat labels, not buttons */
.v2-ui__btn {
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--v2-slate-soft);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--v2-muted);
  white-space: nowrap;
}
.v2-ui__btn--primary {
  background: var(--v2-brand);
  color: #062a21;
}

.v2-ui__ask {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-start: 14px;
  padding-block: 9px;
  padding-inline: 16px 8px;
  border: 1px solid var(--v2-line);
  border-radius: 999px;
  background: var(--v2-canvas);
  font-size: 13px;
  color: var(--v2-muted);
}
.v2-ui__send {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  background: var(--v2-slate-soft);
  color: var(--v2-muted);
}
.v2-ui__send .icon {
  width: 15px;
  height: 15px;
}

.v2-ui-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 4px 0;
  font-size: 0.8rem;
  color: var(--v2-muted);
}

/* record (patient file) */
.v2-ui__person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.v2-ui__avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 99px;
  background: var(--v2-surface);
  border: 1px solid var(--v2-clinic-line);
  font-size: 13px;
  font-weight: 700;
  color: var(--v2-clinic);
}
.v2-ui__status {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--v2-surface);
  border: 1px solid var(--v2-clinic-line);
  color: var(--v2-clinic);
  font-size: 12px;
  font-weight: 700;
}

.v2-ui__attention {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--v2-brand-line);
  border-radius: 14px;
  background: var(--v2-brand-soft);
  box-shadow: 0 14px 30px -22px rgba(11, 125, 97, 0.45);
}
.v2-ui__attention-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--v2-display);
  font-size: 13.5px;
  font-weight: 500;
}

/* confirm (action proposal) */
.v2-ui__bubble {
  max-width: 88%;
  width: fit-content;
  margin: 0 0 12px;
  margin-inline-start: auto;
  padding: 10px 14px;
  border-radius: 16px;
  border-end-end-radius: 6px;
  background: var(--v2-slate-soft);
  color: var(--v2-ink);
  font-size: 13.5px;
  font-weight: 500;
}

.v2-ui__proposal {
  position: relative;
  border: 1px solid var(--v2-brand-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--v2-ui-row);
}
.v2-ui__proposal::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: var(--v2-rail-teal);
}
.v2-ui__proposal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 16px;
  border-block-end: 1px solid var(--v2-line);
  font-family: var(--v2-display);
  font-size: 13px;
  font-weight: 500;
}
.v2-ui__proposal-body {
  padding: 14px 16px;
}
.v2-ui__proposal-q {
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 700;
}
.v2-ui__rows {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.v2-ui__rows li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block-end: 6px;
  border-block-end: 1px dashed var(--v2-line);
  font-size: 12.5px;
}
.v2-ui__rows li:last-child {
  border: 0;
  padding: 0;
}
.v2-ui__rows span {
  color: var(--v2-muted);
}
.v2-ui__rows strong {
  font-weight: 700;
}
.v2-ui__proposal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.v2-ui__proposal-actions .v2-ui__btn {
  padding: 5px 14px;
  font-size: 12.5px;
}

/* ======================================================================
   2 · PRODUCT PROOF
   ====================================================================== */

.v2-proof {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: stretch;
}

.v2-proof__panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--v2-line);
  border-radius: 24px;
  background: var(--v2-panel);
}
.v2-proof__panel figure {
  margin-block-start: auto;
}
.v2-proof__panel--flow {
  border-color: var(--v2-brand-line);
}
.v2-proof__panel--flow .v2-h3 {
  font-size: 1.3rem;
}
.v2-proof__panel .v2-eyebrow {
  margin-block-end: 10px;
}

/* ======================================================================
   3 · FLOW SIGNALS (canonical list)
   ====================================================================== */

.v2-flow {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.v2-flow__intro .v2-lead + .v2-lead {
  margin-block-start: 16px;
}

.v2-flow__actions {
  margin-block-start: 28px;
}

.v2-signals {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.v2-signal {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-block: 16px;
  padding-inline: 22px 18px;
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  background: var(--v2-surface);
}
.v2-signal::before {
  content: "";
  position: absolute;
  inset-block: 14px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 99px;
  background: var(--v2-rail-teal);
}
.v2-signal[data-rail="amber"]::before {
  background: var(--v2-rail-amber);
}
.v2-signal[data-rail="slate"]::before {
  background: var(--v2-rail-slate);
}
.v2-signal__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--v2-brand-soft);
  color: var(--v2-brand-ink);
}
.v2-signal[data-rail="amber"] .v2-signal__icon {
  background: var(--v2-amber-soft);
  color: var(--v2-amber-ink);
}
.v2-signal[data-rail="slate"] .v2-signal__icon {
  background: var(--v2-slate-soft);
  color: var(--v2-body);
}
.v2-signal__icon .icon {
  width: 20px;
  height: 20px;
}
.v2-signal .v2-h3 {
  margin-block-end: 2px;
  font-size: 1.02rem;
}
.v2-signal .v2-text {
  font-size: 0.95rem;
  line-height: 1.55;
}

.v2-safety {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-block-start: 18px;
  padding-inline-start: 4px;
}
.v2-safety .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-block-start: 2px;
  color: var(--v2-muted);
}

/* ======================================================================
   4 · COGNITIVE LOAD — loose notes → connected records
   ====================================================================== */

.v2-load {
  max-width: 1040px;
  margin-inline: auto;
}

.v2-load__cols {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) 88px minmax(0, 1.2fr);
  align-items: end;
  margin-block-end: 14px;
}
.v2-load__col-label {
  font-family: var(--v2-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--v2-muted);
}
.v2-load__col-label--home {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--v2-clinic);
}

.v2-load__rows {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v2-load__row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) 88px minmax(0, 1.2fr);
  align-items: center;
}

.v2-note {
  justify-self: start;
  max-width: 100%;
  padding: 13px 18px;
  border: 1.5px dashed var(--v2-note-line);
  border-radius: 14px;
  background: var(--v2-note);
  color: var(--v2-body);
  font-weight: 600;
  line-height: 1.5;
  transform: rotate(-0.8deg);
}
.v2-load__row:nth-child(even) .v2-note {
  transform: rotate(0.7deg);
  margin-inline-start: 22px;
}
.v2-load__row:nth-child(3) .v2-note {
  margin-inline-start: 8px;
}

.v2-link-line {
  position: relative;
  height: 2px;
  margin-inline: 10px;
  background-image: linear-gradient(to right, var(--v2-note-line) 50%, transparent 50%);
  background-size: 8px 2px;
}
.v2-link-line::after {
  content: "";
  position: absolute;
  inset-inline-end: -4px;
  inset-block-start: -3px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--v2-clinic);
}
.v2-load__row--flow .v2-link-line::after {
  background: var(--v2-rail-teal);
}

.v2-record {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
  padding-inline: 20px 16px;
  border: 1px solid var(--v2-clinic-line);
  border-radius: 14px;
  background: var(--v2-surface);
  color: var(--v2-ink);
  line-height: 1.5;
}
.v2-record__type {
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--v2-clinic-soft);
  color: var(--v2-clinic);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.v2-record__text {
  font-size: 0.97rem;
}
.v2-load__row--flow .v2-record {
  box-shadow: var(--v2-shadow-ui);
}
.v2-load__row--flow .v2-record::before {
  content: "";
  position: absolute;
  inset-block: 12px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 99px;
  background: var(--v2-rail-teal);
}
.v2-load__row--flow .v2-record::after {
  display: none;
}

.v2-closing {
  max-width: 62ch;
  margin: clamp(36px, 5vw, 56px) auto 0;
  text-align: center;
  font-family: var(--v2-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 500;
  color: var(--v2-ink);
}

/* ======================================================================
   5 · CONNECTED CLINIC (clinic layer)
   ====================================================================== */

.v2-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
.v2-group {
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--v2-clinic-line);
  border-radius: 20px;
  background: var(--v2-surface);
}
.v2-group__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-block-end: 16px;
  border-radius: 12px;
  background: var(--v2-clinic-soft);
  color: var(--v2-clinic);
}
.v2-group__icon .icon {
  width: 21px;
  height: 21px;
}
.v2-group__list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.v2-group__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.97rem;
  line-height: 1.55;
  color: var(--v2-body);
}
.v2-group__list .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-block-start: 4px;
  color: var(--v2-clinic);
}
.v2-group__list .v2-link {
  color: var(--v2-clinic);
}
.v2-plan {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--v2-clinic-line);
  background: var(--v2-clinic-soft);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--v2-clinic);
  white-space: nowrap;
  vertical-align: 1px;
}

.v2-groups__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-start: clamp(24px, 3vw, 36px);
}
.v2-groups__foot .v2-link {
  color: var(--v2-clinic);
}

/* ======================================================================
   6 · SWITCHING (no enclosing panel)
   ====================================================================== */

.v2-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.v2-switch__actions {
  margin-block-start: 28px;
}

.v2-moves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-start: 1px solid var(--v2-line);
}
.v2-moves li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 16px;
  border-block-end: 1px solid var(--v2-line);
  font-family: var(--v2-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--v2-ink);
}
.v2-moves .icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--v2-clinic);
}
.v2-moves__note {
  margin-block-start: 14px;
}

/* ======================================================================
   7 · FINAL CONVERSION
   ====================================================================== */

.v2-final {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 76px) clamp(22px, 5vw, 64px);
  border: 1px solid var(--v2-final-line);
  border-radius: 32px;
  background: var(--v2-final-bg);
  color: #f8fafc;
  text-align: center;
}
.v2-final__mark {
  position: absolute;
  inset-inline-end: clamp(-40px, -2vw, -12px);
  inset-block-end: clamp(-56px, -3vw, -20px);
  width: clamp(160px, 22vw, 260px);
  height: clamp(160px, 22vw, 260px);
  color: #ffffff;
  opacity: 0.07;
  pointer-events: none;
}
.v2-final > *:not(.v2-final__mark) {
  position: relative;
}
.v2-final .v2-h2 {
  color: #fff;
  max-width: 22ch;
  margin-inline: auto;
}
.v2-final .v2-lead {
  margin-inline: auto;
  color: #cbd5e1;
}
html[data-theme="dark"] .v2-final .v2-lead {
  color: #d1fae5;
}
.v2-final__actions {
  justify-content: center;
  margin-block-start: 32px;
}
body.v2 .v2-final .v2-btn-secondary {
  border-color: rgba(248, 250, 252, 0.36);
  color: #fff;
}
body.v2 .v2-final .v2-btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.v2-final__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-block-start: 22px;
}
.v2-final .v2-link--ink {
  color: #e2e8f0;
}
.v2-final__fine {
  margin: 26px auto 0;
  max-width: 62ch;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #94a3b8;
}
html[data-theme="dark"] .v2-final__fine {
  color: #a7c4bb;
}

/* ======================================================================
   PERSONAL DEMO (contact page)
   ====================================================================== */

.v2-demo {
  scroll-margin-block-start: 96px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  margin-block: 8px 12px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--v2-line);
  border-radius: 28px;
  background: var(--v2-surface);
  box-shadow: var(--v2-shadow-ui);
}
.v2-demo__points {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.v2-demo__points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--v2-body);
  line-height: 1.6;
}
.v2-demo__points .icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-block-start: 3px;
  color: var(--v2-brand-ink);
}
.v2-demo__note {
  margin-block-start: 22px;
  padding-inline-start: 14px;
  border-inline-start: 3px solid var(--v2-rail-slate);
}

.v2-form {
  display: grid;
  gap: 14px;
}
.v2-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.v2-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.v2-field label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--v2-ink);
}
.v2-field .v2-optional {
  font-weight: 500;
  color: var(--v2-muted);
}
.v2-field input,
.v2-field select,
.v2-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--v2-line);
  border-radius: 12px;
  background: var(--input-bg, #fff);
  color: var(--v2-ink);
  font: inherit;
  font-size: 1rem;
}
.v2-field textarea {
  min-height: 96px;
  resize: vertical;
}
.v2-field input:focus-visible,
.v2-field select:focus-visible,
.v2-field textarea:focus-visible {
  outline: 2px solid var(--v2-brand);
  outline-offset: 1px;
  border-color: transparent;
}
.v2-field input[type="tel"],
.v2-field input[type="email"] {
  direction: ltr;
  text-align: start;
}
html[dir="rtl"] .v2-field input[type="tel"],
html[dir="rtl"] .v2-field input[type="email"] {
  text-align: right;
}
.v2-form__submit {
  margin-block-start: 6px;
}
.v2-form__submit .btn-primary {
  width: 100%;
}
.v2-form .form-status {
  margin: 0;
}

.v2-other {
  margin-block: 36px 0;
  padding-block-start: 28px;
  border-block-start: 1px solid var(--v2-line);
}
.v2-other .v2-h3 {
  font-size: 1.35rem;
}
body.v2 .v2-other .callout {
  border-color: var(--v2-clinic-line);
  background: var(--v2-clinic-soft);
}
body.v2 .v2-other .form {
  background: var(--v2-surface);
  border: 1px solid var(--v2-line);
  box-shadow: none;
}
body.v2 .v2-other label {
  font-weight: 700;
}
/* narrow phones: long action labels wrap instead of widening the page */
body.v2 .v2-other .actions .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}
body.v2 .v2-other .actions .v2-btn-secondary {
  height: auto;
  padding-block: 11px;
}
body.v2 .v2-other .split > * {
  min-width: 0;
}

/* ======================================================================
   MOTION — one-time, comprehension-only, opt-in by JS + no-preference
   ====================================================================== */

@media (prefers-reduced-motion: no-preference) {
  html.v2-motion .v2-rise {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  }
  html.v2-motion .v2-rise:not(.is-in) {
    opacity: 0;
    transform: translateY(8px);
  }
  html.v2-motion .v2-draw {
    stroke-dasharray: 64;
    stroke-dashoffset: 64;
    animation: v2-draw 0.7s 0.35s ease-out forwards;
  }
  @keyframes v2-draw {
    to {
      stroke-dashoffset: 0;
    }
  }
}

/* ======================================================================
   RESPONSIVE
   ====================================================================== */

@media (max-width: 1100px) {
  .v2-proof {
    grid-template-columns: minmax(0, 1fr);
  }
  .v2-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .v2-groups .v2-group:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1023px) {
  .v2-hero__grid,
  .v2-flow,
  .v2-switch,
  .v2-demo {
    grid-template-columns: minmax(0, 1fr);
  }
  .v2-hero__visual {
    max-width: 620px;
  }
  .v2-load__cols {
    grid-template-columns: minmax(0, 0.8fr) 56px minmax(0, 1.2fr);
  }
  .v2-load__row {
    grid-template-columns: minmax(0, 0.8fr) 56px minmax(0, 1.2fr);
  }
}

@media (max-width: 720px) {
  body.v2 {
    --v2-section-y: 60px;
  }
  .v2-wrap {
    width: calc(100% - 32px);
  }
  .v2-h1 {
    font-size: clamp(2.05rem, 9vw, 2.5rem);
  }
  .v2-lead {
    font-size: 1rem;
  }
  .v2-hero {
    padding-block: 26px 52px;
  }
  .v2-decide {
    margin-block-start: 20px;
    padding-inline-start: 16px;
  }
  .v2-hero__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .v2-hero__actions .btn,
  .v2-final__actions .btn {
    width: 100%;
  }
  .v2-final__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .v2-ui {
    font-size: 13px;
  }
  .v2-ui__top,
  .v2-ui__pulse,
  .v2-ui__body {
    padding-inline: 14px;
  }
  .v2-ui__item {
    gap: 10px;
    padding-inline: 14px 10px;
  }
  .v2-proof__panel {
    border-radius: 20px;
    padding: 18px;
    gap: 18px;
  }
  .v2-signal {
    padding-block: 13px;
    padding-inline: 18px 14px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
  }
  .v2-signal__icon {
    width: 34px;
    height: 34px;
  }
  /* phones: canonical list stays, descriptions move off-screen (still read by
     screen readers) so the titles don't repeat what the hero and proof showed */
  .v2-signals {
    gap: 6px;
  }
  .v2-signal {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    padding-block: 8px;
  }
  .v2-signal::before {
    inset-block: 9px;
  }
  .v2-signal .v2-signal__icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }
  .v2-signal .v2-signal__icon .icon {
    width: 16px;
    height: 16px;
  }
  .v2-signal .v2-h3 {
    margin: 0;
    font-size: 1rem;
  }
  .v2-flow__actions {
    margin-block-start: 20px;
  }
  .v2-flow {
    gap: 28px;
  }
  .v2-signal .v2-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .v2-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  /* cognitive load on phones: one compact card per item */
  .v2-load__cols {
    display: none;
  }
  .v2-load__rows {
    gap: 10px;
  }
  .v2-load__row {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-block: 14px;
    padding-inline: 18px 14px;
    border: 1px solid var(--v2-clinic-line);
    border-radius: 14px;
    background: var(--v2-surface);
  }
  .v2-load__row--flow::before {
    content: "";
    position: absolute;
    inset-block: 12px;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 99px;
    background: var(--v2-rail-teal);
  }
  .v2-note,
  .v2-load__row:nth-child(n) .v2-note {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    transform: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--v2-muted);
  }
  .v2-link-line {
    display: none;
  }
  .v2-record,
  .v2-load__row--flow .v2-record {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .v2-load__row--flow .v2-record::before {
    display: none;
  }
  .v2-record .v2-flowbadge {
    display: none;
  }

  .v2-moves {
    grid-template-columns: minmax(0, 1fr);
  }
  .v2-moves li {
    padding-block: 13px;
    font-size: 1rem;
  }
  .v2-form__row {
    grid-template-columns: minmax(0, 1fr);
  }
  .v2-final {
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.v2 .btn,
  body.v2 .v2-link {
    transition: none;
  }
}
