/* ============================================================
   MAPONOS receptionist-first redesign (branch experiment)
   Ink deepened to near-black; teal/mint rim-light accents;
   bento cards, floating pill nav, giant type with serif accents.
   ============================================================ */
:root {
  --ink: #05090F;
  --ink-2: #0B1420;
  --ink-3: #101E2E;
  --teal: #00A896;
  --teal-bright: #00C2AD;
  --mint: #8FD8CE;
  --white: #ffffff;
  --text: #E7EEF4;
  --text-dim: #8CA0B3;
  --line: rgba(231, 238, 244, 0.09);
  --radius: 24px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dock-w: 396px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--teal); color: #fff; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--teal); font-weight: 600; }

.serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--mint);
}

.teal { color: var(--teal); }
.muted-inline { color: var(--text-dim); font-weight: 500; font-size: 0.8em; }

.grad-text {
  background: linear-gradient(100deg, var(--teal) 10%, var(--mint) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- shell: page + chat dock ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--dock-w);
  min-height: 100dvh;
}
.page { min-width: 0; }

.dock {
  position: sticky;
  top: 0;
  height: 100dvh;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(30rem 20rem at 100% 0%, rgba(0, 168, 150, 0.09), transparent 65%),
    var(--ink-2);
}

@media (max-width: 1180px) {
  .shell { grid-template-columns: 1fr; }
  .dock { display: none; }
}

/* ---------- typography ---------- */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.2rem;
}

.section {
  padding: clamp(5rem, 9vw, 8rem) clamp(1.4rem, 5vw, 5rem);
  max-width: 1180px;
  margin: 0 auto;
}

.section__title {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: var(--white);
  text-wrap: balance;
}
.section__title .serif { font-size: 1.04em; }

.section__sub {
  max-width: 40rem;
  margin: 1.5rem 0 0;
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  color: var(--text-dim);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  white-space: nowrap;
}
.btn--large { padding: 1.05rem 2.1rem; font-size: 1rem; }
.btn--small { padding: 0.5rem 1.15rem; font-size: 0.84rem; }
.btn--primary {
  background: linear-gradient(120deg, var(--teal), var(--teal-bright));
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(0, 168, 150, 0.55);
}
.btn--primary:hover { box-shadow: 0 16px 44px -8px rgba(0, 168, 150, 0.8); transform: translateY(-2px); }
.btn--ghost {
  color: var(--text);
  border: 1px solid rgba(231, 238, 244, 0.2);
  background: rgba(231, 238, 244, 0.04);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--mint); color: var(--mint); transform: translateY(-2px); }

/* ---------- floating pill nav ---------- */
.nav {
  position: sticky;
  top: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin: 1rem auto 0;
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 20, 32, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
}
.nav__brand { display: flex; align-items: center; gap: 0.55rem; }
.logo-mark { width: 36px; height: auto; }
.nav__name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.nav__links { display: flex; gap: 1.3rem; }
.nav__links a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--white); }
@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 80px);
  display: flex;
  align-items: center;
  padding: 4rem clamp(1.4rem, 5vw, 5rem) 5rem;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero__cube {
  position: absolute;
  border-radius: 26%;
  pointer-events: none;
  filter: saturate(1.1);
  animation: cubefloat 9s ease-in-out infinite;
}
.hero__cube--1 {
  width: 110px; height: 110px;
  right: 12%; top: 16%;
  background: linear-gradient(140deg, #123049, #0E4C46 55%, var(--teal));
  box-shadow: inset 0 2px 14px rgba(143, 216, 206, 0.5), 0 30px 60px -20px rgba(0, 168, 150, 0.5);
  transform: rotate(14deg);
}
.hero__cube--2 {
  width: 64px; height: 64px;
  left: 4%; top: 58%;
  background: linear-gradient(140deg, #0E4C46, var(--teal) 70%, var(--mint));
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.35), 0 24px 50px -18px rgba(0, 168, 150, 0.6);
  transform: rotate(-18deg);
  animation-delay: -3s;
}
.hero__cube--3 {
  width: 42px; height: 42px;
  right: 30%; bottom: 14%;
  background: linear-gradient(140deg, var(--mint), #4CC9BB);
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.5), 0 18px 40px -14px rgba(143, 216, 206, 0.55);
  transform: rotate(24deg);
  animation-delay: -6s;
}
@keyframes cubefloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

.hero__content { position: relative; z-index: 2; max-width: 46rem; }
.hero__title {
  font-size: clamp(3rem, 7.2vw, 6.6rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.96;
  color: var(--white);
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.hero__title .serif { font-size: 1.05em; }
.hero__sub {
  max-width: 34rem;
  margin: 1.8rem 0 0;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-dim);
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.4rem;
}
.hero__hint {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mint);
}
.hero__hint::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  margin-right: 0.5rem;
  vertical-align: 2px;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero__scrollhint {
  position: absolute;
  bottom: 1.6rem;
  left: clamp(1.4rem, 5vw, 5rem);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- marquee ---------- */
.marquee {
  background: var(--teal);
  overflow: hidden;
  padding: 0.85rem 0;
  transform: rotate(-1deg) scale(1.02);
  position: relative;
  z-index: 3;
  box-shadow: 0 18px 50px -20px rgba(0, 168, 150, 0.6);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee__track span {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #04352f;
}
.marquee__track i { font-style: normal; color: rgba(255, 255, 255, 0.75); font-size: 0.55rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-top: 3.2rem;
}
.bento__card {
  grid-column: span 2;
  padding: 1.7rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-2), rgba(16, 30, 46, 0.55));
  transition: transform 0.4s var(--ease-out), border-color 0.3s, box-shadow 0.4s var(--ease-out);
}
.bento__card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 168, 150, 0.4);
  box-shadow: 0 24px 60px -24px rgba(0, 168, 150, 0.35);
}
.bento__card h3 {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 0.45rem;
}
.bento__card p { font-size: 0.88rem; color: var(--text-dim); }

.bento__card--video {
  grid-column: span 4;
  grid-row: span 2;
  padding: 0;
  overflow: hidden;
  position: relative;
  background: var(--ink-2);
}
.bento__card--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.bento__card--video figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.6rem 1.6rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(to top, rgba(5, 9, 15, 0.9), transparent);
}

.bento__card--stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.4rem;
  background:
    radial-gradient(16rem 10rem at 80% 0%, rgba(0, 168, 150, 0.18), transparent 70%),
    linear-gradient(160deg, var(--ink-2), rgba(16, 30, 46, 0.55));
}
.bento__big {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
}

.bento__card--wide { grid-column: span 4; }

.bento__card--welsh {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.4rem;
  align-items: center;
  background:
    radial-gradient(20rem 12rem at 0% 100%, rgba(143, 216, 206, 0.12), transparent 70%),
    linear-gradient(160deg, var(--ink-2), rgba(16, 30, 46, 0.55));
}
.bento__card--welsh .welsh__text p { margin-top: 0.45rem; }
.welsh__points {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.welsh__points li {
  font-size: 0.84rem;
  color: var(--text);
  padding: 0.55rem 0.8rem 0.55rem 2rem;
  border: 1px solid rgba(143, 216, 206, 0.22);
  border-radius: 12px;
  background: rgba(143, 216, 206, 0.05);
  position: relative;
}
.welsh__points li::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(143, 216, 206, 0.8);
}
@media (max-width: 900px) {
  .bento__card--welsh { grid-template-columns: 1fr; }
}

.bento__card--cta {
  grid-column: span 2;
  background:
    radial-gradient(18rem 12rem at 20% 0%, rgba(0, 168, 150, 0.28), transparent 70%),
    linear-gradient(160deg, #0C2B33, #0B1F2C);
  border-color: rgba(0, 168, 150, 0.45);
}
.bento__card--cta .btn { margin-top: 1rem; }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__card, .bento__card--wide, .bento__card--cta { grid-column: span 2; }
  .bento__card--video { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 9; }
}

/* ---------- calculator (dark port) ---------- */
.calc {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.2rem;
  margin-top: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }

.calc__panel {
  padding: 1.9rem 1.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-2), rgba(16, 30, 46, 0.55));
}
.calc__panel-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.6rem;
}
.calc__panel-title::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 0.55rem;
  box-shadow: 0 0 10px rgba(0, 168, 150, 0.6);
}

.calc-field { margin-bottom: 1.5rem; }
.calc-field:last-child { margin-bottom: 0; }
.calc-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.calc-field__head label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.calc-field__head output { font-size: 1rem; font-weight: 800; color: var(--mint); white-space: nowrap; }
.calc-field__hint { font-size: 0.76rem; color: var(--text-dim); margin-top: 0.1rem; }

.calc-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin-top: 0.5rem;
  background: transparent;
  cursor: pointer;
  --fill: 16%;
}
.calc-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--teal) var(--fill), rgba(231, 238, 244, 0.12) var(--fill));
}
.calc-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--teal);
  box-shadow: 0 2px 12px rgba(0, 168, 150, 0.6);
  transition: transform 0.2s var(--ease-out);
}
.calc-field input[type="range"]:active::-webkit-slider-thumb,
.calc-field input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.15); }
.calc-field input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(231, 238, 244, 0.12);
}
.calc-field input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--teal);
}
.calc-field input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--teal);
}
.calc-field input[type="range"]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 6px;
}

.calc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}
.calc-stat {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(0, 168, 150, 0.08);
  border: 1px solid rgba(0, 168, 150, 0.25);
}
.calc-stat__num {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.calc-stat__label { display: block; font-size: 0.74rem; color: var(--text-dim); margin-top: 0.15rem; }

.calc-rows { border-top: 1px solid var(--line); margin-bottom: 1.3rem; }
.calc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.calc-row dt { font-size: 0.88rem; color: var(--text-dim); }
.calc-row dd { font-size: 1rem; font-weight: 700; color: var(--white); white-space: nowrap; }

.calc-total__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.calc-total__row span { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.calc-total__row b { font-size: 1.3rem; font-weight: 800; color: var(--white); }
.calc-total__row--big { margin-top: 0.35rem; }
.calc-total__row--big b { font-size: clamp(2.1rem, 3.6vw, 2.9rem); letter-spacing: -0.03em; }

.calc-note {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin: 1.1rem 0 1.4rem;
  padding: 0.8rem 1rem;
  background: rgba(231, 238, 244, 0.03);
  border-left: 3px solid rgba(0, 168, 150, 0.5);
  border-radius: 10px;
}
.calc__cta { width: 100%; }

/* ---------- offers index ---------- */
.index { margin-top: 3rem; border-top: 1px solid var(--line); }
.index__row {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.6rem, 3vw, 2.4rem) 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, padding-left 0.35s var(--ease-out);
}
.index__row:hover { background: rgba(0, 168, 150, 0.04); padding-left: 1rem; }
.index__num {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 0.08em;
}
.index__body { flex: 1; min-width: 0; }
.index__title {
  display: block;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--white);
}
.index__desc {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-dim);
  max-width: 34rem;
}
.index__arrow {
  font-size: 1.6rem;
  color: var(--text-dim);
  transition: transform 0.35s var(--ease-out), color 0.3s;
}
.index__row:hover .index__arrow { transform: translateX(8px); color: var(--mint); }

.proof {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.4rem;
}
@media (max-width: 720px) { .proof { grid-template-columns: 1fr; } }
.proof__card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
}
.proof__card video { width: 100%; height: 100%; object-fit: cover; }
.proof__card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.2rem 1.3rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(to top, rgba(5, 9, 15, 0.9), transparent);
}

/* ---------- steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.steps__item {
  padding: 1.8rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-2), rgba(16, 30, 46, 0.55));
}
.steps__num {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--mint);
  border: 1px solid rgba(0, 168, 150, 0.5);
  box-shadow: 0 0 20px rgba(0, 168, 150, 0.3);
  margin-bottom: 1rem;
}
.steps__item h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.steps__item p { font-size: 0.88rem; color: var(--text-dim); }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: clamp(6rem, 11vw, 9rem) clamp(1.4rem, 5vw, 5rem);
  text-align: center;
  background:
    radial-gradient(46rem 24rem at 50% 115%, rgba(0, 168, 150, 0.22), transparent 65%),
    transparent;
  overflow: hidden;
}
.cta__title {
  font-size: clamp(3rem, 7.5vw, 6.4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.96;
  color: var(--white);
}
.cta__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.6rem;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.6rem clamp(1.4rem, 5vw, 5rem);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--text-dim);
}
.footer__brand { display: flex; align-items: center; gap: 0.7rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-left: auto; }
.footer__links a { font-size: 0.84rem; font-weight: 600; transition: color 0.2s; }
.footer__links a:hover { color: var(--mint); }
.footer__legal { width: 100%; font-size: 0.75rem; opacity: 0.6; }

/* ---------- chat: shared panel pieces ---------- */
.chatui {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.chatui__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.05rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.chatui__head b { font-size: 0.95rem; font-weight: 800; color: var(--white); display: block; }
.chatui__status {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}
.chatui__status::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  margin-right: 0.4rem;
  vertical-align: 1px;
}
.chatui__headright { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.chatui__head { flex-wrap: wrap; }
.chatui__voicepick {
  flex: 1 1 100%;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(231, 238, 244, 0.05);
  border: 1px solid rgba(231, 238, 244, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  color-scheme: dark;
  transition: border-color 0.2s;
}
.chatui__voicepick:hover, .chatui__voicepick:focus-visible { border-color: var(--mint); outline: none; }
.chatui__voicepick[hidden] { display: none; }
.chatui__voice {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(231, 238, 244, 0.2);
  border-radius: 50%;
  background: rgba(231, 238, 244, 0.05);
  color: var(--text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.25s var(--ease-out);
}
.chatui__voice svg { width: 18px; height: 18px; }
.chatui__voice .voice-waves { opacity: 0.35; transition: opacity 0.2s; }
.chatui__voice:hover { color: var(--mint); border-color: var(--mint); transform: translateY(-1px); }
.chatui__voice.is-on {
  color: #fff;
  background: linear-gradient(120deg, var(--teal), var(--teal-bright));
  border-color: transparent;
  box-shadow: 0 6px 18px -6px rgba(0, 168, 150, 0.7);
}
.chatui__voice.is-on .voice-waves { opacity: 1; }

.chatui__book {
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--teal), var(--teal-bright));
  transition: transform 0.25s var(--ease-out);
}
.chatui__book:hover { transform: translateY(-1px); }

.chatui__log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
}
.chat-msg {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.87rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg--bot {
  align-self: flex-start;
  background: var(--ink-3);
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.chat-msg--user {
  align-self: flex-end;
  background: linear-gradient(120deg, var(--teal), var(--teal-bright));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg a { text-decoration: underline; }
.chat-msg strong { font-weight: 700; color: var(--white); }
.chat-msg--user strong { color: #fff; }
.chat-msg__cta {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--teal), var(--teal-bright));
  color: #fff !important;
  font-weight: 700;
  font-size: 0.78rem;
  text-decoration: none !important;
}
.chat-msg--typing { display: flex; gap: 4px; padding: 0.75rem 0.9rem; }
.chat-msg--typing i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.4;
  animation: chatTyping 1.1s ease-in-out infinite;
}
.chat-msg--typing i:nth-child(2) { animation-delay: 0.18s; }
.chat-msg--typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes chatTyping {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.chatui__note {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.1rem 0.6rem;
}
.chatui__note a { color: var(--teal); font-weight: 600; }

.chat__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.2rem 0 0.3rem;
}
.chat-chip {
  appearance: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mint);
  background: rgba(0, 168, 150, 0.08);
  border: 1px solid rgba(0, 168, 150, 0.35);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.25s var(--ease-out);
}
.chat-chip:hover {
  background: rgba(0, 168, 150, 0.16);
  border-color: var(--teal);
  transform: translateY(-1px);
}

.chat-chip--slot {
  color: #fff;
  background: rgba(0, 168, 150, 0.22);
  border-color: rgba(0, 168, 150, 0.6);
  font-weight: 700;
}
.chat-chip--slot:hover { background: rgba(0, 168, 150, 0.34); }

.chat-date {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(0, 168, 150, 0.08);
  border: 1px solid rgba(0, 168, 150, 0.45);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  color-scheme: dark;
}
.chat-date:focus { outline: 2px solid var(--teal); outline-offset: 2px; }

/* attention pulse when a message is auto-sent to the receptionist.
   Both keyframes carry the SAME shadow-list structure (inset/position/count)
   so the browser interpolates smoothly; mismatched lists animate discretely,
   which read as a start-stop flicker. alternate = symmetric breathing. */
@keyframes chatpulse {
  from {
    box-shadow:
      inset 0 0 0 0 rgba(0, 168, 150, 0),
      inset 0 0 0 rgba(0, 168, 150, 0),
      -28px 0 0 0 rgba(0, 168, 150, 0);
  }
  to {
    box-shadow:
      inset 0 0 0 3px rgba(0, 168, 150, 1),
      inset 0 0 70px rgba(0, 168, 150, 0.28),
      -28px 0 110px 10px rgba(0, 168, 150, 0.6);
  }
}
.dock.is-pulsing, .chat-float__panel.is-pulsing {
  animation: chatpulse 0.9s ease-in-out 4 alternate;
}

/* "ask the receptionist" affordance */
[data-ask] { cursor: pointer; position: relative; }
/* Badge straddles the card's top edge so it never covers content. */
[data-ask]:not(.video-ask)::after {
  content: "Ask me \2197";
  position: absolute;
  top: -0.62rem;
  right: 0.95rem;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(120deg, var(--teal), var(--teal-bright));
  color: #fff;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px -6px rgba(0, 168, 150, 0.7);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.3s var(--ease-out);
  pointer-events: none;
}
[data-ask]:not(.video-ask):hover::after, [data-ask]:not(.video-ask):focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
:root[lang="cy"] [data-ask]:not(.video-ask)::after { content: "Gofynnwch \2197"; }

/* "what's going on here?" button on video cards */
.video-ask {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--white);
  background: rgba(5, 9, 15, 0.55);
  border: 1px solid rgba(143, 216, 206, 0.4);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease-out);
}
.video-ask:hover {
  border-color: var(--mint);
  background: rgba(0, 168, 150, 0.25);
  transform: translateY(-1px);
}
.video-ask::after { content: none; } /* it IS the ask button; no hover pill */

[data-ask]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.chatui__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  border-top: 1px solid var(--line);
}
.chatui__input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(231, 238, 244, 0.16);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font: inherit;
  font-size: 0.87rem;
  color: var(--text);
  background: rgba(231, 238, 244, 0.04);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chatui__input::placeholder { color: var(--text-dim); }
.chatui__input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.18); }
.chatui__send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, var(--teal), var(--teal-bright));
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--ease-out);
}
.chatui__send:hover { transform: translateY(-1px); }
.chatui__send svg { width: 18px; height: 18px; }

/* dock flavor */
.dock .chatui__head { padding-top: 1.3rem; }

/* floating (mobile) flavor */
.chat-float {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 200;
}
.chat-float__bubble {
  position: relative;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(120deg, var(--teal), var(--teal-bright));
  box-shadow: 0 12px 34px -8px rgba(0, 168, 150, 0.7);
  display: grid;
  place-items: center;
}
.chat-float__bubble svg { width: 25px; height: 25px; grid-area: 1 / 1; transition: opacity 0.2s, transform 0.3s var(--ease-out); }
.chat-float .icon-close { opacity: 0; transform: rotate(-45deg); }
.chat-float.is-open .icon-open { opacity: 0; transform: rotate(45deg); }
.chat-float.is-open .icon-close { opacity: 1; transform: rotate(0); }
.chat-float__panel {
  position: fixed;
  inset: auto 0.7rem 5.4rem;
  height: min(70dvh, 560px);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.chat-float__panel[hidden] { display: none; }

/* ---------- reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.32s; }
.reveal[data-delay="4"] { transition-delay: 0.45s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
