/* Moonreign.Prospects: the prospect views' own rules, ported from the console stylesheet they
   were first written for. Every colour, font, size, space and radius is
   var(--prospects-<name>, <literal>), so with no --prospects-* variables set the pages look as
   they did there; a host sets the variables to restyle them. The building blocks the views share
   (.pr-page, .pr-panel, .pr-button, .pr-message, .pr-table ...) are in prospects-base.css: link it
   too unless the host aliases them to its own. Restyled 2026-10-01 to the console's Claude Design
   language: outlined chips with the current one filled blue-deep, grouped filter fieldsets, and
   stacked rows instead of narrow table columns. */
.pr-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--prospects-space-4, 16px);
}

.pr-brand {
    font-family: var(--prospects-font-display, Newsreader, Georgia, "Times New Roman", serif);
    font-size: var(--prospects-size-card, 23px);
    color: var(--prospects-ink, #17242C);
    text-decoration: none;
}

.pr-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* The host's nav around ProspectsNav's links (.pr-header, .pr-brand and .pr-nav are for the host
   layout to use): outlined links, the current page filled. */
.pr-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--prospects-border-card, #C6D1D8);
    background: var(--prospects-surface, #FFFFFF);
    color: var(--prospects-ink-soft, #42525E);
    font-family: var(--prospects-font-ui, "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
    font-size: var(--prospects-size-meta, 13px);
    text-decoration: none;
}

.pr-nav a:hover {
    border-color: var(--prospects-blue-gray, #44586B);
    color: var(--prospects-blue-deep, #2E3F4E);
}

.pr-nav a.active {
    border-color: var(--prospects-blue-deep, #2E3F4E);
    background: var(--prospects-blue-deep, #2E3F4E);
    color: var(--prospects-surface, #FFFFFF);
}

/* ---- Saved views: a segmented row of chips, the current view filled ---- */
.pf-views,
.pf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--prospects-space-3, 12px);
}

.pf-view {
    min-height: 38px;
    padding: 6px 14px;
    border: 1px solid var(--prospects-border-card, #C6D1D8);
    background: var(--prospects-surface, #FFFFFF);
    color: var(--prospects-ink-soft, #42525E);
    font-family: var(--prospects-font-ui, "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
    font-size: var(--prospects-size-meta, 13px);
    cursor: pointer;
}

.pf-view:hover {
    border-color: var(--prospects-blue-gray, #44586B);
    color: var(--prospects-blue-deep, #2E3F4E);
}

.pf-view[aria-pressed="true"],
.pf-tabs button[aria-pressed="true"] {
    border-color: var(--prospects-blue-deep, #2E3F4E);
    background: var(--prospects-blue-deep, #2E3F4E);
    color: var(--prospects-surface, #FFFFFF);
    font-weight: 600;
}

.pf-view:focus-visible {
    outline: 2px solid var(--prospects-teal, #11605F);
    outline-offset: 2px;
}

/* A row of controls and the buttons that act on them (customer sections, settings, replies,
   templates). Controls align on their bottom edge so a button lines up with the inputs. */
.pf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--prospects-space-2, 8px) var(--prospects-space-3, 12px);
    align-items: flex-end;
}

/* ---- Filter toolbar: a search row, then one fieldset per question ---- */
.pr-toolbar.pf-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: var(--prospects-space-3, 12px);
}

.pf-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--prospects-space-3, 12px);
}

.pf-filter-actions {
    display: flex;
    gap: var(--prospects-space-2, 8px);
    margin-left: auto;
}

.pf-filter-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: var(--prospects-space-3, 12px);
}

.pf-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--prospects-space-2, 8px) var(--prospects-space-3, 12px);
    min-width: 0;
    margin: 0;
    padding: var(--prospects-space-2, 8px) var(--prospects-space-3, 12px) var(--prospects-space-3, 12px);
    border: 1px solid var(--prospects-rule, #D6DEE3);
    background: var(--prospects-surface, #FFFFFF);
}

.pf-filter-group legend {
    padding: 0 var(--prospects-space-1, 4px);
    color: var(--prospects-blue-deep, #2E3F4E);
    font-size: var(--prospects-size-label, 11px);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* A label-over-control field. Grid with a shrinkable column: an implicit auto column sizes to
   the control's intrinsic width, and a <select> is as wide as its longest option. */
.pf-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--prospects-space-1, 4px);
    flex: 1 1 10rem;
    min-width: 0;
}

.pf-field > span {
    color: var(--prospects-blue-deep, #2E3F4E);
    font-size: var(--prospects-size-small, 12px);
    font-weight: 700;
}

.pf-field input,
.pf-field select,
.pf-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 2.6rem;
    padding: 0.4rem 0.6rem;
    border: 2px solid var(--prospects-rule, #D6DEE3);
    border-radius: var(--prospects-radius, 0);
    background: var(--prospects-surface, #FFFFFF);
    color: var(--prospects-ink, #17242C);
    box-sizing: border-box;
}

.pf-field input:focus,
.pf-field select:focus,
.pf-field textarea:focus {
    border-color: var(--prospects-teal, #11605F);
    outline: 0;
}

.pf-field-search { flex: 3 1 22rem; }
.pf-field-wide { flex: 2 1 14rem; }
.pf-field-narrow { flex: 0 1 6.5rem; }

.pf-checks {
    display: flex;
    flex-wrap: wrap;
    gap: var(--prospects-space-1, 4px) var(--prospects-space-3, 12px);
    min-height: 2.6rem;
    align-items: center;
}

.pf-check {
    display: inline-flex;
    align-items: center;
    gap: var(--prospects-space-1, 4px);
    min-height: 2.6rem;
    white-space: nowrap;
}

.pf-bulk,
.pf-pager {
    display: flex;
    flex-wrap: wrap;
    gap: var(--prospects-space-3, 12px);
    align-items: flex-end;
}

.pf-bulk {
    margin: var(--prospects-space-3, 12px) 0;
    padding: var(--prospects-space-3, 12px);
    border: 1px solid var(--prospects-rule, #D6DEE3);
    background: var(--prospects-surface-sunken, #EDF1F3);
}

.pf-bulk-schedule {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--prospects-rule, #D6DEE3);
    border-radius: var(--prospects-radius, 0);
}

.pf-bulk-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 0.75rem 0;
}

.pf-bulk-progress progress {
    flex: 1 1 12rem;
    max-width: 24rem;
    height: 0.75rem;
    accent-color: var(--prospects-teal, #11605F);
}

/* The list's filter toolbar sits in a fieldset only so one disabled attribute locks it while the
   list loads. It adds no box of its own: a fieldset's default min-inline-size is min-content,
   which would push the page wider than a phone. */
.pf-filter-lock {
    border: 0;
    padding: 0;
    margin: 0;
    min-inline-size: 0;
}

/* Disabled inputs look much like live ones, so the locked toolbar fades, after the same 200ms as the bar. */
.pf-filter-lock:disabled > .pf-filters {
    animation: pf-loading-dim 0s linear 200ms both;
}

@keyframes pf-loading-dim {
    from { opacity: 1; }
    to { opacity: 0.55; }
}

/* The list's loading bar. It stays hidden for the first 200ms, so a quick search does not flash it. */
.pf-loading {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin: 0.75rem 0;
    animation: pf-loading-show 0s linear 200ms both;
}

.pf-loading progress {
    flex: 1 1 12rem;
    max-width: 24rem;
    height: 0.75rem;
    accent-color: var(--prospects-teal, #11605F);
}

@keyframes pf-loading-show {
    from { visibility: hidden; }
    to { visibility: visible; }
}

.pf-bulk-preview-toggle {
    margin-top: 0.25rem;
}

.pf-bulk-schedule-title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

/* A 100-row preview scrolls inside the panel rather than pushing the list off screen. */
.pf-bulk-schedule-scroll {
    max-height: 28rem;
    overflow: auto;
    margin-bottom: 0.75rem;
}

.pf-pager {
    align-items: center;
    justify-content: flex-end;
    margin-top: var(--prospects-space-3, 12px);
}

/* Rows shown sits at the left; the page controls stay right-aligned after it. */
.pf-pager-showing {
    margin-right: auto;
    color: var(--prospects-muted, #5E7180);
}

.pf-pager-numbers {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--prospects-space-1, 4px);
}

.pf-pager-link,
.pf-pager-current,
.pf-pager-gap {
    min-width: 2.4rem;
    min-height: 2.4rem;
    padding: 0 var(--prospects-space-1, 4px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
}

.pf-pager-link {
    border: 1px solid var(--prospects-rule, #D6DEE3);
    background: var(--prospects-surface, #FFFFFF);
    color: inherit;
    cursor: pointer;
}

.pf-pager-link:hover {
    background: var(--prospects-surface-sunken, #EDF1F3);
}

.pf-pager-current {
    border: 1px solid currentColor;
    font-weight: 700;
}

/* ---- Data tables on platform pages: the Notifications table's header strip ---- */
/* On a phone the table scrolls inside its own box instead of widening the whole page. */
.pf-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.pr-page .pr-table {
    border: 1px solid var(--prospects-rule, #D6DEE3);
    background: var(--prospects-surface, #FFFFFF);
    font-size: var(--prospects-size-small, 12px);
}

.pr-page .pr-table th {
    padding: 10px 12px;
    background: var(--prospects-blue-deep, #2E3F4E);
    color: var(--prospects-surface, #FFFFFF);
    font-size: var(--prospects-size-label, 11px);
    font-weight: 600;
    letter-spacing: 0.1em;
}

.pr-page .pr-table td {
    padding: 10px 12px;
    border-top: 1px solid var(--prospects-rule-light, #E4EAEE);
    vertical-align: middle;
    overflow-wrap: normal;
}

/* Dates, counts and short labels stay on one line; the company name (and a host column that
   asks to wrap) is what wraps. The id keeps the rule above any cell's own class. */
#prospects-table td.pr-nowrap {
    white-space: nowrap;
}

/* Column headings are sort buttons that read as the heading text. */
.pr-page .pr-table th .pf-sort {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: inherit;
    cursor: pointer;
}

.pr-page .pr-table th .pf-sort:hover,
.pr-page .pr-table th .pf-sort[aria-pressed="true"] {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pr-page .pr-table th .pf-sort:focus-visible {
    outline: 2px solid var(--prospects-surface, #FFFFFF);
    outline-offset: 2px;
}

.pf-sort-arrow {
    margin-left: 4px;
    font-size: 0.8em;
}

.pr-page .pr-table tbody tr:nth-child(even) {
    background: var(--prospects-surface-alt, #FBFCFC);
}

/* ---- Company page ---- */
.pf-company-head {
    display: flex;
    flex-wrap: wrap;
    gap: var(--prospects-space-4, 16px);
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--prospects-space-3, 12px);
}

.pf-company-head > div:first-child {
    flex: 1 1 32rem;
    min-width: 0;
}

/* A company name is often 30+ characters in capitals: at the 72px page-title size with the
   global reading-measure max-width it broke onto four lines. Page size, full width. */
.pf-company-head h1 {
    max-width: none;
    margin-bottom: var(--prospects-space-2, 8px);
    font-size: var(--prospects-size-page, 36px);
    overflow-wrap: anywhere;
}

.pf-company-head .pr-page-intro {
    overflow-wrap: anywhere;
}

.pf-steps {
    display: flex;
    gap: var(--prospects-space-2, 8px);
}

/* Section links: one row under the header that stays at the top of the window while the long
   record scrolls, so any panel is one click away. Static on a phone, where it wraps to rows. */
.pf-jump {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: var(--prospects-space-1, 4px) var(--prospects-space-3, 12px);
    margin-bottom: var(--prospects-space-3, 12px);
    padding: 8px 12px;
    border: 1px solid var(--prospects-rule, #D6DEE3);
    background: var(--prospects-surface, #FFFFFF);
    font-size: var(--prospects-size-small, 12px);
}

.pf-jump a {
    color: var(--prospects-blue-deep, #2E3F4E);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.pf-jump a:hover,
.pf-jump a:focus-visible {
    text-decoration: underline;
}

.pf-jump .pf-count {
    background: var(--prospects-surface-alt, #FBFCFC);
}

/* A jumped-to panel lands below the sticky section links, not under them. */
.pf-anchor {
    scroll-margin-top: 4.5rem;
}

@media (max-width: 700px) {
    .pf-jump {
        position: static;
    }

    .pf-anchor {
        scroll-margin-top: var(--prospects-space-2, 8px);
    }
}

/* A panel head with a Show all / Show fewer button on the right. */
.pf-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--prospects-space-2, 8px);
    padding-right: 12px;
    border-bottom: 1px solid var(--prospects-rule, #D6DEE3);
}

.pf-panel-head > .pr-panel-head {
    flex: 1 1 auto;
    margin: 0;
    border-bottom: 0;
}

.pf-panel-head > .pr-button-small {
    flex: 0 0 auto;
}

/* "Show N more" under a folded list: a link-styled button. */
.pf-more {
    justify-self: start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--prospects-blue-deep, #2E3F4E);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.pf-timeline-contact {
    color: var(--prospects-muted, #5E7180);
}

.pr-toolbar.pf-company-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
    align-items: stretch;
    gap: var(--prospects-space-3, 12px);
}

/* Record on the left (facts, properties, contacts, timeline, notes), the things you do to it on
   the right. Two columns, not three: the third column left each table about 400px. */
.pf-company {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: var(--prospects-space-4, 16px);
    align-items: start;
}

@media (max-width: 1100px) {
    .pf-company {
        grid-template-columns: minmax(0, 1fr);
    }
}

.pf-company .pr-panel {
    min-width: 0;
}

.pf-count {
    margin-left: var(--prospects-space-1, 4px);
    padding: 0 6px;
    background: var(--prospects-surface, #FFFFFF);
    color: var(--prospects-blue-deep, #2E3F4E);
    font-size: var(--prospects-size-label, 11px);
    letter-spacing: 0;
}

.pf-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
    gap: var(--prospects-space-2, 8px) var(--prospects-space-3, 12px);
    margin: 0;
}

@media (max-width: 700px) {
    .pf-facts {
        grid-template-columns: max-content minmax(0, 1fr);
    }
}

.pf-facts dt {
    color: var(--prospects-muted, #5E7180);
}

.pf-facts dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* The evidence snippet is a sentence plus a URL: a row of its own, full width. */
.pf-facts .pf-facts-wide {
    grid-column: 1 / -1;
}

.pf-facts dt.pf-facts-wide {
    margin-top: var(--prospects-space-1, 4px);
    padding-top: var(--prospects-space-2, 8px);
    border-top: 1px solid var(--prospects-rule-light, #E4EAEE);
}

.pf-evidence {
    padding: var(--prospects-space-2, 8px) var(--prospects-space-3, 12px);
    border-left: 3px solid var(--prospects-blue-gray, #44586B);
    background: var(--prospects-surface-alt, #FBFCFC);
}

.pf-evidence a {
    overflow-wrap: anywhere;
}

/* Stacked rows: a title line, a muted meta line under it, actions on the right. Used where a
   table's columns made every cell wrap. */
.pf-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--prospects-rule, #D6DEE3);
}

.pf-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--prospects-space-2, 8px) var(--prospects-space-3, 12px);
    padding: 10px 12px;
}

.pf-row + .pf-row {
    border-top: 1px solid var(--prospects-rule-light, #E4EAEE);
}

.pf-row:nth-child(even) {
    background: var(--prospects-surface-alt, #FBFCFC);
}

.pf-row-main {
    display: grid;
    gap: 2px;
    flex: 1 1 18rem;
    min-width: 0;
}

.pf-row-title {
    color: var(--prospects-ink, #17242C);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pf-row-meta {
    color: var(--prospects-muted, #5E7180);
    font-size: var(--prospects-size-small, 12px);
    overflow-wrap: anywhere;
}

.pf-row-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--prospects-space-2, 8px);
}

.pf-rows .pf-row-actions select {
    width: auto;
    min-height: 38px;
    padding: 0.3rem 0.5rem;
    border: 2px solid var(--prospects-rule, #D6DEE3);
    border-radius: var(--prospects-radius, 0);
    background: var(--prospects-surface, #FFFFFF);
}

/* The list's Email first / Call first cells: the address or number, then the person in a quieter tone. */
.pf-first-contact {
    min-width: 10rem; /* room for the person line to wrap, not a fixed 14rem: a phone number is ~8rem */
}

.pf-first-value {
    white-space: nowrap;
}

/* The person goes on its own line and may wrap, so the column is as wide as the address, not the
   address plus a long name and title (owner CR 2026-10-14). The dot only joins them in plain text. */
.pf-first-person {
    display: block;
    color: var(--prospects-ink-muted, var(--prospects-blue-deep, #2E3F4E));
    font-size: var(--prospects-size-label, 11px);
}

.pf-first-sep {
    display: none;
}

/* A host's line under the company name, small and wrapping. */
.pf-company-cell {
    min-width: 10rem;
}

.pf-under-name {
    display: block;
    color: var(--prospects-muted, #5E7180);
    font-size: var(--prospects-size-label, 11px);
}

/* A host cell drawn as an icon; the text is its tooltip. position: relative keeps the visually
   hidden text inside the table's scroll box (see .pf-activity-strip li). */
.pf-cell-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--prospects-radius, 0);
    color: var(--pf-tone-ink);
    background: var(--pf-tone-bg);
    --pf-tone-ink: var(--prospects-muted, #5E7180);
    --pf-tone-bg: var(--prospects-surface-sunken, #EDF1F3);
}

.pf-cell-icon[data-tone="engaged"] { --pf-tone-ink: var(--prospects-teal-dark, #0B4544); --pf-tone-bg: var(--prospects-teal-pale, #DDEAE9); }
.pf-cell-icon[data-tone="replied"] { --pf-tone-ink: var(--prospects-blue-deep, #2E3F4E); --pf-tone-bg: var(--prospects-teal-tint, #CFE0DF); }
.pf-cell-icon[data-tone="waiting"] { --pf-tone-ink: var(--prospects-warn-ink, #7A5500); --pf-tone-bg: var(--prospects-warn-bg, #F5EDDC); }
.pf-cell-icon[data-tone="stopped"] { --pf-tone-ink: var(--prospects-danger-ink, #8C2F1E); --pf-tone-bg: var(--prospects-danger-bg, #F7E6E2); }

/* The scrollbar above the list (owner CR 2026-10-14). prospects.js sizes the inner div to the
   table's width and keeps both bars in step; it hides the bar when the table fits. */
.pf-scroll-top {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.pf-scroll-top > div {
    height: 1px;
}

.pf-scroll-top[hidden] {
    display: none;
}

.pf-badge {
    display: inline-block;
    margin-left: var(--prospects-space-2, 8px);
    padding: 0 6px;
    border: 1px solid var(--prospects-teal-dark, #0B4544);
    color: var(--prospects-teal-dark, #0B4544);
    font-size: var(--prospects-size-label, 11px);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}

.pf-chip {
    display: inline-block;
    margin-right: 4px;
    padding: 0 5px;
    border: 1px solid var(--prospects-teal-dark, #0B4544);
    color: var(--prospects-teal-dark, #0B4544);
    font-size: var(--prospects-size-label, 11px);
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
}

.pf-chip-struck {
    text-decoration: line-through;
    opacity: 0.6;
}

.pf-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: var(--prospects-space-2, 8px) var(--prospects-space-3, 12px);
    align-items: end;
}

.pf-span-all {
    grid-column: 1 / -1;
}

.pf-disclosure {
    border: 1px solid var(--prospects-rule, #D6DEE3);
    background: var(--prospects-surface-sunken, #EDF1F3);
}

.pf-disclosure > summary {
    padding: 10px 12px;
    color: var(--prospects-blue-deep, #2E3F4E);
    font-weight: 600;
    cursor: pointer;
}

.pf-disclosure > .pf-form-grid {
    padding: 0 12px 12px;
}

.pf-button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--prospects-space-2, 8px);
}

/* A status message in a button row takes its own full-width line and breaks a long address
   instead of pushing the page wider than a phone (375px, 2026-10-06). */
.pf-button-row > .pr-message {
    flex: 1 1 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    overflow-wrap: anywhere;
}

.pf-schedule-panel {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--prospects-border-card, #C6D1D8);
    border-radius: var(--prospects-radius, 0);
}

/* The radio and its words on one line. Scoped under .pf-stack so it outranks
   ".pf-stack label { display: grid }", which would stack them and stretch the radio. */
.pf-stack label.pf-schedule-choice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pf-schedule-choice input {
    width: auto;
    flex: none;
}

/* A select and the button that acts on it, on one line; the button drops under it when the
   panel is too narrow for both. */
.pf-inline-field {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--prospects-space-2, 8px);
}

.pf-inline-field > .pf-field {
    flex: 1 1 14rem;
}

.pf-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pf-timeline li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: var(--prospects-space-2, 8px);
    align-items: start;
    border-top: 1px solid var(--prospects-rule, #D6DEE3);
    padding: var(--prospects-space-2, 8px) 0;
    overflow-wrap: anywhere;
    --pf-tone-ink: var(--prospects-muted, #5E7180);
    --pf-tone-bg: var(--prospects-surface-sunken, #EDF1F3);
}

/* Owner CR 2026-10-05: colour says who acted. Teal = the prospect opened or clicked. */
.pf-timeline li[data-tone="engaged"],
.pf-activity-table [data-tone="engaged"],
.pf-response-count[data-tone="engaged"],
.pf-activity-legend .pf-activity-chip[data-tone="engaged"] { --pf-tone-ink: var(--prospects-teal-dark, #0B4544); --pf-tone-bg: var(--prospects-teal-pale, #DDEAE9); }
.pf-timeline li[data-tone="replied"],
.pf-activity-table [data-tone="replied"],
.pf-response-count[data-tone="replied"],
.pf-activity-legend .pf-activity-chip[data-tone="replied"] { --pf-tone-ink: var(--prospects-blue-deep, #2E3F4E); --pf-tone-bg: var(--prospects-teal-tint, #CFE0DF); }
.pf-timeline li[data-tone="waiting"],
.pf-activity-table [data-tone="waiting"],
.pf-activity-legend .pf-activity-chip[data-tone="waiting"] { --pf-tone-ink: var(--prospects-warn-ink, #7A5500); --pf-tone-bg: var(--prospects-warn-bg, #F5EDDC); }
.pf-timeline li[data-tone="stopped"],
.pf-activity-table [data-tone="stopped"],
.pf-activity-legend .pf-activity-chip[data-tone="stopped"] { --pf-tone-ink: var(--prospects-danger-ink, #8C2F1E); --pf-tone-bg: var(--prospects-danger-bg, #F7E6E2); }

/* ---- Mail: the activity table (owner CR 2026-10-14) ---- */
/* One row per company; the strip is its timeline as marks in the timeline's tone colours, oldest
   left. The row's left edge carries its overall tone: red stopped, blue replied, teal engaged. */
.pf-activity-table,
.pf-activity-legend li {
    --pf-tone-ink: var(--prospects-muted, #5E7180);
    --pf-tone-bg: var(--prospects-surface-sunken, #EDF1F3);
}

.pf-activity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--prospects-space-2, 8px) var(--prospects-space-4, 16px);
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--prospects-muted, #5E7180);
    font-size: var(--prospects-size-small, 12px);
}

.pf-activity-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pf-activity-legend .pf-timeline-icon,
.pf-activity-strip .pf-timeline-icon {
    width: 24px;
    height: 24px;
}

/* The key doubles as the filter: each entry is a toggle chip in its tone. Unpressed it is an outline;
   pressed it is filled with the tone's background. */
.pf-activity-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    margin: 0;
    padding: 2px 10px 2px 2px;
    border: 1px solid var(--prospects-border-card, #C6D1D8);
    background: transparent;
    color: var(--prospects-muted, #5E7180);
    font: inherit;
    text-align: left;
    cursor: pointer;
    --pf-tone-ink: var(--prospects-muted, #5E7180);
    --pf-tone-bg: var(--prospects-surface-sunken, #EDF1F3);
}

.pf-activity-chip:hover {
    border-color: var(--pf-tone-ink);
    color: var(--pf-tone-ink);
}

.pf-activity-chip[aria-pressed="true"] {
    border-color: var(--pf-tone-ink);
    background: var(--pf-tone-bg);
    color: var(--pf-tone-ink);
    font-weight: 600;
}

.pf-activity-chip:focus-visible {
    outline: 2px solid var(--prospects-teal, #11605F);
    outline-offset: 2px;
}

.pf-activity-chip:disabled {
    cursor: default;
    opacity: 0.6;
}

/* The grid's Email response cell: four small counts, each with its icon. position: relative on each
   keeps its visually hidden words inside the table's scroll box (the 0.4.0 lesson: a hidden span
   placed against an ancestor outside it widens a 375px page). */
.pf-response {
    --pf-tone-ink: var(--prospects-muted, #5E7180);
    --pf-tone-bg: var(--prospects-surface-sunken, #EDF1F3);
}

.pf-response-count {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-right: var(--prospects-space-2, 8px);
    font-variant-numeric: tabular-nums;
}

.pf-response-count[data-tone] {
    color: var(--pf-tone-ink);
    font-weight: 700;
}

.pf-response-icon {
    display: inline-flex;
}

.pf-response-count.pf-activity-zero {
    opacity: 0.55;
}

.pf-activity-table tbody tr {
    border-left: 3px solid transparent;
}

.pf-activity-table tbody tr[data-tone="engaged"],
.pf-activity-table tbody tr[data-tone="replied"],
.pf-activity-table tbody tr[data-tone="stopped"] {
    border-left-color: var(--pf-tone-ink);
}

/* A plain mark keeps the grey even inside a coloured row (the row's tone would otherwise inherit). */
.pf-activity-strip li {
    --pf-tone-ink: var(--prospects-muted, #5E7180);
    --pf-tone-bg: var(--prospects-surface-sunken, #EDF1F3);
}

.pf-activity-table td.pf-activity-company {
    min-width: 12rem;
    font-weight: 600;
}

.pf-activity-table td.pf-activity-nowrap {
    white-space: nowrap;
}

.pf-activity-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    min-width: 14rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* position: relative keeps each mark's visually hidden label inside the table's scroll box: absolutely
   placed against an ancestor outside it, the labels of a scrolled-off column widened a 375px page to 492px. */
.pf-activity-strip li {
    position: relative;
    display: inline-flex;
}

.pf-activity-strip li .pf-timeline-icon {
    color: var(--pf-tone-ink);
    background: var(--pf-tone-bg);
}

.pf-activity-earlier {
    align-items: center;
    padding: 0 4px;
    color: var(--prospects-muted, #5E7180);
    font-size: var(--prospects-size-small, 12px);
}

.pf-activity-table td.pf-activity-count {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pf-activity-table td.pf-activity-count[data-tone] {
    color: var(--pf-tone-ink);
    background: var(--pf-tone-bg);
    font-weight: 700;
}

.pf-activity-zero,
.pf-activity-outcome {
    color: var(--prospects-muted, #5E7180);
    font-weight: 400;
}

.pf-activity-table td time {
    display: block;
    color: var(--prospects-muted, #5E7180);
}

/* The Conversations / Activity switch is a pair of links; the current one reads as pressed. */
a.pf-view {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.pf-view[aria-current="page"] {
    border-color: var(--prospects-blue-deep, #2E3F4E);
    background: var(--prospects-blue-deep, #2E3F4E);
    color: var(--prospects-surface, #FFFFFF);
    font-weight: 600;
}

.pf-timeline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--prospects-radius, 0); /* console chrome is flat: 50% is reserved for the feedback discs */
    color: var(--pf-tone-ink);
    background: var(--pf-tone-bg);
}

.pf-timeline li.pf-timeline-engaged {
    background: var(--prospects-teal-wash, #F4F8F7);
    border-left: 3px solid var(--prospects-teal, #11605F);
    padding-left: var(--prospects-space-2, 8px);
    padding-right: var(--prospects-space-2, 8px);
}

.pf-timeline-engaged .pf-timeline-head > strong:first-child {
    color: var(--prospects-teal-dark, #0B4544);
}

.pf-timeline-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--prospects-space-2, 8px);
    align-items: baseline;
}

.pf-timeline-who {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--prospects-ink, #17242C);
}

.pf-timeline-body > .pr-button {
    margin-left: var(--prospects-space-2, 8px);
}

.pf-timeline-subject {
    color: var(--prospects-muted, #5E7180);
}

.pf-timeline time {
    display: block;
    color: var(--prospects-muted, #5E7180);
    font-size: var(--prospects-size-small, 12px);
}

.pf-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: var(--prospects-space-3, 12px);
    margin-bottom: var(--prospects-space-4, 16px);
}

.pf-tile {
    border: 1px solid var(--prospects-border-card, #C6D1D8);
    border-top: 3px solid var(--prospects-blue-deep, #2E3F4E);
    background: var(--prospects-surface, #FFFFFF);
    padding: var(--prospects-space-3, 12px);
}

.pf-tile strong {
    display: block;
    font-size: var(--prospects-size-section, 28px);
    color: var(--prospects-ink, #17242C);
}

.pf-tile span {
    color: var(--prospects-muted, #5E7180);
    font-size: var(--prospects-size-small, 12px);
}

.pf-notice {
    border-left: 3px solid var(--prospects-warn-border, #E0C98A);
    background: var(--prospects-warn-bg-soft, #FBF6E9);
    color: var(--prospects-warn-ink, #7A5500);
    padding: var(--prospects-space-2, 8px) var(--prospects-space-3, 12px);
}

.pf-stack {
    display: grid;
    /* One column that can shrink: an implicit auto column sizes to its widest child, and a
       child such as the branding preview would widen the whole page instead of scrolling. */
    grid-template-columns: minmax(0, 1fr);
    gap: var(--prospects-space-3, 12px);
}

/* Same reason one level down: a label is a grid too, and its control (a <select> sized to its
   longest option, an email address in the compose "To" list) must shrink to the panel. */
.pf-stack label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--prospects-space-1, 4px);
    min-width: 0;
}

/* A form field in a full-width panel (customer sections, settings, templates) stops at a
   readable width instead of running 1500px across a wide screen. */
.pr-page .pr-panel-body.pf-stack > label,
.pr-page .pr-panel-body.pf-stack > .pf-inline-field {
    max-width: 48rem;
}

/* A checkbox and its words sit side by side, not stacked as two grid rows. */
.pf-stack label.pf-check,
.pf-stack label:has(> input[type="checkbox"]),
.pf-filters label:has(> input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    gap: var(--prospects-space-1, 4px);
    justify-self: start;
}

.pf-stack label > span:first-child {
    color: var(--prospects-blue-deep, #2E3F4E);
    font-size: var(--prospects-size-small, 12px);
    font-weight: 700;
}

.pf-stack input:not([type="checkbox"]):not([type="radio"]),
.pf-stack select,
.pf-stack textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ruling (progress.md, Tasks 15-17): an inbound/outbound email body is untrusted HTML and is
   never rendered with (MarkupString) — it goes in a sandboxed, scriptless iframe instead
   (sandbox="" blocks scripts, forms, navigation and same-origin). This is that frame's only
   styling: a fixed-height scrollable box, no radius or shadow, so it reads as a plain document
   pane rather than a card. */
.pf-email-frame {
    width: 100%;
    height: 16rem;
    border: 1px solid var(--prospects-rule, #D6DEE3);
}

/* A compose or reply preview is the whole framed email (band, body, signature, footer), so it gets the room to show it. */
#compose-preview {
    height: 44rem;
}

.pf-email-frame[id^="reply-preview-"],
#mail-reply-preview {
    height: 22rem;
}

/* With Plain text emails on, the preview is the text itself: kept as typed (new lines and all),
   wrapped to the pane, and only as tall as the text. */
.pf-plain-preview,
#compose-preview.pf-plain-preview {
    height: auto;
    max-height: 44rem;
    overflow: auto;
    margin: 0;
    padding: var(--prospects-space-3, 12px);
    border: 1px solid var(--prospects-rule, #D6DEE3);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 24px;
}

/* The mail view: conversation list on the left, the open conversation on the right. */
.pf-mail {
    display: grid;
    grid-template-columns: minmax(18rem, 26rem) minmax(0, 1fr);
    gap: var(--prospects-space-4, 16px);
    align-items: start;
}

.pf-mail .pr-panel {
    min-width: 0;
}

.pf-mail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--prospects-rule-light, #E4EAEE);
}

.pf-mail-list li {
    border-bottom: 1px solid var(--prospects-rule-light, #E4EAEE);
}

.pf-mail-row {
    display: grid;
    gap: 2px;
    padding: var(--prospects-space-2, 8px) var(--prospects-space-1, 4px);
    border-left: 3px solid transparent;
    color: inherit;
    text-decoration: none;
}

.pf-mail-row:hover {
    background: var(--prospects-surface, #FFFFFF);
}

.pf-mail-row[aria-current="true"] {
    border-left-color: var(--prospects-blue-deep, #2E3F4E);
    background: var(--prospects-surface, #FFFFFF);
}

.pf-mail-row:focus-visible {
    outline: 2px solid var(--prospects-teal, #11605F);
    outline-offset: -2px;
}

.pf-mail-row-top {
    display: flex;
    align-items: center;
    gap: var(--prospects-space-1, 4px);
    min-width: 0;
}

.pf-mail-who {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.pf-mail-row time,
.pf-mail-meta,
.pf-mail-count {
    color: var(--prospects-muted, #5E7180);
    font-size: var(--prospects-size-label, 11px);
}

.pf-mail-row time {
    flex: none;
}

.pf-mail-subject {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-mail-dot {
    flex: none;
    width: 8px;
    height: 8px;
    background: var(--prospects-teal, #11605F);
}

.pf-mail-title {
    margin: 0;
    overflow-wrap: anywhere;
}

.pf-mail-message {
    display: grid;
    gap: var(--prospects-space-2, 8px);
    padding-top: var(--prospects-space-3, 12px);
    border-top: 1px solid var(--prospects-rule-light, #E4EAEE);
}

.pf-mail-message-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--prospects-space-1, 4px);
    margin: 0;
}

.pf-mail-out .pf-mail-message-head strong {
    color: var(--prospects-blue-deep, #2E3F4E);
}

.pf-mail-chip {
    padding: 0 6px;
    border: 1px solid var(--prospects-border-card, #C6D1D8);
    font-size: var(--prospects-size-label, 11px);
}

.pf-mail-chip-waiting {
    border-color: var(--prospects-teal, #11605F);
}

/* The way back to the list only matters where the list is hidden. */
.pf-mail-back {
    display: none;
}

@media (max-width: 900px) {
    .pf-mail {
        grid-template-columns: minmax(0, 1fr);
    }

    .pf-mail-open .pf-mail-list-panel {
        display: none;
    }

    .pf-mail-back {
        display: inline;
    }
}

/* Owner CR 2026-10-26: an email still scheduled must not read as sent. Its Outreach mark carries the
   envelope-with-clock icon and a dashed border; position: relative keeps its hidden word inside the
   table's scroll box. The lines under the marks name the template that went last and the one scheduled. */
.pf-chip-scheduled {
    position: relative;
    border-style: dashed;
}

.pf-chip-icon svg {
    width: 11px;
    height: 11px;
    margin-right: 2px;
    vertical-align: -1px;
}

.pf-outreach-line {
    display: block;
    min-width: 9rem;
    max-width: 16rem;
    margin-top: 2px;
    color: var(--prospects-muted, #5E7180);
    font-size: var(--prospects-size-label, 11px);
    line-height: 1.3;
}

.pf-outreach-scheduled {
    color: var(--prospects-teal-dark, #0B4544);
    font-weight: 700;
}

.pf-muted {
    color: var(--prospects-muted, #5E7180);
}
