/*
    The Higgins agent panel.

    ⚠️ A PLAIN STYLESHEET, NOT SCOPED CSS, and deliberately. Blazor's scoped CSS appends the scope
    attribute to the LAST element of a selector, so `.higgins-body p` becomes `.higgins-body p[b-x]`
    - and the model's answer is rendered through MarkupString, so none of its elements carry that
    attribute. Every rule below that styles rendered Markdown would silently style nothing. ::deep
    fixes it one selector at a time and getting one wrong is invisible, so the whole file opts out.

    Link it from the host:
        <link rel="stylesheet" href="_content/Higgins.Harness.Ui/higgins-panel.css" />

    TOKENS ARE READ, NEVER DEFINED. Every var() below carries a fallback, so a host that has its own
    design tokens wins and a host that has none still gets a legible panel. That is what lets this
    drop into SplashTrackWebServer, which has a different palette and no --ink.
*/

.higgins { display: flex; flex-direction: column; width: 100%; min-height: 0; }

.higgins-head {
    display: flex;
    align-items: center;
    gap: var(--space-xs, .5rem);
    padding: var(--space-xs, .5rem) var(--space, 1em);
    border-bottom: var(--border-hairline, 1px solid #e3e7ec);
    flex-shrink: 0;
}

.higgins-title { font-family: var(--font-display, inherit); font-weight: 600; color: var(--ink, #1b2430); }

.higgins-scope {
    padding: .1em .5em;
    border-radius: var(--radius-pill, 999px);
    background: var(--primary-wash, #eef4fd);
    color: var(--science-blue, #1e52d2);
    font-size: .75em;
    font-weight: 600;
}

/* WHAT THIS CONVERSATION IS ABOUT. Outlined rather than filled, so it reads as a property of the
   conversation and not as a second view title. Truncates: a carrier and a client name will not fit
   beside the title in 400px. */
.higgins-about {
    min-width: 0;
    padding: .1em .5em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius-pill, 999px);
    color: var(--ink-muted, #5b6675);
    font-size: .75em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* SCOPE THE CONVERSATION KEEPS (record_scope). Quiet, one line under the header: it qualifies
   every answer below it, it is not a notice. */
.higgins-held {
    padding: .2em .75em;
    color: var(--ink-muted, #5b6675);
    font-size: .75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.higgins-thread-about {
    color: var(--ink-muted, #5b6675);
    font-size: .85em;
}

/* THE CONVERSATION IS ABOUT SOMETHING ELSE. A notice, not an error: nothing is wrong yet, the
   reader is being asked a question. */
.higgins-scope-change {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4em .6em;
    padding: .5em .8em;
    border-bottom: var(--border-hairline, 1px solid #e3e7ec);
    background: var(--sunshade-wash, #fff6e5);
    color: var(--ink, #1b2430);
    font-size: .8rem;
}

.higgins-scope-change-actions { display: inline-flex; gap: .4em; }

.higgins-scope-change-actions button {
    padding: .15em .7em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius-pill, 999px);
    background: var(--white, #fff);
    color: var(--ink, #1b2430);
    font: inherit;
    cursor: pointer;
}

.higgins-scope-change-actions .higgins-scope-change-continue {
    border-color: var(--science-blue, #1e52d2);
    color: var(--science-blue, #1e52d2);
}

.higgins-scope-change-keys { flex-basis: 100%; color: var(--ink-muted, #5b6675); font-size: .7rem; }

/* WHAT HIGGINS CAN SEE. Quieter than .higgins-scope on purpose: the scope chip names the view and
   these name the data, so they read as a caption under the title rather than as six more headings
   competing with it. They wrap, because a client name plus a person's name will not fit 400px. */
.higgins-context {
    display: flex;
    flex-wrap: wrap;
    gap: .3em;
    padding: .4em .8em .6em;
    border-bottom: var(--border-hairline, 1px solid #e3e7ec);
}

.higgins-chip {
    display: inline-flex;
    align-items: baseline;
    gap: .35em;
    max-width: 100%;
    padding: .1em .5em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius-pill, 999px);
    background: var(--black-haze, #f4f6f8);
    color: var(--ink, #1b2430);
    font-size: .7rem;
    line-height: 1.6;
    /* A long client name truncates rather than pushing the row wider than the panel. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The drop control. Deliberately quiet until the chip is hovered or focused: the chips are read
   far more often than they are corrected, and six visible crosses turn a status line into a form. */
.higgins-chip-drop {
    margin-left: .1em;
    padding: 0 .15em;
    border: 0;
    background: none;
    color: var(--ink-muted, #6b7684);
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .1s, color .1s;
}

.higgins-chip:hover .higgins-chip-drop,
.higgins-chip-drop:focus-visible {
    opacity: 1;
}

.higgins-chip-drop:hover,
.higgins-chip-drop:focus-visible { color: var(--radical-red, #e2355a); }

/* Touch has no hover, so the control is always there rather than unreachable. */
@media (hover: none) {
    .higgins-chip-drop { opacity: 1; }
}

.higgins-chip-label {
    color: var(--ink-muted, #6b7684);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .85em;
    letter-spacing: .02em;
}

.higgins-log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: var(--space, 1em);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm, .75rem);
}

/* ⛔ NOTHING IN THE LOG SHRINKS. The log is a scrolling flex column, and a flex child may shrink to
   its minimum height when the content overflows. A turn's minimum is its content, but the tool run
   has overflow: hidden, which makes its minimum zero - so under a long answer the "Ran 3 queries"
   header collapsed to its own border, a hairline under the question, and the reader could not see
   or open what was run (Mark, 2026-11-06). The log scrolls; its children keep their height. */
.higgins-log > * { flex-shrink: 0; }

/* WHICH DO YOU MEAN? The panel's own question, held before anything is sent. The screen's subject
   is the primary button: the placeholder says "Ask about what you are looking at". */
.higgins-which-actions { display: flex; flex-wrap: wrap; gap: .4em; margin-top: .5em; }

.higgins-which-actions button {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    padding: .35em .7em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    background: transparent;
    font: inherit;
    font-size: .875em;
    color: var(--ink-body, #38424f);
    cursor: pointer;
}

.higgins-which-actions .higgins-which-screen {
    background: var(--science-blue, #1e52d2);
    border-color: var(--science-blue, #1e52d2);
    color: var(--white, #fff);
}

.higgins-which-how { font-size: .8em; opacity: .8; }

.higgins-which-actions .higgins-which-cancel { flex-direction: row; align-self: center; border: 0; color: var(--ink-muted, #5b6675); }

.higgins-empty {
    color: var(--ink-muted, #6b7684);
    font-size: .875em;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs, .25rem);
}

/* Suggestions say what to ASK, never what to run: a suggestion that fires a tool is a button bar
   with extra steps, and it hides which tool ran behind a friendly label. */
.higgins-suggestion {
    text-align: left;
    padding: .4em .6em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    background: var(--black-haze, #f4f6f8);
    font: inherit;
    font-size: .95em;
    color: var(--ink-body, #38424f);
    cursor: pointer;
}

.higgins-suggestion:hover { background: var(--primary-wash, #eef4fd); border-color: var(--lightsky-blue, #b8d4f5); }

/* Quiet, and beside the spinner rather than under it: it is an escape hatch, not an action the
   reader is being invited to take. */
.higgins-stop {
    margin-left: .6em;
    padding: .1em .6em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius-pill, 999px);
    background: transparent;
    font: inherit;
    font-size: .85em;
    color: var(--ink-muted, var(--ink-body, #38424f));
    cursor: pointer;
}

.higgins-stop:hover { background: var(--primary-wash, #eef4fd); border-color: var(--lightsky-blue, #b8d4f5); }

/* The working, grouped. A run header reads as one activity rather than twenty entries, and the
   rows inside are one line each until asked to say more. */
.higgins-run {
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    overflow: hidden;
}

.higgins-run-head,
.higgins-run-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5em;
    width: 100%;
    text-align: left;
    padding: .4em .6em;
    border: 0;
    background: var(--black-haze, #f4f6f8);
    font: inherit;
    font-size: .9em;
    color: var(--ink-body, #38424f);
    cursor: pointer;
}

.higgins-run-head:hover,
.higgins-run-row-head:hover { background: var(--primary-wash, #eef4fd); }

.higgins-run-rows { display: flex; flex-direction: column; }

/* Hairlines BETWEEN rows only, so the run reads as one block rather than a stack of cards. */
.higgins-run-row + .higgins-run-row { border-top: var(--border-hairline, 1px solid #e3e7ec); }

.higgins-run-row-head { background: transparent; }

.higgins-run-row-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.higgins-run-row .higgins-trace,
.higgins-run-row .higgins-body { padding: 0 .6em .5em; }

.higgins-caret { flex-shrink: 0; color: var(--ink-muted, var(--ink-body, #38424f)); }

/* Earlier conversations. The toggle sits at the end of the header row, so it never competes with
   the scope chip for the reader's attention - history is a way back, not a status. */
.higgins-threads-toggle {
    margin-left: auto;
    padding: .1em .5em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius-pill, 999px);
    background: transparent;
    font: inherit;
    font-size: .8em;
    color: var(--ink-muted, var(--ink-body, #38424f));
    cursor: pointer;
}

.higgins-threads-toggle:hover { background: var(--primary-wash, #eef4fd); border-color: var(--lightsky-blue, #b8d4f5); }

.higgins-threads {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-xs, .5rem);
    border-bottom: var(--border-hairline, 1px solid #e3e7ec);
    max-height: 40vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.higgins-thread {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-xs, .5rem);
    text-align: left;
    padding: .35em .6em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    background: var(--black-haze, #f4f6f8);
    font: inherit;
    font-size: .9em;
    color: var(--ink-body, #38424f);
    cursor: pointer;
}

.higgins-thread:hover:not(:disabled) { background: var(--primary-wash, #eef4fd); border-color: var(--lightsky-blue, #b8d4f5); }

/* The open one is shown and disabled rather than hidden: a list that silently omits where you
   already are reads as a thread having gone missing. */
.higgins-thread.is-current { background: var(--primary-wash, #eef4fd); cursor: default; }

.higgins-thread-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.higgins-thread-when { flex-shrink: 0; font-size: .85em; color: var(--ink-muted, var(--ink-body, #38424f)); }

/* A conversation and its delete button side by side (2026-11-17). The conversation takes the room;
   the delete button and its confirmation keep their own width. */
.higgins-thread-row { display: flex; align-items: stretch; gap: 2px; }

.higgins-thread-row > .higgins-thread { flex: 1; min-width: 0; }

.higgins-thread-delete {
    flex-shrink: 0;
    padding: 0 .55em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    background: transparent;
    font: inherit;
    color: var(--ink-muted, #5b6675);
    cursor: pointer;
}

.higgins-thread-delete:hover { color: var(--destructive-strong, #c62546); border-color: var(--destructive-strong, #c62546); }

.higgins-thread-confirm {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: .35em;
    padding: 0 .4em;
    font-size: .85em;
    color: var(--ink-body, #38424f);
}

.higgins-notice-actions { display: flex; gap: .35em; margin-top: .5em; }

.higgins-thread-confirm-delete,
.higgins-thread-confirm-cancel {
    padding: .15em .6em;
    border-radius: var(--radius, 4px);
    font: inherit;
    cursor: pointer;
}

.higgins-thread-confirm-delete {
    border: 1px solid var(--destructive-strong, #c62546);
    background: var(--destructive-strong, #c62546);
    color: #fff;
}

.higgins-thread-confirm-cancel {
    border: var(--border-hairline, 1px solid #e3e7ec);
    background: transparent;
    color: var(--ink-body, #38424f);
}

/* Grows with what is typed, to five lines, then scrolls (Mark, 2026-11-10). field-sizing does
   this without script; where it is unsupported, HigginsPanel.razor.js sizes the box instead.
   ⚠️ Heights in em with box-sizing border-box, because the Ask button is held to exactly the one-line
   height below: one line is 1.4em of text, .9em of padding and 2px of border, and both elements
   are .875em so the same calc gives the same pixels. */
textarea.higgins-input {
    box-sizing: border-box;
    field-sizing: content;
    min-height: calc(2.3em + 2px);
    max-height: calc(7.9em + 2px);
    overflow-y: auto;
    resize: none;
    font: inherit;
    font-size: .875em;
    line-height: 1.4;
}

.higgins-row { font-size: .875em; }

.higgins-row.from-user {
    align-self: flex-end;
    max-width: 90%;
    padding: .45em .7em;
    border-radius: var(--radius, 4px);
    background: var(--primary-wash, #eef4fd);
}

/* The model's Markdown, once MarkdownText has rendered it.

   NO pre-wrap any more. It was right for plain text and is wrong for HTML: a rendered <p> already
   carries its own spacing, and pre-wrap made every source newline a visible blank line on top of
   it. Whitespace between block elements goes back to being whitespace. */
.higgins-body { line-height: 1.5; overflow-wrap: anywhere; }

.higgins-body > :first-child { margin-top: 0; }
.higgins-body > :last-child { margin-bottom: 0; }

.higgins-body p { margin: 0 0 .6em; }
.higgins-body h3, .higgins-body h4, .higgins-body h5, .higgins-body h6 {
    margin: .9em 0 .3em;
    font-size: 1em;
    font-weight: 700;
}

.higgins-body ul, .higgins-body ol { margin: 0 0 .6em; padding-left: 1.3em; }
.higgins-body li { margin: .15em 0; }

.higgins-body code {
    padding: .1em .3em;
    border-radius: 3px;
    background: var(--black-haze, #f4f6f8);
    font-size: .9em;
}

.higgins-body pre {
    margin: 0 0 .6em;
    padding: .5em .6em;
    border: 1px solid var(--border, #e3e7ec);
    border-radius: 4px;
    background: var(--black-haze, #f4f6f8);
    overflow-x: auto;
}

.higgins-body pre code { padding: 0; background: none; }

.higgins-body blockquote {
    margin: 0 0 .6em;
    padding-left: .7em;
    border-left: 2px solid var(--border, #e3e7ec);
    color: var(--ink-muted, #6b7684);
}

/* A table in a 400px column is the one thing that cannot be made to fit, so it scrolls on its own
   rather than pushing the panel wide. Now that the panel resizes, widening it is the other answer. */
.higgins-body table {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 0 0 .6em;
    border-collapse: collapse;
    overflow-x: auto;
    font-size: .9em;
}

.higgins-body th, .higgins-body td {
    padding: .25em .5em;
    border: 1px solid var(--border, #e3e7ec);
    text-align: left;
    vertical-align: top;
}

.higgins-body th { background: var(--black-haze, #f4f6f8); font-weight: 600; }

.higgins-body hr { margin: .8em 0; border: 0; border-top: 1px solid var(--border, #e3e7ec); }

.higgins-trace {
    display: flex;
    flex-direction: column;
    gap: .1em;
    margin-bottom: .3em;
    padding-left: .5em;
    border-left: 2px solid var(--border, #e3e7ec);
}

.higgins-trace-line {
    display: flex;
    align-items: center;
    gap: .3em;
    font-size: .8em;
    color: var(--ink-muted, #6b7684);
}

.higgins-trace-line.failed code { color: var(--destructive-strong, #c62546); }
.higgins-trace-error { color: var(--destructive-strong, #c62546); }

.higgins-verify {
    margin-top: .3em;
    font-size: .75em;
    color: var(--ink-muted, #6b7684);
    font-style: italic;
}

/* The passages an answer was given, under its verify line. Closed until asked for. */
.higgins-references { margin-top: .2em; font-style: normal; }
.higgins-references summary { cursor: pointer; }
.higgins-references ul { margin: .2em 0 0; padding-left: 1.2em; }
.higgins-reference-source { font-weight: 600; }

.higgins-thinking {
    display: flex;
    align-items: center;
    gap: .4em;
    font-size: .8125em;
    color: var(--ink-muted, #6b7684);
}

.higgins-activity {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.higgins-ask {
    display: flex;
    /* The button stays at the bottom as the box grows. */
    align-items: flex-end;
    gap: var(--space-2xs, .25rem);
    padding: var(--space-xs, .5rem) var(--space, 1em);
    border-top: var(--border-hairline, 1px solid #e3e7ec);
    flex-shrink: 0;
}

/* The box and its sparkles mark, anchored at the start of the first line. */
.higgins-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
}

/* In the wrapper's em, which is the box's em / .875: the box's .6em left padding is .525em here,
   and the icon is centered on the first line (1.225em tall here) below 1px of border and .394em
   of padding. */
.higgins-input-icon {
    position: absolute;
    left: .525em;
    top: calc(1px + .506em);
    width: 1em;
    height: 1em;
    pointer-events: none;
}

.higgins-input {
    flex: 1;
    min-width: 0;
    padding: .45em .6em .45em 2.1em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    font: inherit;
    font-size: .875em;
    background: var(--surface, #ffffff);
    color: var(--ink-body, #38424f);
}

/* The Ask button is exactly one line of the box tall: same font size, same calc. Selector
   specific enough to beat the button's own scoped .hg-button.small height. */
form.higgins-ask .hg-button.small {
    flex-shrink: 0;
    height: calc(2.3em + 2px);
    font-size: .875em;
}

/* ---- job tray ------------------------------------------------------------ */

.job-tray { position: relative; }

.job-tray-idle { color: rgba(255, 255, 255, .3); font-size: .8em; }

.job-tray-toggle {
    display: flex;
    align-items: center;
    gap: .25em;
    padding: .3em .5em;
    border: none;
    border-radius: var(--radius, 4px);
    background: rgba(255, 255, 255, .12);
    color: var(--white, #ffffff);
    font: inherit;
    font-size: .75em;
    cursor: pointer;
}

.job-tray-popover {
    position: absolute;
    bottom: 0;
    left: calc(100% + .5em);
    z-index: 930;
    width: 22em;
    max-height: 60vh;
    overflow-y: auto;
    padding: var(--space-xs, .5rem);
    background: var(--surface, #ffffff);
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    box-shadow: var(--shadow-modal, 0 8px 40px rgba(4, 24, 60, .18));
}

.job + .job {
    margin-top: var(--space-xs, .5rem);
    padding-top: var(--space-xs, .5rem);
    border-top: var(--border-hairline, 1px solid #e3e7ec);
}

.job-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2xs, .25rem); }
.job-number { font-size: .8em; }
.job-scope { margin: .2em 0 0; font-size: .8em; color: var(--ink, #1b2430); }
.job-reading { margin: .2em 0 0; font-size: .8em; color: var(--ink-muted, #6b7684); line-height: 1.4; }
.job-progress { margin: .2em 0 0; font-size: .75em; color: var(--ink-muted, #6b7684); }

/* ENDED JOBS stay until dismissed, drawn apart from running ones: a badge rather than a spinner on
   the toggle, a rule on the left, and the time it ended. */
.job-tray-ended {
    padding: 0 .35em;
    border-radius: var(--radius, 4px);
    background: rgba(255, 255, 255, .22);
    font-weight: 600;
}

.job-tray-heading {
    margin: 0 0 .25em;
    font-size: .7em;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-muted, #6b7684);
}

.job + .job-tray-heading { margin-top: var(--space-xs, .5rem); }

.job-ended { padding-left: .5em; border-left: 3px solid var(--border-strong, #c4ccd6); }
.job-ended-at { margin: .2em 0 0; font-size: .75em; color: var(--ink-muted, #6b7684); }

.job-dismiss,
.job-stop,
.job-answer {
    margin-top: .3em;
    padding: .15em .5em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    background: transparent;
    color: var(--ink, #1b2430);
    font: inherit;
    font-size: .75em;
    cursor: pointer;
}

.job-stop:disabled {
    opacity: .6;
    cursor: default;
}

/* WHAT THIS AGENT KEEPS ABOUT YOU (remember). Collapsed by default: it is there to check and
   prune, not to read every turn. */
.higgins-remembered {
    padding: .2em .75em;
    color: var(--ink-muted, #5b6675);
    font-size: .75rem;
}

.higgins-remembered ul {
    margin: .25em 0 0;
    padding: 0;
    list-style: none;
}

.higgins-remembered li {
    display: flex;
    align-items: baseline;
    gap: .4em;
}

.higgins-remembered-text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* PERSONALIZE: the user's own guide for this agent. The note under the box is the promise. */
.higgins-personalize {
    display: flex;
    flex-direction: column;
    gap: .35em;
    padding: var(--space-xs, .5rem) .75em;
    border-bottom: var(--border-hairline, 1px solid #e3e7ec);
    flex-shrink: 0;
}

.higgins-personalize-text {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: .85em;
    resize: vertical;
}

.higgins-personalize-note,
.higgins-personalize-message {
    margin: 0;
    font-size: .75rem;
    color: var(--ink-muted, #5b6675);
}

.higgins-personalize-message { color: var(--ink-body, #38424f); }

.higgins-personalize-actions { display: flex; gap: .4em; }

.higgins-personalize-save,
.higgins-personalize-clear {
    padding: .1em .7em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius-pill, 999px);
    background: transparent;
    font: inherit;
    font-size: .8em;
    cursor: pointer;
}

.higgins-personalize-save { background: var(--primary-wash, #eef4fd); }

/* WHAT A TURN SHOWS BESIDES TEXT (2026-11-09): tables, components, files. */
.higgins-table { margin: .5em 0 0; }

.higgins-table figcaption {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
    align-items: baseline;
    font-size: .8rem;
    margin-bottom: .25em;
}

.higgins-table-caption { font-weight: 600; }

.higgins-table-scroll {
    max-height: 22rem;
    overflow: auto;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius-sm, 4px);
}

.higgins-table table { border-collapse: collapse; width: 100%; font-size: .8rem; }

.higgins-table th {
    position: sticky;
    top: 0;
    background: var(--surface-raised, #f6f8fa);
    text-align: left;
    font-weight: 600;
}

.higgins-table th,
.higgins-table td {
    padding: .25em .5em;
    border-bottom: var(--border-hairline, 1px solid #e3e7ec);
    white-space: nowrap;
}

.higgins-table .higgins-num { text-align: right; font-variant-numeric: tabular-nums; }

.higgins-table-more,
.higgins-file-meta,
.higgins-component-fallback,
.higgins-unsupported {
    margin: .25em 0 0;
    font-size: .75rem;
    color: var(--ink-muted, #5b6675);
}

/* Composed by Higgins: visible, not alarming. A reader should notice it, not fear it. */
.higgins-composed {
    padding: 0 .4em;
    border-radius: var(--radius-pill, 999px);
    background: var(--warning-wash, #fff6e0);
    color: var(--ink-body, #38424f);
    font-size: .7rem;
}

.higgins-file {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
    align-items: baseline;
    margin-top: .5em;
    font-size: .85em;
}

.higgins-component { margin-top: .5em; }

/* SLASH COMMANDS (2026-11-13). The pinned skill sits beside the conversation's subject, the menu
   reuses the history menu's rows, and a notice is the panel speaking, not Higgins answering. */
.higgins-skill {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    min-width: 0;
    padding: .1em .2em .1em .5em;
    border: 1px solid var(--lightsky-blue, #b8d4f5);
    border-radius: var(--radius-pill, 999px);
    background: var(--primary-wash, #eef4fd);
    color: var(--ink-body, #38424f);
    font-size: .75em;
    white-space: nowrap;
}

.higgins-skill-clear,
.higgins-notice-close {
    border: 0;
    background: transparent;
    color: var(--ink-muted, #5b6675);
    cursor: pointer;
    font: inherit;
    line-height: 1;
    padding: 0 .3em;
}

.higgins-commands {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: .25em 0;
    border-top: var(--border-hairline, 1px solid #e3e7ec);
}

.higgins-notice { position: relative; }

.higgins-notice .higgins-body { color: var(--ink-muted, #5b6675); padding-right: 1.5em; }

.higgins-notice-close { position: absolute; top: .25em; right: .25em; }

.higgins-notice-choices { display: flex; flex-direction: column; gap: .3em; margin-top: .5em; }

.higgins-notice-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: .35em .7em;
    border: var(--border-hairline, 1px solid #e3e7ec);
    border-radius: var(--radius, 4px);
    background: transparent;
    font: inherit;
    font-size: .875em;
    text-align: left;
    color: var(--ink-body, #38424f);
    cursor: pointer;
}

.higgins-notice-choice:hover { background: var(--primary-wash, #eef4fd); border-color: var(--lightsky-blue, #b8d4f5); }

.higgins-notice-name { font-weight: 600; }

.higgins-notice-detail { font-size: .85em; color: var(--ink-muted, #5b6675); }

.higgins-notice-commands { margin: .4em 0 0; padding-left: 1.2em; font-size: .875em; }

.higgins-compaction {
    margin: .5em 0;
    padding: .4em 0;
    border-top: 1px dashed var(--lightsky-blue, #b8d4f5);
    border-bottom: 1px dashed var(--lightsky-blue, #b8d4f5);
    color: var(--ink-muted, #5b6675);
    font-size: .8em;
}

.higgins-compaction-summary summary { cursor: pointer; margin-top: .25em; }

.higgins-compaction-summary .higgins-body { margin-top: .3em; white-space: pre-wrap; }

/* WHAT A SUB-AGENT DID (0.37.0): a run, read-only, under the agent and job that ran it. */
.subagent-run {
    display: flex;
    flex-direction: column;
    gap: .5em;
    font-size: .875em;
}

.subagent-run-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .4em;
    color: var(--ink-muted, #6b7684);
}

.subagent-run-agent {
    font-weight: 600;
    color: var(--ink, #1b2430);
}

.subagent-run-calls {
    margin: .25em 0 0;
    padding-left: 1.1em;
    color: var(--ink-muted, #6b7684);
}

.subagent-run-calls .not-ran {
    color: var(--destructive, #b42318);
}
