/* ========== Tokens ========== */
:root {
  --ink: #070D18;
  --ink-2: #0C1525;
  --ink-3: #13203A;
  --line: rgba(150, 175, 215, .14);
  --line-2: rgba(150, 175, 215, .24);
  --text: #E9EEF7;
  --muted: #8E9BB3;

  --cyan: #3DE8F2;
  --cyan-2: #23C9E0;
  --blue: #3D7BFF;
  --sky: #7FB4FF;
  --green: #34D399;
  --amber: #FBBF24;
  --red: #FF5A5F;

  --paper: #EEF2F6;
  --paper-2: #FFFFFF;
  --paper-ink: #0B1422;
  --paper-muted: #5A6578;
  --paper-line: #D9E0E9;

  --font-display: "Chillax", system-ui, sans-serif;
  --font-body: "Chillax", system-ui, sans-serif;

  --step-small: clamp(.8125rem, .79rem + .1vw, .875rem);
  --step-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);
  --step-head: clamp(2rem, 7vw, 8.5rem);
  --step-display: clamp(2rem, 8.6vw, 10rem);

  /* Radii only live inside the product fragments; the page itself is square, like the logo's blocks. */
  --r-lg: 8px;
  --r-md: 8px;
  --r-sm: 8px;

  --wrap: 1760px;
  --gutter: clamp(16px, 3vw, 56px);
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  --ease: cubic-bezier(.23, 1, .32, 1);
  --out: cubic-bezier(.23, 1, .32, 1);
}

/* Each chapter is one flat colour, with the ink, the action and the quiet surface that belong on it. */
[data-field="ink"] { --field: #070D18; --on: #F4F7FC; --btn-bg: #3DE8F2; --btn-fg: #070D18; --quiet: #172338; --link: #3DE8F2; }
[data-field="paper"] { --field: #EEF2F6; --on: #0B1422; --btn-bg: #0B1422; --btn-fg: #FFFFFF; --quiet: #DDE4EC; --link: #1749C4; }
[data-field="blue"] { --field: #1749C4; --on: #FFFFFF; --btn-bg: #3DE8F2; --btn-fg: #070D18; --quiet: #0F389E; --link: #FFFFFF; --mark-b: #FFFFFF; }
[data-field="petrol"] { --field: #0B4A5E; --on: #FFFFFF; --btn-bg: #3DE8F2; --btn-fg: #070D18; --quiet: #083A4B; --link: #3DE8F2; --mark-b: #FFFFFF; }
[data-field] { background-color: var(--field); color: var(--on); }
[data-ui] { --mark-a: #3DE8F2; --mark-b: #3D7BFF; }

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a, button, label { touch-action: manipulation; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.03em; line-height: 1; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.35rem;
  border: 0; border-radius: 0;
  font-weight: 500; font-size: 1rem;
  text-decoration: none; white-space: nowrap;
  transition: transform 120ms var(--out), background-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: color-mix(in srgb, var(--btn-bg) 84%, var(--on)); } }
.btn-primary .i { transition: transform .2s var(--out); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover .i { transform: translateX(3px); } }
.btn-ghost { background: var(--quiet); color: var(--on); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: color-mix(in srgb, var(--quiet) 84%, var(--on)); } }
.btn-sm { min-height: 44px; padding: .5rem 1rem; }

/* ========== Nav ========== */
/* A plain bar in the colour of the chapter beneath it (set in JS). */
.nav { position: sticky; top: 0; z-index: 50; transition: background-color .3s, color .3s; }
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--font-display); font-size: 1.1875rem; letter-spacing: -.02em; }
.brand b { font-weight: 600; }
.brand span { font-weight: 400; }
.brand-mark { width: 26px; height: 26px; color: currentColor; }
.nav-links { display: flex; gap: 2rem; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 1rem; text-underline-offset: .3em; }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { text-decoration: underline; } }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform .2s var(--out); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu {
  display: flex; flex-direction: column; gap: .25rem;
  position: absolute; left: 0; right: 0; top: 100%; padding: .5rem var(--gutter) 1.25rem;
  background: var(--field);
}
.mobile-menu a:not(.btn) { padding: .75rem 0; text-decoration: none; font-size: var(--step-lead); }
.mobile-menu .btn { margin-top: .75rem; }

/* ========== Hero ========== */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(1.25rem, 2.6vw, 2.75rem) 0 0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font-size: var(--step-display); line-height: 1; white-space: nowrap; }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.25rem 3rem; margin-top: clamp(1.25rem, 2.4vw, 2.5rem); }
.lede { font-size: var(--step-lead); line-height: 1.3; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Hero visual */
.hero-visual { position: relative; margin-top: clamp(1.75rem, 3.2vw, 3.5rem); margin-bottom: -48px; }
.hero-word { display: inline-block; text-decoration: underline; text-decoration-color: #3DE8F2; text-decoration-thickness: .06em; text-underline-offset: .1em; }

/* The words that finish the headline. */
.hero-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; margin-bottom: .9rem; }
.hero-ask { font-size: var(--step-lead); font-weight: 500; }
.hero-words { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.hero-words button {
  min-height: 44px; padding: 0; border: 0; background: none;
  color: #AEBBD0; font: inherit; font-size: var(--step-lead); line-height: 1.2; cursor: pointer;
  text-decoration: underline transparent; text-decoration-thickness: 3px; text-underline-offset: .28em;
  transition: color .15s, text-decoration-color .15s, transform 120ms var(--out);
}
.hero-words button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .hero-words button:hover { color: #F4F7FC; } }
.hero-words button[aria-pressed="true"] { color: #F4F7FC; text-decoration-color: #3DE8F2; }
/* Sits in the window's title bar; above the window on a phone, where the bar has no room. */
.hero-tools { position: absolute; z-index: 3; top: 0; right: 0; display: flex; align-items: stretch; height: 36px; }
.hero-tools .tag-demo { position: static; display: inline-flex; align-items: center; background: none; }
.hero-tools .hero-pause { position: static; background: none; }

/* Hero carousel: slides share one grid cell so the tallest one sets the height. */
.slides { position: relative; z-index: 1; display: grid; }
.slide {
  grid-area: 1 / 1;
  position: relative;
  opacity: 0; visibility: hidden;
  transform: translateX(16px);
  transition: opacity .15s ease-out, transform .15s ease-out, visibility 0s .15s;
}
/* The outgoing slide clears before the next one fades in, so they never overlap. */
.slide.active { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--out) .12s, transform .3s var(--out) .12s, visibility 0s; }
.slide.leaving { transform: translateX(-16px); }
html:not(.js) .slide:first-child { opacity: 1; visibility: visible; transform: none; }

.dash {
  display: grid; grid-template-columns: 128px 1fr;
  background: #0D172B;
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-size: .78rem;
  height: 100%;
}
.dash { grid-template-rows: auto 1fr; }
.dash-bar { grid-column: 1 / -1; position: relative; display: flex; align-items: center; justify-content: center; height: 36px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .22); }
.dash-bar .dots { position: absolute; left: 14px; display: flex; gap: 5px; }
.dash-bar .dots i { width: 9px; height: 9px; border-radius: 50%; }
.dash-bar .dots i:nth-child(1) { background: #EE5C62; }
.dash-bar .dots i:nth-child(2) { background: #F6B719; }
.dash-bar .dots i:nth-child(3) { background: #2BC24A; }
.dash-url { display: inline-flex; align-items: center; gap: .35rem; min-width: min(46%, 320px); justify-content: center; padding: .2rem .8rem; border-radius: 7px; background: rgba(255, 255, 255, .06); color: #AEB9CC; font-size: .72rem; }
.dash-url svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dash-side { border-right: 1px solid var(--line); padding: 1rem .7rem; background: rgba(0,0,0,.18); }
.dash-brand { display: flex; align-items: center; gap: .4rem; font-family: var(--font-display); font-weight: 600; margin-bottom: 1.2rem; }
.dash-brand svg { width: 14px; height: 14px; color: #fff; }
.dash-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.dash-side li { padding: .45rem .6rem; border-radius: 7px; color: var(--muted); }
.dash-side li.on { background: rgba(61, 123, 255, .16); color: #CFE0FF; }
.dash-main { padding: 1rem; min-width: 0; }
.dash-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.dash-head strong { font-family: var(--font-display); font-size: .95rem; font-weight: 600; }
.dash-range { margin-left: auto; padding: .25rem .6rem; border: 1px solid var(--line-2); border-radius: 6px; color: var(--muted); }

.live { display: inline-flex; align-items: center; gap: .35rem; color: #B7F5D8; font-size: .75rem; }
.live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2s var(--out) infinite; }
.live-dark { color: #157A55; }
@keyframes ping { from { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(3); } }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; background: rgba(255,255,255,.02); min-width: 0; }
.kpi small { display: block; color: var(--muted); margin-bottom: .25rem; }
.kpi b { display: block; font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .dim { color: var(--muted); font-size: .9rem; font-weight: 400; }
.kpi .up { color: var(--green); font-size: .72rem; }
.meter { height: 5px; margin-top: .55rem; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--cyan); border-radius: inherit; }
.spark { width: 100%; height: 22px; margin-top: .25rem; }

.dash-row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: .6rem; margin-top: .6rem; }
.dash-row-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.panel { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; background: rgba(255,255,255,.02); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: #C9D3E4; margin-bottom: .6rem; }
.legend { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .68rem; }
.legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.lg-a { background: var(--blue); }
.lg-b { background: transparent; border: 1px dashed var(--sky); margin-left: .35rem; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 112px; }
.bars .bar { flex: 1; min-width: 2px; height: 100%; transform: scaleY(.08); transform-origin: bottom; background: var(--blue); transition: transform .9s var(--out); }
.bars .bar.now { background: var(--cyan); }
.bars .target { position: absolute; left: 0; right: 0; bottom: 68%; border-top: 1px dashed rgba(155, 107, 255, .8); pointer-events: none; }
.status { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.status li { display: flex; justify-content: space-between; gap: .4rem; color: #C9D3E4; white-space: nowrap; }
.status span { font-size: .66rem !important; }
.status span { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; }
.status span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status .ok { color: var(--green); }
.status .warn { color: var(--amber); }
.status .bad { color: var(--red); }

/* Hero: clinic agenda */
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.agenda li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
.agenda time { color: var(--muted); font-variant-numeric: tabular-nums; }
.appt { min-width: 0; padding: .3rem .5rem; border-radius: 6px; border-left: 3px solid; background: rgba(255,255,255,.04); color: var(--muted); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt b { display: block; color: var(--text); font-weight: 500; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; }
.a-blue { border-color: var(--blue); }
.a-sky { border-color: var(--sky); }
.a-cyan { border-color: var(--cyan); }
.pill-s { font-size: .64rem; padding: .1rem .45rem; border-radius: 999px; white-space: nowrap; }
.pill-s.ok { background: rgba(52, 211, 153, .14); color: var(--green); }
.pill-s.warn { background: rgba(251, 191, 36, .14); color: var(--amber); }
.pill-s.new { background: rgba(61, 232, 242, .14); color: var(--cyan); }

/* Hero: sales channels */
.channels { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.channels li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 2.4rem; align-items: center; gap: .6rem; color: #C9D3E4; }
.channels i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(var(--blue), var(--blue)) 0 0 / var(--w) 100% no-repeat, rgba(255,255,255,.07); } /* taste-skill-ignore: a sized bar, one flat colour */
.channels b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

.node { display: none; }
.node small { display: block; color: #39465A; }
.node b { font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.node-led { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: blink 1.6s infinite; }
.node-led-cyan { background: #067C86; }
@keyframes blink { 50% { opacity: .35; } }

.alert {
  position: absolute; z-index: 2; right: 1rem; top: 62%;
  display: flex; gap: .75rem; align-items: flex-start;
  width: 250px;
  padding: .9rem 1rem;
  background: #18090D;
  border: 1px solid rgba(255, 90, 95, .5);
  border-radius: 14px;
  box-shadow: 0 16px 32px -14px rgba(0, 0, 0, .7);
  font-size: .82rem;
  opacity: 0; transform: translateY(10px) scale(.97);
  transition: opacity .25s var(--out), transform .25s var(--out);
}
.alert.show { opacity: 1; transform: none; }
.alert b { display: block; color: #FFB3B5; font-family: var(--font-display); font-weight: 600; }
.alert p { color: #E8C9CB; margin-top: .15rem; }
.alert-icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 90, 95, .18); }
.alert-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alert-wa, .alert-ok { background: #061814; border-color: rgba(52, 211, 153, .5); }
.alert-wa b, .alert-ok b { color: #A7F3D0; }
.alert-wa p, .alert-ok p { color: #CBE9DD; }
.alert-wa .alert-icon, .alert-ok .alert-icon { background: rgba(52, 211, 153, .16); }
.alert-wa .alert-icon svg, .alert-ok .alert-icon svg { stroke: var(--green); }

.tag-demo {
  position: absolute; right: .6rem; bottom: .6rem;
  font-size: .8125rem; font-weight: 500;
  padding: .15rem .5rem;
  background: #0A1120; color: #C9D3E4;
}
.hero-pause {
  position: absolute; z-index: 2; right: 0; top: 0;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; background: #172338; color: #F4F7FC; cursor: pointer;
  transition: transform 120ms var(--out), background-color .2s;
}
.hero-pause:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .hero-pause:hover { background: #223252; } }
.hero-pause svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-pause .ic-play, .hero-pause[aria-pressed="true"] .ic-pause { display: none; }
.hero-pause[aria-pressed="true"] .ic-play { display: block; fill: currentColor; }
.hero-visual.hold .live i::after, .hero-visual.hold .node-led { animation-play-state: paused !important; }

/* ========== Section scaffolding ========== */
.needs, .demos, .process, .cta { padding: clamp(4rem, 8vw, 8rem) 0; }
.needs, .process { padding-bottom: 0; }
.section-head { display: grid; gap: clamp(1rem, 2vw, 1.75rem); margin-bottom: clamp(2rem, 4.5vw, 4.5rem); }
.section-head h2 { font-size: var(--step-head); }
.section-note { max-width: 34em; font-size: var(--step-lead); line-height: 1.3; }

/* ========== Needs ========== */
/* Full-bleed bands, butted together. Hover fills one with a chapter colour. */
.need-list { list-style: none; margin: 0; padding: 0; }
.need-list a {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr) auto; align-items: center; gap: .75rem clamp(1.5rem, 3vw, 3rem);
  min-height: clamp(132px, 19vh, 190px);
  padding: 1.5rem var(--edge);
  background: #E3E9F0; color: var(--paper-ink);
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.need-list li:nth-child(even) a { background: var(--paper); }
.need-list a:focus-visible { outline-offset: -4px; }
.need-list h3 { font-size: clamp(1.75rem, 3.6vw, 3.75rem); }
.need-go { display: inline-flex; gap: .5rem; font-weight: 500; white-space: nowrap; }
.need-go::after { content: "→"; transition: transform .2s var(--out); }
@media (hover: hover) and (pointer: fine) { .need-list li:nth-child(1) a:hover, .need-list li:nth-child(4) a:hover { background: var(--cyan); color: #070D18; } }
@media (hover: hover) and (pointer: fine) { .need-list li:nth-child(2) a:hover { background: #1749C4; color: #fff; } }
@media (hover: hover) and (pointer: fine) { .need-list li:nth-child(3) a:hover { background: #070D18; color: #fff; } }
@media (hover: hover) and (pointer: fine) { .need-list a:hover .need-go::after { transform: translateX(4px); } }

/* ========== Demos ========== */
.showcase { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 1rem clamp(1.5rem, 3vw, 3rem); }

/* Tab list */
.demo-tabs { grid-row: 1 / 3; display: flex; flex-direction: column; gap: 2px; }
.demo-tab {
  position: relative; overflow: hidden; flex: none;
  min-height: 48px; padding: .6rem 1rem;
  border: 0; border-radius: 0;
  background: var(--quiet); color: var(--on);
  text-align: left; cursor: pointer;
  transition: transform 120ms var(--out), background-color .2s, color .2s;
}
.demo-tab:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .demo-tab:hover { background: #1A4BC7; } }
.demo-tab[aria-selected="true"] { background: #fff; color: var(--paper-ink); }
.demo-tab b { font-weight: 500; font-size: 1rem; }
.dt-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.dt-progress i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: #1749C4; }
.demo-tab[aria-selected="true"] .dt-progress i { animation: progress var(--demo-ms, 8000ms) linear forwards; }
.showcase.paused .demo-tab[aria-selected="true"] .dt-progress i { animation-play-state: paused; }
.showcase.manual .demo-tab[aria-selected="true"] .dt-progress i { animation: none; transform: scaleX(1); }
@keyframes progress { to { transform: scaleX(1); } }

/* Stage */
.stage-cap { font-size: var(--step-lead); line-height: 1.3; min-height: 1.3em; }
.stage { position: relative; min-height: 620px; }
.demo-panel {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease-out, transform .15s ease-out, visibility 0s .15s;
}
.demo-panel.active { opacity: 1; visibility: visible; transform: none; transition: opacity .22s var(--out), transform .25s var(--out), visibility 0s; }
.screen {
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: #0B1426;
  color: var(--text);
  overflow: hidden;
  font-size: .92rem;
}
.screen-light { background: #F8FAFC; color: var(--paper-ink); border-color: transparent; }
.screen-light .tag-demo { background: rgba(11, 20, 34, .82); color: #C4CEDE; }

/* Orders */
.app { display: grid; grid-template-columns: 170px minmax(0, 1fr); height: 100%; }
.app-side { background: #0D1729; color: var(--text); padding: 1.1rem .8rem; }
.app-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.app-side li { padding: .5rem .7rem; border-radius: 8px; color: var(--muted); font-size: .88rem; }
.app-side li.on { background: rgba(61, 123, 255, .2); color: #D6E4FF; }
.orders { padding: 1.3rem 1.5rem; height: 100%; display: flex; flex-direction: column; min-width: 0; }
.orders-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.orders-head strong { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.02em; }
.mini-btn { background: #2563EB; color: #fff; border: 0; border-radius: 8px; padding: .55rem .95rem; font-size: .85rem; font-weight: 600; cursor: pointer; transition: background .2s; }
@media (hover: hover) and (pointer: fine) { .mini-btn:hover:not(:disabled) { background: #2B66E8; } }
.mini-btn:disabled { background: #E1E6EE; color: #566072; cursor: not-allowed; }
.search { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--paper-line); background: #fff; border-radius: 8px; padding: 0 .75rem; }
.search svg { width: 15px; height: 15px; fill: none; stroke: #8792A5; stroke-width: 2; flex: none; }
.search input { border: 0; background: none; outline: none; width: 100%; padding: .6rem 0; font-size: .9rem; }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 123, 255, .15); }
.tabs { display: flex; gap: .3rem; margin: .9rem 0 .6rem; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; border: 1px solid transparent; background: none; padding: .4rem .75rem; border-radius: 7px; color: var(--paper-muted); font-size: .85rem; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tabs button:hover { color: var(--paper-ink); } }
.tabs button[aria-pressed="true"] { border-color: #1F55D8; color: #1F55D8; background: rgba(61, 123, 255, .07); font-weight: 600; }
.table-wrap { flex: 1; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 500; color: #566072; padding: .5rem .5rem; border-bottom: 1px solid var(--paper-line); font-size: .8rem; }
td { padding: .7rem .5rem; border-bottom: 1px solid #EBEFF4; white-space: nowrap; }
.r { text-align: right; }
tr.fresh td { animation: fresh 1.6s var(--ease); }
@keyframes fresh { from { background: rgba(61, 232, 242, .25); } to { background: transparent; } }
.pill { display: inline-block; white-space: nowrap; padding: .18rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.pill.prep { background: #DDF7EA; color: #157A55; }
.pill.pend { background: #FFF1CC; color: #946200; }
.pill.env { background: #DCE7FF; color: #2350C2; }
.empty { padding: 1.5rem .5rem; color: var(--paper-muted); }

/* Clinic */
.clinic { height: 100%; display: flex; flex-direction: column; }
.clinic-head { display: flex; align-items: baseline; gap: .8rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--paper-line); background: #fff; }
.clinic-head strong { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.02em; }
.clinic-sub { color: var(--paper-muted); font-size: .88rem; }
.clinic-head .live { margin-left: auto; font-size: .8rem; align-self: center; }
.clinic-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.clinic h4 { margin: 0; font-family: var(--font-display); font-size: .98rem; font-weight: 600; letter-spacing: -.01em; }
.booking { padding: 1rem 1.5rem 1.2rem; display: flex; flex-direction: column; gap: .7rem; overflow-y: auto; border-right: 1px solid var(--paper-line); }
.booking fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.booking legend { padding: 0; margin-bottom: .35rem; font-size: .76rem; font-weight: 500; color: var(--paper-muted); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips button, .slots button {
  border: 1px solid var(--paper-line); background: #fff; border-radius: 8px;
  padding: .38rem .6rem; font-size: .8rem; cursor: pointer; line-height: 1.25;
  transition: border-color .2s, background .2s, color .2s;
}
.chips button small { display: block; color: var(--paper-muted); font-size: .68rem; }
@media (hover: hover) and (pointer: fine) { .chips button:hover, .slots button:hover:not(:disabled) { border-color: #9DB4E8; } }
.chips button[aria-pressed="true"], .slots button[aria-pressed="true"] { border-color: var(--blue); background: rgba(61, 123, 255, .08); color: #1F4FC8; font-weight: 600; }
.chips button[aria-pressed="true"] small { color: #4A6FCF; font-weight: 400; }
.slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .3rem; }
.slots button { padding: .38rem 0; font-variant-numeric: tabular-nums; }
.slots button:disabled { background: #EEF1F5; color: #5F6979; text-decoration: line-through; cursor: not-allowed; border-color: transparent; }
.book-row { display: flex; gap: .4rem; margin-top: .1rem; }
.field { flex: 1; min-width: 0; }
.field input { width: 100%; border: 1px solid var(--paper-line); border-radius: 8px; padding: .5rem .7rem; font-size: .85rem; outline: none; background: #fff; }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 123, 255, .15); }
.book-msg { font-size: .8rem; color: #157A55; min-height: 1.2em; }
.book-msg:empty { display: none; }
.patients { display: flex; flex-direction: column; min-height: 0; background: #F2F5F9; }
.patients-head { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 1.25rem .6rem; }
.patients-head span { color: var(--paper-muted); font-size: .78rem; }
.patients ul { list-style: none; margin: 0; padding: 0 1rem 2.6rem; overflow-y: auto; display: grid; gap: .4rem; align-content: start; }
.patients li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .55rem .65rem; background: #fff; border: 1px solid var(--paper-line); border-radius: 10px; }
.patients li.fresh { animation: fresh 1.6s var(--ease); border-color: var(--cyan-2); }
.avatar-s { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: #fff; background: var(--blue); }
.patients li b { display: block; font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.patients li small { display: block; color: var(--paper-muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill.conf { background: #DDF7EA; color: #157A55; }
.pill.wait { background: #FFF1CC; color: #946200; }
.pill.newp { background: #D5F8FB; color: #0B7480; }

/* Chat */
.chat { height: 100%; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; border-left: 1px solid var(--paper-line); border-right: 1px solid var(--paper-line); }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--paper-line); background: #fff; }
.chat-head strong { font-family: var(--font-display); font-size: 1.05rem; }
.chat-head .live { margin-left: auto; font-size: .82rem; }
.chat-logo { width: 18px; height: 18px; color: var(--paper-ink); }
.chat-log { flex: 1; overflow-y: auto; padding: 1.2rem 1.25rem 2rem; display: flex; flex-direction: column; gap: .7rem; scroll-behavior: smooth; }
.msg { max-width: 76%; padding: .7rem .95rem; border-radius: 14px; line-height: 1.45; animation: pop .22s var(--out); }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--paper-line); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.handoff { align-self: stretch; max-width: none; display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px dashed #B8C4D6; }
.msg.handoff .avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.msg.handoff small { display: block; color: var(--paper-muted); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #9AA6B8; animation: dots 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-input { display: flex; gap: .5rem; padding: .85rem 1.25rem 2.6rem; border-top: 1px solid var(--paper-line); background: #fff; }
.chat-input input { flex: 1; min-width: 0; border: 1px solid var(--paper-line); border-radius: 10px; padding: .65rem .85rem; font-size: .92rem; outline: none; }
.chat-input input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 123, 255, .15); }
.chat-input button { flex: none; width: 42px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-input button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Sensors */
.sensors { padding: 1.3rem 1.5rem; height: 100%; display: flex; flex-direction: column; gap: 1rem; }
.sensors-head { display: flex; align-items: center; gap: .8rem; }
.sensors-head strong { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.02em; }
.sensors-head .live { font-size: .82rem; }
.sensors-head .dash-range { font-size: .8rem; }
.s-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.s-tile { border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; background: rgba(255,255,255,.025); min-width: 0; }
.s-tile small { color: var(--muted); font-size: .82rem; }
.s-tile b { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: .15rem 0 .4rem; }
.s-tile svg { width: 100%; height: 26px; }
.s-chart { flex: 1; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem 2.4rem; background: rgba(255,255,255,.02); min-height: 0; }
.s-chart small { color: var(--muted); font-size: .82rem; margin-bottom: .5rem; }
.s-chart svg { flex: 1; width: 100%; min-height: 0; overflow: visible; }
.gridlines line { stroke: rgba(150, 175, 215, .1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.threshold { stroke: rgba(255, 90, 95, .55); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.s-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; margin-top: .45rem; }

/* ---------- Hero: extra slides ---------- */
.rooms-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.rooms-mini span { padding: .5rem .6rem; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.rooms-mini span.on { color: #FFE7B3; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .14); }
.rooms-mini small { display: block; font-size: .66rem; color: var(--muted); }

.silos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.silo { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.silo-tank { position: relative; width: 100%; max-width: 46px; height: 78px; border: 1px solid var(--line-2); border-radius: 14px 14px 4px 4px; overflow: hidden; background: rgba(255,255,255,.03); }
.silo-tank i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); background: #F5C451; }
.silo small { color: var(--muted); font-size: .66rem; white-space: nowrap; }

.map { width: 100%; height: 112px; }
.roads path { stroke: rgba(150, 175, 215, .12); stroke-width: 6; fill: none; }
.route { fill: none; stroke-width: 2; stroke-dasharray: 4 4; }
.route-a { stroke: var(--cyan); }
.route-b { stroke: var(--sky); }
.depot { fill: var(--blue); }
.pin { fill: #fff; }
.truck { fill: var(--cyan); stroke: #04131A; stroke-width: 2; }
.truck-b { fill: var(--sky); }

.tickets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.ticket { display: flex; flex-direction: column; gap: .1rem; padding: .5rem; border-radius: 8px; background: rgba(255,255,255,.05); border-top: 3px solid var(--blue); font-size: .68rem; color: var(--muted); min-width: 0; }
.ticket b { color: var(--text); font-size: .76rem; font-weight: 600; }
.ticket em { margin-top: .3rem; font-style: normal; color: var(--green); }
.ticket.late { border-top-color: var(--amber); }
.ticket.late em { color: var(--amber); }
.ticket.new { border-top-color: var(--cyan); }
.ticket.new em { color: var(--cyan); }

.energy { width: 100%; height: 104px; }
.en-use { fill: rgba(61, 123, 255, .35); stroke: var(--blue); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.en-solar { fill: rgba(251, 191, 36, .35); stroke: var(--amber); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.lg-solar { background: var(--amber); margin-left: .35rem; }
.node-led-amber { background: #B97A00; }

/* ---------- Demo: facturas con IA ---------- */
.ocr { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ocr-doc { display: flex; flex-direction: column; gap: .8rem; padding: 1.2rem 1.4rem; background: #E9EDF3; min-height: 0; }
.ocr-doc .mini-btn { align-self: flex-start; }
.paper { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; border-radius: 6px; padding: 1rem 1.1rem; font-size: .74rem; color: #3A4556; }
.paper h5 { margin: 0; font-family: var(--font-display); font-size: .95rem; color: var(--paper-ink); }
.paper .p-type { float: right; border: 1.5px solid var(--paper-ink); color: var(--paper-ink); font-weight: 700; padding: .1rem .45rem; border-radius: 4px; }
.paper .p-meta { margin: .4rem 0 .7rem; line-height: 1.5; }
.paper table td { padding: .3rem .2rem; font-size: .72rem; border-bottom: 1px dashed #E1E6EE; }
.paper .p-total { margin-top: .6rem; text-align: right; font-weight: 700; color: var(--paper-ink); font-size: .85rem; }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 56px; pointer-events: none; opacity: 0; background: rgba(61, 232, 242, .25); border-bottom: 2px solid var(--cyan); }
.paper.scanning .scanline { opacity: 1; animation: scan 1.4s var(--ease) forwards; }
@keyframes scan { from { transform: translateY(-56px); } to { transform: translateY(420px); } }
.ocr-out { display: flex; flex-direction: column; gap: .7rem; padding: 1.2rem 1.4rem 2.6rem; min-height: 0; overflow-y: auto; }
.ocr-out h4, .flow h4, .ask h4, .access h4, .resv h4 { margin: 0; font-family: var(--font-display); font-size: .98rem; font-weight: 600; }
.fields { margin: 0; display: grid; gap: .4rem; }
.fields > div { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .45rem .6rem; border: 1px solid var(--paper-line); border-radius: 8px; background: #fff; }
.fields dt { color: var(--paper-muted); font-size: .76rem; }
.fields dd { margin: 0; font-weight: 600; font-size: .85rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fields .conf { font-size: .68rem; color: #157A55; background: #DDF7EA; border-radius: 999px; padding: .05rem .4rem; }
.fields .skel { display: block; height: .7rem; width: 70%; border-radius: 4px; background: #E6EAF0; }
.fields > div.got { animation: fresh 1.2s var(--ease); }
.fields .items { white-space: normal; font-weight: 500; font-size: .78rem; line-height: 1.4; }

/* ---------- Demo: flujos ---------- */
.flow { height: 100%; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.flow-main { padding: 1.2rem 1.4rem; overflow-y: auto; }
.flow-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.flow-head small { color: var(--paper-muted); font-size: .8rem; }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; position: relative; }
.flow-steps::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: var(--paper-line); }
.flow-steps li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .6rem .75rem .6rem .25rem; border-radius: 12px; transition: background .3s, opacity .3s; }
.flow-dot { position: relative; z-index: 1; width: 30px; height: 30px; margin-left: 5px; display: grid; place-items: center; border-radius: 9px; background: #fff; border: 1px solid var(--paper-line); transition: background .3s, border-color .3s; }
.flow-dot svg { width: 16px; height: 16px; fill: none; stroke: var(--paper-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow-text b { display: block; font-size: .9rem; font-weight: 600; }
.flow-text small { color: var(--paper-muted); font-size: .76rem; }
.flow-steps li.off { opacity: .5; }
.flow-steps li.running { background: rgba(61, 123, 255, .08); }
.flow-steps li.running .flow-dot { border-color: var(--blue); animation: blink 1s infinite; }
.flow-steps li.done .flow-dot { background: var(--green); border-color: var(--green); }
.flow-steps li.done .flow-dot svg { stroke: #fff; }
.flow-steps li.skipped .flow-dot { background: #EEF1F5; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; border: 0; background: #C9D2DF; cursor: pointer; flex: none; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--blue); }
.switch[aria-checked="true"] i { transform: translateX(16px); }
.flow-side { display: flex; flex-direction: column; gap: .6rem; padding: 1.2rem 1.25rem 2.6rem; background: #F2F5F9; border-left: 1px solid var(--paper-line); min-height: 0; }
.flow-stat { padding: .65rem .8rem; border-radius: 10px; background: #fff; border: 1px solid var(--paper-line); }
.flow-stat b { display: block; font-family: var(--font-display); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.flow-stat span { color: var(--paper-muted); font-size: .78rem; }
.flow-side h4 { margin-top: .4rem; }
.flow-log { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: .35rem; align-content: start; font-size: .78rem; min-height: 0; }
.flow-log li { padding: .4rem .55rem; border-radius: 7px; background: #fff; border: 1px solid var(--paper-line); animation: pop .3s var(--ease); }
.flow-log time { color: var(--paper-muted); margin-right: .35rem; font-variant-numeric: tabular-nums; }
.flow-log .skip { color: var(--paper-muted); }
.flow-log .ok { color: #157A55; }

/* ---------- Demo: reportes ---------- */
.ask { height: 100%; display: flex; flex-direction: column; gap: .8rem; padding: 1.2rem 1.5rem 2.6rem; min-height: 0; }
.ask-head small { color: var(--paper-muted); font-size: .8rem; }
.ask-form { padding: 0; border: 0; background: none; }
.ask-suggest button { text-align: left; }
.answer { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.1rem; border: 1px solid var(--paper-line); border-radius: 12px; background: #fff; }
.answer-empty { color: var(--paper-muted); font-size: .88rem; }
.answer > p { font-size: .92rem; line-height: 1.5; max-width: 60ch; }
.answer .q { color: var(--paper-muted); font-size: .8rem; margin-bottom: .35rem; }
.hbars { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .55rem; }
.hbars li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 4.2rem; gap: .6rem; align-items: center; font-size: .82rem; }
.hbars i { display: block; height: 12px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--out); }
.hbars b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.line-chart { width: 100%; height: 150px; margin-top: 1rem; overflow: visible; }
.line-chart polyline { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.line-chart .ly-now { stroke: var(--blue); }
.line-chart .ly-prev { stroke: #B5C0D0; stroke-dasharray: 5 4; }
.line-legend { display: flex; gap: 1rem; font-size: .76rem; color: var(--paper-muted); margin-top: .4rem; }
.line-legend i { display: inline-block; width: 14px; height: 3px; margin-right: .35rem; vertical-align: middle; background: var(--blue); }
.line-legend i.prev { background: #B5C0D0; }
.thinking { display: inline-flex; align-items: center; gap: .5rem; color: var(--paper-muted); font-size: .88rem; }

/* ---------- Demo: casa inteligente ---------- */
.home { height: 100%; display: flex; flex-direction: column; padding: 1.2rem 1.4rem 2.4rem; gap: .9rem; min-height: 0; }
.home-head { display: flex; align-items: center; gap: .8rem; }
.home-head strong { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.02em; }
.home-power { margin-left: auto; color: var(--muted); font-size: .82rem; }
.home-power b { color: var(--text); font-variant-numeric: tabular-nums; }
.home-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; }
.scenes { margin-bottom: .75rem; }
.scenes button { background: rgba(255,255,255,.04); border-color: var(--line-2); color: #C9D3E4; }
@media (hover: hover) and (pointer: fine) { .scenes button:hover { border-color: rgba(61, 232, 242, .5); } }
.scenes button[aria-pressed="true"] { background: rgba(61, 232, 242, .12); border-color: var(--cyan); color: #fff; }
.plan { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 6px; height: calc(100% - 3rem); min-height: 220px; padding: 6px; border-radius: 14px; background: #1A2640; }
.room {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  padding: .7rem .8rem; border: 0; border-radius: 9px; text-align: left; cursor: pointer;
  background: #0E182B; color: var(--muted);
  transition: background-color .2s, color .2s;
}
.room:nth-child(1) { grid-row: span 2; }
.room > span { display: grid; gap: .1rem; min-width: 0; }
.room b { color: #C9D3E4; font-size: .9rem; font-weight: 600; }
.room small { font-size: .74rem; }
.room svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.room[aria-pressed="true"] { color: #FFE7B3; background: #4A3A12; }
.room[aria-pressed="true"] b { color: #fff; }
.home-side { display: flex; flex-direction: column; gap: .55rem; min-height: 0; }
.hcard { position: relative; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.hcard small { display: block; color: var(--muted); font-size: .76rem; margin-bottom: .3rem; }
.hcard > b { font-family: var(--font-display); font-size: 1.05rem; }
.hcard .switch { position: absolute; top: .65rem; right: .7rem; background: #2A3753; }
.hcard .switch[aria-checked="true"] { background: var(--cyan-2); }
.thermo { display: flex; align-items: center; gap: .7rem; }
.thermo b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4.2rem; text-align: center; }
.thermo button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--text); font-size: 1.1rem; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .thermo button:hover { border-color: var(--cyan); } }
.hcard.off .thermo { opacity: .4; }
.alarm-off { color: var(--muted); }
.alarm-on { color: var(--green); }
.hcard input[type="range"] { width: 100%; accent-color: var(--cyan); }
.blinds-val { color: var(--muted); font-size: .76rem; }
.home-msg { font-size: .8rem; color: #A7F3D0; min-height: 1.2em; }

/* ---------- Demo: mantenimiento ---------- */
.mant { height: 100%; display: flex; flex-direction: column; }
.mant-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--paper-line); background: #fff; }
.mant-head strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em; }
.mant-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.mant-body .table-wrap { padding: .6rem 1.2rem 1rem; }
.mant-table td { white-space: normal; }
.mant-table td:first-child b { display: block; font-weight: 600; }
.mant-table td:first-child small { color: var(--paper-muted); font-size: .74rem; }
.usage { display: grid; gap: .25rem; min-width: 120px; }
.usage i { display: block; height: 7px; border-radius: 4px; background: linear-gradient(var(--blue), var(--blue)) 0 0 / var(--u) 100% no-repeat, #E6EAF0; } /* taste-skill-ignore: a sized bar, one flat colour */
.usage.warn i { background-image: linear-gradient(90deg, var(--amber), var(--amber)); }
.usage.bad i { background-image: linear-gradient(90deg, var(--red), var(--red)); }
.usage small { color: var(--paper-muted); font-size: .74rem; font-variant-numeric: tabular-nums; }
.pill.okm { background: #DDF7EA; color: #157A55; }
.pill.soon { background: #FFF1CC; color: #946200; }
.pill.due { background: #FFE1E1; color: #B42318; }
.ot { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; }
.ot.closed { opacity: .55; }
.ot .mini-btn { padding: .35rem .6rem; font-size: .74rem; }

/* ---------- Demo: control de acceso ---------- */
.access { height: 100%; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.access-main { display: flex; flex-direction: column; gap: .8rem; padding: 1.2rem 1.4rem; min-height: 0; }
.access-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.access-kpis div { padding: .6rem .75rem; border: 1px solid var(--paper-line); border-radius: 10px; background: #fff; }
.access-kpis small { display: block; color: var(--paper-muted); font-size: .74rem; }
.access-kpis b { font-family: var(--font-display); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.access-kpis .dim { color: var(--paper-muted); font-size: .9rem; font-weight: 400; }
.acc-list { list-style: none; margin: 0; padding: 0 0 2rem; display: grid; gap: .35rem; overflow-y: auto; align-content: start; min-height: 0; }
.acc-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem .6rem; background: #fff; border: 1px solid var(--paper-line); border-radius: 10px; }
.acc-list li.fresh { animation: fresh 1.6s var(--ease); }
.acc-list b { display: block; font-size: .85rem; font-weight: 600; }
.acc-list small { color: var(--paper-muted); font-size: .74rem; }
.acc-list .acc-time { text-align: right; font-size: .78rem; font-variant-numeric: tabular-nums; }
.acc-list .in { color: #157A55; }
.acc-list .out { color: #2350C2; }
.acc-list .denied { color: #B42318; }
.access-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.2rem 1.2rem 2.6rem; background: #E9EDF3; }
.terminal { width: 100%; max-width: 210px; padding: 14px 14px 18px; border-radius: 22px; background: #141D2E; }
.term-screen { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding: 1.2rem .8rem; border-radius: 12px; background: #0B1426; color: var(--muted); min-height: 150px; justify-content: center; transition: background .3s; }
.term-screen svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.term-screen b { color: var(--text); font-size: .95rem; }
.term-screen small { font-size: .74rem; }
.term-screen.ok { background: #063B2C; color: #A7F3D0; }
.term-screen.no { background: #3D0D12; color: #FFB3B5; }
.term-reader { width: 56px; height: 56px; margin: 14px auto 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.12); background: rgba(61, 232, 242, .16); }

/* ---------- Demo: reservas ---------- */
.resv { height: 100%; display: flex; flex-direction: column; }
.resv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.resv-main { display: flex; flex-direction: column; gap: .8rem; padding: 1rem 1.4rem; min-height: 0; overflow-y: auto; }
.resv-grid { display: grid; grid-template-columns: 3.2rem repeat(3, minmax(0, 1fr)); gap: 4px; font-size: .8rem; }
.resv-grid .h { color: var(--paper-muted); font-size: .74rem; display: grid; align-items: center; font-variant-numeric: tabular-nums; }
.resv-grid .ch { text-align: center; color: var(--paper-muted); font-size: .76rem; font-weight: 500; padding-bottom: .1rem; }
.resv-grid button { height: 34px; border-radius: 7px; border: 1px solid var(--paper-line); background: #fff; cursor: pointer; font-size: .74rem; color: var(--paper-muted); transition: background .2s, border-color .2s; }
@media (hover: hover) and (pointer: fine) { .resv-grid button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); } }
.resv-grid button:disabled { background: #E6EAF0; border-color: transparent; color: #586374; cursor: not-allowed; }
.resv-grid button[aria-pressed="true"] { background: rgba(61, 123, 255, .1); border-color: var(--blue); color: #1F4FC8; font-weight: 600; }
.resv-grid button.mine { background: var(--cyan); border-color: var(--cyan-2); color: #04131A; font-weight: 600; }
.resv-legend { display: flex; gap: 1rem; font-size: .74rem; color: var(--paper-muted); }
.resv-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; border: 1px solid var(--paper-line); }
.lg-free { background: #fff; }
.lg-busy { background: #E6EAF0; }
.lg-mine { background: var(--cyan); border-color: var(--cyan-2) !important; }
.resv-side { display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.25rem 2.6rem; background: #F2F5F9; border-left: 1px solid var(--paper-line); }
.resv-side .mini-btn { align-self: stretch; padding: .65rem; }
.summary { margin: 0; display: grid; gap: .35rem; font-size: .85rem; }
.summary div { display: flex; justify-content: space-between; gap: .5rem; }
.summary dt { color: var(--paper-muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.summary .tot { margin-top: .3rem; padding-top: .5rem; border-top: 1px solid var(--paper-line); }

/* ---------- Many-demo layout ---------- */
.demo-panel > :first-child { min-height: 0; }

@media (max-width: 680px) {
  .demo-panel > :first-child { overflow-y: auto; height: 100%; }
  .ocr, .flow, .access, .mant-body, .resv-body, .home-body { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ocr, .flow, .access { min-height: 100%; }
  .flow-main, .ocr-out, .resv-main, .access-main, .acc-list, .flow-log, .answer { overflow: visible; }
  .flow-log { max-height: none; }
  .paper { min-height: 260px; flex: none; }
  .flow-side, .resv-side { border-left: 0; border-top: 1px solid var(--paper-line); }
  .flow-main, .ocr-doc, .ocr-out, .access-main, .resv-main, .ask { padding: 1rem; }
  .access-kpis b { font-size: 1.05rem; }
  .terminal { max-width: 180px; }
  .plan { height: 260px; }
  .home { padding: 1rem 1rem 2.4rem; }
  .home-power { display: none; }
  .hbars li { grid-template-columns: 6.5rem minmax(0, 1fr) 3.6rem; }
  .mant-head { padding: 1rem; }
  .mant-body .table-wrap { padding: .5rem 1rem; }
}

/* ========== Process ========== */
/* One card, four colour fields: the same project, further along in each. */
.process .section-head { margin-bottom: clamp(2rem, 4vw, 4rem); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps > li { display: flex; flex-direction: column; min-height: clamp(400px, 54svh, 560px); padding: clamp(1.5rem, 2.5vw, 2.5rem) var(--gutter); }
.steps > li:first-child { padding-left: var(--edge); }
.steps > li:last-child { padding-right: var(--edge); }
.step-card {
  display: grid; gap: .55rem;
  width: min(100%, 280px); padding: 1rem;
  border-radius: var(--r-md);
  background: #fff; color: var(--paper-ink);
  font-size: .9375rem; line-height: 1.3;
  transition: transform .15s var(--out);
}
@media (hover: hover) and (pointer: fine) { .steps > li:hover .step-card { transform: translateY(-6px); } }
.step-card > b { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; }
.step-state { justify-self: start; padding: .1rem .55rem; border-radius: 999px; background: #DCE7FF; color: #173FA6; font-size: .8125rem; font-weight: 500; }
.step-card ul { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .35rem; }
.step-card li { display: flex; align-items: center; gap: .5rem; }
.step-card li::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #AEB8C7; }
.step-card li.ok::before { border-color: #157A55; background: #157A55; }
.steps h3 { margin-top: auto; padding-top: 2.5rem; font-size: var(--step-lead); }
.steps > li > p { margin-top: .6rem; max-width: 30ch; }

/* ========== Contact ========== */
.cta-panel { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2rem clamp(2rem, 5vw, 6rem); align-items: start; }
.cta-copy p { font-size: var(--step-lead); line-height: 1.3; max-width: 26em; }
.cta-mail { display: block; margin-top: 1.5rem; }
.cta-wa { margin-top: 1rem; }

/* Wizard: sits straight on the cyan field; white fills instead of outlined boxes. */
.wizard[hidden] { display: none; }
.wz-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.wz-bar i { height: 6px; background: rgba(255, 255, 255, .22); transition: background-color .2s; }
.wz-bar i.on { background: #3DE8F2; }
.wz-count { margin-top: .7rem; }
.wz-step { margin-top: .35rem; }
.wz-step h3 { font-size: var(--step-lead); outline: none; }
.wz-hint { margin-top: .5rem; }
.wz-options { display: grid; gap: 2px; margin-top: 1rem; }
.wz-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wz-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wz-opt { position: relative; display: block; cursor: pointer; transition: transform 120ms var(--out); }
.wz-opt:active { transform: scale(.98); }
.wz-opt input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.wz-opt span {
  display: flex; align-items: center; height: 100%; min-height: 54px; padding: .6rem 1rem;
  background: #fff; color: var(--paper-ink); line-height: 1.25;
  transition: background-color .15s, color .15s;
}
@media (hover: hover) and (pointer: fine) { .wz-opt:hover span { background: #D9FBFD; } }
.wz-opt input:checked + span { color: #070D18; background: #3DE8F2; }
.wz-opt input:focus-visible + span { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.wz-recs { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 2px; }
.wz-recs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .9rem 1rem; background: #fff; color: var(--paper-ink); }
.wz-recs b { display: block; font-weight: 600; }
.wz-recs small { display: block; font-size: 1rem; line-height: 1.35; }
.wz-recs a { color: #1749C4; font-weight: 500; white-space: nowrap; }
/* Live preview of the message, styled as a chat bubble. */
.wz-preview { margin-top: 1.25rem; }
.wz-preview-label { display: block; font-size: .9375rem; opacity: .85; }
.wz-bubble {
  position: relative; margin: .5rem 0 0; padding: .85rem 1rem; max-width: 46ch;
  background: #DCF8C6; color: #0B1A10; border-radius: 0 12px 12px 12px;
  white-space: pre-line; line-height: 1.45; font-size: .9375rem;
}
.wz-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: 1rem; }
.wz-wide { grid-column: 1 / -1; }
.wz-field span { display: block; margin-bottom: .3rem; font-weight: 500; }
.wz-field em { font-style: normal; font-weight: 400; }
.wz-field input, .wz-field textarea { width: 100%; min-height: 48px; padding: .6rem .85rem; border: 1px solid rgba(7, 13, 24, .45); border-radius: 0; background: #fff; color: var(--paper-ink); font: inherit; outline: none; resize: vertical; }
.wz-field input:focus, .wz-field textarea:focus { border-color: #070D18; outline: 2px solid #3DE8F2; outline-offset: 0; }
.wz-field [aria-invalid="true"], .wz-field [aria-invalid="true"]:focus { border-color: #A3121C; outline: 2px solid #FFB3B8; outline-offset: 0; }
.wz-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wz-error { margin-top: .8rem; color: #FFC9CC; font-weight: 500; }
.wz-error:empty { display: none; }
.wz-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }
#wz-back { margin-right: auto; }
.btn { cursor: pointer; font-family: inherit; }
.wz-done p { margin-top: .5rem; }
.wz-done-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* ========== Footer ========== */
.footer { padding: clamp(3rem, 5vw, 5rem) 0 calc(clamp(1.5rem, 3vw, 3rem) + env(safe-area-inset-bottom)); }
.footer-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; margin-bottom: clamp(3rem, 7vw, 7rem); }
.footer nav { display: flex; gap: .75rem 2rem; flex-wrap: wrap; }
.footer nav a { text-decoration: none; text-underline-offset: .3em; }
@media (hover: hover) and (pointer: fine) { .footer nav a:hover { text-decoration: underline; } }
.footer-mark { display: flex; align-items: center; gap: .16em; font-family: var(--font-display); font-size: 11.5vw; line-height: 1; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.footer-mark b { font-weight: 600; }
.footer-mark span { font-weight: 400; }
.footer-mark .brand-mark { flex: none; width: .86em; height: .86em; }
@media (min-width: 1760px) { .footer-mark { font-size: 202px; } }

/* ========== Motion ========== */
@keyframes intro-rise { from { opacity: 0; translate: 0 var(--y, 12px); } }
@media (prefers-reduced-motion: no-preference) {
  /* The message, then the demo. Only "from" states, so content can't get stuck hidden. */
  .hero h1 { animation: intro-rise .6s .02s var(--out) backwards; --y: 18px; }
  .lede { animation: intro-rise .5s .12s var(--out) backwards; --y: 12px; }
  .hero-actions { animation: intro-rise .5s .18s var(--out) backwards; --y: 12px; }
  .hero-pick { animation: intro-rise .4s .24s var(--out) backwards; --y: 6px; }
  .slides { animation: intro-rise .6s .32s var(--out) backwards; --y: 24px; }

  .rv { opacity: 0; translate: 0 20px; }
  .rv.in { opacity: 1; translate: 0 0; transition: opacity .5s var(--out) var(--d, 0ms), translate .6s var(--out) var(--d, 0ms); }
}

/* ========== Responsive ========== */
@media (max-width: 1080px) {
  .cta-panel { grid-template-columns: minmax(0, 1fr); }
  .alert { right: .75rem; top: auto; bottom: 5rem; }
  .need-list a { grid-template-columns: minmax(0, 1fr) auto; }
  .need-list h3 { grid-column: 1 / -1; }
  .showcase { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .demo-tabs { grid-row: auto; flex-flow: row wrap; }
  .demo-tab { flex: 1 1 auto; }
  .stage { min-height: 0; height: 600px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps > li, .steps > li:first-child, .steps > li:last-child { min-height: 0; padding-inline: var(--gutter); }
  .steps h3 { padding-top: 2rem; }
}

@media (max-width: 820px) {
  .hero-tools { top: -2.5rem; }
  .slides { margin-top: 2.5rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .dash { grid-template-columns: minmax(0, 1fr); font-size: .8125rem; }
  .dash-side { display: none; }
  .dash-row { grid-template-columns: minmax(0, 1fr); }
  .status-panel { display: none; }
  .kpi b { font-size: 1.15rem; }
  .dash-range { display: none; }
  .node { display: none; }
  .alert { right: .25rem; bottom: 4rem; width: 220px; font-size: .8125rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .need-list a { grid-template-columns: minmax(0, 1fr); }
  .wz-3, .wz-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wz-fields { grid-template-columns: minmax(0, 1fr); }
  .wz-recs li { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
  .wz-actions .btn { flex: 1 1 auto; }
  #wz-back { margin-right: 0; }
  .demo-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-tab b { font-size: .9375rem; line-height: 1.2; display: block; }
  .stage { height: 600px; }
  .screen { font-size: .875rem; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-side, .col-date { display: none; }
  .orders, .sensors { padding: 1rem; }
  .s-tiles { gap: .4rem; }
  .s-tile { padding: .6rem .65rem; }
  .s-tile b { font-size: 1.15rem; }
  .sensors-head .dash-range { display: none; }
  .msg { max-width: 88%; }
  .clinic-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .clinic-sub, .clinic-head .live { display: none; }
  .booking { padding: 1rem; border-right: 0; overflow: visible; }
  .patients ul { overflow: visible; }
  .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps > li { min-height: 0; padding-block: 2.5rem; }
  .steps h3 { margin-top: 0; padding-top: 1.75rem; }
}

/* Phones: inputs under 16px make iOS zoom the page on focus. */
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide:not(.active), .demo-panel:not(.active) { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
