@font-face { font-family: Inter; src: url("/assets/fonts/inter-medium.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/inter-semibold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }
/* Shared by Work, workspace access, and the embedded connection panel. */
:root {
    --ink: #19352b;
    --green: #247447;
    --muted: #5c6c63;
    --border: #dce5dc;
    --paper: #fff;
    --canvas: #f7f9f6;
    --accent: #edf4ed;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --control-surface: #fff;
    --control-border: #cddace;
    --control-focus: #247447;
    --control-muted: #5c6c63;
    --control-accent: #edf4ed;
    --control-radius: 8px;
    --scrollbar-thumb: #bdc8b2;
}

* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border: 2px solid transparent; background-clip: padding-box; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background-color: #97aa87; }
::-webkit-scrollbar-corner { background: transparent; }

.field-control {
    appearance: none;
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    border: 1px solid var(--control-border);
    border-radius: var(--control-radius);
    padding: 10px 12px;
    background-color: var(--control-surface);
    color: #19352b;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field-control::placeholder { color: var(--control-muted); opacity: 1; }
.field-control:hover:not(:disabled):not(:focus) { border-color: #8cad93; }
.field-control:focus {
    outline: none;
    border-color: var(--control-focus);
    box-shadow: 0 0 0 1px var(--control-focus);
}
.field-control:disabled {
    cursor: not-allowed;
    background-color: #edf4ed;
    color: var(--control-muted);
    opacity: .65;
}
.field-control[readonly] { background-color: #edf4ed; color: #5c6c63; }
.field-control[aria-invalid=true] { border-color: #a15e3d; }
.field-error { color: #8b4e32; font-size: 12px; margin-top: 6px; line-height: 1.5; }

.select-control {
    cursor: pointer;
    padding-right: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* CSS chevron also works under Goblin's strict, same-origin CSP. */
    background-image: linear-gradient(45deg, transparent 50%, #5c6c63 50%), linear-gradient(135deg, #5c6c63 50%, transparent 50%);
    background-position: right 17px center, right 12px center;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

/* Keep native keyboard and mobile selection; enhance the popup where supported. */
@supports (appearance: base-select) {
    .select-control, .select-control::picker(select) { appearance: base-select; }
    .select-control::picker-icon { display: none; }
    .select-control > button {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 0;
        margin: 0;
        border: 0;
        background: transparent;
        color: inherit;
        font: inherit;
        text-align: start;
        cursor: inherit;
    }
    .select-control selectedcontent {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .select-control::picker(select) {
        box-sizing: border-box;
        width: anchor-size(width);
        max-width: calc(100vw - 32px);
        margin-block: 5px;
        padding: 4px;
        border: 1px solid var(--control-border);
        border-radius: var(--control-radius);
        background: var(--control-surface);
        color: #19352b;
        box-shadow: 0 4px 12px #243d2c12;
        max-height: min(320px, 50dvh);
        overflow-y: auto;
        font: inherit;
    }
    .select-control option {
        min-height: 36px;
        padding: 8px 10px;
        border-radius: 4px;
        white-space: normal;
        overflow-wrap: anywhere;
        cursor: pointer;
    }
    .select-control option:checked { background: #edf4ed; }
    .select-control option:hover, .select-control option:focus {
        background: var(--control-accent);
        outline: none;
    }
}

@media (max-width: 760px) {
    /* Prevent mobile browsers from zooming the page while entering text. */
    .field-control { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .field-control { transition: none; }
}
@media (forced-colors: active) {
    * { scrollbar-color: auto; scrollbar-width: auto; }
    .field-control:focus { outline: 2px solid Highlight; outline-offset: 2px; }
    .select-control { appearance: auto; background-image: none; }
    .select-control::picker(select) { appearance: auto; }
}

button, a, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { -webkit-user-select: none; user-select: none; }
button, .button-link { transition: transform 140ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
    button:active:not(:disabled):not(:focus-visible), .button-link:active:not(:focus-visible) { transform: scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
    button, .button-link { transition: none; }
    button:active, .button-link:active { transform: none !important; }
}

:root {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #19352b;
    background: var(--canvas);
    font-synthesis: none;
    line-height: 1.5;
    --green: #247447;
    --muted: #5c6c63;
    --border: #dce5dc;
    --paper: #fff;
    --accent: #edf4ed;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: .5; }
button, a, input, textarea, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid #247447; }
a { color: var(--green); }
svg { width: 20px; height: 20px; flex-shrink: 0; stroke-width: 1.7; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: #dcebdc; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -80px; padding: 10px 16px; background: var(--paper); z-index: 20; }
.skip-link:focus { top: 12px; }
.app-shell { display: grid; grid-template-columns: 296px minmax(0, 1fr); grid-template-rows: 68px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.app-shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar { grid-column: 1; grid-row: 1 / -1; width: 296px; min-height: 0; padding: 14px 16px 12px; display: flex; flex-direction: column; background: #f7f9f6; border-right: 1px solid var(--border); }
.sidebar-collapsed .sidebar { visibility: hidden; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--green); font-size: 24px; font-weight: 600; letter-spacing: -.9px; text-decoration: none; }
.brand img { width: 31px; height: 31px; object-fit: contain; }
.icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 8px; color: #6b7765; }
.icon-button:hover { background: #e9ede2; }
.new-chat { display: flex; align-items: center; justify-content: flex-start; gap: 11px; border-radius: 9px; background: var(--green); color: white; font-size: 14px; font-weight: 500; padding: 11px 14px; }
.new-chat:hover, .primary:hover:not(:disabled), .send:hover:not(:disabled) { background: #1c603a; }
.sidebar-search { display: flex; align-items: center; gap: 10px; padding: 11px 9px; margin: 9px 0 18px; border: 1px solid transparent; border-radius: var(--control-radius); color: #76806d; }
.sidebar-search svg { width: 17px; height: 17px; }
.sidebar-search input { appearance: none; border: 0; background: transparent; padding: 3px 0; min-width: 0; width: 100%; font-size: 13px; }
.sidebar-search:focus-within { border-color: var(--control-focus); box-shadow: 0 0 0 1px var(--control-focus); }
.sidebar-search input:focus-visible, .composer textarea:focus-visible { outline: none; box-shadow: none; }
@media (forced-colors: active) {
    .sidebar-search:focus-within, .composer:focus-within { outline: 2px solid Highlight; outline-offset: 2px; }
}
.sidebar-search input::placeholder { color: #5c6c63; }
.sidebar-history { overflow: auto; min-height: 0; flex: 1; scrollbar-width: thin; }
.history-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 10px; margin: 0 0 12px; }
.history-heading h2 { font-size: 12px; font-weight: 600; }
.history-heading > span { color: #737d6b; font-size: 11px; }
.work-history { display: flex; flex-direction: column; gap: 3px; }
.work-card { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; text-align: left; border-radius: 8px; padding: 10px; font-size: 13px; }
.work-card:hover { background: #edf4ed; }
.work-card.selected { background: #e4eee4; color: #19352b; }
.work-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.work-indicator { display: flex; color: #848c7d; }
.work-indicator svg { width: 14px; height: 14px; }
.work-indicator.waiting { color: #946e30; }
.work-indicator.review { color: #7f6290; }
.work-indicator.working, .work-indicator.done { color: #53753d; }
.sidebar-empty { padding: 8px 10px 20px; color: #75816d; font-size: 12px; }
.conversation-heading { display: flex; align-items: center; margin: 25px 0 5px; }
.history-disclosure { display: flex; align-items: center; gap: 8px; padding: 9px 10px; flex: 1; text-align: left; font-size: 12px; color: #63705b; }
.history-disclosure svg { width: 16px; height: 16px; }
.history-disclosure svg:last-child { width: 13px; margin-left: auto; }
.history-disclosure[aria-expanded=true] svg:last-child { transform: rotate(90deg); }
.sidebar-bottom { display: flex; align-items: center; gap: 4px; border-top: 1px solid #dfe4d7; margin-top: 16px; padding-top: 12px; }
.nav-button { display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 13px; border-radius: 8px; text-align: left; flex: 1; }
.nav-button:hover { background: #edf4ed; }
.sidebar-system { display:flex; align-items:center; gap:10px; width:100%; padding:12px 10px 0; text-align:left; color:#53614e; }
.sidebar-system > span { flex:1; min-width:0; }
.sidebar-system strong { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:500; }
.sidebar-system small { display:block; margin-top:5px; font-size:10px; color:#657360; }
.sidebar-system > svg { width:17px; height:17px; }
.sidebar-system > svg:last-child { width:13px; }
.system-dot { width:6px; height:6px; border-radius:50%; background:#a4aca0; }
.system-dot.live { background:#588343; }
.system-dot.warning { background:#b57a2f; }
.main-shell { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--paper); }
.workspace-header { grid-column: 2; grid-row: 1; position: relative; z-index: 3; background: var(--paper); border-bottom: 1px solid var(--border); min-width: 0; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.header-left, .header-actions { display: flex; align-items: center; gap: 10px; }
.workspace-name { color: #5c6a54; font-size: 17px; font-weight: 500; letter-spacing: -.3px; }
.home { display: flex; flex: 1; min-height: 0; overflow: auto; align-items: center; justify-content: center; padding: 32px 30px 100px; }
.home-content { width: min(100%, 730px); text-align: center; margin: auto; }
.home h1 { font-size: clamp(27px, 3vw, 36px); font-weight: 500; line-height: 1.25; letter-spacing: -1.2px; color: var(--green); }
.composer-wrap { width: min(100%, 802px); margin: 0 auto; padding: 15px 36px 23px; flex-shrink: 0; }
.home .composer-wrap { padding: 0; }
.composer { background: var(--paper); border: 1px solid #dce5dc; border-radius: 19px; padding: 17px 17px 12px; box-shadow: 0 3px 15px #243d2c05; text-align: left; }
.composer:focus-within { border-color: var(--control-focus); box-shadow: 0 0 0 1px var(--control-focus); }
.composer textarea { appearance: none; background: transparent; border: 0; outline: 0; box-shadow: none; width: 100%; resize: vertical; min-height: 70px; max-height: 30dvh; display: block; font-size: 15px; line-height: 1.6; padding: 0 3px; }
.composer textarea::placeholder { color: #87907e; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; }
.composer-footer-start { display: flex; align-items: center; flex: 1; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.composer-note { color: #78846e; font-size: 11px; }
.send { background: var(--green); color: white; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.send svg { width: 18px; height: 18px; }
.connection-choice { display: flex; align-items: center; gap: 7px; color: #5c6c63; font-size: 12px; padding: 6px 8px; border-radius: 7px; }
.connection-choice:hover { background: #edf4ed; }
.connection-choice img { display: block; flex-shrink: 0; width: 24px; height: 24px; object-fit: contain; }
.connection-choice svg:last-child { width: 11px; height: 11px; transform: rotate(90deg); }
.composer-hint { font-size: 11px; color: #5c6c63; margin-top: 12px; text-align: center; }
.connection-nudge { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; color: #5c6c63; margin-top: 32px; }
.connection-nudge button { display: flex; align-items: center; gap: 6px; color: #365c29; font-size: 12px; padding: 4px; }
.connection-nudge svg { width: 14px; height: 14px; }
.detail, .chat-workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; }
.detail-heading { padding: 0 0 24px; }
.title-row { display: flex; gap: 15px; align-items: flex-start; justify-content: space-between; }
.title-row h2 { font-size: 25px; font-weight: 550; color: #31452d; letter-spacing: -.35px; line-height: 1.5; overflow-wrap: anywhere; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; margin-top: 2px; background: #fbf5e8; border: 1px solid #eadfc5; border-radius: 6px; color: #806127; font-size: 10px; white-space: nowrap; }
.status-pill svg { width: 12px; height: 12px; }
.status-pill.working, .status-pill.done { color: #4d6e36; background: #edf3e5; border-color: #dce5dc; }
.status-pill.review { color: #76608b; background: #f2eef6; border-color: #e4ddec; }
.status-pill.paused { color: #6c7465; background: #f2f3ee; border-color: #e1e4d9; }
.work-details { margin-top: 18px; }
.detail-properties { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #738168; font-size: 12px; }
.git-repository-detail { display: flex; gap: 8px; align-items: flex-start; margin-top: 13px; font-size: 12px; color: #637557; overflow-wrap: anywhere; }
.git-repository-detail svg { width: 16px; height: 16px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-top: 20px; }
.tab { padding: 0 0 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #718165; border-bottom: 2px solid transparent; }
.tab svg { width: 15px; height: 15px; }
.tab.active { border-bottom-color: #607d48; color: #365325; }
.detail-body { flex: 1; min-height: 0; overflow: auto; padding: 26px 32px; scrollbar-width: thin; }
.thread-content { max-width: 730px; margin: 0 auto; }
.message { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 13px; margin-bottom: 30px; }
.avatar, .bot-avatar { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 600; background: #eee9da; color: #786c48; }
.bot-avatar { background: #edf4ed; }
.bot-avatar img { width: 20px; height: 20px; }
.message-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: #4a6040; margin: 4px 0 10px; }
.message-name time { color: #87917e; font-size: 10px; font-weight: 400; }
.message-text { font-size: 14px; line-height: 1.85; color: #4e5c46; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.decision { background: #f6f7ef; border: 1px solid #e2e7d6; border-radius: 12px; padding: 19px 21px; margin: 22px 0 12px; font-size: 13px; color: #5f6e53; }
.decision h3 { font-size: 14px; font-weight: 600; color: #415635; margin-bottom: 5px; }
.decision > p { margin: 6px 0 10px; line-height: 1.7; }
.decision > button, .work-setup > button, .command-notice button { margin: 12px 8px 0 0; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.primary { background: var(--green); color: white; border: 1px solid var(--green); }
.secondary { background: var(--paper); color: #5f704f; border: 1px solid #cddace; }
.secondary:hover:not(:disabled) { background: #edf4ed; }
.decision label { display: block; margin-top: 12px; }
.decision .field-control { margin-top: 6px; }
.decision details { margin: 16px 0 9px; border-top: 1px solid #e1e7d5; padding-top: 12px; }
.decision summary { cursor:pointer; color:#415f32; display:flex; align-items:center; gap:7px; list-style:none; width:fit-content; border-radius:4px; }
.decision summary::-webkit-details-marker { display:none; }
.decision summary:hover { color:var(--green); }
.decision summary svg { width:15px; height:15px; }
.decision details[open] > summary svg { transform:rotate(90deg); }
.decision details p { margin: 10px 0; line-height: 1.7; }
.work-setup { margin:10px 0; }
.work-setup .field-hint { font-size:12px; color:var(--muted); margin:8px 0; line-height:1.65; }
.work-setup .field-error { margin:6px 0; }
.work-setup .text-button { display:inline-flex; align-items:center; gap:6px; padding:4px 0; margin-top:6px; color:#415f32; font-size:12px; }
.github-repository-authorization { display: grid; gap: 16px; min-width: 0; font-size: 12px; line-height: 1.7; }
.github-repository-authorization header p { color: var(--muted); }
.github-repository-authorization .github-repository-authorization-details { grid-template-columns: 100px minmax(0, 1fr); gap: 8px 16px; }
.github-repository-authorization-details dd { color: #4e5c46; }
.github-repository-permissions h4 { margin: 0 0 6px; color: #415635; font-size: 12px; font-weight: 600; }
.github-repository-permissions ul { margin: 0; padding-left: 18px; }
.github-repository-permissions li + li { margin-top: 4px; }
.github-repository-authorization-note { padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); }
.github-repository-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.github-repository-actions > button { min-height: 40px; max-width: 100%; margin: 0; overflow-wrap: anywhere; }
.github-repository-form { display: grid; gap: 16px; margin: 16px 0 0; }
.github-repository-form label { margin-top: 0; font-size: 12px; }
.github-repository-form .identity-fields { gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.github-repository-form > .github-repository-actions { padding-top: 4px; }
.github-repository-form #github-repository-advanced > div { margin-top: 16px; }
@media (max-width: 480px) {
    .github-repository-authorization .github-repository-authorization-details { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .github-repository-authorization-details dd + dt { margin-top: 8px; }
    .github-repository-actions { flex-direction: column; align-items: stretch; }
    .github-repository-actions > button { min-height: 44px; }
}
.model-picker { position: relative; flex: none; }
.work-executor { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.work-executor > img { width: 32px; height: auto; flex: none; }
.executor-identity { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 100px; }
.executor-identity strong { color: var(--green); font-size: 14px; }
.executor-identity > span { color: var(--muted); font-size: 12px; }
.work-executor .model-picker { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 100%; }
.model-picker-summary { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.work-executor .model-picker-trigger { flex: none; font-size: 12px; }
.work-executor .model-popover { top: calc(100% + 8px); bottom: auto; left: auto; right: 0; max-width: calc(100vw - 80px); }
.work-executor .model-picker-notice { flex-basis: 100%; }
@media (max-width: 760px) {
    .work-executor .model-picker { flex-basis: 100%; justify-content: space-between; }
    .work-executor .model-popover { position: static; flex-basis: 100%; width: 100%; max-width: 100%; margin-top: 4px; box-shadow: none; }
}
.model-picker-trigger { display: inline-flex; align-items: center; gap: 6px; max-width: min(250px, calc(100vw - 100px)); min-height: 32px; padding: 5px 9px; border: 1px solid #dbe1d2; border-radius: 9px; background: var(--paper); color: #415635; font-size: 11px; white-space: nowrap; }
.model-picker-trigger:hover, .model-picker-trigger[aria-expanded="true"] { background: #edf4ed; }
.model-picker-trigger > svg:first-child { width: 14px; height: 14px; }
.model-picker-trigger > svg:last-child { width: 11px; height: 11px; transform: rotate(90deg); }
.model-picker-trigger-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.model-picker-trigger .model-effort { color: var(--muted); }
.model-picker-notice { display: block; max-width: 250px; margin-top: 4px; color: #806127; font-size: 10px; line-height: 1.3; }
.model-popover { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 8; width: 296px; max-width: calc(100vw - 32px); max-height: min(390px, calc(100dvh - 32px)); overflow-y: auto; padding: 8px; border: 1px solid #dbe1d2; border-radius: 14px; background: var(--paper); box-shadow: 0 12px 32px #243d2c20; scrollbar-width: thin; }
.model-row { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 38px; padding: 8px 9px; border-radius: 8px; color: var(--green); text-align: left; font-size: 12px; }
.model-row:hover:not(:disabled), .model-option:hover:not(:disabled), .model-menu-back:hover { background: #edf4ed; }
.model-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.model-row .model-effort { color: var(--muted); white-space: nowrap; }
.model-row > svg { width: 13px; height: 13px; }
.model-effort-control { padding: 7px 10px 5px; border-top: 1px solid var(--border); }
.model-effort-control > label { color: #596b50; font-size: 11px; font-weight: 500; }
.model-effort-track { position: relative; display: flex; align-items: center; height: 28px; margin-top: 4px; }
.model-effort-visual { position: absolute; inset: 0 7px; display: flex; align-items: center; pointer-events: none; }
.model-effort-rail { position: absolute; left: 0; right: 0; height: 6px; overflow: hidden; border-radius: 99px; background: #dfe5d7; }
.model-effort-fill { display: block; width: 0; height: 100%; background: var(--green); }
.model-effort-visual[data-level="1"] .model-effort-fill { width: 33.333%; }
.model-effort-visual[data-level="2"] .model-effort-fill { width: 66.667%; }
.model-effort-visual[data-level="3"] .model-effort-fill { width: 100%; }
.model-effort-track input { position: relative; z-index: 2; width: 100%; height: 28px; margin: 0; opacity: 0; cursor: pointer; }
.model-effort-track input:disabled { cursor: default; }
.model-effort-track:has(input:disabled) .model-effort-visual { opacity: .5; }
.model-effort-track:has(input:focus-visible) .model-effort-thumb { outline: 2px solid #247447; outline-offset: 2px; }
.model-effort-stops { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; }
.model-effort-stops span { width: 4px; height: 4px; border-radius: 50%; background: #f7f9f6; }
.model-effort-stops .is-unavailable { background: #9eaa94; }
.model-effort-thumb { position: absolute; top: 50%; left: 0; width: 15px; height: 15px; transform: translate(-50%, -50%); border: 2px solid var(--green); border-radius: 50%; background: var(--paper); box-shadow: 0 1px 4px #243d2c28; }
.model-effort-visual[data-level="1"] .model-effort-thumb { left: 33.333%; }
.model-effort-visual[data-level="2"] .model-effort-thumb { left: 66.667%; }
.model-effort-visual[data-level="3"] .model-effort-thumb { left: 100%; }
.model-effort-labels { display: flex; justify-content: space-between; gap: 3px; }
.model-effort-labels button { flex: 1; min-width: 0; padding: 2px 0; color: var(--muted); font-size: 10px; white-space: nowrap; }
.model-effort-labels button[aria-pressed="true"] { color: var(--green); font-weight: 600; }
.model-effort-labels button:disabled { opacity: .45; }
.model-menu-back { display: flex; align-items: center; gap: 5px; width: 100%; padding: 7px 8px; border-radius: 8px; color: var(--green); font-size: 12px; font-weight: 600; text-align: left; }
.model-menu-back svg { width: 13px; height: 13px; }
.model-options { max-height: 230px; overflow-y: auto; scrollbar-width: thin; }
.model-option { display: flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; min-height: 36px; padding: 6px 9px; border-radius: 8px; color: #415635; font-size: 12px; text-align: left; }
.model-option[aria-pressed="true"] { background: #edf4ed; }
.model-option > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-option small { margin-left: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
.model-option svg { width: 14px; height: 14px; color: #54743d; }
.model-option-pending { color: var(--muted); }
.model-menu .model-picker-field { padding: 5px 8px 8px; }
.model-menu .model-picker-field label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.model-menu .field-control { width: 100%; min-height: 32px; padding: 5px 8px; font-size: 12px; }
.model-menu .text-button { display: flex; margin: 5px 8px; font-size: 11px; }
.model-status { margin: 6px 9px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.text-button:hover { text-decoration:underline; text-underline-offset:3px; }
.text-button svg { width:14px; height:14px; }
.identity-fields { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.identity-fields > div { min-width:0; }
.progress-title { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.command-notice { font-size: 13px; padding: 13px 25px; color: #725721; background: #fbf3dd; overflow-wrap: anywhere; }
.timeline-item { position: relative; border-left: 1px solid #dfe5d7; padding: 0 0 25px 29px; margin-left: 10px; }
.timeline-icon { position: absolute; left: -9px; top: 2px; background: var(--paper); color: #799564; }
.timeline-icon svg { width: 17px; height: 17px; }
.timeline-item h4 { font-size: 13px; color: #4b633d; font-weight: 500; }
.timeline-item p { font-size: 13px; color: #637657; margin-top: 7px; }
.timeline-item time { font-size: 10px; color: #87977a; }
.thread-content > h3 { font-size: 15px; margin: 22px 0 13px; }
.thread-content > p { font-size: 13px; overflow-wrap: anywhere; margin-bottom: 12px; }
.output-card { border: 1px solid #e0e5d7; border-radius: 12px; margin-bottom: 20px; overflow: hidden; }
.output-card-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; }
.output-card h3 { font-size: 14px; font-weight: 500; }
.output-content { background: #f7f9f6; padding: 20px; border-top: 1px solid #e9edde; font-size: 14px; line-height: 1.8; }
.output-card > p { padding: 12px 20px; font-size: 11px; color: #6b7b5e; }
.empty-state, .conversation-empty { text-align: center; color: #7b8871; padding: 50px 10px; font-size: 14px; }
.empty-state h3, .conversation-empty h1 { color: var(--green); font-size: 27px; font-weight: 500; margin-bottom: 13px; }
.conversation-empty p { max-width: 390px; margin: auto; }
.conversation-title { font-size: 22px; font-weight: 500; margin: 0 0 30px; overflow-wrap: anywhere; }
.tracked-link { color: #54743d; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.unlock-page { min-height: 100dvh; background: #f7f9f6; display: flex; flex-direction: column; align-items: center; padding: 55px 24px 30px; }
.unlock-card { width: min(100%, 400px); margin: auto; padding: 50px 0; }
.unlock-card h1 { font-size: 29px; font-weight: 500; letter-spacing: -.8px; color: var(--green); margin-bottom: 14px; }
.unlock-card p { font-size: 14px; line-height: 1.8; color: #6d7962; }
.unlock-card label { display: block; font-size: 13px; margin: 28px 0 8px; }
.unlock-card .field-control { padding: 12px 14px; }
.unlock-card .primary { width: 100%; margin-top: 15px; font-size: 14px; padding: 12px; }
.unlock-card .command-notice { margin-top: 18px; border-radius: 9px; }
.unlock-note { color: #839076; font-size: 12px; }
@media (max-width: 760px) {
    .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); grid-template-rows: 104px minmax(0, 1fr); }
    .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 11; width: min(300px, 85vw); padding-top: 18px; }
    .sidebar-backdrop { position: fixed; inset: 0; background: #18261455; z-index: 10; }
    .workspace-header { padding: 8px 12px; gap: 6px 10px; flex-wrap: wrap; }
    .home { padding: 28px 20px 70px; }
    .home h1 { font-size: 28px; letter-spacing: -.7px; }
    .composer-wrap { padding: 12px 16px 17px; }
    .composer textarea { font-size: 16px; }
    .detail-heading { padding: 0 0 20px; }
    .title-row { flex-direction: column; gap: 7px; }
    .title-row h2 { font-size: 22px; }
    .detail-body { padding: 20px; }
    .message { gap: 10px; }
    .message-text { font-size: 14px; }
    .decision { padding: 16px; }
    .identity-fields { grid-template-columns:1fr; gap:0; }
    .composer-note { font-size: 10px; }
    .tabs { gap: 18px; }
    .command-notice { padding: 12px 20px; }
}
@media (prefers-reduced-motion: no-preference) {
    button { transition: background .12s; }
}

/* Work is the primary surface; navigation and activity scroll independently. */
.global-search { display: flex; align-items: center; gap: 9px; width: min(38%, 480px); padding: 7px 11px; border: 1px solid var(--border); border-radius: var(--control-radius); color: var(--muted); }
.global-search input { width: 100%; min-width: 0; border: 0; background: transparent; font-size: 12px; outline: 0; padding: 0; box-shadow: none; }
.global-search:focus-within { border-color: var(--control-focus); box-shadow: 0 0 0 1px var(--control-focus); }
.global-search svg { width: 16px; height: 16px; }
.search-results { position: absolute; top: 100%; left: 12px; right: 12px; max-height: 60dvh; overflow: auto; padding: 16px; background: var(--paper); border: 1px solid var(--border); border-radius: 0 0 12px 12px; box-shadow: 0 3px 15px #243d2c05; }
.search-results h3 { font-size: 13px; color: var(--green); }
.execution-events { margin-top: 14px; }
.execution-events > summary { cursor: pointer; }
.sidebar-heading h2 { color: var(--green); font-size: 18px; font-weight: 600; }
.history-heading h3 { font-size: 11px; font-weight: 500; color: var(--muted); }
.work-card { align-items: flex-start; padding: 12px 9px; }
.work-indicator { margin-top: 3px; }
.work-card-copy { display: block; min-width: 0; }
.work-card-copy .work-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; line-height: 1.5; }
.work-card-meta { display: block; margin-top: 5px; font-size: 10px; color: var(--muted); }
.work-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.detail-properties { margin-top: 15px; }
.detail-properties > span { display: inline-flex; align-items: center; gap: 6px; }
.detail-properties svg { width: 14px; height: 14px; }
.work-section { padding: 22px 0; border-top: 1px solid var(--border); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.section-heading h3, .composer-heading h3 { font-size: 14px; font-weight: 600; color: #415635; }
.section-heading > span { font-size: 11px; color: var(--muted); }
.goal-text { font-size: 15px; line-height: 1.8; color: #4e5c46; }
.text-button { display: inline-flex; align-items: center; gap: 5px; color: #415f32; font-size: 11px; padding: 3px 0; border-radius: 3px; }
.text-button svg { width: 14px; height: 14px; }
.section-empty { color: var(--muted); font-size: 12px; line-height: 1.8; }
.progress-row > summary, .durable-row > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; padding: 10px 0; border-radius: 4px; }
.progress-row > summary::-webkit-details-marker, .durable-row > summary::-webkit-details-marker { display: none; }
.progress-row > summary:hover, .durable-row > summary:hover { background: #f6f7ef; }
.milestone-icon { display: flex; color: #848c7d; }
.milestone-icon.complete { color: #53753d; }
.row-title { flex: 1; min-width: 0; font-size: 13px; color: #4e5c46; overflow-wrap: anywhere; }
.row-meta { font-size: 10px; color: var(--muted); max-width: 35%; text-align: right; }
.progress-row svg, .durable-row svg { width: 16px; height: 16px; color: #799564; }
svg.disclosure-icon { width: 12px; height: 12px; }
details[open] > summary > .disclosure-icon { transform: rotate(90deg); }
.inspection { margin: 0 0 9px 26px; padding: 10px 13px; border-left: 2px solid var(--border); font-size: 12px; line-height: 1.8; color: #4e5c46; overflow-wrap: anywhere; }
.inspection-meta { color: var(--muted); font-size: 11px; margin-top: 8px; }
.review-result { margin-top: 10px; }
.work-section .decision { margin: 15px 0 0; padding: 15px 17px; }
.work-section .decision h3 { font-size: 13px; }
.work-section .decision > p { font-size: 12px; }
.all-outputs > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 11px; color: #415f32; padding: 10px 0; }
.all-outputs > summary svg { width: 12px; height: 12px; }
.execution-properties { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 15px; margin: 0; }
.execution-properties dt { color: var(--muted); }
.execution-properties dd { margin: 0; overflow-wrap: anywhere; }
.work-composer { flex-shrink: 0; padding: 13px 32px 18px; border-top: 1px solid var(--border); background: var(--paper); }
.composer-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.composer-heading h3 { font-size: 12px; }
.work-composer .composer-wrap { width: 100%; padding: 0; }
.work-composer .composer { border-radius: 12px; padding: 12px 14px 10px; }
.work-composer textarea { min-height: 42px; height: 42px; max-height: 18dvh; font-size: 13px; line-height: 1.6; }
.work-composer .composer-footer { margin-top: 3px; }
.work-composer .composer-note { font-size: 10px; }
.work-conversation { max-height: 24dvh; overflow: auto; margin-bottom: 12px; padding: 0 5px; scrollbar-width: thin; }
.context-message { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: #4e5c46; line-height: 1.8; }
.context-message .message-name { margin: 0 0 5px; }
.activity-panel { grid-column: 3; grid-row: 2; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #f7f9f6; border-left: 1px solid var(--border); }
.activity-heading { padding: 22px 20px 18px; display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.activity-heading h2 { display: flex; align-items: center; gap: 8px; color: #415635; font-size: 14px; font-weight: 600; }
.activity-heading svg { width: 16px; height: 16px; }
.activity-body { flex: 1; min-height: 0; overflow: auto; padding: 0 20px 24px; scrollbar-width: thin; }
.activity-timeline { padding: 0; margin: 0; list-style: none; }
.activity-item { position: relative; padding: 0 0 24px 27px; margin-left: 7px; border-left: 1px solid #dfe5d7; }
.activity-item:last-child { border-left-color: transparent; }
.activity-icon { position: absolute; top: 0; left: -8px; display: flex; color: #799564; background: #f7f9f6; padding: 3px 0; }
.activity-icon svg { width: 16px; height: 16px; }
.activity-item summary { cursor: pointer; list-style: none; border-radius: 3px; }
.activity-item summary::-webkit-details-marker { display: none; }
.activity-source { display: flex; justify-content: space-between; align-items: center; gap: 7px; font-size: 10px; color: #637557; }
.activity-source time { color: var(--muted); white-space: nowrap; font-size: 9px; }
.activity-title { display: block; font-size: 12px; color: #4b633d; margin-top: 5px; }
.activity-preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 6px; }
.activity-item details[open] .activity-preview { display: none; }
.activity-context { font-size: 12px; color: #4e5c46; line-height: 1.8; overflow-wrap: anywhere; }
.activity-context p { margin-top: 8px; }
.activity-context p:last-of-type { font-size: 10px; color: var(--muted); }
.activity-empty { color: var(--muted); font-size: 12px; line-height: 1.8; padding: 25px 0; }
.activity-empty svg { margin-bottom: 10px; }
.activity-toggle { display: none; }
@media (min-width: 761px) and (max-width: 1199px) {
    .app-shell { grid-template-columns: 240px minmax(0, 1fr); }
    .app-shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
}
@media (max-width: 1199px) {
    .activity-panel { display: none; }
    .activity-panel.is-open { display: flex; position: fixed; inset: 0 0 0 auto; width: min(360px, 92vw); z-index: 12; }
    .activity-backdrop { position: fixed; inset: 0; background: #18261455; z-index: 11; }
    .activity-toggle { display: inline-flex; }
}
@media (max-width: 760px) {
    .header-left { gap: 4px; }
    .workspace-header .brand { font-size: 21px; gap: 6px; }
    .workspace-header .brand img { width: 26px; height: 26px; }
    .header-actions { gap: 5px; }
    .header-actions .primary, .header-actions .secondary { padding: 6px 8px; font-size: 11px; }
    .header-actions .global-ask { width: 32px; height: 32px; }
    .global-ask span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    .header-actions svg { width: 16px; height: 16px; }
    .header-actions .icon-button { width: 28px; }
    .global-search { width: 100%; order: 3; padding: 5px 10px; }
    .global-search input { font-size: 16px; }
    .work-composer { padding: 10px 16px 12px; }
    .work-composer textarea { font-size: 16px; }
    .work-section { padding: 20px 0; }
    .row-meta { max-width: 28%; }
    .detail-body { padding: 18px 20px; }
    .inspection { margin-left: 0; }
}
@media (max-height: 550px) {
    .work-composer { max-height: 48dvh; overflow: auto; }
    .sidebar { overflow: auto; }
    .sidebar-history { overflow: visible; flex: none; }
    .sidebar-system, .sidebar-bottom { flex-shrink: 0; }
}
@media (max-width: 360px) {
    .header-actions .primary { width: 32px; height: 32px; padding: 6px; }
    .header-actions .primary span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
}
@media (forced-colors: active) {
    .global-search:focus-within { outline: 2px solid Highlight; }
    .work-card.selected { outline: 1px solid Highlight; }
}

/* A quiet workspace canvas, with secondary history opened on demand. */
.sidebar-heading { min-height: 42px; margin-bottom: 14px; padding: 0 8px; }
.sidebar-heading .icon-button { width: 28px; opacity: .6; }
.brand { color: var(--green); letter-spacing: -.6px; }
.new-chat { justify-content: center; min-height: 40px; padding: 9px 14px; }
.primary-navigation { display: grid; gap: 3px; padding: 19px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.primary-navigation .nav-button { min-height: 42px; padding: 10px 12px; color: #29322f; }
.primary-navigation .active { background: var(--accent); color: #173c2b; }
.history-heading { padding: 0 12px; margin-bottom: 6px; }
.work-card { position: relative; min-height: 66px; padding: 11px 12px; gap: 8px; }
.work-card-copy { flex: 1; }
.work-card-copy .work-title { color: #1c2520; line-height: 1.3; padding-right: 15px; }
.work-card-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; margin-top: 4px; }
.work-card-meta time { white-space: nowrap; }
.work-indicator { position: absolute; right: 12px; top: 13px; }
.work-card.selected { background: #edf4ed; }
.work-card:hover { background: #ecf1ea; }
.work-indicator.done { color: #578b37; }
.conversation-heading { margin-top: 14px; }
.sidebar-system { border-top: 1px solid var(--border); padding: 10px 12px 0; margin-top: 10px; }
.workspace-header { padding: 12px 28px; gap: 12px; }
.header-left { width: 36px; flex-shrink: 0; }
.header-actions { gap: 8px; }
.global-search { width: min(58%, 630px); margin: 0 auto; min-height: 38px; border-radius: 10px; padding: 8px 12px; }
.search-shortcut { display: flex; gap: 4px; }
kbd { background: #f3f4f5; border-radius: 4px; padding: 1px 5px; font-family: inherit; font-size: 11px; }
.icon-button { color: #39453f; }
.icon-button:hover { background: #f0f3f0; }
.workspace-avatar { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #d8e5d7; color: #1d4431; }
.workspace-avatar svg { width: 18px; height: 18px; }
.action-menu { position: relative; }
.action-menu > summary { cursor: pointer; list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu-items { position: absolute; right: 0; top: calc(100% + 8px); z-index: 8; width: 185px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); box-shadow: 0 6px 24px #17201c12; }
.action-menu-items button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; text-align: left; border-radius: 6px; font-size: 12px; }
.action-menu-items button:hover { background: #f0f3f0; }
.detail-body { padding: 26px 40px 20px; }
.detail-heading { padding-bottom: 26px; }
.work-context { margin-bottom: 12px; }
.work-context > span { font-size: 10px; }
.back-to-work { font-size: 13px; color: #29372f; }
.back-to-work svg { width: 16px; height: 16px; }
.title-row { align-items: flex-start; gap: 20px; }
.title-row h2 { font-size: clamp(24px, 2vw, 30px); line-height: 1.3; font-weight: 650; letter-spacing: -.5px; color: #111713; }
.detail-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.detail-actions .secondary, .detail-actions .icon-button { min-height: 36px; border: 1px solid var(--border); border-radius: 10px; background: #f7f9f6; color: #19352b; }
.detail-actions svg { width: 17px; height: 17px; }
.detail-properties { align-items: center; margin-top: 16px; gap: 12px 22px; font-size: 13px; color: var(--muted); }
.detail-properties > span:first-child { color: #37423c; }
.status-pill { border: 0; border-radius: 99px; padding: 4px 12px; margin: 0; font-size: 12px; }
.status-pill.working, .status-pill.done { color: #2b5b28; background: #e2efd8; }
.status-pill.review { background: #f0eaf6; }
.work-section { display: flex; gap: 24px; padding: 22px 26px; border: 1px solid var(--border); border-radius: 13px; margin-bottom: 20px; }
.work-section:last-child { margin-bottom: 0; }
.section-icon { width: 21px; height: 21px; margin-top: 2px; color: #18251d; }
.section-content { flex: 1; min-width: 0; }
.section-heading { margin-bottom: 12px; align-items: flex-start; }
.section-heading h3 { color: #161d18; font-size: 15px; font-weight: 600; }
.goal-section .section-heading { margin-bottom: 2px; }
.goal-discuss { color: var(--muted); padding: 3px; }
.goal-text { font-size: 14px; color: #48525b; line-height: 1.65; }
.section-description { margin-top: 3px; font-size: 12px; color: var(--muted); }
.progress-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.progress-row { position: relative; min-width: 0; }
.progress-row:not(:last-child)::after { content: ''; position: absolute; top: 21px; left: calc(100% - 16px); width: 38px; height: 1px; background: #dfe5de; }
.progress-row.is-complete::after { background: #bbd9aa; }
.progress-row > summary { padding: 8px 0; flex-wrap: wrap; gap: 9px; }
.progress-row .row-title { flex: none; max-width: calc(100% - 36px); font-size: 13px; color: #48525b; }
.progress-row .row-meta:not(.sr-only) { width: 100%; max-width: none; text-align: left; padding-left: 33px; }
.milestone-icon { align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #f0f3ee; color: #818b7c; }
.milestone-icon.complete { background: #619a3f; color: white; }
.milestone-icon svg { color: inherit; width: 15px; height: 15px; }
.progress-row .inspection { margin-left: 0; padding: 9px; font-size: 11px; }
.output-row + .output-row { border-top: 1px solid var(--border); }
.output-row > summary { gap: 20px; padding: 11px 8px; }
.output-row > summary > svg:first-child { width: 19px; height: 19px; color: #1c2821; }
.output-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.output-copy .row-title { color: #1b231e; line-height: 1.4; }
.output-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.output-row .row-meta { font-size: 11px; }
.durable-row > summary:hover, .progress-row > summary:hover { background: #f8faf7; }
.work-composer { padding: 0 40px 24px; border-top: 0; }
.work-composer .composer { padding: 12px 14px; border-radius: 13px; box-shadow: 0 1px 5px #17201c08; }
.work-composer textarea { height: 34px; min-height: 34px; font-size: 14px; }
.work-composer .composer-footer { margin-top: 5px; }
.composer-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: #f5f6f5; border: 1px solid #eceeed; font-size: 12px; }
.composer-chip:hover { background: #eaf0e8; }
.composer-chip svg { width: 16px; height: 16px; }
.composer-add { background: #f5f6f5; border-radius: 50%; width: 34px; height: 34px; }
.work-composer .composer-note { margin-top: 7px; font-size: 10px; color: var(--muted); }
.send { width: 36px; height: 36px; box-shadow: 0 1px 4px #123d2a15; }
.activity-toggle { display: inline-flex; }
.activity-panel { display: none; background: #fafbf9; }
.activity-panel.is-open { display: flex; position: fixed; inset: 0 0 0 auto; width: min(380px, 92vw); z-index: 12; box-shadow: -4px 0 24px #17201c0a; }
.activity-backdrop { position: fixed; inset: 0; background: #18261455; z-index: 11; }
#toast:not(:empty) { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 10px; background: var(--green); color: white; font-size: 13px; z-index: 20; box-shadow: 0 3px 20px #17201c15; }
@media (min-width: 761px) and (max-width: 1199px) {
    .app-shell { grid-template-columns: 256px minmax(0, 1fr); }
    .sidebar { width: 256px; }
    .detail-body { padding: 24px; }
    .work-composer { padding: 0 24px 18px; }
    .work-section { gap: 16px; padding: 20px; }
    .progress-list { gap: 12px; }
    .progress-row:not(:last-child)::after { left: calc(100% - 8px); width: 20px; }
}
@media (max-width: 760px) {
    .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); }
    .sidebar { width: min(296px, 88vw); }
    .workspace-header { flex-wrap: nowrap; padding: 8px 12px; gap: 6px; }
    .header-left { width: 28px; }
    .header-actions { gap: 2px; }
    .header-actions .icon-button { width: 30px; height: 32px; }
    .workspace-avatar { width: 30px; height: 30px; }
    .global-search { flex: 1; order: 0; width: auto; min-height: 36px; margin: 0; padding: 7px 9px; }
    .global-search input { font-size: 16px; }
    .search-shortcut { display: none; }
    .detail-body { padding: 20px 16px 16px; }
    .detail-heading { padding-bottom: 20px; }
    .title-row { flex-direction: column; gap: 12px; }
    .title-row h2 { font-size: 24px; }
    .detail-properties { gap: 10px 14px; font-size: 12px; }
    .work-context > span { display: none; }
    .work-section { gap: 12px; padding: 18px 14px; margin-bottom: 14px; }
    .section-icon { width: 18px; height: 18px; }
    .progress-list { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .progress-row:not(:last-child)::after { display: none; }
    .progress-row .row-title { font-size: 13px; }
    .progress-row .row-meta:not(.sr-only) { width: auto; padding-left: 33px; }
    .output-row > summary { padding: 10px 0; gap: 10px; }
    .work-composer { padding: 0 12px 12px; }
    .work-composer textarea { font-size: 16px; }
    .composer-footer-start { gap: 5px; }
    .composer-chip { padding: 7px 8px; font-size: 11px; gap: 4px; }
    .composer-chip svg { width: 14px; height: 14px; }
    .composer-add { width: 30px; height: 30px; }
    .work-composer .composer-note { font-size: 9px; }
    .work-composer .composer { padding: 10px; }
}

.work-section .decision { background: #f7f9f5; border-color: #e4e9df; color: #49564b; }
@media (min-width: 761px) {
    .progress-row:not(:last-child)::after { display: none; }
    .progress-row:not(:last-child) > summary::after { content: ''; flex: 1; min-width: 12px; height: 1px; background: #dfe5de; margin: 0 -12px 0 8px; }
    .progress-row.is-complete > summary::after { background: #bbd9aa; }
}
.outputs-section .section-heading .secondary { flex-shrink: 0; white-space: nowrap; }

/* The workspace shares the website's green ink, quiet canvas and white panels. */
.app-shell { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { width: 272px; padding: 18px 16px 16px; background: var(--canvas); }
.sidebar-heading { margin-bottom: 20px; }
.brand { color: var(--ink); font-size: 26px; letter-spacing: -1px; }
.new-chat { min-height: 44px; justify-content: flex-start; border: 1px solid var(--border); border-radius: 8px; padding-inline: 14px; background: var(--paper); color: var(--ink); }
.new-chat:hover { background: var(--accent); }
.sidebar-history { margin-top: 24px; }
.history-heading { padding-inline: 8px; gap: 8px; }
.history-heading h2 { font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.work-view { width: 145px; min-height: 36px; padding: 7px 30px 7px 8px; font-size: 11px; background-color: transparent; border-color: transparent; }
.primary-navigation { gap: 0; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px solid var(--border); border-bottom: 0; flex-shrink: 0; }
.primary-navigation .nav-button { min-height: 38px; padding: 8px 12px; font-weight: 500; color: var(--muted); }
.primary-navigation .active { color: var(--green); background: #e5efe5; }
.work-card.selected { box-shadow: inset 2px 0 var(--green); }
.work-card-copy { min-width: 0; }
.work-card-copy .work-title { color: var(--ink); font-size: 12px; }
.workspace-header { background: var(--canvas); border-bottom: 1px solid var(--border); }
.global-search { background: var(--paper); border: 1px solid var(--border); border-radius: 8px; }
.workspace-avatar { background: var(--accent); border: 1px solid var(--border); }
.main-shell { background: var(--canvas); }
.home { padding: 48px 40px 112px; }
.home-content { max-width: 680px; text-align: center; }
.home h1 { color: var(--ink); font-size: clamp(28px, 3vw, 36px); font-weight: 500; line-height: 1.25; letter-spacing: -.04em; text-wrap: balance; margin-bottom: 28px; }
.home .composer { border-radius: 18px; padding: 20px 18px 14px; box-shadow: 0 4px 20px #19352b04; }
.home .composer textarea { min-height: 80px; }
.home .composer-hint { margin-top: 14px; text-align: center; font-size: 12px; }
.create-work { width: auto; min-height: 38px; padding: 8px 12px; border-radius: 9px; gap: 8px; font-size: 12px; font-weight: 500; }
.connection-choice { max-width: 100%; min-width: 0; }
.connection-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.connection-nudge { align-items: center; margin-top: 24px; }
.detail-body { padding: 36px clamp(24px, 4vw, 64px) 24px; }
.title-row h2 { color: var(--ink); font-weight: 600; letter-spacing: -.035em; }
.work-section { background: var(--paper); border-radius: 14px; box-shadow: 0 2px 8px #19352b03; }
.section-heading h3, .section-icon { color: var(--ink); }
.detail-properties { font-size: 12px; }
.work-composer { background: var(--canvas); padding-inline: clamp(24px, 4vw, 64px); }
.work-composer .composer { border-radius: 14px; }
.chat-workspace .detail-body { background: var(--paper); margin: 24px 24px 0; border: 1px solid var(--border); border-radius: 18px 18px 0 0; }
.chat-workspace > .composer-wrap { background: var(--paper); width: auto; max-width: none; margin: 0 24px 24px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 18px 18px; padding: 20px; }
.unlock-page { background: var(--canvas); }
.unlock-card { background: var(--paper); border-radius: 22px; border-color: var(--border); box-shadow: 0 8px 32px #19352b06; padding: 36px; }
.unlock-card h1 { color: var(--ink); letter-spacing: -.04em; font-weight: 600; }
.unlock-card .primary { min-height: 44px; }
@media (min-width: 761px) and (max-width: 1199px) {
    .app-shell { grid-template-columns: 244px minmax(0, 1fr); }
    .sidebar { width: 244px; }
    .home { padding-inline: 28px; }
}
@media (max-width: 760px) {
    .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
    .sidebar { width: min(296px, 88vw); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
    .workspace-header { padding-inline: max(12px, env(safe-area-inset-left)); }
    .home { padding: 32px 20px max(64px, env(safe-area-inset-bottom)); }
    .home .composer { padding: 18px 16px 14px; }
    .home .composer textarea { font-size: 16px; }
    .work-view { font-size: 16px; width: 155px; }
    .history-heading { flex-wrap: wrap; }
    .detail-body { padding: 24px 16px 16px; }
    .work-composer { padding: 0 12px max(12px, env(safe-area-inset-bottom)); }
    .chat-workspace .detail-body { margin: 12px 12px 0; }
    .chat-workspace > .composer-wrap { margin: 0 12px 12px; padding: 12px; }
    .header-actions .icon-button, .workspace-avatar, #show-sidebar, .send { min-width: 40px; min-height: 40px; }
    .header-actions .global-ask { display: none; }
    .unlock-card { padding: 28px; }
}
@media (max-width: 760px) { .header-left { width: 40px; } }

/* Put the outcome and next action first; supporting evidence stays alongside. */
.work-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.work-main, .work-support { min-width: 0; }
.work-main .work-section { padding: 24px; }
.work-state { margin: 0 0 20px; padding: 24px; background: var(--accent); border-color: var(--border); color: var(--ink); }
.work-state h3 { font-size: 16px; color: var(--ink); }
.work-state > p { color: var(--muted); }
.work-state-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.work-state-secondary { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.work-state-secondary .secondary { min-height: 36px; margin: 0; padding: 4px 0; border: 0; background: transparent; color: var(--muted); }
.work-state .review-result { padding: 4px 0; font-size: 12px; }
.work-state .work-executor { margin-top: 16px; }
.section-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding-inline: 5px; border-radius: 6px; background: var(--accent); color: var(--muted); font-size: 11px; }
.work-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 24px; }
.work-support .work-section { margin: 0; padding: 0 0 24px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; }
.work-support .section-heading h3 { font-size: 12px; font-weight: 600; }
.work-support .progress-list { display: block; }
.work-support .progress-row > summary { min-height: 56px; gap: 8px; padding: 10px 0; }
.work-support .progress-row .row-title { font-size: 12px; }
.work-support .progress-row .row-meta:not(.sr-only) { padding-left: 32px; font-size: 11px; }
.work-support .progress-row:not(:last-child)::after { display: block; top: 40px; left: 12px; width: 1px; height: calc(100% - 24px); }
.work-support .progress-row > summary::after { content: none; }
.work-support .progress-row .disclosure-icon { margin-left: auto; width: 12px; height: 12px; }
.work-support .progress-row .inspection { margin: 4px 0 8px 32px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); }
.work-support .milestone-icon.complete { background: var(--green); }
.work-support .output-row > summary { gap: 8px; padding: 12px 0; }
.work-support .output-row .row-meta { display: none; }
.work-support .output-copy .row-title { font-size: 12px; }
.work-support .output-description { white-space: normal; font-size: 10px; }
.work-support .output-row .inspection { margin-left: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); }
.work-support .execution-properties { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.work-support .execution-properties dd { margin-bottom: 8px; }
.work-properties { margin: 0; display: grid; gap: 6px; font-size: 12px; }
.work-properties dt { color: var(--muted); font-size: 11px; }
.work-properties dd { margin: 0 0 10px; overflow-wrap: anywhere; }
.work-properties .text-button { font-size: inherit; }
.repository-branch { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.repository-branch svg { width: 14px; height: 14px; }
.work-info-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.work-info-actions .text-button { min-height: 36px; font-size: 11px; }
.work-info-actions svg { width: 15px; height: 15px; }
.outputs-section .output-row > summary { padding-inline: 0; gap: 12px; }
.latest-result[open] .output-description { display: none; }
.latest-result[open] .inspection { margin: 12px 0 16px; padding: 16px 0 0; border: 0; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.8; color: var(--ink); }
.latest-result .inspection-meta { margin-top: 16px; font-size: 11px; color: var(--muted); }
.work-main .section-empty { padding-block: 12px; }
.detail-actions .activity-toggle { width: auto; }
@media (min-width: 1280px) {
    .work-layout { grid-template-columns: minmax(0, 1fr) 264px; gap: 32px; }
    .work-support { display: flex; flex-direction: column; gap: 24px; }
    .work-support .work-section { width: 100%; }
}
@media (max-width: 760px) {
    .work-layout { gap: 24px; }
    .work-main .work-section, .work-state { padding: 18px; }
    .work-support { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .work-state-actions > button { min-height: 40px; }
    .work-info-actions .text-button { min-height: 40px; }
    .latest-result[open] .inspection { font-size: 14px; }
}
