/* The Note header is the first row of the workspace, outside the scrolling conversation. */
.jta-chat-main{grid-template-rows:auto minmax(0,1fr) auto}
.jta-chat-note-header{position:relative;z-index:15;display:flex;align-items:center;gap:20px;min-width:0;min-height:82px;padding:14px 28px;border-bottom:1px solid #e7e7e2;background:#fff;color:#202220}
.jta-note-heading{min-width:0;flex:1}
.jta-note-heading h1{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:650;line-height:1.5;letter-spacing:-.02em}
.jta-note-heading p{display:flex;flex-wrap:wrap;gap:0 10px;margin:3px 0 0;font-size:12px;color:#636963;line-height:1.5}
.jta-note-ai-state[data-note-status="resolved"]:before,.jta-note-ai-state[data-note-status="archived"]:before{background:#737373}
.jta-note-ai-state:empty{display:none}
.jta-note-ai-state:before{content:'';display:inline-block;width:5px;height:5px;margin:0 7px 2px 0;border-radius:50%;background:#a7ad9f}
.jta-note-actions{display:flex;align-items:center;gap:4px;flex:none}
.jta-chat-note-header .jta-modes,.jta-chat-note-header [data-mode-header],.jta-chat-note-header [data-mode-tools],.jta-chat-note-header .jta-start-modes{display:contents}
.jta-chat-note-header .jta-connections,.jta-chat-note-header .jta-header-details{position:static;margin:0;padding:0;border:0;background:none;color:inherit;overflow:visible;max-height:none}
.jta-chat-note-header .jta-header-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:1px solid transparent;border-radius:12px;background:transparent;color:#454b43;box-shadow:none;cursor:pointer;list-style:none;transition:background .15s,color .15s,border-color .15s}
.jta-chat-note-header .jta-header-icon::-webkit-details-marker{display:none}
.jta-chat-note-header .jta-header-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.jta-chat-note-header .jta-header-icon:hover{background:#f4f5f1;color:#111;border-color:#e7e8e2}
.jta-chat-note-header .jta-header-icon[aria-expanded=true],.jta-chat-note-header details[open]>.jta-header-icon{background:#f4f5f1;border-color:#d8ddd2;color:#111}
.jta-chat-note-header .jta-header-icon.is-muted{background:#fff4d7;color:#7a510b;border-color:#ebd59e}
.jta-chat-note-header :focus-visible{outline:2px solid #111;outline-offset:3px}
.jta-chat-note-header .jta-compose-modes{display:flex;gap:2px;padding-left:8px;margin-left:4px;border-left:1px solid #e5e7e0;background:none;border-radius:0}
.jta-chat-note-header .jta-compose-modes .jta-header-icon[aria-pressed=true]{background:#fff8ce;color:#4c4316;border-color:#ecdf93}
.jta-chat-note-header .jta-header-popover,.jta-chat-note-header .jtc-content{position:absolute;right:24px;top:calc(100% + 8px);z-index:20;width:min(420px,calc(100vw - 32px));max-height:min(65dvh,580px);overflow:auto;overscroll-behavior:contain;padding:18px;margin:0;border:1px solid #e2e5dc;border-radius:16px;background:#fff;box-shadow:0 16px 48px #17200d26;color:#242724;font:14px/1.55 Inter,system-ui,sans-serif}
.jta-chat-note-header .jta-header-popover h2{margin:0 0 12px;font-size:13px;color:#696f66;font-weight:600}
.jta-chat-note-header .jta-mode-options{display:grid;gap:4px}
.jta-chat-note-header .jta-mode-options>button,.jta-chat-note-header .jta-mode-options>a{display:flex;align-items:center;gap:14px;margin:0;padding:12px;border:0;border-radius:10px;background:#fff;color:#232823;text-decoration:none;font:600 14px/1.5 Inter,system-ui,sans-serif;text-align:left;cursor:pointer}
.jta-chat-note-header .jta-mode-options>button:hover,.jta-chat-note-header .jta-mode-options>a:hover{background:#f4f5f1}
.jta-chat-note-header .jta-mode-options svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.jta-chat-note-header .jta-mode-options small{display:block;font-weight:400;font-size:12px;color:#72796e}
.jta-chat-note-header .jta-note-header{margin:0;padding:0;border:0;border-radius:0;max-width:none;font:inherit;color:inherit}
.jta-chat-note-header .jta-note-header-top{padding:0}
.jta-chat-note-header .jta-note-header-top strong{font-size:15px}
.jta-chat-note-header .jtm-toolbar-panel p{margin:0 0 14px}
.jta-chat-note-header .jta-header-popover button:not(.jta-mode-options button),.jta-chat-note-header .jtc-content button{min-height:44px;padding:10px 16px;border:0;border-radius:9999px;background:#7ab8fa;color:#fff;font:600 13px/1.5 Arial,Helvetica,sans-serif}
.jta-chat-note-header .jta-header-popover button:not(.jta-mode-options button):hover,.jta-chat-note-header .jtc-content button:hover{background:#ff5151;color:#fff}
.jta-chat-note-header [data-mode-status]:not(:empty),.jta-chat-note-header [data-start-status]:not(:empty){position:absolute;left:20px;right:20px;top:100%;z-index:22;margin:8px 0;padding:10px 14px;border:1px solid #e8dba3;border-radius:10px;background:#fff8dc;font-size:13px}
.jta-chat-note-header [data-mode-status]:empty,.jta-chat-note-header [data-start-status]:empty{display:none}
.jta-chat-note-header [data-start-retry]:not([hidden]),.jta-chat-note-header [data-mode-tools]>button:not([hidden]){position:absolute;right:24px;top:calc(100% + 68px);z-index:24}
.jta-chat-note-header .jta-chat-mobile-navigation{position:static;flex:none}
.jta-chat-note-header [hidden]{display:none!important}
/* Attachments belong with the draft; mode and metadata controls belong at the top. */
.jta-chat-tools{margin-bottom:8px}
.jta-chat-tools .jta-file-menu>summary{width:44px;height:44px;padding:0;justify-content:center;border-color:#e2e4dd;border-radius:12px}
.jta-chat-tools .jta-file-menu[open]{flex:0 1 auto;order:0}
.jta-chat-tools .jta-file-menu{position:relative}
.jta-chat-tools .jta-file-menu[open] .jta-file-tools{position:relative;width:min(470px,calc(100vw - 48px));margin:8px 0 0;box-shadow:0 4px 16px #17200d0a}
.jta-new-email{max-width:780px;margin:0 auto;background:#fff;border:1px solid #e2e4dd;border-radius:18px;padding:20px;box-shadow:0 4px 20px #17200d06}
.jta-new-email h2{margin:0 0 16px;font-size:16px}
.jta-new-email form{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.jta-new-email label{display:grid;gap:5px;font-size:13px;color:#4c554a}
.jta-new-email input{min-width:0;width:100%;padding:12px;border:1px solid #cdd3c7;border-radius:9px;font:inherit;background:#fff;color:#171717}
.jta-new-email button{justify-self:start;min-height:44px;padding:10px 18px;border:0;border-radius:9999px;background:#7ab8fa;color:#fff;font:600 14px/1.5 Arial,Helvetica,sans-serif;cursor:pointer}
.jta-new-email button:hover{background:#ff5151;color:#fff}
.jta-new-email small{align-self:center;font-size:12px;color:#687064}
.jta-new-email :focus-visible{outline:2px solid #111;outline-offset:3px}
@media(max-width:1100px) and (min-width:821px){.jta-chat-note-header{gap:12px;padding:12px 18px}.jta-note-heading p{font-size:11px}.jta-note-ai-state:not([data-note-status="resolved"]):not([data-note-status="archived"]){display:none}}
@media(max-width:820px){.jta-chat-note-header{display:grid;grid-template-columns:44px minmax(0,1fr);gap:4px 10px;padding:8px 12px}.jta-note-heading h1{font-size:15px}.jta-note-heading p{font-size:11px}.jta-note-actions{grid-column:1/-1;justify-content:flex-end}.jta-chat-note-header .jta-header-popover,.jta-chat-note-header .jtc-content{right:12px;max-height:60dvh}.jta-chat-note-header .jta-chat-mobile-navigation{display:block}.jta-new-email{padding:16px}.jta-new-email form{grid-template-columns:1fr}.jta-new-email small{font-size:11px}.jta-chat-thread{padding-top:22px}}
@media(prefers-reduced-motion:reduce){.jta-chat-note-header .jta-header-icon{transition:none}}

/* A mode describes this Note. Starting another Note is a separate action. */
.jta-mode-options .jtm-current-mode {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
}
.jta-mode-options [aria-current="true"].jtm-current-mode {
    background: #fff8ce;
    color: #312c18;
    border: 1px solid #ecdf93;
}
.jtm-current-mode > span:first-of-type { flex: 1; min-width: 0; font-weight: 650; }
.jtm-mode-marker { margin-inline-start: auto; font-size: 12px; font-weight: 650; white-space: nowrap; }
.jta-mode-options > [hidden] { display: none !important; }
.jta-chat-main .jta-property-start-stage { display: block; overflow-y: auto; padding: clamp(16px,5vw,64px); }
.jta-property-intake { box-sizing: border-box; max-width: 600px; margin: 0 auto; padding: clamp(18px,4vw,32px); background: #fff; border: 1px solid #e2e5dc; border-radius: 16px; }
.jta-property-intake h2 { margin: 0 0 20px; font-size: clamp(21px,4vw,26px); line-height: 1.2; }
.jta-property-intake form, .jta-property-intake fieldset, .jta-property-intake label { display: grid; gap: 8px; min-width: 0; }
.jta-property-intake form { gap: 16px; }
.jta-property-intake label, .jta-property-intake legend { font-weight: 600; }
.jta-property-intake input, .jta-property-intake textarea, .jta-property-intake select { box-sizing: border-box; width: 100%; min-height: 46px; border: 1px solid #babfb5; border-radius: 10px; padding: 10px 12px; background: #fff; color: #171717; font: inherit; font-size: 16px; }
.jta-property-intake fieldset { border: 0; margin: 0; padding: 0; }
.jta-property-intake legend { padding: 0 0 8px; }
.jta-property-intake button { justify-self: start; min-height: 44px; padding: 10px 18px; background: #f4dc58; color: #171717; border: 0; border-radius: 10px; font: inherit; font-weight: 650; cursor: pointer; }
.jta-property-intake button:disabled { opacity: .65; cursor: wait; }
.jta-property-intake :focus-visible { outline: 2px solid #655716; outline-offset: 3px; }
.jta-property-intake [role="status"] { margin: 0; }
.jta-property-intake [role="status"]:empty { display: none; }
@media (max-width: 420px) { .jta-mode-options .jtm-current-mode { flex-wrap: wrap; } }

/* Header controls disable briefly while saving. Keep their helper descriptions
   available to assistive technology without widening the icon toolbar. */
.jta-chat-note-header [data-mode-header] > .jta-helper-inline,
.jta-chat-note-header .jta-start-modes > .jta-helper-inline{
 position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;
 padding:0!important;border:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;
}
