/* The preview page in the VetGenius platform style ("ribbon" design): warm paper, ink text, blue and tawny accents. */
@font-face {
  font-family:"Plus Jakarta Sans"; font-style:normal; font-weight:300 700; font-display:swap;
  src:url(/preview/fonts/plus-jakarta-sans.woff2) format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme:light;
  --bg:#fffdfb; --section:#faf5f1; --panel:#fff; --glass:#fffdfbd9;
  --ink:#231d1b; --ink-2:#5b4d49; --muted:#75655f;
  --line:#eee6e0; --line-strong:#ddd2cb;
  --primary:#007190; --primary-hover:#00617c; --on-primary:#fff;
  --blue-ink:#007190; --blue-soft:#0071901a;
  --green-ink:#4f5e58; --green-soft:#6d7e7724;
  --tawny:#c56127; --tawny-ink:#a8521f; --tawny-soft:#c561271f;
  --shadow:0 1px 2px #231d1b0d, 0 14px 32px -14px #3c28203d;
  --shadow-lg:0 50px 100px -20px #3c282040, 0 30px 60px -30px #0000004d;
  --font-sans:"Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-sm:8px; --radius:10px; --radius-lg:14px; --radius-xl:16px;
  --ease:cubic-bezier(.16,1,.3,1);
}
/* Dark theme: public/theme.js sets data-theme from the last choice, else the system setting. */
:root[data-theme="dark"] {
    color-scheme:dark;
    --bg:#14100f; --section:#1a1513; --panel:#221c1a; --glass:#221c1ad9;
    --ink:#f4eeea; --ink-2:#cdbfb9; --muted:#a8988f;
    --line:#ffffff14; --line-strong:#ffffff29;
    --primary-hover:#0a809f;
    --blue-ink:#8cc6d6; --blue-soft:#00719038;
    --green-ink:#a9b8b1; --green-soft:#6d7e7738;
    --tawny-ink:#e59a6e; --tawny-soft:#c5612733;
    --shadow:inset 0 0 0 1px #ffffff0f, 0 1px 2px #0006, 0 14px 32px -14px #000000b3;
    --shadow-lg:inset 0 0 0 1px #ffffff0f, 0 50px 100px -20px #0009, 0 30px 60px -30px #000000b3;
}

* { box-sizing:border-box; }
/* Elements with a display class stay hidden when the script sets `hidden`. */
[hidden] { display:none !important; }
html, body { min-height:100%; }
body {
  margin:0; background:var(--bg); color:var(--ink); font:400 14px/1.5 var(--font-sans);
  -webkit-font-smoothing:antialiased; position:relative; overflow-x:hidden;
}
h1, h2, h3, p { margin:0; }
.num { font-variant-numeric:tabular-nums; }
.dim { color:var(--muted); }
.eyebrow { font:12.5px/1.4 var(--font-mono); color:var(--ink-2); letter-spacing:.01em; margin-bottom:14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

/* Decoration: the platform's ribbon in the top-right corner (public/ribbon.js draws and moves it). The login page shows
   it whole; the call page shows it only as a glow in the header, so the panels start right under the header. */
.ribbon { position:absolute; top:0; right:0; width:min(64vw, 920px); aspect-ratio:1200 / 420; pointer-events:none; z-index:0; animation:ribbon-in 2s var(--ease) both; }
.ribbon-header { z-index:-1; filter:blur(14px); opacity:.85; }
body:has(#app:not([hidden])) .ribbon-page, body:has(#app[hidden]) .ribbon-header { display:none; }
.ribbon svg { display:block; width:100%; height:100%; overflow:visible; }
@keyframes ribbon-in { 0% { opacity:0; transform:translate(80px, -60px) scale(.97); } }
@media (max-width:1023px) { .ribbon { opacity:.4; } }

/* Header. */
.topbar {
  position:relative; z-index:2; display:flex; align-items:center; gap:18px; padding:9px 36px; overflow:hidden;
  border-bottom:1px solid var(--line); background:var(--glass); backdrop-filter:blur(24px) saturate(1.5); -webkit-backdrop-filter:blur(24px) saturate(1.5);
}
.wordmark { display:block; width:165px; height:auto; }
:root[data-theme="dark"] .wordmark-light, :root:not([data-theme="dark"]) .wordmark-dark { display:none; }
.topbar-rule { width:1px; height:28px; background:var(--line-strong); }
.product { display:flex; flex-direction:column; min-width:0; line-height:1.25; }
.product strong { font-size:15px; font-weight:600; }
.product span { font-size:12px; color:var(--muted); }
.tag-beta { margin-left:auto; flex:0 0 auto; }
.product-switch:not([hidden]) + .tag-beta { margin-left:0; }

/* Theme switch: a moon in light mode, a sun in dark mode; the circle reveal draws a ring on its edge. */
.theme-toggle {
  display:grid; place-items:center; width:40px; height:40px; margin-left:-8px; padding:0; border:0; border-radius:12px;
  background:transparent; color:var(--ink-2); cursor:pointer; transition:background-color .15s var(--ease), color .15s var(--ease);
}
.theme-toggle:hover { background:var(--section); color:var(--ink); }
.theme-toggle:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.theme-icon { width:20px; height:20px; overflow:visible; transition:rotate .6s cubic-bezier(.34,1.56,.64,1); }
.theme-icon .ti-core, .theme-icon .ti-cut, .theme-icon .ti-rays {
  transform-box:view-box; transform-origin:12px 12px; transition:transform .6s cubic-bezier(.34,1.56,.64,1), opacity .35s;
}
.theme-icon .ti-core { transform:scale(.56); }
.theme-icon .ti-cut { transform:translate(9px, -9px); }
.theme-icon.is-moon { rotate:-40deg; }
.theme-icon.is-moon .ti-core { transform:scale(1); }
.theme-icon.is-moon .ti-cut { transform:none; }
.theme-icon.is-moon .ti-rays { opacity:0; transform:scale(.4) rotate(-90deg); }
.theme-ring {
  position:fixed; z-index:9999; width:0; height:0; translate:-50% -50%; pointer-events:none; border:2px solid #c56127; border-radius:9999px;
  box-shadow:0 0 28px 6px #c5612773, inset 0 0 28px 4px #00719059;
}
::view-transition-old(root), ::view-transition-new(root) { animation:none; mix-blend-mode:normal; }

/* Buttons and fields. */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent; border-radius:var(--radius-sm);
  padding:9px 18px; font:600 14px/1.4 var(--font-sans); cursor:pointer; text-decoration:none;
  transition:background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), opacity .15s;
}
.btn:disabled { opacity:.45; cursor:default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.btn-primary { background:var(--primary); color:var(--on-primary); box-shadow:0 1px 2px #231d1b1a; }
.btn-primary:not(:disabled):hover { background:var(--primary-hover); }
.btn-ghost { background:var(--panel); color:var(--ink); border-color:var(--line-strong); }
.btn-ghost:not(:disabled):hover { background:var(--section); }
label { display:block; font-size:12px; font-weight:600; color:var(--ink-2); }
input, select {
  display:block; width:100%; margin-top:6px; padding:9px 12px; font:400 14px/1.4 var(--font-sans); color:var(--ink);
  background:var(--panel); border:1px solid var(--line-strong); border-radius:var(--radius-sm);
}
.tag {
  display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:600;
  color:var(--ink-2); background:var(--section); border:1px solid var(--line);
}
.notice { margin-top:14px; padding:9px 12px; border-radius:var(--radius-sm); font-size:13px; line-height:1.5; }
.notice-danger { color:var(--tawny-ink); background:var(--tawny-soft); }
#error:empty, #login-error:empty { display:none; }

/* Login. */
.preview-gate {
  position:relative; z-index:1; width:min(100% - 32px, 400px); margin:14vh auto 64px; padding:32px;
  background:var(--glass); backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px);
  border-radius:var(--radius-xl); box-shadow:0 0 0 1px var(--line), var(--shadow-lg);
}
.preview-gate h1 { font-size:26px; font-weight:400; letter-spacing:-.025em; line-height:1.2; }
.preview-gate h1 + p { margin-top:8px; color:var(--muted); font-size:13px; }
.preview-gate label { margin:22px 0 16px; }
.preview-gate .btn { width:100%; }

/* Page: a headline, then the call panel and the state panel. */
main { position:relative; z-index:1; padding:28px 36px 72px; }
/* The product switch: tabs in one pill, the chosen tab raised. */
.product-switch { display:inline-flex; flex:0 0 auto; gap:2px; margin-left:auto; padding:3px; background:var(--section); border:1px solid var(--line); border-radius:var(--radius); }
.product-switch button {
  padding:7px 16px; border:0; border-radius:var(--radius-sm); background:transparent; cursor:pointer;
  font:500 14px/1.4 var(--font-sans); color:var(--ink-2); transition:background-color .15s var(--ease), color .15s var(--ease);
}
.product-switch button:not(:disabled):hover { color:var(--ink); }
.product-switch button[aria-pressed="true"] { background:var(--panel); color:var(--ink); font-weight:600; box-shadow:0 1px 2px #231d1b14, inset 0 0 0 1px var(--line); }
.product-switch button:disabled { cursor:default; }
.product-switch button:disabled:not([aria-pressed="true"]) { opacity:.45; }
.product-switch button:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.panels { display:grid; grid-template-columns:minmax(340px, 480px) minmax(0, 1fr); gap:20px; align-items:start; }
main.demo .panels { grid-template-columns:minmax(0, 560px); justify-content:center; }
.col { display:flex; flex-direction:column; min-width:0; }
.panel { background:var(--panel); border-radius:var(--radius-lg); box-shadow:var(--shadow); }
.panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:18px 20px 16px; border-bottom:1px solid var(--line); }
.col-label { font-size:15px; font-weight:600; }
.panel-sub { margin-top:2px; font-size:13px; color:var(--muted); }
.panel-body { padding:20px; }
@media (max-width:920px) { .panels { grid-template-columns:minmax(0, 1fr); } }

/* The orb shows the call state: resting, connecting or listening. */
.orb-wrap { display:flex; justify-content:center; padding:20px 0 18px; }
.orb { position:relative; width:168px; height:168px; display:grid; place-items:center; }
.orb-bloom {
  position:absolute; inset:-44px; border-radius:50%; pointer-events:none;
  background:radial-gradient(circle, #0071906b 0%, transparent 66%); filter:blur(18px); opacity:.18;
  transition:opacity .3s var(--ease);
}
.orb-disc { position:absolute; inset:0; border-radius:50%; background:var(--section); box-shadow:inset 0 0 0 1px var(--line), var(--shadow); }
.orb-mark { position:relative; z-index:1; display:grid; place-items:center; }
.orb-mark img { display:block; width:96px; height:auto; }
.orb.state-resting .orb-bloom { animation:bloom 5.5s var(--ease) infinite; }
.orb.state-connecting .orb-bloom { opacity:.45; animation:bloom 1.15s ease-in-out infinite; }
.orb.state-listening .orb-bloom { opacity:.6; }
.orb.state-listening .orb-disc { box-shadow:inset 0 0 0 1px var(--line), 0 0 0 6px var(--blue-soft), var(--shadow); }
@keyframes bloom { 0%, 100% { opacity:.18; } 50% { opacity:.38; } }

.call-status { text-align:center; font:12px/1.4 var(--font-mono); color:var(--muted); }
.call-status.is-live { color:var(--ink); }
.call-status.is-live::before {
  content:""; display:inline-block; width:7px; height:7px; margin-right:8px; border-radius:50%; vertical-align:1px;
  background:var(--tawny); animation:live 1.6s ease-in-out infinite;
}
@keyframes live { 50% { opacity:.3; } }
.controls { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:16px; }
.preview-call-setup { width:min(100%, 300px); margin:18px auto 0; }
.routing-setup { margin:14px 0 0; padding:10px 12px 12px; border:1px solid var(--line); border-radius:var(--radius-sm); }
.routing-setup legend { padding:0 4px; font-size:12px; font-weight:600; color:var(--ink-2); }
.routing-setup label + label { margin-top:10px; }

/* Transcript: a speaker label and the line, on the section tone. */
#transcript {
  display:flex; flex-direction:column; gap:10px; max-height:46vh; overflow-y:auto; margin-top:22px;
  padding:14px 16px; background:var(--section); border-radius:var(--radius);
}
#transcript:empty::before { content:"The transcript appears here once the call starts."; color:var(--muted); font-size:13px; }
.line { font-size:14px; line-height:1.6; }
.line .who { margin-right:8px; font-size:11px; font-weight:600; letter-spacing:.02em; }
.line.agent .who { color:var(--blue-ink); }
.line.caller .who { color:var(--tawny-ink); }
.line .say { color:var(--ink); }

/* Live monitors: small round gauges. */
.monitor-stack { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px; margin-bottom:20px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.sentiment-gauges { display:contents; }
.live-monitor { width:72px; min-width:0; text-align:center; }
.live-monitor h3 { margin:0 0 6px; font-size:11px; font-weight:600; line-height:1.2; color:var(--muted); }
.live-monitor.is-emergency h3 { color:var(--tawny-ink); }
.monitor-gauge {
  --gauge-percent:0%; --gauge-color:var(--primary);
  position:relative; width:40px; height:40px; margin:auto; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(var(--gauge-color) var(--gauge-percent), var(--line-strong) 0);
}
.monitor-gauge::before { content:""; position:absolute; inset:4px; border-radius:50%; background:var(--panel); }
.monitor-gauge-value { position:relative; font-size:10px; font-weight:600; color:var(--ink); }
.monitor-gauge.is-unknown { --gauge-color:var(--muted); opacity:.7; }
.is-emergency .monitor-gauge { --gauge-color:var(--tawny); }

/* The board: one node per step on a vertical line; each node lists its details. */
.graph { position:relative; padding-left:34px; }
#board::before { content:""; position:absolute; left:9px; top:9px; width:1.5px; height:var(--trunk-height, 0px); background:var(--line-strong); }
.node { position:relative; padding-bottom:28px; }
.node:last-child { padding-bottom:0; }
.node-marker {
  position:absolute; left:-30px; top:4px; width:12px; height:12px; border-radius:50%;
  background:var(--panel); border:2px solid var(--line-strong);
  transition:background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.node.state-active .node-marker, .node.state-done .node-marker { background:var(--primary); border-color:var(--primary); }
.node.state-active .node-marker { animation:marker 2.4s var(--ease) infinite; }
.node.state-flagged .node-marker { background:var(--tawny); border-color:var(--tawny); box-shadow:0 0 0 4px var(--tawny-soft); }
@keyframes marker { 0%, 100% { box-shadow:0 0 0 0 var(--blue-soft); } 50% { box-shadow:0 0 0 5px var(--blue-soft); } }
.node-head { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.node-title { font-size:15px; font-weight:600; color:var(--ink); }
.node.state-dormant .node-title { color:var(--muted); font-weight:500; }
.node-caption { font-size:13px; color:var(--muted); line-height:1.55; }
.node > p { margin-top:6px; font-size:13px; }
.node.state-flagged > p { color:var(--tawny-ink); }
.node-items { display:flex; flex-direction:column; margin:10px 0 0 4px; padding-left:22px; border-left:1.5px solid var(--line); }
.item-row { position:relative; padding:6px 0 6px 18px; }
.item-row::before { content:""; position:absolute; left:-22px; top:15px; width:22px; height:1.5px; background:var(--line); }
.item-dot {
  position:absolute; left:-1px; top:11px; width:9px; height:9px; border-radius:50%;
  border:1.5px solid var(--line-strong); background:var(--panel);
}
.item-row.state-done .item-dot { background:var(--primary); border-color:var(--primary); }
.item-row.state-waived .item-dot { border-style:dashed; }
.item-row.state-flagged .item-dot { background:var(--tawny); border-color:var(--tawny); box-shadow:0 0 0 3px var(--tawny-soft); }
.item-label { font-size:13px; font-weight:600; color:var(--ink); }
.item-row.state-waiting .item-label, .item-row.state-waived .item-label { color:var(--muted); font-weight:500; }
.item-value { font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
.item-row.state-done .item-value { color:var(--ink-2); }
.item-row.state-flagged .item-value { color:var(--tawny-ink); }

/* Diagnostics. */
.diagnostics { margin-top:28px; padding-top:16px; border-top:1px solid var(--line); font-size:12px; color:var(--muted); }
.diagnostics summary { cursor:pointer; font-size:13px; font-weight:600; color:var(--ink-2); }
.diagnostics > p { margin:10px 0; }
#activity { max-height:220px; overflow:auto; font:12px/1.6 var(--font-mono); }
pre {
  margin:10px 0 0; padding:12px 14px; max-height:400px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere;
  font:12px/1.6 var(--font-mono); color:var(--ink-2); background:var(--section); border-radius:var(--radius);
}

@media (max-width:1180px) {
  .topbar { flex-wrap:wrap; row-gap:10px; }
  .product-switch { order:1; margin-left:0; }
  .product-switch:not([hidden]) + .tag-beta { margin-left:auto; }
  /* With tabs, the product text has its own row, so the tabs stay in the same place whichever summary is longer. */
  .topbar:has(.product-switch:not([hidden])) .topbar-rule { display:none; }
  .topbar:has(.product-switch:not([hidden])) .product { order:1; flex-basis:100%; }
}
@media (max-width:640px) {
  .topbar { padding:9px 16px; gap:12px; }
  .topbar-rule, .tag-beta { display:none; }
  .product { order:1; flex-basis:100%; }
  /* Three tabs fit a phone: the pill takes the row, the tabs share it, and a long label wraps to a second line. */
  .product-switch:has(button:nth-child(3)) { flex:1 1 100%; min-width:0; }
  .product-switch:has(button:nth-child(3)) button { flex:1 1 0; min-width:0; padding:6px 4px; font-size:13px; line-height:1.25; }
  .theme-toggle { margin-left:auto; }
  .wordmark { width:128px; }
  main { padding:28px 16px 48px; }
  .panel-head, .panel-body { padding-inline:16px; }
  .orb { width:140px; height:140px; }
  .orb-mark img { width:80px; }
}
