/* ASK inside DeckForge: the deck page's line, the chat drawer and /ask.
   Its own sheet — style.css sits at its page-weight ceiling — and built
   only from style.css's tokens, so both themes come with it. Text on a
   gold fill is always --on-gold. */

/* The line under Brewmaster: its own row, a quiet outlined button. */
.ask-row { margin-top: .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem;
  font-size: .88rem; color: var(--ink-2); border: 1px solid var(--border); border-radius: 2px; padding: .5rem .85rem; }
.ask-quiet { font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink-2); background: none;
  border: 1px solid var(--border); border-radius: 2px; padding: .3rem .75rem; cursor: pointer; }
.ask-quiet:hover { border-color: var(--gold); color: var(--ink); }
.ask-quiet:disabled { opacity: .6; cursor: wait; }
.ask-hint { margin-left: auto; font-size: .78rem; color: var(--muted); }
.ask-hint.ready { color: var(--gold-bright); font-weight: 700; }
.ask-gold { font: inherit; font-size: .85rem; font-weight: 700; color: var(--on-gold); border: 0; border-radius: 2px; padding: .34rem .8rem; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-fill-bright), var(--gold-fill) 60%, var(--gold-fill-deep)); }
.ask-gold:disabled { opacity: .6; cursor: wait; }
.ask-gold.done, .ask-gold.done:disabled { background: none; color: var(--good-ink); border: 1px solid var(--border); cursor: default; opacity: 1; }
.ask-row :focus-visible, .ask-chat :focus-visible, .ask-side :focus-visible { outline: none; box-shadow: var(--ring); }

/* The drawer: over the right of the deck, full screen on a phone. Its layer
   sits between the page's floating things (the piles tray and nav results at
   50, the phone tab bar at 45) and the windows that must cover it (sign-in,
   Plus, the card panel and Assign list at 60). While it is open the card
   preview (50) rides above it — a chip in an answer showed its card BEHIND
   the drawer (Joseph's screenshot, 2026-09-30). */
.ask-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 55; width: min(440px, 100vw); display: flex;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-2); }
body.ask-open .card-preview { z-index: 58; }
/* Standing aside for a card's panel (ask.js moves it), without a jump. */
.ask-drawer { transition: right .18s ease; }
@media (prefers-reduced-motion: reduce) { .ask-drawer { transition: none; } }
/* The drawer sits under the top bar (ask.js fits it); the bar's own menus —
   the account menu, the search results — drop over it, not under it. */
body.ask-open .topnav { z-index: 57; }
/* No scroll lock on a phone: the page can still be moved to bring its top bar
   back, while the chat's own scrolling stays in the chat (overscroll below). */
@media (max-width: 700px) { .ask-drawer { border-left: 0; } }

.ask-chat { display: flex; flex-direction: column; min-width: 0; flex: 1; color: var(--ink); font-size: .92rem; }
.ask-head { display: flex; align-items: center; gap: .5rem; padding: .65rem .8rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ask-word { font-family: var(--display); font-weight: 700; letter-spacing: .14em; color: var(--gold); }
.ask-title { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.ask-about { font-size: .76rem; border: 1px solid var(--border); border-radius: 999px; padding: .06rem .55rem; color: var(--ink-2);
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; }
.ask-about b { color: var(--gold); }
a.ask-about:hover { border-color: var(--gold); }
.ask-tools { margin-left: auto; display: flex; gap: .3rem; }
.ask-icon { font: inherit; font-size: .78rem; background: none; border: 1px solid var(--border); color: var(--ink-2);
  border-radius: 2px; padding: .15rem .5rem; cursor: pointer; text-decoration: none; }
.ask-icon:hover { color: var(--ink); border-color: var(--gold); }
.ask-allow { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .78rem; color: var(--muted); padding: .4rem .8rem;
  border-bottom: 1px solid var(--border-soft); background: var(--surface-2); }
.ask-allow .linkish { font-size: inherit; }

.ask-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: .8rem; display: flex; flex-direction: column; gap: .7rem; min-height: 12rem; }
.ask-empty { margin: auto 0; padding: 0 .6rem; text-align: center; color: var(--muted); font-size: .88rem; line-height: 1.55; text-wrap: balance; }
.ask-me { align-self: flex-end; max-width: 85%; background: var(--gold-wash); border: 1px solid var(--border);
  border-radius: 14px 14px 3px 14px; padding: .5rem .75rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-att { display: block; font-size: .74rem; color: var(--muted); margin-top: .25rem; white-space: normal; }
.ask-bot { align-self: stretch; background: var(--surface-hi); border: 1px solid var(--border-soft);
  border-radius: 14px 14px 14px 3px; padding: .65rem .85rem; overflow-wrap: anywhere; }
.ask-md h4 { font-family: var(--display); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: .5rem 0 .25rem; }
.ask-md h4:first-child { margin-top: 0; }
.ask-md p { margin: .35rem 0; line-height: 1.55; }
.ask-md ul, .ask-md ol { margin: .3rem 0; padding-left: 1.2rem; }
.ask-md li { margin: .18rem 0; line-height: 1.5; }
.ask-md blockquote { margin: .4rem 0; padding-left: .7rem; border-left: 3px solid var(--border); color: var(--ink-2); }
.ask-md code { font-size: .85em; background: var(--surface-2); border-radius: 3px; padding: 0 .25rem; }
.ask-md a { color: var(--gold-bright); }
.ask-md .ms-img { vertical-align: -2px; margin: 0 1px; }
.ask-card { font: inherit; font-weight: 600; color: var(--gold-bright); background: none; border: 0; padding: 0; cursor: help;
  border-bottom: 1px dotted currentColor; }
.ask-card.plain { font-weight: 600; color: var(--ink); border: 0; cursor: auto; }
.ask-links { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .85rem; }
.ask-links a { color: var(--gold-bright); }

.ask-checks { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; padding-top: .5rem; border-top: 1px dashed var(--border); }
.ask-checks .ck { font-size: .73rem; border-radius: 999px; padding: .05rem .5rem; border: 1px solid var(--border); color: var(--ink-2); background: var(--surface-2); }
.ask-checks .ck.ok { color: var(--good-ink); background: none; font-weight: 700; }
.ask-checks .ck.bad { color: var(--bad-ink); background: none; font-weight: 700; }
.ask-checks .ck.warn { color: var(--bar); background: none; }
.ask-fb { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .45rem; font-size: .78rem; color: var(--muted); }
.ask-fb:empty { display: none; }
.ask-fb > button { font: inherit; background: none; border: 1px solid var(--border); border-radius: 999px; padding: 0 .45rem; cursor: pointer; }
.ask-fb > button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-wash); }
.ask-fb-more { display: flex; gap: .3rem; flex-basis: 100%; }
.ask-fb-more input { flex: 1; font: inherit; font-size: .8rem; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; padding: .2rem .45rem; }
.ask-fb-more button { font: inherit; font-size: .78rem; color: var(--ink-2); background: none; border: 1px solid var(--border); border-radius: 2px; padding: .15rem .5rem; cursor: pointer; }

/* ASK's proposed list: changes first; saved only when you press Save. */
.ask-prop { border: 1px solid var(--border); border-left: 4px solid var(--gold-fill); border-radius: 2px; padding: .65rem .8rem;
  background: linear-gradient(90deg, var(--gold-wash), transparent 60%), var(--surface); font-size: .88rem; }
.ask-prop-t { font-weight: 700; margin-bottom: .35rem; }
.ask-chg { display: grid; grid-template-columns: auto 1fr; gap: .12rem .6rem; font-variant-numeric: tabular-nums; }
.ask-chg .out { color: var(--bad-ink); font-weight: 700; }
.ask-chg .in { color: var(--good-ink); font-weight: 700; }
.ask-prop .ask-checks { border-top: 0; padding-top: 0; }
.ask-prop-acts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .55rem; }
.ask-small { font-size: .76rem; color: var(--muted); margin-top: .35rem; }
.ask-small:empty { display: none; }

/* Waiting: what ASK is doing, never a half-written draft. */
.ask-wait { align-self: flex-start; display: inline-flex; align-items: center; gap: .55rem; color: var(--ink-2); background: var(--surface-hi);
  border: 1px solid var(--border-soft); border-radius: 14px 14px 14px 3px; padding: .5rem .8rem; font-size: .86rem; }
.ask-dots { display: inline-flex; gap: 3px; }
.ask-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: .3; animation: askDot 1.2s infinite; }
.ask-dots i:nth-child(2) { animation-delay: .2s; } .ask-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes askDot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ask-dots i { animation: none; opacity: .7; } }
.ask-steps { font-size: .74rem; color: var(--muted); margin: .2rem 0 0 .3rem; }
.ask-cancel { font-size: .78rem; margin-left: .3rem; }
.ask-steps:empty { display: none; }

/* A "no": why, and what happens next. */
.ask-no { border: 1px solid var(--border); border-radius: 2px; padding: .7rem .85rem; background: var(--surface-2); font-size: .88rem; }
.ask-no-t { font-weight: 700; margin-bottom: .2rem; }
.ask-no p { margin: .15rem 0 .55rem; color: var(--ink-2); }

/* The box you type in. */
.ask-comp { border-top: 1px solid var(--border); padding: .6rem .7rem; display: grid; gap: .45rem; }
.ask-starters { display: flex; flex-wrap: wrap; gap: .3rem; }
.ask-starters:empty { display: none; }
.ask-starters button { font: inherit; font-size: .76rem; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
  border-radius: 999px; padding: .12rem .6rem; cursor: pointer; }
.ask-starters button:hover { border-color: var(--gold); color: var(--ink); }
.ask-box { display: flex; gap: .4rem; align-items: flex-end; }
.ask-box textarea { flex: 1; min-height: 2.7rem; max-height: 9rem; resize: vertical; font: inherit; font-size: .9rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; padding: .45rem .6rem; }
.ask-send { font: inherit; font-weight: 700; color: var(--on-gold); border: 0; border-radius: 2px; padding: .5rem 1rem; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-fill-bright), var(--gold-fill) 60%, var(--gold-fill-deep)); }
.ask-send:disabled { opacity: .55; cursor: wait; }

/* /ask: every chat, newest first. */
.ask-page { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: min(80vh, 56rem); background: var(--surface);
  border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.ask-page.ask-closed { display: block; height: auto; padding: 1rem; }
@media (max-width: 760px) {
  .ask-page { grid-template-columns: 1fr; height: auto; }
  .ask-side { max-height: 16rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .ask-main .ask-log { max-height: 65vh; }
}
.ask-side { border-right: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; min-width: 0; }
.ask-side-top { display: flex; gap: .4rem; padding: .6rem; border-bottom: 1px solid var(--border); }
.ask-search { flex: 1; min-width: 0; font: inherit; font-size: .84rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 2px; padding: .3rem .5rem; }
.ask-items { overflow-y: auto; }
.ask-items > p { padding: .6rem .7rem; }
.ask-item { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0;
  border-bottom: 1px solid var(--border-soft); border-left: 3px solid transparent; padding: .55rem .7rem; cursor: pointer; }
.ask-item:hover { background: var(--hilite); }
.ask-item.on { background: var(--gold-wash); border-left-color: var(--gold-fill); }
.ask-item.ready .ask-item-t::after { content: " •"; color: var(--gold-bright); }
.ask-item-t { font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-item-m { display: flex; gap: .4rem; align-items: center; font-size: .72rem; color: var(--muted); margin-top: .15rem; min-width: 0; }
.ask-item-m .ask-about { font-size: .68rem; padding: 0 .4rem; max-width: 10rem; }
.ask-main { display: flex; min-width: 0; min-height: 0; }
.ask-main .ask-chat { min-height: 0; }

.forge-heading{display:flex;flex-direction:column;gap:1px;min-width:0;margin-right:auto}.forge-remaining{font:11px/14px var(--body,system-ui);color:var(--muted);white-space:nowrap}
