/* KOVALA web app. Tessellaite palette; Sora for titles and counts,
   Instrument Sans for everything else. The one loud thing is the stage
   track: a row of studded bricks, like the base of the KOVALA mark. */

@font-face { font-family: "Sora"; src: url("/assets/fonts/Sora-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/assets/fonts/Sora-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/assets/fonts/Sora-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #1A1726;
  --ink-soft: #2E2A3D;
  --slate: #6A6776;
  --fog: #B7B4C2;
  --line: #E6E5EA;
  --mist: #F7F7F9;
  --white: #FFFFFF;
  --cyan: #0AA5D8;
  --yellow: #FFC53D;
  --magenta: #E8337F;
  --magenta-ink: #B81F60;
  --danger: #B42318;
  --ok: #0E7A4F;

  --display: "Sora", "Helvetica Neue", Arial, sans-serif;
  --text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --rail: 248px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --radius: 8px;
  --stud-w: 14px;
  --stud-h: 5px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 1rem/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); padding: 8px 12px; border-radius: var(--radius); }
.muted { color: var(--slate); }
.small { font-size: 0.875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Scrollers and anything holding hidden labels contain their own absolute children. */
.board, .strip, .track, .card, .who, .panel { position: relative; }

/* ---------- Buttons and fields ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--ink); color: var(--white);
  font-weight: 600; font-size: 0.9375rem; text-decoration: none; cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn:hover { background: var(--magenta); border-color: var(--magenta); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn[disabled]:hover { background: var(--ink); border-color: var(--ink); }
.btn--quiet { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn--quiet:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 0.875rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.linkish:hover { color: var(--magenta-ink); }

.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field > span { font-weight: 600; font-size: 0.9375rem; }
.field > small { color: var(--slate); font-size: 0.8125rem; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--fog); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(10, 165, 216, 0.25); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: 32px; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--ink); }
.error { color: var(--danger); font-weight: 500; }
.form { display: grid; gap: 16px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Sign in ---------- */

.signin {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 24px 16px;
}
.signin__panel {
  width: min(420px, 100%);
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(24px, 5vw, 40px);
}
.signin__logo { display: block; height: 34px; width: auto; margin-bottom: 28px; }
.signin h1 { font-size: 1.5rem; margin-bottom: 6px; }
.signin p.muted { margin-bottom: 24px; }

/* ---------- Shell ---------- */

.shell { min-height: 100vh; min-height: 100dvh; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail);
  display: flex; flex-direction: column; gap: 24px;
  padding: 28px 18px 20px;
  background: var(--white); border-right: 1px solid var(--line);
  overflow-y: auto;
}
.rail__logo img { display: block; height: 26px; width: auto; }
.rail__company { font-family: var(--display); font-weight: 600; font-size: 0.9375rem; margin-top: 6px; color: var(--slate); }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  min-height: 42px; padding: 0 10px; border-radius: var(--radius);
  text-decoration: none; font-weight: 500; color: var(--ink-soft);
}
.nav a:hover { background: var(--mist); }
.nav a[aria-current="page"] { background: var(--mist); color: var(--ink); font-weight: 600; }
.nav__brick { width: 14px; height: 10px; border-radius: 2px; flex: none; position: relative; margin-top: 3px; }
.nav__brick::before { content: ""; position: absolute; left: 2px; top: -3px; width: 4px; height: 3px; border-radius: 1px 1px 0 0; background: inherit; }
.nav__brick::after { content: ""; position: absolute; right: 2px; top: -3px; width: 4px; height: 3px; border-radius: 1px 1px 0 0; background: inherit; }
.nav__brick--see { background: var(--magenta); }
.nav__brick--record { background: var(--ink); }
.nav__brick--people { background: var(--cyan); }
.nav__brick--audit { background: var(--yellow); }
.nav__group { font-size: 0.8125rem; color: var(--slate); padding: 14px 10px 4px; }
.rail__me { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 4px; }
.rail__me b { font-weight: 600; }

.bar { display: none; }
.main { margin-left: var(--rail); padding: 32px var(--gutter) 64px; max-width: calc(var(--rail) + 1240px); }
.main:focus { outline: none; }

@media (max-width: 1023px) {
  .bar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; padding: 0 16px;
    background: var(--white); border-bottom: 1px solid var(--line);
  }
  .bar img { height: 22px; width: auto; display: block; }
  .rail {
    z-index: 30; top: 60px; width: min(320px, 86vw);
    transform: translateX(-102%); transition: transform 180ms ease;
    box-shadow: 0 12px 40px rgba(26, 23, 38, 0.18);
  }
  .rail .rail__logo { display: none; }
  .shell.is-menu-open .rail { transform: none; }
  .scrim { position: fixed; inset: 60px 0 0 0; z-index: 25; background: rgba(26, 23, 38, 0.35); }
  .main { margin-left: 0; padding-top: 24px; }
}

/* ---------- Page heads and panels ---------- */

.head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.head__text { display: grid; gap: 6px; }
.back { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; color: var(--slate); text-decoration: none; margin-bottom: 4px; }
.back:hover { color: var(--ink); }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: clamp(16px, 2.4vw, 24px); }
.panel > h2 { margin-bottom: 14px; }
.stack { display: grid; gap: 20px; }
.stack > *, .grid-2 > *, .record-cols > * { min-width: 0; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.empty { color: var(--slate); padding: 8px 0; }
.loading { color: var(--slate); padding: 40px 0; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; background: var(--mist); color: var(--ink-soft);
}
.tag--cycle { background: #FFF4D6; color: #7A5600; }
.tag--private { background: #FDE7F0; color: var(--magenta-ink); }
.tag--quiet { background: var(--mist); color: var(--slate); font-weight: 500; }

/* ---------- The brick ---------- */

.brick {
  position: relative;
  border: 1.5px solid var(--fog); border-radius: 6px;
  background: var(--white); color: var(--slate);
  margin-top: var(--stud-h);
}
.brick::before, .brick::after {
  content: ""; position: absolute; top: calc(-1 * var(--stud-h) - 1.5px);
  width: var(--stud-w); height: var(--stud-h);
  border: 1.5px solid var(--fog); border-bottom: 0; border-radius: 4px 4px 0 0;
  background: var(--white);
}
.brick::before { left: 18%; }
.brick::after { right: 18%; }
.brick.is-done, .brick.is-filled { border-color: var(--ink); color: var(--ink); }
.brick.is-done::before, .brick.is-done::after,
.brick.is-filled::before, .brick.is-filled::after { border-color: var(--ink); }
.brick.is-current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.brick.is-current::before, .brick.is-current::after { background: var(--ink); border-color: var(--ink); }

/* The record's stage track */
.track { display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: thin; }
.track__phase { display: grid; gap: 8px; flex: 1 0 auto; min-width: 0; }
.track__phase-name { font-size: 0.8125rem; color: var(--slate); font-weight: 500; }
.track__row { display: flex; gap: 6px; }
.track .brick {
  flex: 1 1 0; min-width: 104px; min-height: 64px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 10px 12px;
}
.track .brick b { font-family: var(--display); font-weight: 600; font-size: 0.9375rem; line-height: 1.2; }
.track .brick small { font-size: 0.75rem; opacity: 0.8; }
.track .brick.is-arriving { animation: settle 420ms cubic-bezier(.2,.8,.2,1); }
@keyframes settle {
  0% { transform: translateY(-10px); opacity: 0.4; }
  70% { transform: translateY(1px); opacity: 1; }
  100% { transform: none; }
}

/* See: counts per stage */
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 8px; }
.strip a.brick {
  flex: 1 0 96px; min-height: 76px; padding: 10px 12px;
  display: grid; align-content: space-between; gap: 6px;
  text-decoration: none;
}
.strip a.brick:hover { border-color: var(--magenta); }
.strip a.brick:hover::before, .strip a.brick:hover::after { border-color: var(--magenta); }
.strip .brick b { font-family: var(--display); font-size: 1.5rem; font-weight: 600; line-height: 1; }
.strip .brick span { font-size: 0.8125rem; line-height: 1.25; }
.strip__gap { width: 10px; flex: none; }

.type-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.week { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 4px; }
.week div { display: grid; }
.week b { font-family: var(--display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.week span { color: var(--slate); font-size: 0.875rem; }

.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a, .list .row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; text-decoration: none; min-height: 48px; }
.list a:hover b { color: var(--magenta-ink); }
.list .row-main { display: grid; gap: 2px; min-width: 0; }
.list b { font-weight: 600; overflow-wrap: anywhere; }
.row-side { text-align: right; flex: none; line-height: 1.35; }
.bar-meter { height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; width: 120px; flex: none; }
.bar-meter span { display: block; height: 100%; background: var(--cyan); border-radius: 4px; }

/* ---------- Board ---------- */

.board { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
/* Columns share the width; each phase grows with its number of stages. */
.board__phase {
  display: grid; grid-template-rows: auto 1fr; gap: 10px;
  flex: var(--n, 1) 1 0; min-width: calc(var(--n, 1) * 148px + (var(--n, 1) - 1) * 10px);
}
.board__phase-name { font-size: 0.8125rem; color: var(--slate); font-weight: 500; }
.board__cols { display: flex; gap: 10px; }
.col { flex: 1 1 0; min-width: 148px; display: grid; grid-template-rows: auto 1fr; gap: 10px; scroll-snap-align: start; }
.col__head.brick { padding: 10px 12px; min-height: 60px; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink); border-color: var(--ink); }
.col__head.brick::before, .col__head.brick::after { border-color: var(--ink); }
.col__head b { font-family: var(--display); font-weight: 600; font-size: 0.9375rem; }
.col__body { display: grid; gap: 8px; align-content: start; min-height: 120px; padding: 8px; background: rgba(230, 229, 234, 0.45); border-radius: 10px; }
.card {
  display: grid; gap: 8px; padding: 12px; min-height: 44px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
}
.card:hover { border-color: var(--ink); }
.card b { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.who {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--white); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.02em;
}
.who--none { background: var(--mist); color: var(--slate); border: 1px dashed var(--fog); }

@media (max-width: 720px) {
  .track .brick { min-width: 92px; }
  .board__phase { flex: none; min-width: 0; }
  .col { flex: none; width: 78vw; }
  .board { margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding: var(--gutter); }
}

/* ---------- Record ---------- */

.record-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--slate); }
.record-meta label { display: inline-flex; gap: 8px; align-items: center; }
.record-meta .select { min-height: 36px; padding: 4px 8px; width: auto; }
.moves { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.moves .select { width: auto; min-width: 180px; }
.record-cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
@media (min-width: 1100px) { .record-cols { grid-template-columns: minmax(0, 1fr) 340px; } }

.composer { padding-bottom: 20px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.composer + .history .entry:first-child, .composer + .history .history__cycle:first-child + .entry { border-top: 0; }
.composer + .history .history__cycle:first-child { padding-top: 16px; }
.kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.kinds button {
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); cursor: pointer; font-weight: 500;
}
.kinds button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); }

.history { list-style: none; margin: 0; padding: 0; display: grid; }
.history__cycle { font-family: var(--display); font-weight: 600; font-size: 0.9375rem; padding: 18px 0 6px; }
.history__cycle:first-child { padding-top: 0; }
.entry { display: grid; grid-template-columns: 14px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.entry__mark { width: 14px; height: 10px; border-radius: 2px; margin-top: 7px; background: var(--fog); }
.entry--stage .entry__mark { background: var(--ink); }
.entry--note .entry__mark, .entry--meeting .entry__mark,
.entry--estimate .entry__mark, .entry--actual .entry__mark { background: var(--yellow); }
.entry--call .entry__mark, .entry--email .entry__mark { background: var(--cyan); }
.entry__body { display: grid; gap: 4px; min-width: 0; }
.entry__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.entry__by { color: var(--slate); font-size: 0.8125rem; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 0.875rem; color: var(--slate); padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

.audit-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.audit-row:first-child { border-top: 0; }
.audit-row details { grid-column: 1 / -1; }
.audit-row summary { cursor: pointer; color: var(--slate); font-size: 0.8125rem; width: max-content; }
.audit-row pre { margin: 8px 0 0; padding: 12px; background: var(--mist); border-radius: var(--radius); overflow-x: auto; font-size: 0.8125rem; }
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; margin-top: 14px; }
.verdict--ok { background: #E7F5EE; color: var(--ok); }
.verdict--bad { background: #FDECEA; color: var(--danger); }

/* ---------- Dialog and toast ---------- */

dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  border: 1px solid var(--line); border-radius: 14px; padding: 0;
  background: var(--white); color: var(--ink);
}
dialog::backdrop { background: rgba(26, 23, 38, 0.45); }
.dialog__inner { padding: clamp(20px, 4vw, 28px); display: grid; gap: 18px; }
.dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--radius); background: transparent; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.icon-btn:hover { background: var(--mist); }

.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 50; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 10px; background: var(--ink); color: var(--white); font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Learn ---------- */

.nav__brick--learn { background: var(--yellow); }
.tab {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); text-decoration: none; font-weight: 500;
}
.tab[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.lesson { display: grid; gap: 6px; }
.lesson__line { font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); line-height: 1.25; max-width: 34ch; }
.lesson__sub { margin-bottom: 4px; }

.chart { margin: 0; display: grid; gap: 12px; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 0.875rem; }
.chart__legend > span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.swatch--est, .key--est { background: var(--cyan); }
.swatch--act, .key--act { background: var(--magenta); }
.chart__frame { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.chart__axis { position: relative; width: 44px; height: 220px; font-size: 0.75rem; color: var(--slate); }
.chart__axis span { position: absolute; right: 0; bottom: calc(var(--v) * 100%); transform: translateY(50%); line-height: 1; }
.chart__plot {
  position: relative; height: 220px;
  display: flex; align-items: flex-end; justify-content: space-around; gap: 4px;
  border-bottom: 1px solid var(--fog);
}
.chart__grid { position: absolute; left: 0; right: 0; bottom: calc(var(--v) * 100%); border-top: 1px solid var(--line); }
.chart__group {
  position: relative; z-index: 1; height: 100%; flex: 1 1 0; max-width: 72px;
  display: flex; align-items: flex-end; justify-content: center; gap: 2px;
  border-radius: 6px; outline-offset: 2px; cursor: default;
}
.chart__group:hover, .chart__group:focus-visible { background: rgba(26, 23, 38, 0.04); }
.chart__bar { width: min(24px, 40%); height: calc(var(--v) * 100%); border-radius: 4px 4px 0 0; }
.chart__bar--est { background: var(--cyan); }
.chart__bar--act { background: var(--magenta); }
.chart__x { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; color: var(--slate); font-size: 0.75rem; }
.chart__plot { margin-bottom: 22px; }
.chart__tip {
  position: absolute; z-index: 3; top: 0; left: var(--x); transform: translateX(-50%);
  display: grid; gap: 4px; min-width: 170px; padding: 10px 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(26, 23, 38, 0.12); font-size: 0.8125rem; pointer-events: none;
}
.chart__tip[hidden] { display: none; }
.chart__tip-row { display: flex; align-items: center; gap: 8px; }
.chart__tip strong { font-family: var(--display); font-weight: 600; }
.key { display: inline-block; width: 12px; height: 2px; border-radius: 1px; }
.chart__table summary { cursor: pointer; color: var(--slate); font-size: 0.875rem; width: max-content; }
.chart__table table { margin-top: 8px; font-size: 0.875rem; }

.measures { display: grid; gap: 14px; }
.measure-now { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.measure-now:last-of-type { border-bottom: 0; }
.measure-now__vals { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.measure-now__vals b { font-family: var(--display); font-weight: 600; }
.log-measure { display: grid; gap: 10px; }
.log-measure__row { display: flex; gap: 8px; flex-wrap: wrap; }
.log-measure__row .input { width: 140px; flex: 1 1 120px; }
.log-measure__row .select { width: auto; flex: 1 1 140px; }

/* ---------- Live presence ---------- */

.avatar {
  --ring: var(--ink);
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--white); color: var(--ink);
  box-shadow: inset 0 0 0 2.5px var(--ring);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
}
.avatar--cyan { --ring: var(--cyan); }
.avatar--magenta { --ring: var(--magenta); }
.avatar--yellow { --ring: #E0A400; }
.avatar--ink { --ring: var(--ink); }
.avatar--small { width: 24px; height: 24px; font-size: 0.625rem; box-shadow: inset 0 0 0 2px var(--ring); }
.avatar--away { background: var(--mist); color: var(--slate); box-shadow: inset 0 0 0 1.5px var(--fog); }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack > .avatar + .avatar { margin-left: -8px; }
.avatar-stack > .avatar { box-shadow: inset 0 0 0 2.5px var(--ring), 0 0 0 2px var(--white); }
.avatar-stack > .avatar--small { box-shadow: inset 0 0 0 2px var(--ring), 0 0 0 2px var(--white); }

.here { display: flex; align-items: center; gap: 12px; margin-top: -14px; }
.here[hidden] { display: none; }
.here__text { color: var(--ink-soft); font-weight: 500; }

.typing { display: grid; gap: 6px; margin: 4px 0 8px; color: var(--slate); font-size: 0.875rem; }
.typing[hidden] { display: none; }
.typing__who { display: inline-flex; align-items: center; gap: 8px; }
.typing__dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.typing__dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--slate); animation: blink 1.2s infinite ease-in-out; }
.typing__dots i:nth-child(2) { animation-delay: 0.15s; }
.typing__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.card__top { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.card__here:empty { display: none; }

.owner { display: flex; gap: 12px; align-items: center; min-width: 0; }
.live-line { font-size: 0.875rem; color: var(--ink); font-weight: 500; }
a.live-line { text-decoration: underline; text-decoration-color: var(--fog); text-underline-offset: 3px; }
a.live-line:hover { text-decoration-color: var(--ink); }
.live-line--me { color: var(--slate); font-weight: 400; }
.list a.live-line { display: inline; padding: 0; min-height: 0; }

/* ---------- Guide ---------- */

.nav__brick--guide { background: var(--ink); }
.rail > .meter { margin-top: auto; }
.rail > .meter:not([hidden]) + .rail__me { margin-top: 0; }
.meter { display: grid; gap: 6px; }
.meter[hidden] { display: none; }
.meter__label { display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: space-between; align-items: baseline; font-size: 0.875rem; }
.meter__label span { color: var(--slate); }
.meter__label b { font-family: var(--display); font-weight: 600; }
.meter__bar { height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.meter__bar span { display: block; height: 100%; background: var(--ink); border-radius: 4px; transition: width 400ms ease; }
.meter.is-low .meter__bar span { background: #E0A400; }
.meter.is-out .meter__bar span { background: var(--magenta); }
.meter--compact { border-top: 1px solid var(--line); padding-top: 14px; }
.meter--compact .meter__label { display: grid; gap: 2px; font-size: 0.8125rem; }

.guide { display: grid; gap: 12px; }
.guide > h2 { margin-bottom: 0; }
.guide__ask { display: flex; gap: 8px; flex-wrap: wrap; }
.guide__ask .input { flex: 1 1 220px; }
.guide__out:empty { display: none; }
.answer { display: grid; gap: 10px; padding: 14px 16px; border-radius: 10px; background: var(--mist); border-left: 3px solid var(--ink); }
.answer__text { display: grid; gap: 8px; line-height: 1.55; overflow-wrap: anywhere; }
.answer__text h3 { font-size: 1rem; margin-top: 4px; }
.answer__text ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.answer__meta { color: var(--slate); font-size: 0.8125rem; }
.answer__wait { color: var(--slate); display: inline-flex; align-items: center; gap: 6px; }

.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.setup-form { max-width: 760px; }
.setup-models { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.plan-line { margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; background: var(--mist); max-width: 64ch; }

/* ---------- Connect ---------- */

.nav__brick--connect { background: var(--cyan); }
.nav__brick--people { background: var(--slate); }
.contacts li { border-top: 1px solid var(--line); }
.contact { display: grid; gap: 2px; padding: 10px 0; }
.contact__name { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.contact a { color: var(--ink-soft); text-underline-offset: 3px; width: max-content; max-width: 100%; overflow-wrap: anywhere; }
.contact__actions { display: flex; gap: 14px; margin-top: 4px; }
.list .contact a { display: inline; padding: 0; min-height: 0; }
.file-input { padding: 10px 0; }
.notes { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--ink-soft); max-width: 72ch; }
.mapping summary { cursor: pointer; padding: 4px 0; }
.map-grid { display: grid; gap: 8px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); margin-top: 12px; }
.map-grid--one { grid-template-columns: minmax(0, 640px); }
.map-grid h3 { margin-bottom: 8px; }
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.map-row > span { display: grid; gap: 2px; }
.map-row .select { min-height: 40px; padding: 6px 10px; }
@media (max-width: 560px) { .map-row { grid-template-columns: 1fr; } }
.tag--live { background: #E7F5EE; color: var(--ok); }
.setup-models > *, .map-grid > * { min-width: 0; }
.file-input { max-width: 100%; }
.tag { white-space: nowrap; }

/* ---------- Live connections ---------- */

.tag--bad { background: #FDECEA; color: var(--danger); }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: #8F1C13; border-color: #8F1C13; }
.conn { padding-bottom: 12px; }
.conn .verdict { margin: 0 0 10px; }
.conn .notes { margin: 0 0 10px; }
.conn__note { margin: -4px 0 10px; max-width: 68ch; }
.conn__actions { margin: 0; }
.conn__matching {
  margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--mist);
  gap: 14px;
}
.conn__matching > * { min-width: 0; }
.conn__matching h3 { margin: 0; }
.conn__matching .map-row { border-top-color: #DEDDE4; }

/* The page a vendor's sign-in sends people back to. */
.callback { max-width: 34rem; margin: 18vh auto 0; padding: 0 var(--gutter); font-size: 1.0625rem; }
.callback .btn { margin-top: 8px; }

/* ---------- Accounts and the admin console ---------- */

.rail__links { display: flex; gap: 14px; align-items: center; margin-top: 6px; font-size: 0.875rem; }
.rail__links a { color: var(--ink); }
.linkbox .input { font-size: 0.875rem; }
.linkbox p { margin: 0; max-width: 60ch; }

.admin { min-height: 100vh; background: var(--mist); }
.admin__bar {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter); background: var(--white); border-bottom: 1px solid var(--line);
}
.admin__brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; }
.admin__brand img { height: 22px; }
.admin__brand span { padding-left: 12px; border-left: 1px solid var(--line); }
.admin__tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.admin__tabs a { padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.admin__tabs a[aria-current="page"] { background: var(--mist); color: var(--ink); }
.admin__me { display: flex; gap: 12px; align-items: center; }
.admin__main { max-width: 72rem; margin: 0 auto; padding: 32px var(--gutter) 64px; }
.admin__main .list a { color: inherit; }
@media (max-width: 640px) {
  .admin__bar { padding: 12px 16px; }
  .admin__tabs { order: 3; width: calc(100% + 20px); overflow-x: auto; flex-wrap: nowrap; gap: 2px; margin: 0 -10px; }
  .admin__tabs a { padding: 8px 10px; white-space: nowrap; }
  .admin__main { padding: 20px 16px 48px; }
}

/* ---------- KOVALA, the same as on tessellaite.com ----------
   Ported from the site's dock.css (tessellaite-site-core 2.2.0): her figure in
   the corner, her greeting, the chat panel and the voice view. */
.kv-dock {
  --kv-ink: var(--ink); --kv-white: var(--white); --kv-mist: var(--mist); --kv-slate: var(--slate); --kv-fog: var(--fog);
  --kv-cyan: var(--cyan); --kv-yellow: var(--yellow); --kv-magenta: var(--magenta); --kv-line: var(--line);
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  font-family: var(--text); font-size: 15px; line-height: 1.5; color: var(--kv-ink); -webkit-tap-highlight-color: transparent;
}
.kv-dock [hidden] { display: none !important; }
.kv-dock svg { display: block; }
.kv-dock button { font: inherit; }

/* KOVALA, standing in the corner */
.kv-dock__launcher {
  position: relative; display: block; width: 84px; height: 100px; padding: 6px 6px 4px; margin: 0 0 0 auto;
  border: 0; border-radius: 22px; background: var(--kv-white); cursor: pointer;
  box-shadow: 0 10px 28px rgba(26, 23, 38, .22), 0 0 0 1px rgba(26, 23, 38, .06);
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .2s ease;
  animation: kv-arrive .7s cubic-bezier(.3, 1.4, .5, 1) both;
}
.kv-dock__launcher:hover { transform: translateY(-4px) rotate(-2deg); box-shadow: 0 16px 34px rgba(26, 23, 38, .28), 0 0 0 1px rgba(26, 23, 38, .06); }
.kv-dock__launcher:focus-visible { outline: 3px solid var(--kv-cyan); outline-offset: 4px; }
.kv-dock__fig { position: absolute; inset: 6px 6px 4px; display: flex; align-items: flex-end; justify-content: center; }
.kv-dock__fig .kv-bot { width: 100%; height: 100%; overflow: visible; }
.kv-dock__fig--wave { display: none; }
.kv-dock.is-greeting .kv-dock__fig--wave { display: flex; }
.kv-dock.is-greeting .kv-dock__fig--stand { display: none; }
.kv-dock__dot { position: absolute; top: 7px; right: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--kv-magenta); box-shadow: 0 0 0 2px var(--kv-white); transform: scale(0); transition: transform .2s ease; }
.kv-dock.has-chat:not(.is-open) .kv-dock__dot { transform: scale(1); }
.kv-dock.is-open .kv-dock__launcher { transform: scale(.9); }

/* Her greeting, beside her */
.kv-dock__hello {
  position: absolute; right: 96px; bottom: 18px; width: max-content; max-width: min(270px, calc(100vw - 130px));
  padding: .8rem 2.2rem .8rem .95rem; background: var(--kv-ink); color: var(--kv-white);
  border-radius: 18px 18px 4px 18px; box-shadow: 0 12px 30px rgba(26, 23, 38, .28);
  animation: kv-pop .4s cubic-bezier(.3, 1.4, .5, 1) both;
}
.kv-dock__hello p { margin: 0; }
.kv-dock__hello-t { font-size: 15px; line-height: 1.35; }
.kv-dock__hello-t strong { font-family: var(--display); font-weight: 700; }
.kv-dock__hello-b { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem !important; }
.kv-dock__hello .kv-chip { border-color: var(--kv-white); background: transparent; color: var(--kv-white); }
.kv-dock__hello .kv-chip--solid { background: var(--kv-white); color: var(--kv-ink); }
.kv-dock__hello .kv-chip:hover { background: var(--kv-yellow); border-color: var(--kv-yellow); color: var(--kv-ink); }
.kv-dock__hello-x { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; opacity: .75; }
.kv-dock__hello-x svg { width: 16px; height: 16px; }

/* The panel */
.kv-dock__panel {
  position: absolute; right: 0; bottom: 112px;
  width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 150px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--kv-white); border-radius: 18px; box-shadow: 0 22px 54px rgba(26, 23, 38, .3), 0 0 0 1px rgba(26, 23, 38, .06);
  animation: kv-pop .28s ease-out both; transform-origin: 100% 100%;
}
.kv-dock__head { display: flex; align-items: center; gap: .6rem; padding: .7rem .6rem .7rem .85rem; background: var(--kv-ink); color: var(--kv-white); }
.kv-dock__face { flex: none; width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .18); }
.kv-dock__face .kv-avatar { width: 42px; height: 42px; }
.kv-dock.is-speaking .kv-dock__face { animation: kv-ring 1s ease-in-out infinite; }
.kv-dock__who { flex: 1; min-width: 0; }
.kv-dock__name { margin: 0; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .02em; line-height: 1.2; }
.kv-dock__sub { margin: 0; display: flex; align-items: center; gap: .4rem; font-size: 12.5px; color: var(--kv-fog); min-width: 0; }
.kv-dock__subtext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-dock__live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3DDC97; box-shadow: 0 0 0 3px rgba(61, 220, 151, .2); }
.kv-dock__btn { flex: none; display: inline-grid; grid-auto-flow: column; align-items: center; justify-content: center; gap: .35rem; min-width: 40px; height: 40px; padding: 0 .55rem; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.kv-dock__head .kv-dock__btn:hover { background: rgba(255, 255, 255, .12); }
.kv-dock__talk { background: rgba(255, 255, 255, .12) !important; font-weight: 600; font-size: 14px; }
.kv-dock__talk[aria-pressed="true"] { background: var(--kv-magenta) !important; }
.kv-dock__btn:focus-visible, .kv-dock__send:focus-visible, .kv-chip:focus-visible, .kv-voice__btn:focus-visible { outline: 2px solid var(--kv-cyan); outline-offset: 2px; }
.kv-dock__speaker[aria-pressed="false"] .kv-wave { opacity: .25; }
.kv-dock__speaker[aria-pressed="true"] { color: var(--kv-yellow); }

/* Conversation */
.kv-dock__log { flex: 1; overflow-y: auto; padding: 1rem .9rem .5rem; background: var(--kv-mist); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.kv-msg { display: flex; gap: .5rem; margin: 0 0 .75rem; animation: kv-in .25s ease-out both; }
.kv-msg p { margin: 0; }
.kv-msg__icon { flex: none; width: 28px; height: 28px; margin-top: 2px; }
.kv-msg__icon svg { width: 28px; height: 28px; }
.kv-msg__body { min-width: 0; max-width: 88%; }
.kv-msg__label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--kv-slate); margin-bottom: .25rem !important; }
.kv-msg--bot .kv-msg__text { background: var(--kv-white); border: 1px solid var(--kv-line); border-radius: 4px 14px 14px 14px; padding: .6rem .8rem; overflow-wrap: anywhere; }
.kv-msg--bot .kv-msg__text p + p, .kv-msg--bot .kv-msg__text .answer__text > * + * { margin-top: .5rem; }
.kv-msg--bot .kv-msg__text ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.kv-msg--bot .kv-msg__text h3 { font-size: 14px; margin: .5rem 0 .15rem; }
.kv-msg--bot.is-quiet .kv-msg__text { color: var(--kv-slate); }
.kv-msg__wait { color: var(--kv-slate); }
.kv-msg--you { justify-content: flex-end; }
.kv-msg--you .kv-msg__text { max-width: 85%; background: var(--kv-ink); color: var(--kv-white); border-radius: 14px 4px 14px 14px; padding: .55rem .8rem; overflow-wrap: anywhere; }
.kv-more { display: inline-block; margin-top: .35rem; font-weight: 600; white-space: nowrap; color: var(--kv-ink); text-decoration: underline; text-decoration-color: var(--kv-yellow); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.kv-more::after { content: " \2192"; }

/* Suggestion chips */
.kv-dock__chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .55rem .9rem; background: var(--kv-mist); border-top: 1px solid var(--kv-line); }
.kv-chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; font-size: 13.5px; font-weight: 600; line-height: 1.2; padding: .45rem .8rem; border-radius: 999px; border: 1.5px solid var(--kv-ink); background: var(--kv-white); color: var(--kv-ink); cursor: pointer; text-decoration: none; }
.kv-chip svg { width: 16px; height: 16px; }
.kv-chip:hover { background: var(--kv-ink); color: var(--kv-white); }
.kv-chip--solid { background: var(--kv-ink); color: var(--kv-white); }

/* Input */
.kv-dock__form { display: flex; align-items: center; gap: .35rem; padding: .6rem .6rem .6rem .8rem; padding-bottom: max(.6rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--kv-line); background: var(--kv-white); }
.kv-dock__form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--kv-ink); background: var(--kv-white); border: 1.5px solid var(--kv-line); border-radius: 10px; padding: .6rem .7rem; }
.kv-dock__form input:focus { outline: none; border-color: var(--kv-cyan); box-shadow: 0 0 0 3px rgba(10, 165, 216, .18); }
.kv-dock__form .kv-dock__btn { color: var(--kv-ink); }
.kv-dock__form .kv-dock__btn:hover { background: var(--kv-mist); }
.kv-dock.is-listening .kv-dock__mic { color: var(--kv-white); background: var(--kv-magenta); animation: kv-ring 1s ease-in-out infinite; }
.kv-dock__send { flex: none; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 10px; background: var(--kv-ink); color: var(--kv-white); cursor: pointer; }
.kv-dock__send:hover { background: var(--kv-magenta); }

/* Talk: the voice conversation */
.kv-voice { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 1rem 1rem .9rem; overflow-y: auto; text-align: center; background: radial-gradient(120% 70% at 50% 0%, #FFFFFF 0%, var(--kv-mist) 70%); }
.kv-dock.is-voice .kv-dock__log, .kv-dock.is-voice .kv-dock__chips, .kv-dock.is-voice .kv-dock__form { display: none; }
.kv-voice__stage { position: relative; width: 170px; height: 178px; flex: none; display: grid; place-items: end center; }
.kv-voice__ring { position: absolute; left: 50%; bottom: 6px; width: 168px; height: 168px; margin-left: -84px; border-radius: 50%; background: rgba(10, 165, 216, .1); transition: background .3s ease, transform .3s ease; }
.kv-voice[data-state="listening"] .kv-voice__ring { background: rgba(10, 165, 216, .14); animation: kv-breathe 1.6s ease-in-out infinite; }
.kv-voice[data-state="thinking"] .kv-voice__ring { background: rgba(255, 197, 61, .22); animation: kv-breathe 1s ease-in-out infinite; }
.kv-voice[data-state="speaking"] .kv-voice__ring { background: rgba(232, 51, 127, .12); }
.kv-voice__figure { position: relative; width: 150px; cursor: pointer; --talk: 0; }
.kv-voice__figure .kv-bot { width: 150px; height: auto; overflow: visible; }
.kv-voice__figure .kv-mouth { transform-box: fill-box; transform-origin: 50% 30%; transform: scale(calc(1 + var(--talk) * .5), calc(1 + var(--talk) * 3.2)); }
.kv-voice__figure .kv-head { transform: translateY(calc(var(--talk) * -5px)); }
.kv-voice__status { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--kv-slate); }
.kv-voice__bars { display: flex; align-items: center; gap: 4px; height: 22px; }
.kv-voice__bars i { width: 5px; height: 6px; border-radius: 3px; background: var(--kv-cyan); transition: height .1s ease; }
.kv-voice.is-talking .kv-voice__bars i { background: var(--kv-magenta); animation: kv-eq .5s ease-in-out infinite alternate; }
.kv-voice[data-state="listening"] .kv-voice__bars i { animation: kv-eq 1.2s ease-in-out infinite alternate; }
.kv-voice__bars i:nth-child(2) { animation-delay: -.2s !important; }
.kv-voice__bars i:nth-child(3) { animation-delay: -.45s !important; }
.kv-voice__bars i:nth-child(4) { animation-delay: -.1s !important; }
.kv-voice__bars i:nth-child(5) { animation-delay: -.3s !important; }
.kv-voice__me { margin: 0; max-width: 32ch; min-height: 1.5em; font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.4; }
.kv-voice__you { margin: 0; max-width: 34ch; min-height: 1.3em; font-size: 14px; color: var(--kv-slate); }
.kv-voice__you:not(:empty)::before { content: "\201C"; }
.kv-voice__you:not(:empty)::after { content: "\201D"; }
.kv-voice__ctl { display: flex; gap: .6rem; margin-top: auto; padding-top: .5rem; }
.kv-voice__btn { display: inline-flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 64px; padding: .55rem .6rem; border: 0; border-radius: 14px; background: var(--kv-white); color: var(--kv-ink); font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 0 0 1px var(--kv-line); }
.kv-voice__btn svg { width: 22px; height: 22px; }
.kv-voice__btn:hover { box-shadow: 0 0 0 1.5px var(--kv-ink); }
.kv-voice__mute[aria-pressed="true"] { background: var(--kv-ink); color: var(--kv-white); }
.kv-voice__end { background: #D42B71; color: var(--kv-white); box-shadow: none; }
.kv-voice__end:hover { background: #B81F5E; box-shadow: none; }
.kv-voice__note { margin: 0; font-size: 11.5px; color: var(--kv-slate); }

/* Her figure moves: a gentle bob, a blink, a wave (from the site's site-core.css).
   The arm's pivot was an inline style on the site; here it's a rule, so the
   page's strict style policy holds. */
.kv-bot .kv-up { animation: kv-bob 3.6s ease-in-out infinite; }
.kv-bot .kv-eyes { transform-box: fill-box; transform-origin: center; animation: kv-blink 5.2s infinite; }
.kv-bot .kv-arm-r { transform-origin: 102px -330px; }
.kv-bot--wave .kv-arm-r, .kv-bot--happy .kv-arm-r { transform-box: view-box; animation: kv-wave 1.1s ease-in-out infinite alternate; }
.kv-bot--point .kv-arm-r { transform-box: view-box; animation: kv-nudge 1.6s ease-in-out infinite alternate; }
.kv-bot .kv-dots circle { animation: kv-dot 1.2s ease-in-out infinite; }
.kv-bot .kv-dots circle:nth-of-type(2) { animation-delay: .18s; }
.kv-bot .kv-dots circle:nth-of-type(3) { animation-delay: .36s; }
@keyframes kv-bob { 50% { transform: translateY(-6px); } }
@keyframes kv-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes kv-wave { from { transform: rotate(-9deg); } to { transform: rotate(7deg); } }
@keyframes kv-nudge { from { transform: rotate(0); } to { transform: rotate(-5deg); } }
@keyframes kv-dot { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .kv-bot, .kv-bot * { animation: none !important; } }

/* The tour points things out */
.kv-spot { outline: 3px solid var(--yellow) !important; outline-offset: 6px; border-radius: 6px; animation: kv-spot 1.2s ease-in-out 3; }

@keyframes kv-arrive { from { opacity: 0; transform: translateY(30px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes kv-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes kv-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes kv-ring { 50% { box-shadow: 0 0 0 5px rgba(255, 197, 61, .45); } }
@keyframes kv-breathe { 50% { transform: scale(1.06); } }
@keyframes kv-eq { from { height: 5px; } to { height: 22px; } }
@keyframes kv-spot { 50% { outline-color: var(--cyan); } }

@media (min-width: 700px) and (max-width: 1100px) { .kv-dock__panel { width: min(420px, calc(100vw - 40px)); } }
@media (max-width: 1023px) { .main { padding-bottom: 120px; } }
/* Phones: she shrinks a little; the panel becomes a sheet from the bottom */
@media (max-width: 600px) {
  .kv-dock { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .kv-dock__launcher { width: 66px; height: 80px; border-radius: 18px; padding: 5px 5px 3px; }
  .kv-dock__fig { inset: 5px 5px 3px; }
  .kv-dock__hello { right: 76px; bottom: 6px; max-width: calc(100vw - 100px); }
  .kv-dock.is-open { left: 6px; right: 6px; bottom: 6px; }
  .kv-dock.is-open .kv-dock__launcher, .kv-dock.is-open .kv-dock__hello { display: none; }
  .kv-dock__panel { position: static; width: 100%; height: min(84dvh, calc(100dvh - 12px)); border-radius: 18px; }
  .kv-dock__talk span { display: none; }
}
.shell.is-menu-open .kv-dock { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .kv-dock *, .kv-dock *::before, .kv-dock *::after, .kv-spot { animation: none !important; transition: none !important; }
}
@media print { .kv-dock { display: none !important; } }

/* ---------- Email ---------- */
.code-line { display: inline-block; max-width: 100%; padding: 8px 10px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.875rem; overflow-wrap: anywhere; }
.mail-test { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.mail-test .field { flex: 1 1 260px; margin: 0; }
p.ok { color: var(--ok); font-weight: 500; }
.signin .form-actions .linkish { margin-left: auto; }
