/* Saariv Analysis. Signed out: a header, the public page and the search bar. Signed in (body.is-app): a sidebar,
   the page being looked at, and the search bar under it. Colours and components come from ui.css. */
html, body { height: 100%; }
body.an { margin: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  height: 100vh; height: 100dvh; overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* ------------------------------------------------------------------ header (signed out; the phone top bar signed in) */
.an-header { position: relative; z-index: 30; display: flex; align-items: center; gap: 14px; height: 60px;
  padding: 0 24px; background: color-mix(in srgb, var(--surface) 86%, transparent); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.an-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16.5px;
  letter-spacing: -0.02em; text-decoration: none; }
.an-logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  color: var(--on-accent); font-size: 14px; font-weight: 800; letter-spacing: -0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--shadow-xs); }
.an-app-slot { display: flex; align-items: center; min-width: 0; }
.an-user-slot { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.an-nav-links { display: flex; gap: 2px; margin-left: 18px; }
.an-nav-links a { padding: 6px 10px; border-radius: 7px; color: var(--muted); font-size: 14px; font-weight: 500;
  text-decoration: none; }
.an-nav-links a:hover { color: var(--text); background: var(--sunken); }
@media (max-width: 760px) { .an-nav-links { display: none; } }

/* the app switcher */
.an-switcher { display: inline-flex; align-items: center; gap: 9px; max-width: 420px; height: 36px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.an-switcher:hover, .an-switcher[aria-expanded="true"] { background: var(--line-2); border-color: var(--line); }
.an-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--faint);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.an-switcher-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-switcher-domain { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-chevron { flex: none; color: var(--muted); }

.an-menu { position: absolute; top: 52px; z-index: 40; min-width: 280px; max-width: calc(100vw - 24px); padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -16px rgba(0, 0, 0, 0.25); }
.an-menu[hidden] { display: none; }
.an-menu-label { padding: 8px 10px 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.an-menu [role^="menuitem"] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
.an-menu [role^="menuitem"]:hover { background: var(--line-2); }
.an-menu-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.an-menu-name { font-weight: 500; }
.an-menu-sub { font-size: 13px; color: var(--muted); }
.an-check { flex: none; color: var(--ink); visibility: hidden; }
[aria-checked="true"] .an-check { visibility: visible; }
.an-menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.an-menu-note { padding: 6px 10px 8px; font-size: 13px; color: var(--muted); }

.an-avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--line-2);
  font-weight: 600; font-size: 13px; cursor: pointer; text-transform: uppercase; }

/* ------------------------------------------------------------------ stage and overview */
.an-stage { position: relative; overflow: hidden; }
.an-overview { position: absolute; inset: 0; overflow-y: auto; padding: 36px 24px 40px;
  transition: filter 0.25s ease, opacity 0.25s ease; }
body.is-focus .an-overview, body.is-typing .an-overview, body.is-open .an-overview { filter: blur(6px); opacity: 0.55; pointer-events: none;
  user-select: none; }
.an-wrap { max-width: 960px; margin: 0 auto; }

.an-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 4px; }
.an-title h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.an-domain { color: var(--muted); text-decoration: none; }
.an-domain:hover { color: var(--ink); text-decoration: underline; }
.an-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 14px; }
.an-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 6px 0 32px; }
.an-tag-btn { height: 34px; padding: 0 14px; font-size: 13.5px; }
.an-dialog.an-tag { position: relative; width: min(560px, calc(100vw - 32px)); }
.an-tag h2 { padding-right: 36px; }
.an-tag .an-error { margin: 0; }
.an-tag-code { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--line-2); }
.an-tag-code pre { flex: 1 1 0; min-width: 0; margin: 0; white-space: pre-wrap; word-break: break-all;
  font: 12.5px/1.5 ui-monospace, Menlo, monospace; color: var(--ink); }
.an-tag-code .an-btn { flex: none; }
.an-tag-how { margin: 0 0 12px; font-size: 14px; }
.an-tag-how summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.an-tag-how p { margin: 8px 0 0; color: var(--ink-2); }
.an-dialog p.an-tag-note { margin: 0; font-size: 13px; }
.an-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.an-status.is-live::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }

.an-h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.an-section { margin-bottom: 32px; }

/* how Saariv works for this app: four steps with live numbers */
.an-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); overflow: hidden; }
.an-step { position: relative; padding: 16px 18px 18px; }
.an-step + .an-step { border-left: 1px solid var(--line); }
.an-step + .an-step::before { content: ""; position: absolute; left: -5px; top: 24px; width: 8px; height: 8px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--card); transform: rotate(45deg); }
.an-step-n { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.an-step-title { margin: 2px 0 6px; font-weight: 600; }
.an-step-text { margin: 0; color: var(--muted); font-size: 14px; }
.an-step-text b { color: var(--ink); font-weight: 600; }

.an-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.an-stat { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.an-stat-label { font-size: 13px; color: var(--muted); }
.an-stat-value { margin-top: 2px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; }
.an-stat-sub { font-size: 12.5px; color: var(--faint); }

.an-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.an-card { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.an-card .an-h2 { margin-bottom: 8px; }
.an-list { margin: 0; padding: 0; list-style: none; }
.an-list li + li { border-top: 1px solid var(--line-2); }
.an-ask { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 9px 0; border: 0; background: none;
  text-align: left; cursor: pointer; }
.an-ask:hover .an-ask-text { text-decoration: underline; text-underline-offset: 3px; }
.an-ask-text { flex: 1; min-width: 0; }
.an-ask-text::first-letter { text-transform: uppercase; }
.an-count { flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.an-empty { margin: 4px 0 2px; color: var(--muted); font-size: 14px; }
.an-summary { margin: 0; color: var(--ink-2); }

/* signed out */
.an-hero { max-width: 720px; margin: 6vh auto 0; text-align: center; }
.an-hero h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; font-weight: 700;
  letter-spacing: -0.035em; }
.an-hero > p { margin: 0 auto 28px; max-width: 560px; color: var(--muted); font-size: 17px; }
.an-hero-actions { display: flex; justify-content: center; gap: 10px; margin-bottom: 48px; }
.an-hero .an-flow { text-align: left; }
.an-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.an-error { margin: 0 auto 24px; max-width: 560px; padding: 10px 14px; border-radius: 10px; background: var(--danger-soft);
  color: var(--danger-ink); font-size: 14px; }

.an-dialog { border: 1px solid var(--line); border-radius: 14px; padding: 22px; width: min(400px, calc(100vw - 32px));
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.35); }
.an-dialog::backdrop { background: rgba(24, 24, 27, 0.3); }
.an-dialog h2 { margin: 0 0 4px; font-size: 18px; }
.an-dialog p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.an-dialog form { display: flex; flex-direction: column; gap: 10px; }
.an-dialog input { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.an-dialog input:focus { outline: none; border-color: var(--ink); }
.an-dialog-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ------------------------------------------------------------------ search bar and answers */
.an-dock { position: relative; z-index: 20; min-width: 0; padding: 12px 20px 16px; background: var(--bg); }
.an-dock .sa-form { max-width: 100%; }
.an-dock[hidden] { display: none; }
.an .sa-form { border-radius: 12px; border: 1px solid var(--line); background: var(--card); padding: 5px 5px 5px 44px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -16px rgba(0, 0, 0, 0.3); }
.an .sa-form:focus-within { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08); }
.an .sa-icon { left: 15px; color: var(--muted); opacity: 1; }
.an .sa-input { font-size: 15.5px; padding: 9px 0; }
.an .sa-input::placeholder { color: var(--faint); }
.an .sa-send { width: 38px; min-height: 38px; padding: 0; border-radius: 9px; display: grid; place-items: center;
  background: var(--ink); color: #fff; }
.an .sa-form.has-attach { padding-left: 5px; }
.an .sa-stop { min-height: 38px; border-radius: 9px; padding: 0 14px; font-size: 14px; }
.an .sa-scrim { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.an .sa-panel { top: 16px; bottom: 8px; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 28px 60px -28px rgba(0, 0, 0, 0.35); }
.an .sa-panel-head { padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--line-2); }
.an .sa-back, .an .sa-new { font: 500 13.5px/1 var(--font-body); color: var(--muted); }
.an .sa-back:hover, .an .sa-new:hover { background: var(--line-2); color: var(--ink); }
.an .sa-scroll { padding: 18px 28px 24px; }
.an .sa-scroll .msg-user { font: 600 17px/1.35 var(--font-body); letter-spacing: -0.01em; }
.an .trace { color: var(--faint); }

@media (max-width: 760px) {
  .an-flow { grid-template-columns: 1fr 1fr; }
  .an-step:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .an-step:nth-child(4) { border-top: 1px solid var(--line); }
  .an-step:nth-child(3)::before { display: none; }
  .an-stats { grid-template-columns: 1fr 1fr; }
  .an-cols { grid-template-columns: 1fr; }
  .an-switcher-domain { display: none; }
  .an-header { padding: 0 12px; gap: 10px; }
  .an-overview { padding: 24px 16px 32px; }
  .an-dock { padding: 10px 10px 12px; }
  .an .sa-scroll { padding: 14px 16px 18px; }
}
@media (prefers-reduced-motion: reduce) { .an-overview { transition: none; } }

/* widgets read as part of the answer: no "Code" button, a quiet title */
.an .blk-toggle, .an .blk-code { display: none !important; }
.an .blk { border-color: var(--line); }
.an .blk-head { border-bottom-color: var(--line-2); }
.an .blk-title { font-weight: 600; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ connected apps */
.an-apps .an-h2 { margin-bottom: 10px; }
.an-apps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.an-apps-none { color: var(--muted); font-size: 14px; margin-right: 4px; }
.an-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.an-chip:hover { border-color: var(--faint); }
.an-chip.is-active::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.an-chip.is-pending::before, .an-chip.is-needs_reauth::before { content: ""; width: 7px; height: 7px;
  border-radius: 50%; background: var(--warn); }
.an-chip--add { border-style: dashed; color: var(--ink-2); }

.an-sheet { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(480px, 100vw); padding: 0; border: 0;
  border-left: 1px solid var(--line); background: var(--bg); color: var(--ink);
  box-shadow: -20px 0 48px -24px rgba(0, 0, 0, 0.3); animation: an-sheet-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1); }
.an-sheet[open] { display: flex; flex-direction: column; }
.an-sheet::backdrop { background: rgba(24, 24, 27, 0.25); }
@keyframes an-sheet-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.an-sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 14px; background: var(--card);
  border-bottom: 1px solid var(--line); }
.an-sheet-head h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.an-sheet-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.an-sheet-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 22px;
  line-height: 1; color: var(--muted); cursor: pointer; }
.an-sheet-close:hover { background: var(--line-2); color: var(--ink); }
.an-sheet-body { flex: 1; overflow: auto; padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 12px; }

.an-conn { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 14px; }
.an-conn--chat { max-width: 520px; margin: 8px 0 12px; }
.an-conn-head { display: flex; align-items: flex-start; gap: 12px; }
.an-conn-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--primary-soft); border: 1px solid var(--line); font-weight: 600; color: var(--ink-2); }
.an-conn-title { min-width: 0; }
.an-conn-name { font-weight: 600; }
.an-conn-blurb { color: var(--muted); font-size: 13.5px; }
.an-conn-reads { margin: 12px 0 0; color: var(--ink-2); font-size: 13.5px; }
.an-conn-note { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; }
.an-conn-error { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--danger-soft); color: var(--danger-ink);
  font-size: 13.5px; }
.an-conn-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.an-conn-status { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.an-conn-status .an-check { visibility: visible; color: var(--ok); }
.an-conn-row.is-pending .an-conn-status, .an-conn-row.is-needs_reauth .an-conn-status { color: var(--warn-ink); }
.an-conn-form { display: flex; flex-direction: column; gap: 10px; }
.an-conn-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.an-conn-field input, .an-conn-field select, .an-conn-select { height: 38px; padding: 0 11px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); font: inherit; font-size: 14px; color: var(--ink); min-width: 0; }
.an-conn-field input:focus, .an-conn-field select:focus, .an-conn-select:focus { outline: none; border-color: var(--ink); }
.an-conn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.an-conn-form .an-conn-actions { margin-top: 2px; }
.an-conn-select { flex: 1 1 200px; }
.an-btn--quiet { border-color: transparent; background: none; color: var(--muted); }
.an-btn--quiet:hover { background: var(--line-2); color: var(--ink); }
.an-btn--quiet.is-danger { color: var(--danger-ink); background: var(--danger-soft); }
.an-conn-try { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block;
  line-height: 34px; }
@media (max-width: 560px) {
  .an-sheet { width: 100vw; border-left: 0; }
  .an-sheet-head, .an-sheet-body { padding-left: 16px; padding-right: 16px; }
}

.an-conn-steps { margin: 2px 0 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg);
  border: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
.an-conn-steps summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.an-conn-steps ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.an-conn-steps li { overflow-wrap: anywhere; }
.an-copy { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 2px 0; padding: 2px 4px 2px 8px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--card); vertical-align: middle; }
.an-copy code { font-size: 12.5px; overflow-wrap: anywhere; }
.an-copy-btn { flex: none; height: 24px; padding: 0 8px; border: 0; border-radius: 5px; background: var(--line-2);
  font-size: 12px; font-weight: 500; cursor: pointer; }
.an-copy-btn:hover { background: var(--line); }

/* ------------------------------------------------------------------ buttons being tracked */
.an-buttons-head { display: flex; align-items: baseline; gap: 8px; }
.an-buttons-head .an-h2 { margin: 0; }
.an-buttons-when { color: var(--muted); font-size: 13px; }
.an-buttons-sum { margin: 4px 0 10px; color: var(--ink-2); font-size: 14px; }
.an-buttons-more { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.an-btable { display: flex; flex-direction: column; }
.an-brow { display: grid; grid-template-columns: minmax(0, 1fr) 92px 64px 64px; align-items: center; gap: 12px;
  width: 100%; padding: 9px 0; border: 0; border-top: 1px solid var(--line-2); background: none; text-align: left;
  font-size: 14px; cursor: pointer; }
.an-brow--head { padding: 0 0 6px; border-top: 0; color: var(--muted); font-size: 12px; font-weight: 500; cursor: default; }
.an-brow--head span:nth-child(n+3) { text-align: right; }
button.an-brow:hover .an-bname { text-decoration: underline; text-underline-offset: 3px; }
button.an-brow:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.an-bname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-btype { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2);
  font-size: 12px; font-weight: 500; }
.an-btype.is-buy { background: var(--ok-soft); color: var(--ok-ink); }
.an-bnum { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.an-bnum.has-clicks { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) {
  .an-brow { grid-template-columns: minmax(0, 1fr) 44px 52px; }
  .an-brow > :nth-child(2) { display: none; }
}

/* ------------------------------------------------------------------ choosing an app, then its details */
.an-sheet-head { align-items: flex-start; }
.an-sheet-back { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -2px -4px 0 -8px;
  border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer; }
.an-sheet-back:hover { background: var(--line-2); color: var(--ink); }
.an-sheet-back[hidden] { display: none; }
.an-sheet-titles { flex: 1; min-width: 0; }
.an-sheet-titles h2:focus { outline: none; }
.an-sheet-label { margin: 2px 0 10px; font-size: 12px; font-weight: 500; color: var(--muted); }
.an-sheet-body.is-entering { animation: an-view-in 0.18s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes an-view-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.an-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.an-tile { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 148px; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: left; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.an-tile:hover { border-color: var(--faint); box-shadow: 0 8px 20px -14px rgba(0, 0, 0, 0.35); transform: translateY(-1px); }
.an-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.an-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.an-tile-status { padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--muted);
  font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.an-tile-status.is-on { background: var(--ok-soft); color: var(--ok-ink); }
.an-tile-status.is-warn { background: var(--warn-soft); color: var(--warn-ink); }
.an-tile-status.is-off { background: var(--line-2); color: var(--faint); }
.an-tile-name { font-weight: 600; font-size: 14.5px; }
.an-tile-blurb { color: var(--muted); font-size: 13px; line-height: 1.4; }
.an-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto;
  padding-top: 10px; color: var(--ink-2); font-size: 12.5px; }
.an-tile-foot svg { flex: none; color: var(--faint); transition: transform 0.15s, color 0.15s; }
.an-tile:hover .an-tile-foot svg { transform: translateX(2px); color: var(--ink); }

.an-conn--bare { padding: 0; border: 0; background: none; }
.an-conn--bare > .an-conn-row:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.an-conn--bare .an-conn-form > .an-conn-reads:first-child { margin-top: 0; }
.an-conn--picker .an-tiles { margin-top: 2px; }
.an-conn--picker .an-tile { min-height: 132px; }
@media (max-width: 560px) {
  .an-tiles { grid-template-columns: minmax(0, 1fr); }
  .an-tile { min-height: 0; }
}
.an-conn-icon { font-size: 12.5px; letter-spacing: -0.02em; }

/* ------------------------------------------------------------------ a connected app: name + on/off toggle */
.an-conn-on { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--ok-line); border-radius: 10px; background: var(--ok-soft); }
.an-conn--bare > .an-conn-on:first-child, .an-conn-head + .an-conn-on { margin-top: 12px; }
.an-conn--bare > .an-conn-on:first-child { margin-top: 0; }
.an-conn-on.is-paused { border-color: var(--line); background: var(--bg); }
.an-conn-on-main { display: flex; align-items: center; gap: 10px; }
.an-conn-on-mark { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ok); color: #fff; }
.an-conn-on-mark .an-check { visibility: visible; color: #fff; }
.an-conn-on.is-paused .an-conn-on-mark { background: var(--faint); }
.an-conn-on-text { flex: 1; min-width: 0; }
.an-conn-on-title { font-weight: 600; font-size: 14.5px; }
.an-conn-on-sub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.an-conn-on-actions { margin-top: 10px; justify-content: space-between; }
.an-conn-on-actions .an-conn-remove { margin-left: auto; }
.an-switch { flex: none; position: relative; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px;
  background: var(--border-strong); cursor: pointer; transition: background 0.2s ease; }
.an-switch[aria-checked="true"] { background: var(--ok); }
.an-switch:disabled { cursor: progress; }
.an-switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.an-switch-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.an-switch[aria-checked="true"] .an-switch-knob { transform: translateX(16px); }
.an-tile-status.is-paused { background: var(--line-2); color: var(--ink-2); }
.an-chip.is-paused { color: var(--muted); }
.an-chip.is-paused::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
@media (prefers-reduced-motion: reduce) { .an-switch, .an-switch-knob { transition: none; } }

/* ------------------------------------------------------------------ website update card */
.an-upd .an-conn-icon { font-size: 17px; }
.an-upd-bar { height: 4px; margin-top: 12px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.an-upd-fill { display: block; width: 4%; height: 100%; border-radius: 4px; background: var(--ink);
  transition: width .6s ease; }
.an-upd.is-done .an-upd-fill { background: var(--ok); }
.an-upd.is-failed .an-upd-fill { background: var(--danger); }
.an-upd.is-done .an-upd-bar, .an-upd.is-failed .an-upd-bar { display: none; }
.an-upd-foot:not(:empty) { margin-top: 12px; }
.an-upd.is-failed .an-conn-blurb { color: var(--danger-ink); }
@media (prefers-reduced-motion: reduce) { .an-upd-fill { transition: none; } }

/* ------------------------------------------------------------------ signed out: links and the login dialog */
.an-btn--ghost { border-color: transparent; background: none; }
.an-btn--ghost:hover { background: var(--line-2); }
.an-hero-foot { margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.an-hero-foot a { color: var(--ink); font-weight: 500; }
.an-login { position: relative; width: min(420px, calc(100vw - 24px)); padding: 28px; }
.an-login h2 { margin: 0 0 18px; font-size: 21px; letter-spacing: -0.02em; }
.an-login .acct-foot { margin-top: 18px; }
.an-login-dev { display: block; margin: 12px auto 0; font-size: 13px; color: var(--muted); }
.an-login-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.an-login-close:hover { background: var(--line-2); color: var(--ink); }
@media (max-width: 560px) { .an-user-slot .an-btn--ghost { display: none; } }

/* customer research card on the overview */
.an-research-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.an-research-card > div { flex: 1; min-width: 240px; }
.an-research-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.an-btn.has-dot { position: relative; }
.an-btn.has-dot::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px #fff; }

/* ------------------------------------------------------------------ signed out: the landing page */
.an-land { padding-bottom: 120px; }  /* room above the search bar */
.an-land .an-hero { max-width: 760px; margin: 5vh auto 0; }
.an-eyebrow { display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.an-land .an-hero h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.03em; }
.an-land .an-hero-actions { margin-bottom: 12px; }
.an-hero-note { color: var(--muted); font-size: 13.5px; }
.an-land-section { margin-top: 72px; }
.an-land-h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; text-align: center; }
.an-land-lead { margin: 0 auto 22px; max-width: 560px; color: var(--muted); text-align: center; }
.an-land .an-flow { background: var(--card); }
.an-qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.an-q { padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.an-q-q { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.an-q-a { position: relative; margin-top: 10px; padding-left: 16px; color: var(--muted); font-size: 14px; }
.an-q-a::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 2px;
  background: var(--line); }
.an-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.an-feat { padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.an-feat h3 { margin: 0 0 6px; font-size: 15.5px; }
.an-feat p { margin: 0; color: var(--muted); font-size: 14px; }
.an-land-cta { margin-top: 72px; padding: 36px 24px; border-radius: 18px; background: var(--ink); color: #fff;
  text-align: center; }
.an-land-cta h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -0.02em; }
.an-land-cta p { margin: 0 auto 22px; max-width: 520px; color: var(--border-strong); }
.an-land-cta .an-hero-actions { margin: 0; }
.an-land-cta .an-btn--solid { background: var(--surface); border-color: #fff; color: var(--ink); }
.an-land-cta .an-btn--solid:hover { background: var(--sunken); }
.an-land-cta .an-btn:not(.an-btn--solid) { background: transparent; color: #fff; border-color: #52525b; }
.an-land-cta .an-btn:not(.an-btn--solid):hover { background: #27272a; }
@media (max-width: 860px) {
  .an-feats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .an-qs, .an-feats { grid-template-columns: 1fr; }
  .an-land-section, .an-land-cta { margin-top: 48px; }
  .an-land .an-hero-actions { flex-direction: column; align-items: stretch; }
}

/* sheets: Team and Review Saariv */
.an-dialog.an-box { position: relative; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  overflow-y: auto; }
.an-box h2 { padding-right: 36px; }
.an-inline-error { margin: 0 0 12px; max-width: none; }
.an-team-add { display: flex !important; flex-direction: row !important; gap: 8px; margin-bottom: 14px; }
.an-team-add input { flex: 1 1 0; min-width: 0; }
.an-team { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.an-team li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.an-team-who { display: flex; flex-direction: column; min-width: 0; }
.an-team-email { overflow-wrap: anywhere; font-weight: 500; }
.an-team-role { color: var(--muted); font-size: 13px; }
.an-team-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; font-size: 14px; }
.an-team-confirm span { flex: 1 1 100%; overflow-wrap: anywhere; }
.an-dialog p.an-team-note { margin: 12px 0 0; font-size: 13px; }
.an-btn--danger { background: var(--danger-ink); border-color: var(--danger-ink); color: #fff; }
.an-btn--danger:hover { background: var(--danger-ink); }
.an-review form textarea { min-height: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; resize: vertical; }
.an-review form textarea:focus { outline: none; border-color: var(--ink); }
.an-stars { display: flex; gap: 2px; }
.an-star { width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--line);
  cursor: pointer; border-radius: 8px; }
.an-star.is-on { color: #f59e0b; }
.an-star:focus-visible { outline: 2px solid var(--ink); }
.an-dialog p.an-review-status { margin: 0; font-size: 13px; }
/* reviews on the public page */
.an-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.an-review-card { margin: 0; padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; }
.an-review-stars { color: #f59e0b; letter-spacing: 2px; }
.an-review-card blockquote { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.an-review-card figcaption { margin-top: auto; display: flex; flex-direction: column; font-size: 13.5px; }
.an-review-card figcaption span { color: var(--muted); }
@media (max-width: 860px) { .an-review-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .an-review-grid { grid-template-columns: 1fr; } }

/* MCP servers the account added itself */
.an-conn-icon--mcp { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.an-badge-mine { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  background: var(--violet-soft); color: var(--violet-ink); font-size: 11.5px; font-weight: 600; vertical-align: 1px; }
.an-mine { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.an-mine-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.an-mine-head .an-h3 { margin: 0 0 4px; font-size: 15px; }
.an-mine-sub { margin: 0; color: var(--muted); font-size: 13px; max-width: 560px; }
.an-mine-empty { margin: 12px 0 0; }
.an-mine-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.an-mine-row { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: inherit; font: inherit; cursor: pointer; }
.an-mine-row:hover { border-color: var(--accent); }
.an-mine-main { display: grid; gap: 2px; min-width: 0; }
.an-mine-name { font-weight: 600; overflow-wrap: anywhere; }
.an-mine-meta { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.an-mine-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.an-mine-dot.is-on { background: var(--ok-ink, #079455); }
.an-mine-dot.is-warn { background: var(--warn-ink, #b54708); }
.an-conn-about { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.an-conn-about-input { flex: 1 1 200px; min-width: 0; font: inherit; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: transparent; color: inherit; }
.an-conn-keylink { justify-self: start; align-self: flex-start; margin-right: auto; text-align: left; font-size: 13px; }
.an-conn-visitors { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px;
  border-radius: 10px; background: var(--accent-soft); cursor: pointer; font-size: 13.5px; }
.an-conn-visitors input { margin-top: 3px; }
.an-conn-visitors span { display: grid; gap: 2px; }

/* What visitors ask */
.vq-panes { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; min-height: 60vh; }
.vq-list-pane { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vq-read-pane { min-width: 0; border: 1px solid var(--border, var(--line)); border-radius: 14px; background: var(--card);
  padding: 14px 16px; overflow: auto; max-height: calc(100dvh - 230px); }
.vq-search-row { display: flex; gap: 8px; }
.vq-search { flex: 1 1 auto; width: auto; min-width: 0; }
.vq-days { flex: none; width: auto; }
.vq-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.vq-chips .ib-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.vq-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vq-row { width: 100%; text-align: left; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--border, var(--line));
  border-radius: 12px; background: var(--card); color: inherit; font: inherit; cursor: pointer; }
.vq-row:hover, .vq-row.is-current { border-color: var(--accent); }
.vq-row-top { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.vq-row-q { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vq-row-when { flex: none; color: var(--muted); font-size: 12px; }
.vq-row-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12.5px; }
.vq-more { justify-self: start; margin-top: 6px; }
.vq-pad { padding: 12px 4px; }
.vq-read-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.vq-read-title { display: grid; flex: 1; min-width: 0; font-size: 13px; }
.vq-back { display: none; }
.vq-turns { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.vq-turn { display: grid; gap: 6px; }
.vq-q, .vq-a { padding: 10px 12px; border-radius: 12px; }
.vq-q { background: var(--accent-soft); justify-self: end; max-width: 85%; }
.vq-a { background: var(--bg-2, rgba(127,127,127,.08)); max-width: 92%; }
.vq-q p, .vq-a p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.vq-who { font-size: 12px; color: var(--muted); }
.vq-tags { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .vq-panes { grid-template-columns: 1fr; }
  .vq-panes.is-reading .vq-list-pane { display: none; }
  .vq-panes:not(.is-reading) .vq-read-pane { display: none; }
  .vq-back { display: inline-flex; }
  .vq-read-pane { max-height: none; }
}

/* The product tour */
dialog.tour { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0;
  padding: 0; border: 0; background: transparent; overflow: hidden; }
dialog.tour::backdrop { background: transparent; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10, 12, 20, .55);
  outline: 2px solid var(--accent); transition: all .2s ease; pointer-events: none; }
.tour-hole[hidden] { display: block; left: 50%; top: 50%; width: 0; height: 0; outline: 0; }
.tour-card { position: fixed; width: min(340px, calc(100vw - 32px)); background: var(--card); color: var(--text, inherit);
  border: 1px solid var(--border, var(--line)); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 16px; }
.tour-card.is-center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.tour-step { font-size: 12px; color: var(--muted); }
.tour-title { margin: 4px 0 6px; font-size: 17px; }
.tour-text { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.tour-actions { display: flex; gap: 6px; align-items: center; }
.tour-gap { flex: 1; }

/* Saariv's logo */
.an-logo-img { width: 28px; height: 28px; display: block; flex: none; object-fit: contain; }

/* ------------------------------------------------------------------ each chat's guard rails (top of the chat) */
.an-guards { max-width: 860px; margin: 0 auto 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--card); font-size: 13.5px; }
.an-guards.is-strict { border-color: var(--warn); background: var(--warn-soft); }
.an-guards-title { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }
.an-guards-status { margin: 6px 0 0; color: var(--muted); }
.an-guards-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.an-guard { padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg);
  overflow-wrap: anywhere; max-width: 100%; }
.an-guard.is-read-only { border-color: var(--warn); color: var(--warn-ink); }
.an-guards-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.an-guards-note { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0; color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .an-guards { margin: 0 0 10px; } }

/* The search bar's plan: a checklist that ticks off, then folds away for the answer */
.an-plan { margin: 2px 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--sunken); }
.an-plan-sum { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--text-2); }
.an-plan-sum::-webkit-details-marker { display: none; }
.an-plan-sum::after { content: "\25BE"; margin-left: auto; color: var(--faint); transition: transform 0.15s; }
.an-plan:not([open]) .an-plan-sum::after { transform: rotate(-90deg); }
.an-plan-done { color: var(--ok); font-weight: 700; }
.an-plan-list { display: grid; gap: 6px; margin: 0; padding: 0 12px 10px; list-style: none; counter-reset: step; }
.an-plan-step { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--text-2);
  counter-increment: step; }
.an-plan-mark { position: relative; flex: none; display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; border: 1.5px solid var(--border-strong); font-size: 11px; font-weight: 650; color: var(--muted); }
.an-plan-step.is-waiting .an-plan-mark::before, .an-plan-step.is-running .an-plan-mark::before { content: counter(step); }
.an-plan-step.is-running .an-plan-mark { border-color: var(--accent); color: var(--accent); }
.an-plan-step.is-running .an-plan-mark::after { content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent); animation: an-plan-spin 0.9s linear infinite; }
.an-plan-step.is-done .an-plan-mark { border-color: var(--ok); background: var(--ok); color: var(--on-accent); }
.an-plan-step.is-done .an-plan-mark::before { content: "\2713"; }
.an-plan-step.is-skipped { color: var(--faint); }
.an-plan-step.is-skipped .an-plan-mark::before { content: "\2013"; }
.an-plan-goal { flex: 1 1 200px; min-width: 0; }
.an-plan-chip { height: 20px; padding: 0 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 11.5px; line-height: 18px; color: var(--muted); white-space: nowrap; }
.an-plan-chip--think { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
@keyframes an-plan-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .an-plan-step.is-running .an-plan-mark::after { animation: none; } }
