:root {
    color-scheme: light;
    --serif: Georgia, "Times New Roman", serif;
    --sans: Helvetica, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --bg: oklch(0.975 0.008 95);
    --paper: oklch(0.995 0.003 95);
    --surface: oklch(1 0 0);
    --surface-2: oklch(0.965 0.006 95);
    --surface-3: oklch(0.94 0.01 95);
    --ink-1: oklch(0.19 0.012 95);
    --ink-2: oklch(0.43 0.012 95);
    --ink-3: oklch(0.57 0.012 95);
    --rule: oklch(0.87 0.011 95);
    --rule-soft: oklch(0.91 0.008 95);
    --rule-strong: oklch(0.78 0.017 95);
    --violet-fg: oklch(0.52 0.13 292);
    --violet-deep: oklch(0.42 0.13 292);
    --violet-soft: oklch(0.965 0.022 292);
    --violet-tint: oklch(0.978 0.013 292);
    --violet-rule: oklch(0.88 0.045 292);
    --sidekick-purple: #9823ec;
    --engineering-icon-blue: #3265d9;
    --solutions-icon-teal: #16A7A2;
    --ops-icon-brown: #bb5435;
    --research-icon-gold: #d1932e;
    --green-fg: oklch(0.52 0.13 155);
    --green-deep: oklch(0.42 0.13 155);
    --green-soft: oklch(0.965 0.022 155);
    --green-tint: oklch(0.978 0.013 155);
    --green-rule: oklch(0.88 0.045 155);
    --amber-fg: oklch(0.52 0.13 80);
    --amber-deep: oklch(0.42 0.13 80);
    --amber-soft: oklch(0.965 0.022 80);
    --amber-tint: oklch(0.978 0.013 80);
    --amber-rule: oklch(0.88 0.045 80);
    --red-fg: oklch(0.52 0.13 27);
    --red-deep: oklch(0.42 0.13 27);
    --red-soft: oklch(0.965 0.022 27);
    --red-tint: oklch(0.978 0.013 27);
    --red-rule: oklch(0.88 0.045 27);
    --eng-fg: oklch(0.660 0.155 262.4);
    --eng-deep: oklch(0.559 0.179 259.4);
    --eng-soft: oklch(0.957 0.020 264.5);
    --eng-tint: oklch(0.979 0.013 264.5);
    --eng-rule: oklch(0.880 0.058 263.7);
    --sol-fg: #0E8E8C;
    --sol-mid: #16A7A2;
    --sol-tip: #5BD6C8;
    --sol-deep: #0B5550;
    --sol-soft: #E4F4F2;
    --sol-tint: #F0FAF8;
    --sol-rule: #B8DAD6;
    --res-fg: oklch(0.811 0.139 89.3);
    --res-deep: oklch(0.671 0.135 72.1);
    --res-soft: oklch(0.963 0.037 88.5);
    --res-tint: oklch(0.982 0.022 88.5);
    --res-rule: oklch(0.848 0.088 84.5);
    --ops-fg: oklch(0.677 0.133 46.6);
    --ops-deep: oklch(0.580 0.152 40.1);
    --ops-soft: oklch(0.955 0.019 52.0);
    --ops-tint: oklch(0.982 0.013 52.0);
    --ops-rule: oklch(0.800 0.081 46.9);
    --rust-fg: var(--ops-fg);
    --rust-deep: var(--ops-deep);
    --rust-soft: var(--ops-soft);
    --rust-tint: var(--ops-tint);
    --rust-rule: var(--ops-rule);
    --sk-g1: oklch(0.62 0.22 292);
    --sk-g2: oklch(0.68 0.19 320);
    --sk-g3: oklch(0.73 0.17 155);
    --line: var(--rule);
    --line-strong: var(--rule-strong);
    --text: var(--ink-1);
    --muted: var(--ink-2);
    --faint: var(--ink-3);
    --accent: var(--violet-fg);
    --accent-strong: var(--violet-deep);
    --blue: var(--eng-fg);
    --green: var(--green-fg);
    --amber: var(--amber-fg);
    --red: var(--red-fg);
    --purple: var(--violet-fg);
    --shadow: 0 18px 42px oklch(0.19 0.012 95 / 0.11);
    --shadow-soft: 0 8px 24px oklch(0.19 0.012 95 / 0.065);
    --focus-ring: 0 0 0 3px oklch(0.52 0.13 292 / 0.18);
    --font: var(--sans);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 var(--font);
    overflow-x: hidden;
}

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

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

a {
    color: inherit;
}

.boot-shell,
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.boot-panel,
.login-panel {
    width: min(420px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    background: transparent;
}

.sidebar .brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 0;
    background: transparent;
}

.login-panel h1,
.page-title h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: 0;
}

.login-panel p,
.empty-state p,
.muted {
    color: var(--muted);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.login-token-form {
    gap: 12px;
}

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 11px 10px;
    background: oklch(0.949 0.010 93.6);
    border-right: 1px solid var(--line);
}

.sidebar-brand,
.sidebar-company {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    padding: 0 3px;
}

.sidebar-brand strong,
.sidebar-company strong {
    min-width: 0;
    overflow: hidden;
    display: block;
    font-size: 13px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-brand span {
    color: var(--faint);
    font-size: 12px;
}

.sidebar-company > span {
    margin-left: auto;
    color: var(--faint);
    font-size: 15px;
}

.agent-switcher {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 46px;
    padding: 8px;
    background: oklch(0.927 0.011 95.2);
    border: 1px solid oklch(0.876 0.017 91.6);
    border-radius: 7px;
}

.agent-avatar {
    width: 28px;
    height: 28px;
    display: block;
    object-fit: contain;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.agent-switcher strong,
.agent-switcher span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-switcher strong {
    font-size: 12px;
}

.agent-switcher span {
    color: var(--muted);
    font-size: 10px;
}

.nav-list {
    display: grid;
    gap: 15px;
}

.nav-section {
    display: grid;
    gap: 3px;
}

.nav-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0 0 4px;
    color: oklch(0.654 0.018 133.9);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.nav-section-label::before,
.nav-section-label::after,
.organization-sidebar-section-label::before,
.organization-sidebar-section-label::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: var(--line);
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 26px;
    padding: 5px 7px;
    color: oklch(0.450 0.018 145.3);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 650;
}

.nav-item span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text);
    background: oklch(0.995 0.005 78.3);
    border-color: oklch(0.867 0.016 90.2);
}

.nav-item.disabled {
    color: oklch(0.698 0.015 134.9);
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 7px;
}

.sidebar-session {
    display: grid;
    gap: 2px;
    padding: 7px;
    background: transparent;
    border: 0;
    border-radius: 6px;
}

.sidebar-session strong {
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-session span {
    color: var(--faint);
    font-size: 10px;
}

.sidebar-action {
    width: 100%;
    min-height: 28px;
    font-size: 11px;
}

.admin-view-marker {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 7px 0;
    text-align: center;
}

.admin-view-marker strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.1;
}

.admin-view-link {
    color: var(--faint);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
}

.admin-view-link:hover,
.admin-view-link.active {
    color: var(--accent);
}

.admin-view-link.disabled {
    color: var(--faint);
    cursor: not-allowed;
    opacity: 0.6;
}

.content {
    min-width: 0;
    padding: 26px 28px 36px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-title {
    display: grid;
    gap: 7px;
}

.page-title p {
    margin: 0;
    color: var(--muted);
}

.header-actions,
.inline-actions,
.table-actions,
.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.memory-search-control {
    display: block;
    width: min(320px, 100%);
}

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

.memory-context-filter {
    width: auto;
    min-width: 190px;
}

.memory-correction-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    color: var(--muted);
    background: oklch(0.997 0.005 95.1);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    line-height: 1.4;
}

.memory-correction-hint strong {
    flex: 0 0 auto;
    color: var(--text);
}

.memory-chip-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.memory-chip,
.memory-risk-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
}

.memory-risk-badge.warning {
    color: oklch(0.490 0.088 79.3);
    background: oklch(0.978 0.033 94.0);
    border-color: oklch(0.869 0.075 94.9);
}

.memory-risk-badge.danger {
    color: oklch(0.465 0.111 29.8);
    background: oklch(0.966 0.017 35.3);
    border-color: oklch(0.855 0.052 34.7);
}

.memory-correction-preview {
    display: grid;
    gap: 6px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.memory-correction-preview > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.memory-correction-preview strong {
    color: var(--text);
}

.memory-correction-preview p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.activity-stack {
    display: grid;
    gap: 16px;
}

.metric {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.activity-metric {
    width: 100%;
    color: var(--text);
    text-align: left;
}

.activity-metric:hover {
    background: var(--surface-2);
    border-color: var(--line-strong);
}

.activity-metric.active {
    border-color: rgba(73, 122, 86, 0.72);
    box-shadow: inset 0 0 0 1px rgba(73, 122, 86, 0.18);
}

.activity-metric:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.metric span {
    display: block;
    color: var(--faint);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
    line-height: 1.1;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
}

.title-with-tip,
.label-with-tip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.title-with-tip {
    vertical-align: middle;
}

.title-with-tip h1,
.title-with-tip h2,
.title-with-tip h3 {
    margin: 0;
}

.label-with-tip {
    align-self: start;
}

.panel-body {
    padding: 16px;
}

.table-wrap {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.data-table th {
    color: var(--faint);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: oklch(0.952 0.010 93.6);
}

.data-table th,
.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: rgba(73, 122, 86, 0.045);
}

.row-title {
    display: grid;
    gap: 3px;
}

.row-title strong {
    font-size: 14px;
}

.row-title span {
    color: var(--faint);
    font-size: 12px;
}

.link-button {
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    text-align: left;
}

.link-button:hover {
    color: var(--accent-strong);
}

.run-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: max-content;
    min-width: 0;
    max-width: 100%;
    min-height: 26px;
    padding: 4px 8px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.run-summary.success {
    color: oklch(0.458 0.085 153.0);
    background: oklch(0.968 0.017 151.1);
    border-color: oklch(0.877 0.053 149.3);
}

.run-summary.danger {
    color: oklch(0.499 0.117 34.7);
    background: oklch(0.968 0.017 44.8);
    border-color: oklch(0.820 0.059 39.6);
}

.run-summary.warning {
    color: oklch(0.488 0.092 76.7);
    background: oklch(0.974 0.032 89.1);
    border-color: oklch(0.866 0.075 88.7);
}

.run-summary.info {
    color: oklch(0.474 0.054 247.2);
    background: oklch(0.967 0.011 243.7);
    border-color: oklch(0.877 0.020 235.8);
}

.run-status-icon {
    font-size: 13px;
    line-height: 1;
}

.button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    text-decoration: none;
}

.button:hover {
    border-color: var(--muted);
    background: var(--surface-3);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.button.primary {
    color: oklch(0.995 0.005 78.3);
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
}

.button.primary:hover {
    background: var(--accent-strong);
}

.button.danger {
    color: oklch(0.499 0.117 34.7);
    border-color: oklch(0.790 0.065 39.2);
    background: oklch(0.968 0.017 44.8);
}

.button.ghost {
    background: transparent;
}

.icon-button {
    width: 34px;
    height: 34px;
    padding: 0;
}

.field,
.field-row {
    display: grid;
    gap: 6px;
}

.field label,
.choice-label,
.switch-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.field-hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.scope-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.field input,
.field textarea,
.field select,
.header-actions select,
.filter-row select,
.skill-apply-form select,
.search-input {
    width: 100%;
    min-width: 0;
    color: var(--text);
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 9px 10px;
    outline: none;
}

.field textarea {
    min-height: 92px;
    resize: vertical;
}

.field textarea.textarea-tall {
    min-height: 180px;
}

.header-actions select,
.filter-row select {
    width: auto;
    min-width: 160px;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.header-actions select:focus,
.filter-row select:focus,
.skill-apply-form select:focus,
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(73, 122, 86, 0.14);
}

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

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

.form-callout {
    display: grid;
    gap: 5px;
    padding: 11px 12px;
    background: rgba(73, 122, 86, 0.08);
    border: 1px solid rgba(73, 122, 86, 0.28);
    border-radius: 8px;
}

.form-callout p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

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

.skill-list {
    display: grid;
}

.skill-library-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.global-skill-list {
    border-top: 1px solid var(--line);
}

.global-skill-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 0;
    color: var(--text);
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
}

.global-skill-row:hover {
    background: var(--surface-2);
}

.global-skill-details {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 0;
    color: var(--text);
    text-align: left;
    background: transparent;
    border: 0;
}

.global-skill-details span {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.global-skill-details .global-skill-tag-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.global-skill-details strong {
    overflow: hidden;
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-skill-details small {
    flex: 0 0 auto;
    color: oklch(0.610 0.010 205.9);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 750;
}

.global-skill-details p {
    margin: 0;
    color: oklch(0.388 0.009 207.1);
    font-size: 14px;
    line-height: 1.45;
}

.global-skill-details.demo {
    cursor: pointer;
}

.global-skill-details:hover strong {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.global-skill-details:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.skill-toggle {
    width: 34px;
    height: 22px;
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: oklch(0.902 0.003 128.5);
    border: 1px solid oklch(0.867 0.005 145.5);
    border-radius: 999px;
    cursor: pointer;
}

.skill-toggle span {
    width: 17px;
    height: 17px;
    position: absolute;
    left: 2px;
    background: oklch(1.000 0.000 89.9);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(20, 24, 20, 0.24);
    transition: transform 120ms ease-out;
}

.skill-toggle.active {
    background: oklch(0.528 0.069 152.9);
    border-color: oklch(0.528 0.069 152.9);
}

.skill-toggle.active span {
    transform: translateX(12px);
}

.skill-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.global-skill-details strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skills-table {
    min-width: 1040px;
}

.global-skills-table {
    min-width: 940px;
}

.global-skill-actions {
    justify-content: flex-end;
    min-width: 300px;
}

.pill-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.skill-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 14px;
    align-items: start;
    padding: 16px;
    border-top: 1px solid var(--line);
}

.skill-row:first-child {
    border-top: 0;
}

.skill-row.single {
    grid-template-columns: 1fr;
}

.skill-row-main,
.skill-meta,
.skill-apply-form {
    display: grid;
    gap: 10px;
}

.skill-meta {
    grid-template-columns: repeat(auto-fit, minmax(88px, max-content));
    align-items: center;
}

.skill-apply-form {
    grid-template-columns: minmax(0, 1fr);
}

.skill-table-actions {
    grid-template-columns: minmax(170px, 1fr) auto auto auto;
    align-items: center;
    min-width: 460px;
}

.skill-preview-modal {
    width: min(960px, 100%);
}

.skill-preview-summary {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.skill-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.skill-preview-section {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.skill-preview-section.instructions,
.skill-preview-section.wide {
    grid-column: 1 / -1;
}

.skill-preview-section-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 0;
}

.skill-preview-section-header div {
    min-width: 0;
}

.skill-preview-section-header strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.skill-preview-section-header span:not(.status-badge) {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.skill-preview-section-body {
    min-width: 0;
}

.skill-preview-instructions {
    max-height: 240px;
    margin: 0;
    padding: 12px;
    overflow: auto;
    color: oklch(0.301 0.015 141.2);
    background: oklch(0.984 0.007 97.3);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.skill-instructions-markdown-body {
    font-size: 14px;
}

.skill-instructions-markdown-body h2,
.skill-instructions-markdown-body h3 {
    margin-top: 20px;
}

.skill-instructions-markdown-body > :first-child {
    margin-top: 0;
}

.skill-instructions-markdown-body p,
.skill-instructions-markdown-body ul,
.skill-instructions-markdown-body ol {
    margin-bottom: 16px;
}

.skill-preview-instructions-editor {
    display: block;
    width: 100%;
    min-height: 240px;
    max-height: none;
    resize: vertical;
}

.skill-preview-instructions-editor:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
    outline: none;
}

.skill-impact-list {
    display: grid;
    gap: 8px;
}

.skill-impact-item {
    display: grid;
    gap: 8px;
    align-items: start;
    padding: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.skill-impact-item .pill-cluster {
    justify-content: flex-start;
}

.skill-impact-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.skill-impact-copy strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skill-impact-copy span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--faint);
    font-size: 12px;
}

.employee-skill-grid,
.access-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.employee-skill-card,
.access-source {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: oklch(0.964 0.010 93.6);
}

.employee-skill-card.assigned {
    opacity: 0.78;
}

.employee-assigned-skill-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.employee-assigned-skill-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.employee-assigned-skill-row:last-child {
    border-bottom: 0;
}

.employee-assigned-skill-row.inactive {
    opacity: 0.62;
}

.employee-assigned-skill-name {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    text-align: left;
}

.employee-assigned-skill-name strong,
.employee-assigned-skill-name span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-assigned-skill-name strong {
    font-size: 14px;
}

.employee-assigned-skill-name span {
    color: var(--muted);
    font-size: 12px;
}

.employee-assigned-skill-name:hover strong,
.employee-assigned-skill-name:focus-visible strong {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.employee-assigned-skill-name:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.employee-enabled-skills-panel {
    max-width: 100%;
}

.employee-enabled-skill-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.employee-enabled-skill-summary div {
    min-width: 0;
    padding: 12px 18px;
    border-right: 1px solid var(--line);
}

.employee-enabled-skill-summary div:last-child {
    border-right: 0;
}

.employee-enabled-skill-summary span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.employee-enabled-skill-summary strong {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.employee-enabled-skill-list {
    display: grid;
    gap: 20px;
    padding: 18px;
    border-top: 1px solid var(--line);
}

.employee-skill-state-section {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.employee-skill-state-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 0;
}

.employee-skill-state-header div {
    min-width: 0;
}

.employee-skill-state-header strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.employee-skill-state-header span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.employee-skill-category-list {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.employee-skill-category-group {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.employee-skill-category-header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: oklch(0.985 0.005 95.1);
}

.employee-skill-category-header strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.employee-skill-category-header span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.employee-skill-category-rows {
    display: grid;
}

.employee-enabled-skill-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.employee-enabled-skill-row.inactive {
    background: oklch(0.985 0.005 95.1);
}

.employee-enabled-skill-row:last-child {
    border-bottom: 0;
}

.employee-skill-toggle-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    justify-content: end;
    min-width: 0;
}

.employee-skill-toggle-cell .pill-cluster {
    justify-content: end;
}

.employee-skill-toggle-label {
    min-width: 64px;
    color: var(--text);
    font-size: 12px;
}

.employee-enabled-skill-row strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.segmented-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.permission-template-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: oklch(0.964 0.010 93.6);
}

.permission-template-panel > div:first-child {
    display: grid;
    gap: 3px;
}

.permission-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.permission-template {
    display: grid;
    gap: 5px;
    min-height: 78px;
    padding: 11px;
    color: var(--text);
    text-align: left;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
}

.permission-template:hover:not(:disabled) {
    background: var(--surface-3);
    border-color: var(--muted);
}

.permission-template:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.permission-template.danger {
    border-color: rgba(240, 100, 100, 0.55);
}

.permission-template span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.permission-intent-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.permission-intent {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    min-height: 92px;
    padding: 11px;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
}

.permission-intent:hover {
    background: var(--surface-3);
    border-color: var(--muted);
}

.permission-intent:has(input:checked) {
    border-color: rgba(73, 122, 86, 0.72);
    box-shadow: inset 0 0 0 1px rgba(73, 122, 86, 0.18);
}

.permission-intent.danger:has(input:checked) {
    border-color: rgba(240, 100, 100, 0.72);
    box-shadow: inset 0 0 0 1px rgba(240, 100, 100, 0.16);
}

.permission-intent input {
    width: auto;
    margin-top: 2px;
}

.permission-intent span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.permission-intent small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.permission-advanced {
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.permission-advanced summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.permission-advanced[open] summary {
    border-bottom: 1px solid var(--line);
}

.permission-rights-grid {
    padding: 12px;
}

.permission-warning-slot,
.permission-warning-list {
    display: grid;
    gap: 8px;
}

.permission-warning-slot:empty {
    display: none;
}

.permission-warning-list.compact {
    gap: 5px;
    margin-top: 5px;
}

.permission-warning {
    padding: 8px 10px;
    color: oklch(0.488 0.092 76.7);
    background: oklch(0.974 0.032 89.1);
    border: 1px solid oklch(0.866 0.075 88.7);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.35;
}

.permission-warning-list.compact .permission-warning {
    padding: 6px 8px;
}

.tool-access-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.integration-access-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.integration-access-sections {
    display: grid;
    gap: 18px;
}

.integration-access-section {
    display: grid;
    gap: 10px;
}

.integration-access-section + .integration-access-section {
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

.integration-access-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.integration-access-section-header h3 {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.integration-access-section-header span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.access-scope-tabs {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
}

.access-scope-tabs .tabs {
    margin-bottom: 0;
}

.access-control-plane {
    display: grid;
    gap: 14px;
}

.access-summary-grid {
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: oklch(0.990 0.003 128.5);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.access-summary-tile {
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 16px 20px;
    border-right: 1px solid var(--line);
}

.access-summary-tile:last-child {
    border-right: 0;
}

.access-summary-tile strong {
    color: var(--text);
    font-size: 28px;
    font-weight: 850;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.access-summary-tile span {
    color: var(--faint);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.access-summary-tile.is-accent strong {
    color: var(--accent);
}

.access-summary-tile.is-danger strong {
    color: var(--danger);
}

.access-list-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) max-content;
    align-items: center;
    gap: 12px;
}

.access-search-field {
    min-width: 0;
}

.access-search-field .search-input {
    width: 100%;
    padding-top: 5px;
    padding-bottom: 5px;
}

.access-list-filters {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: oklch(0.946 0.008 104.8);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.access-list-filter {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

.access-list-filter strong {
    min-width: 18px;
    padding: 1px 5px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.25;
    text-align: center;
    background: oklch(0.969 0.020 286.0);
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

.access-list-filter:hover,
.access-list-filter:focus-visible {
    border-color: var(--line-strong);
}

.access-list-filter:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.access-list-filter.active {
    color: var(--text);
    background: oklch(0.995 0.005 78.3);
    border-color: var(--line-strong);
}

.access-tool-table {
    overflow: hidden;
    display: grid;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.access-tool-table-header,
.access-tool-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) minmax(190px, 0.95fr) minmax(170px, 0.9fr) minmax(140px, 0.72fr) 46px;
    align-items: center;
    column-gap: 16px;
}

.access-tool-table-header {
    min-height: 42px;
    padding: 0 18px;
    color: var(--faint);
    background: oklch(0.938 0.017 112.8);
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.access-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
    padding: 0 18px;
    color: var(--faint);
    background: oklch(0.953 0.010 102.6);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.access-section-row:first-of-type {
    border-top: 0;
}

.access-section-row strong {
    color: var(--faint);
    font-size: 10px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.access-tool-row {
    min-height: 76px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
}

.access-section-row + .access-tool-row {
    border-top: 0;
}

.access-tool-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.access-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--faint);
}

.access-status-dot.is-full {
    background: var(--green);
}

.access-status-dot.is-partial {
    background: var(--amber);
}

.access-status-dot.is-needs-setup {
    background: var(--danger);
}

.access-status-dot.is-stale {
    background: var(--danger);
}

.access-tool-main div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.access-tool-main strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-tool-main small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-capability-details {
    min-width: 0;
    margin-top: 6px;
}

.access-capability-details summary {
    width: max-content;
    max-width: 100%;
    color: var(--faint);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    cursor: pointer;
}

.access-capability-list {
    max-width: min(720px, 100%);
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.access-capability-item {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: oklch(0.982 0.006 93.2);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.access-capability-main {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.access-capability-main strong,
.access-capability-main small {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.access-capability-operation,
.access-capability-state,
.access-row-action-note {
    width: max-content;
    max-width: 100%;
    color: var(--faint);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.access-capability-operation {
    padding: 4px 6px;
    background: oklch(0.949 0.008 104.8);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.access-capability-operation.is-write {
    color: var(--danger);
    background: oklch(0.974 0.026 42.8);
    border-color: rgba(181, 92, 66, 0.28);
}

.access-capability-item.is-enabled .access-capability-state {
    color: oklch(0.381 0.082 145.6);
}

.access-row-scope-control {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: oklch(0.947 0.008 104.8);
    border: 1px solid var(--line);
    border-radius: 7px;
}

.access-row-scope-option {
    min-height: 28px;
    padding: 4px 9px;
    color: var(--faint);
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
}

.access-row-scope-option:hover,
.access-row-scope-option:focus-visible {
    border-color: var(--line-strong);
}

.access-row-scope-option:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.access-row-scope-option.active {
    color: var(--text);
    background: oklch(0.995 0.005 78.3);
    border-color: var(--line);
}

.access-tool-grants,
.access-tool-status,
.access-tool-action {
    min-width: 0;
}

.access-grant-meter-wrap {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.access-grant-meter-wrap strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.access-grant-meter {
    overflow: hidden;
    width: 100%;
    height: 4px;
    display: block;
    background: oklch(0.909 0.014 110.0);
    border-radius: 999px;
}

.access-grant-meter span {
    height: 100%;
    display: block;
    background: var(--green);
    border-radius: inherit;
}

.access-grant-empty {
    color: var(--muted);
    font-size: 12px;
}

.access-status-pill {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    color: var(--muted);
    background: oklch(0.949 0.008 104.8);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.access-status-pill::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
}

.access-status-pill.is-full {
    color: oklch(0.381 0.082 145.6);
    background: oklch(0.970 0.027 144.1);
    border-color: oklch(0.750 0.050 145.6);
}

.access-status-pill.is-partial {
    color: oklch(0.488 0.092 76.7);
    background: oklch(0.974 0.032 89.1);
    border-color: oklch(0.866 0.075 88.7);
}

.access-status-pill.is-needs-setup {
    color: var(--danger);
    background: oklch(0.974 0.026 42.8);
    border-color: rgba(181, 92, 66, 0.34);
}

.access-status-pill.is-stale {
    color: var(--danger);
    background: oklch(0.974 0.026 42.8);
    border-color: rgba(181, 92, 66, 0.34);
}

.access-row-chevron,
.access-row-action-button {
    min-width: 34px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    font-weight: 850;
    text-decoration: none;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
}

.access-row-action-button {
    min-width: 70px;
    padding: 6px 10px;
    font-size: 11px;
    text-transform: uppercase;
}

.access-row-chevron:hover,
.access-row-chevron:focus-visible,
.access-row-action-button:hover,
.access-row-action-button:focus-visible {
    border-color: var(--line-strong);
}

.access-row-chevron:focus-visible,
.access-row-action-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.access-row-action-button.is-primary {
    color: var(--danger);
    background: oklch(0.995 0.005 78.3);
    border-color: rgba(181, 92, 66, 0.36);
}

.agent-access-page {
    display: grid;
    gap: 18px;
}

.agent-access-control-plane {
    gap: 20px;
}

.agent-access-summary-grid {
    margin-bottom: 0;
}

.access-summary-tile.is-success strong {
    color: var(--green);
}

.agent-access-note {
    margin: 0;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 14px;
    font-style: italic;
    line-height: 1.4;
}

.agent-access-note a {
    color: var(--accent);
    font-family: var(--sans);
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
    text-decoration: none;
}

.agent-access-note a:hover,
.agent-access-note a:focus-visible {
    text-decoration: underline;
}

.agent-access-section {
    display: grid;
    gap: 12px;
}

.agent-access-section-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.agent-access-section-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--violet-tint);
    border: 1px solid var(--violet-rule);
    border-radius: 6px;
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.agent-access-section-icon.is-danger {
    color: var(--red-fg);
    background: var(--red-tint);
    border-color: var(--red-rule);
}

.agent-access-section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text);
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 850;
    line-height: 1.05;
}

.agent-access-section-header h3 span {
    min-width: 20px;
    padding: 2px 7px;
    color: var(--accent);
    background: var(--violet-tint);
    border: 1px solid var(--violet-rule);
    border-radius: 999px;
    font: 850 10px/1 var(--sans);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.agent-access-section-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.agent-access-setup-list {
    display: grid;
    gap: 8px;
}

.agent-access-setup-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.agent-access-setup-card.is-needs-setup {
    background: var(--red-tint);
    border-color: var(--red-rule);
}

.agent-access-setup-card > div:first-child {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.agent-access-setup-card strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
}

.agent-access-setup-card small {
    flex-basis: 100%;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-access-setup-action {
    display: flex;
    justify-content: flex-end;
}

.agent-access-tool-table {
    background: oklch(0.995 0.005 78.3);
}

.agent-access-tool-table-header {
    display: grid;
    grid-template-columns: minmax(260px, 1.55fr) minmax(180px, 0.75fr) minmax(130px, 0.55fr) 28px;
    align-items: center;
    min-height: 38px;
    padding: 0 18px;
}

.agent-access-tool-table-header span:nth-child(2),
.agent-access-tool-table-header span:nth-child(3) {
    justify-self: start;
}

.agent-access-tool-table-header::after {
    content: "";
}

.agent-access-tool-row {
    display: block;
    border-top: 1px solid var(--line);
}

.agent-access-tool-row:first-of-type {
    border-top: 0;
}

.agent-access-tool-row summary {
    min-height: 64px;
    display: grid;
    grid-template-columns: minmax(260px, 1.55fr) minmax(180px, 0.75fr) minmax(130px, 0.55fr) 28px;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    list-style: none;
    cursor: pointer;
}

.agent-access-tool-row summary::-webkit-details-marker {
    display: none;
}

.agent-access-tool-row summary:hover {
    background: oklch(0.982 0.006 93.2);
}

.agent-access-tool-row summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.agent-access-tool-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.agent-access-tool-main span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.agent-access-tool-main strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-access-tool-main small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-access-tool-grants,
.agent-access-tool-status {
    min-width: 0;
}

.agent-access-tool-chevron {
    justify-self: end;
    color: var(--faint);
    font-size: 18px;
    font-weight: 850;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 120ms ease;
}

.agent-access-tool-row[open] .agent-access-tool-chevron {
    transform: rotate(90deg);
}

.agent-access-tool-detail {
    padding: 0 18px 16px 52px;
}

.agent-access-capability-heading {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 8px;
    color: var(--faint);
    border-top: 1px solid oklch(0.929 0.009 97.2);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.agent-access-enable-all {
    min-height: 26px;
    padding: 4px 8px;
    color: var(--green-deep);
    font: 850 11px/1 var(--sans);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
}

.agent-access-enable-all:hover,
.agent-access-enable-all:focus-visible {
    background: var(--green-tint);
    border-color: var(--green-rule);
}

.agent-access-enable-all:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.agent-access-capability-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 0;
}

.agent-access-capability-item {
    position: relative;
    min-width: 0;
    min-height: 36px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content 34px;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid oklch(0.929 0.009 97.2);
}

.agent-access-capability-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.agent-access-capability-copy strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-access-capability-copy small {
    min-width: 0;
    overflow: hidden;
    color: var(--faint);
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-access-capability-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.agent-access-switch {
    justify-self: end;
    width: 30px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    padding: 2px;
    background: oklch(0.885 0.012 100.4);
    border: 1px solid oklch(0.820 0.014 100.4);
    border-radius: 999px;
    transition: background 120ms ease, border-color 120ms ease;
}

.agent-access-switch::before {
    content: "";
    width: 14px;
    height: 14px;
    display: block;
    background: oklch(0.995 0.005 78.3);
    border-radius: inherit;
    box-shadow: 0 1px 2px rgba(33, 31, 24, 0.18);
    transition: transform 120ms ease;
}

.agent-access-capability-input:checked + .agent-access-switch {
    background: oklch(0.421 0.095 145.6);
    border-color: oklch(0.421 0.095 145.6);
}

.agent-access-capability-input:checked + .agent-access-switch::before {
    transform: translateX(12px);
}

.agent-access-capability-input:focus-visible + .agent-access-switch {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.agent-access-capability-input:disabled + .agent-access-switch {
    opacity: 0.55;
}

.agent-access-capability-item.is-unavailable {
    opacity: 0.72;
}

.agent-access-tool-empty {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.agent-access-tool-row.is-inherited .agent-access-capability-heading,
.agent-access-tool-row.is-inherited .agent-access-tool-detail {
    color: var(--faint);
}

@media (max-width: 960px) {
    .access-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .access-summary-tile:nth-child(2) {
        border-right: 0;
    }

    .access-summary-tile:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .access-list-toolbar {
        grid-template-columns: 1fr;
    }

    .access-list-filters {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .access-tool-table-header {
        display: none;
    }

    .access-tool-row {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 12px;
        padding: 14px 16px;
    }

    .access-tool-action {
        justify-self: start;
    }

    .access-grant-meter-wrap {
        max-width: 240px;
    }

    .agent-access-tool-table-header {
        display: none;
    }

    .agent-access-tool-row summary {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 10px;
        padding: 14px 16px;
    }

    .agent-access-tool-status {
        justify-self: start;
    }

    .agent-access-tool-chevron {
        display: none;
    }

    .agent-access-tool-detail {
        padding: 0 16px 16px;
    }

    .agent-access-capability-grid {
        grid-template-columns: 1fr;
    }

    .agent-access-setup-card {
        grid-template-columns: 1fr;
    }

    .agent-access-setup-action {
        justify-content: flex-start;
    }
}

.integration-access-card {
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 16px;
    color: var(--text);
    text-decoration: none;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

button.integration-access-card {
    width: 100%;
    appearance: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.scoped-access-card {
    align-content: stretch;
}

.integration-access-card-main {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 0;
    color: var(--text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    background: transparent;
    border: 0;
}

button.integration-access-card-main {
    cursor: pointer;
}

.integration-access-card:hover {
    background: oklch(0.984 0.007 97.3);
    border-color: var(--line-strong);
}

.integration-access-card:focus-visible,
.integration-access-card-main:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.integration-access-card span {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integration-access-card small,
.integration-access-card strong {
    min-width: 0;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integration-access-card small {
    color: var(--muted);
    font-size: 12px;
}

.integration-access-card strong {
    color: var(--faint);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.integration-access-card.setup-needed {
    border-color: rgba(181, 92, 66, 0.38);
}

.integration-access-card.setup-needed strong {
    color: var(--amber);
}

.tool-scope-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, max-content);
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.integration-access-card .tool-scope-label {
    color: var(--faint);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.tool-scope-option {
    min-height: 28px;
    padding: 5px 8px;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}

.tool-scope-option:hover,
.tool-scope-option:focus-visible {
    border-color: var(--line-strong);
}

.tool-scope-option:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.tool-scope-option.active {
    color: var(--text);
    background: oklch(0.970 0.027 144.1);
    border-color: oklch(0.685 0.038 140.0);
}

.grouped-integration-access-card {
    align-content: start;
}

.integration-access-sub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.integration-access-sub-links a {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 7px;
    color: var(--text);
    text-decoration: none;
    background: rgba(255, 253, 250, 0.84);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.integration-access-sub-links a:hover,
.integration-access-sub-links a:focus-visible {
    border-color: var(--line-strong);
}

.integration-access-sub-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.integration-access-sub-links span,
.integration-access-sub-links strong {
    min-width: 0;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integration-access-sub-links span {
    font-size: 11px;
    font-weight: 750;
}

.integration-access-sub-links strong {
    color: var(--faint);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.google-calendar-access-card {
    border-left: 4px solid var(--accent);
}

.google-calendar-access-card.setup-needed {
    border-left-color: var(--amber);
}

.google-calendar-access-card.setup-needed strong {
    color: var(--amber);
}

.integration-access-detail {
    display: grid;
    gap: 14px;
}

.integration-access-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.integration-access-detail-header > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.integration-access-detail-header h3 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integration-scope-editor {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.google-calendar-grant-editor {
    gap: 14px;
}

.access-grant-group {
    display: grid;
    gap: 10px;
}

.access-grant-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.access-grant-group-header strong {
    min-width: 0;
    color: var(--text);
    line-height: 1.25;
}

.optional-workspace-grants {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.optional-workspace-grants summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.optional-workspace-grants .checkbox-grid {
    margin-top: 10px;
}

.notion-access-editor {
    gap: 16px;
}

.notion-access-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.notion-access-summary > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.notion-access-summary strong {
    color: var(--text);
    font-size: 14px;
}

.notion-access-summary span:not(.status-badge) {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.notion-brief-requirement,
.workflow-notion-hint {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.notion-brief-requirement.ready,
.workflow-notion-hint.ready {
    border-color: rgba(47, 107, 79, 0.4);
}

.notion-brief-requirement.missing,
.workflow-notion-hint.missing {
    background: oklch(0.984 0.017 84.6);
}

.notion-brief-requirement-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.notion-brief-requirement-header > div,
.workflow-notion-hint > div:first-child {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.notion-brief-requirement-header strong,
.workflow-notion-hint > div:first-child strong {
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
}

.notion-brief-requirement-header span:not(.status-badge),
.workflow-notion-hint > div:first-child span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.notion-brief-requirement-list,
.workflow-notion-hint-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.notion-brief-requirement-list > span,
.workflow-notion-hint-list > span {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 8px;
    background: oklch(0.977 0.005 117.9);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.notion-brief-requirement-list > span.ready,
.workflow-notion-hint-list > span.ready {
    background: oklch(0.962 0.012 153.7);
    border-color: rgba(47, 107, 79, 0.3);
}

.notion-brief-requirement-list strong,
.workflow-notion-hint-list strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notion-brief-requirement-list small,
.workflow-notion-hint-list small {
    min-width: 0;
    overflow: hidden;
    color: var(--faint);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notion-brief-requirement p,
.workflow-notion-hint p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.notion-access-group-list,
.notion-access-group,
.notion-access-option-list {
    display: grid;
    gap: 10px;
}

.notion-access-group {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.notion-access-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.notion-access-group-header h4 {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
}

.notion-access-group-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.notion-access-option {
    display: grid;
    grid-template-columns: minmax(190px, 0.7fr) minmax(0, 1.3fr);
    gap: 12px;
    padding: 12px;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.notion-access-option.enabled {
    border-color: rgba(47, 107, 79, 0.38);
}

.notion-access-option.limited {
    background: oklch(0.984 0.017 84.6);
}

.notion-access-toggle {
    min-width: 0;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    color: var(--text);
}

.notion-access-toggle input,
.notion-approval-row input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--accent);
}

.notion-access-toggle span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.notion-access-toggle strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.25;
}

.notion-access-toggle small {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--faint);
    font-size: 10px;
}

.notion-access-copy {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.notion-access-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.notion-access-meta,
.notion-action-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.notion-action-pill {
    display: inline-flex;
    max-width: 100%;
    padding: 3px 6px;
    color: oklch(0.450 0.018 145.3);
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 5px;
    font-size: 10px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.notion-approval-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.access-detail-warning {
    margin-top: 12px;
}

.tool-access-item {
    align-items: flex-start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: oklch(0.964 0.010 93.6);
}

.tool-access-item span,
.access-source span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.tool-access-item strong,
.access-source strong {
    color: var(--text);
}

.tool-access-item small {
    color: var(--muted);
    font-size: 11px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.check-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.admin-scope-row {
    align-items: flex-start;
}

.admin-scope-row strong,
.admin-scope-row small {
    display: block;
}

.admin-scope-row strong {
    color: var(--text);
    font-size: 12px;
}

.admin-scope-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.status-badge,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge.success,
.pill.success {
    color: oklch(0.458 0.085 153.0);
    border-color: oklch(0.877 0.053 149.3);
    background: oklch(0.968 0.017 151.1);
}

.status-badge.warning,
.pill.warning {
    color: oklch(0.488 0.092 76.7);
    border-color: oklch(0.866 0.075 88.7);
    background: oklch(0.974 0.032 89.1);
}

.status-badge.danger,
.pill.danger {
    color: oklch(0.499 0.117 34.7);
    border-color: oklch(0.820 0.059 39.6);
    background: oklch(0.968 0.017 44.8);
}

.status-badge.info,
.pill.info {
    color: oklch(0.474 0.054 247.2);
    border-color: oklch(0.877 0.020 235.8);
    background: oklch(0.967 0.011 243.7);
}

.mono {
    font-family: var(--mono);
    font-size: 12px;
}

.pill.mono {
    white-space: normal;
    overflow-wrap: anywhere;
}

.database-editor-summary {
    margin-top: 18px;
}

.database-copy-audit-panel {
    margin-top: 16px;
}

.database-copy-audit-summary {
    margin: 0;
}

.database-copy-audit-table th:last-child,
.database-copy-audit-table td:last-child {
    width: auto;
}

.database-copy-audit-table td {
    vertical-align: top;
}

.database-editor-search {
    width: min(320px, 100%);
}

.database-editor-panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: min(520px, 100%);
}

.database-editor-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.database-editor-warning strong {
    color: var(--text);
}

.database-policy-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 360px;
}

.database-editor-table th:last-child,
.database-editor-table td:last-child {
    width: 168px;
}

.database-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.database-row-editor-modal {
    width: min(1120px, calc(100vw - 48px));
}

.database-row-editor-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.database-row-editor-body .field.wide,
.database-row-editor-body .inline-error {
    grid-column: 1 / -1;
}

.database-row-editor-body textarea {
    min-height: 96px;
}

.database-row-editor-body textarea.mono-textarea {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
}

.database-checkbox-field {
    align-self: end;
    min-height: 38px;
}

.tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin: 2px 0 16px;
    border-bottom: 1px solid var(--line);
}

.tab {
    min-height: 38px;
    padding: 9px 12px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
}

.tab:hover,
.tab.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.tab-purpose {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin: -4px 0 18px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
}

.tab-purpose > span {
    margin-top: 2px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.tab-purpose h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
}

.tab-purpose p {
    max-width: 860px;
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.memory-system-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.memory-system-card {
    display: grid;
    align-content: space-between;
    gap: 10px;
    min-height: 132px;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.memory-system-card > div:first-child {
    display: grid;
    gap: 4px;
}

.memory-system-card > div:first-child > span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.memory-system-card strong {
    color: var(--text);
    font-size: 15px;
}

.memory-system-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.memory-system-link-card {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.memory-system-link-card:hover,
.memory-system-link-card:focus-visible {
    border-color: var(--accent);
    background: var(--surface);
}

.memory-system-link-card:focus-visible,
.memory-surface-panel:focus-visible {
    outline: 3px solid rgba(73, 122, 86, 0.18);
    outline-offset: 2px;
}

.memory-surface-panel {
    margin-top: 16px;
    scroll-margin-top: 18px;
}

.memory-surface-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.memory-digest-view {
    display: grid;
    gap: 12px;
}

.memory-digest-meta-card {
    display: inline-grid;
    gap: 3px;
    justify-self: flex-start;
    padding: 9px 11px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.memory-digest-meta-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.memory-digest-meta-card strong {
    color: var(--text);
    font-size: 13px;
}

.memory-digest-summary {
    max-width: 78ch;
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.memory-digest-sections {
    display: grid;
    gap: 12px;
}

.memory-digest-section {
    overflow: hidden;
    background: oklch(0.997 0.005 95.1);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.memory-digest-section h3 {
    margin: 0;
    padding: 10px 12px;
    color: var(--text);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.memory-digest-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.memory-digest-item {
    display: grid;
    grid-template-columns: minmax(72px, 96px) minmax(0, 1fr);
    gap: 12px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
}

.memory-digest-item:last-child {
    border-bottom: 0;
}

.memory-digest-item.raw {
    background: oklch(0.978 0.033 94.0);
}

.memory-digest-item-label {
    align-self: start;
    width: fit-content;
    max-width: 100%;
    padding: 3px 7px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
}

.memory-digest-item-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.memory-digest-item-copy strong {
    color: var(--text);
    font-size: 13px;
}

.memory-digest-item-copy p,
.memory-digest-item-copy span,
.memory-digest-empty {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.memory-digest-empty {
    padding: 11px 12px;
}

.memory-digest-raw summary,
.memory-digest-item-raw summary {
    width: fit-content;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
}

.memory-digest-raw pre,
.memory-digest-item-raw pre {
    max-height: 260px;
    overflow: auto;
    margin: 8px 0 0;
    padding: 10px;
    color: oklch(0.277 0.018 165.7);
    background: oklch(0.997 0.005 95.1);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.memory-digest-block {
    max-height: 360px;
    overflow: auto;
    margin: 0;
    padding: 12px;
    color: oklch(0.277 0.018 165.7);
    background: oklch(0.997 0.005 95.1);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.schedule-summary-grid {
    margin-bottom: 16px;
}

.schedule-table {
    min-width: 1120px;
}

.schedule-table .table-actions {
    justify-content: flex-start;
}

.schedule-actions {
    flex-wrap: wrap;
    min-width: 210px;
}

.schedule-run-list {
    display: grid;
    gap: 6px;
    min-width: 210px;
}

.schedule-run-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.schedule-modal {
    width: min(760px, calc(100vw - 32px));
}

.schedule-modal-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.schedule-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

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

.schedule-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.schedule-cron-field input:disabled {
    opacity: 0.58;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 14px;
}

.integration-setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 14px;
}

.integration-setup-card .panel-body {
    display: grid;
    gap: 14px;
}

.employee-scoped-integrations-panel {
    margin-bottom: 14px;
}

.employee-integration-setup-focus {
    margin-bottom: 14px;
}

.employee-scoped-integration-list {
    display: grid;
}

.employee-scoped-integration-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 0.8fr)) minmax(180px, auto);
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.employee-scoped-integration-row:last-child {
    border-bottom: 0;
}

.employee-scoped-integration-row.connected {
    background: oklch(0.984 0.008 139.4);
}

.employee-scoped-integration-provider,
.employee-scoped-integration-cell {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.employee-scoped-integration-provider strong,
.employee-scoped-integration-cell strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-scoped-integration-provider span,
.employee-scoped-integration-cell small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-scoped-integration-cell > span:first-child {
    color: var(--faint);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.employee-scoped-integration-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.integration-workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.integration-status-tile {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
    min-height: 150px;
    padding: 12px;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.integration-status-tile > span:first-child,
.scope-review > span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.integration-status-tile strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.integration-status-tile small {
    min-height: 34px;
    overflow-wrap: anywhere;
    color: var(--muted);
    line-height: 1.4;
}

.scope-tile details {
    margin-top: 2px;
}

.scope-tile summary,
.integration-settings summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 12px;
}

.scope-review {
    display: grid;
    gap: 7px;
    margin-top: 8px;
}

.integration-next-actions,
.integration-capability-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.integration-settings {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: oklch(0.964 0.010 93.6);
}

.integration-settings form {
    margin-top: 12px;
}

.mcp-connections-panel .panel-body {
    padding: 0;
}

.mcp-connection-list {
    display: grid;
}

.mcp-connection-row {
    display: grid;
    grid-template-columns: minmax(210px, 1.2fr) minmax(180px, 0.9fr) minmax(140px, 0.7fr) minmax(190px, 1fr) minmax(220px, 1.2fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.mcp-connection-row:last-child {
    border-bottom: 0;
}

.mcp-connection-provider {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.mcp-provider-mark {
    width: 42px;
    height: 34px;
    display: grid;
    place-items: center;
    color: oklch(0.406 0.065 160.2);
    background: oklch(0.951 0.021 152.2);
    border: 1px solid oklch(0.874 0.036 151.7);
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 800;
}

.mcp-connection-provider strong,
.mcp-connection-provider span,
.mcp-connection-cell strong,
.mcp-connection-cell small {
    min-width: 0;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mcp-connection-provider strong,
.mcp-connection-cell strong {
    color: var(--text);
    font-size: 13px;
}

.mcp-connection-provider span,
.mcp-connection-cell small {
    color: var(--muted);
    font-size: 12px;
}

.mcp-connection-cell,
.mcp-connection-capabilities {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.mcp-connection-cell > span,
.mcp-connection-capabilities > span {
    color: var(--faint);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.mcp-connection-cell .status-badge {
    width: max-content;
}

.mcp-connection-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-document-page-wide {
    width: min(1120px, calc(100vw - 64px));
    margin: 0 auto;
    padding: 50px 0 92px;
}

.document-summary-grid {
    margin-bottom: 16px;
}

.document-toolbar {
    margin-bottom: 14px;
}

.document-list-panel .panel-body {
    padding: 0;
}

.admin-document-list {
    overflow: hidden;
    display: grid;
    background: oklch(0.997 0.005 95.1);
    border: 1px solid oklch(0.895 0.011 136.6);
    border-radius: 8px;
}

.admin-document-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.15fr) minmax(140px, 0.72fr) minmax(190px, 1fr) minmax(180px, 0.9fr) minmax(240px, 1.2fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.admin-document-row:last-child {
    border-bottom: 0;
}

.admin-document-identity {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.admin-document-mark {
    width: 42px;
    height: 34px;
    display: grid;
    place-items: center;
    color: oklch(0.406 0.065 160.2);
    background: oklch(0.951 0.021 152.2);
    border: 1px solid oklch(0.874 0.036 151.7);
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 800;
}

.admin-document-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    text-align: left;
}

.admin-document-copy strong,
.admin-document-copy span,
.admin-document-cell strong,
.admin-document-cell small {
    min-width: 0;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-document-copy strong,
.admin-document-cell strong {
    color: var(--text);
    font-size: 13px;
}

.admin-document-copy span,
.admin-document-cell small {
    color: var(--muted);
    font-size: 12px;
}

.admin-document-cell,
.admin-document-capabilities {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.admin-document-cell > span,
.admin-document-capabilities > span {
    color: var(--faint);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-document-cell .status-badge,
.admin-document-cell .role-badge {
    width: max-content;
}

.admin-document-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.document-row-details {
    grid-column: 1 / -1;
    margin-top: 2px;
}

.document-note {
    display: grid;
    gap: 3px;
    padding: 13px 16px;
    color: var(--muted);
    background: oklch(0.977 0.005 117.9);
    border-top: 1px solid var(--line);
    font-size: 12px;
}

.document-note strong {
    color: var(--text);
    font-size: 13px;
}

.workflow-approval-callout {
    margin-bottom: 14px;
}

.workflows-console {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    background: oklch(0.985 0.005 95.1);
}

.workflow-index-pane {
    min-width: 0;
    min-height: 100vh;
    background: oklch(0.973 0.007 97.4);
    border-right: 1px solid oklch(0.897 0.006 211.0);
}

.workflow-index-header {
    display: grid;
    gap: 10px;
    padding: 28px 18px 14px;
}

.workflow-index-kicker,
.workflow-breadcrumb,
.workflow-stat span,
.workflow-steps-heading span,
.workflow-step-legend,
.workflow-index-meta {
    color: oklch(0.578 0.010 225.2);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workflow-index-header h1 {
    margin: 0;
    color: oklch(0.190 0.005 248.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 750;
    line-height: 0.98;
}

.workflow-index-header h1 span {
    color: oklch(0.578 0.010 225.2);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
}

.workflow-index-header p {
    margin: 0;
    color: oklch(0.510 0.006 145.5);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-style: italic;
    line-height: 1.35;
}

.workflow-new-button {
    width: 100%;
    min-height: 33px;
    margin-top: 4px;
    color: oklch(1.000 0.000 89.9);
    background: oklch(0.203 0.005 248.1);
    border: 1px solid oklch(0.203 0.005 248.1);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 850;
}

.workflow-index-list {
    display: grid;
    border-top: 1px solid oklch(0.897 0.006 211.0);
}

.workflow-index-item {
    border-bottom: 1px solid oklch(0.897 0.006 211.0);
}

.workflow-index-link {
    display: grid;
    gap: 7px;
    min-height: 104px;
    padding: 17px 18px 16px;
    color: var(--text);
    text-decoration: none;
}

.workflow-index-item.active .workflow-index-link {
    background: oklch(0.942 0.030 148.4);
    border-left: 3px solid oklch(0.479 0.078 161.1);
    padding-left: 15px;
}

.workflow-index-link:hover {
    background: oklch(0.958 0.007 124.4);
}

.workflow-index-title-row {
    min-width: 0;
    display: block;
}

.workflow-index-title {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
}

.workflow-index-title strong {
    min-width: 0;
    overflow: hidden;
    display: block;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-index-title:hover strong,
.workflow-index-title:focus-visible strong,
.workflow-index-description:hover,
.workflow-index-description:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.workflow-index-title:focus-visible,
.workflow-index-description:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.workflow-index-dot,
.workflow-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    background: oklch(0.479 0.078 161.1);
    border-radius: 50%;
}

.workflow-index-description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: oklch(0.407 0.009 151.7);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-style: italic;
    line-height: 1.25;
    text-decoration: none;
}

.workflow-detail-pane {
    min-width: 0;
    min-height: 100vh;
    overflow: auto;
    background: oklch(0.985 0.005 95.1);
}

.workflow-detail-content {
    width: min(820px, calc(100vw - 600px));
    min-width: 640px;
    margin: 0 auto;
    padding: 0 0 72px;
}

.workflow-detail-header {
    display: grid;
    gap: 28px;
    padding-top: 0;
}

.workflow-detail-topbar {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid oklch(0.913 0.006 128.5);
}

.workflow-breadcrumb strong {
    color: oklch(0.214 0.006 156.7);
}

.workflow-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workflow-action-button {
    min-height: 28px;
    padding: 5px 10px;
    color: oklch(0.203 0.005 248.1);
    background: oklch(0.997 0.005 95.1);
    border: 1px solid oklch(0.897 0.006 211.0);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.workflow-action-button.primary {
    color: oklch(0.192 0.007 229.3);
    background: oklch(1.000 0.000 89.9);
}

.workflow-detail-title-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.workflow-status-dot {
    margin-top: 13px;
    box-shadow: 0 0 0 5px rgba(47, 107, 79, 0.08);
}

.workflow-detail-title-row h2 {
    margin: 0;
    color: oklch(0.214 0.006 156.7);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 750;
    line-height: 1.05;
}

.workflow-detail-title-row p {
    margin: 8px 0 0;
    color: oklch(0.437 0.008 145.4);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-style: italic;
    line-height: 1.35;
}

.workflow-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 26px;
    padding: 23px 0 20px;
    border-top: 1px solid oklch(0.897 0.006 211.0);
    border-bottom: 1px solid oklch(0.897 0.006 211.0);
}

.workflow-stat {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.workflow-stat strong {
    min-width: 0;
    overflow: hidden;
    display: block;
    color: oklch(0.192 0.007 229.3);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-steps-pane {
    margin-top: 34px;
}

.workflow-steps-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 7px;
    border-bottom: 1px solid oklch(0.897 0.006 211.0);
}

.workflow-steps-heading h3 {
    margin: 0;
    color: oklch(0.214 0.006 156.7);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.1;
}

.workflow-step-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 18px 0 18px;
}

.workflow-step-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.workflow-legend-icon {
    color: oklch(0.479 0.078 161.1);
    font-family: var(--mono);
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.workflow-step-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow-step {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    gap: 16px;
    position: relative;
    padding-bottom: 28px;
}

.workflow-step-rail {
    display: grid;
    justify-items: center;
    position: relative;
}

.workflow-step-rail::after {
    content: "";
    position: absolute;
    top: 36px;
    bottom: -28px;
    left: 50%;
    width: 2px;
    background: oklch(0.896 0.007 208.8);
    transform: translateX(-50%);
}

.workflow-step.is-last .workflow-step-rail::after {
    display: none;
}

.workflow-step-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: oklch(0.434 0.065 160.7);
    background: oklch(0.942 0.030 148.4);
    border: 1px solid oklch(0.853 0.051 152.3);
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.workflow-step-icon.is-fetch,
.workflow-legend-icon.is-fetch {
    color: oklch(0.590 0.229 280.1);
}

.workflow-step-icon.is-fetch {
    background: oklch(0.942 0.030 290.0);
    border-color: oklch(0.840 0.085 288.9);
}

.workflow-step-icon.is-generate,
.workflow-legend-icon.is-generate {
    color: oklch(0.192 0.007 229.3);
}

.workflow-step-icon.is-generate {
    background: oklch(0.997 0.005 95.1);
    border-color: oklch(0.911 0.008 139.4);
}

.workflow-step-icon.is-decision,
.workflow-legend-icon.is-decision {
    color: oklch(0.568 0.113 77.8);
}

.workflow-step-icon.is-decision {
    background: oklch(0.971 0.034 88.8);
    border-color: oklch(0.826 0.114 86.0);
}

.workflow-step-icon.is-write,
.workflow-legend-icon.is-write {
    color: oklch(0.519 0.122 36.9);
}

.workflow-step-icon.is-write {
    background: oklch(0.965 0.018 43.2);
    border-color: oklch(0.765 0.085 37.3);
}

.workflow-step-icon.is-human,
.workflow-legend-icon.is-human {
    color: oklch(0.262 0.009 173.5);
}

.workflow-step-icon.is-human {
    background: oklch(0.983 0.004 134.8);
    border-color: oklch(0.888 0.013 137.8);
}

.workflow-step-main {
    min-width: 0;
    padding-top: 1px;
}

.workflow-step-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 18px;
}

.workflow-step-badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 6px;
    color: oklch(0.406 0.065 160.2);
    background: oklch(0.942 0.030 148.4);
    border: 1px solid oklch(0.853 0.051 152.3);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.workflow-step-badge.is-fetch {
    color: oklch(0.493 0.202 279.0);
    background: oklch(0.942 0.030 290.0);
    border-color: oklch(0.840 0.085 288.9);
}

.workflow-step-badge.is-generate {
    color: oklch(0.255 0.014 163.7);
    background: oklch(0.983 0.004 134.8);
    border-color: oklch(0.897 0.006 211.0);
}

.workflow-step-badge.is-decision {
    color: oklch(0.522 0.104 76.4);
    background: oklch(0.971 0.034 88.8);
    border-color: oklch(0.826 0.114 86.0);
}

.workflow-step-badge.is-write {
    color: oklch(0.519 0.122 36.9);
    background: oklch(0.965 0.018 43.2);
    border-color: oklch(0.765 0.085 37.3);
}

.workflow-step-badge.is-human,
.workflow-step-badge.is-checkpoint {
    color: oklch(0.458 0.013 167.3);
    background: oklch(0.983 0.004 134.8);
    border-color: oklch(0.897 0.006 211.0);
}

.workflow-step-main h4 {
    margin: 4px 0 2px;
    color: oklch(0.214 0.006 156.7);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
}

.workflow-step-main p {
    margin: 0;
    color: oklch(0.324 0.013 164.1);
    font-size: 14px;
    line-height: 1.35;
}

.workflow-step-main code {
    width: max-content;
    max-width: 100%;
    overflow: hidden;
    display: block;
    padding: 2px 5px;
    color: oklch(0.316 0.009 145.4);
    background: oklch(0.948 0.007 97.4);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-step-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.workflow-step-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
    padding: 2px 8px;
    color: oklch(0.458 0.013 167.3);
    background: oklch(0.948 0.007 97.4);
    border: 1px solid oklch(0.881 0.008 98.9);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.workflow-step-number {
    color: oklch(0.609 0.011 164.7);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 800;
    text-align: right;
}

.workflow-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.workflow-toolbar .employee-search {
    width: min(320px, 100%);
}

.available-skills-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.available-skills-toolbar .segmented-actions {
    flex: 0 0 auto;
}

.available-skills-search {
    width: min(360px, 100%);
    margin-left: auto;
}

.skill-library-document-row {
    grid-template-columns: minmax(240px, 1.2fr) minmax(116px, 0.48fr) minmax(170px, 0.7fr) minmax(112px, 0.45fr) minmax(260px, 0.95fr);
}

.skill-library-document-name:hover strong,
.skill-library-document-name:focus-visible strong {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.skill-library-document-name:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.skill-library-actions {
    align-items: center;
    min-width: 0;
}

.workflow-document-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 18px 18px 20px;
}

.workflow-document-heading {
    min-width: 0;
    width: max-content;
    max-width: 100%;
    overflow: hidden;
    display: block;
    color: var(--text);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-document-heading:hover,
.workflow-document-heading:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.workflow-document-heading:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.workflow-row-flow {
    min-width: 0;
}

.workflow-flow-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
    background: oklch(0.997 0.005 95.1);
    border: 1px solid oklch(0.895 0.011 136.6);
    border-radius: 8px;
}

.workflow-flow-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.workflow-flow-heading span {
    color: var(--faint);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.workflow-flow-heading strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-flowchart-shell {
    min-width: 0;
    overflow-x: auto;
    padding: 2px 2px 8px;
}

.workflow-flowchart {
    --flow-line: oklch(0.579 0.022 226.0);
    min-width: max-content;
    display: flex;
    align-items: center;
    gap: 34px;
    padding: 10px 3px;
}

.workflow-flowchart.compact {
    gap: 28px;
}

.workflow-flow-group {
    min-width: 156px;
    position: relative;
    display: grid;
    gap: 15px;
    align-content: center;
}

.workflow-flowchart.compact .workflow-flow-group {
    min-width: 126px;
}

.workflow-flow-group:not(.is-terminal)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 34px;
    height: 2px;
    background: var(--flow-line);
    transform: translateY(-50%);
}

.workflow-flowchart.compact .workflow-flow-group:not(.is-terminal)::after {
    width: 28px;
}

.workflow-flow-arrow {
    position: absolute;
    top: 50%;
    left: calc(100% + 28px);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--flow-line);
    transform: translateY(-50%);
}

.workflow-flowchart.compact .workflow-flow-arrow {
    left: calc(100% + 22px);
}

.workflow-flow-group.is-branch {
    min-width: 176px;
}

.workflow-flowchart.compact .workflow-flow-group.is-branch {
    min-width: 150px;
}

.workflow-flow-group.is-branch::before {
    content: "";
    position: absolute;
    top: 26px;
    bottom: 26px;
    left: -17px;
    border-left: 2px solid var(--flow-line);
}

.workflow-flow-node {
    position: relative;
    width: 100%;
    min-height: 78px;
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 10px 11px;
    color: oklch(0.237 0.015 166.2);
    background: oklch(0.945 0.014 174.2);
    border: 1.5px solid oklch(0.572 0.045 172.1);
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(30, 36, 31, 0.04);
}

.workflow-flowchart.compact .workflow-flow-node {
    min-height: 68px;
    padding: 8px 9px;
}

.workflow-flow-group.is-branch .workflow-flow-node::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 100%;
    width: 17px;
    height: 2px;
    background: var(--flow-line);
    transform: translateY(-50%);
}

.workflow-flow-node.is-trigger,
.workflow-flow-node.is-result {
    background: oklch(0.937 0.021 178.3);
    border-color: oklch(0.552 0.055 174.4);
}

.workflow-flow-node.is-input {
    background: oklch(0.957 0.007 160.1);
    border-color: oklch(0.642 0.020 166.0);
}

.workflow-flow-node.is-review {
    background: oklch(0.781 0.088 307.6);
    border-color: oklch(0.585 0.104 305.0);
}

.workflow-flow-node strong {
    min-width: 0;
    overflow: hidden;
    color: oklch(0.232 0.016 168.4);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-flow-node span {
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: oklch(0.355 0.024 166.5);
    font-size: 10.5px;
    line-height: 1.35;
}

.workflow-flowchart.detailed .workflow-flow-node span {
    -webkit-line-clamp: 4;
}

.workflow-flow-node code {
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.35;
}

.workflow-edit-form {
    display: grid;
    gap: 16px;
}

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

.workflow-edit-grid .wide {
    grid-column: 1 / -1;
}

.workflow-edit-grid textarea[name="instructions"] {
    min-height: 220px;
}

.workflow-edit-grid textarea[name="default_constraints"] {
    min-height: 180px;
    font-family: var(--mono);
    font-size: 12px;
}

.workflow-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

.permission-account-row {
    grid-template-columns: minmax(220px, 1.1fr) minmax(140px, 0.7fr) minmax(150px, 0.75fr) minmax(280px, 1.4fr) auto;
}

.readiness-panel {
    margin-bottom: 18px;
}

.readiness-list {
    display: grid;
}

.readiness-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 16px;
    border-top: 1px solid var(--line);
}

.readiness-item:first-child {
    border-top: 0;
}

.readiness-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.readiness-copy span {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.readiness-action {
    display: flex;
    justify-content: flex-end;
}

.maintenance-action-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.maintenance-action-item .status-badge {
    white-space: normal;
}

.maintenance-summary {
    margin: 0;
    font-size: 12px;
}

.kv-list {
    display: grid;
    gap: 10px;
}

.kv-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.kv-item:last-child {
    border-bottom: 0;
}

.kv-item span:first-child {
    color: var(--faint);
}

.workflow-type-kv-item {
    align-items: center;
}

.workflow-type-select {
    width: min(100%, 320px);
    min-height: 38px;
    padding: 8px 34px 8px 10px;
    color: var(--text);
    background: oklch(0.997 0.005 95.1);
    border: 1px solid var(--line);
    border-radius: 7px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
}

.workflow-type-select:focus {
    box-shadow: var(--focus-ring);
    outline: none;
}

.trigger-command-kv-item {
    align-items: start;
}

.workflow-trigger-control {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.workflow-edit-trigger-control {
    align-content: start;
}

.workflow-trigger-command-panel,
.workflow-trigger-event-panel {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.workflow-trigger-command-panel[hidden],
.workflow-trigger-event-panel[hidden] {
    display: none;
}

.field-sub-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.workflow-event-trigger-editor {
    min-width: 0;
    display: grid;
    gap: 10px;
}

.workflow-event-setup {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    background: oklch(0.975 0.009 100.0);
    border: 1px solid var(--line);
    border-radius: 7px;
}

.workflow-event-setup > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.workflow-event-setup span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 800;
}

.workflow-event-setup strong {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trigger-command-value {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trigger-command-value strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trigger-command-editor {
    min-width: 0;
    display: grid;
}

.trigger-command-editor input {
    width: 100%;
}

.employee-console {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(304px, 336px);
    margin: -26px -28px -36px;
    background: oklch(0.985 0.005 95.1);
}

.employee-console-main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    border-right: 1px solid var(--line);
}

.employee-console-header {
    min-height: 74px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 23px 24px 14px;
    border-bottom: 1px solid var(--line);
}

.section-eyebrow {
    color: oklch(0.631 0.017 136.1);
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.employee-console .page-title {
    gap: 5px;
}

.employee-console .page-title h1 {
    font-size: 20px;
    line-height: 1.05;
}

.employee-console .page-title p {
    max-width: 720px;
    color: oklch(0.385 0.016 141.7);
    font-size: 11px;
    line-height: 1.35;
}

.invite-button {
    flex: 0 0 auto;
    min-height: 31px;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.employee-toolbar {
    min-height: 46px;
    display: grid;
    grid-template-columns: minmax(180px, 260px) auto 1fr;
    gap: 9px;
    align-items: center;
    padding: 9px 20px;
    border-bottom: 1px solid var(--line);
}

.employees-document .button.document-action-button {
    color: oklch(0.985 0.003 248.1);
    background: oklch(0.180 0.005 248.1);
    border-color: oklch(0.180 0.005 248.1);
}

.access-directory-summary {
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 26px 0 22px;
    background: oklch(0.985 0.005 95.1);
    border: 1px solid oklch(0.887 0.010 211.0);
    border-radius: 11px;
}

.access-directory-summary-tile {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 18px 22px;
    border-right: 1px solid oklch(0.887 0.010 211.0);
}

.access-directory-summary-tile:last-child {
    border-right: 0;
}

.access-directory-summary-tile strong {
    color: var(--text);
    font-size: 25px;
    font-weight: 850;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.access-directory-summary-tile span {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.access-directory-summary-tile.is-success strong {
    color: oklch(0.472 0.082 145.6);
}

.access-directory-summary-tile.is-danger strong {
    color: var(--danger);
}

.access-directory-summary-tile.is-accent strong {
    color: var(--accent);
}

.access-directory-toolbar.employee-toolbar {
    grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
    gap: 48px;
    padding: 0;
    margin-bottom: 12px;
    border-bottom: 0;
}

.access-directory-toolbar .employee-role-filters {
    justify-self: stretch;
}

.employee-search {
    position: relative;
    display: block;
}

.employee-search > span:not(.sr-only) {
    position: absolute;
    left: 10px;
    top: 50%;
    color: var(--faint);
    font-size: 12px;
    transform: translateY(-50%);
}

.employee-search .search-input {
    min-height: 28px;
    padding: 6px 10px 6px 28px;
    background: oklch(0.964 0.010 93.6);
    border-color: oklch(0.870 0.016 90.2);
    border-radius: 7px;
    font-size: 11px;
}

.employee-role-filters {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px;
    background: oklch(0.952 0.010 93.6);
    border: 1px solid oklch(0.882 0.016 90.2);
    border-radius: 7px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.employee-role-filters::-webkit-scrollbar {
    display: none;
}

.role-filter {
    flex: 0 0 auto;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    color: oklch(0.557 0.016 138.7);
    background: transparent;
    border: 0;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}

.role-filter strong {
    min-width: 18px;
    color: var(--accent);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.role-filter:hover,
.role-filter.active {
    color: var(--text);
    background: oklch(0.995 0.005 78.3);
    box-shadow: 0 1px 2px rgba(33, 31, 24, 0.08);
}

.employee-result-count {
    justify-self: end;
    color: var(--faint);
    font-size: 11px;
    white-space: nowrap;
}

.access-directory-table-wrap {
    overflow: auto;
    background: oklch(0.997 0.005 95.1);
    border: 1px solid oklch(0.887 0.010 211.0);
    border-radius: 8px 8px 0 0;
    -webkit-overflow-scrolling: touch;
}

.access-directory-table {
    min-width: 960px;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.access-directory-table th,
.access-directory-table td {
    min-width: 0;
    padding: 12px 18px;
    border-bottom: 1px solid oklch(0.887 0.010 211.0);
    vertical-align: middle;
}

.access-directory-table th {
    color: var(--faint);
    background: oklch(0.968 0.007 93.6);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-align: left;
    text-transform: uppercase;
}

.access-directory-table tbody tr:last-child td {
    border-bottom: 0;
}

.access-directory-table th:first-child,
.access-directory-table td:first-child {
    width: 24%;
}

/* Role */
.access-directory-table th:nth-child(2),
.access-directory-table td:nth-child(2) {
    width: 11%;
}

/* Status */
.access-directory-table th:nth-child(3),
.access-directory-table td:nth-child(3) {
    width: 12%;
}

/* Access Health */
.access-directory-table th:nth-child(4),
.access-directory-table td:nth-child(4) {
    width: 24%;
}

/* Messages */
.access-directory-table th:nth-child(5),
.access-directory-table td:nth-child(5) {
    width: 10%;
    text-align: right;
}

/* First Used */
.access-directory-table th:nth-child(6),
.access-directory-table td:nth-child(6) {
    width: 9%;
}

/* Last Active */
.access-directory-table th:nth-child(7),
.access-directory-table td:nth-child(7) {
    width: 10%;
}

.access-directory-table th:last-child,
.access-directory-table td:last-child {
    width: 38px;
    padding-left: 8px;
    text-align: right;
}

.access-directory-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.access-directory-status i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: var(--green);
    border-radius: 50%;
}

.access-directory-status.is-setup_needed i {
    background: var(--amber);
}

.access-directory-status.is-inactive i {
    background: var(--faint);
}

.access-directory-health {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.access-directory-health strong {
    width: max-content;
    max-width: 100%;
    overflow: hidden;
    color: oklch(0.381 0.082 145.6);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-directory-health.is-needs_setup strong {
    color: var(--danger);
}

.access-directory-health span,
.access-directory-last-active {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
}

.access-directory-summary--usage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.access-directory-metric {
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.access-directory-first-used {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
}

.access-directory-open {
    min-width: 24px;
    min-height: 24px;
    color: var(--faint);
    background: transparent;
    border: 0;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
}

.access-directory-open:hover,
.access-directory-open:focus-visible {
    color: var(--text);
    background: oklch(0.952 0.010 93.6);
}

@media (max-width: 840px) {
    .access-directory-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .access-directory-summary-tile:nth-child(2) {
        border-right: 0;
    }

    .access-directory-summary-tile:nth-child(-n + 2) {
        border-bottom: 1px solid oklch(0.887 0.010 211.0);
    }

    .access-directory-toolbar.employee-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.employee-table-wrap {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.employee-directory-table {
    min-width: 620px;
    table-layout: fixed;
}

.employee-directory-table th:first-child,
.employee-directory-table td:first-child {
    width: 34%;
}

.employee-directory-table th:nth-child(2),
.employee-directory-table td:nth-child(2),
.employee-directory-table th:nth-child(3),
.employee-directory-table td:nth-child(3),
.employee-directory-table th:nth-child(5),
.employee-directory-table td:nth-child(5) {
    width: 96px;
}

.employee-directory-table th:nth-child(4),
.employee-directory-table td:nth-child(4) {
    width: 116px;
}

.employee-directory-table th:last-child,
.employee-directory-table td:last-child {
    width: 44px;
    text-align: right;
}

.employee-directory-table th,
.employee-directory-table td {
    padding: 9px 14px;
    vertical-align: middle;
}

.employee-directory-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: oklch(0.967 0.010 93.6);
    font-size: 9px;
    letter-spacing: 0;
}

.employee-directory-table tbody tr {
    background: oklch(0.985 0.005 95.1);
}

.employee-directory-table tbody tr.selected {
    background: oklch(0.943 0.028 138.7);
    box-shadow: inset 3px 0 0 var(--accent);
}

.employee-directory-table tbody tr.selected td {
    border-bottom-color: oklch(0.902 0.039 145.2);
}

.employee-member {
    min-width: 0;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}

.employee-avatar {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    color: oklch(0.390 0.068 158.2);
    background: oklch(0.922 0.027 155.9);
    border: 1px solid oklch(0.887 0.035 155.9);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
}

.employee-avatar.editor {
    color: oklch(0.434 0.059 160.8);
    background: oklch(0.941 0.028 150.4);
}

.employee-avatar.admin {
    color: oklch(0.389 0.061 164.0);
    background: oklch(0.909 0.038 152.4);
}

.employee-avatar.member {
    color: oklch(0.446 0.035 92.5);
    background: oklch(0.921 0.032 87.3);
}

.employee-avatar.viewer {
    color: oklch(0.483 0.021 245.7);
    background: oklch(0.917 0.011 234.8);
}

.employee-avatar.large {
    width: 32px;
    height: 32px;
    font-size: 10px;
}

.employee-member-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    text-align: left;
}

.employee-member-copy strong,
.employee-member-copy span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-member-copy strong {
    font-size: 11px;
}

.employee-member-copy span {
    color: oklch(0.549 0.017 142.2);
    font-size: 10px;
}

.role-badge,
.compact-pill {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 3px 7px;
    color: oklch(0.393 0.022 142.7);
    background: oklch(0.943 0.010 93.6);
    border: 1px solid oklch(0.883 0.018 89.4);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.nav-item .pill {
    flex: 0 0 auto;
    min-height: 18px;
    padding: 2px 6px;
    font-size: 10px;
}

.role-badge.admin,
.role-badge.editor {
    color: oklch(0.458 0.085 153.0);
    background: oklch(0.931 0.034 149.3);
    border-color: oklch(0.877 0.053 149.3);
}

.role-badge.viewer {
    color: oklch(0.494 0.019 245.3);
    background: oklch(0.933 0.008 228.9);
    border-color: oklch(0.886 0.011 226.0);
}

.compact-pill.invited {
    color: oklch(0.565 0.109 74.5);
    background: oklch(0.969 0.036 87.8);
    border-color: oklch(0.869 0.075 85.9);
}

.table-menu-button {
    width: 26px;
    height: 26px;
    min-height: 26px;
    color: oklch(0.500 0.018 139.4);
    background: transparent;
    border-color: transparent;
    font-weight: 800;
}

.employee-inspector {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    gap: 13px;
    padding: 18px 15px 0;
    overflow: auto;
    background: oklch(0.976 0.007 97.4);
    -webkit-overflow-scrolling: touch;
}

.empty-inspector {
    grid-template-rows: 1fr;
    align-items: center;
    padding: 28px;
}

.empty-inspector h2 {
    margin: 4px 0 6px;
    font-size: 16px;
}

.inspector-profile {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 24px;
    gap: 10px;
    align-items: center;
}

.inspector-profile strong,
.inspector-profile span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inspector-profile strong {
    font-size: 12px;
}

.inspector-profile span {
    color: oklch(0.532 0.023 142.9);
    font-size: 10px;
}

.inspector-close {
    width: 24px;
    height: 24px;
    min-height: 24px;
    color: oklch(0.497 0.017 142.2);
    background: transparent;
    border: 0;
}

.inspector-section,
.capabilities-panel,
.danger-zone {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.inspector-label {
    color: oklch(0.611 0.017 136.1);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

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

.role-card {
    position: relative;
    min-height: 55px;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 10px 12px 10px 10px;
    color: var(--text);
    text-decoration: none;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line);
    border-radius: 7px;
}

.role-card:hover {
    border-color: oklch(0.844 0.043 149.5);
}

.role-card.active {
    background: oklch(0.942 0.030 148.4);
    border-color: oklch(0.868 0.059 149.6);
}

.role-card strong {
    min-width: 0;
    padding-right: 14px;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.1;
}

.role-card span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: oklch(0.512 0.021 147.9);
    font-size: 10px;
    line-height: 1.3;
}

.role-card-check {
    position: absolute;
    right: 9px;
    top: 9px;
    width: 8px;
    height: 5px;
    border-left: 1.5px solid oklch(0.464 0.089 150.4);
    border-bottom: 1.5px solid oklch(0.464 0.089 150.4);
    transform: rotate(-45deg);
}

.capabilities-panel {
    min-height: 0;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.capability-list {
    min-width: 0;
    display: grid;
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow: hidden;
    background: oklch(0.995 0.005 78.3);
}

.capability-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 9px;
    align-items: center;
    padding: 10px 11px;
    color: var(--text);
    text-decoration: none;
    border-top: 1px solid var(--line);
}

.capability-row:first-child {
    border-top: 0;
}

.capability-row:hover {
    background: oklch(0.976 0.007 97.4);
}

.capability-row strong,
.capability-row small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.capability-row strong {
    font-size: 11px;
    line-height: 1.2;
}

.capability-row small {
    margin-top: 2px;
    color: oklch(0.540 0.022 140.5);
    font-size: 10px;
    line-height: 1.3;
}

.toggle {
    justify-self: end;
    width: 25px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    padding: 2px;
    background: oklch(0.863 0.015 128.7);
    border-radius: 999px;
}

.toggle span {
    width: 10px;
    height: 10px;
    background: oklch(0.995 0.005 78.3);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(33, 31, 24, 0.18);
}

.toggle.on {
    justify-content: flex-end;
    background: oklch(0.521 0.079 149.2);
}

.danger-zone {
    padding: 11px;
    background: oklch(0.959 0.009 84.6);
    border: 1px solid oklch(0.886 0.018 89.4);
    border-radius: 7px;
}

.danger-zone > span {
    color: oklch(0.602 0.016 132.6);
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.small-button {
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 750;
}

.inspector-savebar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    margin: 0 -15px;
    padding: 9px 15px;
    background: oklch(0.995 0.005 78.3);
    border-top: 1px solid var(--line);
}

.saved-state {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    color: oklch(1.000 0.000 89.9);
    background: oklch(0.522 0.078 148.2);
    border-radius: 5px;
    font-size: 9px;
    font-weight: 800;
}

.json-block {
    max-height: 420px;
    margin: 0;
    padding: 12px;
    overflow: auto;
    color: oklch(0.301 0.015 141.2);
    background: oklch(0.984 0.007 97.3);
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
}

.details-inline {
    margin-top: 8px;
}

.details-inline summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 12px;
}

.details-inline .json-block {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.approvals-table {
    min-width: 1180px;
}

.approvals-table th:first-child,
.approvals-table td:first-child {
    width: 42%;
    min-width: 460px;
}

.approval-details {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.approval-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.approval-detail-section {
    min-width: 0;
    padding: 10px;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.approval-detail-section h3 {
    margin: 0 0 8px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.approval-detail-section dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.approval-detail-section dl > div {
    display: grid;
    gap: 2px;
    padding-left: 8px;
    border-left: 2px solid rgba(32, 37, 31, 0.1);
}

.approval-detail-section dt {
    color: var(--faint);
    font-size: 11px;
}

.approval-detail-section dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-wrap;
}

.approval-detail-section .approval-detail-warning {
    border-left-color: rgba(228, 173, 66, 0.85);
}

.approval-detail-section .approval-detail-danger {
    border-left-color: rgba(240, 100, 100, 0.85);
}

.approval-payload-details {
    margin-top: 0;
}

.empty-state,
.loading-state {
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(32, 29, 22, 0.42);
}

.modal {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.modal.small {
    width: min(520px, 100%);
}

.modal.token-modal {
    width: min(640px, 100%);
}

.modal.skill-create-modal {
    width: min(1080px, calc(100vw - 48px));
}

.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.modal-footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.modal-footer-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.modal-header h2 {
    margin: 0;
    font-size: 16px;
}

.modal-body {
    padding: 16px;
}

.modal-copy {
    margin: 0 0 14px;
    color: var(--muted);
}

.confirm-impact-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.confirm-impact-item {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.confirm-impact-item span {
    color: var(--faint);
    font-size: 12px;
}

.confirm-impact-item strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
}

.confirm-payload {
    margin: 14px 0;
}

.confirm-field {
    margin-top: 14px;
}

.token-box {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.token-warning {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.token-warning strong {
    color: oklch(0.435 0.087 77.9);
}

.token-warning span {
    color: oklch(0.521 0.098 82.3);
    font-size: 12px;
    line-height: 1.4;
}

.token-copy-card + .token-copy-card {
    margin-top: 12px;
}

.token-copy-header,
.token-copy-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.token-copy-header strong {
    font-size: 13px;
}

.token-value {
    overflow-wrap: anywhere;
    color: var(--accent-strong);
    font-family: var(--mono);
    font-size: 12px;
}

.token-textarea {
    min-height: 136px;
    resize: vertical;
    color: oklch(0.301 0.015 141.2);
    background: oklch(0.984 0.007 97.3);
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.5;
}

.copy-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    color: var(--faint);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.copy-status.success {
    color: oklch(0.458 0.085 153.0);
    background: oklch(0.968 0.017 151.1);
    border-color: oklch(0.877 0.053 149.3);
}

.token-confirmation {
    flex: 1 1 280px;
    color: var(--text);
}

.warning-callout {
    padding: 10px 12px;
    color: oklch(0.488 0.092 76.7);
    background: oklch(0.974 0.032 89.1);
    border: 1px solid oklch(0.866 0.075 88.7);
    border-radius: 8px;
}

.skill-draft-panel {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.skill-draft-dropzone {
    position: relative;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 3px 10px;
    align-items: center;
    padding: 12px;
    color: oklch(0.455 0.021 147.8);
    background: oklch(0.997 0.005 95.1);
    border: 1px dashed oklch(0.816 0.029 143.7);
    border-radius: 8px;
    cursor: pointer;
}

.skill-draft-dropzone.dragging {
    background: oklch(0.968 0.017 151.1);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(47, 107, 79, 0.12);
}

.skill-draft-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.skill-draft-dropzone > span {
    grid-row: span 2;
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: oklch(1.000 0.000 89.9);
    background: var(--accent);
    border-radius: 6px;
    font-weight: 850;
    line-height: 1;
}

.skill-draft-dropzone strong {
    min-width: 0;
    color: oklch(0.232 0.020 147.9);
    font-size: 13px;
}

.skill-draft-dropzone small {
    min-width: 0;
    color: var(--faint);
    font-size: 12px;
    line-height: 1.35;
}

.skill-draft-image-list {
    display: grid;
    gap: 8px;
}

.skill-draft-image-chip {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    background: oklch(0.997 0.005 95.1);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.skill-draft-image-chip img {
    width: 52px;
    height: 38px;
    object-fit: cover;
    background: oklch(0.948 0.010 125.7);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.skill-draft-image-chip div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.skill-draft-image-chip strong,
.skill-draft-image-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skill-draft-image-chip strong {
    color: var(--text);
    font-size: 13px;
}

.skill-draft-image-chip span {
    color: var(--faint);
    font-size: 12px;
}

.draft-actions {
    display: flex;
    justify-content: flex-end;
}

.inline-error,
.inline-success {
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
}

.inline-error {
    color: oklch(0.499 0.117 34.7);
    background: oklch(0.968 0.017 44.8);
    border: 1px solid oklch(0.820 0.059 39.6);
}

.inline-success {
    color: oklch(0.458 0.085 153.0);
    background: oklch(0.968 0.017 151.1);
    border: 1px solid oklch(0.877 0.053 149.3);
}

.organization-tabs-panel {
    overflow: hidden;
}

.organization-tabs-header {
    align-items: flex-start;
    flex-wrap: wrap;
}

.organization-tabs {
    justify-content: flex-end;
}

.organization-tab-panel {
    min-height: 360px;
}

.organization-skills-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.organization-skills-toolbar > div {
    display: grid;
    gap: 3px;
}

.organization-skills-toolbar strong {
    font-size: 14px;
}

.organization-skills-toolbar span {
    color: var(--muted);
    font-size: 12px;
}

.organization-page-shell {
    display: grid;
    gap: 18px;
}

.organization-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    background: oklch(1.000 0.000 89.9);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.organization-hero-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.organization-hero h1 {
    margin: 0;
    color: var(--text);
    font-size: 26px;
    line-height: 1.08;
}

.organization-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
}

.organization-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.organization-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.organization-status-tile {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 14px;
    background: oklch(1.000 0.000 89.9);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.organization-status-tile span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.organization-status-tile strong {
    color: var(--text);
    font-size: 20px;
    line-height: 1.1;
}

.organization-status-tile small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-workspace {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.organization-rail {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 8px;
    padding: 8px;
    background: oklch(0.958 0.011 136.6);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.organization-rail-item {
    width: 100%;
    display: grid;
    gap: 4px;
    padding: 12px;
    color: var(--muted);
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
}

.organization-rail-item span {
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.organization-rail-item small {
    color: var(--faint);
    font-size: 11px;
}

.organization-rail-item:hover {
    background: rgba(255, 255, 255, 0.72);
    border-color: oklch(0.866 0.025 137.8);
}

.organization-rail-item.active {
    background: oklch(1.000 0.000 89.9);
    border-color: oklch(0.841 0.042 150.7);
    box-shadow: inset 3px 0 0 var(--accent), var(--shadow-soft);
}

.organization-rail-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.organization-main-panel {
    min-width: 0;
    overflow: hidden;
    background: oklch(1.000 0.000 89.9);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.organization-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: oklch(0.990 0.003 128.5);
    border-bottom: 1px solid var(--line);
}

.organization-main-header > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.organization-main-header h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.organization-main-panel .panel-body {
    padding: 18px;
}

.organization-main-panel .global-skill-list {
    border-top: 0;
}

.soul-draft-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.soul-review-update {
    gap: 14px;
}

.soul-review-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.soul-review-header > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.soul-review-header strong {
    color: var(--text);
    font-size: 14px;
}

.soul-review-header span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.soul-review-summary {
    max-width: 320px;
    padding: 6px 8px;
    color: oklch(0.363 0.025 153.9);
    background: oklch(0.960 0.013 141.8);
    border: 1px solid oklch(0.892 0.021 140.9);
    border-radius: 6px;
}

.soul-diff-view {
    overflow: hidden;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
}

.soul-diff-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: oklch(0.964 0.010 93.6);
    border-bottom: 1px solid var(--line);
}

.soul-diff-header strong {
    margin-right: auto;
    color: var(--text);
    font-size: 13px;
}

.soul-diff-header > span:not(.soul-diff-count) {
    color: var(--muted);
    font-size: 12px;
}

.soul-diff-count {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
}

.soul-diff-count.add {
    color: oklch(0.480 0.113 150.6);
    background: oklch(0.958 0.018 155.8);
    border-color: oklch(0.868 0.056 152.3);
}

.soul-diff-count.remove {
    color: oklch(0.467 0.145 29.5);
    background: oklch(0.966 0.016 26.6);
    border-color: oklch(0.823 0.052 28.7);
}

.soul-diff-body {
    max-height: min(58vh, 560px);
    overflow: auto;
    background: oklch(0.997 0.005 95.1);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.5;
}

.soul-diff-line {
    display: grid;
    grid-template-columns: 48px 48px 24px minmax(max-content, 1fr);
    min-width: max-content;
    border-bottom: 1px solid rgba(36, 40, 34, 0.045);
}

.soul-diff-line.context {
    background: oklch(0.997 0.005 95.1);
}

.soul-diff-line.add {
    background: oklch(0.964 0.018 155.8);
}

.soul-diff-line.remove {
    background: oklch(0.966 0.016 26.6);
}

.soul-diff-line.meta {
    color: oklch(0.535 0.014 164.4);
    background: oklch(0.965 0.006 128.5);
}

.soul-diff-line code,
.soul-diff-prefix,
.soul-diff-gutter {
    padding: 2px 8px;
}

.soul-diff-line code {
    min-width: 0;
    color: inherit;
    font: inherit;
    white-space: pre;
}

.soul-diff-gutter,
.soul-diff-prefix {
    color: oklch(0.608 0.013 161.8);
    text-align: right;
    user-select: none;
    border-right: 1px solid rgba(36, 40, 34, 0.08);
}

.soul-diff-prefix {
    text-align: center;
}

.soul-diff-line.add .soul-diff-prefix {
    color: oklch(0.480 0.113 150.6);
    font-weight: 750;
}

.soul-diff-line.remove .soul-diff-prefix {
    color: oklch(0.467 0.145 29.5);
    font-weight: 750;
}

.soul-diff-empty {
    padding: 16px;
    color: var(--muted);
    font-size: 13px;
}

.readonly-file-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.readonly-file-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.readonly-file-title h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.25;
}

.soul-inline-update {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: oklch(0.964 0.010 93.6);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.readonly-file {
    overflow: hidden;
    background: oklch(0.995 0.005 78.3);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
}

.readonly-file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: oklch(0.964 0.010 93.6);
    border-bottom: 1px solid var(--line);
}

.readonly-file-header > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.readonly-file-header strong {
    font-size: 13px;
}

.readonly-file-header span,
.readonly-file-meta {
    color: var(--muted);
    font-size: 12px;
}

.readonly-file-meta {
    flex: 0 0 auto;
}

.readonly-file-content {
    min-height: 180px;
    max-height: min(72vh, 720px);
    margin: 0;
    padding: 14px;
    overflow: auto;
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.readonly-file-content code {
    font: inherit;
}

.readonly-file-hidden-input {
    display: none;
}

.toast-root,
#toast-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 70;
    display: grid;
    gap: 8px;
}

.toast {
    width: min(360px, calc(100vw - 36px));
    padding: 11px 12px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.toast.error {
    border-color: rgba(240, 100, 100, 0.6);
}

.toast.warning {
    border-color: rgba(228, 173, 66, 0.62);
}

/* Broad admin UI refinement pass. Keep this near the end so legacy surfaces inherit the polish without markup churn. */

.imported-patterns-overview {
    display: grid;
    gap: 18px;
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.imported-patterns-overview.compact {
    margin-top: 0;
}

.imported-patterns-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.imported-patterns-heading h2 {
    margin: 2px 0 4px;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0;
}

.imported-patterns-heading p,
.imported-patterns-card span,
.api-provider-scaffold-note,
.provider-scaffold-summary span {
    margin: 0;
    color: var(--muted);
}

.section-kicker {
    display: block;
    color: var(--faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.imported-patterns-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.imported-patterns-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.imported-patterns-card {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.imported-patterns-card strong,
.provider-scaffold-summary strong {
    display: block;
    margin-bottom: 3px;
}

.imported-patterns-card span {
    display: block;
    font-size: 12px;
}

.imported-patterns-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.provider-scaffold-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid rgba(175, 118, 32, 0.36);
    border-radius: 8px;
    background: rgba(175, 118, 32, 0.08);
}

.api-provider-scaffold-note {
    margin-top: 6px;
    font-size: 12px;
}

.integration-setup-card.scaffolded {
    border-color: rgba(175, 118, 32, 0.36);
}

.provider-scaffold-callout {
    margin-bottom: 14px;
}

.pending-integration-list .skill-impact-item {
    border-color: rgba(175, 118, 32, 0.36);
}
body {
    background: var(--bg);
    text-rendering: optimizeLegibility;
}

.app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
    gap: 14px;
    padding: 14px 10px;
    background: oklch(0.949 0.010 93.6);
    border-right-color: var(--line);
}

.sidebar .brand-mark {
    width: 24px;
    height: 24px;
    background: transparent;
    border-radius: 0;
}

.sidebar-brand,
.sidebar-company {
    min-height: 32px;
    padding: 0 4px;
}

.admin-product-brand-section {
    display: grid;
    gap: 0;
}

.admin-product-brand {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    min-height: auto;
    padding: 2px 6px 4px;
    text-align: left;
}

.admin-product-brand-mark {
    grid-row: 1 / span 2;
    width: 58px;
    height: 58px;
    display: block;
    margin: 0;
    object-fit: contain;
}

.admin-product-brand-kicker {
    align-self: end;
    margin-left: 0;
    color: oklch(0.586 0.025 139.0);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.admin-product-brand strong {
    align-self: start;
    overflow: hidden;
    color: oklch(0.214 0.006 156.7);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.12;
    padding-bottom: 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-identity-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin: 0 0 5px;
    padding: 3px;
    color: var(--ink-1);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-identity-badge strong {
    width: 100%;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 2px 12px;
    color: inherit;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(30, 36, 31, 0.08);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-switcher {
    min-height: 54px;
    padding: 10px;
    background: oklch(1.000 0.000 89.9);
    border-color: oklch(0.891 0.023 137.3);
    box-shadow: var(--shadow-soft);
}

.agent-avatar {
    background: transparent;
    border-color: transparent;
}

.nav-list {
    gap: 18px;
}

.nav-section {
    gap: 5px;
}

.nav-section-label {
    padding: 0 10px 5px;
    color: oklch(0.591 0.023 138.5);
    font-size: 10px;
}

.nav-item {
    min-height: 32px;
    padding: 7px 9px;
    color: oklch(0.396 0.022 147.7);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
    border-color: oklch(0.866 0.025 137.8);
}

.nav-item.active {
    color: var(--accent-strong);
    background: oklch(1.000 0.000 89.9);
    border-color: oklch(0.841 0.042 150.7);
    box-shadow: inset 3px 0 0 var(--accent), var(--shadow-soft);
}

.sidebar-session {
    padding: 9px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid oklch(0.899 0.020 135.8);
}

.content {
    padding: 32px 36px 44px;
}

.page-header {
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    gap: 8px;
}

.login-panel h1,
.page-title h1 {
    font-size: 26px;
    line-height: 1.12;
}

.page-title p {
    max-width: 760px;
    color: oklch(0.484 0.021 142.7);
    font-size: 14px;
}

.summary-grid {
    gap: 14px;
    margin-bottom: 20px;
}

.metric,
.panel,
.tab-purpose,
.integration-status-tile,
.permission-template-panel,
.permission-advanced,
.integration-settings,
.integration-scope-editor,
.skill-preview-section,
.employee-skill-card,
.access-source,
.tool-access-item,
.modal,
.login-panel,
.boot-panel {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
}

.metric {
    padding: 16px;
}

.metric span {
    color: oklch(0.587 0.022 143.0);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.metric strong {
    margin-top: 8px;
    font-size: 26px;
}

.panel-header {
    padding: 16px 18px;
    background: oklch(0.990 0.003 128.5);
}

.panel-header h2,
.panel-header h3 {
    font-size: 16px;
    font-weight: 750;
}

.panel-body {
    padding: 18px;
}

.button {
    min-height: 38px;
    padding: 8px 13px;
    background: oklch(1.000 0.000 89.9);
    border-color: var(--line-strong);
    border-radius: 7px;
    font-weight: 650;
    box-shadow: 0 1px 0 rgba(30, 36, 31, 0.04);
}

.button:hover {
    background: oklch(0.977 0.006 128.5);
    border-color: oklch(0.685 0.038 140.0);
}

.button:focus-visible,
.nav-item:focus-visible,
.tab:focus-visible,
.role-filter:focus-visible,
.permission-template:focus-visible,
.global-skill-row:focus-visible,
.link-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.button.primary {
    color: oklch(1.000 0.000 89.9);
    background: var(--accent);
    border-color: var(--accent);
}

.button.primary:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.segmented-actions {
    gap: 6px;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.segmented-actions .button {
    min-height: 32px;
    box-shadow: none;
}

.segmented-actions .button.primary {
    box-shadow: 0 2px 8px rgba(47, 107, 79, 0.18);
}

.field,
.field-row {
    gap: 8px;
}

.field label,
.choice-label,
.switch-label {
    color: oklch(0.482 0.025 143.1);
    font-weight: 700;
}

.field input,
.field textarea,
.field select,
.header-actions select,
.skill-apply-form select,
.search-input {
    min-height: 38px;
    background: oklch(1.000 0.000 89.9);
    border-color: oklch(0.824 0.023 135.0);
    border-radius: 7px;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.header-actions select:focus,
.skill-apply-form select:focus,
.search-input:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

.data-table th {
    color: oklch(0.557 0.022 140.5);
    background: oklch(0.958 0.011 136.6);
    font-size: 11px;
    letter-spacing: 0.04em;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
}

.data-table tbody tr:hover {
    background: rgba(47, 107, 79, 0.055);
}

.status-badge,
.pill,
.run-summary {
    border-color: oklch(0.877 0.021 138.4);
    background: oklch(0.972 0.007 132.4);
    font-weight: 700;
}

.readonly-file-field-header {
    padding-bottom: 2px;
}

.readonly-file-title h3 {
    font-size: 18px;
}

.readonly-file {
    background: oklch(1.000 0.000 89.9);
    border-color: oklch(0.824 0.023 135.0);
    box-shadow: var(--shadow-soft);
}

.readonly-file-header {
    padding: 11px 14px;
    background: oklch(0.958 0.011 136.6);
}

.readonly-file-header strong {
    font-size: 13px;
    font-weight: 750;
}

.readonly-file-content {
    min-height: 220px;
    padding: 16px;
    background: oklch(0.993 0.003 128.5);
}

.soul-inline-update {
    background: oklch(0.971 0.009 134.9);
    border-color: oklch(0.868 0.027 138.3);
}

.organization-shell {
    grid-template-columns: 224px minmax(0, 1fr);
    background: oklch(0.985 0.005 95.1);
}

.organization-shell .content {
    min-height: 100vh;
    padding: 0;
    background: oklch(0.985 0.005 95.1);
}

.organization-sidebar {
    gap: 26px;
    padding: 14px 10px;
    background: oklch(0.949 0.010 93.6);
    border-right-color: var(--line);
    box-shadow: none;
}

.organization-sidebar .admin-product-brand {
    padding: 2px 6px 4px;
}

.organization-sidebar .admin-identity-badge {
    margin: 0;
}

.organization-sidebar-nav {
    display: grid;
    gap: 4px;
}

.organization-sidebar-section-label {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px 0 2px;
    padding: 0 0 5px;
    color: oklch(0.594 0.010 145.5);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 850;
    line-height: 1.25;
    text-transform: uppercase;
}

.organization-sidebar-section-label:first-child {
    margin-top: 0;
}

.organization-sidebar-item + .organization-sidebar-section-label {
    margin-top: 18px;
}

.organization-sidebar-item {
    width: 100%;
    min-height: 33px;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    color: oklch(0.515 0.009 216.7);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 13px;
    line-height: 1.12;
    text-align: left;
    text-decoration: none;
}

.organization-sidebar-item span:nth-child(2) {
    min-width: 0;
}

.organization-sidebar-item.company-agent-sidebar-item span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-sidebar-item:hover,
.organization-sidebar-item.active {
    color: oklch(0.192 0.007 229.3);
}

.organization-sidebar-item.active span:nth-child(2) {
    font-weight: 800;
}

.organization-sidebar-item.disabled {
    color: oklch(0.696 0.009 157.0);
}

.organization-sidebar-index {
    color: oklch(0.617 0.010 214.4);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.organization-sidebar-lock {
    color: oklch(0.631 0.008 164.8);
    font-size: 11px;
}

.organization-sidebar-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.organization-sidebar-footer {
    margin-top: auto;
    padding: 0 7px 18px;
}

.organization-sidebar .admin-view-marker {
    padding: 6px 0 0;
}

.organization-document-shell {
    min-height: 100vh;
    display: block;
    min-width: 0;
}

.organization-document-page {
    width: min(576px, calc(100vw - 64px));
    margin: 0 auto;
    padding: 50px 0 92px;
    min-width: 0;
}

.organization-document-page.admin-document-page-wide {
    width: min(1120px, calc(100vw - 64px));
}

#organization-soul-panel.organization-document-page {
    width: min(864px, calc(100vw - 64px));
}

#organization-instructions-panel.organization-document-page {
    width: min(1296px, calc(100vw - 64px));
}

#organization-skills-panel.organization-document-page {
    width: min(1120px, calc(100vw - 64px));
}

#organization-mcp-panel.organization-document-page {
    width: min(1120px, calc(100vw - 64px));
}

#api-integrations-panel.organization-document-page {
    width: min(864px, calc(100vw - 64px));
}

#workflows-panel.organization-document-page {
    width: min(1120px, calc(100vw - 64px));
}

#employee-detail-panel.organization-document-page {
    width: min(1120px, calc(100vw - 64px));
}

#employees-panel.organization-document-page {
    width: min(1040px, calc(100vw - 64px));
}

.organization-document-page-wide {
    width: min(864px, calc(100vw - 64px));
}

.organization-document-form {
    margin: 0;
}

.soul-document {
    color: oklch(0.188 0.009 240.4);
    background: transparent;
    border: 0;
    box-shadow: none;
}

.soul-document-header {
    display: grid;
    gap: 17px;
}

.soul-document-kicker {
    color: oklch(0.603 0.009 236.7);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.soul-document-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.soul-document-title-copy {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.soul-document h1 {
    margin: 0;
    color: oklch(0.190 0.005 248.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 0.96;
}

.soul-document-title-copy p {
    max-width: 640px;
    margin: 0;
    color: oklch(0.415 0.008 145.4);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-style: italic;
    line-height: 1.45;
}

.soul-document-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 3px;
}

.button.document-action-button {
    min-height: 28px;
    padding: 5px 10px;
    color: oklch(0.203 0.005 248.1);
    background: oklch(0.997 0.005 95.1);
    border-color: oklch(0.897 0.006 211.0);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.button.document-action-button:hover {
    background: oklch(0.971 0.006 128.5);
    border-color: oklch(0.851 0.009 188.1);
}

.document-action-button-icon {
    width: 11px;
    height: 11px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
}

.button.document-action-button.primary {
    color: oklch(1.000 0.000 89.9);
    background: var(--accent);
    border-color: var(--accent);
}

.button.document-action-button.primary:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.button.document-action-button.workflow-create-button {
    min-height: 34px;
    padding: 8px 16px;
    gap: 8px;
    color: var(--paper);
    background: var(--accent);
    border-color: var(--accent);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(92, 76, 163, 0.28);
    font-weight: 850;
}

.button.document-action-button.workflow-create-button:hover,
.button.document-action-button.workflow-create-button:focus-visible {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.button.document-action-button.workflow-create-button .document-action-button-icon {
    font-size: 12px;
}

.button.document-action-button.danger {
    color: oklch(0.437 0.135 30.7);
    border-color: oklch(0.817 0.048 37.8);
}

.button.document-action-button.danger:hover {
    color: oklch(0.370 0.112 29.9);
    background: oklch(0.975 0.013 41.2);
    border-color: oklch(0.716 0.084 36.1);
}

.soul-document-rule {
    height: 1px;
    margin: 21px 0 25px;
    background: oklch(0.897 0.006 211.0);
}

.soul-document-body {
    color: oklch(0.188 0.009 240.4);
    font-size: 15.5px;
    line-height: 1.78;
}

.soul-document-body p {
    margin: 0 0 24px;
}

.soul-document-body h2 {
    margin: 42px 0 14px;
    color: oklch(0.582 0.010 232.5);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

.soul-document-body ul,
.soul-document-body ol {
    margin: 0 0 32px;
    padding-left: 22px;
}

.soul-document-body li {
    margin: 0 0 9px;
    padding-left: 4px;
}

.soul-markdown-table-wrap {
    max-width: 100%;
    margin: 0 0 30px;
    overflow-x: auto;
    border: 1px solid oklch(0.897 0.006 211.0);
    border-radius: 7px;
    background: oklch(0.997 0.005 95.1);
}

.soul-markdown-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.45;
}

.soul-markdown-table th,
.soul-markdown-table td {
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
    border-right: 1px solid oklch(0.897 0.006 211.0);
    border-bottom: 1px solid oklch(0.897 0.006 211.0);
}

.soul-markdown-table th:last-child,
.soul-markdown-table td:last-child {
    border-right: 0;
}

.soul-markdown-table tr:last-child td {
    border-bottom: 0;
}

.soul-markdown-table th {
    color: oklch(1.000 0.000 89.9);
    background: oklch(0.337 0.058 261.2);
    font-size: 11px;
    font-weight: 850;
}

.soul-markdown-table tbody tr:nth-child(even) {
    background: oklch(0.981 0.005 258.3);
}

.soul-document-body code {
    padding: 1px 4px;
    background: oklch(0.959 0.004 134.8);
    border: 1px solid oklch(0.906 0.013 137.8);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.9em;
}

.soul-document-body pre {
    margin: 0 0 28px;
    padding: 14px 16px;
    overflow: auto;
    color: oklch(0.203 0.005 248.1);
    background: oklch(0.959 0.004 134.8);
    border: 1px solid oklch(0.906 0.013 137.8);
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
}

.soul-document-body pre code {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: inherit;
}

.soul-document-empty {
    color: oklch(0.538 0.010 161.1);
    font-style: italic;
}

.soul-document .soul-inline-update {
    margin: 22px 0 20px;
    background: oklch(0.997 0.005 95.1);
    border-color: oklch(0.894 0.016 126.8);
    box-shadow: none;
}

.soul-document-edit-field {
    margin-top: 24px;
}

.soul-document-title-edit-field {
    margin: 0;
}

.field .soul-document-title-editor {
    min-height: 54px;
    padding: 8px 10px;
    color: oklch(0.190 0.005 248.1);
    background: oklch(0.997 0.005 95.1);
    border-color: oklch(0.869 0.012 145.5);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.05;
}

.soul-document-editor {
    min-height: 520px;
    color: oklch(0.188 0.009 240.4);
    background: oklch(0.997 0.005 95.1);
    border-color: oklch(0.869 0.012 145.5);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.6;
}

#organization-soul-panel.organization-soul-file-page {
    width: min(1280px, calc(100vw - 64px));
    padding-top: 26px;
}

#organization-instructions-panel.organization-soul-file-page {
    padding-top: 26px;
}

.organization-soul-file-form {
    margin: 0;
}

.organization-soul-reader {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 220px;
    gap: 40px;
    align-items: start;
}

.soul-reader-sidebar,
.soul-reader-aside {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.soul-reader-sidebar {
    padding-right: 18px;
    border-right: 1px solid oklch(0.897 0.006 211.0);
}

.soul-reader-brand {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
}

.soul-reader-brand span,
.soul-reader-aside-label,
.soul-reader-file-section-label,
.soul-reader-file-group-label {
    color: oklch(0.579 0.011 238.6);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

.soul-reader-brand strong {
    color: oklch(0.190 0.005 248.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-style: italic;
    line-height: 1.05;
}

.soul-reader-brand p {
    margin: 0;
    color: oklch(0.566 0.010 150.6);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    font-style: italic;
    line-height: 1.35;
}

.soul-reader-search {
    display: block;
    margin-bottom: 24px;
}

.soul-reader-search input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    color: oklch(0.203 0.005 248.1);
    background: oklch(0.997 0.005 95.1);
    border: 1px solid oklch(0.897 0.006 211.0);
    border-radius: 7px;
    outline: none;
}

.soul-reader-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(47, 107, 79, 0.12);
}

.soul-reader-file-groups {
    display: grid;
    gap: 30px;
}

.soul-reader-file-section {
    display: grid;
    gap: 14px;
}

.soul-reader-file-section-label {
    display: block;
    color: oklch(0.265 0.011 187.3);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-style: italic;
    font-weight: 700;
    text-transform: none;
}

.soul-reader-section-groups {
    display: grid;
    gap: 22px;
}

.soul-reader-file-group {
    display: grid;
    gap: 8px;
}

.soul-reader-file-group-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.soul-reader-file-list {
    display: grid;
    gap: 2px;
}

.soul-reader-file {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    color: oklch(0.443 0.010 205.8);
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    text-align: left;
}

.soul-reader-file:hover {
    background: oklch(0.972 0.010 125.7);
}

.soul-reader-file.active {
    color: oklch(0.229 0.026 149.2);
    background: oklch(0.942 0.029 140.5);
    border-left-color: var(--accent);
}

.soul-reader-file-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 20px;
    margin-top: 1px;
    color: oklch(0.496 0.037 160.2);
    border: 1px solid oklch(0.822 0.027 150.7);
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
}

.soul-reader-file strong,
.soul-reader-file small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soul-reader-file strong {
    color: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
    white-space: nowrap;
}

.soul-reader-file small {
    display: -webkit-box;
    color: oklch(0.559 0.010 161.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    font-style: italic;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.soul-reader-document {
    min-width: 0;
    padding-top: 32px;
}

.soul-reader-header {
    gap: 14px;
}

.soul-reader-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.soul-reader-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: oklch(0.591 0.011 229.0);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
}

.soul-reader-body {
    font-size: 15.5px;
    line-height: 1.72;
}

.soul-reader-body h1 {
    margin: 0 0 12px;
    color: oklch(0.190 0.005 248.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.08;
}

.soul-reader-body h2 {
    margin: 34px 0 12px;
    color: oklch(0.203 0.005 248.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}

.soul-reader-body h3 {
    margin: 26px 0 10px;
    color: oklch(0.259 0.007 196.7);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.25;
}

.soul-reader-body p {
    margin-bottom: 20px;
}

.soul-reader-body ul,
.soul-reader-body ol {
    margin-bottom: 26px;
}

.soul-reader-aside {
    display: grid;
    gap: 28px;
    padding-left: 2px;
}

.soul-reader-aside-block {
    display: grid;
    gap: 12px;
}

.soul-reader-toc {
    display: grid;
    gap: 8px;
}

.soul-reader-toc button {
    width: 100%;
    color: oklch(0.331 0.010 207.1);
    background: transparent;
    border: 0;
    border-left: 2px solid oklch(0.897 0.006 211.0);
    padding: 2px 0 2px 10px;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
}

.soul-reader-toc .soul-reader-toc-level-3 {
    width: calc(100% - 16px);
    margin-left: 16px;
    color: oklch(0.450 0.010 205.8);
    font-size: 12.5px;
}

.soul-reader-toc button:hover {
    color: var(--accent);
    border-left-color: var(--accent);
}

.soul-reader-body h1,
.soul-reader-body h2,
.soul-reader-body h3 {
    scroll-margin-top: 24px;
}

.soul-reader-empty {
    margin: 0;
    color: oklch(0.572 0.010 161.1);
    font-size: 12px;
    font-style: italic;
}

.organization-document-edit-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.shared-skill-tab-summary {
    display: grid;
    gap: 3px;
    margin: 0 0 18px;
}

.shared-skill-tab-summary p {
    max-width: 760px;
    margin: 0;
    color: oklch(0.467 0.018 151.4);
    font-size: 13px;
    line-height: 1.45;
}

.organization-skills-document-list {
    display: grid;
    gap: 0;
    border-top: 1px solid oklch(0.897 0.006 211.0);
}

.organization-skills-document .global-skill-row {
    background: transparent;
    border-bottom-color: oklch(0.897 0.006 211.0);
}

.organization-skills-document .global-skill-row:hover {
    background: transparent;
}

.organization-skills-document .global-skill-row:last-child {
    border-bottom: 0;
}

.admin-workflow-section-stack {
    display: grid;
    gap: 22px;
}

.admin-workflow-section {
    display: grid;
    gap: 12px;
}

.admin-workflow-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.admin-workflow-section-header > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.admin-workflow-section-header h2 {
    margin: 0;
    color: oklch(0.582 0.010 232.5);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

.admin-workflow-section-header p {
    margin: 0;
    color: oklch(0.538 0.010 161.1);
    font-size: 13px;
    line-height: 1.45;
}

.admin-workflow-count {
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
}

.admin-workflow-list {
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.admin-workflow-database-list {
    overflow: visible;
    display: grid;
    gap: 14px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.admin-workflow-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    text-decoration: none;
}

.admin-workflow-row.with-command-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    padding: 12px 16px 14px;
}

.admin-workflow-row:last-child {
    border-bottom: 0;
}

.admin-workflow-row.inactive {
    background: oklch(0.987 0.005 106.5);
}

.admin-workflow-database-row {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    cursor: default;
}

.admin-workflow-database-row:last-child {
    border-bottom: 1px solid var(--line);
}

.admin-workflow-database-summary {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 16px 14px;
    border-bottom: 1px solid var(--line);
}

.admin-workflow-database-summary .admin-workflow-command-block {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: min(620px, 100%);
    margin: 0 auto;
}

.admin-workflow-database-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    background: var(--paper);
}

.admin-workflow-database-field {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
    padding: 11px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.admin-workflow-database-field:nth-child(3n),
.admin-workflow-database-field:last-child {
    border-right: 0;
}

.admin-workflow-database-field:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.admin-workflow-database-field.wide {
    grid-column: span 3;
    border-right: 0;
}

.admin-workflow-database-field dt,
.admin-workflow-database-field dd {
    min-width: 0;
    margin: 0;
}

.admin-workflow-database-field dt code {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0;
}

.admin-workflow-database-scalar,
.admin-workflow-database-json {
    color: var(--text);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.45;
}

.admin-workflow-database-scalar {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-workflow-database-scalar.is-null {
    color: var(--muted);
}

.admin-workflow-database-json {
    max-height: 144px;
    overflow: auto;
    margin: 0;
    padding: 8px 9px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    white-space: pre-wrap;
}

.admin-workflow-row-main {
    min-width: 0;
    width: 100%;
    min-height: 38px;
    display: grid;
    gap: 3px;
    align-items: center;
    padding: 8px 10px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    text-align: left;
    text-decoration: none;
}

.admin-workflow-row:hover .admin-workflow-row-main,
.admin-workflow-row:focus-visible .admin-workflow-row-main,
.admin-workflow-row-main:hover,
.admin-workflow-row-main:focus-visible {
    background: var(--surface-2);
    border-color: var(--line);
    outline: none;
}

.admin-workflow-row:focus-visible {
    outline: none;
}

.admin-workflow-row-main span {
    min-width: 0;
    overflow: hidden;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-workflow-row-main small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-workflow-row-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.admin-workflow-open-indicator {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-workflow-row:hover .admin-workflow-open-indicator,
.admin-workflow-row:focus-visible .admin-workflow-open-indicator {
    background: var(--text);
    border-color: var(--text);
    color: var(--paper);
}

.admin-workflow-command-badge {
    max-width: 180px;
    overflow: hidden;
    padding: 4px 7px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-workflow-command-block {
    position: relative;
    width: min(520px, 100%);
    justify-self: center;
    margin-top: 2px;
    padding: 10px 34px 9px;
    overflow: hidden;
    color: oklch(0.295 0.022 155.7);
    background: oklch(0.956 0.010 131.4);
    border: 1px solid oklch(0.900 0.019 133.1);
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.admin-workflow-command-block code {
    display: block;
    overflow-wrap: anywhere;
    white-space: normal;
}

.admin-workflow-command-copy {
    position: absolute;
    top: 5px;
    right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    color: oklch(0.472 0.031 141.6);
    background: oklch(0.989 0.005 117.9);
    border: 1px solid oklch(0.888 0.020 133.1);
    border-radius: 5px;
}

.admin-workflow-command-copy:hover,
.admin-workflow-command-copy:focus-visible {
    color: var(--text);
    background: oklch(1.000 0.000 89.9);
    border-color: var(--line-strong);
    outline: none;
}

.admin-workflow-command-copy:focus-visible {
    box-shadow: var(--focus-ring);
}

.admin-workflow-command-copy svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-workflow-command-list {
    border-color: var(--rule);
    border-radius: 8px;
    box-shadow: none;
}

.admin-workflow-command-row {
    --admin-workflow-family-color: var(--sidekick-purple);
    --admin-workflow-family-tint: var(--violet-tint);
    --admin-workflow-family-rule: var(--violet-rule);
    grid-template-columns: minmax(220px, 1fr) minmax(280px, auto);
    gap: 16px;
    min-height: 58px;
    padding: 0 16px;
    background: var(--paper);
}

.admin-workflow-command-row[data-workflow-family="engineering"] {
    --admin-workflow-family-color: var(--engineering-icon-blue);
    --admin-workflow-family-tint: var(--eng-tint);
    --admin-workflow-family-rule: var(--eng-rule);
}

.admin-workflow-command-row[data-workflow-family="research"] {
    --admin-workflow-family-color: var(--research-icon-gold);
    --admin-workflow-family-tint: var(--res-tint);
    --admin-workflow-family-rule: var(--res-rule);
}

.admin-workflow-command-row[data-workflow-family="ops"] {
    --admin-workflow-family-color: var(--ops-icon-brown);
    --admin-workflow-family-tint: var(--ops-tint);
    --admin-workflow-family-rule: var(--ops-rule);
}

.admin-workflow-command-row.inactive {
    background: var(--paper);
}

.admin-workflow-command-title {
    grid-template-columns: 10px minmax(0, 1fr);
    column-gap: 10px;
    min-height: 58px;
    padding: 0 4px;
}

.admin-workflow-command-title:hover,
.admin-workflow-command-title:focus-visible {
    background: transparent;
    border-color: transparent;
    text-decoration: underline;
    text-decoration-color: var(--violet-rule);
    text-underline-offset: 3px;
}

.admin-workflow-command-row:hover .admin-workflow-command-title,
.admin-workflow-command-row:focus-visible .admin-workflow-command-title {
    background: transparent;
    border-color: transparent;
}

.admin-workflow-command-title span {
    color: var(--ink-1);
    font-size: 15px;
    font-weight: 850;
}

.admin-workflow-family-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 999px;
    background: var(--sidekick-purple);
}

.admin-workflow-family-dot.is-engineering {
    background: var(--engineering-icon-blue);
}

.admin-workflow-family-dot.is-solutions {
    background: var(--solutions-icon-teal);
}

.admin-workflow-family-dot.is-ops {
    background: var(--ops-icon-brown);
}

.admin-workflow-family-dot.is-research {
    background: var(--research-icon-gold);
}

.slack-campaign-page .soul-document {
    gap: 18px;
}

.slack-campaign-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.slack-campaign-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
    gap: 14px;
    align-items: start;
}

.slack-campaign-create-panel,
.slack-campaign-list-panel,
.slack-campaign-detail-panel {
    min-width: 0;
}

.slack-campaign-list {
    display: grid;
    gap: 8px;
}

.slack-campaign-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.slack-campaign-row.active {
    border-color: var(--accent);
}

.slack-campaign-row-main {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.slack-campaign-row-main strong,
.slack-campaign-row-main span,
.slack-campaign-row-main small,
.slack-campaign-error {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.slack-campaign-row-main span,
.slack-campaign-row-main small,
.slack-campaign-row-metrics span {
    color: var(--muted);
    font-size: 12px;
}

.slack-campaign-row-metrics {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.slack-campaign-row-actions {
    display: flex;
    justify-content: flex-end;
}

.slack-campaign-detail-panel .panel-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.slack-campaign-recipient-table .row-title {
    max-width: 260px;
}

.slack-campaign-error {
    display: block;
    max-width: 320px;
    color: var(--red);
}

@media (max-width: 1180px) {
    .slack-campaign-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .slack-campaign-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .slack-campaign-row {
        grid-template-columns: 1fr;
    }

    .slack-campaign-row-metrics,
    .slack-campaign-row-actions {
        justify-content: flex-start;
    }
}

.admin-workflow-family-dot.is-sidekick {
    background: var(--sidekick-purple);
}

.admin-workflow-family-tabs {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px;
    overflow-x: auto;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-workflow-family-tab {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.admin-workflow-family-tab:hover,
.admin-workflow-family-tab:focus-visible {
    color: var(--ink-1);
    background: transparent;
    border-color: transparent;
    outline: none;
}

.admin-workflow-family-tab:focus-visible {
    box-shadow: var(--focus-ring);
}

.admin-workflow-family-tab.active {
    color: var(--ink-1);
    background: var(--paper);
    border-color: var(--line);
    box-shadow: 0 1px 2px rgba(30, 36, 31, 0.08);
}

.admin-workflow-family-tab strong {
    color: currentColor;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
}

.admin-skill-library-section {
    margin-top: 0;
}

.admin-skill-library-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-skill-family-tabs {
    flex: 0 1 auto;
}

.admin-skill-command-row {
    grid-template-columns: minmax(0, 1fr);
}

.admin-skill-command-title {
    font: inherit;
    cursor: pointer;
}

.admin-workflow-inline-command {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
    gap: 8px;
    justify-self: end;
    width: min(460px, 100%);
}

.admin-workflow-inline-trigger {
    min-width: 0;
    justify-self: end;
    width: min(360px, 100%);
}

.admin-workflow-inline-command code,
.admin-workflow-inline-trigger code {
    min-width: 0;
    overflow: hidden;
    display: block;
    padding: 0;
    color: var(--ink-2);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-workflow-inline-command code span,
.admin-workflow-inline-trigger code span {
    color: inherit;
    font-weight: 850;
}

.admin-workflow-inline-command .admin-workflow-command-copy {
    position: static;
    width: 32px;
    height: 32px;
    color: var(--ink-2);
    background: var(--surface-2);
    border-color: var(--rule);
}

.admin-workflow-inline-command .admin-workflow-command-copy svg {
    width: 16px;
    height: 16px;
}

.organization-mcp-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.organization-mcp-details {
    gap: 8px;
}

.organization-mcp-details:hover strong {
    text-decoration: none;
}

.organization-mcp-title-line {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.organization-mcp-subcopy {
    color: oklch(0.538 0.010 161.1);
}

.organization-mcp-capability-list {
    margin-top: 2px;
}

.organization-mcp-capability-list .pill {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-mcp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 118px;
}

.mcp-scope-tabs {
    margin: 0 0 22px;
}

.mcp-scope-tabs .tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.mcp-provider-directory-row {
    grid-template-columns: minmax(0, 1fr);
}

.mcp-provider-directory-details {
    gap: 10px;
}

.mcp-provider-summary-row {
    cursor: pointer;
}

.organization-skills-document .mcp-provider-summary-row:hover,
.mcp-provider-summary-row:hover {
    background: oklch(0.971 0.006 128.5);
}

.mcp-provider-summary-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.modal.mcp-provider-details-modal {
    width: min(920px, calc(100vw - 48px));
}

.mcp-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.mcp-detail-grid div {
    min-width: 0;
    padding: 12px;
    background: oklch(0.982 0.006 128.5);
    border: 1px solid oklch(0.897 0.006 211.0);
    border-radius: 7px;
}

.mcp-detail-grid dt,
.mcp-detail-section h3 {
    margin: 0 0 6px;
    color: oklch(0.603 0.009 236.7);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.25;
    text-transform: uppercase;
}

.mcp-detail-grid dd {
    min-width: 0;
    margin: 0;
    color: oklch(0.188 0.009 240.4);
    overflow-wrap: anywhere;
}

.mcp-detail-section {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.mcp-management-section {
    margin-top: 6px;
}

.mcp-management-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    background: oklch(0.982 0.006 128.5);
    border: 1px solid oklch(0.897 0.006 211.0);
    border-radius: 7px;
}

.mcp-management-card h3,
.mcp-management-card p {
    margin: 0;
}

.mcp-management-card p {
    color: oklch(0.464 0.011 161.0);
    font-size: 13px;
    line-height: 1.45;
}

.mcp-all-employee-access-card {
    align-items: flex-start;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.mcp-all-employee-access-card small {
    display: block;
    margin-top: 6px;
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.mcp-all-employee-access-copy {
    min-width: 0;
}

.mcp-provider-grant-scope {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mcp-provider-grant-scope > span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.mcp-provider-scope-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.mcp-provider-scope-option {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 9px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 7px;
}

.mcp-provider-scope-option input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--sidekick-purple);
}

.mcp-provider-scope-option strong,
.mcp-provider-scope-option small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.mcp-provider-scope-option strong {
    color: var(--ink-1);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
}

.mcp-provider-scope-option small,
.mcp-provider-scope-empty {
    color: var(--ink-3);
    font-size: 11px;
    line-height: 1.35;
}

.mcp-provider-scope-empty {
    margin: 10px 0 0;
}

.mcp-management-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.mcp-provider-connections {
    display: grid;
    gap: 0;
    margin-top: 8px;
    border-top: 1px solid oklch(0.897 0.006 211.0);
}

.mcp-provider-empty {
    margin: 0;
    padding-top: 12px;
    color: oklch(0.538 0.010 161.1);
    font-size: 13px;
    line-height: 1.5;
}

.mcp-provider-connection-line {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto minmax(170px, 1.1fr) minmax(190px, 1.2fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid oklch(0.952 0.006 137.8);
}

.mcp-provider-connection-line:last-child {
    border-bottom: 0;
}

.mcp-provider-connection-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.mcp-provider-connection-main strong,
.mcp-provider-connection-main small,
.mcp-provider-connection-line .mono,
.mcp-provider-connection-line .muted {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mcp-provider-connection-main strong {
    color: oklch(0.190 0.005 248.1);
    font-size: 13px;
}

.mcp-provider-connection-main small {
    color: oklch(0.538 0.010 161.1);
    font-size: 12px;
}

.mcp-provider-connection-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.api-integrations-document-list {
    display: grid;
    border-top: 1px solid oklch(0.897 0.006 211.0);
}

.api-priority-integration-section {
    display: grid;
    gap: 18px;
    margin: 0 0 26px;
    padding: 20px 0 6px;
}

.api-priority-integration-heading {
    display: grid;
    gap: 6px;
}

.api-priority-integration-heading h2 {
    margin: 0;
    color: oklch(0.190 0.005 248.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.05;
}

.api-priority-integration-heading p {
    max-width: 680px;
    margin: 0;
    color: oklch(0.415 0.008 145.4);
    font-size: 14px;
    line-height: 1.55;
}

.api-priority-integration-card {
    border-top: 1px solid oklch(0.897 0.006 211.0);
}

.api-priority-integration-card .api-provider-row {
    padding-top: 30px;
}

.api-provider-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 34px;
    padding: 40px 0 36px;
    border-bottom: 1px solid oklch(0.897 0.006 211.0);
}

.api-provider-content {
    min-width: 0;
    display: grid;
    gap: 23px;
}

.api-provider-heading {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.api-provider-mark {
    min-width: 34px;
    min-height: 22px;
    display: inline-grid;
    place-items: center;
    color: oklch(0.479 0.078 161.1);
    background: oklch(0.951 0.021 152.2);
    border: 1px solid oklch(0.842 0.044 151.4);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

.api-provider-heading-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.api-provider-title-line {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.api-provider-title-line h2 {
    margin: 0;
    color: oklch(0.190 0.005 248.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.api-provider-heading-copy p {
    margin: 0;
    color: oklch(0.415 0.008 145.4);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-style: italic;
    line-height: 1.4;
}

.api-status-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    background: oklch(0.650 0.007 223.5);
    border-radius: 50%;
}

.api-status-dot.connected {
    background: oklch(0.528 0.069 152.9);
}

.api-status-label {
    color: oklch(0.603 0.009 236.7);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.api-provider-meta {
    display: grid;
    gap: 14px;
    margin: 0;
}

.api-provider-meta div {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 18px;
    align-items: baseline;
}

.api-provider-meta dt,
.api-provider-section h3 {
    color: oklch(0.603 0.009 236.7);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    line-height: 1.25;
    margin: 0;
    text-transform: uppercase;
}

.api-provider-meta dd {
    min-width: 0;
    margin: 0;
    color: oklch(0.188 0.009 240.4);
    font-size: 14px;
    line-height: 1.45;
}

.api-provider-section {
    display: grid;
    gap: 10px;
}

.api-provider-section p {
    margin: 0;
    color: oklch(0.188 0.009 240.4);
    font-size: 14px;
    line-height: 1.6;
}

.api-scope-toggle {
    gap: 0;
}

.api-scope-toggle summary {
    width: max-content;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    color: oklch(0.603 0.009 236.7);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.25;
    list-style: none;
    text-transform: uppercase;
}

.api-scope-toggle summary::-webkit-details-marker {
    display: none;
}

.api-scope-toggle summary::after {
    content: "Show";
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    color: oklch(0.203 0.005 248.1);
    background: oklch(0.997 0.005 95.1);
    border: 1px solid oklch(0.897 0.006 211.0);
    border-radius: 7px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    text-transform: none;
}

.api-scope-toggle[open] summary::after {
    content: "Hide";
}

.api-scope-toggle summary:hover::after {
    background: oklch(0.971 0.006 128.5);
    border-color: oklch(0.851 0.009 188.1);
}

.api-scope-toggle summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.api-scope-toggle small {
    color: oklch(0.479 0.078 161.1);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    font-style: italic;
    font-weight: 600;
    text-transform: none;
}

.api-scope-toggle p {
    margin-top: 10px;
}

.api-capability-summary em {
    color: oklch(0.479 0.078 161.1);
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
}

.api-provider-actions {
    display: grid;
    align-content: start;
    gap: 9px;
    padding-top: 10px;
}

.api-provider-actions .button {
    width: 140px;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.api-action-primary {
    color: oklch(0.997 0.005 95.1);
    background: oklch(0.203 0.005 248.1);
    border-color: oklch(0.203 0.005 248.1);
}

.api-action-primary:hover {
    color: oklch(0.997 0.005 95.1);
    background: oklch(0.295 0.006 236.7);
    border-color: oklch(0.295 0.006 236.7);
}

.api-action-secondary {
    color: oklch(0.203 0.005 248.1);
    background: oklch(0.997 0.005 95.1);
    border-color: oklch(0.897 0.006 211.0);
}

.api-action-secondary:hover {
    background: oklch(0.971 0.006 128.5);
    border-color: oklch(0.851 0.009 188.1);
}

.api-provider-actions [aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.62;
}

.employee-document-list {
    overflow: visible;
    background: transparent;
    border: 0;
    border-top: 1px solid oklch(0.897 0.006 211.0);
    border-radius: 0;
}

.employee-directory-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 17px 0;
    background: transparent;
    border-bottom-color: oklch(0.897 0.006 211.0);
}

.employee-directory-content {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(220px, 1fr);
    gap: 18px;
    align-items: center;
}

.employee-directory-person {
    grid-template-columns: 32px minmax(0, 1fr);
}

.employee-directory-person .employee-avatar {
    width: 32px;
    height: 32px;
}

.employee-directory-row .admin-document-actions {
    flex-wrap: nowrap;
}

.employee-directory-row .admin-document-actions .button {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}

.employee-document-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: -4px 0 28px;
}

.employee-document-nav-item {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    color: oklch(0.515 0.009 216.7);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
}

.employee-document-nav-item:hover,
.employee-document-nav-item.active {
    color: oklch(0.192 0.007 229.3);
    background: oklch(0.997 0.005 95.1);
    border-color: oklch(0.895 0.011 136.6);
}

.employee-document-nav-item.active {
    box-shadow: inset 0 -2px 0 oklch(0.479 0.078 161.1);
}

.shared-slack-setup-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: oklch(0.972 0.008 98.9);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.shared-slack-setup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.shared-slack-setup-header > div:first-child {
    min-width: 0;
}

.shared-slack-setup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.shared-slack-setup-header h3,
.shared-slack-setup-header p {
    margin: 0;
}

.shared-slack-setup-header h3 {
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.shared-slack-setup-header p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.shared-slack-setup-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: oklch(0.996 0.008 98.9);
}

.shared-slack-setup-row {
    grid-template-columns: 92px minmax(0, 1fr) 1px;
}

.shared-slack-required-scopes {
    padding: 10px 12px;
    background: oklch(0.997 0.005 95.1);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.shared-slack-required-scopes summary {
    cursor: pointer;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.shared-slack-config-form {
    display: grid;
    gap: 12px;
    padding: 12px;
    background: oklch(0.997 0.005 95.1);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.shared-slack-config-header,
.shared-slack-config-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.shared-slack-config-header > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.shared-slack-config-footer {
    align-items: center;
}

.shared-slack-config-footer .muted {
    max-width: 720px;
}

.employee-document-section {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.employee-document-section:first-of-type {
    margin-top: 0;
}

.employee-document-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.employee-document-section-header > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.employee-document-section-header h2 {
    margin: 0;
    color: oklch(0.582 0.010 232.5);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

.employee-document-section-header p {
    margin: 0;
    color: oklch(0.538 0.010 161.1);
    font-size: 13px;
    line-height: 1.45;
}

.employee-document-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 28px;
    align-items: start;
    margin-top: 30px;
}

.employee-document-form {
    padding: 16px;
    background: oklch(0.997 0.005 95.1);
    border: 1px solid oklch(0.895 0.011 136.6);
    border-radius: 8px;
}

.employee-setup-list {
    display: grid;
}

.employee-setup-row {
    display: grid;
    grid-template-columns: minmax(96px, 0.35fr) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
}

.employee-setup-row:last-child {
    border-bottom: 0;
}

.employee-setup-row span {
    color: oklch(0.582 0.010 232.5);
    font-size: 12px;
    font-weight: 750;
}

.employee-setup-row strong {
    min-width: 0;
    overflow: hidden;
    color: oklch(0.188 0.009 240.4);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-detail-document .readiness-list {
    display: grid;
}

.employee-detail-document .readiness-item {
    grid-template-columns: 92px minmax(0, 1fr) auto;
    background: oklch(0.997 0.005 95.1);
}

.training-console {
    display: grid;
    gap: 18px;
}

.training-summary-grid {
    margin-bottom: 0;
}

.training-metric {
    display: grid;
    gap: 7px;
    align-content: start;
}

.training-metric small {
    min-height: 32px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.training-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.training-role-body,
.training-test-form {
    display: grid;
    gap: 14px;
}

.training-template-actions {
    justify-content: flex-start;
}

.training-panel,
.training-test-panel,
.training-role-panel {
    min-width: 0;
}

.training-panel-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    padding: 14px 18px 18px;
}

.training-list {
    display: grid;
    gap: 0;
}

.training-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
}

.training-list-row > div:first-child {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.training-list-row strong,
.training-run-summary strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.training-list-row span,
.training-run-summary span,
.training-run-summary small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.training-access-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.training-access-summary > div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    background: var(--surface);
}

.training-access-summary span {
    color: var(--faint);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.training-access-summary strong {
    color: var(--text);
    font-size: 22px;
}

.training-run-summary {
    display: grid;
    gap: 5px;
    min-height: 42px;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.modal-backdrop {
    background: rgba(24, 31, 25, 0.46);
}

.modal-header,
.modal-footer {
    background: oklch(0.990 0.003 128.5);
}

@media (prefers-reduced-motion: reduce) {
    .skill-toggle span {
        transition: none;
    }
}

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

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

    .sidebar {
        position: static;
        height: auto;
    }

    .content {
        padding: 18px;
    }

    .organization-shell .content {
        padding: 0;
    }

    .summary-grid,
    .detail-grid,
    .imported-patterns-summary-grid,
    .imported-patterns-detail-grid,
    .integration-setup-grid,
    .employee-scoped-integration-row,
    .organization-workspace,
    .tab-purpose,
    .skill-preview-grid,
    .skill-row,
    .training-two-column,
    .training-list-row,
    .training-access-summary,
    .readiness-item {
        grid-template-columns: 1fr;
    }

    .employee-scoped-integration-actions {
        justify-content: flex-start;
    }

    .organization-rail {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .organization-sidebar {
        position: static;
        height: auto;
        padding: 18px;
    }

    .organization-sidebar-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .workflows-console {
        grid-template-columns: 1fr;
    }

    .workflow-index-pane,
    .workflow-detail-pane {
        min-height: auto;
    }

    .workflow-index-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-detail-content {
        width: min(820px, calc(100vw - 48px));
        min-width: 0;
        padding: 24px 0 64px;
    }

    .organization-document-page {
        width: min(640px, calc(100vw - 48px));
        padding-top: 42px;
    }

    #organization-soul-panel.organization-soul-file-page {
        width: min(760px, calc(100vw - 48px));
    }

    #organization-instructions-panel.organization-document-page {
        width: min(972px, calc(100vw - 48px));
    }

    .organization-soul-reader {
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        gap: 28px;
    }

    .soul-reader-aside {
        display: none;
    }

    .employee-document-grid {
        grid-template-columns: 1fr;
    }

    .api-provider-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .api-provider-actions {
        display: flex;
        flex-wrap: wrap;
        padding-top: 0;
    }

    .mcp-connection-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-document-row,
    .permission-account-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mcp-connection-actions {
        justify-content: flex-start;
    }

    .admin-document-actions {
        justify-content: flex-start;
    }

    .available-skills-search {
        width: 100%;
        margin-left: 0;
    }

    .skill-library-actions {
        justify-content: flex-start;
    }

    .employee-directory-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .employee-directory-content {
        grid-template-columns: 1fr;
    }

    .employee-directory-row .admin-document-actions {
        justify-content: flex-start;
    }

    .skill-impact-item {
        grid-template-columns: 1fr;
    }

    .skill-impact-item .pill-cluster {
        justify-content: flex-start;
    }

    .readiness-action {
        justify-content: flex-start;
    }

    .employee-console {
        grid-template-columns: 1fr;
        margin: -18px;
    }

    .employee-console-main {
        display: block;
        border-right: 0;
    }

    .employee-inspector {
        position: static;
        height: auto;
        max-height: none;
        border-top: 1px solid var(--line);
    }

}

@media (max-width: 720px) {
    .page-header,
    .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .memory-search-control,
    .memory-context-filter {
        width: 100%;
    }

    .memory-correction-hint {
        display: grid;
    }

    .form-grid,
    .checkbox-grid,
    .permission-intent-grid,
    .memory-digest-item,
    .notion-access-option,
    .notion-brief-requirement-list,
    .workflow-notion-hint-list,
    .summary-grid,
    .memory-system-grid,
    .organization-status-strip,
    .organization-rail,
    .tool-integration-overview-grid
    .tool-integration-directory-list {
        grid-template-columns: 1fr;
    }

    .tool-integration-overview-tile,
    .tool-integration-overview-tile:nth-child(2),
    .tool-integration-overview-tile:nth-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--rule);
    }

    .tool-integration-overview-tile:last-child {
        border-bottom: 0;
    }

    .notion-access-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .notion-brief-requirement-header {
        align-items: stretch;
        flex-direction: column;
    }

    .organization-hero,
    .organization-main-header,
    .imported-patterns-heading,
    .imported-patterns-card,
    .provider-scaffold-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .imported-patterns-card-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .organization-sidebar-nav {
        grid-template-columns: 1fr;
    }

    .workflow-index-list,
    .workflow-stat-grid {
        grid-template-columns: 1fr;
    }

    .workflow-index-header,
    .workflow-index-link {
        padding-left: 20px;
        padding-right: 20px;
    }

    .workflow-detail-content {
        width: 100%;
        padding: 20px 20px 56px;
    }

    .workflow-detail-topbar,
    .workflow-steps-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-workflow-database-summary {
        grid-template-columns: 1fr;
    }

    .admin-workflow-database-fields {
        grid-template-columns: 1fr;
    }

    .admin-workflow-database-field,
    .admin-workflow-database-field:nth-child(3n),
    .admin-workflow-database-field:nth-last-child(-n + 3),
    .admin-workflow-database-field.wide {
        grid-column: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .admin-workflow-database-field:last-child {
        border-bottom: 0;
    }

    .workflow-stat-grid {
        gap: 14px;
    }

    .workflow-step {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .tool-scope-control {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .workflow-step-number {
        grid-column: 2;
        text-align: left;
    }

    .organization-document-page {
        width: 100%;
        padding: 32px 20px 64px;
    }

    #organization-soul-panel.organization-soul-file-page {
        width: 100%;
    }

    #organization-instructions-panel.organization-document-page {
        width: 100%;
    }

    .organization-soul-reader {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .soul-reader-sidebar,
    .soul-reader-aside {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .soul-reader-sidebar {
        padding-right: 0;
        border-right: 0;
        border-bottom: 1px solid oklch(0.897 0.006 211.0);
        padding-bottom: 24px;
    }

    .soul-reader-topline,
    .soul-document-title-row {
        flex-direction: column;
    }

    .mcp-connection-row {
        grid-template-columns: 1fr;
    }

    .organization-mcp-row {
        grid-template-columns: 1fr;
    }

    .organization-mcp-actions {
        justify-content: flex-start;
    }

    .mcp-provider-summary-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mcp-detail-grid {
        grid-template-columns: 1fr;
    }

    .mcp-management-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .mcp-management-actions {
        justify-content: flex-start;
    }

    .mcp-provider-connection-line {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .mcp-provider-connection-actions {
        justify-content: flex-start;
    }

    .admin-workflow-section-header {
        align-items: flex-start;
    }

    .admin-workflow-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .admin-workflow-command-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 10px 14px;
    }

    .admin-workflow-command-title {
        min-height: 38px;
    }

    .admin-workflow-family-tabs {
        width: 100%;
    }

    .admin-workflow-family-tab {
        flex: 1 0 auto;
    }

    .admin-workflow-inline-command {
        justify-self: stretch;
        width: 100%;
    }

    .admin-workflow-inline-trigger {
        justify-self: stretch;
        width: 100%;
    }

    .admin-workflow-inline-command code,
    .admin-workflow-inline-trigger code {
        text-align: left;
    }

    .admin-workflow-row-meta {
        justify-content: flex-start;
        flex-wrap: wrap;
        padding: 0 10px 8px;
    }

    .admin-document-page-wide {
        width: 100%;
        padding: 32px 20px 64px;
    }

    .admin-document-row,
    .permission-account-row,
    .workflow-edit-grid,
    .workflow-builder-note,
    .workflow-builder-grid {
        grid-template-columns: 1fr;
    }

    .workflow-flow-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .workflow-flow-heading strong {
        width: 100%;
        white-space: normal;
    }

    .workflow-edit-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .employee-directory-row .admin-document-actions {
        flex-wrap: wrap;
    }

    .soul-document-title-row {
        flex-direction: column;
        gap: 16px;
    }

    .soul-document h1 {
        font-size: 38px;
    }

    .soul-document-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-top: 0;
    }

    .employee-document-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-enabled-skill-summary {
        grid-template-columns: 1fr;
    }

    .employee-enabled-skill-summary div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .employee-enabled-skill-summary div:last-child {
        border-bottom: 0;
    }

    .employee-skill-state-header,
    .employee-skill-category-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-document-form,
    .employee-setup-row,
    .employee-enabled-skill-row {
        grid-template-columns: 1fr;
    }

    .employee-skill-toggle-cell {
        grid-template-columns: 1fr auto auto;
        justify-content: stretch;
    }

    .employee-skill-toggle-cell .pill-cluster {
        justify-content: flex-start;
    }

    .api-provider-row {
        padding: 32px 0;
    }

    .api-provider-heading {
        grid-template-columns: 1fr;
    }

    .api-provider-meta div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .api-provider-actions .button {
        width: 100%;
    }

    .organization-hero-actions {
        justify-content: flex-start;
    }

    .kv-item {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .workflow-type-select {
        width: 100%;
    }

    .workflow-event-setup > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .workflow-event-setup strong {
        white-space: normal;
    }

    .confirm-impact-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .message {
        max-width: 100%;
    }

    .employee-console-header,
    .employee-toolbar {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .employee-console-header {
        flex-direction: column;
        gap: 12px;
        padding: 18px 16px 14px;
    }

    .invite-button {
        width: 100%;
    }

    .employee-result-count {
        justify-self: start;
    }

    .employee-toolbar {
        padding: 10px 12px;
    }

    .employee-directory-table {
        min-width: 560px;
    }

    .employee-inspector {
        padding: 16px 12px 0;
    }

    .role-card-grid {
        grid-template-columns: 1fr;
    }

    .inspector-savebar {
        margin: 0 -12px;
        padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    }
}

/* Sidekick Console alignment */
body {
    background: var(--bg);
    color: var(--ink-1);
    font-family: var(--sans);
}

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

.sidebar,
.organization-sidebar {
    gap: 18px;
    padding: 18px 10px 14px;
    background: var(--bg);
    border-right: 1px solid var(--rule);
}

.content {
    height: 100vh;
    overflow-y: auto;
    padding: 30px 48px 96px;
}

.sidebar-brand,
.sidebar-company {
    min-height: 48px;
    padding: 0 10px;
}

.sidebar-brand strong,
.sidebar-company strong {
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 26px;
    font-style: italic;
    font-weight: 700;
    line-height: 1;
}

.sidebar-brand span,
.nav-section-label,
.organization-sidebar-section-label,
.page-title span,
.run-summary span,
.metric span,
.data-table th,
.global-skill-details strong {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.agent-switcher {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 54px;
    padding: 9px 10px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.agent-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.nav-list {
    gap: 26px;
}

.nav-section {
    gap: 5px;
}

.nav-section-label,
.organization-sidebar-section-label {
    gap: 10px;
    padding: 0 10px 6px;
}

.nav-section-label::before,
.nav-section-label::after,
.organization-sidebar-section-label::before,
.organization-sidebar-section-label::after {
    background: var(--rule);
}

.nav-item,
.organization-sidebar-item {
    min-height: 32px;
    padding: 6px 10px;
    color: var(--ink-2);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 750;
}

.nav-item:hover,
.nav-item.active,
.organization-sidebar-item:hover,
.organization-sidebar-item.active {
    color: var(--violet-deep);
    background: var(--violet-tint);
    border-color: transparent;
}

.nav-item:focus-visible,
.organization-sidebar-item:focus-visible,
.button:focus-visible,
.icon-button:focus-visible,
.link-button:focus-visible,
.skill-toggle:focus-visible {
    box-shadow: var(--focus-ring);
    outline: none;
}

.organization-sidebar-item.company-agent-sidebar-item {
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 10px;
    min-height: 43px;
    padding: 7px 10px;
}

.company-agent-family-mark {
    width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 27px;
    border-radius: 0;
}

.company-agent-family-mark img {
    width: 27px;
    height: 27px;
    display: block;
    object-fit: contain;
}

.company-agent-sidebar-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.company-agent-sidebar-copy strong,
.company-agent-sidebar-copy small {
    min-width: 0;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-agent-sidebar-copy strong {
    color: var(--ink-1);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.12;
}

.company-agent-sidebar-copy small {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.8px;
    line-height: 1.2;
    text-transform: uppercase;
}

.company-agent-detail-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.company-agent-detail-mark {
    --company-agent-soft: var(--violet-soft);
    --company-agent-rule: var(--violet-rule);
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: var(--company-agent-soft);
    border: 1px solid var(--company-agent-rule);
    border-radius: 14px;
}

.company-agent-detail-mark.engineering {
    --company-agent-soft: var(--eng-soft);
    --company-agent-rule: var(--eng-rule);
}

.company-agent-detail-mark.solutions {
    --company-agent-soft: var(--sol-soft);
    --company-agent-rule: var(--sol-rule);
}

.company-agent-detail-mark.research {
    --company-agent-soft: var(--res-soft);
    --company-agent-rule: var(--res-rule);
}

.company-agent-detail-mark.ops {
    --company-agent-soft: var(--ops-soft);
    --company-agent-rule: var(--ops-rule);
}

.company-agent-detail-mark img {
    width: 38px;
    height: 38px;
    display: block;
    object-fit: contain;
}

.company-agent-title-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.demo-company-agent-callout {
    margin-bottom: 18px;
}

.company-agent-demo-summary,
.company-agent-demo-grid,
.company-agent-demo-rules {
    margin-top: 18px;
}

.company-agent-demo-row {
    align-items: flex-start;
}

.sidebar-footer {
    margin: auto -10px 0;
    padding: 14px 10px 0;
    border-top: 1px solid var(--rule);
}

.sidebar-action {
    width: 100%;
    min-height: 38px;
}

.page-header,
.organization-document-page,
.admin-document-page-wide {
    max-width: 1000px;
    margin-right: auto;
    margin-left: auto;
}

.page-header {
    padding: 0 0 24px;
}

.page-title h1,
.soul-document h1,
.organization-page-title h1,
.employee-console-title h1 {
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 40px;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.page-title p,
.soul-document-title-copy p,
.organization-page-title p,
.employee-console-title p {
    color: var(--ink-2);
    font-family: var(--serif);
    font-size: 16px;
    font-style: italic;
    line-height: 1.42;
}

.panel,
.metric,
.form-callout,
.memory-correction-preview,
.employee-scoped-integration-row,
.global-skill-row,
.organization-mcp-row,
.run-summary,
.permission-card,
.integration-status-tile,
.employee-console-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 12px;
    box-shadow: none;
}

.panel-header,
.data-table th,
.data-table td,
.global-skill-row,
.employee-scoped-integration-row {
    border-color: var(--rule-soft);
}

.panel-header h2,
.panel-header h3,
.soul-document h2,
.soul-document h3,
.organization-document h2,
.organization-document h3 {
    color: var(--ink-1);
    font-family: var(--serif);
}

.button,
.icon-button,
.link-button {
    min-height: 34px;
    padding: 8px 13px;
    color: var(--ink-1);
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 9px;
    box-shadow: 0 1px 0 oklch(0.19 0.012 95 / 0.035);
    font-weight: 800;
    transition: transform 140ms ease-out, background 140ms ease-out, border-color 140ms ease-out;
}

.button:hover,
.icon-button:hover,
.link-button:hover {
    color: var(--ink-1);
    background: var(--surface);
    border-color: var(--violet-rule);
    transform: translateY(-1px);
}

.button:active,
.icon-button:active,
.link-button:active {
    transform: translateY(0);
}

.button.primary {
    color: var(--paper);
    background: var(--violet-fg);
    border-color: var(--violet-fg);
}

.button.primary:hover {
    color: var(--paper);
    background: var(--violet-deep);
    border-color: var(--violet-deep);
}

.button.danger {
    color: var(--red-deep);
    background: var(--red-tint);
    border-color: var(--red-rule);
}

.button.ghost {
    background: var(--paper);
}

.memory-chip,
.memory-risk-badge,
.status-badge,
.run-status,
.scope-chip,
.workflow-step-badge,
.schedule-run-badge {
    color: var(--ink-3);
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.run-summary.success,
.status-badge.success,
.memory-risk-badge.success,
.schedule-run-badge.success {
    color: var(--green-deep);
    background: var(--green-tint);
    border-color: var(--green-rule);
}

.run-summary.warning,
.status-badge.warning,
.memory-risk-badge.warning,
.schedule-run-badge.warning {
    color: var(--amber-deep);
    background: var(--amber-soft);
    border-color: var(--amber-rule);
}

.run-summary.danger,
.status-badge.danger,
.memory-risk-badge.danger,
.schedule-run-badge.danger {
    color: var(--red-deep);
    background: var(--red-soft);
    border-color: var(--red-rule);
}

.data-table tbody tr:hover,
.global-skill-row:hover,
.employee-scoped-integration-row:hover {
    background: var(--surface-2);
}

.modal {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.modal-backdrop {
    background: oklch(0.19 0.012 95 / 0.42);
}

.field input,
.field textarea,
.field select,
.header-actions select,
.filter-row select,
.skill-apply-form select,
.search-input {
    color: var(--ink-1);
    background: var(--paper);
    border-color: var(--rule-strong);
    border-radius: 9px;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.header-actions select:focus,
.filter-row select:focus,
.skill-apply-form select:focus,
.search-input:focus {
    border-color: var(--violet-rule);
    box-shadow: var(--focus-ring);
    outline: none;
}

.sk-spinner {
    width: 18px;
    height: 18px;
    display: inline-block;
    border: 2px solid var(--violet-rule);
    border-top-color: var(--violet-fg);
    border-radius: 999px;
    animation: sk-spin 780ms linear infinite;
}

.sk-skel {
    min-height: 14px;
    background: linear-gradient(90deg, var(--surface-2), var(--paper), var(--surface-2));
    background-size: 200% 100%;
    border-radius: 999px;
    animation: sk-skel 1200ms ease-in-out infinite;
}

.automated-workflow-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.automated-workflow-metric {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 12px;
}

.automated-workflow-metric span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.7px;
    line-height: 1.2;
    text-transform: uppercase;
}

.automated-workflow-metric strong {
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 700;
    line-height: 0.95;
}

.automated-workflow-metric small {
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.35;
}

.admin-workflow-section-cards {
    gap: 10px;
}

.admin-workflow-section-cards .admin-workflow-section-header {
    align-items: center;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 7px;
}

.admin-workflow-section-cards .admin-workflow-section-header h2 {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.7px;
}

.admin-workflow-section-cards .admin-workflow-section-header p {
    color: var(--ink-2);
}

.admin-workflow-section-cards .admin-workflow-count {
    color: var(--ink-2);
}

.admin-workflow-card-list {
    display: grid;
    gap: 10px;
}

.admin-workflow-card-list .empty-state {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 12px;
}

.admin-workflow-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: stretch;
    padding: 14px;
    color: var(--ink-1);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 140ms ease-out, border-color 140ms ease-out, background 140ms ease-out;
}

.admin-workflow-card:hover,
.admin-workflow-card:focus-visible {
    background: var(--violet-tint);
    border-color: var(--violet-rule);
    outline: none;
    transform: translateY(-1px);
}

.admin-workflow-card:focus-visible {
    box-shadow: var(--focus-ring);
}

.admin-workflow-card.inactive {
    background: var(--surface-2);
}

.admin-workflow-card-main {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.admin-workflow-card-title-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.admin-workflow-card-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: var(--violet-deep);
    background: var(--violet-soft);
    border: 1px solid var(--violet-rule);
    border-radius: 10px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.4px;
}

.admin-workflow-card-title {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.admin-workflow-card-title strong {
    min-width: 0;
    overflow: hidden;
    color: var(--ink-1);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-workflow-card-title small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.admin-workflow-card-meta {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.admin-workflow-card-meta-item {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    background: var(--bg);
    border: 1px solid var(--rule-soft);
    border-radius: 9px;
}

.admin-workflow-card-meta-item span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 850;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-transform: uppercase;
}

.admin-workflow-card-meta-item strong {
    min-width: 0;
    overflow: hidden;
    color: var(--ink-1);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-workflow-card-side {
    min-width: 164px;
    display: grid;
    justify-items: end;
    align-content: space-between;
    gap: 12px;
}

.admin-workflow-card-side .pill-cluster {
    justify-content: flex-end;
}

.admin-workflow-card .admin-workflow-open-indicator {
    color: var(--violet-deep);
    background: var(--violet-soft);
    border-color: var(--violet-rule);
}

.admin-workflow-card:hover .admin-workflow-open-indicator,
.admin-workflow-card:focus-visible .admin-workflow-open-indicator {
    color: var(--paper);
    background: var(--violet-fg);
    border-color: var(--violet-fg);
}

.workflows-document .workflow-flow-heading span,
.workflow-edit-heading span,
.workflow-access-header > div > span,
.workflow-access-panel-heading span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.7px;
    line-height: 1.2;
    text-transform: uppercase;
}

.workflows-document .workflow-flow-panel {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--paper);
    border-color: var(--rule);
    border-radius: 12px;
    box-shadow: none;
}

.workflows-document .workflow-flow-heading strong {
    color: var(--ink-1);
}

.workflows-document .workflow-flowchart {
    --flow-line: var(--rule-strong);
}

.workflows-document .workflow-flow-node {
    color: var(--ink-1);
    background: var(--surface-2);
    border-color: var(--rule);
    border-radius: 8px;
    box-shadow: none;
}

.workflows-document .workflow-flow-node.is-trigger,
.workflows-document .workflow-flow-node.is-result {
    background: var(--violet-tint);
    border-color: var(--violet-rule);
}

.workflows-document .workflow-flow-node.is-input {
    background: var(--green-tint);
    border-color: var(--green-rule);
}

.workflows-document .workflow-flow-node.is-review {
    background: var(--amber-soft);
    border-color: var(--amber-rule);
}

.workflows-document .workflow-flow-node strong {
    color: var(--ink-1);
}

.workflows-document .workflow-flow-node span {
    color: var(--ink-2);
}

.workflow-edit-form {
    gap: 18px;
    padding: 18px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 14px;
}

.workflow-edit-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule-soft);
}

.workflow-edit-heading > div {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.workflow-edit-heading h2 {
    margin: 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
}

.workflow-edit-heading p {
    max-width: 360px;
    margin: 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
}

.workflow-db-edit-form .workflow-edit-heading p {
    max-width: 430px;
}

.workflow-builder-note,
.workflow-builder-section {
    min-width: 0;
    display: grid;
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--rule-soft);
}

.workflow-builder-note {
    grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
    align-items: start;
    padding: 16px;
    background: var(--surface-2);
    border: 1px solid var(--rule-soft);
    border-radius: 8px;
}

.workflow-builder-note span,
.workflow-builder-section-heading span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.workflow-builder-note h3,
.workflow-builder-section-heading h3 {
    margin: 4px 0 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.workflow-builder-note ul {
    margin: 0;
    padding-left: 18px;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.55;
}

.workflow-builder-section-heading {
    max-width: 760px;
}

.workflow-builder-section-heading p {
    margin: 6px 0 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
}

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

.workflow-builder-grid .wide {
    grid-column: 1 / -1;
}

.workflow-test-preview-heading span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.workflow-test-preview-heading h3 {
    margin: 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.1;
}

.workflow-test-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.workflow-test-preview-tile {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 12px;
    background: var(--paper);
    border: 1px solid var(--rule-soft);
    border-radius: 8px;
}

.workflow-test-preview-tile span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.workflow-test-preview-tile strong {
    min-width: 0;
    overflow: hidden;
    color: var(--ink-1);
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.field-help {
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.35;
}

.workflow-field-error,
.workflow-form-error {
    margin: 0;
    color: var(--red-deep);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.workflow-form-error {
    padding: 10px 12px;
    background: var(--red-soft);
    border: 1px solid var(--red-rule);
    border-radius: 8px;
}

.workflow-builder-warning-list {
    grid-column: 1 / -1;
    padding: 12px 14px;
    color: var(--amber-deep);
    background: var(--amber-soft);
    border: 1px solid var(--amber-rule);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
}

.workflow-builder-warning-list strong {
    display: block;
    margin-bottom: 6px;
}

.workflow-builder-warning-list ul {
    margin: 0;
    padding-left: 18px;
}

.workflow-builder-details {
    min-width: 0;
    padding: 0;
    background: var(--surface-2);
    border: 1px solid var(--rule-soft);
    border-radius: 8px;
}

.workflow-builder-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    color: var(--ink-1);
    cursor: pointer;
}

.workflow-builder-static-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    color: var(--ink-1);
}

.workflow-builder-details summary span,
.workflow-builder-static-panel-heading span {
    font-weight: 850;
}

.workflow-builder-details summary small,
.workflow-builder-static-panel-heading small {
    color: var(--ink-2);
    font-size: 12px;
    text-align: right;
}

.workflow-builder-details-body {
    display: grid;
    gap: 14px;
    padding: 14px;
    border-top: 1px solid var(--rule-soft);
}

.workflow-original-creator-value {
    min-height: 39px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 8px 10px;
    color: var(--ink-1);
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 9px;
}

.workflow-original-creator-value strong {
    font-size: 14px;
    line-height: 1.25;
}

.workflow-original-creator-value span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.workflow-db-edit-form textarea[name="instructions"] {
    min-height: 260px;
}

.workflow-db-edit-form textarea[name="description"] {
    min-height: 112px;
}

.workflow-db-edit-form textarea[name="tools"],
.workflow-db-edit-form textarea[name="integration_capabilities"],
.workflow-db-edit-form textarea[name="default_constraints"],
.workflow-db-edit-form textarea[name="workflow_phases"],
.workflow-db-edit-form textarea[name="evaluation_examples"],
.workflow-db-edit-form textarea[name="hubspot_note_policy"] {
    min-height: 140px;
    font-family: var(--mono);
    font-size: 12px;
}

.workflow-db-edit-form textarea[name="default_constraints"] {
    min-height: 200px;
}

.workflow-db-edit-form textarea[name="hubspot_note_template"] {
    min-height: 260px;
    font-family: var(--mono);
    font-size: 12px;
}

.workflow-access-editor {
    display: grid;
    gap: 14px;
}

.workflow-access-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.workflow-access-header > div:first-child {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.workflow-access-header h2 {
    margin: 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.workflow-access-header p {
    max-width: 620px;
    margin: 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
}

.workflow-access-chip {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    color: var(--ink-3);
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.workflow-access-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px;
    padding: 18px;
    background: var(--surface-2);
    border: 1px solid var(--rule-soft);
    border-radius: 8px;
}

.workflow-access-surface-card {
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: 4px;
    transition: background 140ms ease-out, border-color 140ms ease-out, box-shadow 140ms ease-out;
}

.workflow-access-surface-card[open],
.workflow-access-surface-card:focus-within {
    border-color: var(--sidekick-purple);
    box-shadow: var(--focus-ring);
}

.workflow-access-surface-card.is-required {
    background: var(--violet-soft);
    border-color: var(--sidekick-purple);
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sidekick-purple) 48%, transparent);
}

.workflow-access-surface-card summary {
    min-height: 126px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 16px;
    padding: 24px 18px;
    color: var(--ink-1);
    cursor: pointer;
    list-style: none;
    text-align: center;
}

.workflow-access-surface-card summary::-webkit-details-marker {
    display: none;
}

.workflow-access-surface-title {
    max-width: 100%;
    overflow: hidden;
    color: var(--ink-1);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.08;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.workflow-access-surface-status {
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.35;
}

.workflow-access-scope {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border-top: 1px solid var(--rule);
}

.workflow-access-scope > p {
    margin: 0;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.4;
}

.workflow-access-scope-section {
    display: grid;
    gap: 9px;
}

.workflow-access-scope-section h4 {
    margin: 0;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.workflow-access-scope-list {
    display: grid;
    gap: 8px;
}

.workflow-access-scope-row {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    color: var(--ink-1);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    cursor: pointer;
}

.workflow-access-scope-row:hover {
    border-color: var(--violet-rule);
}

.workflow-access-scope-row.is-required,
.workflow-access-scope-row:has(input:checked) {
    background: var(--violet-tint);
    border-color: var(--violet-rule);
    box-shadow: inset 3px 0 0 var(--sidekick-purple);
}

.workflow-access-scope-row input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--sidekick-purple);
}

.workflow-access-scope-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.workflow-access-scope-copy strong,
.workflow-access-scope-copy small,
.workflow-access-scope-copy code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workflow-access-scope-copy strong {
    color: var(--ink-1);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.workflow-access-scope-copy small {
    display: -webkit-box;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.workflow-access-scope-copy code {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
}

.workflow-access-chip.is-write {
    color: var(--amber-deep);
    background: var(--amber-soft);
    border-color: var(--amber-rule);
}

.workflow-access-empty {
    margin: 0;
    padding: 18px 14px;
    color: var(--ink-2);
    font-family: var(--serif);
    font-size: 15px;
    font-style: italic;
    text-align: center;
}

.workflow-save-bar {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    background: color-mix(in oklab, var(--paper) 96%, transparent);
    border: 1px solid var(--rule);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

.workflow-save-status {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.workflow-save-status span {
    color: var(--green-deep);
    font-size: 13px;
    font-weight: 850;
}

.workflow-save-status span.is-dirty {
    color: var(--amber-deep);
}

.workflow-save-status small {
    color: var(--ink-2);
    font-size: 12px;
}

.workflow-save-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.workflow-test-preview {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: var(--violet-tint);
    border: 1px solid var(--violet-rule);
    border-radius: 8px;
}

.workflow-test-preview[hidden] {
    display: none;
}

.workflow-test-preview-heading {
    display: grid;
    gap: 4px;
}

.app-shell:has(#workflow-detail-panel.workflow-contract-page) > .content {
    min-height: 100vh;
    padding: 0;
}

.workflow-contract-page {
    min-height: 100vh;
    color: var(--ink-1);
    background: var(--bg);
}

.workflow-contract-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 34px;
    background: color-mix(in oklab, var(--bg) 96%, white);
    border-bottom: 1px solid var(--rule);
}

.workflow-contract-title {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.workflow-contract-breadcrumb,
.workflow-contract-nav-label,
.workflow-contract-access-summary span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.7px;
    line-height: 1;
    text-transform: uppercase;
}

.workflow-contract-title h1 {
    margin: 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: clamp(26px, 3vw, 32px);
    font-style: italic;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.95;
}

.workflow-contract-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    white-space: nowrap;
}

.workflow-contract-form {
    margin: 0;
    padding: 0 0 86px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.workflow-contract-layout {
    width: min(918px, 100%);
    display: grid;
    grid-template-columns: 176px minmax(0, 652px);
    gap: 20px;
    align-items: start;
    margin: 0 auto;
    padding: 24px 24px 0;
}

.workflow-contract-nav {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
    padding-top: 5px;
}

.workflow-contract-nav nav {
    display: grid;
    gap: 6px;
}

.workflow-contract-nav a {
    min-height: 43px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    color: var(--ink-2);
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
}

.workflow-contract-nav a:hover,
.workflow-contract-nav a:focus-visible,
.workflow-contract-nav a.active {
    color: var(--ink-1);
    background: color-mix(in oklab, var(--paper) 74%, transparent);
    border-color: var(--rule);
}

.workflow-contract-nav a span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
}

.workflow-contract-nav a strong {
    min-width: 0;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.15;
}

.workflow-contract-access-summary {
    display: grid;
    gap: 7px;
    padding: 13px 12px;
    background: color-mix(in oklab, var(--paper) 72%, transparent);
    border: 1px solid var(--rule);
    border-radius: 8px;
}

.workflow-contract-access-summary strong {
    font-size: 12px;
}

.workflow-contract-main {
    display: grid;
    gap: 18px;
}

.workflow-contract-page .workflow-builder-section,
.workflow-contract-page .workflow-access-editor {
    scroll-margin-top: 98px;
    overflow: hidden;
    gap: 0;
    padding: 0;
    background: color-mix(in oklab, var(--paper) 70%, transparent);
    border: 1px solid var(--rule);
    border-radius: 14px;
}

.workflow-contract-page .workflow-builder-section-heading {
    max-width: none;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--rule-soft);
}

.workflow-contract-page .workflow-builder-section-heading h3,
.workflow-contract-page .workflow-access-heading h2 {
    margin: 3px 0 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.02;
}

.workflow-contract-page .workflow-builder-section-heading p {
    max-width: 570px;
    margin: 8px 0 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
}

.workflow-section-number {
    min-width: 30px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--green-deep);
    background: var(--green-soft);
    border: 1px solid var(--green-rule);
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
}

.workflow-contract-page .workflow-builder-section > .workflow-builder-grid,
.workflow-access-body {
    padding: 20px 22px 22px;
}

.workflow-contract-page .workflow-builder-grid {
    gap: 16px 18px;
}

.workflow-contract-page .field label {
    color: var(--ink-1);
    font-size: 12px;
    font-weight: 850;
}

.workflow-contract-page .field input,
.workflow-contract-page .field textarea,
.workflow-contract-page .field select {
    color: var(--ink-1);
    background: var(--surface);
    border-color: var(--rule-strong);
    border-radius: 8px;
}

.workflow-origin-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 14px;
    color: var(--ink-2);
    border-top: 1px solid var(--rule-soft);
}

.workflow-origin-row small {
    font-size: 12px;
}

.workflow-origin-row strong {
    color: var(--ink-1);
    font-family: var(--mono);
    font-size: 11px;
}

.workflow-origin-marker {
    width: 10px;
    height: 10px;
    display: inline-block;
    border: 1.5px solid var(--ink-3);
    border-radius: 999px;
    box-shadow: 0 6px 0 -4px var(--ink-3);
}

.workflow-token-field {
    min-height: 70px;
    display: grid;
    gap: 8px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
}

.workflow-token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.workflow-token {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 5px 9px;
    color: var(--green-deep);
    background: var(--green-soft);
    border: 1px solid var(--green-rule);
    border-radius: 7px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.workflow-token-field.is-violet .workflow-token {
    color: var(--violet-deep);
    background: var(--violet-soft);
    border-color: var(--violet-rule);
}

.workflow-token-field.is-amber .workflow-token {
    color: var(--amber-deep);
    background: var(--amber-soft);
    border-color: var(--amber-rule);
}

.workflow-token small {
    opacity: 0.75;
}

.workflow-token b {
    opacity: 0.55;
    font-weight: 850;
}

.workflow-token-field textarea {
    min-height: 28px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--mono);
    font-size: 12px;
    resize: vertical;
}

.workflow-token-field textarea:focus {
    box-shadow: none;
}

.workflow-db-edit-form textarea[name="instructions"] {
    min-height: 145px;
}

.workflow-db-edit-form textarea[name="description"] {
    min-height: 76px;
}

.workflow-db-edit-form textarea[name="hubspot_note_template"] {
    min-height: 128px;
}

.workflow-contract-page .workflow-builder-details {
    background: var(--surface);
    border-color: var(--rule);
    border-radius: 8px;
}

.workflow-contract-page #workflow-section-approvals .workflow-builder-grid {
    grid-template-columns: 1fr;
}

.workflow-access-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.workflow-access-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font-size: 12px;
}

.workflow-access-count strong {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    color: var(--green-deep);
    background: var(--green-soft);
    border: 1px solid var(--green-rule);
    border-radius: 999px;
}

.workflow-access-hide-off {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font-size: 12px;
}

.workflow-access-hide-off input {
    width: 14px;
    height: 14px;
    accent-color: var(--green-deep);
}

.workflow-access-editor:has(.workflow-access-hide-off-toggle:checked) .workflow-access-surface-card:not(.is-required) {
    display: none;
}

.workflow-contract-page .workflow-access-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.workflow-contract-page .workflow-access-surface-card {
    overflow: visible;
    background: var(--surface);
    border-color: var(--rule);
    border-radius: 8px;
}

.workflow-contract-page .workflow-access-surface-card.is-required {
    background: var(--green-tint);
    border-color: var(--green-deep);
    box-shadow: none;
}

.workflow-contract-page .workflow-access-surface-card.is-write-required {
    background: var(--violet-tint);
    border-color: var(--violet-fg);
}

.workflow-contract-page .workflow-access-surface-card summary {
    min-height: 66px;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    grid-template-areas:
        "dot title more"
        "status status action";
    gap: 8px 8px;
    align-content: start;
    justify-items: stretch;
    padding: 12px;
    text-align: left;
}

.workflow-access-card-dot {
    grid-area: dot;
    width: 6px;
    height: 6px;
    margin-top: 5px;
    background: var(--rule-strong);
    border-radius: 999px;
}

.workflow-access-surface-card.is-required .workflow-access-card-dot {
    background: var(--green-deep);
}

.workflow-access-surface-card.is-write-required .workflow-access-card-dot {
    background: var(--violet-fg);
}

.workflow-contract-page .workflow-access-surface-title {
    grid-area: title;
    color: var(--ink-1);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.15;
    text-transform: none;
}

.workflow-access-card-more {
    grid-area: more;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
}

.workflow-contract-page .workflow-access-surface-status {
    grid-area: status;
    justify-self: start;
    padding: 4px 9px;
    color: var(--ink-2);
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
}

.workflow-access-surface-card.is-required .workflow-access-surface-status {
    color: var(--green-deep);
    background: var(--green-soft);
    border-color: var(--green-rule);
}

.workflow-access-surface-card.is-write-required .workflow-access-surface-status {
    color: var(--violet-deep);
    background: var(--violet-soft);
    border-color: var(--violet-rule);
}

.workflow-access-surface-card summary small {
    grid-area: action;
    justify-self: end;
    align-self: center;
    color: var(--ink-2);
    font-size: 10px;
    font-weight: 850;
}

.workflow-access-surface-card[open] > summary {
    border-radius: 8px;
}

.workflow-access-surface-card[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 48;
    background: rgb(20 20 20 / 0.35);
    backdrop-filter: blur(3px);
}

.workflow-contract-page .workflow-access-scope {
    position: fixed;
    inset: 0;
    z-index: 49;
    display: grid;
    place-items: center;
    padding: 24px;
    background: transparent;
    border: 0;
}

.workflow-access-scope-modal {
    width: min(400px, calc(100vw - 40px));
    max-height: min(78vh, 620px);
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.workflow-access-scope-header,
.workflow-access-scope-summary,
.workflow-access-scope-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--rule-soft);
}

.workflow-access-scope-header span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.workflow-access-scope-header h3 {
    margin: 2px 0 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.workflow-access-close {
    width: 28px;
    height: 28px;
    color: var(--ink-2);
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 8px;
}

.workflow-access-scope-summary strong {
    font-size: 12px;
}

.workflow-access-scope-summary button {
    color: var(--green-deep);
    background: transparent;
    border: 0;
    font-size: 12px;
    font-weight: 850;
}

.workflow-contract-page .workflow-access-scope-list {
    display: grid;
    gap: 0;
}

.workflow-access-scope-group {
    display: grid;
    gap: 0;
}

.workflow-access-scope-group + .workflow-access-scope-group {
    border-top: 1px solid var(--rule);
}

.workflow-access-scope-group h4 {
    margin: 0;
    padding: 11px 16px 7px;
    color: var(--ink-3);
    background: var(--surface-2);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.7px;
    line-height: 1;
    text-transform: uppercase;
}

.workflow-contract-page .workflow-access-scope-row {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--rule-soft);
    border-radius: 0;
    box-shadow: none;
}

.workflow-contract-page .workflow-access-scope-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.workflow-contract-page .workflow-access-scope-copy {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.workflow-contract-page .workflow-access-scope-copy strong,
.workflow-contract-page .workflow-access-scope-copy code {
    font-family: var(--mono);
    font-size: 12px;
}

.workflow-contract-page .workflow-access-scope-copy strong {
    font-weight: 850;
}

.workflow-contract-page .workflow-access-scope-copy code {
    display: none;
}

.workflow-contract-page .workflow-access-chip {
    min-height: 18px;
    padding: 3px 6px;
    color: var(--green-deep);
    background: var(--green-soft);
    border-color: var(--green-rule);
    font-size: 9px;
}

.workflow-contract-page .workflow-access-chip.is-write {
    color: var(--violet-deep);
    background: var(--violet-soft);
    border-color: var(--violet-rule);
}

.workflow-access-switch {
    width: 34px;
    height: 20px;
    position: relative;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
}

.workflow-access-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--surface);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}

.workflow-access-scope-row:has(input:checked) .workflow-access-switch {
    background: var(--green-deep);
    border-color: var(--green-deep);
}

.workflow-access-scope-row:has(input:checked) .workflow-access-switch::after {
    transform: translateX(14px);
}

.workflow-access-scope-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--rule-soft);
    border-bottom: 0;
}

.workflow-contract-page .workflow-save-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    padding: 12px 24px;
    background: color-mix(in oklab, var(--paper) 94%, transparent);
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: 0 -12px 28px rgb(30 28 22 / 0.06);
}

.workflow-contract-page .workflow-save-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workflow-contract-page .workflow-save-status span::before {
    content: "";
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: 7px;
    background: currentColor;
    border-radius: 999px;
}

#organization-soul-panel.organization-soul-file-page.admin-soul-page {
    width: 100%;
    max-width: none;
    margin: -30px 0 -96px;
    padding: 0;
}

#organization-soul-panel.admin-soul-page .organization-soul-file-form {
    margin: 0;
    min-width: 0;
}

#organization-soul-panel.admin-soul-page .admin-soul-reader {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) 164px;
    gap: 0;
    align-items: stretch;
    min-width: 0;
}

#organization-soul-panel.admin-soul-page .soul-reader-sidebar,
#organization-soul-panel.admin-soul-page .soul-reader-aside {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    background: var(--bg);
}

#organization-soul-panel.admin-soul-page .soul-reader-sidebar {
    min-width: 0;
    padding: 24px 8px 72px 18px;
    border-right: 1px solid var(--rule);
}

#organization-soul-panel.admin-soul-page .soul-reader-brand {
    gap: 6px;
    margin-bottom: 18px;
}

#organization-soul-panel.admin-soul-page .soul-reader-brand span,
#organization-soul-panel.admin-soul-page .soul-reader-aside-label {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 850;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;
}

#organization-soul-panel.admin-soul-page .soul-reader-brand strong {
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 30px;
    font-style: italic;
    font-weight: 700;
    line-height: 0.98;
}

#organization-soul-panel.admin-soul-page .soul-reader-brand p {
    color: var(--ink-2);
    font-family: var(--serif);
    font-size: 14px;
    font-style: italic;
    line-height: 1.35;
}

#organization-soul-panel.admin-soul-page .soul-reader-search {
    position: relative;
    margin-bottom: 28px;
}

#organization-soul-panel.admin-soul-page .soul-reader-search::before,
#organization-soul-panel.admin-soul-page .soul-reader-search::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

#organization-soul-panel.admin-soul-page .soul-reader-search::before {
    top: 11px;
    left: 12px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--ink-3);
    border-radius: 999px;
}

#organization-soul-panel.admin-soul-page .soul-reader-search::after {
    top: 22px;
    left: 22px;
    width: 7px;
    height: 2px;
    background: var(--ink-3);
    border-radius: 999px;
    transform: rotate(45deg);
    transform-origin: left center;
}

#organization-soul-panel.admin-soul-page .soul-reader-search input {
    height: 34px;
    min-height: 34px;
    padding: 0 12px 0 34px;
    color: var(--ink-1);
    background: var(--paper);
    border-color: var(--rule);
    border-radius: 8px;
    font-size: 13px;
}

#organization-soul-panel.admin-soul-page .soul-reader-search input:focus {
    border-color: var(--violet-rule);
    box-shadow: var(--focus-ring);
}

#organization-soul-panel.admin-soul-page .soul-reader-file-groups {
    gap: 28px;
}

#organization-soul-panel.admin-soul-page .soul-reader-file-section {
    gap: 8px;
}

#organization-soul-panel.admin-soul-page .soul-reader-file-section-label {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0 10px 4px 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 19px;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: none;
}

#organization-soul-panel.admin-soul-page .soul-reader-file-section-label > span:last-child {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-style: normal;
    font-weight: 850;
}

#organization-soul-panel.admin-soul-page .soul-reader-section-chevron {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--ink-3);
    border-bottom: 1.5px solid var(--ink-3);
    transform: rotate(45deg) translateY(-1px);
}

#organization-soul-panel.admin-soul-page .soul-reader-file-list {
    gap: 0;
}

#organization-soul-panel.admin-soul-page .soul-reader-file {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    min-height: 68px;
    margin-left: -18px;
    width: calc(100% + 18px);
    padding: 10px 10px 10px 22px;
    color: var(--ink-2);
    border-left-width: 3px;
    border-radius: 0;
}

#organization-soul-panel.admin-soul-page .soul-reader-file:hover {
    background: var(--surface-2);
}

#organization-soul-panel.admin-soul-page .soul-reader-file.active {
    color: var(--violet-deep);
    background: var(--violet-tint);
    border-left-color: var(--violet-fg);
}

#organization-soul-panel.admin-soul-page .soul-reader-file-icon {
    width: 24px;
    height: 20px;
    color: var(--ink-3);
    background: var(--paper);
    border-color: var(--rule);
    border-radius: 5px;
    font-size: 7px;
}

#organization-soul-panel.admin-soul-page .soul-reader-file strong {
    color: var(--ink-1);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.4px;
}

#organization-soul-panel.admin-soul-page .soul-reader-file small {
    color: var(--ink-3);
    font-family: var(--serif);
    font-size: 13px;
    font-style: italic;
    line-height: 1.35;
}

#organization-soul-panel.admin-soul-page .soul-reader-document {
    min-width: 0;
    padding: 48px 36px 96px;
    border-right: 1px solid var(--rule);
}

#organization-soul-panel.admin-soul-page .soul-reader-header {
    gap: 12px;
}

#organization-soul-panel.admin-soul-page .soul-reader-topline {
    align-items: flex-start;
}

#organization-soul-panel.admin-soul-page .soul-reader-meta {
    display: none;
}

#organization-soul-panel.admin-soul-page .soul-reader-header .soul-document-title-copy h1 {
    font-size: 38px;
    line-height: 1;
}

#organization-soul-panel.admin-soul-page .soul-reader-header .soul-document-title-copy p {
    max-width: 620px;
}

#organization-soul-panel.admin-soul-page .soul-reader-body {
    max-width: 720px;
    font-size: 15.5px;
    line-height: 1.7;
}

#organization-soul-panel.admin-soul-page .soul-reader-body h1 {
    font-size: 30px;
}

#organization-soul-panel.admin-soul-page .soul-reader-body h2 {
    margin-top: 34px;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: none;
}

#organization-soul-panel.admin-soul-page .soul-reader-body h3 {
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 19px;
}

#organization-soul-panel.admin-soul-page .soul-markdown-table-wrap {
    margin: 10px 0 30px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

#organization-soul-panel.admin-soul-page .soul-markdown-table {
    min-width: 620px;
    background: transparent;
    font-size: 13px;
}

#organization-soul-panel.admin-soul-page .soul-markdown-table th {
    color: var(--ink-2);
    background: var(--surface-2);
    border-bottom: 2px solid var(--ink-1);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.5px;
}

#organization-soul-panel.admin-soul-page .soul-markdown-table th,
#organization-soul-panel.admin-soul-page .soul-markdown-table td {
    padding: 10px 12px;
    border-right: 0;
    border-bottom-color: var(--rule);
}

#organization-soul-panel.admin-soul-page .soul-markdown-table tbody tr:nth-child(even) {
    background: var(--surface-2);
}

#organization-soul-panel.admin-soul-page .soul-reader-aside {
    align-content: start;
    min-width: 0;
    padding: 44px 16px 72px;
}

#organization-soul-panel.admin-soul-page .soul-reader-aside-block {
    align-content: start;
}

#organization-soul-panel.admin-soul-page .soul-reader-toc {
    gap: 9px;
}

#organization-soul-panel.admin-soul-page .soul-reader-toc button {
    color: var(--ink-2);
    border-left-color: var(--rule);
    padding: 3px 0 3px 10px;
    font-size: 13px;
}

#organization-soul-panel.admin-soul-page .soul-reader-toc button.is-active,
#organization-soul-panel.admin-soul-page .soul-reader-toc button:hover {
    color: var(--ink-1);
    border-left-color: var(--violet-fg);
}

.tool-integration-document-body {
    display: grid;
    gap: 28px;
}

.tool-integration-catalog {
    display: grid;
    gap: 30px;
}

.tool-integration-directory {
    gap: 22px;
}

.tool-integration-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.tool-integration-overview-tile {
    min-height: 66px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 14px 18px;
    border-right: 1px solid var(--rule);
}

.tool-integration-overview-tile:last-child {
    border-right: 0;
}

.tool-integration-overview-tile strong {
    color: var(--ink-1);
    font-size: 26px;
    font-weight: 850;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tool-integration-overview-tile span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

.tool-integration-overview-tile.is-warning strong {
    color: var(--amber-deep);
}

.tool-integration-overview-tile.is-accent strong {
    color: var(--violet-fg);
}

.tool-integration-directory-search {
    width: min(100%, 280px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 8px;
}

.tool-integration-directory-search span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 850;
}

.tool-integration-directory-search input {
    width: 100%;
    min-width: 0;
    padding: 7px 0;
    color: var(--ink-1);
    background: transparent;
    border: 0;
    outline: 0;
}

.tool-integration-directory-sections {
    display: grid;
    gap: 30px;
}

.tool-integration-directory-section {
    display: grid;
    gap: 10px;
}

/* ---- Section group header (eval-style: mono uppercase + rule) ---- */
.tool-integration-group-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 700 10px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--faint);
}

.tool-integration-group-hdr::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.tool-integration-section-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-3);
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
    flex-shrink: 0;
}

.tidcard-pill {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 8px;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    color: var(--ink-1);
}

.tidcard-attention {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 8px;
    background: var(--amber-soft);
    border: 1px solid var(--amber-rule);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
    color: var(--amber-deep);
}

.tool-integration-group-desc {
    margin: 0;
    color: var(--ink-3);
    font-size: 12px;
    line-height: 1.4;
}

/* ---- Card list ---- */
.tool-integration-directory-list {
    display: grid;
    gap: 10px;
}

/* ---- Card row (eval suite style) ---- */
.tool-integration-directory-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0 22px;
    padding: 9px 22px;
    color: var(--ink-1);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.tool-integration-directory-card:hover,
.tool-integration-directory-card:focus-visible {
    background: var(--surface-2);
    border-color: var(--rule-strong);
}

.tool-integration-directory-card:focus-visible {
    outline: 2px solid var(--violet-fg);
    outline-offset: 2px;
}

/* Ring */
.tidcard-ring-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.tidcard-ring-wrap svg { display: block; }

.tidcard-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 11px/1 var(--sans);
    color: var(--ink-1);
    pointer-events: none;
}

.tidcard-ring-empty {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px dashed var(--rule-strong);
    flex-shrink: 0;
    display: inline-block;
}

/* Main */
.tidcard-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tidcard-name {
    margin: 0;
    font: italic 700 18px/1.1 var(--serif);
    color: var(--ink-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.tidcard-category {
    font-size: 12px;
    color: var(--faint);
}

.tidcard-meta-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--faint);
    display: inline-block;
    flex-shrink: 0;
}

/* Status badge (reuses existing .tool-integration-directory-status) */
.tool-integration-directory-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
    padding: 3px 8px;
    color: var(--green-deep);
    background: var(--green-soft);
    border: 1px solid var(--green-rule);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.tool-integration-directory-status i {
    width: 5px;
    height: 5px;
    display: inline-block;
    background: currentColor;
    border-radius: 999px;
}

.tool-integration-directory-status.is-needs-attention {
    color: var(--amber-deep);
    background: var(--amber-soft);
    border-color: var(--amber-rule);
}

.tool-integration-directory-status.is-not-connected {
    color: var(--danger);
    background: oklch(0.974 0.026 42.8);
    border-color: rgba(181, 92, 66, 0.34);
}

/* Stats */
.tidcard-stats {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.tidcard-stat { text-align: center; }

.tidcard-stat-val {
    font: 700 18px/1 var(--sans);
    color: var(--ink-1);
    font-variant-numeric: tabular-nums;
}

.tidcard-stat-lbl {
    font: 700 8px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--faint);
    margin-top: 4px;
}

/* Actions */
.tidcard-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tidcard-details-btn {
    min-height: 18px;
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
}

/* Tab select on each card */
.tidcard-tab-select {
    height: 22px;
    padding: 0 6px;
    color: var(--ink-2);
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.tidcard-tab-select:hover {
    border-color: var(--rule-strong);
}

/* Tab bar above card list */
.tidcard-tab-bar {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 8px;
    width: fit-content;
}

.tidcard-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 3px 12px;
    color: var(--ink-3);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.tidcard-tab:hover {
    color: var(--ink-1);
    background: var(--surface-3);
}

.tidcard-tab.is-active {
    color: var(--ink-1);
    background: var(--surface);
    border-color: var(--rule);
    box-shadow: var(--shadow-soft);
}

.tidcard-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 850;
    color: var(--ink-3);
}

.tidcard-tab.is-active .tidcard-tab-count {
    background: var(--surface-3);
}

.tool-integration-tabs.mcp-scope-tabs {
    width: fit-content;
    display: inline-flex;
    gap: 4px;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 4px;
    overflow-x: auto;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.tool-integration-tabs .tab {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    color: var(--ink-3);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.2;
    white-space: nowrap;
}

.tool-integration-tabs .tab:hover,
.tool-integration-tabs .tab:focus-visible {
    color: var(--ink-1);
    background: var(--paper);
    border-color: var(--rule);
    outline: none;
}

.tool-integration-tabs .tab:focus-visible {
    box-shadow: var(--focus-ring);
}

.tool-integration-tabs .tab.active {
    color: var(--ink-1);
    background: var(--paper);
    border-color: var(--rule-strong);
    box-shadow: 0 1px 0 oklch(0.19 0.012 95 / 0.04);
}

.tool-integration-section {
    display: grid;
    gap: 12px;
}

.tool-integration-card-catalog {
    display: grid;
    gap: 18px;
}

.tool-integration-card-sections {
    display: grid;
    gap: 28px;
}

.tool-integration-card-section {
    display: grid;
    gap: 12px;
}

.tool-integration-card-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.tool-integration-card-section-heading h3 {
    margin: 0 0 4px;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 850;
    line-height: 1.15;
}

.tool-integration-card-section-heading p {
    margin: 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.4;
}

.tool-integration-card-section-heading > span {
    flex: 0 0 auto;
    color: var(--ink-1);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

.tool-integration-card-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 20px;
    align-items: end;
}

.tool-integration-card-heading h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    color: var(--ink-1);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.25;
    text-transform: uppercase;
}

.tool-integration-card-heading h2 span {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 8px;
    color: var(--ink-3);
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    text-transform: none;
}

.tool-integration-card-heading p {
    margin: 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.4;
}

.tool-integration-card-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.2;
}

.tool-integration-card-stats span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tool-integration-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 8px;
}

.tool-integration-search span {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 850;
}

.tool-integration-search input {
    width: 100%;
    min-width: 0;
    padding: 7px 0;
    color: var(--ink-1);
    background: transparent;
    border: 0;
    outline: 0;
}

.tool-integration-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.tool-integration-card-grid .empty-state {
    grid-column: 1 / -1;
}

.tool-integration-card {
    min-width: 0;
    min-height: 126px;
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 14px 16px 13px;
    color: var(--ink-1);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 10px;
    box-shadow: none;
    text-align: left;
}

.tool-integration-card:hover,
.tool-integration-card:focus-visible {
    border-color: var(--rule-strong);
    background: var(--surface-2);
}

.tool-integration-card:focus-visible {
    outline: 2px solid var(--violet-fg);
    outline-offset: 2px;
}

.tool-integration-card-title,
.tool-integration-card-category,
.tool-integration-card-accounts {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-integration-card-title {
    color: var(--ink-1);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
}

.tool-integration-card-category {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.tool-integration-card-accounts {
    margin-top: 8px;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.2;
}

.tool-integration-card-meter {
    width: 100%;
    height: 4px;
    display: block;
    overflow: hidden;
    background: var(--rule-soft);
    border-radius: 999px;
}

.tool-integration-card-meter span {
    height: 100%;
    display: block;
    background: var(--green-deep);
    border-radius: inherit;
}

.tool-integration-card.is-needs-attention .tool-integration-card-meter span {
    background: var(--amber-deep);
}

.tool-integration-card.is-stale .tool-integration-card-meter span {
    background: var(--danger);
}

.tool-integration-card-status {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    padding: 4px 12px;
    color: var(--green-deep);
    background: var(--green-soft);
    border: 1px solid var(--green-rule);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.tool-integration-card.is-needs-attention .tool-integration-card-status {
    color: var(--amber-deep);
    background: var(--amber-soft);
    border-color: var(--amber-rule);
}

.tool-integration-card.is-stale .tool-integration-card-status {
    color: var(--danger);
    background: oklch(0.974 0.026 42.8);
    border-color: rgba(181, 92, 66, 0.34);
}

.tool-provider-detail-page {
    display: grid;
    gap: 24px;
}

.tool-provider-detail-header {
    display: grid;
    gap: 14px;
}

.tool-provider-detail-title-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: start;
    gap: 12px;
}

.tool-provider-avatar {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-deep);
    background: var(--amber-soft);
    border: 1px solid var(--amber-rule);
    border-radius: 10px;
    font-weight: 850;
}

.tool-provider-title-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.tool-provider-title-copy h2 {
    margin: 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 850;
    line-height: 0.95;
}

.tool-provider-title-copy p {
    margin: 0;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.4;
}

.tool-provider-title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.tool-provider-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
    gap: 28px;
    align-items: start;
}

.tool-provider-detail-main {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.tool-provider-scope-intro {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}

.tool-provider-scope-intro h2 {
    margin: 0 0 6px;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 850;
    line-height: 1.05;
}

.tool-provider-scope-intro p {
    max-width: 680px;
    margin: 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.45;
}

.tool-provider-capability-groups {
    display: grid;
    gap: 16px;
}

.tool-provider-capability-group {
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.tool-provider-capability-group-header {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--rule);
}

.tool-provider-capability-group-header > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-provider-capability-group-header h3 {
    margin: 0;
    color: var(--ink-1);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
}

.tool-provider-capability-group-header span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 8px;
    color: var(--ink-3);
    background: var(--surface-1);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
}

.tool-provider-capability-list {
    display: grid;
}

.tool-provider-capability-row {
    min-height: 66px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--rule-soft);
}

.tool-provider-capability-row:last-child {
    border-bottom: 0;
}

.tool-provider-capability-row.is-disabled {
    opacity: 0.62;
}

.tool-provider-capability-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.tool-provider-capability-copy strong,
.tool-provider-capability-copy small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.tool-provider-capability-copy strong {
    color: var(--ink-1);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
}

.tool-provider-capability-copy small {
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.35;
}

.tool-provider-capability-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tool-provider-capability-meta em {
    color: var(--ink-3);
    font-size: 11px;
    font-style: normal;
}

.tool-provider-capability-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tool-provider-switch {
    width: 34px;
    height: 20px;
    position: relative;
    display: inline-block;
    background: var(--rule-soft);
    border: 1px solid var(--rule);
    border-radius: 999px;
}

.tool-provider-switch::after {
    content: "";
    width: 14px;
    height: 14px;
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 999px;
}

.tool-provider-capability-row input:checked + .tool-provider-switch {
    background: var(--green-deep);
    border-color: var(--green-deep);
}

.tool-provider-capability-row input:checked + .tool-provider-switch::after {
    left: 16px;
    border-color: var(--green-deep);
}

.tool-provider-capability-row input:focus-visible + .tool-provider-switch {
    box-shadow: var(--focus-ring);
}

.tool-provider-detail-aside {
    display: grid;
    gap: 14px;
}

.tool-provider-side-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.tool-provider-availability-card {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    min-width: 0;
}

.tool-provider-availability-card .status-badge {
    justify-self: start;
}

.tool-provider-availability-card .button.document-action-button {
    width: 100%;
    justify-content: center;
}

.tool-provider-side-card h3 {
    margin: 0;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.tool-provider-scope-number {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.tool-provider-scope-number strong {
    color: var(--ink-1);
    font-size: 30px;
    font-weight: 850;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tool-provider-scope-number span {
    color: var(--ink-2);
    font-size: 12px;
}

.tool-provider-scope-meter {
    overflow: hidden;
    height: 4px;
    background: var(--rule-soft);
    border-radius: 999px;
}

.tool-provider-scope-meter span {
    height: 100%;
    display: block;
    background: var(--violet-fg);
    border-radius: inherit;
}

.tool-provider-scope-breakdown,
.tool-provider-fact-row {
    display: grid;
    gap: 8px;
}

.tool-provider-scope-breakdown span,
.tool-provider-fact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink-2);
    font-size: 12px;
}

.tool-provider-scope-breakdown i {
    margin-right: 4px;
}

.tool-provider-scope-breakdown strong,
.tool-provider-fact-row strong {
    color: var(--ink-1);
    font-size: 12px;
    font-weight: 850;
    text-align: right;
}

.tool-provider-availability {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.tool-provider-availability-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--violet-fg);
    background: oklch(0.955 0.026 286.0);
    border: 1px solid oklch(0.815 0.077 285.0);
    border-radius: 7px;
    font-size: 10px;
    font-weight: 850;
}

.tool-provider-availability strong {
    display: block;
    color: var(--ink-1);
    font-size: 13px;
    line-height: 1.25;
}

.tool-provider-availability p {
    margin: 3px 0 0;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.35;
}

.tool-provider-side-link {
    color: var(--violet-fg);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

.tool-integration-list {
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
}

.tool-integration-row.global-skill-row.organization-mcp-row {
    width: 100%;
    min-height: 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    color: var(--ink-1);
    background: var(--paper);
    border: 0;
    border-bottom: 1px solid var(--rule-soft);
    border-radius: 0;
    box-shadow: none;
    text-align: left;
}

.tool-integration-row.global-skill-row.organization-mcp-row:last-child {
    border-bottom: 0;
}

.tool-integration-row.global-skill-row.organization-mcp-row:hover,
.tool-integration-row.global-skill-row.organization-mcp-row:focus-visible {
    background: var(--surface-2);
}

.tool-integration-row.global-skill-row.organization-mcp-row:focus-visible {
    outline: 2px solid var(--violet-fg);
    outline-offset: -2px;
}

.tool-integration-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.tool-integration-title > span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.tool-integration-title strong {
    min-width: 0;
    color: var(--ink-1);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.tool-integration-title small {
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
}

.tool-integration-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    display: inline-block;
    background: var(--violet-fg);
    border-radius: 999px;
}

.tool-integration-status-dot.is-connected {
    background: var(--green-deep);
}

.tool-integration-status-dot.is-needs-attention {
    background: var(--amber-deep);
}

.tool-integration-status-dot.is-stale {
    background: var(--danger);
}

.tool-integration-status-dot.is-pending {
    background: var(--amber-deep);
}

.tool-integration-status-dot.is-available {
    background: var(--violet-fg);
}

.tool-integration-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
}

.tool-integration-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@keyframes sk-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes sk-skel {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

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

    .sidebar,
    .organization-sidebar {
        position: relative;
        height: auto;
    }

    .content {
        height: auto;
        overflow: visible;
        padding: 28px 18px 72px;
    }

    .workflow-edit-heading,
    .workflow-access-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .workflow-access-card-grid {
        grid-template-columns: 1fr;
    }

    .workflow-test-preview-grid {
        grid-template-columns: 1fr;
    }

    .workflow-save-bar {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .workflow-save-actions {
        justify-content: flex-start;
    }

    .tool-integration-card-heading {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .tool-integration-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-integration-overview-tile:nth-child(2) {
        border-right: 0;
    }

    .tool-integration-overview-tile:nth-child(-n + 2) {
        border-bottom: 1px solid var(--rule);
    }

    .tool-integration-directory-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-integration-card-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .tool-integration-search {
        width: 100%;
    }

    .tool-integration-directory-search {
        width: 100%;
    }

    .automated-workflow-overview,
    .admin-workflow-card,
    .admin-workflow-card-meta {
        grid-template-columns: 1fr;
    }

    .admin-workflow-card-side {
        min-width: 0;
        justify-items: start;
        align-content: start;
    }

    .admin-workflow-card-side .pill-cluster {
        justify-content: flex-start;
    }

    .tool-integration-tabs.mcp-scope-tabs {
        width: 100%;
    }

    .tool-integration-tabs .tab {
        flex: 1 0 auto;
    }

    .tool-provider-detail-title-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tool-provider-detail-title-row > .status-badge,
    .tool-provider-title-actions {
        grid-column: 1 / -1;
    }

    .tool-provider-title-actions {
        justify-content: flex-start;
    }

    .tool-provider-detail-layout {
        grid-template-columns: 1fr;
    }

    .tool-provider-scope-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .tool-provider-detail-aside {
        grid-template-columns: 1fr;
    }

    .tool-integration-row.global-skill-row.organization-mcp-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #organization-soul-panel.organization-soul-file-page.admin-soul-page {
        width: 100%;
        margin: -28px 0 -72px;
    }

    #organization-soul-panel.admin-soul-page .admin-soul-reader {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    #organization-soul-panel.admin-soul-page .soul-reader-sidebar,
    #organization-soul-panel.admin-soul-page .soul-reader-aside {
        position: static;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    #organization-soul-panel.admin-soul-page .soul-reader-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--rule);
    }

    #organization-soul-panel.admin-soul-page .soul-reader-document {
        padding: 44px 20px 64px;
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .workflow-contract-topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 20px;
    }

    .workflow-contract-actions {
        width: 100%;
        justify-content: space-between;
    }

    .workflow-contract-layout {
        grid-template-columns: 1fr;
        padding: 18px 16px 0;
    }

    .workflow-contract-nav {
        position: static;
    }

    .workflow-contract-nav nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-contract-page .workflow-builder-section-heading {
        grid-template-columns: 1fr;
    }

    .workflow-contract-page .workflow-builder-grid,
    .workflow-contract-page .workflow-access-card-grid {
        grid-template-columns: 1fr;
    }

    .workflow-access-toolbar,
    .workflow-contract-page .workflow-save-bar,
    .workflow-contract-page .workflow-save-status,
    .workflow-save-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .workflow-save-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .tool-integration-overview-grid
    .tool-integration-directory-list {
        grid-template-columns: 1fr;
    }

    .tool-integration-overview-tile,
    .tool-integration-overview-tile:nth-child(2),
    .tool-integration-overview-tile:nth-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--rule);
    }

    .tool-integration-overview-tile:last-child {
        border-bottom: 0;
    }
}

/* ─── Key Partner Brief page ─────────────────────────────────────────────── */

.kpb-page .kpb-layout {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 36px 24px 120px;
    display: grid;
    gap: 40px;
}

/* Hero */

.kpb-hero {
    display: grid;
    gap: 14px;
}

.kpb-hero-toprow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.kpb-hero-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kpb-eval-button {
    flex-shrink: 0;
    white-space: nowrap;
}

.kpb-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--surface-2);
    border: 1px solid var(--rule);
    border-radius: 20px;
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.kpb-status-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--green-fg);
    border-radius: 50%;
}

.kpb-trigger-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--amber-tint);
    border: 1px solid var(--amber-rule);
    border-radius: 20px;
    color: var(--amber-deep);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.kpb-hero-desc {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.55;
    max-width: 580px;
}

.kpb-integration-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

/* Chips */

.kpb-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    background: var(--surface-3);
    border: 1px solid var(--rule-soft);
    border-radius: 5px;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    white-space: nowrap;
}

.kpb-chip.is-amber {
    background: var(--amber-tint);
    border-color: var(--amber-rule);
    color: var(--amber-deep);
}

.kpb-chip.is-violet {
    background: var(--violet-tint);
    border-color: var(--violet-rule);
    color: var(--violet-deep);
}

.kpb-chip.is-green {
    background: var(--green-tint);
    border-color: var(--green-rule);
    color: var(--green-deep);
}

/* Trigger callout */

.kpb-trigger-callout {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    background: var(--amber-tint);
    border: 1px solid var(--amber-rule);
    border-radius: 10px;
}

.kpb-trigger-callout-label {
    color: var(--amber-deep);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.kpb-trigger-callout-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kpb-trigger-callout-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.kpb-trigger-callout-name {
    color: var(--ink-1);
    font-weight: 700;
}

.kpb-trigger-callout-name::after {
    content: "\2014";
    margin-left: 8px;
    color: var(--amber-deep);
    font-weight: 400;
}

.kpb-trigger-callout-when {
    color: var(--ink-1);
    font-size: 14px;
    font-weight: 650;
}

.kpb-trigger-callout-cron {
    padding: 1px 6px;
    background: var(--surface-2);
    border: 1px solid var(--amber-rule);
    border-radius: 4px;
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 11px;
}

.kpb-trigger-callout-tz {
    color: var(--ink-3);
    font-size: 12px;
}

.kpb-trigger-callout-endpoint {
    margin: 0;
}

.kpb-trigger-callout-endpoint code {
    padding: 2px 7px;
    background: var(--surface-2);
    border: 1px solid var(--amber-rule);
    border-radius: 4px;
    color: var(--ink-1);
    font-family: var(--mono);
    font-size: 12px;
}

.kpb-trigger-callout-note {
    margin: 0;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
}

.kpb-trigger-callout-note code {
    padding: 1px 6px;
    background: var(--surface-2);
    border: 1px solid var(--amber-rule);
    border-radius: 4px;
    color: var(--ink-1);
    font-family: var(--mono);
    font-size: 11px;
}

/* Section */

.kpb-section {
    display: grid;
    gap: 20px;
}

.kpb-section-title {
    margin: 0;
    color: var(--ink-1);
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
}

/* Task flow */

.kpb-flow {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kpb-task {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0 16px;
    position: relative;
}

.kpb-task-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 3px;
}

.kpb-task-dot {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 2px solid var(--rule-strong);
    border-radius: 50%;
    z-index: 1;
}

.kpb-task-dot::after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--rule-strong);
    border-radius: 50%;
}

.kpb-task-rail::after {
    content: "";
    flex: 1;
    width: 2px;
    min-height: 20px;
    background: var(--rule);
    margin-top: 4px;
}

.kpb-task--last .kpb-task-rail::after {
    display: none;
}

/* trigger */
.kpb-task--trigger .kpb-task-dot {
    border-color: var(--amber-fg);
    background: var(--amber-tint);
}
.kpb-task--trigger .kpb-task-dot::after {
    background: var(--amber-fg);
}

/* fetch */
.kpb-task--fetch .kpb-task-dot {
    border-color: var(--eng-fg);
    background: var(--eng-tint);
}
.kpb-task--fetch .kpb-task-dot::after {
    background: var(--eng-fg);
}

/* generate */
.kpb-task--generate .kpb-task-dot {
    border-color: var(--violet-fg);
    background: var(--violet-tint);
}
.kpb-task--generate .kpb-task-dot::after {
    background: var(--violet-fg);
}

/* human / checkpoint */
.kpb-task--human .kpb-task-dot,
.kpb-task--checkpoint .kpb-task-dot {
    border-color: var(--amber-fg);
    background: var(--amber-soft);
}
.kpb-task--human .kpb-task-dot::after,
.kpb-task--checkpoint .kpb-task-dot::after {
    background: var(--amber-fg);
}

/* write */
.kpb-task--write .kpb-task-dot {
    border-color: var(--green-fg);
    background: var(--green-tint);
}
.kpb-task--write .kpb-task-dot::after {
    background: var(--green-fg);
}

.kpb-task-body {
    padding: 0 0 32px;
    display: grid;
    gap: 6px;
    align-content: start;
}

.kpb-task-label {
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 5px;
}

.kpb-task--trigger .kpb-task-label {
    color: var(--amber-fg);
}

.kpb-task--checkpoint .kpb-task-label {
    color: var(--amber-fg);
}

.kpb-task-title {
    margin: 0;
    color: var(--ink-1);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.2;
}

.kpb-task-desc {
    margin: 0;
    color: var(--ink-2);
    font-size: 13.5px;
    line-height: 1.55;
    max-width: 520px;
}

.kpb-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

/* Settings panel */

.kpb-settings-form {
    display: grid;
    gap: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.kpb-settings-panel {
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: color-mix(in oklab, var(--paper) 70%, transparent);
    overflow: hidden;
}

.kpb-settings-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.kpb-settings-summary::-webkit-details-marker {
    display: none;
}

.kpb-settings-summary::after {
    content: "›";
    flex-shrink: 0;
    color: var(--ink-3);
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform 0.18s ease;
}

.kpb-settings-panel[open] .kpb-settings-summary::after {
    transform: rotate(270deg);
}

.kpb-settings-title {
    color: var(--ink-1);
    font-size: 14px;
    font-weight: 700;
}

.kpb-settings-hint {
    color: var(--ink-3);
    font-size: 12px;
}

.kpb-settings-body {
    border-top: 1px solid var(--rule-soft);
    padding-bottom: 8px;
}

.kpb-settings-body .workflow-contract-layout {
    width: 100%;
    padding-top: 0;
}

@media (max-width: 640px) {
    .kpb-page .kpb-layout {
        padding: 20px 16px 100px;
        gap: 28px;
    }

    .kpb-task {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .kpb-task-dot {
        width: 22px;
        height: 22px;
    }

    .kpb-task-dot::after {
        width: 8px;
        height: 8px;
    }
}
