/* ASK UI kit — application styles */

.ask-app {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  background: #fff;
  color: var(--text-primary);
}

/* -------- Sidebar -------- */
.ask-sidebar {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 14px;
  background: #fff;
  overflow-y: auto;
}
.ask-sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.ask-sidebar__brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.ask-sidebar__brand-tag {
  margin-left: auto; font-size: 10px; color: var(--text-secondary);
  border: 1px solid var(--border-subtle); padding: 2px 6px; border-radius: 4px;
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
}
.ask-sidebar__new {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; font-size: 13px; font-weight: 500;
  background: #556DD7; color: #fff; border: 1px solid #556DD7;
  border-radius: 8px; cursor: pointer; font-family: inherit;
  transition: box-shadow 180ms cubic-bezier(0.2,0.8,0.2,1);
}
.ask-sidebar__new:hover { box-shadow: inset 0 0 0 100px rgba(0,0,0,0.10); }

.ask-sidebar__section { display: flex; flex-direction: column; gap: 2px; }
.ask-sidebar__heading {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--text-secondary); font-weight: 600;
  padding: 8px 8px 4px;
}
.ask-sidebar__nav, .ask-sidebar__pod {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; font-size: 13px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--text-primary); cursor: pointer; font-family: inherit; text-align: left;
  transition: background 120ms cubic-bezier(0.2,0.8,0.2,1);
}
.ask-sidebar__nav:hover, .ask-sidebar__pod:hover { background: rgba(0,0,0,0.04); }
.ask-sidebar__nav.is-active {
  background: #000; color: #fff;
}
.ask-sidebar__pill {
  margin-left: auto; font-size: 10px; font-weight: 600;
  background: #556DD7; color: #fff; padding: 1px 6px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.ask-sidebar__pod-name { font-family: ui-monospace, "Space Grotesk", monospace; font-size: 12px; }
.ask-sidebar__pod-count {
  margin-left: auto; font-size: 11px; color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.ask-sidebar__user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px; border: 1px solid var(--border-subtle); border-radius: 4px;
}
.ask-sidebar__user-avatar {
  width: 32px; height: 32px; background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; border-radius: 4px;
}
.ask-sidebar__user-name { font-size: 13px; font-weight: 600; }
.ask-sidebar__user-role { font-size: 11px; color: var(--text-secondary); }

/* -------- Topbar -------- */
.ask-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; gap: 16px;
  border-bottom: 1px solid var(--border-subtle); background: #fff;
}
.ask-topbar__left { display: flex; flex-direction: column; gap: 2px;}
.ask-topbar__eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--text-secondary); font-weight: 600;
}
.ask-topbar__title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em;}
.ask-topbar__sub { font-size: 12px; color: var(--text-secondary);}
.ask-topbar__right { display: flex; align-items: center; gap: 12px;}
.ask-topbar__status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-secondary);
  padding: 6px 10px; border: 1px solid var(--border-subtle); border-radius: 4px;
}
.ask-topbar__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,0.45);}
.ask-topbar__dot--ok { background: #556DD7; }

/* -------- Main pane -------- */
.ask-main {
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}
.ask-content { flex: 1; min-height: 0; display: flex; }

/* -------- Chat env -------- */
.ask-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ask-chat__scroll { flex: 1; overflow-y: auto; }
.ask-chat__inner {
  max-width: 820px; margin: 0 auto; padding: 28px 24px 16px;
  display: flex; flex-direction: column; gap: 24px;
}

/* -------- Message -------- */
.ask-msg { display: flex; gap: 14px; align-items: flex-start; }
.ask-msg__avatar {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  border: 1px solid var(--border-subtle);
}
.ask-msg--user .ask-msg__avatar { background: #000; color: #fff; border-color: #000; }
.ask-msg__body { flex: 1; min-width: 0; }
.ask-msg__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px;}
.ask-msg__name { font-size: 13px; font-weight: 600;}
.ask-msg__time { font-size: 11px; color: var(--text-secondary); font-variant-numeric: tabular-nums;}
.ask-msg__pod {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.ask-msg__text { font-size: 15px; color: rgba(0,0,0,0.65); line-height: 1.55; }
.ask-msg--user .ask-msg__text { color: #000; font-weight: 500; }
.ask-msg__cites { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.ask-msg__cites-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--text-secondary); font-weight: 600;
}
.ask-msg__cite-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 8px;
  border: 1px solid var(--border-subtle); border-radius: 4px;
  background: #fff; cursor: pointer; font-family: inherit;
  transition: background 120ms cubic-bezier(0.2,0.8,0.2,1), border-color 120ms;
}
.ask-msg__cite-chip:hover { background: rgba(0,0,0,0.04); border-color: #000;}
.ask-msg__cite-n {
  background: #556DD7; color: #fff; font-weight: 600;
  width: 18px; height: 16px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 3px; font-size: 11px;
}

.ask-cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 16px; padding: 0 5px; margin: 0 2px;
  background: #556DD7; color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 3px; cursor: pointer; font-variant-numeric: tabular-nums;
  border: none; vertical-align: 1px; font-family: inherit;
}
.ask-cite--contradicts { background: #000; }

/* -------- Composer -------- */
.ask-composer {
  border-top: 1px solid var(--border-subtle);
  padding: 14px 24px 18px;
  background: #fff;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 820px; margin: 0 auto; width: 100%;
}
.ask-composer__pod {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  font-size: 11px; color: var(--text-secondary);
  border: 1px solid var(--border-subtle); padding: 3px 8px; border-radius: 4px;
}
.ask-composer__pod strong { color: #000; font-family: ui-monospace, "Space Grotesk", monospace;}
.ask-composer__input {
  width: 100%; padding: 12px 14px; font-family: inherit; font-size: 15px;
  background: #fff; border: 1px solid #000; border-radius: 8px;
  color: #000; resize: vertical; outline: none;
  transition: box-shadow 180ms cubic-bezier(0.2,0.8,0.2,1);
}
.ask-composer__input:focus { box-shadow: 0 0 0 3px rgba(85,109,215,0.15); }
.ask-composer__bar { display: flex; align-items: center; justify-content: space-between;}
.ask-composer__hint { font-size: 11px; color: var(--text-secondary);}

/* -------- Notebook -------- */
.ask-nb { flex: 1; display: grid; grid-template-columns: 420px 1fr; min-height: 0; }
.ask-nb__chat { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border-subtle); }
.ask-nb__chat-scroll { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px;}
.ask-nb__chat .ask-composer { padding: 14px 20px 16px; max-width: none; }
.ask-nb__work { display: flex; flex-direction: column; min-height: 0; }
.ask-nb__work-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 28px; border-bottom: 1px solid var(--border-subtle);
}
.ask-nb__work-title { font-size: 20px; font-weight: 600; margin-top: 4px;}
.ask-nb__work-actions { display: flex; gap: 8px; }
.ask-nb__work-body { flex: 1; overflow-y: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 22px; max-width: 760px;}
.ask-nb__section { padding: 16px; border: 1px solid var(--border-subtle); border-radius: 4px; }
.ask-nb__section h4 { font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.ask-nb__section p { font-size: 14px; color: rgba(0,0,0,0.65); line-height: 1.55;}

/* -------- Vertical App -------- */
.ask-va { flex: 1; display: grid; grid-template-columns: 240px 1fr; min-height: 0; }
.ask-va__rail {
  border-right: 1px solid var(--border-subtle); padding: 24px 20px;
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(0,0,0,0.04);
}
.ask-va__steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px;}
.ask-va__step {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  padding: 8px 10px; border: 1px solid transparent; border-radius: 4px;
  color: var(--text-secondary);
}
.ask-va__step.is-done { color: #000; }
.ask-va__step.is-done .ask-va__step-num { background: #556DD7; color: #fff;}
.ask-va__step.is-active { color: #000; background: #fff; border-color: #000;}
.ask-va__step-num {
  width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--border-subtle);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; background: #fff;
}
.ask-va__bound {
  margin-top: auto; display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-secondary);
  border: 1px solid var(--border-subtle); padding: 8px 10px; border-radius: 4px; background: #fff;
}
.ask-va__main { padding: 28px 32px; overflow-y: auto; }
.ask-va__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px;}
.ask-va__title { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0;}
.ask-va__sub { font-size: 14px; color: rgba(0,0,0,0.65); max-width: 600px;}
.ask-va__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; max-width: 720px;}
.ask-va__field { display: flex; flex-direction: column; gap: 6px; }
.ask-va__field--full { grid-column: 1 / -1; }
.ask-va__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600; color: #000;
}
.ask-va__seg {
  display: flex; border: 1px solid #000; border-radius: 8px; overflow: hidden;
}
.ask-va__seg-btn {
  flex: 1; padding: 10px; font-family: inherit; font-size: 13px;
  background: #fff; border: none; cursor: pointer;
  border-right: 1px solid #000;
}
.ask-va__seg-btn:last-child { border-right: none; }
.ask-va__seg-btn.is-active { background: #000; color: #fff; }
.ask-va__cta { display: flex; gap: 8px; margin-top: 20px;}
.ask-va__done {
  margin-top: 20px; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border: 1px solid #556DD7; background: rgba(85,109,215,0.08);
  border-radius: 4px; color: #000; font-size: 13px;
}
.ask-va__done code { background: #fff; }

/* -------- Modals -------- */
.ask-modal__scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 24px;
}
.ask-modal, .ask-hitl, .ask-radar {
  background: #fff; border: 1px solid #000;
  box-shadow: 6px 6px 0 0 #000; border-radius: 4px;
  width: 100%; padding: 22px;
}
.ask-modal { max-width: 560px; }
.ask-hitl  { max-width: 560px; }
.ask-radar { max-width: 760px; }
.ask-modal__head, .ask-radar__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.ask-modal__title { font-size: 18px; font-weight: 600; margin-top: 2px;}
.ask-modal__close {
  background: transparent; border: 1px solid var(--border-subtle); border-radius: 4px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit;
}
.ask-modal__close:hover { background: #000; color: #fff; border-color: #000;}
.ask-modal__meta {
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px;
  color: var(--text-secondary); margin: 12px 0 14px;
  font-variant-numeric: tabular-nums;
}
.ask-modal__meta span { display: inline-flex; align-items: center; gap: 4px; }
.ask-modal__excerpt {
  background: rgba(0,0,0,0.04); border: 1px solid var(--border-subtle);
  border-radius: 4px; padding: 14px 16px;
}
.ask-modal__excerpt p { font-size: 14px; line-height: 1.6; color: #000;}
.ask-modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px;}

/* HITL */
.ask-hitl__phase {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: #556DD7; font-weight: 600;
}
.ask-hitl__title { font-size: 20px; font-weight: 600; margin: 4px 0; }
.ask-hitl__desc { font-size: 13px; color: rgba(0,0,0,0.65); margin-bottom: 16px;}
.ask-hitl__plan { list-style: none; padding: 0; margin: 0;
  border: 1px solid var(--border-subtle); border-radius: 4px;}
.ask-hitl__op {
  display: grid; grid-template-columns: 28px 60px 1fr 2fr; gap: 8px;
  padding: 10px 12px; font-size: 12px; align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}
.ask-hitl__op:last-child { border-bottom: none; }
.ask-hitl__num { color: #556DD7; font-weight: 600; }
.ask-hitl__verb { font-weight: 600; color: #000; }
.ask-hitl__path { background: rgba(0,0,0,0.04); padding: 2px 6px; border-radius: 3px; font-size: 11px;}
.ask-hitl__desc-line { color: rgba(0,0,0,0.65); }
.ask-hitl__sig {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  padding: 8px 12px; background: rgba(0,0,0,0.04); border-radius: 4px;
  font-size: 11px; color: var(--text-secondary);
}
.ask-hitl__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px;}

/* Radar */
.ask-radar__title { font-size: 22px; font-weight: 600; margin-top: 4px;}
.ask-radar__sub { font-size: 12px; color: rgba(0,0,0,0.65); margin-top: 4px;}
.ask-radar__panes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px;}
.ask-radar__pane { border: 1px solid var(--border-subtle); padding: 14px; border-radius: 4px;}
.ask-radar__pane-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px;}
.ask-radar__pane-stat { font-size: 11px; color: var(--text-secondary); margin-left: auto;}
.ask-radar__lanes { display: flex; flex-direction: column; gap: 12px; }
.ask-radar__lane-name { font-size: 12px; font-family: ui-monospace, "Space Grotesk", monospace; color: #000; margin-bottom: 4px;}
.ask-radar__bar { height: 12px; border: 1px solid var(--border-subtle); background: #fff;}
.ask-radar__bar-fill { height: 100%; }
.ask-radar__lane-meta { font-size: 11px; color: var(--text-secondary); margin-top: 4px; font-variant-numeric: tabular-nums;}
.ask-radar__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px;}

/* env switcher rail */
.ask-env-strip {
  display: flex; gap: 0; padding: 8px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0,0,0,0.04);
}
