/* Butler chat in the new design (WEB-NEU, 16.10.2026). Builds on neu.css + neu-pages.css. */
.nb-hero{padding-bottom:8px}
.nb-hero .n-lede{max-width:46ch}
.nb-meta{display:flex;flex-wrap:wrap;align-items:center;gap:14px 24px;margin-top:28px}
.nb-meta .butler-session{margin:0;font-size:14px;color:var(--ink3);max-width:52ch}
.nb-wrap{padding-top:clamp(28px,4vw,48px);padding-bottom:24px}
.nb-chat{background:var(--band);border:1px solid var(--line);border-radius:0;padding:clamp(18px,3vw,40px);min-width:0}
.butler-greeting .np-h3{margin-bottom:6px}
.butler-greeting .butler-note{margin:0 0 18px;font-size:15px}
.has-conversation .butler-greeting{display:none}
@media (max-width:600px){.has-conversation .nb-hero{display:none}}
.has-conversation .nb-wrap{padding-top:clamp(16px,2.4vw,28px)}

#conversation{display:flex;flex-direction:column;gap:14px;min-width:0}
#conversation:not(:empty){margin:8px 0 22px}
.message{min-width:0;max-width:min(92%,780px);padding:16px 20px;border-radius:0;font-size:15.5px;line-height:1.65;scroll-margin-top:84px;overflow-wrap:anywhere;animation:np-in .32s var(--ease-out)}
.message>strong{display:block;font-size:14px;font-weight:600;margin-bottom:6px}
.message div strong{display:inline;font-size:inherit;letter-spacing:normal;text-transform:none;color:var(--ivory);margin:0}
.message.user{align-self:flex-end;background:rgba(29,27,24,.13);border:1px solid var(--line2);border-bottom-right-radius:6px}
.message.user>strong{color:var(--gold)}
.message.assistant{align-self:flex-start;background:var(--paper);border:1px solid var(--line2);border-bottom-left-radius:6px;color:var(--ivory)}
.message.assistant>strong{color:var(--gold-hi)}
.message p{margin:0 0 .7em}.message p:last-child{margin-bottom:0}
.message h4{font-family:var(--serif);font-weight:400;font-size:22px;line-height:1.15;margin:.8em 0 .4em}
.message ul,.message ol{margin:.2em 0 .8em 1.3em;padding:0}
.message li{margin:.25em 0}
.message hr{border:0;border-top:1px solid var(--line);margin:1em 0}
.message a{color:var(--gold)}
.message.pending{opacity:.85}
.message .dots::after{content:"";animation:nb-dots 1.4s steps(4) infinite}
@keyframes nb-dots{0%{content:""}25%{content:"."}50%{content:".."}75%{content:"..."}}

.butler-suggest{appearance:none;font:inherit;color:var(--gold-hi);background:none;border:0;border-bottom:1px dotted var(--gold);padding:6px 0;min-height:32px;text-align:left;cursor:pointer;transition:color .24s var(--ease)}
.butler-suggest:hover{color:var(--ivory)}

/* tables: a framed box that scrolls inside itself */
.message .table-scroll{max-width:100%;overflow-x:auto;margin:.4em 0 .9em;border:1px solid var(--line);border-radius:0;background:rgba(29,27,24,.06);-webkit-overflow-scrolling:touch}
.message table{border-collapse:collapse;font-size:14px;width:100%}
.message th{text-align:left;padding:10px 12px;font-size:14px;color:var(--ink2);font-weight:600;white-space:nowrap;background:rgba(29,27,24,.06)}
.message td{padding:9px 12px;border-top:1px solid var(--line);vertical-align:top}
.message .table-scroll.wide table{min-width:max-content}
.message .table-scroll.wide td{white-space:nowrap}

/* form */
#question-form{margin:0;max-width:none;padding-top:6px}
.nb-input{display:flex;gap:10px;align-items:stretch}
#question-form #question{flex:1;min-width:0;min-height:56px;max-height:200px;border-radius:0}
#question-form #send{align-self:stretch;height:auto;min-height:56px}
#send:disabled,#question:disabled{opacity:.55;cursor:default}
#status.error{color:var(--ink);font-weight:500}

@media (max-width:600px){
  .nb-chat{border-radius:0;padding:14px}
  .message{max-width:100%;padding:14px;font-size:15px}
  .nb-input{flex-direction:column}
  #question-form #send{width:100%;justify-content:center}
  .butler-prompts .np-chip{min-height:44px;white-space:normal;text-align:left}
  /* narrow tables become one card per row */
  .message .table-scroll:not(.wide){overflow:visible;border:0;background:none}
  .message .table-scroll:not(.wide) table,.message .table-scroll:not(.wide) tbody,.message .table-scroll:not(.wide) tr,.message .table-scroll:not(.wide) td{display:block;width:100%;min-width:0}
  .message .table-scroll:not(.wide) thead{display:none}
  .message .table-scroll:not(.wide) tr{border:1px solid var(--line);border-radius:0;margin:0 0 8px;padding:4px 12px;background:rgba(29,27,24,.06)}
  .message .table-scroll:not(.wide) td{display:flex;justify-content:space-between;gap:12px;border:0;border-bottom:1px solid var(--line);padding:7px 0;text-align:right!important}
  .message .table-scroll:not(.wide) td:last-child{border-bottom:0}
  .message .table-scroll:not(.wide) td::before{content:attr(data-label);flex:none;max-width:42%;text-align:left;color:var(--gold);font-size:14px}
  .message .table-scroll:not(.wide) td:first-child{display:block;text-align:left!important;font-weight:700}
  .message .table-scroll:not(.wide) td:first-child::before{display:none}
}

/* the phone header is 120 px tall since the 44 px touch targets: keep the start of an answer below it */
@media (max-width:900px){.message{scroll-margin-top:176px}}
