/* css/ask.css - the "Ask" helper (js/ask.js, ask helper board 4, 2026-11-11): the floating button on every page, its dialog,
   and the inline box on /database. Uses the site.css tokens only. */
.ask-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 45;
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px 11px 14px;
  border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer;
  color: #fff; font: 600 .95rem/1 var(--font-body); letter-spacing: .03em;
  background: linear-gradient(180deg, #d4483f, #8e1c22);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(214, 84, 76, .25), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s ease, box-shadow .2s;
}
.ask-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0, 0, 0, .55), 0 0 22px rgba(214, 84, 76, .35), inset 0 1px 0 rgba(255, 255, 255, .3); }
.ask-fab svg { width: 22px; height: 22px; fill: none; stroke: #ffe9c9; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ask-fab svg .q { stroke: var(--gold-bright); }
@media (max-width: 520px) { .ask-fab { right: 12px; bottom: 12px; padding: 12px; } .ask-fab span { display: none; } }
@media print { .ask-fab { display: none; } }

.ask-dialog {
  width: min(680px, calc(100% - 24px)); max-height: calc(100vh - 48px); padding: 22px 22px 16px; margin: auto;
  border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow), var(--glow);
}
.ask-dialog::backdrop { background: rgba(5, 3, 4, .72); backdrop-filter: blur(3px); }
.ask-dialog-head { position: relative; padding-right: 40px; margin-bottom: 12px; }
.ask-dialog-head .eyebrow { margin-bottom: 8px; }
.ask-dialog-head h2 { font-size: 1.5rem; margin: 0; }
.ask-close {
  position: absolute; top: -6px; right: -6px; width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text-dim); font-size: 1.4rem; line-height: 1;
}
.ask-close:hover { color: var(--gold-bright); border-color: var(--line-strong); }
.ask-foot { margin: 14px 0 0; color: var(--text-faint); font-size: .85rem; }

.ask-form { display: flex; gap: 10px; }
.ask-form .ask-input { flex: 1; min-width: 0; font-size: 1.04rem; }
.ask-go { flex: none; }
.ask-go[disabled] { opacity: .6; cursor: progress; }
.ask-examples, .ask-choices, .ask-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ask-try { color: var(--text-faint); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-right: 2px; }
.ask-chip {
  padding: 5px 11px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .85rem;
  color: var(--text-dim); background: rgba(255, 255, 255, .03); border: 1px solid var(--line-soft);
}
.ask-chip:hover { color: var(--gold-bright); border-color: var(--line); }
.compact .ask-examples .ask-chip:nth-child(n+4) { display: none; }

.ask-answer {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); border-left: 3px solid var(--gold); background: rgba(0, 0, 0, .28);
}
.ask-answer.kind-unknown, .ask-answer.kind-error { border-left-color: var(--violet); }
.ask-answer.kind-ambiguous { border-left-color: var(--warn); }
.ask-answer.loading { border-left-color: var(--line-strong); }
.ask-thinking { color: var(--text-dim); font-style: italic; }
.ask-lines p { margin: 0 0 .45em; }
.ask-lines p:last-child { margin-bottom: 0; }
.ask-ref {
  display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(226, 184, 102, .05); color: var(--gold-bright); line-height: 1.25;
}
.ask-ref small { color: var(--text-faint); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.ask-ref:hover { border-color: var(--line-strong); background: rgba(226, 184, 102, .1); }
.ask-ref.ref-monster small { color: var(--violet-bright); }

/* the inline box on /database */
.ask-section { padding: 0 0 18px; }
.ask-panel {
  padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(38, 28, 30, .85), rgba(20, 16, 17, .85)); box-shadow: var(--glow);
}
.ask-panel h2 { font-size: 1.2rem; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.ask-panel h2 small { font: 400 .85rem/1.3 var(--font-body); color: var(--text-faint); letter-spacing: 0; }
@media (max-width: 520px) { .ask-form { flex-direction: column; } .ask-go { width: 100%; } }
