:root {
    --ink: #17211d;
    --muted: #66716c;
    --paper: #f4f6f2;
    --surface: #ffffff;
    --line: #dce2dc;
    --teal: #176b5b;
    --teal-dark: #0f5145;
    --coral: #d95d45;
    --coral-soft: #fff0ec;
    --gold: #d9a441;
    --sidebar: #15221d;
    --sidebar-muted: #9bada5;
    --radius: 6px;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
}

a {
    color: var(--teal);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 16px;
    background: var(--sidebar);
    color: white;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px;
    color: white;
    font: 700 18px Georgia, serif;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--gold);
    color: var(--sidebar);
    border-radius: 4px;
    font: 800 12px "Avenir Next", sans-serif;
}

.primary-nav {
    margin-top: 42px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    color: var(--sidebar-muted);
    border-radius: var(--radius);
    font-size: 14px;
}

.nav-link.active {
    background: #263730;
    color: white;
}

.nav-icon {
    width: 20px;
    text-align: center;
    color: #7bc5b4;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 4px 0;
    border-top: 1px solid #30413a;
    display: grid;
    grid-template-columns: 36px 1fr 32px;
    align-items: center;
    gap: 9px;
}

.avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #d9ebe5;
    color: var(--teal-dark);
    font-weight: 800;
    text-transform: uppercase;
}

.avatar.small {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.avatar.large {
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    font-size: 20px;
}

.user-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.user-meta strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta span {
    color: var(--sidebar-muted);
    font-size: 11px;
}

/* A reader's role: they see everything and change nothing. */
.user-meta .read-only-badge {
    align-self: flex-start;
    margin-top: 2px;
    padding: 0 6px;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    color: var(--gold);
}

.icon-button {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--sidebar-muted);
    cursor: pointer;
    font-size: 18px;
}

.main-content {
    width: min(1180px, 100%);
    min-width: 0;
    padding: 42px clamp(24px, 5vw, 72px) 72px;
}

.page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font: 700 clamp(32px, 4vw, 48px)/1.05 Georgia, serif;
    letter-spacing: 0;
}

h2 {
    font: 700 19px/1.2 Georgia, serif;
}

h3 {
    margin-bottom: 4px;
    font-size: 17px;
}

.today,
.subtitle {
    color: var(--muted);
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 160px));
    margin-bottom: 42px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.summary-strip div {
    padding: 16px 22px 16px 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.summary-strip div+div {
    padding-left: 22px;
    border-left: 1px solid var(--line);
}

.summary-strip strong {
    font: 700 26px Georgia, serif;
}

.summary-strip span {
    color: var(--muted);
    font-size: 12px;
}

.summary-strip .danger strong {
    color: var(--coral);
}

.section-heading {
    min-height: 32px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
}

.section-heading h2 {
    margin: 0;
}

.section-heading span {
    color: var(--muted);
    font-size: 12px;
}

.queue-filters {
    display: flex;
    align-items: end;
    gap: 12px;
    margin: -18px 0 30px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.queue-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.queue-filters input,
.queue-filters select {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #bdc7c1;
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.search-field {
    flex: 1;
    min-width: 180px;
}

.search-field input {
    width: 100%;
}

.secondary-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    background: transparent;
    color: var(--teal-dark);
    cursor: pointer;
    font-weight: 800;
}

.secondary-button:hover {
    background: #e5f1ed;
}

.secondary-button.full {
    width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pipeline-filters {
    margin-top: -18px;
}

.table-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    border-top: 1px solid var(--ink);
}

.pipeline-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    font-size: 12px;
}

.pipeline-table th {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    text-align: left;
    text-transform: uppercase;
}

.pipeline-table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.pipeline-table tbody tr:hover {
    background: rgba(255, 255, 255, .7);
}

.pipeline-table tr.needs-attention {
    border-left: 3px solid var(--coral);
}

.pipeline-table td strong,
.pipeline-table td span,
.pipeline-table td time {
    display: block;
}

.pipeline-table td span,
.pipeline-table td time {
    margin-top: 3px;
    color: var(--muted);
}

.stage-chip {
    width: max-content;
    margin: 0 0 5px;
    padding: 3px 7px;
    border-radius: 3px;
    background: #e4ece8;
    color: var(--teal-dark) !important;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.stage-chip.stage-won {
    background: #dcefe6;
    color: #236447 !important;
}

.stage-chip.stage-outreach,
.stage-chip.stage-lead,
.stage-chip.stage-renewal {
    background: #f5e8d7;
    color: #76501f !important;
}

.stage-chip.stage-engaged,
.stage-chip.stage-contacted,
.stage-chip.stage-interested {
    background: #dcecf2;
    color: #24566b !important;
}

.stage-chip.stage-meeting,
.stage-chip.stage-demo {
    background: #e6e2f2;
    color: #554579 !important;
}

.stage-chip.stage-decision {
    background: #f2e4dc;
    color: #7b4c36 !important;
}

.stage-chip.stage-commercial,
.stage-chip.stage-proposal {
    background: #e1e8f2;
    color: #3b5577 !important;
}

.stage-chip.stage-payment,
.stage-chip.stage-invoiced {
    background: #f3ebd2;
    color: #69561d !important;
}

.stage-chip.stage-deferred,
.stage-chip.stage-not_now {
    background: #e7e8e5;
    color: #555d58 !important;
}

.stage-chip.stage-lost,
.stage-chip.stage-do_not_contact {
    background: #eee5e2;
    color: #845045 !important;
}

.attention-text {
    color: var(--coral) !important;
    font-weight: 800;
}

/* Computed warnings (sales.queries): register chips and the opportunity panel. */
.register-filters {
    flex-wrap: wrap;
}

.pipeline-table .numeric {
    text-align: right;
    white-space: nowrap;
}

.warning-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.warning-chip {
    padding: 3px 7px;
    border-radius: 3px;
    background: var(--coral-soft);
    color: #9a3a27;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.warning-panel {
    margin: 0 0 28px;
    padding: 14px 16px;
    border-left: 3px solid var(--coral);
    background: var(--coral-soft);
}

.warning-panel h2 {
    margin: 0 0 8px;
    font-size: 14px;
}

.warning-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.warning-item strong {
    color: #9a3a27;
}

.warning-item span {
    display: block;
    color: var(--muted);
}

.table-link {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: 16px;
}

.table-empty {
    height: 180px;
    color: var(--muted);
    text-align: center;
}

.exception-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
}

.exception-grid>section {
    min-width: 0;
}

.effects-section {
    grid-column: 1 / -1;
}

.exception-row {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.exception-row>div {
    min-width: 0;
}

.exception-row span,
.exception-row p {
    display: block;
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.exception-row form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exception-row input {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #bdc7c1;
    border-radius: 4px;
}

.flow-summary {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin-bottom: 30px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.flow-summary strong {
    font: 700 32px Georgia, serif;
}

.flow-summary span {
    color: var(--muted);
    font-size: 12px;
}

.flow-map {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
}

.flow-stage {
    min-height: 132px;
    padding: 16px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--teal);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
}

.flow-stage>div:first-child,
.flow-stage footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.flow-stage>div:first-child span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.flow-stage strong {
    font: 700 28px Georgia, serif;
}

.flow-meter {
    height: 6px;
    margin: 18px 0 12px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--paper);
}

.flow-meter span {
    display: block;
    height: 100%;
    background: var(--teal);
}

.flow-stage footer span {
    color: var(--muted);
    font-size: 10px;
}

.overdue-signal {
    color: var(--coral) !important;
    font-weight: 800;
}

.workflow-explorer {
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--line);
}

.workflow-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
}

.workflow-toolbar h2,
.workflow-toolbar p {
    margin: 0;
}

.workflow-toolbar p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.workflow-tools {
    display: flex;
    gap: 6px;
}

.workflow-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    min-height: 680px;
    border: 1px solid var(--line);
    background: #f6f8f5;
}

.workflow-chart {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 680px;
}

.workflow-chart-loading,
.workflow-chart-unavailable {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
}

.workflow-detail {
    padding: 20px;
    overflow: auto;
    border-left: 1px solid var(--line);
    background: var(--surface);
}

.workflow-detail h3 {
    margin: 4px 0;
    font-size: 20px;
}

.workflow-detail>p:not(.eyebrow),
.workflow-detail li {
    color: var(--muted);
    font-size: 11px;
}

.workflow-detail h4 {
    margin: 24px 0 8px;
    font-size: 11px;
    text-transform: uppercase;
}

.workflow-detail ul {
    display: grid;
    gap: 9px;
    margin: 0 0 24px;
    padding-left: 16px;
}

.workflow-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 14px 0;
}

.workflow-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
}

.workflow-legend strong {
    flex-basis: 100%;
    color: var(--ink);
    font-size: 10px;
    text-transform: uppercase;
}

.workflow-legend i {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--teal);
}

.workflow-legend .stage-outreach i,
.workflow-legend .stage-lead i,
.workflow-legend .stage-renewal i { background: #b38343; }
.workflow-legend .stage-engaged i,
.workflow-legend .stage-contacted i,
.workflow-legend .stage-interested i { background: #4e8ba3; }
.workflow-legend .stage-meeting i,
.workflow-legend .stage-demo i { background: #7565a1; }
.workflow-legend .stage-decision i { background: #a4694e; }
.workflow-legend .stage-commercial i,
.workflow-legend .stage-proposal i { background: #56749a; }
.workflow-legend .stage-payment i,
.workflow-legend .stage-invoiced i { background: #a68b36; }
.workflow-legend .stage-deferred i,
.workflow-legend .stage-not_now i { background: #777f79; }
.workflow-legend .stage-won i { background: #3f8a65; }
.workflow-legend .stage-lost i,
.workflow-legend .stage-do_not_contact i { background: #9a6256; }

.flow-stage.stage-outreach,
.flow-stage.stage-lead,
.flow-stage.stage-renewal { border-top-color: #b38343; }
.flow-stage.stage-engaged,
.flow-stage.stage-contacted,
.flow-stage.stage-interested { border-top-color: #4e8ba3; }
.flow-stage.stage-meeting,
.flow-stage.stage-demo { border-top-color: #7565a1; }
.flow-stage.stage-decision { border-top-color: #a4694e; }
.flow-stage.stage-commercial,
.flow-stage.stage-proposal { border-top-color: #56749a; }
.flow-stage.stage-payment,
.flow-stage.stage-invoiced { border-top-color: #a68b36; }
.flow-stage.stage-deferred,
.flow-stage.stage-not_now { border-top-color: #777f79; }
.flow-stage.stage-won { border-top-color: #3f8a65; }
.flow-stage.stage-lost,
.flow-stage.stage-do_not_contact { border-top-color: #9a6256; }

.action-list {
    border-top: 1px solid var(--ink);
}

.action-row {
    min-height: 128px;
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr) 92px;
    align-items: center;
    gap: 24px;
    padding: 20px 8px;
    border-bottom: 1px solid var(--line);
    background: transparent;
}

.action-row:hover {
    background: rgba(255, 255, 255, .65);
}

.action-row.overdue {
    border-left: 3px solid var(--coral);
    padding-left: 14px;
}

.due-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.due-label {
    width: max-content;
    padding: 3px 6px;
    border-radius: 3px;
    background: #e7efeb;
    color: var(--teal-dark);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.overdue .due-label {
    background: var(--coral-soft);
    color: #a43f2c;
}

.due-block time {
    font-size: 12px;
    color: var(--muted);
}

.action-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
}

.action-meta .kind {
    color: var(--teal);
    font-weight: 800;
}

/* Task titles show as written ("Check the CQC ratings"), never title-cased. */
.action-body h3 {
    margin: 0 0 4px;
}

/* Due today and the shared task row (PR-12). */
.who-toggle {
    display: inline-flex;
    margin: -14px 0 22px;
    border: 1px solid var(--teal);
    border-radius: 4px;
    overflow: hidden;
}

.who-toggle a {
    padding: 8px 16px;
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 800;
}

.who-toggle a+a {
    border-left: 1px solid var(--teal);
}

.who-toggle a[aria-current="page"] {
    background: var(--teal);
    color: white;
}

.action-row.task-row {
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: start;
    /* The same inset as an overdue row's coral edge, so the columns line up. */
    border-left: 3px solid transparent;
    padding-left: 14px;
}

.action-row.task-row.overdue {
    border-left-color: var(--coral);
}

.task-guidance {
    max-width: 620px;
}

.task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.task-action>summary {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #bdc7c1;
    border-radius: 4px;
    background: var(--surface);
    color: var(--teal-dark);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
}

.task-action>summary::-webkit-details-marker {
    display: none;
}

.task-close>summary {
    border-color: var(--teal);
}

.task-action[open] {
    flex-basis: 100%;
    order: -1;
}

.task-action[open]>summary {
    background: #e5f1ed;
}

.task-action>form {
    max-width: 620px;
    margin-top: 12px;
    padding: 16px;
    border-left: 3px solid var(--teal);
    background: var(--surface);
}

.task-form-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

.log-contact {
    display: grid;
    grid-template-columns: max-content minmax(0, 220px);
    justify-content: start;
    align-items: end;
    gap: 0 16px;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
}

.log-contact .checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 43px;
    margin-bottom: 21px;
    font-size: 13px;
    font-weight: 800;
}

.log-contact .field-help {
    grid-column: 1 / -1;
    margin-top: -14px;
}

@media (max-width: 560px) {
    .action-row.task-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .log-contact,
    .task-form-dates {
        grid-template-columns: minmax(0, 1fr);
    }

    .log-contact .checkbox-field {
        min-height: 0;
        margin-bottom: 12px;
    }

    .log-contact .field-help {
        margin-top: -10px;
    }
}

/* A record page's tasks, "Log a contact" and "Add task" (PR-14). */
.record-tasks {
    margin: 36px 0 8px;
    scroll-margin-top: 16px;
}

.record-actions {
    margin: 0 0 14px;
}

.closed-tasks {
    margin-top: 16px;
}

.closed-tasks>summary {
    margin-bottom: 10px;
    color: var(--teal-dark);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.action-body>a {
    font-size: 14px;
    font-weight: 700;
}

.action-body p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.command-button,
.primary-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 4px;
    background: var(--teal);
    color: white;
    cursor: pointer;
    font-weight: 800;
    padding: 0 15px;
}

.command-button:hover,
.primary-button:hover {
    background: var(--teal-dark);
}

.empty-state {
    min-height: 280px;
    display: grid;
    place-content: center;
    justify-items: center;
    border-top: 1px solid var(--ink);
    color: var(--muted);
    text-align: center;
}

.empty-state>span {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--teal);
    font-size: 24px;
}

.detail-header {
    align-items: start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
}

.back-link {
    display: inline-block;
    margin-bottom: 28px;
    font-size: 12px;
}

.status-badge,
.due-pill {
    padding: 7px 10px;
    border: 1px solid #b9d4cb;
    border-radius: 3px;
    background: #edf5f1;
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: capitalize;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 54px;
}

.context-panel {
    border-left: 1px solid var(--line);
    padding-left: 28px;
}

.context-panel h2 {
    margin: 0 0 16px;
    padding-top: 2px;
}

.context-panel h2:not(:first-child) {
    margin-top: 36px;
}

.ownership-form {
    padding-top: 4px;
}

.context-panel dl {
    margin: 0;
}

.context-panel dl div {
    margin-bottom: 14px;
}

.context-panel dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.context-panel dd {
    margin: 3px 0 0;
    font-size: 13px;
    text-transform: capitalize;
}

.compact-list {
    border-top: 1px solid var(--ink);
}

.compact-row {
    min-height: 68px;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.compact-row div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.compact-row span {
    color: var(--muted);
    font-size: 11px;
    text-transform: capitalize;
}

.state-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9eaaa5;
}

.state-dot.pending {
    background: var(--gold);
}

.state-dot.completed {
    background: var(--teal);
}

.compact-row a {
    font-size: 12px;
    font-weight: 800;
}

.timeline-heading {
    margin-top: 42px;
}

.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 12px;
    padding-bottom: 25px;
}

.timeline li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 13px;
    bottom: 0;
    width: 1px;
    background: var(--line);
}

.timeline-marker {
    width: 11px;
    height: 11px;
    margin-top: 3px;
    border: 2px solid var(--teal);
    border-radius: 50%;
    background: var(--paper);
    z-index: 1;
}

.timeline div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline span,
.timeline p {
    color: var(--muted);
    font-size: 11px;
}

.timeline p {
    margin: 5px 0 0;
    color: var(--ink);
}

.stakeholder-list>div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.stakeholder-list p {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-size: 12px;
}

.stakeholder-list p span {
    color: var(--muted);
    font-size: 10px;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.completion-layout {
    display: grid;
    grid-template-columns: minmax(0, 620px) 250px;
    gap: 64px;
}

.completion-form {
    padding-top: 4px;
}

.intake-form {
    max-width: 820px;
}

.intake-form>section {
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.form-section-heading {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.form-section-heading>span {
    color: var(--teal);
    font: 700 14px Georgia, serif;
}

.form-section-heading h2 {
    margin-bottom: 3px;
}

.form-section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
    padding-left: 48px;
}

.form-grid .wide {
    grid-column: 1 / -1;
}

.field {
    margin-bottom: 21px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 800;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid #bdc7c1;
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--teal);
    outline: 2px solid #bfe2d9;
    outline-offset: 0;
}

.field select[multiple] {
    min-height: 90px;
}

.field-error,
.form-errors {
    margin-top: 5px;
    color: #a43f2c;
    font-size: 12px;
}

.field-error,
.form-errors {
    overflow-wrap: anywhere;
}

.form-errors {
    margin-bottom: 18px;
    padding: 10px;
    border-left: 3px solid var(--coral);
    background: var(--coral-soft);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.form-actions>a {
    color: var(--muted);
    font-size: 13px;
}

.call-context {
    min-height: 300px;
    padding: 24px;
    border-top: 3px solid var(--gold);
    background: #eaf1ed;
}

.call-context h2 {
    margin-bottom: 4px;
}

.call-context>p:not(.eyebrow) {
    color: var(--muted);
    font-size: 13px;
}

.call-context>a {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

.message-stack {
    position: fixed;
    right: 24px;
    top: 22px;
    z-index: 5;
}

.message {
    padding: 12px 16px;
    border-radius: 4px;
    background: var(--teal-dark);
    color: white;
    box-shadow: 0 8px 28px #17211d33;
    font-size: 13px;
}

.message.warning {
    background: var(--ink);
    border-left: 4px solid var(--gold);
}

.login-page {
    min-height: 100vh;
    background: var(--sidebar);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(340px, 1.15fr) minmax(360px, .85fr);
}

.login-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(48px, 8vw, 120px);
    color: white;
}

.large-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 46px;
}

.login-brand h1 {
    margin-bottom: 15px;
    font-size: clamp(56px, 8vw, 96px);
}

.login-brand>p:last-of-type {
    max-width: 430px;
    color: #b5c4bd;
    font: 22px/1.45 Georgia, serif;
}

.signal-lines {
    position: absolute;
    right: -8%;
    bottom: 8%;
    width: 65%;
    height: 170px;
    opacity: .35;
    transform: skewY(-8deg);
}

.signal-lines span {
    display: block;
    height: 1px;
    margin: 34px 0;
    background: linear-gradient(90deg, transparent, var(--gold));
}

.login-form-panel {
    display: grid;
    place-items: center;
    padding: 40px;
    background: var(--paper);
}

.login-form-panel>div {
    width: min(380px, 100%);
}

.login-form-panel h2 {
    margin-bottom: 30px;
    font-size: 32px;
}

.primary-button.full {
    width: 100%;
    margin-top: 6px;
}

@media (max-width: 800px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 14px 18px;
        flex-direction: row;
        align-items: center;
    }

    .primary-nav {
        margin: 0 0 0 auto;
    }

    .nav-link {
        padding: 8px 10px;
    }

    .sidebar-footer {
        margin: 0 0 0 8px;
        padding: 0 0 0 8px;
        border: 0;
        border-left: 1px solid #30413a;
        grid-template-columns: 32px 32px;
    }

    .sidebar-footer .avatar {
        width: 32px;
        height: 32px;
    }

    .user-meta {
        display: none;
    }

    .main-content {
        padding: 28px 18px 50px;
    }

    .action-row {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 14px;
    }

    .command-button {
        grid-column: 2;
        width: max-content;
    }

    .detail-grid,
    .completion-layout {
        grid-template-columns: 1fr;
    }

    .flow-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-layout {
        grid-template-columns: 1fr;
        min-height: 560px;
    }

    .workflow-chart {
        min-height: 560px;
    }

    .workflow-detail {
        max-height: 340px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .exception-grid {
        grid-template-columns: 1fr;
    }

    .effects-section {
        grid-column: 1;
    }

    .queue-filters {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .search-field {
        flex-basis: 100%;
    }

    .context-panel {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 24px 0 0;
    }

    .call-context {
        order: -1;
        min-height: 0;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        min-height: 38vh;
        padding: 38px 28px;
    }

    .login-brand h1 {
        font-size: 50px;
    }

    .large-mark {
        margin-bottom: 22px;
    }

    .login-form-panel {
        min-height: 62vh;
        padding: 36px 24px;
    }
}

@media (max-width: 500px) {
    .brand>span:last-child {
        display: none;
    }

    .page-header {
        align-items: start;
    }

    .today {
        font-size: 11px;
    }

    .summary-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .summary-strip div {
        padding: 12px 8px 12px 0;
        flex-direction: column;
        gap: 2px;
    }

    .summary-strip div+div {
        padding-left: 12px;
    }

    .action-row {
        grid-template-columns: 1fr;
        padding: 18px 8px;
    }

    .command-button {
        grid-column: 1;
    }

    .due-block {
        flex-direction: row;
        align-items: center;
    }

    .completion-layout {
        gap: 24px;
    }

    .header-actions {
        align-items: flex-end;
        flex-direction: column;
        gap: 8px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        padding-left: 0;
    }

    .flow-map {
        grid-template-columns: 1fr;
    }

    .workflow-toolbar {
        align-items: flex-start;
    }

    .workflow-toolbar p {
        max-width: 250px;
    }

    .workflow-layout,
    .workflow-chart {
        min-height: 480px;
    }
}

/* Command layer: move control, hand-over and conflict page (PR-11). */
.field-help {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.move-control {
    margin: 36px 0 8px;
}

.move-form {
    max-width: 620px;
}

.move-impact {
    margin: -8px 0 18px;
    padding: 10px 12px;
    border-left: 3px solid var(--teal);
    background: var(--surface);
    font-size: 13px;
}

.hand-over-form .checkbox-field {
    margin-bottom: 4px;
}

.hand-over-form .field-help {
    margin-bottom: 16px;
}

.conflict-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 54px;
    max-width: 1100px;
}

.conflict-retry .move-control {
    margin-top: 0;
}

.conflict-retry textarea {
    width: 100%;
}

@media (max-width: 800px) {
    .conflict-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
}

/* Fast manual entry: the New menu, duplicate warnings, add contact, line items (PR-13). */
.nav-menu > summary {
    cursor: pointer;
    list-style: none;
}

.nav-menu > summary::-webkit-details-marker {
    display: none;
}

.nav-menu[open] > summary {
    background: #263730;
    color: white;
}

.nav-menu-items {
    display: grid;
    gap: 2px;
    padding: 4px 0 6px 44px;
}

.nav-menu-items a {
    padding: 7px 10px;
    border-radius: var(--radius);
    color: var(--sidebar-muted);
    font-size: 14px;
}

.nav-menu-items a:hover,
.nav-menu-items a:focus-visible {
    background: #263730;
    color: white;
}

a.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-actions .primary-button,
.header-actions .secondary-button {
    white-space: nowrap;
}

.duplicate-warning {
    margin: 24px 0 0;
    padding: 16px 18px;
    border-left: 3px solid var(--gold);
    background: #fff8e8;
}

.duplicate-warning:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.duplicate-warning h2 {
    margin-bottom: 6px;
}

.duplicate-warning p {
    margin: 0 0 10px;
    font-size: 14px;
}

.duplicate-warning ul {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.duplicate-warning li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    padding: 8px 0;
    border-bottom: 1px solid #efe3c4;
}

.duplicate-warning li > a:first-child {
    font-weight: 800;
}

.duplicate-warning li span {
    color: var(--muted);
    font-size: 12px;
}

.duplicate-warning li .secondary-button {
    margin-left: auto;
    min-height: 32px;
}

.duplicate-block a {
    font-weight: 800;
}

.add-contact {
    scroll-margin-top: 16px;
}

.add-contact-form .field {
    margin-bottom: 12px;
}

.add-contact-form .field input,
.add-contact-form .field select {
    min-height: 38px;
}

.add-contact-form .field-help {
    margin-top: 8px;
}

.form-indented {
    padding-left: 48px;
}

.line-items {
    margin: 36px 0 8px;
    scroll-margin-top: 16px;
}

.deal-value {
    color: var(--muted);
    font-size: 13px;
}

.deal-value strong {
    color: var(--ink);
    font-size: 16px;
}

.line-items-list {
    margin: 0;
    padding-left: 18px;
}

.line-items-grid {
    display: grid;
    gap: 8px;
}

.line-items-head,
.line-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 72px minmax(112px, 1.2fr) minmax(0, 1.7fr);
    gap: 8px;
    align-items: start;
}

.with-delete .line-items-head,
.with-delete .line-item-row {
    grid-template-columns: minmax(0, 1.7fr) 72px minmax(112px, 1.2fr) minmax(0, 1.7fr) 76px;
}

.line-items-head[hidden],
.line-items-actions[hidden] {
    display: none;
}

.line-items-empty {
    margin: 0;
}

.line-items-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.line-field label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.line-field input,
.line-field select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #bdc7c1;
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
}

.line-field input:focus,
.line-field select:focus {
    border-color: var(--teal);
    outline: 2px solid #bfe2d9;
    outline-offset: 0;
}

.line-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    font-size: 13px;
}

.add-line {
    margin-top: 10px;
}

.line-items-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

@media (max-width: 800px) {
    .nav-menu {
        position: relative;
    }

    .nav-menu-items {
        position: absolute;
        z-index: 10;
        top: 100%;
        right: 0;
        min-width: 160px;
        padding: 6px;
        border-radius: var(--radius);
        background: var(--sidebar);
        box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
    }
}

@media (max-width: 600px) {
    .page-header.detail-header {
        flex-wrap: wrap;
    }

    .form-indented {
        padding-left: 0;
    }

    .line-items-head {
        display: none;
    }

    .line-item-row,
    .with-delete .line-item-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }

    .line-field:first-of-type,
    .line-field:nth-of-type(4) {
        grid-column: 1 / -1;
    }

    .line-field label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        margin-bottom: 4px;
        font-size: 11px;
        font-weight: 800;
    }
}

/* Board: one column per stage, drag-and-drop and the Move to stage fallback (PR-17). */
.main-content:has(.board-shell) {
    width: 100%;
}

.board-hint {
    margin: -14px 0 14px;
    font-size: 12px;
}

/* Positioned, so a card's visually hidden label scrolls (and clips) with it. */
.board-shell {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 4px 2px 16px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.board-column {
    flex: 0 0 min(264px, 82vw);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 180px;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    background: #e9eee9;
    scroll-snap-align: start;
}

.board-column-closing {
    background: #eef0ec;
}

.board-column.is-drop-target {
    border-color: var(--teal);
    background: #dcece6;
}

.board-column-header {
    position: sticky;
    z-index: 1;
    top: 0;
    margin: -10px -10px 0;
    padding: 10px 12px 6px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-column-header h2 {
    margin: 0;
    font-size: inherit;
}

.board-column-header .stage-chip {
    margin: 0;
}

.board-column-count {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.board-column-value {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
}

.board-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.board-card {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    border-radius: 4px;
    background: var(--surface);
    font-size: 12px;
    cursor: grab;
}

.board-card.needs-attention {
    border-left-color: var(--coral);
}

.board-card.is-dragging {
    opacity: .5;
}

.board-card.is-moving {
    opacity: .7;
    cursor: progress;
}

.board-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.board-card-header a {
    min-width: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.owner-initials {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sidebar);
    color: white;
    font-size: 10px;
    font-weight: 800;
}

.board-card-contact,
.board-card-step {
    margin: 2px 0 0;
    color: var(--muted);
}

.board-card-step {
    color: var(--teal-dark);
    font-weight: 700;
}

.board-card-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    margin: 8px 0 0;
}

.board-card-facts dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.board-card-facts dd {
    margin: 1px 0 0;
}

.board-card-next {
    grid-column: 1 / -1;
}

.board-card-next time {
    display: block;
    color: var(--muted);
}

.board-card-warnings {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.board-card-warnings li {
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--coral-soft);
    color: #9a3b29;
    font-size: 11px;
}

.board-move {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.board-move select {
    flex: 1;
    min-width: 0;
    min-height: 32px;
    padding: 4px 6px;
    border: 1px solid #bdc7c1;
    border-radius: 4px;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
}

.board-move .secondary-button {
    min-height: 32px;
    padding: 0 10px;
}

.board-empty {
    margin: 4px 2px;
    color: var(--muted);
    font-size: 12px;
}

.board-older {
    padding: 2px;
    font-size: 12px;
    font-weight: 700;
}

/* On a wide screen the board fits the window and scrolls inside, so its
   sideways scrollbar is in view without scrolling the page down. */
@media (min-width: 801px) {
    .board-shell {
        max-height: max(360px, calc(100vh - 270px));
        overflow: auto;
    }
}

/* Record pages, timeline, directories, register and nav (PR-18). */

/* The sidebar's colour runs the full height of a long page, not just one screen. */
.app-shell {
    background: linear-gradient(to right, var(--sidebar) 232px, transparent 232px);
}

/* Detail headers: the title takes the room, and the buttons wrap below it. */
.page-header.detail-header {
    flex-wrap: wrap;
    row-gap: 14px;
}

.detail-title {
    flex: 1 1 420px;
    min-width: 0;
}

.detail-title h1 {
    overflow-wrap: anywhere;
}

.detail-header .header-actions {
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.record-section {
    margin-bottom: 36px;
}

/* Record details and rows read as written ("Meeting or visit"), not title case. */
.record-details dd,
.record-section .compact-row span:not(.stage-chip) {
    text-transform: none;
}

.record-opportunities .compact-row {
    padding: 10px 0;
}

.record-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}

.record-meta .stage-chip {
    margin: 0;
}

.record-opportunities .warning-chips {
    margin-top: 6px;
}

/* The timeline: one sentence per row, names in bold, the note beneath. */
.timeline .timeline-text {
    margin: 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.45;
}

.timeline .timeline-note {
    margin: 2px 0 0;
    font-size: 12px;
    white-space: pre-line;
}

.timeline li.timeline-empty {
    display: block;
    padding-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

/* Purchases: a Tier 1 licence within 60 days of expiry, or past it. */
.purchase-expiry.expiring-soon {
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--coral-soft);
    color: #9a3a27;
}

/* Directories scroll inside their shell on a phone; the page never does. */
.directory-table {
    min-width: 760px;
}

/* Register: the Flow view's step filter, lost reasons and warning help. */
.active-filters {
    margin: -8px 0 16px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #b9d4cb;
    border-radius: 999px;
    background: #edf5f1;
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 800;
}

.pipeline-table .lost-reason {
    color: #9a3a27;
    font-weight: 700;
}

.warning-help summary {
    display: inline-block;
    cursor: pointer;
    list-style: none;
}

.warning-help summary::-webkit-details-marker {
    display: none;
}

.warning-help summary::after {
    content: " ?";
    opacity: .7;
}

.warning-help p {
    max-width: 220px;
    margin: 4px 0 2px;
    color: var(--muted);
    font-size: 11px;
    white-space: normal;
}

.narrow-only {
    display: none;
}

/* An empty table's message stays in view inside the scroll shell, and wraps. */
.table-shell .table-empty {
    position: sticky;
    left: 0;
    text-align: left;
    white-space: normal;
}

/* Flow view: the chart takes the full width; a step's routes open over its right edge. */
@media (min-width: 801px) {
    .workflow-layout {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
    }

    .workflow-detail {
        position: absolute;
        z-index: 2;
        top: 0;
        right: 0;
        bottom: 0;
        width: 260px;
        box-shadow: -8px 0 24px rgb(23 33 29 / 8%);
    }
}

@media (max-width: 800px) {
    .app-shell {
        background: none;
    }

    /* Phone nav: the brand and account on one line, the links wrapping below. */
    .sidebar {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .sidebar-footer {
        order: 1;
        margin-left: auto;
    }

    .primary-nav {
        order: 2;
        display: flex;
        flex-basis: 100%;
        flex-wrap: wrap;
        gap: 4px;
        margin: 0;
    }

    .primary-nav .nav-link {
        gap: 6px;
        padding: 7px 9px;
        font-size: 13px;
    }

    /* Complete a task: the form first, then the contact card. */
    .call-context {
        order: 0;
    }

    .narrow-only {
        display: inline;
    }
}

@media (max-width: 500px) {
    .primary-nav .nav-icon {
        display: none;
    }

    .detail-header .header-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }
}

/* Pickers for existing records: a filter box over a native select (picker.js). */
.field .picker-filter {
    margin-bottom: 6px;
    background: var(--paper);
}

.picker-status:empty {
    display: none;
}

.picker-new {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.picker-new a {
    font-weight: 700;
}

.picker-notice {
    margin-bottom: 18px;
    padding: 10px;
    border-left: 3px solid var(--teal);
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
}

.picker-notice p {
    margin: 0;
}

.picker-notice p + p {
    margin-top: 6px;
}

/* Admin screens: People, Flows and Data requests (docs/golive/spec.md §7). */
.nav-menu-items a[aria-current="page"] {
    color: white;
}

.message.error {
    background: var(--ink);
    border-left: 4px solid var(--coral);
}

.admin-panel {
    max-width: 820px;
    margin: 0 0 28px;
    font-size: 14px;
}

.admin-panel h2 {
    margin: 0 0 10px;
    font-size: 16px;
}

.admin-panel ol {
    margin: 0 0 12px;
    padding-left: 20px;
}

.admin-panel li + li {
    margin-top: 6px;
}

.admin-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
}

.admin-confirm {
    max-width: 640px;
    font-size: 14px;
}

.admin-list {
    margin: 0 0 28px;
    padding-left: 20px;
    font-size: 14px;
}

.admin-list li + li {
    margin-top: 6px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.pipeline-table .hash,
.mention-where .hash {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.pipeline-table .state-problem {
    color: #a43f2c;
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.admin-inline-form .field {
    margin: 0;
    min-width: 200px;
}

.mention-list {
    display: grid;
    gap: 12px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.mention-row {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 13px;
}

.mention-row p {
    margin: 4px 0 0;
}

.mention-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.mention-where .hash {
    display: block;
    color: var(--muted);
}

.mention-text {
    overflow-wrap: anywhere;
}

.mention-text > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-erase-form button,
.admin-confirm button {
    font-size: 14px;
}

.danger-button {
    background: #a43f2c;
}

.danger-button:hover {
    background: #85321f;
}

@media (max-width: 800px) {
    .admin-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
}

.admin-status {
    margin-bottom: 18px;
    padding: 10px;
    border-left: 3px solid var(--gold);
    background: var(--surface);
    font-size: 13px;
}
