/* The ask box: a tray beside the questions tray, in the same dark glass. */
.asktray {
  position: absolute; z-index: 46; top: calc(var(--bar-h) + 12px); right: 16px;
  width: min(480px, calc(100vw - 32px)); max-height: calc(100% - var(--bar-h) - 28px);
  overflow: auto; padding: 12px; border-radius: 16px;
  background: var(--ink); border: 1px solid var(--hair-strong);
}
.asktray .qtray__head h2 {
  margin: 0; font-family: var(--font-heading); font-weight: var(--weight-600);
  font-size: var(--size-body); letter-spacing: .06em; text-transform: uppercase; color: var(--cream);
}
.ask__form { display: grid; gap: 8px; margin-top: 8px; }
.ask__label {
  font-family: var(--font-mono); font-weight: var(--weight-500);
  font-size: var(--size-small); letter-spacing: .08em; text-transform: uppercase; color: var(--ash);
}
.ask__form textarea {
  width: 100%; min-height: 88px; padding: 12px 14px; resize: vertical;
  border-radius: 12px; border: 1px solid var(--hair-strong);
  background: var(--rock); color: var(--cream);
  font: inherit; font-size: var(--size-body);
}
.ask__form textarea:focus-visible { outline: none; border-color: var(--lava); box-shadow: 0 0 0 2px var(--ember-soft); }
.ask__form textarea[aria-invalid="true"] { border-color: var(--deep); box-shadow: 0 0 0 1px var(--deep); }
.ask__hint { margin: 0; color: var(--ash); font-size: var(--size-small); }
.ask__form .btn { justify-self: end; min-height: 44px; }
.ask__form .btn:disabled { opacity: .6; cursor: progress; }
.ask__status { margin: 8px 0 0; color: var(--ash); }
.ask__status:empty { display: none; }
.ask__result:empty { display: none; }
.ask__result { margin-top: 12px; display: grid; gap: 10px; }
.ask__answer { margin: 0; color: var(--cream); line-height: 1.55; white-space: pre-line; }
.ask__cite {
  margin: 0 2px; padding: 0 2px; min-height: 24px; border: 0; background: none;
  color: var(--link-on-dark); font-family: var(--font-mono); font-size: var(--size-small);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.ask__cite:hover { color: var(--cream); }
.ask__cite:focus-visible, .ask__open:focus-visible, .ask__search:focus-visible { outline: 2px solid var(--focus-on-dark); outline-offset: 2px; }
.ask__h {
  margin: 4px 0 0; font-family: var(--font-heading); font-weight: var(--weight-600);
  font-size: var(--size-small); letter-spacing: .06em; text-transform: uppercase; color: var(--ash);
}
.ask__srcs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ask__src {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: baseline;
  padding: 10px 12px; border-radius: 12px; background: var(--rock); border: 1px solid var(--hair);
}
.ask__n { color: var(--lava); font-size: var(--size-small); }
.ask__doc { color: var(--cream); overflow-wrap: anywhere; }
.ask__page { color: var(--ash); font-size: var(--size-small); }
.ask__quote { grid-column: 1 / -1; color: var(--ash); font-style: italic; overflow-wrap: anywhere; }
.ask__open { grid-column: 1 / -1; justify-self: start; min-height: 36px; }
.ask__none { margin: 0; color: var(--cream); }
.ask__search { justify-self: start; min-height: 44px; }
