/* Shell: header, nav, footage eye, operator chip, dock, Ask, toasts, tab bar, capture dock. */
.app-header { background: var(--navy); color: var(--on-navy); }
.app-header__inner { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); display: flex; align-items: center; gap: 28px; flex-wrap: wrap; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-navy); text-decoration: none; }
.brand:hover { color: #fff; }
.brand__mark { display: block; width: 78px; height: 26px; background: url("/static/assets/aivs-wordmark-light.svg") left center / contain no-repeat; }
.brand__product { font-weight: 580; font-size: 15px; border-left: 1px solid var(--navy-line-2); padding-left: 12px; }
.app-nav { display: flex; gap: 22px; }
.app-nav a { display: flex; align-items: center; gap: 6px; height: var(--header-h); color: var(--on-navy-muted); text-decoration: none; font-weight: 560; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.app-nav a:hover { color: #fff; }
.app-nav a[aria-current="page"] { color: #fff; border-color: var(--highlight); }
.nav-count { margin-left: 6px; }
.app-header__tools { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.settings-link[aria-current="page"] { border-color: var(--highlight); }
.eye { min-width: 44px; }

.operator { position: relative; }
.operator-chip { cursor: pointer; min-height: 32px; border: 1px solid transparent; }
.operator-chip:hover { border-color: var(--navy-line-2); }
.operator-chip svg { width: 14px; height: 14px; }
.operator-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; padding: 6px; background: var(--card); color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-card); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 2px; }
.operator-menu__note { padding: 8px 10px 4px; font-size: var(--text-xs); }
.operator-menu__item { display: flex; align-items: center; gap: 10px; min-height: max(40px, var(--target-min)); padding: 0 10px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; font-weight: 600; font-size: 14px; }
.operator-menu__item:hover { background: var(--paper); }
.operator-menu__item svg { width: 16px; height: 16px; }

/* Dock and Ask */
.dock__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.dock__title { font: 650 17px/1.2 var(--font-display); letter-spacing: -.02em; }
.dock__body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ask { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; }
.ask__log { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.ask__turns { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ask__you { font-weight: 650; }
.ask__claims { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ask__coverage { font-size: var(--text-xs); margin-top: 6px; }
.ask__status[data-error="true"] { color: var(--bad-ink); }
.ask__composer { display: flex; flex-direction: column; gap: 8px; }
.ask__question { width: 100%; resize: vertical; min-height: 64px; }
.ask__row { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.ask__row .mono { margin-right: auto; }
.ask-launcher { width: var(--launcher-size); height: var(--launcher-size); border-radius: 50%; border: 0; background: var(--navy); color: var(--highlight); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-pop); }
.ask-launcher:hover { background: var(--navy-2); }
.ask-launcher--busy { outline: 3px solid var(--highlight); outline-offset: 2px; }

/* Toasts */
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-card); background: var(--navy); color: var(--on-navy); box-shadow: var(--shadow-pop); font-size: 14px; }
.toast__body { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.toast__link { color: var(--highlight); font-weight: 650; }
.toast--bad .toast__link, .toast--warn .toast__link { color: #fff; text-decoration: underline; }
.toast__close { border: 0; background: transparent; color: inherit; cursor: pointer; min-width: var(--target-min); min-height: var(--target-min); }
.toast--bad { background: var(--bad-ink); }
.toast--warn { background: var(--warn-ink); }

/* Phone tab bar and capture dock */
.tab-bar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 650; }
.tab-bar a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--amber); }
.tab-count { margin-left: 4px; }
.cap { flex: 1; min-height: 48px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; font-weight: 650; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; color: var(--ink); }
.cap svg { width: 18px; height: 18px; }
.cap--stop { background: var(--bad-ink); border-color: var(--bad-ink); color: #fff; }

@media (max-width: 1099.98px) {
  .app-header__inner { gap: 16px; }
  .app-nav { gap: 16px; }
  .eye__label { font-size: 12px; }
}
@media (max-width: 759.98px) {
  .app-header__inner { flex-wrap: nowrap; gap: 10px; min-height: 56px; padding: 0 12px 0 16px; }
  .app-nav { display: none; }
  .brand__mark { width: 58px; height: 20px; }
  .brand__product { font-size: 14px; padding-left: 10px; }
  .app-header__tools { gap: 8px; padding: 6px 0; }
  .eye__label, .operator-chip__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .eye, .settings-link, .operator-chip { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 8px; border: 1px solid var(--navy-line); }
  .operator-chip > svg:last-child { display: none; }
}
