/* /create/ live — what the working surface needs beyond the structure variant's "genesis portal" styles.
   The variant is not edited; this file only adds. Tokens are the variant's (var(--…)). */

/* the study's moment switcher and its account link are not the live page's */
.portal-head .portal-states{display:none}
.portal-actions>a.link[href="#"]{display:none}
.portal-actions{margin-left:auto}
.open-composer .btn[aria-disabled=true]{opacity:.7;pointer-events:none}
.open-doors .door.on h3{color:var(--red-text)}
.open-note.bad{color:var(--red-text)}

/* the header's file count: the rail, folded, on a phone */
.portal-files{display:none;height:32px;padding:0 12px;border:1px solid var(--line-2);border-radius:2px;background:transparent;color:var(--ink-2);font:500 13.5px var(--sans);cursor:pointer}
.portal-files:hover{color:var(--ink);border-color:var(--line-3)}

/* the surface, three columns from 1000px up (the variant drops the pane at 1100) */
.portal-work.live{height:calc(100vh - 57px);height:calc(100dvh - 57px);min-height:0}
@media (min-width:1000px){
  .portal-work.live{grid-template-columns:216px minmax(360px,1fr) minmax(340px,.95fr)}
  .portal-work.live .portal-doc{display:block}
}
@media (min-width:1280px){.portal-work.live{grid-template-columns:232px minmax(420px,1fr) minmax(400px,.95fr)}}
.portal-work.live .chat-scroll{gap:20px}
.portal-work.live .chat-scroll>.msg{flex:none}
.portal-work.live .msg.bot{max-width:min(100%,46em)}
.portal-work.live .msg.me{max-width:min(86%,40em)}
.portal-work.live .msg p{text-wrap:pretty}
/* a sent message not yet known to have landed */
.portal-work.live .msg.me.flying{opacity:.72}
.portal-work.live .msg.me.flying::after{content:"Sending…";display:block;margin-top:4px;font-size:12.5px;line-height:1.4;opacity:.8}
.rail-head{position:relative}
.rail-part{padding:8px 20px 2px;font-family:var(--mono);font-size:11.5px;color:var(--ink-3)}
.rail-part~.rail-row{padding-left:30px}
.rail-sec .rail-row .rail-name{flex:1}
.portal-head .theme-switch{height:32px;padding:0 10px;border:0;border-radius:2px;background:transparent;color:var(--ink-3);font:500 13.5px var(--sans);cursor:pointer}
.portal-head .theme-switch:hover{color:var(--ink)}
.doc-head .chip[hidden]{display:none}
.composer[hidden]{display:none}
.sheet-close{display:none}

/* waiting: a dot, and the sentence the engine declares for the wait */
.msg.bot .say .dot{display:none}
.msg.bot.thinking .say{display:flex;flex-wrap:wrap;align-items:center;gap:10px;min-height:1.55em}
.msg.bot.thinking .say .dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--cool)}
.msg.bot.thinking.replied .say .dot{display:none}
.msg.bot.thinking .wait{font-size:14.5px;color:var(--ink-3)}
.msg.bot.thinking .wait:empty{display:none}
.msg.bot.thinking .reply:empty,.msg.bot.thinking .landing:empty{display:none}
.msg.bot.thinking .reply{flex-basis:100%;order:-1}
.landing{flex-basis:100%;display:grid;gap:4px;font-size:14.5px;color:var(--ink-2)}
.landing strong{color:var(--ink);font-weight:600}
@media (prefers-reduced-motion:no-preference){.msg.bot.thinking .say .dot{animation:st-pulse 1.2s ease-in-out infinite}}
.msg.bot.note .say{font-size:14.5px;color:var(--ink-3)}
.msg.bot.failed .say{color:var(--red-text)}
.btn.try{display:flex;margin-top:12px;height:36px;padding:0 14px;font-size:14px}

/* the composer: the quick reply, the field, and the quiet line under it */
.composer .quick[hidden],.composer-foot .stop[hidden]{display:none}
.composer input:disabled{opacity:.5}
.composer .btn:disabled{opacity:.5;cursor:default}
.portal-work.live .composer{margin-bottom:8px}
.composer-foot{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 36px 14px;min-height:20px;font-size:12.5px;line-height:1.5;color:var(--ink-3)}
.composer-foot .stop{flex:none;padding:0;border:0;background:none;font:inherit;font-size:13.5px;cursor:pointer}
.composer-foot .kept{margin-left:auto;text-align:right}

/* the card, drawn from its declaration */
.ctl-card input:disabled{opacity:.55;cursor:default}
.ctl-preview[hidden]{display:none}
.ctl-preview .line{display:block;min-height:1.5em}
.ctl-preview.writing .line::after{content:"";display:inline-block;width:.5em;height:1em;margin-left:2px;vertical-align:-.12em;background:var(--cool);opacity:.7}
@media (prefers-reduced-motion:no-preference){.ctl-preview.writing .line::after{animation:st-pulse 1s steps(2) infinite}}

/* the email, asked at Show me */
.offer-mail{display:grid;gap:8px;margin-top:16px;padding:16px 18px;background:var(--panel);border:1px solid var(--card-line);max-width:34em}
.offer-mail label{font-size:14px;line-height:1.5;color:var(--ink-2)}
.offer-mail input{height:44px;padding:0 12px;background:var(--well);border:1px solid var(--line-2);border-radius:2px;font:inherit;color:var(--ink)}
.offer-mail input:focus-visible{outline:2px solid var(--cool);outline-offset:1px}
.offer-mail input.bad{border-color:var(--red-line)}
.offer-mail.asked label{color:var(--red-text)}

/* a file that landed, as a card in the conversation */
.file-card{display:flex;align-items:center;gap:10px;margin-top:14px;padding:10px 12px;background:var(--panel);border:1px solid var(--card-line);max-width:34em}
.file-card .file-path{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12.5px;color:var(--ink-2)}
.file-card .open{margin-left:auto;font-size:13.5px;color:var(--cool-text)}
.file-card:hover{border-color:var(--line-3)}
.file-card.landed{margin-top:8px;padding:7px 10px}
.file-card.landed+.file-card.landed{margin-top:6px}
@media (min-width:1000px){.file-card.landed{display:none}}

/* a closed question: its choices, each with its note and the reason it is suggested */
.choices{display:grid;gap:8px;margin-top:16px}
.choice{display:grid;gap:3px;padding:12px 14px 12px 40px;text-align:left;background:var(--panel);border:1px solid var(--card-line);border-radius:2px;color:var(--ink);font:inherit;cursor:pointer;position:relative}
.choice::before{content:"";position:absolute;left:14px;top:15px;width:14px;height:14px;border:1px solid var(--line-3);border-radius:2px;background:var(--well)}
.choices:not(.multi) .choice::before{border-radius:50%}
.choice.on{border-color:var(--red-line);background:var(--red-wash)}
.choice.on::before{background:var(--red);border-color:var(--red);box-shadow:inset 0 0 0 3px var(--panel)}
.choice:hover:not(:disabled){border-color:var(--line-3)}
.choice.on:hover:not(:disabled){border-color:var(--red-text)}
.choice:disabled{cursor:default;opacity:.75}
.choice:disabled:not(.on){display:none}
.choices .more{justify-self:start;padding:4px 0;border:0;background:none;font:inherit;font-size:14px;cursor:pointer}
.choices-rest{display:grid;gap:8px}
.choices-rest[hidden]{display:none}
.choice-name{display:flex;align-items:center;gap:8px;font-size:15.5px;font-weight:600}
.choice-note{font-size:14px;line-height:1.45;color:var(--ink-2)}
.choice-reason{font-size:14px;line-height:1.45;color:var(--ink)}
.choice-reason::before{content:"";display:inline-block;width:9px;height:2px;margin-right:8px;vertical-align:.3em;background:var(--red);transform:rotate(-45deg)}
.chip.new{padding:0 6px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--cool-text);border-color:var(--cool-line)}

/* the pane */
.portal-doc .document pre{margin-top:1em;padding:14px 16px;overflow:auto;background:var(--well);border:1px solid var(--line);font-family:var(--mono);font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-word}
.portal-doc .document pre code{font-size:inherit}
.portal-doc .document h3{font-size:16.5px;margin-top:1.4em}
details.fm{margin-top:2em;padding-top:12px;border-top:1px solid var(--line);font-size:13.5px;color:var(--ink-3)}
details.fm summary{cursor:pointer}
.portal-doc .document:empty::before{content:"";display:block;height:120px}

/* the end */
.take-card .copy,.take-link .copy{padding:0;border:0;background:none;font:inherit;font-size:13.5px;cursor:pointer}
.take-link{flex-basis:100%;min-width:0;padding-top:14px;border-top:1px solid var(--line);font-size:14px;line-height:1.55;color:var(--ink-2)}
.take-cmd{display:flex;align-items:center;gap:12px;margin-top:6px;padding:8px 12px;background:var(--well);border:1px solid var(--line)}
.take-cmd code{flex:1;min-width:0;overflow-x:auto;white-space:nowrap;color:var(--ink);scrollbar-width:none}
.take-cmd code::-webkit-scrollbar{display:none}
.take-cmd .copy{flex:none}
.take-cmd pre{flex:1;min-width:0;margin:0;padding:0;border:0;background:none;overflow-x:auto;scrollbar-width:none}
.take-cmd pre::-webkit-scrollbar{display:none}
.take-cmd pre code{display:block;white-space:pre;line-height:1.7}
.take-git .take-cmd{align-items:flex-start}
.take-mail .btn{height:44px}

/* a phone, and anything narrower than three columns: one column, the rail and the pane as sheets */
@media (max-width:999px){
  .portal-files{display:inline-flex;align-items:center;margin-left:auto}
  .portal-actions{margin-left:0}
  .portal-work.live{grid-template-columns:minmax(0,1fr);position:relative;overflow:hidden}
  .portal-work.live .portal-rail,.portal-work.live .portal-doc{display:block;position:absolute;z-index:6;inset:0;overflow:auto;border:0;background:var(--ground);transform:translateY(102%);visibility:hidden;transition:transform .22s ease,visibility 0s .22s}
  .portal-work.live .portal-rail.open,.portal-work.live .portal-doc.open{transform:none;visibility:visible;transition:transform .22s ease}
  .portal-work.live .portal-doc{padding:0 16px 28px}
  .portal-work.live .portal-rail{padding-top:16px;background:var(--head)}
  .portal-work.live .doc-head{position:sticky;top:0;z-index:1;margin:0 -16px;padding:12px 16px;background:var(--ground);border-bottom:1px solid var(--line)}
  .portal-work.live .doc-path{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .sheet-close{display:inline-flex;align-items:center;margin-left:auto;height:34px;padding:0 14px;border:1px solid var(--line-3);border-radius:2px;background:transparent;color:var(--ink);font:550 14px var(--sans);cursor:pointer}
  .rail-head .sheet-close{position:absolute;right:16px;top:0}
  .portal-work.live .portal-doc .document{margin-top:16px;padding:24px 20px 28px;font-size:16px}
  .portal-work.live .chat-scroll{padding:20px 16px 14px}
  .portal-work.live .composer{margin:0 16px 8px}
  .composer-foot{margin:0 16px 12px;flex-direction:column;gap:4px}
  .composer-foot .kept{margin-left:0;text-align:left}
  .portal-work.live .msg.bot{padding-left:12px}
  .portal-work.live .msg.me{max-width:92%}
  .portal-log .log-lines{display:none}
  /* thumb-sized controls */
  .ctl-card{padding:16px 14px}
  .ctl{gap:6px;padding:4px 0}
  .ctl-head{flex-direction:column;gap:0}
  .ctl-row{grid-template-columns:auto 1fr auto}
  .ctl input[type=range]{height:40px}
  .ctl input[type=range]::-webkit-slider-thumb{width:26px;height:26px;margin-top:-13px}
  .ctl input[type=range]::-moz-range-thumb{width:22px;height:22px}
  .ctl-toggle{min-height:36px;font-size:15px}
  .ctl-toggle input{width:20px;height:20px}
  .ctl-toggles{flex-direction:column;gap:2px}
  .take-card .btn{flex:1 1 100%}
}
@media (max-width:520px){.composer .send{display:none}.composer .quick{padding:0 14px}}
@media (prefers-reduced-motion:reduce){.portal-work.live .portal-rail,.portal-work.live .portal-doc{transition:none}}
