/* Task usage predictor prototype: a live, HTML version of the concept UI.
   The mock UI keeps its own light palette (like the screenshots it replaces). The toolbar uses the site tokens. */
.uproto { margin: 0; display: flex; flex-direction: column; gap: var(--space-12); min-width: 0; }
.uproto-bar { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-12); flex-wrap: wrap; }
.uproto-tools { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; margin-left: auto; }
.uproto-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); flex-wrap: wrap; }
.uproto-next { margin-left: auto; border-color: var(--color-accent); font-weight: 600; }
.uproto-next .arr { transition: transform .2s ease; }
.uproto-next:hover .arr { transform: translateX(3px); }
.uproto-big { display: none; }
.uproto-stage { position: relative; overflow: hidden; border: 1px solid var(--color-border-hairline); border-radius: var(--radius-lg); background: #faf9f5; aspect-ratio: 1000 / 760; }
.uproto.is-big .uproto-stage { overflow: auto; aspect-ratio: auto; height: min(76vh, 640px); }
.uproto-scale { position: relative; width: 100%; aspect-ratio: 1000 / 760; }
.uproto.is-big .uproto-scale { width: 820px; }
.uproto-cap { display: flex; align-items: baseline; gap: var(--space-8); flex-wrap: wrap; font-size: 13px; line-height: 1.5; color: var(--color-text-muted); }
.uproto-cap b { font-weight: 500; color: var(--color-text-primary); }
.uproto-intro { font-size: 13px; line-height: 1.5; color: var(--color-text-muted); }

/* the fixed-size canvas, scaled to fit */
.u-canvas { position: absolute; left: 0; top: 0; width: 1000px; height: 760px; transform-origin: 0 0; background: #faf9f5; color: #1f1e1d; font-family: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.5; text-align: left; }
.u-canvas [hidden] { display: none !important; }
:where(.u-canvas button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.u-canvas :focus-visible { outline: 2px solid #255338; outline-offset: 2px; border-radius: 8px; }
.u-top { position: absolute; left: 0; right: 0; top: 0; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px 0 28px; }
.u-title { font-size: 15px; font-weight: 500; }
.u-title i { font-style: normal; font-size: 11px; margin-left: 4px; }
.u-icons { display: flex; align-items: center; gap: 12px; }
.u-ico { position: relative; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #3b3a37; }
.u-ico[aria-pressed="true"] { background: #efede6; }
.u-dot { position: absolute; right: 5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #c7801a; border: 2px solid #faf9f5; display: none; }
.u-dot.is-on { display: block; }
.u-dot.is-red { background: #c0392b; }
.u-share { height: 34px; padding: 0 16px; border: 1px solid #e0ded5; border-radius: 9px; background: #fff; font-size: 14px; font-weight: 500; cursor: default !important; }

.u-chat { position: absolute; left: 205px; transition: left .4s cubic-bezier(.2,.7,.2,1); top: 56px; width: 590px; bottom: 0; display: flex; flex-direction: column; }
.u-msgs { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 24px 0 8px; display: flex; flex-direction: column; gap: 22px; }
.u-msg[hidden] { display: none; }
.u-user { align-self: flex-end; max-width: 440px; padding: 12px 18px; border-radius: 16px; background: #f0eee6; font-size: 15px; line-height: 1.45; }
.u-asst { font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif; font-size: 17.5px; line-height: 1.6; color: #25241f; }
.u-tool { font-size: 13.5px; color: #52504a; }
.u-fade { animation: u-in .35s ease both; }
@keyframes u-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.u-compose { flex: none; padding-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.u-est { border: 1px solid #e0ded5; border-radius: 16px; background: #fff; padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 6px; }
.u-est[hidden] { display: none; }
.u-est-h { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.u-est-h svg { flex: none; }
.u-est-p { font-size: 13.5px; line-height: 1.5; color: #52504a; }
.u-est ul { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: #3b3a37; }
.u-est li::before { content: "•"; margin-right: 8px; color: #52504a; }
.u-trade { margin-top: 2px; padding: 9px 12px; border-radius: 9px; background: #faf0dc; font-size: 13px; line-height: 1.45; color: #5c3f00; }
.u-btns { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.u-btn { flex: none; height: 36px; padding: 0 16px; border-radius: 9px; border: 1px solid #d6d3c9 !important; background: #fff; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.u-btn.is-dark { background: #1f1e1d; color: #fff; border-color: #1f1e1d !important; }
.u-btn:hover { filter: brightness(.96); }
.u-btn.is-dark:hover { filter: brightness(1.25); }
.u-input { min-height: 54px; border: 1px solid #e0ded5; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; font-size: 15.5px; }
.u-input .ph { color: #52504a; }
.u-tools { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 4px; font-size: 13px; color: #52504a; }
.u-tl, .u-tr { display: flex; align-items: center; gap: 16px; }
.u-ring { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: 15px; font-size: 13px; font-weight: 500; color: #52504a; }
.u-ring[data-sev="tight"] { color: #7a4b00; }
.u-ring[data-sev="limit"] { color: #96201a; }

.u-panel { position: absolute; right: 22px; top: 60px; width: 296px; max-height: 676px; overflow: hidden; border: 1px solid #e0ded5; border-radius: 18px; background: #fff; box-shadow: 0 6px 24px rgb(28 27 25 / .08); padding: 18px 20px 20px; }
.u-panel[hidden] { display: none; }
.u-canvas.has-panel .u-chat { left: 50px; }
.u-panel .u-btns { flex-wrap: wrap; }
.u-panel.u-slide { animation: u-pin .28s cubic-bezier(.2,.7,.2,1) both; }
@keyframes u-pin { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.u-ph { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid #eceae2; font-size: 16px; }
.u-ph .x { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: #52504a; }
.u-pill { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 4px 12px; border-radius: 14px; font-size: 13px; font-weight: 500; }
.u-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.u-pill.ok { background: #e3f0e6; color: #1a5934; } .u-pill.tight { background: #fcf2e0; color: #664000; } .u-pill.limit { background: #fbe4e1; color: #8f1f19; }
.u-pd { margin-top: 10px; font-size: 13px; line-height: 1.5; color: #52504a; }
.u-sec { margin-top: 16px; padding-top: 14px; border-top: 1px solid #eceae2; font-size: 13.5px; font-weight: 500; }
.u-sec.nb { margin-top: 12px; padding-top: 0; border-top: 0; }
.u-row { margin-top: 12px; }
.u-row-t { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.u-row-t span:last-child { color: #52504a; }
.u-row.is-tight .u-row-t { color: #7a4b00; font-weight: 600; } .u-row.is-tight .u-row-t span:last-child { color: #7a4b00; }
.u-row.is-limit .u-row-t span:last-child { color: #96201a; }
.u-bar { height: 6px; margin-top: 8px; border-radius: 3px; background: #ecebe6; overflow: hidden; }
.u-bar i { display: block; height: 100%; border-radius: 3px; background: #5b5a55; width: 0; transition: width .8s cubic-bezier(.2,.7,.2,1); }
.u-row.is-tight .u-bar i { background: #c7801a; } .u-row.is-limit .u-bar i { background: #c0392b; }
.u-row.is-dashed .u-bar { background: none; border-bottom: 1px dashed #c9c6bb; height: 0; margin-top: 12px; border-radius: 0; }
.u-steps { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.u-steps li { display: flex; align-items: center; gap: 10px; }
.u-steps li > span:last-child { margin-left: auto; color: #52504a; font-size: 13px; }
.u-steps li i { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #bdbab0; }
.u-steps li.done i { background: #5b5a55; border-color: #5b5a55; } .u-steps li.now i { border-color: #d65a3a; } .u-steps li.todo { color: #52504a; }
.u-note { margin-top: 16px; padding: 14px; border-radius: 12px; background: #faf0dc; font-size: 13.5px; line-height: 1.5; color: #2f2100; }
.u-note.ok { background: #e3f0e6; color: #14442a; }
.u-note .u-btns { margin-top: 12px; }
.u-ok { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #e3f0e6; font-size: 13.5px; font-weight: 500; color: #14442a; display: flex; align-items: center; gap: 8px; }

/* the next step stays softly highlighted, like the other prototypes */
.u-canvas [data-next] { position: relative; }
.u-canvas [data-next]::after { content: ""; position: absolute; inset: -4px; border-radius: 12px; background: rgb(49 137 42 / .16); box-shadow: inset 0 0 0 1px rgb(49 137 42 / .38); pointer-events: none; }

@media (max-width: 859px) {
  .uproto-tools { width: 100%; }
  .uproto-next { width: 100%; }
}
/* phone: the chat is drawn as a narrow phone-sized frame and scaled to fit, with Progress opening over it */
.uproto.is-phone .uproto-stage { aspect-ratio: 430 / 820; }
.uproto.is-phone .u-chat { left: 20px; width: 390px; }
.uproto.is-phone .u-canvas.has-panel .u-chat { left: 20px; }
.uproto.is-phone .u-top { padding: 0 14px 0 20px; }
.uproto.is-phone .u-panel { left: 14px; right: 14px; top: 58px; width: auto; max-height: 740px; z-index: 4; }
.uproto.is-phone .u-user { max-width: 330px; }
@media (prefers-reduced-motion: reduce) {
  .u-chat { transition: none; }
  .u-fade, .u-panel.u-slide { animation: none; }
  .u-bar i, .uproto-next .arr { transition: none; }
}
