@media (max-width:819px){
 .assistant-chat.field-copilot{min-height:0;overflow:hidden}
 /* The header hosts the Tailor Fred form AND the saved-chat panel; both can
    outgrow the column. An uncapped flex:none header pushed the composer past
    the container's bottom and under the field tab bar (measured on 360x800:
    composer start ~y711, tabs ~y738). Cap the band and let IT scroll — every
    preference action stays reachable inside it and the composer is always the
    last in-flow child, never beneath the nav. 55% leaves the chat list room
    below it. */
 .assistant-chat.field-copilot .field-copilot__header{width:100%;flex:none;max-height:55%;overflow-y:auto;overscroll-behavior:contain;padding:8px 12px 6px}
 /* One scroll surface: the capped header above is the scroller, so the form's
    own injected 45dvh/overflow-y would nest a second scroller — an inner
    gesture clipped the form's bottom and Save/Not now needed a separate
    outer-edge scroll. Released here only: the standalone onboarding copy of
    this panel (ProgressPill) keeps its own 45dvh scrolling. */
 .assistant-chat.field-copilot .fred-rep-setup form{max-height:none;overflow-y:visible}
 .assistant-chat.field-copilot .field-copilot__topline{gap:8px;align-items:center}
 .assistant-chat.field-copilot .field-copilot__identity{gap:7px;min-width:0}
 .assistant-chat.field-copilot .field-copilot__header-mark{width:28px;height:28px;flex-basis:28px}
 .assistant-chat.field-copilot .field-copilot__header-mark img{width:28px;height:28px}
 .assistant-chat.field-copilot .assistant-chat__eyebrow{font-size:8px;letter-spacing:.06em;line-height:1.2}
 .assistant-chat.field-copilot .assistant-chat__header h1{font-size:18px;line-height:1.15;margin:1px 0 0}
 .assistant-chat.field-copilot .field-copilot__header-meta{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:3px 0 0}
 .assistant-chat.field-copilot .field-copilot__header-meta .assistant-chat__sub{grid-column:1/-1;margin:0;font-size:12px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .assistant-chat.field-copilot .field-copilot__header-meta button{grid-column:2;justify-self:end;min-height:44px;white-space:nowrap;font-size:12px}
 .assistant-chat.field-copilot .assistant-chat__list{width:100%;max-width:none;min-height:0;flex:1 1 0;overflow-x:hidden;overflow-y:auto;padding:8px 12px;gap:8px;scrollbar-gutter:auto}
 .assistant-chat.field-copilot .assistant-chat__bubble.is-assistant{max-width:100%;width:100%;padding:10px 12px;font-size:14px;line-height:1.5}
 .assistant-chat.field-copilot .fred-answer-text{gap:8px!important;font-size:14px!important;line-height:1.5!important}
 .assistant-chat.field-copilot .field-copilot__composer{width:100%;max-width:none;margin:0;padding:7px 12px calc(7px + env(safe-area-inset-bottom));flex:0 0 auto;display:flex;flex-direction:column;align-items:stretch;position:relative;bottom:auto;gap:5px}
 .assistant-chat.field-copilot .field-copilot__composer-row{width:100%;min-width:0;align-self:stretch;padding:4px 4px 4px 10px;box-shadow:none}
 .assistant-chat.field-copilot .field-copilot__composer-row textarea{width:0;min-width:0;flex:1 1 0;min-height:44px;max-height:96px;border:0;background:transparent;padding:10px 2px;font-size:16px;line-height:1.4}
 .assistant-chat.field-copilot .assistant-chat__send{width:44px;min-width:44px;min-height:44px;flex-shrink:0}
 .assistant-chat.field-copilot .field-copilot__composer>p{margin:0;font-size:10px;line-height:1.3;justify-content:flex-start}
}

@media (max-width:819px){
.assistant-chat.field-copilot:has(.assistant-chat__bubble.is-assistant) .assistant-chat__sub{display:none}
.assistant-chat.field-copilot .field-copilot__header-meta button{border:1px solid var(--cc-border);border-radius:8px}
}

/* The keyboard is measured, not inferred from phone width or focus alone. */
.teryli-app-shell[data-fred-keyboard-open] {
 height:var(--fred-keyboard-height)!important;min-height:0!important;
}
.teryli-app-shell[data-fred-keyboard-open] [data-fred-shell-header],
.teryli-app-shell[data-fred-keyboard-open] .mobile-field-tabs {display:none!important}
.assistant-chat.field-copilot[data-fred-keyboard-open] .field-copilot__header {padding:max(4px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 4px max(12px,env(safe-area-inset-left,0px));width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px}
.assistant-chat.field-copilot[data-fred-keyboard-open] .assistant-chat__eyebrow,
.assistant-chat.field-copilot[data-fred-keyboard-open] .assistant-chat__sub {display:none}
.assistant-chat.field-copilot[data-fred-keyboard-open] .field-copilot__header-meta {display:flex;padding:0}
.assistant-chat.field-copilot[data-fred-keyboard-open] .field-copilot__header-meta button {min-height:44px}
.assistant-chat.field-copilot[data-fred-keyboard-open] .field-copilot__composer {padding:4px 12px;gap:3px}
.assistant-chat.field-copilot[data-fred-keyboard-open] .field-copilot__composer>p:last-child {display:none}
.assistant-chat.field-copilot[data-fred-keyboard-open] textarea {font-size:16px;min-height:44px;max-height:76px}
.assistant-chat.field-copilot[data-fred-keyboard-open] .assistant-chat__send {min-height:44px;min-width:44px}
.assistant-chat.field-copilot[data-fred-keyboard-open] .assistant-chat__list {min-height:0;flex:1 1 0;overflow-y:auto;overscroll-behavior:contain}

/* Compact the Fred intro so it does not consume the available phone height,
   while keeping the synthetic boundary banner and the confirm-before-write
   proposal ritual fully visible and unchanged. */
@media (max-width:819px){
 .assistant-chat.field-copilot .field-copilot__empty{margin:0;padding:4px 0}
 .assistant-chat.field-copilot .field-copilot__empty .field-copilot__empty-eyebrow{margin:0 0 3px;font-size:10.5px}
 .assistant-chat.field-copilot .field-copilot__empty strong{font-size:1.2rem;line-height:1.15}
 .assistant-chat.field-copilot .field-copilot__empty > p:not(.field-copilot__empty-eyebrow){margin:3px 0 8px;font-size:13px;line-height:1.45}
 .assistant-chat.field-copilot .assistant-chat__suggestions button{min-height:48px;padding:10px 4px;gap:10px}
 .assistant-chat.field-copilot .field-copilot__synthetic{margin:0 0 8px;padding:7px 10px;font-size:12px;line-height:1.4}
}

/* A single conversation toolbar, shared by phone and desktop. Profile expansion
   stays inside the existing capped header; history keeps its native dialog. */
.assistant-chat.field-copilot {background:#faf9f6}
.assistant-chat.field-copilot .field-copilot__header {padding:16px 18px 12px;background:#faf9f6;max-height:55%;overflow-y:auto;overscroll-behavior:contain}
.assistant-chat.field-copilot .field-copilot__header-mark {width:38px;height:38px;flex-basis:38px;border-radius:12px}
.assistant-chat.field-copilot .field-copilot__header-mark img {width:100%;height:100%}
.assistant-chat.field-copilot .assistant-chat__header h1 {font-size:23px;line-height:1.15}
.assistant-chat.field-copilot .field-copilot__header-meta {display:block;padding:0}
.assistant-chat.field-copilot .assistant-chat__sub {margin:7px 0 12px;font-size:12px;line-height:1.45}
.field-copilot__toolbar {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:start}
.field-copilot__toolbar > .fred-rep-setup {margin:0;min-width:0}
.field-copilot__toolbar > .fred-chat-history {min-width:0}
.assistant-chat.field-copilot .field-copilot__toolbar > button,
.assistant-chat.field-copilot .field-copilot__toolbar > .fred-chat-history > button,
.assistant-chat.field-copilot .field-copilot__toolbar > .fred-rep-setup > button {
 width:100%;min-height:44px;margin:0;padding:9px 8px!important;border:1px solid #d8dfd8!important;border-radius:12px!important;
 background:#f0f3ee!important;color:#294636!important;font:600 12px/1.25 var(--sans,sans-serif)!important;white-space:nowrap;cursor:pointer
}
.assistant-chat.field-copilot .field-copilot__toolbar > button {background:#294b3b!important;color:#fff!important;border-color:#294b3b!important}
.field-copilot__toolbar > .fred-rep-setup:has(form) {grid-column:1/-1}
.assistant-chat.field-copilot .field-copilot__toolbar > .fred-rep-setup form {max-width:none;max-height:none;overflow-y:visible;background:#fff}
.assistant-chat.field-copilot .assistant-chat__list {padding:20px 18px 16px}
.assistant-chat.field-copilot .field-copilot__empty {margin:auto 0;padding:0}
.assistant-chat.field-copilot .field-copilot__empty strong {font-size:22px;line-height:1.2;letter-spacing:-.025em}
.assistant-chat.field-copilot .field-copilot__empty > p:not(.field-copilot__empty-eyebrow) {font-size:13px;line-height:1.5;margin:7px 0 20px}
.assistant-chat.field-copilot .assistant-chat__suggestions {border:0;gap:8px}
.assistant-chat.field-copilot .assistant-chat__suggestions button {min-height:56px;padding:13px 14px;border:1px solid #e0e5df;border-radius:14px;background:#fff;font-size:14px;font-weight:550;line-height:1.4;gap:14px}
.assistant-chat.field-copilot .assistant-chat__suggestions button:last-child {border-bottom:1px solid #e0e5df}
.assistant-chat.field-copilot .field-copilot__composer {background:#faf9f6;border-top:0;padding:12px 18px calc(12px + env(safe-area-inset-bottom))}
.assistant-chat.field-copilot .field-copilot__composer-row {background:#fff;border-color:#c8d4ca;box-shadow:0 3px 16px #244d3810}
.assistant-chat.field-copilot .field-copilot__composer > p {margin-top:3px;color:#65766a}
@media (max-width:819px) {
 .assistant-chat.field-copilot .field-copilot__header {padding:12px 14px 10px}
 .assistant-chat.field-copilot .assistant-chat__eyebrow {font-size:9px}
 .assistant-chat.field-copilot .assistant-chat__list {padding:18px 14px}
 .assistant-chat.field-copilot .field-copilot__composer {padding:8px 14px calc(8px + env(safe-area-inset-bottom))}
 .assistant-chat.field-copilot .field-copilot__empty {margin:auto 0}
}
@media (max-height:650px) {
 .assistant-chat.field-copilot .field-copilot__empty {margin:0}
 .assistant-chat.field-copilot .assistant-chat__list {padding-top:12px}
}
.assistant-chat.field-copilot[data-fred-keyboard-open] .field-copilot__header {display:block;padding:6px 12px}
.assistant-chat.field-copilot[data-fred-keyboard-open] .field-copilot__toolbar {margin-top:5px}

/* Phone reading room (2026-10-10): the chat is what people came for.
   The five conversation tools sit in one compact scrolling row, the header
   takes at most 30% of the screen, and the static dictation tip under the
   composer is gone (the listening note still shows while dictating). The
   privacy line stays, smaller. A Tailor Fred form that is open takes the full
   width of the row and wraps, so it is never clipped. */
@media (max-width:819px){
 .assistant-chat.field-copilot .field-copilot__header{max-height:30%}
 .assistant-chat.field-copilot .field-copilot__toolbar{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:0 0 2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .assistant-chat.field-copilot .field-copilot__toolbar::-webkit-scrollbar{display:none}
 .assistant-chat.field-copilot .field-copilot__toolbar > *{flex:0 0 auto;min-width:0}
 .assistant-chat.field-copilot .field-copilot__toolbar > button,
 .assistant-chat.field-copilot .field-copilot__toolbar > .fred-chat-history > button,
 .assistant-chat.field-copilot .field-copilot__toolbar > .fred-rep-setup > button{width:auto;min-height:36px;padding:6px 12px!important;border-radius:999px!important;font-size:12px!important;white-space:nowrap}
 .assistant-chat.field-copilot .field-copilot__toolbar:has(form){flex-wrap:wrap;overflow-x:visible}
 .assistant-chat.field-copilot .field-copilot__toolbar > .fred-rep-setup:has(form){flex:1 1 100%}
 .assistant-chat.field-copilot .field-copilot__dictation-note--static{display:none}
 .assistant-chat.field-copilot .field-copilot__composer > p{font-size:10px;line-height:1.3;margin:0}
}

/* Messages-style phone thread (2026-10-10): the conversation is the screen.
   A slim header, neutral tool pills, bubbles that hug their side, and a
   rounded composer, like the Messages app. Phone only; desktop is unchanged. */
@media (max-width:819px){
 .assistant-chat.field-copilot .field-copilot__header{padding:6px 12px 6px;background:#faf9f6}
 .assistant-chat.field-copilot .field-copilot__header-mark{width:26px;height:26px;flex-basis:26px;border-radius:9px}
 .assistant-chat.field-copilot .field-copilot__header-mark img{width:26px;height:26px}
 .assistant-chat.field-copilot .assistant-chat__eyebrow{display:none}
 .assistant-chat.field-copilot .assistant-chat__header h1{font-size:17px;line-height:1.2}
 .assistant-chat.field-copilot .assistant-chat__sub{display:none}
 .assistant-chat.field-copilot .field-copilot__toolbar{gap:6px;padding:4px 0 0}
 .assistant-chat.field-copilot .field-copilot__toolbar > button,
 .assistant-chat.field-copilot .field-copilot__toolbar > .fred-chat-history > button,
 .assistant-chat.field-copilot .field-copilot__toolbar > .fred-rep-setup > button{min-height:30px!important;padding:5px 11px!important;border-radius:999px!important;background:#eef2ee!important;color:#294636!important;border-color:#dfe6df!important;font-size:12px!important;font-weight:600!important}
 .assistant-chat.field-copilot .field-copilot__toolbar > button{background:#294b3b!important;color:#fff!important;border-color:#294b3b!important}
 .assistant-chat.field-copilot .assistant-chat__list{padding:10px 12px 8px;gap:6px;display:flex;flex-direction:column}
 .assistant-chat.field-copilot .assistant-chat__bubble{max-width:82%;width:auto;padding:8px 13px;font-size:15px;line-height:1.4;border-radius:18px}
 .assistant-chat.field-copilot .assistant-chat__bubble.is-user{align-self:flex-end;border-bottom-right-radius:6px;background:#2f6fe0;color:#fff;border:0}
 .assistant-chat.field-copilot .assistant-chat__bubble.is-assistant{align-self:flex-start;border-bottom-left-radius:6px;background:#e9e9ee;color:#111;border:0}
 .assistant-chat.field-copilot .fred-answer-text{font-size:15px!important;line-height:1.4!important;gap:6px!important}
 .assistant-chat.field-copilot footer.field-copilot__composer{padding:6px 10px calc(6px + env(safe-area-inset-bottom));gap:4px;background:#faf9f6}
 .assistant-chat.field-copilot .field-copilot__composer-row{padding:3px 3px 3px 12px;border-radius:999px;box-shadow:none;border:1px solid #d6dcd6;background:#fff}
 .assistant-chat.field-copilot .field-copilot__composer-row textarea{min-height:36px;max-height:96px;font-size:16px;line-height:1.35;padding:8px 2px}
 .assistant-chat.field-copilot .assistant-chat__send{width:32px;height:32px;min-width:32px;min-height:32px;border-radius:999px;background:#2f6fe0;color:#fff}
 .assistant-chat.field-copilot footer.field-copilot__composer > p{font-size:9.5px!important;line-height:1.25!important;margin:0!important;color:#7a867c;justify-content:center;text-align:center}
 .assistant-chat.field-copilot footer.field-copilot__composer > p svg{width:11px;height:11px}
}

/* The + in the text box (2026-10-10): New chat, Writing style, Public research,
   Chats and Tailor Fred live behind it on a phone, like attachments in Messages.
   The toolbar keeps every handler; it just opens as a sheet above the composer. */
.field-copilot__tools-toggle{display:none}
@media (max-width:819px){
 .assistant-chat.field-copilot .field-copilot__tools-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:32px;height:32px;min-height:32px;margin:0 2px 0 0;padding:0;border:0;border-radius:999px;background:#e9e9ee;color:#294636;cursor:pointer}
 .assistant-chat.field-copilot .field-copilot__tools-toggle svg{width:18px;height:18px}
 .assistant-chat.field-copilot .field-copilot__tools-toggle[aria-expanded="true"]{background:#294b3b;color:#fff}
 .assistant-chat.field-copilot .field-copilot__composer-row{padding-left:4px}
 .assistant-chat.field-copilot .field-copilot__toolbar{display:none!important}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"]{display:flex!important;flex-direction:column;flex-wrap:nowrap;overflow:visible;position:fixed;left:10px;right:10px;bottom:calc(112px + env(safe-area-inset-bottom));z-index:60;gap:2px;padding:6px;background:#fff;border:1px solid #d6dcd6;border-radius:18px;box-shadow:0 12px 36px rgb(15 37 56 / 22%);max-height:70vh;overflow-y:auto}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > *{flex:0 0 auto;width:100%}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > button,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-chat-history > button,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup > button{width:100%!important;min-height:46px!important;padding:10px 14px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:#17251d!important;font-size:15px!important;font-weight:550!important;text-align:left;justify-content:flex-start}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > button:active,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-chat-history > button:active,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup > button:active{background:#eef2ee!important}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup:has(form){flex:0 0 auto}
}

/* Polish pass (2026-10-10): sheet above the composer with a scrim, quiet header,
   icon-only mic, hairline suggestion rows, Teryli forest instead of generic blue. */
.field-copilot__tools-scrim{display:none}
@media (max-width:819px){
 .assistant-chat.field-copilot .field-copilot__tools-scrim{display:block;position:fixed;inset:0;z-index:59;border:0;padding:0;margin:0;background:rgb(16 24 20 / 18%);cursor:default}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"]{bottom:var(--fred-tools-bottom,120px);top:auto}
 .assistant-chat.field-copilot .field-copilot__header-meta .assistant-chat__sub,
 .assistant-chat.field-copilot .field-copilot__header-meta .field-copilot__context{display:none!important}
 .assistant-chat.field-copilot .field-copilot__header{border-bottom:1px solid #e7e9e6}
 .assistant-chat.field-copilot .assistant-chat__header h1{font-size:17px;font-weight:600;letter-spacing:-.01em}
 .assistant-chat.field-copilot .field-copilot__empty strong{font-size:20px!important;font-weight:600;letter-spacing:-.015em}
 .assistant-chat.field-copilot .field-copilot__empty > p:not(.field-copilot__empty-eyebrow){font-size:14px!important;color:#6b766d;margin:4px 0 12px!important}
 .assistant-chat.field-copilot .assistant-chat__suggestions{gap:0!important;border-top:1px solid #e7e9e6!important}
 .assistant-chat.field-copilot .assistant-chat__suggestions button,
 .assistant-chat.field-copilot .assistant-chat__suggestions button:last-child{min-height:48px!important;padding:12px 2px!important;border:0!important;border-bottom:1px solid #e7e9e6!important;border-radius:0!important;background:transparent!important;font-size:15px!important;font-weight:500!important;box-shadow:none!important}
 .assistant-chat.field-copilot .field-copilot__dictation{width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border:0;border-radius:999px;background:transparent;color:#53625a;justify-content:center}
 .assistant-chat.field-copilot .field-copilot__dictation span{display:none}
 .assistant-chat.field-copilot .field-copilot__dictation svg{width:20px;height:20px}
 .assistant-chat.field-copilot .field-copilot__dictation.is-listening{background:#b42318;color:#fff}
 .assistant-chat.field-copilot .assistant-chat__send{background:#2f5d46;color:#fff}
 .assistant-chat.field-copilot .assistant-chat__send:disabled{background:#c9d1cb;color:#fff}
 .assistant-chat.field-copilot .assistant-chat__bubble.is-user{background:#2f5d46}
 .assistant-chat.field-copilot .assistant-chat__bubble.is-assistant{background:#eceeec}
 .assistant-chat.field-copilot footer.field-copilot__composer > p svg{display:none}
}

/* Fred large until the first message (2026-10-10). The empty chat opens on
   his portrait and name; the first send morphs them into the header mark. */
.assistant-chat.field-copilot .field-copilot__hero{display:flex;flex-direction:column;align-items:center;gap:8px;margin:6px 0 18px}
.assistant-chat.field-copilot .field-copilot__hero img{display:block;width:min(132px,36vw);height:auto;aspect-ratio:1;border-radius:32%;object-fit:cover;box-shadow:0 10px 30px rgb(20 40 30 / 14%);view-transition-name:fred-portrait}
.assistant-chat.field-copilot .field-copilot__hero p{margin:0;font-size:22px;font-weight:650;letter-spacing:-.02em;color:#17251d;view-transition-name:fred-name}
.assistant-chat.field-copilot[data-fred-empty="true"] .field-copilot__identity{display:none}
.assistant-chat.field-copilot[data-fred-empty="true"] .field-copilot__empty > strong,
.assistant-chat.field-copilot[data-fred-empty="true"] .field-copilot__empty > p{text-align:center}
.assistant-chat.field-copilot:not([data-fred-empty="true"]) .field-copilot__header-mark{view-transition-name:fred-portrait}
.assistant-chat.field-copilot:not([data-fred-empty="true"]) .field-copilot__identity h1{view-transition-name:fred-name}
:root.fred-morph::view-transition-group(fred-portrait),
:root.fred-morph::view-transition-group(fred-name){animation-duration:.45s;animation-timing-function:cubic-bezier(.2,.8,.2,1)}
:root.fred-morph::view-transition-old(root),
:root.fred-morph::view-transition-new(root){animation-duration:.22s}
@media (max-width:819px){
 .assistant-chat.field-copilot[data-fred-empty="true"] .field-copilot__header{border-bottom-color:transparent}
 .assistant-chat.field-copilot[data-fred-empty="true"] .assistant-chat__list{justify-content:safe center}
}

/* Privacy line lives in the empty chat, not under the text bar (2026-10-10). */
.assistant-chat.field-copilot .field-copilot__privacy-note{display:flex;align-items:flex-start;justify-content:center;gap:5px;margin:14px 0 0;font-size:11.5px;line-height:1.4;color:#7a867c;text-align:center}
.assistant-chat.field-copilot .field-copilot__privacy-note svg{flex:0 0 auto;width:13px;height:13px;margin-top:2px}
/* The bottom tab bar already pads for the home indicator, so the text bar
   sits flush on it instead of adding its own safe-area gap. */
@media (max-width:819px){
 body:has(.mobile-field-tabs) .assistant-chat.field-copilot footer.field-copilot__composer{padding:6px 10px 6px!important}
}

/* + menu, styled (2026-10-10): a compact popover over the +, one icon tile per
   row, ordered New chat, Chats, Web search, Writing style, Tailor Fred. */
@keyframes fred-menu-in{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:none}}
@media (max-width:819px){
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"]{left:10px;right:auto;width:min(290px,calc(100vw - 20px));padding:6px!important;gap:0!important;background:rgb(255 255 255 / 97%);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);border:1px solid rgb(16 32 24 / 8%);border-radius:20px;box-shadow:0 18px 44px rgb(16 32 24 / 20%),0 2px 6px rgb(16 32 24 / 8%);transform-origin:12px 100%;animation:fred-menu-in .18s cubic-bezier(.2,.8,.2,1)}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"]:has(form),
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"]:has(dialog[open]){right:10px;width:auto}
 .assistant-chat.field-copilot .field-copilot__tools-scrim{background:rgb(16 24 20 / 12%)}
.assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--new,
.assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-chat-history > button,
.assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--web,
.assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--style,
.assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup > button{display:flex!important;align-items:center;gap:12px;min-height:50px!important;padding:7px 10px!important;border-radius:14px!important;font-size:16px!important;font-weight:500!important;letter-spacing:-.01em;color:#17251d!important}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--new::before{content:'';flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:#e5eee8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f5d46' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h8'/%3E%3Cpath d='M16.5 3.6a2.1 2.1 0 0 1 3 3L7.2 18.9 3.5 20l1.1-3.7Z'/%3E%3C/svg%3E") center/19px 19px no-repeat}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--new{order:1}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-chat-history > button::before{content:'';flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:#e4edf6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d5f8f' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 11.6a8.3 8.3 0 0 1-12.2 7.3L3.5 20.5l1.6-4.5a8.3 8.3 0 1 1 15.4-4.4Z'/%3E%3C/svg%3E") center/19px 19px no-repeat}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-chat-history{order:2}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--web::before{content:'';flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:#e1f0ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d6f6a' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.8'/%3E%3Cpath d='M3.4 12h17.2'/%3E%3Cpath d='M12 3.2c2.4 2.4 3.6 5.3 3.6 8.8s-1.2 6.4-3.6 8.8c-2.4-2.4-3.6-5.3-3.6-8.8S9.6 5.6 12 3.2Z'/%3E%3C/svg%3E") center/19px 19px no-repeat}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--web{order:3}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--style::before{content:'';flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:#f6eedf url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a5a12' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 7V5h15v2'/%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M9 19h6'/%3E%3C/svg%3E") center/19px 19px no-repeat}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--style{order:4}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup > button::before{content:'';flex:0 0 34px;width:34px;height:34px;border-radius:11px;background:#ece8f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b4a8f' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5h9M17 6.5h3M4 12h3M11 12h9M4 17.5h11M19 17.5h1'/%3E%3Ccircle cx='15' cy='6.5' r='2'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Ccircle cx='17' cy='17.5' r='2'/%3E%3C/svg%3E") center/19px 19px no-repeat}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup{order:5}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] button:disabled{opacity:.42}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-chat-history > button svg,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup > button svg{display:none}
}

/* Panels behind the + (2026-10-10): Tailor Fred, Chats, Web search and Writing
   style share one compact phone look: quiet title row, soft fields, one forest
   primary button, text-sized controls. Menu rows a size smaller. */
@media (max-width:819px){
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"]{width:min(264px,calc(100vw - 20px))}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-chat-history > button,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup > button{min-height:44px!important;padding:5px 8px!important;gap:11px;font-size:15px!important;border-radius:12px!important}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool::before,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-chat-history > button::before,
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .fred-rep-setup > button::before{flex-basis:30px;width:30px;height:30px;border-radius:9px;background-size:17px 17px}

 /* Tailor Fred: the popover turns into a sheet that holds only the form. */
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"]:has(.fred-rep-setup form) > :not(.fred-rep-setup){display:none!important}
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"]:has(.fred-rep-setup form){max-height:calc(100dvh - var(--fred-tools-bottom,120px) - 64px);overflow-y:auto;padding:14px 14px 12px!important}
 .assistant-chat.field-copilot .fred-rep-setup{margin:0}
 .assistant-chat.field-copilot .fred-rep-setup form{gap:10px;padding:0;border:0;border-radius:0;max-width:none;max-height:none;overflow:visible}
 .assistant-chat.field-copilot .fred-rep-setup h2{font-size:17px;font-weight:600;letter-spacing:-.01em;margin:0 0 2px}
 .assistant-chat.field-copilot .fred-rep-setup label{gap:4px;font-size:13px;font-weight:500;color:#5b675f}
 .assistant-chat.field-copilot .fred-rep-setup input,
 .assistant-chat.field-copilot .fred-rep-setup select{min-height:40px;height:40px;padding:0 12px;font-size:16px;border:1px solid #e1e5e0;border-radius:10px;background:#f5f6f4;color:#17251d}
 .assistant-chat.field-copilot .fred-rep-setup input:focus,
 .assistant-chat.field-copilot .fred-rep-setup select:focus{outline:none;border-color:#2f5d46;background:#fff}
 .assistant-chat.field-copilot .fred-rep-setup__actions{flex-wrap:nowrap;gap:8px;margin-top:4px}
 .assistant-chat.field-copilot .fred-rep-setup__actions button{min-height:40px;height:40px;padding:0 16px;border:0;border-radius:12px;font-size:15px;font-weight:600}
 .assistant-chat.field-copilot .fred-rep-setup__actions button[type=submit]{flex:1;background:#2f5d46;color:#fff}
 .assistant-chat.field-copilot .fred-rep-setup__actions button[type=button]{background:#eef1ee;color:#2f3d34}
 .assistant-chat.field-copilot .fred-rep-setup [role=status],
 .assistant-chat.field-copilot .fred-rep-setup [role=alert]{font-size:13px}

 /* Chats: full-screen list, Messages-style rows. */
 .assistant-chat.field-copilot .fred-history-dialog{font:14px/1.45 system-ui,-apple-system,sans-serif;background:#faf9f6;color:#17251d}
 .assistant-chat.field-copilot .fred-history-dialog .fh-head{padding:12px 16px 8px}
 .assistant-chat.field-copilot .fred-history-dialog h2{font-size:20px;font-weight:650;letter-spacing:-.015em}
 .assistant-chat.field-copilot .fred-history-dialog .fh-muted{display:none}
 .assistant-chat.field-copilot .fred-history-dialog .fh-head .fh-button{min-height:36px;padding:0 2px;border:0;background:transparent;color:#2f5d46;font-size:16px;font-weight:600}
 .assistant-chat.field-copilot .fred-history-dialog .fh-tools{grid-template-columns:1fr auto;padding:0 16px 10px;gap:8px}
 .assistant-chat.field-copilot .fred-history-dialog input{height:38px;padding:0 12px;font-size:16px;border:0;border-radius:10px;background:#eceeeb}
 .assistant-chat.field-copilot .fred-history-dialog .fh-primary{min-height:38px;height:38px;padding:0 12px;border:0;border-radius:10px;background:#2f5d46;color:#fff;font-size:14px;font-weight:600}
 .assistant-chat.field-copilot .fred-history-dialog .fh-list{padding:0 0 8px;border-top:1px solid #e7e9e6}
 .assistant-chat.field-copilot .fred-history-dialog .fh-row{margin:0;border:0;border-bottom:1px solid #e7e9e6;border-radius:0;background:transparent}
 .assistant-chat.field-copilot .fred-history-dialog .fh-row.is-current{background:#eef3ef}
 .assistant-chat.field-copilot .fred-history-dialog .fh-open{padding:10px 16px 2px}
 .assistant-chat.field-copilot .fred-history-dialog .fh-title{font-size:15px;font-weight:600}
 .assistant-chat.field-copilot .fred-history-dialog .fh-preview{font-size:13px;color:#6b766d;margin-top:1px;-webkit-line-clamp:1}
 .assistant-chat.field-copilot .fred-history-dialog .fh-meta{padding:0 16px 8px;font-size:12px;color:#8a948c}
 .assistant-chat.field-copilot .fred-history-dialog .fh-delete{min-height:28px;padding:0;text-decoration:none;color:#a0442a;font-size:13px}
 .assistant-chat.field-copilot .fred-history-dialog .fh-confirm .fh-button{min-height:34px;padding:0 12px;font-size:14px;border-radius:10px}
 .assistant-chat.field-copilot .fred-history-dialog footer{padding:10px 16px;font-size:11px;color:#8a948c}

 /* Web search. */
 .assistant-chat.field-copilot .fred-research{padding:12px 16px 16px;color:#17251d}
 .assistant-chat.field-copilot .fred-research__heading{margin-bottom:4px}
 .assistant-chat.field-copilot .fred-research h2{font-size:17px;font-weight:600;letter-spacing:-.01em}
 .assistant-chat.field-copilot .fred-research h3{font-size:15px;font-weight:600;margin:16px 0 6px}
 .assistant-chat.field-copilot .fred-research__heading button{border:0;background:transparent;padding:6px 0;color:#2f5d46;font-size:15px;font-weight:600}
 .assistant-chat.field-copilot .fred-research p,
 .assistant-chat.field-copilot .fred-research li,
 .assistant-chat.field-copilot .fred-research dd{font-size:13.5px;line-height:1.45;color:#5b675f}
 .assistant-chat.field-copilot .fred-research label[for="fred-public-query"]{display:block;margin-top:10px;font-size:13px;font-weight:500;color:#5b675f}
 .assistant-chat.field-copilot .fred-research textarea{min-height:72px;margin:4px 0 10px;padding:10px 12px;font-size:16px;border:1px solid #e1e5e0;border-radius:12px;background:#f5f6f4}
 .assistant-chat.field-copilot .fred-research textarea:focus{outline:none;border-color:#2f5d46;background:#fff}
 .assistant-chat.field-copilot .fred-research__review{font-size:13px;color:#3d4a42}
 .assistant-chat.field-copilot .fred-research__review input{flex:0 0 18px;width:18px;min-width:18px;max-width:18px;height:18px;min-height:18px;margin:1px 0 0;padding:0;accent-color:#2f5d46}
 .assistant-chat.field-copilot .fred-research__disclosure{font-size:12px!important;color:#7a867c!important}
 .assistant-chat.field-copilot .fred-research__actions button{height:40px;padding:0 16px;border-radius:12px;font-size:15px;font-weight:600}
 .assistant-chat.field-copilot .fred-research__actions button[type=submit]{flex:1;border:0;background:#2f5d46;color:#fff}

 /* Writing style. */
 .assistant-chat.field-copilot .fred-writing-preferences__panel{border:0!important;border-radius:0!important;box-shadow:none!important;padding:12px 16px 16px!important;background:transparent!important}
 .assistant-chat.field-copilot .fred-writing-preferences__eyebrow{display:none!important}
 .assistant-chat.field-copilot .fred-writing-preferences h2{font-size:17px!important;font-weight:600!important;letter-spacing:-.01em}
 .assistant-chat.field-copilot .fred-writing-preferences h3{font-size:15px!important;font-weight:600!important}
 .assistant-chat.field-copilot .fred-writing-preferences p{font-size:13.5px!important;line-height:1.45!important;color:#5b675f}
 .assistant-chat.field-copilot .fred-writing-preferences button{min-height:40px!important;padding:0 14px!important;font-size:15px!important;border-radius:12px!important}
 .assistant-chat.field-copilot .fred-writing-preferences__primary{background:#2f5d46!important;border-color:#2f5d46!important;color:#fff!important}
 .assistant-chat.field-copilot .fred-writing-preferences__choices > button:not(.fred-writing-preferences__primary){background:#f1f3f0!important;border-color:transparent!important;color:#17251d!important}
 .assistant-chat.field-copilot .fred-writing-preferences__quiet{min-height:32px!important;padding:0 2px!important;border:0!important;background:transparent!important;color:#2f5d46!important;font-weight:600!important}
 .assistant-chat.field-copilot .fred-writing-preferences select,
 .assistant-chat.field-copilot .fred-writing-preferences textarea,
 .assistant-chat.field-copilot .fred-writing-preferences input[type=text]{font-size:16px!important;border-radius:10px!important;background:#f5f6f4!important;border-color:#e1e5e0!important}
 .assistant-chat.field-copilot .fred-writing-preferences select{min-height:40px!important}
}

/* Web search results inside the chat (2026-10-10): the research result block, sized for the thread. */
.assistant-chat.field-copilot .field-copilot__web.fred-research{flex:none;overflow:visible;max-width:none;align-self:stretch;padding:4px 0}
.assistant-chat.field-copilot .field-copilot__web article{border:1px solid #e7e9e6;border-radius:14px;padding:10px 14px;background:#fff}
.assistant-chat.field-copilot .field-copilot__tool--web[aria-checked="true"]{font-weight:650}
@media (max-width:819px){
 .assistant-chat.field-copilot .field-copilot__toolbar[data-open="true"] > .field-copilot__tool--web[aria-checked="true"]::after{content:"On";margin-left:auto;padding:2px 8px;border-radius:999px;background:#2f5d46;color:#fff;font-size:12px;font-weight:600}
}

/* Generic overlay additions (2026-10-10): this file ships to builds that do not have the revamp in
   their source (Zoey, Amanda). The script adds the DOM the revamp's React code adds (the + button,
   the scrim, the portrait, the privacy note) and tags the menu rows. */
@media (max-width:819px){
 html body .assistant-chat.field-copilot footer.field-copilot__composer > p:last-child{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
 html body .assistant-chat.field-copilot .field-copilot__header-meta{display:none!important}
 html body .assistant-chat.field-copilot .assistant-chat__eyebrow{display:none!important}
 html body .assistant-chat.field-copilot:not([data-fred-empty="true"]) .field-copilot__identity{visibility:visible}
}
