/* The /ask/ page around the answers: suggestions, the thread and the form. */
.sug{display:flex;flex-wrap:wrap;gap:.6em;margin-top:1.5em}
.sug[hidden]{display:none}
button.btn{background:none;cursor:pointer;text-align:left}
.sug .btn{font-weight:400}
button.btn:disabled{opacity:.45;cursor:default}
#thread>.q{margin-top:2.5em;font-weight:600}
#thread>.a{margin-top:.9em}
#thread>.e{margin-top:.9em;color:var(--m)}
#ask{display:grid;gap:.6em;margin-top:2.5em}
#ask textarea{width:100%;min-height:3.4em;padding:.55em .75em;border:1px solid var(--m);background:var(--b);resize:vertical}
#ask .btn{justify-self:start}
.note{margin-top:2.5em}

/* Loading skeletons, one grey that breathes like MorphScreen's own.
   Before the first word (.wait) the answer is a skeleton of text and a card;
   while it streams, a short one sits under what has been drawn so far. */
#thread{--sk:#e4e4e4}
@media(prefers-color-scheme:dark){#thread{--sk:#2c2c2c}}
@keyframes sk{from{opacity:1}to{opacity:.4}}
#thread>.a[aria-busy=true]::after{content:"";display:block;height:2.2em;margin-top:1em;background:linear-gradient(var(--sk) 0 0) 0 0/86% .8em no-repeat,linear-gradient(var(--sk) 0 0) 0 1.4em/58% .8em no-repeat;animation:sk .9s ease-in-out infinite alternate}
#thread>.a.wait::after{height:10em;margin-top:0;background:linear-gradient(var(--sk) 0 0) 0 0/96% .8em no-repeat,linear-gradient(var(--sk) 0 0) 0 1.4em/82% .8em no-repeat,linear-gradient(var(--sk) 0 0) 0 2.8em/54% .8em no-repeat,linear-gradient(var(--sk) 0 0) 0 4.6em/100% 5.4em no-repeat}
/* MorphScreen's own placeholders for parts still streaming, darker to show. */
#thread .ms-answer .ms-pending:not(.ms-custom *){background:var(--sk)}
/* A table waits for its first row: show its header and skeleton rows meanwhile. */
#thread .ms-answer .ms-table[hidden]:not(.ms-custom *){display:block!important}
#thread .ms-answer .ms-table[hidden]:not(.ms-custom *)::after{content:"";display:block;height:5.2em;margin-top:.6em;background:linear-gradient(var(--sk) 0 0) 0 0/100% 1em no-repeat,linear-gradient(var(--sk) 0 0) 0 2.1em/100% 1em no-repeat,linear-gradient(var(--sk) 0 0) 0 4.2em/72% 1em no-repeat;animation:sk .9s ease-in-out infinite alternate}
@media(prefers-reduced-motion:reduce){#thread>.a::after,#thread .ms-table[hidden]::after{animation:none}}

/* MorphScreen 0.1.1 bug (sdk/web/src/charts.ts): the chart's hover layer uses
   classes its own stylesheet doesn't know (hover, band, cross, dot sN instead
   of ms-hover, ms-band, ms-cross, ms-dot ms-sN), so a hovered bar became a
   black block. These style them the way the SDK means to, until it's fixed. */
#thread .ms-chart g.hover{pointer-events:none}
#thread .ms-chart g.hover .band{fill:var(--ms-ink);opacity:.05}
#thread .ms-chart g.hover .cross{stroke:var(--ms-ink-3);stroke-width:1;stroke-dasharray:2 3}
#thread .ms-chart g.hover .dot{fill:var(--ms-c1);stroke:var(--ms-surface);stroke-width:2}
#thread .ms-chart g.hover .dot.s2{fill:var(--ms-c2)}#thread .ms-chart g.hover .dot.s3{fill:var(--ms-c3)}#thread .ms-chart g.hover .dot.s4{fill:var(--ms-c4)}#thread .ms-chart g.hover .dot.s5{fill:var(--ms-c5)}#thread .ms-chart g.hover .dot.s6{fill:var(--ms-c6)}#thread .ms-chart g.hover .dot.s7{fill:var(--ms-c7)}#thread .ms-chart g.hover .dot.s8{fill:var(--ms-c8)}
