/* Progressive disclosure: one assistant, shared across desktop and phone. */
body{--load:2}
select{font:inherit;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:10px;margin:8px 0;width:100%}
label{font-size:13px;line-height:1.6}
details{margin:13px 0;border-top:1px solid var(--line);padding-top:10px}
summary{font-size:12px;color:var(--aqua);cursor:pointer;line-height:1.6}
details p{font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.message time{font-size:9px;color:var(--muted);display:block;margin-top:5px}
.photo-list{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.attachment-preview{display:inline-flex;align-items:center;gap:8px;max-width:100%;overflow:hidden}
.attachment-preview>span{font-size:11px;letter-spacing:0;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.photo-thumb{display:block;max-width:100%;max-height:38vh;object-fit:contain;border-radius:10px;background:#08111a}
.attachment-preview .photo-thumb{width:82px;height:64px;flex:none}
.photo-thumb.photo-missing{display:block;width:82px;height:64px;object-fit:cover;flex:none}
.message-photos{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.message-photos .photo-thumb{max-width:min(100%,360px);max-height:38vh}
#messages{max-height:48vh;overflow-y:auto;overscroll-behavior:contain;padding-right:5px}
.range-row{display:flex;align-items:center;gap:16px;margin-top:12px}
.range-row input{padding:0;accent-color:var(--aqua);min-height:38px}
.range-row output{white-space:nowrap;font-size:15px;color:var(--aqua)}
.range-ends{display:flex;justify-content:space-between;gap:20px;font-size:10px;color:var(--muted);margin:5px 0 22px}
.check-row{display:flex;align-items:center;gap:12px;margin-top:20px}
.check-row input{width:20px;height:20px;flex:none;accent-color:var(--aqua)}
#assistantSettings{width:520px;max-height:85vh;overflow:auto;overscroll-behavior:contain;overflow-anchor:none;-webkit-overflow-scrolling:touch;padding:24px}
#settingsClose{margin-top:20px}
.load-notice{border:1px solid #477978;background:#142c31;border-radius:15px;padding:12px 16px;margin:12px 0;font-size:12px;line-height:1.6}
.load-notice p{margin:0 0 10px}.load-notice button{font-size:11px}
.active-strip{display:flex;gap:8px;flex-wrap:wrap;padding:6px 0 10px}
/* The first screen. Quiet by design: it reports, it does not demand. */
.whats-new{padding:14px 16px;margin:0 0 12px;border:1px solid #2e4a46;border-radius:15px;background:#111d1c}
.whats-new h2{font-size:16px;margin:0 0 8px}
.whats-new-group{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:#8fa6a2;margin:12px 0 4px;font-weight:600}
.whats-new-group:first-child{margin-top:0}
.whats-new-row{display:grid;grid-template-columns:1fr auto;gap:2px 10px;width:100%;text-align:left;background:transparent;border:0;border-top:1px solid #233835;padding:9px 0;color:inherit;font:inherit;cursor:pointer}
.whats-new-row:first-of-type{border-top:0}
.whats-new-row strong{font-size:14px}
.whats-new-row span{grid-column:1;font-size:13px;color:#b9cdc9;line-height:1.5}
.whats-new-row small{grid-row:1;grid-column:2;font-size:11px;color:#8fa6a2;white-space:nowrap}
.whats-new-row.needs-you strong{color:#ffc9a8}
.whats-new-row.result strong{color:#b7efc7}
.whats-new-row:hover strong,.whats-new-row:focus-visible strong{text-decoration:underline}
.whats-new-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
/* Pace belongs next to the message box, not buried in settings: it is the one
   setting he changes mid-conversation. The interruption threshold is not here —
   a dial he turns often must not be able to silence a blocker by accident. */
.pace-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:0 2px 7px}
.pace-row>span{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.pace-row button{font-size:12px;padding:5px 11px;border-radius:999px;min-height:32px}
.pace-row button[aria-pressed="true"]{border-color:var(--aqua);color:var(--aqua)}
.pace-row small{flex:1 0 100%;font-size:11px;color:var(--muted);line-height:1.5}
.state-row{display:flex;align-items:flex-start;gap:10px;margin:6px 0}
.state-icon{font-size:17px;line-height:1;background:none;border:0;padding:4px 6px;cursor:pointer;border-radius:8px;min-width:32px}
.state-icon:focus-visible{outline:2px solid var(--aqua);outline-offset:2px}
.state-icon.attention{filter:saturate(1.4)}
.state-text{font-size:12px;line-height:1.65;margin:4px 0 0}
/* Animate the transition once, then settle. A permanent loop in peripheral vision
   keeps recapturing attention, which defeats the purpose of the whole scale. */
@keyframes selma-state-change{0%{transform:scale(1)}35%{transform:scale(1.28)}100%{transform:scale(1)}}
.state-icon.changed{animation:selma-state-change 1.1s ease-out 1}
@media (prefers-reduced-motion:reduce){.state-icon.changed{animation:none}}
.task-title{display:flex;gap:8px;align-items:center;margin-bottom:6px}
.task-title input{flex:1;font-size:13px;padding:6px 8px}
.action-receipt{border-left:2px solid var(--aqua);padding:10px 12px;margin-top:14px;background:#11282a;font-size:12px;line-height:1.65}
.action-receipt strong{display:block;color:var(--aqua);font-weight:500}.action-receipt p{font-size:12px}
body[data-load="1"] .suggestions{display:none}
.offline-checklist{grid-column:2;padding:16px;margin-bottom:12px;border:1px solid #69d8c5;border-radius:15px;background:#10252b}
.offline-checklist h2{font-size:17px}.offline-checklist p{font-size:12px;line-height:1.6}
#checklistItems{max-height:250px;overflow:auto}#checklistItems .check-row{align-items:flex-start;padding:9px 0;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
#checklistItems input{width:auto;flex:none;margin-right:10px}.offline-checklist button{margin:5px 5px 0 0}
body[data-load="1"] .scanline,body[data-load="2"] .scanline{animation:none;display:none}
body[data-load="1"] .message .draft-task{display:none}
body[data-load="1"] .presence{height:290px}
/* On a phone the avatar buttons wrap to two rows and a four-line caption pushed
   the bottom block up under the status pill: on 13 November "ПОРУЧ, КОЛИ
   ПОТРІБНА" was printed through "VPS · ноутбук онлайн" on the Huawei. Three
   lines of caption and a little more height keep the two apart; the whole reply
   is in the conversation below anyway. */
@media(max-width:599px){
  #presenceCaption{max-height:59px}
  .presence{height:360px}
  body[data-load="1"] .presence{height:310px}
}
@media(min-width:1050px){
  #shell{max-width:1420px;display:grid;grid-template-columns:minmax(340px,440px) minmax(500px,1fr);gap:0 40px;padding:0 38px}
  header{grid-column:1 / -1;height:105px}
  .presence,body[data-load="1"] .presence{grid-column:1;grid-row:2 / span 3;position:sticky;top:25px;height:calc(100vh - 145px);max-height:900px;min-height:520px}
  nav{grid-column:2;margin-top:0}
  main{grid-column:2;min-width:0;min-height:0;height:calc(100vh - 210px);overflow:auto}
  #dialog.selected{display:flex;flex-direction:column;height:100%;min-height:350px}
  #messages{flex:1;min-height:100px;max-height:none}
  footer{grid-column:1 / -1;margin-top:30px}
  .composer{position:static;flex:none}
  .portrait{object-position:50% 30%}
  .portrait-bottom{left:25px;right:25px}
  h1{font-size:50px}
  #presenceCaption{max-height:130px}
  body.focus #shell{display:block;max-width:900px}
  body.focus .presence{position:relative;height:calc(100vh - 130px);min-height:0}
}
.whats-new-head{margin:0 0 8px}
.whats-new-fold{display:block;width:100%;text-align:left;background:transparent;border:0;padding:0;margin:0;color:inherit;font:inherit;font-size:16px;cursor:pointer}
.portrait-top{flex-wrap:wrap;align-items:center}
.quota-pill{cursor:pointer;border-color:#7bdedb55;color:#c7f5f3}
.quota-pill.warn{border-color:#f0b86e99;color:#ffdca8;background:#291d0de0}
.quota-pill.critical{border-color:#f07f7fbb;color:#ffd2d2;background:#321116eb}
.quota-panel{margin:12px 0 18px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#0b1722}
.quota-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.quota-head strong{font-size:13px;font-weight:600;color:var(--text)}
.quota-head button{font-size:11px;padding:5px 10px;margin:0;border-radius:10px}
.quota-profile{padding:8px 0;border-top:1px solid #1b2c3a}
.quota-profile:first-child{border-top:0;padding-top:2px}
.quota-profile-title{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin-bottom:5px;color:var(--text)}
.quota-profile-title small{font-size:10px;color:var(--aqua);margin-left:6px}
.quota-meter{display:grid;grid-template-columns:56px 1fr auto;align-items:center;gap:8px;margin:4px 0;font-size:11px;color:var(--muted)}
.quota-bar{height:7px;border-radius:999px;background:#192b39;overflow:hidden}
.quota-fill{height:100%;border-radius:999px;background:var(--aqua);transition:width .25s ease}
.quota-fill.warn{background:#efb668}
.quota-fill.critical{background:#ed7474}
.quota-meter .quota-val{color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap}
.quota-note{font-size:11px;color:var(--muted);margin:6px 0 0;line-height:1.5}
.read-context-menu{position:fixed;z-index:2000;display:flex;flex-direction:column;gap:4px;min-width:210px;padding:6px;border:1px solid #69d8c5;border-radius:14px;background:#0d1f29f2;box-shadow:0 12px 32px #00000088;backdrop-filter:blur(8px)}
.read-context-menu[hidden]{display:none}
.read-context-menu button{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:9px 14px;margin:0;border:0;border-radius:10px;background:transparent;color:var(--text);font:inherit;font-size:13px;text-align:left;cursor:pointer}
.read-context-menu button:hover,.read-context-menu button:focus-visible{background:#183645;color:var(--aqua);outline:none}
.section-nav{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0 10px;margin:0 0 8px;background:var(--bg);border-bottom:1px solid var(--line)}
.back-btn{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:8px 14px;border-color:#3a646b;background:#10252d;color:var(--aqua);font-size:13px;font-weight:500}
.back-btn:hover,.back-btn:focus-visible{background:#16333d;border-color:var(--aqua)}
.section-nav-title{font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:var(--muted)}
.file-list{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0 6px}
.file-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:5px 10px;border:1px solid #355d64;border-radius:11px;background:#0e242b;font-size:11px;color:#cde8ec}
.file-chip.pending{border-style:dashed;border-color:var(--aqua);color:var(--aqua)}
.file-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-chip button{padding:2px 6px;border:0;background:transparent;color:var(--muted);font-size:14px;line-height:1}
.composer.drag-over{border-color:var(--aqua);box-shadow:0 0 0 2px #7bdedb44}
.compose-actions{flex-wrap:wrap;align-items:center}
.compose-actions .icon-action{flex:none;min-width:38px;padding:9px 11px;font-size:15px;line-height:1.1}
@media(max-width:400px){.compose-actions{gap:5px}.compose-actions button{font-size:11px;padding:8px 9px}.compose-actions .icon-action{padding:8px 10px;min-width:34px;font-size:14px}}
.reminder-banner{margin:0 0 10px}
.reminder-banner button{width:100%;text-align:left;padding:10px 14px;border:1px solid #3c6d6c;border-radius:14px;background:#0e2528;color:#d6f4f0;font-size:12px;line-height:1.45}
.reminders-panel{margin:16px 0 12px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#0b1722}
.reminders-list{display:flex;flex-direction:column;gap:8px;margin:8px 0 10px}
.reminder-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:8px 10px;border:1px solid #1e3342;border-radius:11px;background:#0f202c}
.reminder-item-body{min-width:0;flex:1}
.reminder-item-title{font-size:12px;font-weight:600;color:var(--text);display:block}
.reminder-item-meta{font-size:11px;color:var(--aqua);display:block;margin-top:2px}
.reminder-item-msg{font-size:11px;color:var(--muted);margin:4px 0 0;line-height:1.45}
.reminder-item button{flex:none;margin:0;padding:5px 9px;font-size:11px;border-radius:9px}
.reminder-form{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.reminder-form input{margin:0}
.reminder-row{display:flex;gap:8px;align-items:center}
.reminder-row input{flex:1.4}
.reminder-row select{flex:1;margin:0}
#reminderAdd{align-self:flex-start;font-size:12px;padding:8px 13px}
