/* ============================================================
   ZENTURIAL — Sentry conversational interface
   A compact precision instrument, built from the site's tokens.
   ============================================================ */

body.zt-chat-ready .hud--br {
  bottom: 116px;
  transition: bottom 0.5s var(--e-out);
}

.zt-assistant {
  --zt-panel-w: min(420px, calc(100vw - 36px));
  --zt-panel-h: min(664px, calc(100dvh - 128px));
  --zt-shadow: 0 28px 90px rgba(19, 19, 19, 0.24), 0 3px 12px rgba(19, 19, 19, 0.12);
  position: fixed;
  right: var(--pad);
  bottom: 24px;
  z-index: 980;
  color: var(--ink);
  font-family: var(--font-x);
  font-variation-settings: 'wdth' 94;
  line-height: 1.45;
  isolation: isolate;
}

.zt-assistant *,
.zt-assistant *::before,
.zt-assistant *::after { box-sizing: border-box; }

.zt-assistant button,
.zt-assistant input,
.zt-assistant textarea { font: inherit; }

.zt-assistant button:focus-visible,
.zt-assistant input:focus-visible,
.zt-assistant textarea:focus-visible,
.zt-assistant a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Launcher / beacon ---------- */
.zt-launch-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}

.zt-launch-label {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  background: rgba(241, 237, 227, 0.92);
  box-shadow: 0 8px 25px rgba(19, 19, 19, 0.08);
  backdrop-filter: blur(12px);
  font-family: var(--font-m);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--e-out), transform 0.55s var(--e-out);
}

.zt-assistant.is-ready .zt-launch-label,
.zt-launch-wrap:hover .zt-launch-label {
  opacity: 1;
  transform: translateX(0);
}

.zt-launcher {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  overflow: visible;
  cursor: pointer;
  box-shadow: 0 16px 45px rgba(19, 19, 19, 0.25);
  transition: transform 0.55s var(--e-out), background 0.35s, color 0.35s, border-color 0.35s;
}

.zt-launcher:hover { transform: translateY(-5px) rotate(-1deg) scale(1.02); }
.zt-assistant.is-open .zt-launcher { transform: scale(0.94); background: var(--paper); color: var(--ink); }

.zt-launcher::before,
.zt-launcher::after {
  content: '';
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(36, 48, 255, 0.35);
  pointer-events: none;
  animation: zt-orbit 3.4s var(--e-io) infinite;
}

.zt-launcher::after {
  inset: -13px;
  border-color: rgba(36, 48, 255, 0.15);
  animation-delay: -1.7s;
}

.zt-assistant.is-open .zt-launcher::before,
.zt-assistant.is-open .zt-launcher::after { animation-play-state: paused; opacity: 0; }

.zt-launcher__mascot {
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  animation: zt-mascot-float 4.8s var(--e-io) infinite;
}

.zt-mascot {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  color: inherit;
}

.zt-mascot__halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.2;
  stroke-dasharray: 3 5;
  opacity: 0.58;
  transform-box: fill-box;
  transform-origin: center;
  animation: zt-mascot-halo 10s linear infinite;
}

.zt-mascot__head {
  transform-box: fill-box;
  transform-origin: 50% 62%;
  animation: zt-mascot-breathe 3.8s var(--e-io) infinite;
}

.zt-mascot__hood {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  opacity: 0.36;
}

.zt-mascot__mask { fill: currentColor; stroke: currentColor; stroke-width: 1; }
.zt-mascot__focus { fill: var(--signal); }

.zt-mascot__eyes,
.zt-mascot__smile,
.zt-mascot__cheeks {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.zt-mascot__eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: zt-mascot-blink 6.2s ease-in-out infinite;
}

.zt-mascot__cheeks { stroke-width: 1.2; opacity: 0.58; }
.zt-launcher:hover .zt-mascot__head { transform: rotate(-3deg) translateY(-1px); }
.zt-assistant.show-invite .zt-launcher__mascot { animation: zt-mascot-nod 1.15s var(--e-io) both; }
.zt-assistant.is-busy .zt-mascot__halo { animation-duration: 1.1s; opacity: 1; }
.zt-assistant.is-open .zt-mascot__eyes,
.zt-assistant.is-open .zt-mascot__smile,
.zt-assistant.is-open .zt-mascot__cheeks { stroke: var(--paper); }

.zt-launcher__ping {
  position: absolute;
  width: 6px;
  height: 6px;
  top: 13px;
  right: 13px;
  background: var(--signal);
  z-index: 3;
  box-shadow: 0 0 0 4px rgba(255, 77, 0, 0.16);
  animation: zt-ping 1.9s ease-in-out infinite;
}

/* ---------- Invitation toast ---------- */
.zt-invite {
  position: absolute;
  width: min(306px, calc(100vw - 32px));
  right: 0;
  bottom: 90px;
  padding: 14px 42px 16px 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 54px rgba(19, 19, 19, 0.16);
  overflow: hidden;
  transform: translateY(16px) scale(0.96);
  transform-origin: right bottom;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, transform 0.6s var(--e-out), visibility 0s 0.6s;
}

.zt-invite::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 -1px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--signal));
}

.zt-invite::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -36%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(36, 48, 255, 0.07), transparent);
  transform: skewX(-15deg);
  pointer-events: none;
}

.zt-invite__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--font-m);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.zt-invite__meta span { display: inline-flex; align-items: center; gap: 6px; }
.zt-invite__meta i { width: 5px; height: 5px; background: var(--signal); box-shadow: 0 0 0 3px rgba(255,77,0,0.12); }
.zt-invite__meta b { color: var(--ink-3); font-weight: 500; letter-spacing: 0.1em; }
.zt-invite p { margin: 0; font-size: 0.84rem; line-height: 1.48; }
.zt-invite strong { display: block; margin-bottom: 2px; font-weight: 700; }
.zt-invite p span { display: block; color: var(--ink-2); }

.zt-invite__trace {
  position: relative;
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 11px;
  background: var(--rule);
  overflow: hidden;
}

.zt-invite__trace i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  background: var(--accent);
  transform: translateX(-110%);
}

.zt-invite__close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  cursor: pointer;
}

.zt-assistant.show-invite:not(.is-open) .zt-invite {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.zt-assistant.show-invite:not(.is-open) .zt-invite::after { animation: zt-nudge-sweep 1.2s 0.15s var(--e-out) both; }
.zt-assistant.show-invite:not(.is-open) .zt-invite__meta,
.zt-assistant.show-invite:not(.is-open) .zt-invite p { animation: zt-nudge-copy 0.62s var(--e-out) both; }
.zt-assistant.show-invite:not(.is-open) .zt-invite p { animation-delay: 0.09s; }
.zt-assistant.show-invite:not(.is-open) .zt-invite__trace i { animation: zt-nudge-trace 8.8s 0.28s linear both; }

/* ---------- Main instrument panel ---------- */
.zt-panel {
  position: absolute;
  right: 0;
  bottom: 92px;
  width: var(--zt-panel-w);
  height: var(--zt-panel-h);
  min-height: 520px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--zt-shadow);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  clip-path: inset(100% 0 0 0);
  transform: translateY(22px) scale(0.97);
  transform-origin: right bottom;
  transition: clip-path 0.72s var(--e-io), transform 0.72s var(--e-out), opacity 0.24s, visibility 0s 0.75s;
}

.zt-assistant.is-open .zt-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.zt-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  border: 7px solid transparent;
  border-image: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 28%, transparent 72%, rgba(19,19,19,0.08)) 1;
}

.zt-panel__head {
  position: relative;
  height: 88px;
  min-height: 88px;
  padding: 10px 12px 9px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.zt-signal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.zt-panel__head::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(241,237,227,0.07) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgba(241,237,227,0.07) 50%, transparent 50.2%);
  background-size: 34px 34px;
  pointer-events: none;
}

.zt-head__top,
.zt-head__body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zt-head__top {
  min-height: 31px;
}

.zt-head__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--w-dim);
  font-family: var(--font-m);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.zt-status-dot {
  width: 6px;
  height: 6px;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.16);
}

.zt-status-dot.is-online { background: #74ff8f; box-shadow: 0 0 0 3px rgba(116, 255, 143, 0.14); }

.zt-head__actions { display: flex; gap: 3px; }

.zt-icon-btn {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241,237,227,0.18);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.35s var(--e-out);
}

.zt-icon-btn:hover { background: var(--paper); color: var(--ink); transform: translateY(-2px); }
.zt-icon-btn svg { width: 14px; height: 14px; }

.zt-head__body {
  align-items: center;
  min-height: 25px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(241,237,227,0.12);
}

.zt-wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zt-wordmark__glyph {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(241,237,227,0.3);
  color: var(--paper);
  box-shadow: inset 0 0 0 4px rgba(241,237,227,0.035);
}

.zt-wordmark__glyph .zt-mascot { width: 23px; height: 23px; }
.zt-wordmark__glyph .zt-mascot__halo { opacity: 0.8; }

.zt-wordmark__copy { display: grid; gap: 1px; }

.zt-wordmark strong {
  font-size: 0.96rem;
  line-height: 1;
  font-weight: 740;
  font-variation-settings: 'wdth' 110;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.zt-wordmark em {
  color: var(--w-dim);
  font-family: var(--font-m);
  font-size: 0.42rem;
  font-style: normal;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.zt-head__readout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-m);
  font-size: 0.46rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--w-dim);
  white-space: nowrap;
}

.zt-head__readout time { color: var(--paper); font-variant-numeric: tabular-nums; }

.zt-scope-badge { display: inline-flex; align-items: center; gap: 4px; }
.zt-scope-badge svg { width: 10px; height: 10px; color: #7cffab; }
.zt-assistant.is-guarded .zt-scope-badge svg { animation: zt-shield-confirm 0.8s var(--e-out) both; }

/* ---------- Page intelligence strip ---------- */
.zt-context {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  font-family: var(--font-m);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zt-context__scan {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid var(--rule);
}

.zt-context__scan::before {
  content: '';
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1px;
  top: 4px;
  background: var(--accent);
  box-shadow: 0 4px 0 var(--rule), 0 8px 0 var(--rule);
  animation: zt-scan 2.4s var(--e-io) infinite;
}

.zt-context__copy { overflow: hidden; }
.zt-context__label { display: block; color: var(--ink-3); font-size: 0.49rem; margin-bottom: 2px; }
.zt-context__page { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zt-context__count { color: var(--accent); white-space: nowrap; }

/* ---------- Transcript ---------- */
.zt-transcript {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 16px 14px 20px;
  background:
    linear-gradient(rgba(19,19,19,0.035) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--paper);
  scrollbar-width: thin;
  scrollbar-color: var(--ink-3) var(--paper-2);
}

.zt-assistant:not(.has-conversation) .zt-transcript {
  display: flex;
  flex-direction: column;
}

.zt-welcome {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2px 1px 17px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  animation: zt-message-in 0.8s var(--e-out) both;
}

.zt-welcome[hidden] { display: none; }

.zt-assistant:not(.has-conversation) .zt-welcome {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.zt-welcome::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 34%;
  height: 1px;
  background: var(--accent);
  transform-origin: left;
  animation: zt-rule-in 1.2s var(--e-out) 0.2s both;
}

.zt-welcome__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--accent);
  font-family: var(--font-m);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.zt-welcome__kicker::before { content: ''; width: 16px; height: 1px; background: currentColor; }

.zt-welcome h2 {
  max-width: 12ch;
  margin: 0 0 9px;
  font-size: clamp(1.5rem, 5vw, 1.86rem);
  font-weight: 730;
  font-variation-settings: 'wdth' 111;
  line-height: 0.96;
  text-transform: uppercase;
}

.zt-welcome h2 em {
  color: var(--accent);
  font-family: var(--font-s);
  font-size: 1.08em;
  font-weight: 400;
  text-transform: none;
}

.zt-welcome p { max-width: 35em; margin: 0; color: var(--ink-2); font-size: 0.79rem; line-height: 1.48; }

.zt-welcome__modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  border: 1px solid var(--rule);
  background: rgba(241, 237, 227, 0.66);
}

.zt-welcome__modes span {
  min-width: 0;
  padding: 7px 6px;
  color: var(--ink-2);
  font-family: var(--font-m);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.zt-welcome__modes span + span { border-left: 1px solid var(--rule); }
.zt-welcome__modes b { margin-right: 4px; color: var(--accent); font-weight: 500; }

.zt-welcome__signal {
  position: relative;
  flex: 1 1 82px;
  min-height: 68px;
  margin-top: 11px;
  overflow: hidden;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
}

.zt-welcome__signal > span,
.zt-welcome__signal > small {
  position: absolute;
  z-index: 2;
  font-family: var(--font-m);
  font-size: 0.44rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zt-welcome__signal > span { top: 7px; left: 0; color: var(--ink-3); }
.zt-welcome__signal > small { right: 0; bottom: 3px; color: var(--accent); }

.zt-welcome__signal svg {
  position: absolute;
  inset: 18px 0 12px;
  width: 100%;
  height: calc(100% - 30px);
  overflow: visible;
}

.zt-welcome__signal path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.zt-signal__base { stroke: var(--rule); stroke-width: 1; }
.zt-signal__flow {
  stroke: var(--accent);
  stroke-width: 1.2;
  stroke-dasharray: 3 18;
  animation: zt-signal-flow 3.5s linear infinite;
}

.zt-welcome__signal rect {
  fill: var(--paper);
  stroke: var(--ink-3);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  animation: zt-node-breathe 2.8s var(--e-io) infinite;
}

.zt-welcome__signal rect:nth-of-type(2) { animation-delay: -0.55s; }
.zt-welcome__signal rect:nth-of-type(3) { animation-delay: -1.1s; fill: var(--accent); stroke: var(--accent); }
.zt-welcome__signal rect:nth-of-type(4) { animation-delay: -1.65s; }
.zt-welcome__signal rect:nth-of-type(5) { animation-delay: -2.2s; fill: var(--signal); stroke: var(--signal); }

.zt-message {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  margin: 0 0 18px;
  animation: zt-message-in 0.58s var(--e-out) both;
}

.zt-message--user { grid-template-columns: minmax(0, 1fr); padding-left: 44px; }

.zt-message__avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.zt-message__avatar .zt-mascot { width: 21px; height: 21px; }
.zt-message__avatar .zt-mascot__halo { stroke-width: 1.8; opacity: 0.7; }
.zt-message__avatar .zt-mascot__hood { display: none; }

.zt-message__main { min-width: 0; }

.zt-message__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  color: var(--ink-3);
  font-family: var(--font-m);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zt-message__bubble {
  position: relative;
  width: fit-content;
  max-width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--rule);
  background: rgba(241, 237, 227, 0.93);
  font-size: 0.86rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.zt-message--boundary .zt-message__bubble {
  border-color: rgba(255, 77, 0, 0.58);
  background: linear-gradient(135deg, rgba(255, 77, 0, 0.055), rgba(241, 237, 227, 0.96) 42%);
  box-shadow: inset 3px 0 0 rgba(255, 77, 0, 0.82);
}

.zt-message--boundary .zt-message__meta span::before {
  content: '◆';
  margin-right: 5px;
  color: var(--signal);
  font-size: 0.42rem;
}

.zt-message--assistant .zt-message__bubble::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.zt-message--user .zt-message__bubble {
  margin-left: auto;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.zt-message__bubble p { margin: 0 0 8px; }
.zt-message__bubble p:last-child { margin-bottom: 0; }
.zt-message__bubble strong { font-weight: 680; }
.zt-message__bubble em { font-family: var(--font-s); font-size: 1.06em; }
.zt-message__bubble ul { margin: 8px 0; padding-left: 17px; list-style: square; }
.zt-message__bubble li { margin: 4px 0; }
.zt-message__bubble a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.zt-message__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.zt-source {
  padding: 4px 7px;
  border: 1px solid var(--rule);
  color: var(--ink-3);
  background: var(--paper-2);
  font-family: var(--font-m);
  font-size: 0.47rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.zt-thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 154px;
  color: var(--ink-3);
  font-family: var(--font-m);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.zt-thinking__dots { display: flex; gap: 4px; }
.zt-thinking__dots i { width: 4px; height: 4px; background: var(--accent); animation: zt-dot 1.1s infinite ease-in-out; }
.zt-thinking__dots i:nth-child(2) { animation-delay: 0.13s; }
.zt-thinking__dots i:nth-child(3) { animation-delay: 0.26s; }

.zt-caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: zt-caret 0.75s steps(1) infinite;
}

.zt-error {
  border-color: rgba(255,77,0,0.5);
  background: rgba(255,77,0,0.055);
}

.zt-inline-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  font-family: var(--font-m);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.zt-inline-action:hover { background: var(--ink); color: var(--paper); }

/* ---------- Prompt suggestions ---------- */
.zt-suggestion-deck {
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 31px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 7px 9px 8px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}

.zt-suggestions {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0;
  background: transparent;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  scrollbar-width: none;
}

.zt-suggestions::-webkit-scrollbar { display: none; }

.zt-suggestion-deck.has-overflow .zt-suggestions {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
}

.zt-suggestion-nav {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: color 0.22s, border-color 0.22s, background 0.22s, transform 0.35s var(--e-out), opacity 0.22s;
}

.zt-suggestion-nav svg { width: 14px; height: 14px; }
.zt-suggestion-nav:not(:disabled):hover { border-color: var(--accent); background: var(--accent); color: #fff; transform: translateY(-2px); }
.zt-suggestion-nav:disabled { opacity: 0.25; cursor: default; }

.zt-suggestion-deck__meter {
  position: absolute;
  right: 46px;
  bottom: 3px;
  left: 46px;
  height: 1px;
  overflow: hidden;
  background: var(--rule);
}

.zt-suggestion-deck__meter i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0.2);
  transform-origin: left;
  transition: transform 0.28s var(--e-out);
}

.zt-suggestion {
  flex: 0 0 auto;
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-m);
  font-size: 0.51rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  scroll-snap-align: start;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, transform 0.4s var(--e-out);
}

.zt-suggestion span { margin-right: 7px; color: var(--accent); }
.zt-suggestion:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.zt-suggestion--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.zt-suggestion--primary span { color: rgba(255,255,255,0.72); }
.zt-suggestion--primary:hover { color: #fff; }

/* ---------- Composer ---------- */
.zt-composer-wrap {
  min-width: 0;
  overflow: hidden;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.zt-composer {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: end;
  gap: 8px;
  padding: 8px 10px 6px;
}

.zt-composer__input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  max-height: 100px;
  resize: none;
  padding: 9px 7px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.25s;
}

.zt-composer__input:focus { border-bottom-color: var(--accent); }
.zt-composer__input::placeholder { color: var(--ink-3); }

.zt-send {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.4s var(--e-out);
}

.zt-send::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(102%);
  transition: transform 0.4s var(--e-io);
}

.zt-send:hover { border-color: var(--accent); transform: translateY(-2px); }
.zt-send:hover::before { transform: translateY(0); }
.zt-send:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }
.zt-send svg { position: relative; z-index: 1; width: 16px; height: 16px; }

.zt-composer__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 11px 7px;
  color: var(--ink-3);
  font-family: var(--font-m);
  font-size: 0.45rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.zt-composer__foot b { color: var(--accent); font-weight: 500; }

/* ---------- Appointment console ---------- */
.zt-booking {
  position: relative;
  margin: 4px 0 20px 35px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  animation: zt-card-unfold 0.78s var(--e-out) both;
  transform-origin: top;
}

.zt-booking--recalled {
  animation: zt-booking-recall 0.82s var(--e-out) both;
}

.zt-booking__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 14px 12px;
  background: var(--ink);
  color: var(--paper);
}

.zt-booking__kicker {
  color: var(--w-dim);
  font-family: var(--font-m);
  font-size: 0.49rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.zt-booking__head h3 {
  margin: 4px 0 0;
  font-size: 1.03rem;
  font-weight: 680;
  font-variation-settings: 'wdth' 105;
  text-transform: uppercase;
  line-height: 1.1;
}

.zt-booking__duration {
  align-self: center;
  color: var(--accent);
  font-family: var(--font-m);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.zt-booking__progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.zt-booking__progress span {
  position: relative;
  padding: 8px 5px;
  color: var(--ink-3);
  font-family: var(--font-m);
  font-size: 0.46rem;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.zt-booking__progress span + span { border-left: 1px solid var(--rule); }
.zt-booking__progress span.is-active { color: var(--accent); }
.zt-booking__progress span.is-complete { color: var(--ink); background: var(--accent-dim); }

.zt-booking__body { padding: 14px; }

.zt-booking__hint {
  margin: 0 0 11px;
  color: var(--ink-2);
  font-size: 0.77rem;
}

.zt-booking__timezone {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--ink-3);
  font-family: var(--font-m);
  font-size: 0.47rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zt-booking__timezone svg { width: 12px; height: 12px; }

.zt-booking__dates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.zt-date-btn,
.zt-time-btn {
  min-height: 50px;
  padding: 7px 5px;
  border: 1px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.35s var(--e-out);
}

.zt-date-btn:hover,
.zt-time-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.zt-date-btn.is-selected,
.zt-time-btn.is-selected { border-color: var(--accent); background: var(--accent); color: #fff; }

.zt-date-btn span { display: block; }
.zt-date-btn__day { font-family: var(--font-m); font-size: 0.45rem; letter-spacing: 0.1em; text-transform: uppercase; }
.zt-date-btn__date { margin-top: 2px; font-size: 0.78rem; font-weight: 650; }

.zt-booking__times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.zt-time-btn { min-height: 38px; font-family: var(--font-m); font-size: 0.53rem; letter-spacing: 0.06em; }

.zt-booking__skeleton { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.zt-booking__skeleton i { height: 50px; background: linear-gradient(90deg, var(--paper-3), var(--paper), var(--paper-3)); background-size: 200% 100%; animation: zt-shimmer 1.2s linear infinite; }

.zt-booking__fields { display: grid; gap: 10px; }
.zt-booking__row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.zt-booking__field { display: grid; gap: 5px; }
.zt-booking__field label { color: var(--ink-2); font-family: var(--font-m); font-size: 0.48rem; letter-spacing: 0.11em; text-transform: uppercase; }
.zt-booking__field input,
.zt-booking__field textarea {
  width: 100%;
  padding: 9px 8px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.76rem;
  outline: none;
  resize: vertical;
}

.zt-booking__field input:focus,
.zt-booking__field textarea:focus { border-color: var(--accent); }
.zt-booking__field.has-error input { border-color: var(--signal); }
.zt-booking__error { display: none; color: var(--signal); font-family: var(--font-m); font-size: 0.44rem; letter-spacing: 0.06em; text-transform: uppercase; }
.zt-booking__field.has-error .zt-booking__error { display: block; }

.zt-booking__summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.zt-booking__summary strong { display: block; font-size: 0.78rem; }
.zt-booking__summary span { color: var(--ink-3); font-family: var(--font-m); font-size: 0.46rem; letter-spacing: 0.08em; text-transform: uppercase; }

.zt-booking__actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }

.zt-booking__btn {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-m);
  font-size: 0.49rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.zt-booking__btn:hover { background: var(--accent); border-color: var(--accent); }
.zt-booking__btn:disabled { opacity: 0.5; cursor: wait; }
.zt-booking__btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--rule); }
.zt-booking__btn--ghost:hover { background: var(--paper); border-color: var(--ink); color: var(--ink); }

.zt-confirmation { padding: 8px 0 3px; text-align: center; }
.zt-confirmation__mark {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 1px solid var(--accent);
  color: var(--accent);
  animation: zt-confirm 0.7s var(--e-out) both;
}

.zt-confirmation__mark::before { content: ''; position: absolute; inset: 5px; border: 1px solid var(--rule); }
.zt-confirmation__mark svg { width: 23px; height: 23px; stroke-dasharray: 42; stroke-dashoffset: 42; animation: zt-draw 0.8s var(--e-out) 0.25s forwards; }
.zt-confirmation h4 { margin: 0 0 7px; font-size: 1.02rem; text-transform: uppercase; }
.zt-confirmation p { margin: 0 auto 12px; color: var(--ink-2); font-size: 0.76rem; max-width: 32ch; }
.zt-confirmation__ref { display: block; margin-bottom: 10px; color: var(--accent); font-family: var(--font-m); font-size: 0.5rem; letter-spacing: 0.13em; text-transform: uppercase; }

.zt-route-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 0 18px 35px;
  padding: 12px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  animation: zt-message-in 0.55s var(--e-out) both;
}

.zt-route-card span { color: var(--ink-3); font-family: var(--font-m); font-size: 0.49rem; letter-spacing: 0.1em; text-transform: uppercase; }
.zt-route-card strong { display: block; margin-top: 3px; font-size: 0.8rem; }
.zt-route-card a { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--paper); }

/* ---------- Motion ---------- */
@keyframes zt-orbit {
  0%, 100% { transform: scale(0.94); opacity: 0; }
  22% { opacity: 0.65; }
  72% { opacity: 0; }
  100% { transform: scale(1.16); }
}

@keyframes zt-mascot-float {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(-2px); }
}

@keyframes zt-mascot-halo { to { transform: rotate(360deg); } }

@keyframes zt-mascot-breathe {
  0%, 100% { transform: scale(0.985); }
  50% { transform: scale(1.025); }
}

@keyframes zt-mascot-blink {
  0%, 43%, 47%, 51%, 100% { transform: scaleY(1); }
  45%, 49% { transform: scaleY(0.12); }
}

@keyframes zt-mascot-nod {
  0% { transform: translateY(0) rotate(0); }
  28% { transform: translateY(3px) rotate(2deg); }
  58% { transform: translateY(-2px) rotate(-1deg); }
  100% { transform: translateY(0) rotate(0); }
}

@keyframes zt-nudge-copy {
  from { opacity: 0; transform: translateY(9px); clip-path: inset(0 0 100%); }
  to { opacity: 1; transform: none; clip-path: inset(0); }
}

@keyframes zt-nudge-sweep { from { left: -36%; } to { left: 126%; } }
@keyframes zt-nudge-trace { from { transform: translateX(-110%); } to { transform: translateX(350%); } }
@keyframes zt-shield-confirm { 0% { transform: scale(0.5); opacity: 0; } 55% { transform: scale(1.28); opacity: 1; } 100% { transform: none; } }

@keyframes zt-ping { 0%, 100% { transform: scale(0.8); opacity: 0.7; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes zt-scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
@keyframes zt-message-in { from { opacity: 0; transform: translateY(15px) skewY(1deg); } to { opacity: 1; transform: none; } }
@keyframes zt-rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes zt-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.3; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes zt-caret { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
@keyframes zt-signal-flow { to { stroke-dashoffset: -84; } }
@keyframes zt-node-breathe { 0%, 100% { opacity: 0.38; transform: scale(0.72); } 48% { opacity: 1; transform: scale(1); } }
@keyframes zt-card-unfold { from { opacity: 0; transform: scaleY(0.82) translateY(-8px); clip-path: inset(0 0 100%); } to { opacity: 1; transform: none; clip-path: inset(0); } }
@keyframes zt-booking-recall {
  0% { transform: translateY(12px); box-shadow: 0 0 0 0 rgba(36, 48, 255, 0); }
  48% { transform: translateY(0); box-shadow: 0 0 0 5px rgba(36, 48, 255, 0.16); }
  100% { transform: none; box-shadow: 0 0 0 1px rgba(36, 48, 255, 0); }
}
@keyframes zt-shimmer { to { background-position: -200% 0; } }
@keyframes zt-confirm { from { transform: scale(0.4) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes zt-draw { to { stroke-dashoffset: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  body.zt-chat-ready .hud--br { bottom: 14px; }
  .zt-assistant { right: 16px; bottom: 16px; --zt-panel-w: calc(100vw - 16px); --zt-panel-h: min(720px, calc(100dvh - 16px)); }
  .zt-launcher { width: 62px; height: 62px; flex-basis: 62px; }
  .zt-launch-label { display: none; }
  .zt-panel { position: fixed; right: 8px; left: 8px; bottom: 8px; width: auto; height: var(--zt-panel-h); min-height: 0; transform-origin: center bottom; }
  .zt-assistant.is-open .zt-launch-wrap { opacity: 0; pointer-events: none; }
  .zt-panel__head { height: 82px; min-height: 82px; padding: 8px 10px; }
  .zt-head__body { margin-top: 4px; padding-top: 4px; }
  .zt-transcript { padding: 14px 12px 18px; }
  .zt-welcome h2 { font-size: 1.55rem; }
  .zt-suggestion-deck { padding-right: 7px; padding-left: 7px; }
  .zt-booking, .zt-route-card { margin-left: 0; }
  .zt-booking__dates { grid-template-columns: repeat(3, 1fr); }
  .zt-booking__row { grid-template-columns: 1fr; }
}

@media (max-height: 600px) and (min-width: 681px) {
  .zt-assistant { --zt-panel-h: calc(100dvh - 34px); }
  .zt-panel { bottom: 0; min-height: 0; }
  .zt-launch-wrap { transform: translateY(2px); }
}

@media (prefers-reduced-motion: reduce) {
  .zt-assistant *,
  .zt-assistant *::before,
  .zt-assistant *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
